From owner-svn-src-vendor@freebsd.org Wed Mar 15 04:16:09 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1BD6D0D3ED; Wed, 15 Mar 2017 04:16:09 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC70511A0; Wed, 15 Mar 2017 04:16:09 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2F4G8Fi025017; Wed, 15 Mar 2017 04:16:08 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2F4G8xo025013; Wed, 15 Mar 2017 04:16:08 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201703150416.v2F4G8xo025013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Wed, 15 Mar 2017 04:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r315290 - in vendor/illumos/dist: cmd/zdb cmd/ztest lib/libzpool/common lib/libzpool/common/sys X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2017 04:16:09 -0000 Author: jpaetzel Date: Wed Mar 15 04:16:08 2017 New Revision: 315290 URL: https://svnweb.freebsd.org/changeset/base/315290 Log: 7303 dynamic metaslab selection illumos/illumos-gate@8363e80ae72609660f6090766ca8c2c18aa53f0c https://github.com/illumos/illumos-gate/commit/8363e80ae72609660f6090766ca8c2c18aa53f0 https://www.illumos.org/issues/7303 This change introduces a new weighting algorithm to improve metaslab selection. The new weighting algorithm relies on the SPACEMAP_HISTOGRAM feature. As a result, the metaslab weight now encodes the type of weighting algorithm used (size-based vs segment-based). This also introduce a new allocation tracing facility and two new dcmds to help debug allocation problems. Each zio now contains a zio_alloc_list_t structure that is populated as the zio goes through the allocations stage. Here's an example of how to use the tracing facility: > c5ec000::print zio_t io_alloc_list | ::walk list | ::metaslab_trace MSID DVA ASIZE WEIGHT RESULT VDEV - 0 400 0 NOT_ALLOCATABLE ztest.0a - 0 400 0 NOT_ALLOCATABLE ztest.0a - 0 400 0 ENOSPC ztest.0a - 0 200 0 NOT_ALLOCATABLE ztest.0a - 0 200 0 NOT_ALLOCATABLE ztest.0a - 0 200 0 ENOSPC ztest.0a 1 0 400 1 x 8M 17b1a00 ztest.0a > 1ff2400::print zio_t io_alloc_list | ::walk list | ::metaslab_trace MSID DVA ASIZE WEIGHT RESULT VDEV - 0 200 0 NOT_ALLOCATABLE mirror-2 - 0 200 0 NOT_ALLOCATABLE mirror-0 1 0 200 1 x 4M 112ae00 mirror-1 - 1 200 0 NOT_ALLOCATABLE mirror-2 - 1 200 0 NOT_ALLOCATABLE mirror-0 1 1 200 1 x 4M 112b000 mirror-1 - 2 200 0 NOT_ALLOCATABLE mirror-2 If the metaslab is using segment-based weighting then the WEIGHT column will display the number of segments available in the bucket where the allocation attempt was made. Author: George Wilson Reviewed by: Alex Reece Reviewed by: Chris Siden Reviewed by: Dan Kimmel Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Pavel Zakharov Reviewed by: Prakash Surya Reviewed by: Don Brady Approved by: Richard Lowe Modified: vendor/illumos/dist/cmd/zdb/zdb.c vendor/illumos/dist/cmd/ztest/ztest.c vendor/illumos/dist/lib/libzpool/common/kernel.c vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Wed Mar 15 00:29:27 2017 (r315289) +++ vendor/illumos/dist/cmd/zdb/zdb.c Wed Mar 15 04:16:08 2017 (r315290) @@ -2562,10 +2562,21 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) if (!dump_opt['L']) { vdev_t *rvd = spa->spa_root_vdev; + + /* + * We are going to be changing the meaning of the metaslab's + * ms_tree. Ensure that the allocator doesn't try to + * use the tree. + */ + spa->spa_normal_class->mc_ops = &zdb_metaslab_ops; + spa->spa_log_class->mc_ops = &zdb_metaslab_ops; + for (uint64_t c = 0; c < rvd->vdev_children; c++) { vdev_t *vd = rvd->vdev_child[c]; + metaslab_group_t *mg = vd->vdev_mg; for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; + ASSERT3P(msp->ms_group, ==, mg); mutex_enter(&msp->ms_lock); metaslab_unload(msp); @@ -2586,8 +2597,6 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) (longlong_t)m, (longlong_t)vd->vdev_ms_count); - msp->ms_ops = &zdb_metaslab_ops; - /* * We don't want to spend the CPU * manipulating the size-ordered @@ -2597,7 +2606,10 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) msp->ms_tree->rt_ops = NULL; VERIFY0(space_map_load(msp->ms_sm, msp->ms_tree, SM_ALLOC)); - msp->ms_loaded = B_TRUE; + + if (!msp->ms_loaded) { + msp->ms_loaded = B_TRUE; + } } mutex_exit(&msp->ms_lock); } @@ -2619,8 +2631,10 @@ zdb_leak_fini(spa_t *spa) vdev_t *rvd = spa->spa_root_vdev; for (int c = 0; c < rvd->vdev_children; c++) { vdev_t *vd = rvd->vdev_child[c]; + metaslab_group_t *mg = vd->vdev_mg; for (int m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; + ASSERT3P(mg, ==, msp->ms_group); mutex_enter(&msp->ms_lock); /* @@ -2634,7 +2648,10 @@ zdb_leak_fini(spa_t *spa) * from the ms_tree. */ range_tree_vacate(msp->ms_tree, zdb_leak, vd); - msp->ms_loaded = B_FALSE; + + if (msp->ms_loaded) { + msp->ms_loaded = B_FALSE; + } mutex_exit(&msp->ms_lock); } Modified: vendor/illumos/dist/cmd/ztest/ztest.c ============================================================================== --- vendor/illumos/dist/cmd/ztest/ztest.c Wed Mar 15 00:29:27 2017 (r315289) +++ vendor/illumos/dist/cmd/ztest/ztest.c Wed Mar 15 04:16:08 2017 (r315290) @@ -171,7 +171,7 @@ static const ztest_shared_opts_t ztest_o .zo_mirrors = 2, .zo_raidz = 4, .zo_raidz_parity = 1, - .zo_vdev_size = SPA_MINDEVSIZE * 2, + .zo_vdev_size = SPA_MINDEVSIZE * 4, /* 256m default size */ .zo_datasets = 7, .zo_threads = 23, .zo_passtime = 60, /* 60 seconds */ Modified: vendor/illumos/dist/lib/libzpool/common/kernel.c ============================================================================== --- vendor/illumos/dist/lib/libzpool/common/kernel.c Wed Mar 15 00:29:27 2017 (r315289) +++ vendor/illumos/dist/lib/libzpool/common/kernel.c Wed Mar 15 04:16:08 2017 (r315290) @@ -94,6 +94,11 @@ kstat_create(const char *module, int ins /*ARGSUSED*/ void +kstat_named_init(kstat_named_t *knp, const char *name, uchar_t type) +{} + +/*ARGSUSED*/ +void kstat_install(kstat_t *ksp) {} Modified: vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Wed Mar 15 00:29:27 2017 (r315289) +++ vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Wed Mar 15 04:16:08 2017 (r315290) @@ -301,6 +301,7 @@ extern void cv_broadcast(kcondvar_t *cv) */ extern kstat_t *kstat_create(const char *, int, const char *, const char *, uchar_t, ulong_t, uchar_t); +extern void kstat_named_init(kstat_named_t *, const char *, uchar_t); extern void kstat_install(kstat_t *); extern void kstat_delete(kstat_t *); extern void kstat_waitq_enter(kstat_io_t *); From owner-svn-src-vendor@freebsd.org Wed Mar 15 04:18:41 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC931D0D4D6; Wed, 15 Mar 2017 04:18:41 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D5D813A0; Wed, 15 Mar 2017 04:18:41 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2F4IeJU025192; Wed, 15 Mar 2017 04:18:40 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2F4Iesf025190; Wed, 15 Mar 2017 04:18:40 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201703150418.v2F4Iesf025190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Wed, 15 Mar 2017 04:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r315291 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2017 04:18:42 -0000 Author: jpaetzel Date: Wed Mar 15 04:18:40 2017 New Revision: 315291 URL: https://svnweb.freebsd.org/changeset/base/315291 Log: 7303 dynamic metaslab selection illumos/illumos-gate@8363e80ae72609660f6090766ca8c2c18aa53f0c https://github.com/illumos/illumos-gate/commit/8363e80ae72609660f6090766ca8c2c18aa53f0 https://www.illumos.org/issues/7303 This change introduces a new weighting algorithm to improve metaslab selection. The new weighting algorithm relies on the SPACEMAP_HISTOGRAM feature. As a result, the metaslab weight now encodes the type of weighting algorithm used (size-based vs segment-based). This also introduce a new allocation tracing facility and two new dcmds to help debug allocation problems. Each zio now contains a zio_alloc_list_t structure that is populated as the zio goes through the allocations stage. Here's an example of how to use the tracing facility: > c5ec000::print zio_t io_alloc_list | ::walk list | ::metaslab_trace MSID DVA ASIZE WEIGHT RESULT VDEV - 0 400 0 NOT_ALLOCATABLE ztest.0a - 0 400 0 NOT_ALLOCATABLE ztest.0a - 0 400 0 ENOSPC ztest.0a - 0 200 0 NOT_ALLOCATABLE ztest.0a - 0 200 0 NOT_ALLOCATABLE ztest.0a - 0 200 0 ENOSPC ztest.0a 1 0 400 1 x 8M 17b1a00 ztest.0a > 1ff2400::print zio_t io_alloc_list | ::walk list | ::metaslab_trace MSID DVA ASIZE WEIGHT RESULT VDEV - 0 200 0 NOT_ALLOCATABLE mirror-2 - 0 200 0 NOT_ALLOCATABLE mirror-0 1 0 200 1 x 4M 112ae00 mirror-1 - 1 200 0 NOT_ALLOCATABLE mirror-2 - 1 200 0 NOT_ALLOCATABLE mirror-0 1 1 200 1 x 4M 112b000 mirror-1 - 2 200 0 NOT_ALLOCATABLE mirror-2 If the metaslab is using segment-based weighting then the WEIGHT column will display the number of segments available in the bucket where the allocation attempt was made. Author: George Wilson Reviewed by: Alex Reece Reviewed by: Chris Siden Reviewed by: Dan Kimmel Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Pavel Zakharov Reviewed by: Prakash Surya Reviewed by: Don Brady Approved by: Richard Lowe Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor-sys/illumos/dist/uts/common/fs/zfs/space_map.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_debug.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Wed Mar 15 04:16:08 2017 (r315290) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Wed Mar 15 04:18:40 2017 (r315291) @@ -38,18 +38,13 @@ #define GANG_ALLOCATION(flags) \ ((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER)) -#define METASLAB_WEIGHT_PRIMARY (1ULL << 63) -#define METASLAB_WEIGHT_SECONDARY (1ULL << 62) -#define METASLAB_ACTIVE_MASK \ - (METASLAB_WEIGHT_PRIMARY | METASLAB_WEIGHT_SECONDARY) - uint64_t metaslab_aliquot = 512ULL << 10; uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ /* * The in-core space map representation is more compact than its on-disk form. * The zfs_condense_pct determines how much more compact the in-core - * space_map representation must be before we compact it on-disk. + * space map representation must be before we compact it on-disk. * Values should be greater than or equal to 100. */ int zfs_condense_pct = 200; @@ -122,7 +117,7 @@ uint64_t metaslab_df_alloc_threshold = S /* * The minimum free space, in percent, which must be available * in a space map to continue allocations in a first-fit fashion. - * Once the space_map's free space drops below this level we dynamically + * Once the space map's free space drops below this level we dynamically * switch to using best-fit allocations. */ int metaslab_df_free_pct = 4; @@ -170,7 +165,38 @@ boolean_t metaslab_lba_weighting_enabled */ boolean_t metaslab_bias_enabled = B_TRUE; -static uint64_t metaslab_fragmentation(metaslab_t *); +/* + * Enable/disable segment-based metaslab selection. + */ +boolean_t zfs_metaslab_segment_weight_enabled = B_TRUE; + +/* + * When using segment-based metaslab selection, we will continue + * allocating from the active metaslab until we have exhausted + * zfs_metaslab_switch_threshold of its buckets. + */ +int zfs_metaslab_switch_threshold = 2; + +/* + * Internal switch to enable/disable the metaslab allocation tracing + * facility. + */ +boolean_t metaslab_trace_enabled = B_TRUE; + +/* + * Maximum entries that the metaslab allocation tracing facility will keep + * in a given list when running in non-debug mode. We limit the number + * of entries in non-debug mode to prevent us from using up too much memory. + * The limit should be sufficiently large that we don't expect any allocation + * to every exceed this value. In debug mode, the system will panic if this + * limit is ever reached allowing for further investigation. + */ +uint64_t metaslab_trace_max_entries = 5000; + +static uint64_t metaslab_weight(metaslab_t *); +static void metaslab_set_fragmentation(metaslab_t *); + +kmem_cache_t *metaslab_alloc_trace_cache; /* * ========================================================================== @@ -388,11 +414,6 @@ metaslab_class_expandable_space(metaslab return (space); } -/* - * ========================================================================== - * Metaslab groups - * ========================================================================== - */ static int metaslab_compare(const void *x1, const void *x2) { @@ -418,6 +439,57 @@ metaslab_compare(const void *x1, const v } /* + * Verify that the space accounting on disk matches the in-core range_trees. + */ +void +metaslab_verify_space(metaslab_t *msp, uint64_t txg) +{ + spa_t *spa = msp->ms_group->mg_vd->vdev_spa; + uint64_t allocated = 0; + uint64_t freed = 0; + uint64_t sm_free_space, msp_free_space; + + ASSERT(MUTEX_HELD(&msp->ms_lock)); + + if ((zfs_flags & ZFS_DEBUG_METASLAB_VERIFY) == 0) + return; + + /* + * We can only verify the metaslab space when we're called + * from syncing context with a loaded metaslab that has an allocated + * space map. Calling this in non-syncing context does not + * provide a consistent view of the metaslab since we're performing + * allocations in the future. + */ + if (txg != spa_syncing_txg(spa) || msp->ms_sm == NULL || + !msp->ms_loaded) + return; + + sm_free_space = msp->ms_size - space_map_allocated(msp->ms_sm) - + space_map_alloc_delta(msp->ms_sm); + + /* + * Account for future allocations since we would have already + * deducted that space from the ms_freetree. + */ + for (int t = 0; t < TXG_CONCURRENT_STATES; t++) { + allocated += + range_tree_space(msp->ms_alloctree[(txg + t) & TXG_MASK]); + } + freed = range_tree_space(msp->ms_freetree[TXG_CLEAN(txg) & TXG_MASK]); + + msp_free_space = range_tree_space(msp->ms_tree) + allocated + + msp->ms_deferspace + freed; + + VERIFY3U(sm_free_space, ==, msp_free_space); +} + +/* + * ========================================================================== + * Metaslab groups + * ========================================================================== + */ +/* * Update the allocatable flag and the metaslab group's capacity. * The allocatable flag is set to true if the capacity is below * the zfs_mg_noalloc_threshold or has a fragmentation value that is @@ -989,7 +1061,7 @@ static range_tree_ops_t metaslab_rt_ops /* * ========================================================================== - * Metaslab block operations + * Common allocator routines * ========================================================================== */ @@ -1008,31 +1080,22 @@ metaslab_block_maxsize(metaslab_t *msp) return (rs->rs_end - rs->rs_start); } -uint64_t -metaslab_block_alloc(metaslab_t *msp, uint64_t size) +static range_seg_t * +metaslab_block_find(avl_tree_t *t, uint64_t start, uint64_t size) { - uint64_t start; - range_tree_t *rt = msp->ms_tree; - - VERIFY(!msp->ms_condensing); + range_seg_t *rs, rsearch; + avl_index_t where; - start = msp->ms_ops->msop_alloc(msp, size); - if (start != -1ULL) { - vdev_t *vd = msp->ms_group->mg_vd; + rsearch.rs_start = start; + rsearch.rs_end = start + size; - VERIFY0(P2PHASE(start, 1ULL << vd->vdev_ashift)); - VERIFY0(P2PHASE(size, 1ULL << vd->vdev_ashift)); - VERIFY3U(range_tree_space(rt) - size, <=, msp->ms_size); - range_tree_remove(rt, start, size); + rs = avl_find(t, &rsearch, &where); + if (rs == NULL) { + rs = avl_nearest(t, where, AVL_AFTER); } - return (start); -} -/* - * ========================================================================== - * Common allocator routines - * ========================================================================== - */ + return (rs); +} /* * This is a helper function that can be used by the allocator to find @@ -1043,15 +1106,7 @@ static uint64_t metaslab_block_picker(avl_tree_t *t, uint64_t *cursor, uint64_t size, uint64_t align) { - range_seg_t *rs, rsearch; - avl_index_t where; - - rsearch.rs_start = *cursor; - rsearch.rs_end = *cursor + size; - - rs = avl_find(t, &rsearch, &where); - if (rs == NULL) - rs = avl_nearest(t, where, AVL_AFTER); + range_seg_t *rs = metaslab_block_find(t, *cursor, size); while (rs != NULL) { uint64_t offset = P2ROUNDUP(rs->rs_start, align); @@ -1276,6 +1331,7 @@ int metaslab_load(metaslab_t *msp) { int error = 0; + boolean_t success = B_FALSE; ASSERT(MUTEX_HELD(&msp->ms_lock)); ASSERT(!msp->ms_loaded); @@ -1293,14 +1349,18 @@ metaslab_load(metaslab_t *msp) else range_tree_add(msp->ms_tree, msp->ms_start, msp->ms_size); - msp->ms_loaded = (error == 0); + success = (error == 0); msp->ms_loading = B_FALSE; - if (msp->ms_loaded) { + if (success) { + ASSERT3P(msp->ms_group, !=, NULL); + msp->ms_loaded = B_TRUE; + for (int t = 0; t < TXG_DEFER_SIZE; t++) { range_tree_walk(msp->ms_defertree[t], range_tree_remove, msp->ms_tree); } + msp->ms_max_size = metaslab_block_maxsize(msp); } cv_broadcast(&msp->ms_load_cv); return (error); @@ -1313,6 +1373,7 @@ metaslab_unload(metaslab_t *msp) range_tree_vacate(msp->ms_tree, NULL, NULL); msp->ms_loaded = B_FALSE; msp->ms_weight &= ~METASLAB_ACTIVE_MASK; + msp->ms_max_size = 0; } int @@ -1357,21 +1418,23 @@ metaslab_init(metaslab_group_t *mg, uint ms->ms_tree = range_tree_create(&metaslab_rt_ops, ms, &ms->ms_lock); metaslab_group_add(mg, ms); - ms->ms_fragmentation = metaslab_fragmentation(ms); - ms->ms_ops = mg->mg_class->mc_ops; + metaslab_set_fragmentation(ms); /* * If we're opening an existing pool (txg == 0) or creating * a new one (txg == TXG_INITIAL), all space is available now. * If we're adding space to an existing pool, the new space * does not become available until after this txg has synced. + * The metaslab's weight will also be initialized when we sync + * out this txg. This ensures that we don't attempt to allocate + * from it before we have initialized it completely. */ if (txg <= TXG_INITIAL) metaslab_sync_done(ms, 0); /* * If metaslab_debug_load is set and we're initializing a metaslab - * that has an allocated space_map object then load the its space + * that has an allocated space map object then load the its space * map so that can verify frees. */ if (metaslab_debug_load && ms->ms_sm != NULL) { @@ -1398,7 +1461,6 @@ metaslab_fini(metaslab_t *msp) metaslab_group_remove(mg, msp); mutex_enter(&msp->ms_lock); - VERIFY(msp->ms_group == NULL); vdev_space_update(mg->mg_vd, -space_map_allocated(msp->ms_sm), 0, -msp->ms_size); @@ -1471,8 +1533,8 @@ int zfs_frag_table[FRAGMENTATION_TABLE_S * not support this metric. Otherwise, the return value should be in the * range [0, 100]. */ -static uint64_t -metaslab_fragmentation(metaslab_t *msp) +static void +metaslab_set_fragmentation(metaslab_t *msp) { spa_t *spa = msp->ms_group->mg_vd->vdev_spa; uint64_t fragmentation = 0; @@ -1480,18 +1542,22 @@ metaslab_fragmentation(metaslab_t *msp) boolean_t feature_enabled = spa_feature_is_enabled(spa, SPA_FEATURE_SPACEMAP_HISTOGRAM); - if (!feature_enabled) - return (ZFS_FRAG_INVALID); + if (!feature_enabled) { + msp->ms_fragmentation = ZFS_FRAG_INVALID; + return; + } /* * A null space map means that the entire metaslab is free * and thus is not fragmented. */ - if (msp->ms_sm == NULL) - return (0); + if (msp->ms_sm == NULL) { + msp->ms_fragmentation = 0; + return; + } /* - * If this metaslab's space_map has not been upgraded, flag it + * If this metaslab's space map has not been upgraded, flag it * so that we upgrade next time we encounter it. */ if (msp->ms_sm->sm_dbuf->db_size != sizeof (space_map_phys_t)) { @@ -1504,12 +1570,14 @@ metaslab_fragmentation(metaslab_t *msp) spa_dbgmsg(spa, "txg %llu, requesting force condense: " "msp %p, vd %p", txg, msp, vd); } - return (ZFS_FRAG_INVALID); + msp->ms_fragmentation = ZFS_FRAG_INVALID; + return; } for (int i = 0; i < SPACE_MAP_HISTOGRAM_SIZE; i++) { uint64_t space = 0; uint8_t shift = msp->ms_sm->sm_shift; + int idx = MIN(shift - SPA_MINBLOCKSHIFT + i, FRAGMENTATION_TABLE_SIZE - 1); @@ -1526,7 +1594,8 @@ metaslab_fragmentation(metaslab_t *msp) if (total > 0) fragmentation /= total; ASSERT3U(fragmentation, <=, 100); - return (fragmentation); + + msp->ms_fragmentation = fragmentation; } /* @@ -1535,30 +1604,20 @@ metaslab_fragmentation(metaslab_t *msp) * the LBA range, and whether the metaslab is loaded. */ static uint64_t -metaslab_weight(metaslab_t *msp) +metaslab_space_weight(metaslab_t *msp) { metaslab_group_t *mg = msp->ms_group; vdev_t *vd = mg->mg_vd; uint64_t weight, space; ASSERT(MUTEX_HELD(&msp->ms_lock)); - - /* - * This vdev is in the process of being removed so there is nothing - * for us to do here. - */ - if (vd->vdev_removing) { - ASSERT0(space_map_allocated(msp->ms_sm)); - ASSERT0(vd->vdev_ms_shift); - return (0); - } + ASSERT(!vd->vdev_removing); /* * The baseline weight is the metaslab's free space. */ space = msp->ms_size - space_map_allocated(msp->ms_sm); - msp->ms_fragmentation = metaslab_fragmentation(msp); if (metaslab_fragmentation_factor_enabled && msp->ms_fragmentation != ZFS_FRAG_INVALID) { /* @@ -1607,6 +1666,210 @@ metaslab_weight(metaslab_t *msp) weight |= (msp->ms_weight & METASLAB_ACTIVE_MASK); } + WEIGHT_SET_SPACEBASED(weight); + return (weight); +} + +/* + * Return the weight of the specified metaslab, according to the segment-based + * weighting algorithm. The metaslab must be loaded. This function can + * be called within a sync pass since it relies only on the metaslab's + * range tree which is always accurate when the metaslab is loaded. + */ +static uint64_t +metaslab_weight_from_range_tree(metaslab_t *msp) +{ + uint64_t weight = 0; + uint32_t segments = 0; + + ASSERT(msp->ms_loaded); + + for (int i = RANGE_TREE_HISTOGRAM_SIZE - 1; i >= SPA_MINBLOCKSHIFT; + i--) { + uint8_t shift = msp->ms_group->mg_vd->vdev_ashift; + int max_idx = SPACE_MAP_HISTOGRAM_SIZE + shift - 1; + + segments <<= 1; + segments += msp->ms_tree->rt_histogram[i]; + + /* + * The range tree provides more precision than the space map + * and must be downgraded so that all values fit within the + * space map's histogram. This allows us to compare loaded + * vs. unloaded metaslabs to determine which metaslab is + * considered "best". + */ + if (i > max_idx) + continue; + + if (segments != 0) { + WEIGHT_SET_COUNT(weight, segments); + WEIGHT_SET_INDEX(weight, i); + WEIGHT_SET_ACTIVE(weight, 0); + break; + } + } + return (weight); +} + +/* + * Calculate the weight based on the on-disk histogram. This should only + * be called after a sync pass has completely finished since the on-disk + * information is updated in metaslab_sync(). + */ +static uint64_t +metaslab_weight_from_spacemap(metaslab_t *msp) +{ + uint64_t weight = 0; + + for (int i = SPACE_MAP_HISTOGRAM_SIZE - 1; i >= 0; i--) { + if (msp->ms_sm->sm_phys->smp_histogram[i] != 0) { + WEIGHT_SET_COUNT(weight, + msp->ms_sm->sm_phys->smp_histogram[i]); + WEIGHT_SET_INDEX(weight, i + + msp->ms_sm->sm_shift); + WEIGHT_SET_ACTIVE(weight, 0); + break; + } + } + return (weight); +} + +/* + * Compute a segment-based weight for the specified metaslab. The weight + * is determined by highest bucket in the histogram. The information + * for the highest bucket is encoded into the weight value. + */ +static uint64_t +metaslab_segment_weight(metaslab_t *msp) +{ + metaslab_group_t *mg = msp->ms_group; + uint64_t weight = 0; + uint8_t shift = mg->mg_vd->vdev_ashift; + + ASSERT(MUTEX_HELD(&msp->ms_lock)); + + /* + * The metaslab is completely free. + */ + if (space_map_allocated(msp->ms_sm) == 0) { + int idx = highbit64(msp->ms_size) - 1; + int max_idx = SPACE_MAP_HISTOGRAM_SIZE + shift - 1; + + if (idx < max_idx) { + WEIGHT_SET_COUNT(weight, 1ULL); + WEIGHT_SET_INDEX(weight, idx); + } else { + WEIGHT_SET_COUNT(weight, 1ULL << (idx - max_idx)); + WEIGHT_SET_INDEX(weight, max_idx); + } + WEIGHT_SET_ACTIVE(weight, 0); + ASSERT(!WEIGHT_IS_SPACEBASED(weight)); + + return (weight); + } + + ASSERT3U(msp->ms_sm->sm_dbuf->db_size, ==, sizeof (space_map_phys_t)); + + /* + * If the metaslab is fully allocated then just make the weight 0. + */ + if (space_map_allocated(msp->ms_sm) == msp->ms_size) + return (0); + /* + * If the metaslab is already loaded, then use the range tree to + * determine the weight. Otherwise, we rely on the space map information + * to generate the weight. + */ + if (msp->ms_loaded) { + weight = metaslab_weight_from_range_tree(msp); + } else { + weight = metaslab_weight_from_spacemap(msp); + } + + /* + * If the metaslab was active the last time we calculated its weight + * then keep it active. We want to consume the entire region that + * is associated with this weight. + */ + if (msp->ms_activation_weight != 0 && weight != 0) + WEIGHT_SET_ACTIVE(weight, WEIGHT_GET_ACTIVE(msp->ms_weight)); + return (weight); +} + +/* + * Determine if we should attempt to allocate from this metaslab. If the + * metaslab has a maximum size then we can quickly determine if the desired + * allocation size can be satisfied. Otherwise, if we're using segment-based + * weighting then we can determine the maximum allocation that this metaslab + * can accommodate based on the index encoded in the weight. If we're using + * space-based weights then rely on the entire weight (excluding the weight + * type bit). + */ +boolean_t +metaslab_should_allocate(metaslab_t *msp, uint64_t asize) +{ + boolean_t should_allocate; + + if (msp->ms_max_size != 0) + return (msp->ms_max_size >= asize); + + if (!WEIGHT_IS_SPACEBASED(msp->ms_weight)) { + /* + * The metaslab segment weight indicates segments in the + * range [2^i, 2^(i+1)), where i is the index in the weight. + * Since the asize might be in the middle of the range, we + * should attempt the allocation if asize < 2^(i+1). + */ + should_allocate = (asize < + 1ULL << (WEIGHT_GET_INDEX(msp->ms_weight) + 1)); + } else { + should_allocate = (asize <= + (msp->ms_weight & ~METASLAB_WEIGHT_TYPE)); + } + return (should_allocate); +} + +static uint64_t +metaslab_weight(metaslab_t *msp) +{ + vdev_t *vd = msp->ms_group->mg_vd; + spa_t *spa = vd->vdev_spa; + uint64_t weight; + + ASSERT(MUTEX_HELD(&msp->ms_lock)); + + /* + * This vdev is in the process of being removed so there is nothing + * for us to do here. + */ + if (vd->vdev_removing) { + ASSERT0(space_map_allocated(msp->ms_sm)); + ASSERT0(vd->vdev_ms_shift); + return (0); + } + + metaslab_set_fragmentation(msp); + + /* + * Update the maximum size if the metaslab is loaded. This will + * ensure that we get an accurate maximum size if newly freed space + * has been added back into the free tree. + */ + if (msp->ms_loaded) + msp->ms_max_size = metaslab_block_maxsize(msp); + + /* + * Segment-based weighting requires space map histogram support. + */ + if (zfs_metaslab_segment_weight_enabled && + spa_feature_is_enabled(spa, SPA_FEATURE_SPACEMAP_HISTOGRAM) && + (msp->ms_sm == NULL || msp->ms_sm->sm_dbuf->db_size == + sizeof (space_map_phys_t))) { + weight = metaslab_segment_weight(msp); + } else { + weight = metaslab_space_weight(msp); + } return (weight); } @@ -1625,6 +1888,7 @@ metaslab_activate(metaslab_t *msp, uint6 } } + msp->ms_activation_weight = msp->ms_weight; metaslab_group_sort(msp->ms_group, msp, msp->ms_weight | activation_weight); } @@ -1635,18 +1899,56 @@ metaslab_activate(metaslab_t *msp, uint6 } static void -metaslab_passivate(metaslab_t *msp, uint64_t size) +metaslab_passivate(metaslab_t *msp, uint64_t weight) { + uint64_t size = weight & ~METASLAB_WEIGHT_TYPE; + /* * If size < SPA_MINBLOCKSIZE, then we will not allocate from * this metaslab again. In that case, it had better be empty, * or we would be leaving space on the table. */ - ASSERT(size >= SPA_MINBLOCKSIZE || range_tree_space(msp->ms_tree) == 0); - metaslab_group_sort(msp->ms_group, msp, MIN(msp->ms_weight, size)); + ASSERT(size >= SPA_MINBLOCKSIZE || + range_tree_space(msp->ms_tree) == 0); + ASSERT0(weight & METASLAB_ACTIVE_MASK); + + msp->ms_activation_weight = 0; + metaslab_group_sort(msp->ms_group, msp, weight); ASSERT((msp->ms_weight & METASLAB_ACTIVE_MASK) == 0); } +/* + * Segment-based metaslabs are activated once and remain active until + * we either fail an allocation attempt (similar to space-based metaslabs) + * or have exhausted the free space in zfs_metaslab_switch_threshold + * buckets since the metaslab was activated. This function checks to see + * if we've exhaused the zfs_metaslab_switch_threshold buckets in the + * metaslab and passivates it proactively. This will allow us to select a + * metaslabs with larger contiguous region if any remaining within this + * metaslab group. If we're in sync pass > 1, then we continue using this + * metaslab so that we don't dirty more block and cause more sync passes. + */ +void +metaslab_segment_may_passivate(metaslab_t *msp) +{ + spa_t *spa = msp->ms_group->mg_vd->vdev_spa; + + if (WEIGHT_IS_SPACEBASED(msp->ms_weight) || spa_sync_pass(spa) > 1) + return; + + /* + * Since we are in the middle of a sync pass, the most accurate + * information that is accessible to us is the in-core range tree + * histogram; calculate the new weight based on that information. + */ + uint64_t weight = metaslab_weight_from_range_tree(msp); + int activation_idx = WEIGHT_GET_INDEX(msp->ms_activation_weight); + int current_idx = WEIGHT_GET_INDEX(weight); + + if (current_idx <= activation_idx - zfs_metaslab_switch_threshold) + metaslab_passivate(msp, weight); +} + static void metaslab_preload(void *arg) { @@ -1659,11 +1961,7 @@ metaslab_preload(void *arg) metaslab_load_wait(msp); if (!msp->ms_loaded) (void) metaslab_load(msp); - - /* - * Set the ms_access_txg value so that we don't unload it right away. - */ - msp->ms_access_txg = spa_syncing_txg(spa) + metaslab_unload_delay + 1; + msp->ms_selected_txg = spa_syncing_txg(spa); mutex_exit(&msp->ms_lock); } @@ -1684,10 +1982,7 @@ metaslab_group_preload(metaslab_group_t /* * Load the next potential metaslabs */ - msp = avl_first(t); - while (msp != NULL) { - metaslab_t *msp_next = AVL_NEXT(t, msp); - + for (msp = avl_first(t); msp != NULL; msp = AVL_NEXT(t, msp)) { /* * We preload only the maximum number of metaslabs specified * by metaslab_preload_limit. If a metaslab is being forced @@ -1695,27 +1990,11 @@ metaslab_group_preload(metaslab_group_t * that force condensing happens in the next txg. */ if (++m > metaslab_preload_limit && !msp->ms_condense_wanted) { - msp = msp_next; continue; } - /* - * We must drop the metaslab group lock here to preserve - * lock ordering with the ms_lock (when grabbing both - * the mg_lock and the ms_lock, the ms_lock must be taken - * first). As a result, it is possible that the ordering - * of the metaslabs within the avl tree may change before - * we reacquire the lock. The metaslab cannot be removed from - * the tree while we're in syncing context so it is safe to - * drop the mg_lock here. If the metaslabs are reordered - * nothing will break -- we just may end up loading a - * less than optimal one. - */ - mutex_exit(&mg->mg_lock); VERIFY(taskq_dispatch(mg->mg_taskq, metaslab_preload, msp, TQ_SLEEP) != NULL); - mutex_enter(&mg->mg_lock); - msp = msp_next; } mutex_exit(&mg->mg_lock); } @@ -1864,7 +2143,7 @@ metaslab_condense(metaslab_t *msp, uint6 mutex_enter(&msp->ms_lock); /* - * While we would ideally like to create a space_map representation + * While we would ideally like to create a space map representation * that consists only of allocation records, doing so can be * prohibitively expensive because the in-core free tree can be * large, and therefore computationally expensive to subtract @@ -1927,7 +2206,7 @@ metaslab_sync(metaslab_t *msp, uint64_t * metaslab_sync() is the metaslab's ms_tree. No other thread can * be modifying this txg's alloctree, freetree, freed_tree, or * space_map_phys_t. Therefore, we only hold ms_lock to satify - * space_map ASSERTs. We drop it whenever we call into the DMU, + * space map ASSERTs. We drop it whenever we call into the DMU, * because the DMU can call down to us (e.g. via zio_free()) at * any time. */ @@ -1949,7 +2228,7 @@ metaslab_sync(metaslab_t *msp, uint64_t mutex_enter(&msp->ms_lock); /* - * Note: metaslab_condense() clears the space_map's histogram. + * Note: metaslab_condense() clears the space map's histogram. * Therefore we must verify and remove this histogram before * condensing. */ @@ -1974,16 +2253,38 @@ metaslab_sync(metaslab_t *msp, uint64_t */ space_map_histogram_clear(msp->ms_sm); space_map_histogram_add(msp->ms_sm, msp->ms_tree, tx); - } else { + + /* + * Since we've cleared the histogram we need to add back + * any free space that has already been processed, plus + * any deferred space. This allows the on-disk histogram + * to accurately reflect all free space even if some space + * is not yet available for allocation (i.e. deferred). + */ + space_map_histogram_add(msp->ms_sm, *freed_tree, tx); + /* - * Since the space map is not loaded we simply update the - * exisiting histogram with what was freed in this txg. This - * means that the on-disk histogram may not have an accurate - * view of the free space but it's close enough to allow - * us to make allocation decisions. + * Add back any deferred free space that has not been + * added back into the in-core free tree yet. This will + * ensure that we don't end up with a space map histogram + * that is completely empty unless the metaslab is fully + * allocated. */ - space_map_histogram_add(msp->ms_sm, *freetree, tx); + for (int t = 0; t < TXG_DEFER_SIZE; t++) { + space_map_histogram_add(msp->ms_sm, + msp->ms_defertree[t], tx); + } } + + /* + * Always add the free space from this sync pass to the space + * map histogram. We want to make sure that the on-disk histogram + * accounts for all free space. If the space map is not loaded, + * then we will lose some accuracy but will correct it the next + * time we load the space map. + */ + space_map_histogram_add(msp->ms_sm, *freetree, tx); + metaslab_group_histogram_add(mg, msp); metaslab_group_histogram_verify(mg); metaslab_class_histogram_verify(mg->mg_class); @@ -2002,6 +2303,7 @@ metaslab_sync(metaslab_t *msp, uint64_t range_tree_vacate(alloctree, NULL, NULL); ASSERT0(range_tree_space(msp->ms_alloctree[txg & TXG_MASK])); + ASSERT0(range_tree_space(msp->ms_alloctree[TXG_CLEAN(txg) & TXG_MASK])); ASSERT0(range_tree_space(msp->ms_freetree[txg & TXG_MASK])); mutex_exit(&msp->ms_lock); @@ -2023,9 +2325,11 @@ metaslab_sync_done(metaslab_t *msp, uint { metaslab_group_t *mg = msp->ms_group; vdev_t *vd = mg->mg_vd; + spa_t *spa = vd->vdev_spa; range_tree_t **freed_tree; range_tree_t **defer_tree; int64_t alloc_delta, defer_delta; + boolean_t defer_allowed = B_TRUE; ASSERT(!vd->vdev_ishole); @@ -2060,9 +2364,20 @@ metaslab_sync_done(metaslab_t *msp, uint freed_tree = &msp->ms_freetree[TXG_CLEAN(txg) & TXG_MASK]; defer_tree = &msp->ms_defertree[txg % TXG_DEFER_SIZE]; + uint64_t free_space = metaslab_class_get_space(spa_normal_class(spa)) - + metaslab_class_get_alloc(spa_normal_class(spa)); + if (free_space <= spa_get_slop_space(spa)) { + defer_allowed = B_FALSE; + } + + defer_delta = 0; alloc_delta = space_map_alloc_delta(msp->ms_sm); - defer_delta = range_tree_space(*freed_tree) - - range_tree_space(*defer_tree); + if (defer_allowed) { + defer_delta = range_tree_space(*freed_tree) - + range_tree_space(*defer_tree); + } else { + defer_delta -= range_tree_space(*defer_tree); + } vdev_space_update(vd, alloc_delta + defer_delta, defer_delta, 0); @@ -2083,7 +2398,12 @@ metaslab_sync_done(metaslab_t *msp, uint */ range_tree_vacate(*defer_tree, msp->ms_loaded ? range_tree_add : NULL, msp->ms_tree); - range_tree_swap(freed_tree, defer_tree); + if (defer_allowed) { + range_tree_swap(freed_tree, defer_tree); + } else { + range_tree_vacate(*freed_tree, + msp->ms_loaded ? range_tree_add : NULL, msp->ms_tree); + } space_map_update(msp->ms_sm); @@ -2098,7 +2418,18 @@ metaslab_sync_done(metaslab_t *msp, uint vdev_dirty(vd, VDD_METASLAB, msp, txg + 1); } - if (msp->ms_loaded && msp->ms_access_txg < txg) { + /* + * Calculate the new weights before unloading any metaslabs. + * This will give us the most accurate weighting. + */ + metaslab_group_sort(mg, msp, metaslab_weight(msp)); + + /* + * If the metaslab is loaded and we've not tried to load or allocate + * from it in 'metaslab_unload_delay' txgs, then unload it. + */ + if (msp->ms_loaded && + msp->ms_selected_txg + metaslab_unload_delay < txg) { for (int t = 1; t < TXG_CONCURRENT_STATES; t++) { VERIFY0(range_tree_space( msp->ms_alloctree[(txg + t) & TXG_MASK])); @@ -2108,7 +2439,6 @@ metaslab_sync_done(metaslab_t *msp, uint metaslab_unload(msp); } - metaslab_group_sort(mg, msp, metaslab_weight(msp)); mutex_exit(&msp->ms_lock); } @@ -2143,6 +2473,113 @@ metaslab_distance(metaslab_t *msp, dva_t /* * ========================================================================== + * Metaslab allocation tracing facility + * ========================================================================== + */ +kstat_t *metaslab_trace_ksp; +kstat_named_t metaslab_trace_over_limit; + +void +metaslab_alloc_trace_init(void) +{ + ASSERT(metaslab_alloc_trace_cache == NULL); + metaslab_alloc_trace_cache = kmem_cache_create( + "metaslab_alloc_trace_cache", sizeof (metaslab_alloc_trace_t), + 0, NULL, NULL, NULL, NULL, NULL, 0); + metaslab_trace_ksp = kstat_create("zfs", 0, "metaslab_trace_stats", + "misc", KSTAT_TYPE_NAMED, 1, KSTAT_FLAG_VIRTUAL); + if (metaslab_trace_ksp != NULL) { + metaslab_trace_ksp->ks_data = &metaslab_trace_over_limit; + kstat_named_init(&metaslab_trace_over_limit, + "metaslab_trace_over_limit", KSTAT_DATA_UINT64); + kstat_install(metaslab_trace_ksp); + } +} + +void +metaslab_alloc_trace_fini(void) +{ + if (metaslab_trace_ksp != NULL) { + kstat_delete(metaslab_trace_ksp); + metaslab_trace_ksp = NULL; + } + kmem_cache_destroy(metaslab_alloc_trace_cache); + metaslab_alloc_trace_cache = NULL; +} + +/* + * Add an allocation trace element to the allocation tracing list. + */ +static void +metaslab_trace_add(zio_alloc_list_t *zal, metaslab_group_t *mg, + metaslab_t *msp, uint64_t psize, uint32_t dva_id, uint64_t offset) +{ + if (!metaslab_trace_enabled) + return; + + /* + * When the tracing list reaches its maximum we remove + * the second element in the list before adding a new one. + * By removing the second element we preserve the original + * entry as a clue to what allocations steps have already been + * performed. + */ + if (zal->zal_size == metaslab_trace_max_entries) { + metaslab_alloc_trace_t *mat_next; +#ifdef DEBUG + panic("too many entries in allocation list"); +#endif + atomic_inc_64(&metaslab_trace_over_limit.value.ui64); + zal->zal_size--; + mat_next = list_next(&zal->zal_list, list_head(&zal->zal_list)); + list_remove(&zal->zal_list, mat_next); + kmem_cache_free(metaslab_alloc_trace_cache, mat_next); + } + + metaslab_alloc_trace_t *mat = + kmem_cache_alloc(metaslab_alloc_trace_cache, KM_SLEEP); + list_link_init(&mat->mat_list_node); + mat->mat_mg = mg; + mat->mat_msp = msp; + mat->mat_size = psize; + mat->mat_dva_id = dva_id; + mat->mat_offset = offset; + mat->mat_weight = 0; + + if (msp != NULL) + mat->mat_weight = msp->ms_weight; + + /* + * The list is part of the zio so locking is not required. Only + * a single thread will perform allocations for a given zio. + */ + list_insert_tail(&zal->zal_list, mat); + zal->zal_size++; + + ASSERT3U(zal->zal_size, <=, metaslab_trace_max_entries); +} + +void +metaslab_trace_init(zio_alloc_list_t *zal) +{ + list_create(&zal->zal_list, sizeof (metaslab_alloc_trace_t), + offsetof(metaslab_alloc_trace_t, mat_list_node)); + zal->zal_size = 0; +} + +void +metaslab_trace_fini(zio_alloc_list_t *zal) +{ + metaslab_alloc_trace_t *mat; + + while ((mat = list_remove_head(&zal->zal_list)) != NULL) + kmem_cache_free(metaslab_alloc_trace_cache, mat); + list_destroy(&zal->zal_list); + zal->zal_size = 0; +} + +/* + * ========================================================================== * Metaslab block operations * ========================================================================== */ @@ -2191,13 +2628,48 @@ metaslab_group_alloc_verify(spa_t *spa, } static uint64_t -metaslab_group_alloc(metaslab_group_t *mg, uint64_t asize, - uint64_t txg, uint64_t min_distance, dva_t *dva, int d) +metaslab_block_alloc(metaslab_t *msp, uint64_t size, uint64_t txg) +{ + uint64_t start; + range_tree_t *rt = msp->ms_tree; + metaslab_class_t *mc = msp->ms_group->mg_class; + + VERIFY(!msp->ms_condensing); + + start = mc->mc_ops->msop_alloc(msp, size); + if (start != -1ULL) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Mar 16 21:26:27 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A1C6D0FCAB; Thu, 16 Mar 2017 21:26:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32717AAF; Thu, 16 Mar 2017 21:26:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GLQQaG051083; Thu, 16 Mar 2017 21:26:26 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GLQQGV051082; Thu, 16 Mar 2017 21:26:26 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703162126.v2GLQQGV051082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 16 Mar 2017 21:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r315425 - vendor/one-true-awk/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 21:26:27 -0000 Author: pfg Date: Thu Mar 16 21:26:26 2017 New Revision: 315425 URL: https://svnweb.freebsd.org/changeset/base/315425 Log: one-true-awk: have calloc(3) do the multiplication. Recently upstreamed. Modified: vendor/one-true-awk/dist/b.c Modified: vendor/one-true-awk/dist/b.c ============================================================================== --- vendor/one-true-awk/dist/b.c Thu Mar 16 21:05:21 2017 (r315424) +++ vendor/one-true-awk/dist/b.c Thu Mar 16 21:26:26 2017 (r315425) @@ -137,7 +137,7 @@ fa *mkdfa(const char *s, int anchor) /* f->accept = poscnt-1; /* penter has computed number of positions in re */ cfoll(f, p1); /* set up follow sets */ freetr(p1); - if ((f->posns[0] = (int *) calloc(1, *(f->re[0].lfollow)*sizeof(int))) == NULL) + if ((f->posns[0] = (int *) calloc(*(f->re[0].lfollow), sizeof(int))) == NULL) overflo("out of space in makedfa"); if ((f->posns[1] = (int *) calloc(1, sizeof(int))) == NULL) overflo("out of space in makedfa"); @@ -157,7 +157,7 @@ int makeinit(fa *f, int anchor) f->reset = 0; k = *(f->re[0].lfollow); xfree(f->posns[2]); - if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) + if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) overflo("out of space in makeinit"); for (i=0; i <= k; i++) { (f->posns[2])[i] = (f->re[0].lfollow)[i]; @@ -357,7 +357,7 @@ void cfoll(fa *f, Node *v) /* enter foll setvec[i] = 0; setcnt = 0; follow(v); /* computes setvec and setcnt */ - if ((p = (int *) calloc(1, (setcnt+1)*sizeof(int))) == NULL) + if ((p = (int *) calloc(setcnt+1, sizeof(int))) == NULL) overflo("out of space building follow set"); f->re[info(v)].lfollow = p; *p = setcnt; @@ -531,7 +531,7 @@ int pmatch(fa *f, const char *p0) /* lon for (i = 2; i <= f->curstat; i++) xfree(f->posns[i]); k = *f->posns[0]; - if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) + if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) overflo("out of space in pmatch"); for (i = 0; i <= k; i++) (f->posns[2])[i] = (f->posns[0])[i]; @@ -588,7 +588,7 @@ int nematch(fa *f, const char *p0) /* no for (i = 2; i <= f->curstat; i++) xfree(f->posns[i]); k = *f->posns[0]; - if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) + if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) overflo("out of state space"); for (i = 0; i <= k; i++) (f->posns[2])[i] = (f->posns[0])[i]; @@ -925,7 +925,7 @@ int cgoto(fa *f, int s, int c) for (i = 0; i < NCHARS; i++) f->gototab[f->curstat][i] = 0; xfree(f->posns[f->curstat]); - if ((p = (int *) calloc(1, (setcnt+1)*sizeof(int))) == NULL) + if ((p = (int *) calloc(setcnt+1, sizeof(int))) == NULL) overflo("out of space in cgoto"); f->posns[f->curstat] = p; From owner-svn-src-vendor@freebsd.org Sat Mar 18 21:41:56 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98678D088DC; Sat, 18 Mar 2017 21:41:56 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A9E316DB; Sat, 18 Mar 2017 21:41:55 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2ILft7j052189; Sat, 18 Mar 2017 21:41:55 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2ILfs0x052179; Sat, 18 Mar 2017 21:41:54 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703182141.v2ILfs0x052179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 21:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r315512 - in vendor/tcsh/dist: . config cygwin m4 nls nls/C nls/et nls/finnish nls/french nls/german nls/greek nls/italian nls/ja nls/pl nls/russian nls/spanish nls/ukrainian tests win32 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2017 21:41:56 -0000 Author: dchagin Date: Sat Mar 18 21:41:53 2017 New Revision: 315512 URL: https://svnweb.freebsd.org/changeset/base/315512 Log: Import of tcsh-6.20.00 Added: vendor/tcsh/dist/Makefile.man2html (contents, props changed) vendor/tcsh/dist/aclocal.m4 vendor/tcsh/dist/configure.ac vendor/tcsh/dist/dotlock.c (contents, props changed) vendor/tcsh/dist/dotlock.h (contents, props changed) vendor/tcsh/dist/m4/ vendor/tcsh/dist/tcsh.man.new vendor/tcsh/dist/tests/parenthesis.at Deleted: vendor/tcsh/dist/configure.in vendor/tcsh/dist/cygwin/postinstall.sh vendor/tcsh/dist/cygwin/preremove.sh vendor/tcsh/dist/win32/CODING vendor/tcsh/dist/win32/ChangeLog vendor/tcsh/dist/win32/Contributors vendor/tcsh/dist/win32/WindowsReadme.1st Modified: vendor/tcsh/dist/Copyright (contents, props changed) vendor/tcsh/dist/Fixes (contents, props changed) vendor/tcsh/dist/Imakefile (contents, props changed) vendor/tcsh/dist/Makefile.in (contents, props changed) vendor/tcsh/dist/Makefile.std (contents, props changed) vendor/tcsh/dist/Makefile.vms (contents, props changed) vendor/tcsh/dist/README (contents, props changed) vendor/tcsh/dist/complete.tcsh (contents, props changed) vendor/tcsh/dist/config.guess (contents, props changed) vendor/tcsh/dist/config.h.in (contents, props changed) vendor/tcsh/dist/config.sub (contents, props changed) vendor/tcsh/dist/config/android vendor/tcsh/dist/config/bsd4.4 (contents, props changed) vendor/tcsh/dist/config_f.h (contents, props changed) vendor/tcsh/dist/configure (contents, props changed) vendor/tcsh/dist/ed.chared.c (contents, props changed) vendor/tcsh/dist/ed.decls.h (contents, props changed) vendor/tcsh/dist/ed.defns.c (contents, props changed) vendor/tcsh/dist/ed.inputl.c (contents, props changed) vendor/tcsh/dist/ed.refresh.c (contents, props changed) vendor/tcsh/dist/ed.screen.c (contents, props changed) vendor/tcsh/dist/ed.term.h (contents, props changed) vendor/tcsh/dist/ed.xmap.c (contents, props changed) vendor/tcsh/dist/gethost.c (contents, props changed) vendor/tcsh/dist/glob.c (contents, props changed) vendor/tcsh/dist/host.defs (contents, props changed) vendor/tcsh/dist/nls/C/set1 (contents, props changed) vendor/tcsh/dist/nls/C/set20 (contents, props changed) vendor/tcsh/dist/nls/C/set9 (contents, props changed) vendor/tcsh/dist/nls/Makefile.in vendor/tcsh/dist/nls/catgen vendor/tcsh/dist/nls/et/set1 (contents, props changed) vendor/tcsh/dist/nls/et/set20 (contents, props changed) vendor/tcsh/dist/nls/et/set9 (contents, props changed) vendor/tcsh/dist/nls/finnish/set1 (contents, props changed) vendor/tcsh/dist/nls/finnish/set20 (contents, props changed) vendor/tcsh/dist/nls/finnish/set3 (contents, props changed) vendor/tcsh/dist/nls/finnish/set9 (contents, props changed) vendor/tcsh/dist/nls/french/set1 (contents, props changed) vendor/tcsh/dist/nls/french/set20 (contents, props changed) vendor/tcsh/dist/nls/french/set9 (contents, props changed) vendor/tcsh/dist/nls/german/set1 (contents, props changed) vendor/tcsh/dist/nls/german/set20 (contents, props changed) vendor/tcsh/dist/nls/german/set9 (contents, props changed) vendor/tcsh/dist/nls/greek/set1 (contents, props changed) vendor/tcsh/dist/nls/greek/set20 (contents, props changed) vendor/tcsh/dist/nls/greek/set9 (contents, props changed) vendor/tcsh/dist/nls/italian/set1 (contents, props changed) vendor/tcsh/dist/nls/italian/set20 (contents, props changed) vendor/tcsh/dist/nls/italian/set9 (contents, props changed) vendor/tcsh/dist/nls/ja/set1 (contents, props changed) vendor/tcsh/dist/nls/pl/set1 (contents, props changed) vendor/tcsh/dist/nls/pl/set20 (contents, props changed) vendor/tcsh/dist/nls/pl/set9 (contents, props changed) vendor/tcsh/dist/nls/russian/set1 (contents, props changed) vendor/tcsh/dist/nls/russian/set20 (contents, props changed) vendor/tcsh/dist/nls/russian/set9 (contents, props changed) vendor/tcsh/dist/nls/spanish/set1 (contents, props changed) vendor/tcsh/dist/nls/spanish/set20 (contents, props changed) vendor/tcsh/dist/nls/spanish/set9 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set1 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set20 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set9 (contents, props changed) vendor/tcsh/dist/patchlevel.h (contents, props changed) vendor/tcsh/dist/sh.c (contents, props changed) vendor/tcsh/dist/sh.char.h (contents, props changed) vendor/tcsh/dist/sh.decls.h (contents, props changed) vendor/tcsh/dist/sh.dir.c (contents, props changed) vendor/tcsh/dist/sh.dol.c (contents, props changed) vendor/tcsh/dist/sh.err.c (contents, props changed) vendor/tcsh/dist/sh.exec.c (contents, props changed) vendor/tcsh/dist/sh.exp.c (contents, props changed) vendor/tcsh/dist/sh.file.c (contents, props changed) vendor/tcsh/dist/sh.func.c (contents, props changed) vendor/tcsh/dist/sh.glob.c (contents, props changed) vendor/tcsh/dist/sh.h (contents, props changed) vendor/tcsh/dist/sh.hist.c (contents, props changed) vendor/tcsh/dist/sh.init.c (contents, props changed) vendor/tcsh/dist/sh.lex.c (contents, props changed) vendor/tcsh/dist/sh.misc.c (contents, props changed) vendor/tcsh/dist/sh.print.c (contents, props changed) vendor/tcsh/dist/sh.proc.c (contents, props changed) vendor/tcsh/dist/sh.proc.h (contents, props changed) vendor/tcsh/dist/sh.sem.c (contents, props changed) vendor/tcsh/dist/sh.set.c (contents, props changed) vendor/tcsh/dist/sh.time.c (contents, props changed) vendor/tcsh/dist/tc.alloc.c (contents, props changed) vendor/tcsh/dist/tc.bind.c (contents, props changed) vendor/tcsh/dist/tc.const.c (contents, props changed) vendor/tcsh/dist/tc.decls.h (contents, props changed) vendor/tcsh/dist/tc.func.c (contents, props changed) vendor/tcsh/dist/tc.nls.c (contents, props changed) vendor/tcsh/dist/tc.nls.h (contents, props changed) vendor/tcsh/dist/tc.os.c (contents, props changed) vendor/tcsh/dist/tc.printf.c (contents, props changed) vendor/tcsh/dist/tc.prompt.c (contents, props changed) vendor/tcsh/dist/tc.str.c (contents, props changed) vendor/tcsh/dist/tc.who.c (contents, props changed) vendor/tcsh/dist/tcsh.man (contents, props changed) vendor/tcsh/dist/tests/commands.at vendor/tcsh/dist/tests/lexical.at vendor/tcsh/dist/tests/syntax.at vendor/tcsh/dist/tests/testsuite.at vendor/tcsh/dist/tests/variables.at vendor/tcsh/dist/tw.color.c (contents, props changed) vendor/tcsh/dist/tw.comp.c (contents, props changed) vendor/tcsh/dist/tw.decls.h (contents, props changed) vendor/tcsh/dist/tw.parse.c (contents, props changed) vendor/tcsh/dist/win32/Makefile.win32 vendor/tcsh/dist/win32/README.NT vendor/tcsh/dist/win32/clip.c vendor/tcsh/dist/win32/dirent.c vendor/tcsh/dist/win32/fork.c vendor/tcsh/dist/win32/globals.c vendor/tcsh/dist/win32/ntfunc.c vendor/tcsh/dist/win32/ntport.h vendor/tcsh/dist/win32/signal.c vendor/tcsh/dist/win32/stdio.c vendor/tcsh/dist/win32/support.c Directory Properties: vendor/tcsh/dist/FAQ (props changed) vendor/tcsh/dist/MAKEDIFFS (props changed) vendor/tcsh/dist/MAKESHAR (props changed) vendor/tcsh/dist/NewThings (props changed) vendor/tcsh/dist/Ported (props changed) vendor/tcsh/dist/README.imake (props changed) vendor/tcsh/dist/WishList (props changed) vendor/tcsh/dist/Y2K (props changed) vendor/tcsh/dist/csh-mode.el (props changed) vendor/tcsh/dist/ed.h (props changed) vendor/tcsh/dist/ed.init.c (props changed) vendor/tcsh/dist/ed.term.c (props changed) vendor/tcsh/dist/eight-bit.me (props changed) vendor/tcsh/dist/glob.3 (props changed) vendor/tcsh/dist/glob.h (props changed) vendor/tcsh/dist/imake.config (props changed) vendor/tcsh/dist/install-sh (props changed) vendor/tcsh/dist/ma.setp.c (props changed) vendor/tcsh/dist/mi.termios.c (props changed) vendor/tcsh/dist/mi.varargs.h (props changed) vendor/tcsh/dist/mi.wait.h (props changed) vendor/tcsh/dist/nls/C/charset (props changed) vendor/tcsh/dist/nls/C/set10 (props changed) vendor/tcsh/dist/nls/C/set11 (props changed) vendor/tcsh/dist/nls/C/set12 (props changed) vendor/tcsh/dist/nls/C/set13 (props changed) vendor/tcsh/dist/nls/C/set14 (props changed) vendor/tcsh/dist/nls/C/set15 (props changed) vendor/tcsh/dist/nls/C/set16 (props changed) vendor/tcsh/dist/nls/C/set17 (props changed) vendor/tcsh/dist/nls/C/set18 (props changed) vendor/tcsh/dist/nls/C/set19 (props changed) vendor/tcsh/dist/nls/C/set2 (props changed) vendor/tcsh/dist/nls/C/set21 (props changed) vendor/tcsh/dist/nls/C/set22 (props changed) vendor/tcsh/dist/nls/C/set23 (props changed) vendor/tcsh/dist/nls/C/set24 (props changed) vendor/tcsh/dist/nls/C/set25 (props changed) vendor/tcsh/dist/nls/C/set26 (props changed) vendor/tcsh/dist/nls/C/set27 (props changed) vendor/tcsh/dist/nls/C/set29 (props changed) vendor/tcsh/dist/nls/C/set3 (props changed) vendor/tcsh/dist/nls/C/set30 (props changed) vendor/tcsh/dist/nls/C/set31 (props changed) vendor/tcsh/dist/nls/C/set4 (props changed) vendor/tcsh/dist/nls/C/set5 (props changed) vendor/tcsh/dist/nls/C/set6 (props changed) vendor/tcsh/dist/nls/C/set7 (props changed) vendor/tcsh/dist/nls/C/set8 (props changed) vendor/tcsh/dist/nls/et/charset (props changed) vendor/tcsh/dist/nls/et/set10 (props changed) vendor/tcsh/dist/nls/et/set11 (props changed) vendor/tcsh/dist/nls/et/set12 (props changed) vendor/tcsh/dist/nls/et/set13 (props changed) vendor/tcsh/dist/nls/et/set14 (props changed) vendor/tcsh/dist/nls/et/set15 (props changed) vendor/tcsh/dist/nls/et/set16 (props changed) vendor/tcsh/dist/nls/et/set17 (props changed) vendor/tcsh/dist/nls/et/set18 (props changed) vendor/tcsh/dist/nls/et/set19 (props changed) vendor/tcsh/dist/nls/et/set2 (props changed) vendor/tcsh/dist/nls/et/set21 (props changed) vendor/tcsh/dist/nls/et/set22 (props changed) vendor/tcsh/dist/nls/et/set23 (props changed) vendor/tcsh/dist/nls/et/set24 (props changed) vendor/tcsh/dist/nls/et/set25 (props changed) vendor/tcsh/dist/nls/et/set26 (props changed) vendor/tcsh/dist/nls/et/set27 (props changed) vendor/tcsh/dist/nls/et/set29 (props changed) vendor/tcsh/dist/nls/et/set3 (props changed) vendor/tcsh/dist/nls/et/set30 (props changed) vendor/tcsh/dist/nls/et/set31 (props changed) vendor/tcsh/dist/nls/et/set4 (props changed) vendor/tcsh/dist/nls/et/set5 (props changed) vendor/tcsh/dist/nls/et/set6 (props changed) vendor/tcsh/dist/nls/et/set7 (props changed) vendor/tcsh/dist/nls/et/set8 (props changed) vendor/tcsh/dist/nls/finnish/charset (props changed) vendor/tcsh/dist/nls/finnish/set10 (props changed) vendor/tcsh/dist/nls/finnish/set11 (props changed) vendor/tcsh/dist/nls/finnish/set12 (props changed) vendor/tcsh/dist/nls/finnish/set13 (props changed) vendor/tcsh/dist/nls/finnish/set14 (props changed) vendor/tcsh/dist/nls/finnish/set15 (props changed) vendor/tcsh/dist/nls/finnish/set16 (props changed) vendor/tcsh/dist/nls/finnish/set17 (props changed) vendor/tcsh/dist/nls/finnish/set18 (props changed) vendor/tcsh/dist/nls/finnish/set19 (props changed) vendor/tcsh/dist/nls/finnish/set2 (props changed) vendor/tcsh/dist/nls/finnish/set21 (props changed) vendor/tcsh/dist/nls/finnish/set22 (props changed) vendor/tcsh/dist/nls/finnish/set23 (props changed) vendor/tcsh/dist/nls/finnish/set24 (props changed) vendor/tcsh/dist/nls/finnish/set25 (props changed) vendor/tcsh/dist/nls/finnish/set26 (props changed) vendor/tcsh/dist/nls/finnish/set27 (props changed) vendor/tcsh/dist/nls/finnish/set29 (props changed) vendor/tcsh/dist/nls/finnish/set30 (props changed) vendor/tcsh/dist/nls/finnish/set31 (props changed) vendor/tcsh/dist/nls/finnish/set4 (props changed) vendor/tcsh/dist/nls/finnish/set5 (props changed) vendor/tcsh/dist/nls/finnish/set6 (props changed) vendor/tcsh/dist/nls/finnish/set7 (props changed) vendor/tcsh/dist/nls/finnish/set8 (props changed) vendor/tcsh/dist/nls/french/charset (props changed) vendor/tcsh/dist/nls/french/set10 (props changed) vendor/tcsh/dist/nls/french/set11 (props changed) vendor/tcsh/dist/nls/french/set12 (props changed) vendor/tcsh/dist/nls/french/set13 (props changed) vendor/tcsh/dist/nls/french/set14 (props changed) vendor/tcsh/dist/nls/french/set15 (props changed) vendor/tcsh/dist/nls/french/set16 (props changed) vendor/tcsh/dist/nls/french/set17 (props changed) vendor/tcsh/dist/nls/french/set18 (props changed) vendor/tcsh/dist/nls/french/set19 (props changed) vendor/tcsh/dist/nls/french/set2 (props changed) vendor/tcsh/dist/nls/french/set21 (props changed) vendor/tcsh/dist/nls/french/set22 (props changed) vendor/tcsh/dist/nls/french/set23 (props changed) vendor/tcsh/dist/nls/french/set24 (props changed) vendor/tcsh/dist/nls/french/set25 (props changed) vendor/tcsh/dist/nls/french/set26 (props changed) vendor/tcsh/dist/nls/french/set27 (props changed) vendor/tcsh/dist/nls/french/set29 (props changed) vendor/tcsh/dist/nls/french/set3 (props changed) vendor/tcsh/dist/nls/french/set30 (props changed) vendor/tcsh/dist/nls/french/set31 (props changed) vendor/tcsh/dist/nls/french/set4 (props changed) vendor/tcsh/dist/nls/french/set5 (props changed) vendor/tcsh/dist/nls/french/set6 (props changed) vendor/tcsh/dist/nls/french/set7 (props changed) vendor/tcsh/dist/nls/french/set8 (props changed) vendor/tcsh/dist/nls/german/charset (props changed) vendor/tcsh/dist/nls/german/set10 (props changed) vendor/tcsh/dist/nls/german/set11 (props changed) vendor/tcsh/dist/nls/german/set12 (props changed) vendor/tcsh/dist/nls/german/set13 (props changed) vendor/tcsh/dist/nls/german/set14 (props changed) vendor/tcsh/dist/nls/german/set15 (props changed) vendor/tcsh/dist/nls/german/set16 (props changed) vendor/tcsh/dist/nls/german/set17 (props changed) vendor/tcsh/dist/nls/german/set18 (props changed) vendor/tcsh/dist/nls/german/set19 (props changed) vendor/tcsh/dist/nls/german/set2 (props changed) vendor/tcsh/dist/nls/german/set21 (props changed) vendor/tcsh/dist/nls/german/set22 (props changed) vendor/tcsh/dist/nls/german/set23 (props changed) vendor/tcsh/dist/nls/german/set24 (props changed) vendor/tcsh/dist/nls/german/set25 (props changed) vendor/tcsh/dist/nls/german/set26 (props changed) vendor/tcsh/dist/nls/german/set27 (props changed) vendor/tcsh/dist/nls/german/set29 (props changed) vendor/tcsh/dist/nls/german/set3 (props changed) vendor/tcsh/dist/nls/german/set30 (props changed) vendor/tcsh/dist/nls/german/set31 (props changed) vendor/tcsh/dist/nls/german/set4 (props changed) vendor/tcsh/dist/nls/german/set5 (props changed) vendor/tcsh/dist/nls/german/set6 (props changed) vendor/tcsh/dist/nls/german/set7 (props changed) vendor/tcsh/dist/nls/german/set8 (props changed) vendor/tcsh/dist/nls/greek/charset (props changed) vendor/tcsh/dist/nls/greek/set10 (props changed) vendor/tcsh/dist/nls/greek/set11 (props changed) vendor/tcsh/dist/nls/greek/set12 (props changed) vendor/tcsh/dist/nls/greek/set13 (props changed) vendor/tcsh/dist/nls/greek/set14 (props changed) vendor/tcsh/dist/nls/greek/set15 (props changed) vendor/tcsh/dist/nls/greek/set16 (props changed) vendor/tcsh/dist/nls/greek/set17 (props changed) vendor/tcsh/dist/nls/greek/set18 (props changed) vendor/tcsh/dist/nls/greek/set19 (props changed) vendor/tcsh/dist/nls/greek/set2 (props changed) vendor/tcsh/dist/nls/greek/set21 (props changed) vendor/tcsh/dist/nls/greek/set22 (props changed) vendor/tcsh/dist/nls/greek/set23 (props changed) vendor/tcsh/dist/nls/greek/set24 (props changed) vendor/tcsh/dist/nls/greek/set25 (props changed) vendor/tcsh/dist/nls/greek/set26 (props changed) vendor/tcsh/dist/nls/greek/set27 (props changed) vendor/tcsh/dist/nls/greek/set29 (props changed) vendor/tcsh/dist/nls/greek/set3 (props changed) vendor/tcsh/dist/nls/greek/set30 (props changed) vendor/tcsh/dist/nls/greek/set31 (props changed) vendor/tcsh/dist/nls/greek/set4 (props changed) vendor/tcsh/dist/nls/greek/set5 (props changed) vendor/tcsh/dist/nls/greek/set6 (props changed) vendor/tcsh/dist/nls/greek/set7 (props changed) vendor/tcsh/dist/nls/greek/set8 (props changed) vendor/tcsh/dist/nls/italian/charset (props changed) vendor/tcsh/dist/nls/italian/set10 (props changed) vendor/tcsh/dist/nls/italian/set11 (props changed) vendor/tcsh/dist/nls/italian/set12 (props changed) vendor/tcsh/dist/nls/italian/set13 (props changed) vendor/tcsh/dist/nls/italian/set14 (props changed) vendor/tcsh/dist/nls/italian/set15 (props changed) vendor/tcsh/dist/nls/italian/set16 (props changed) vendor/tcsh/dist/nls/italian/set17 (props changed) vendor/tcsh/dist/nls/italian/set18 (props changed) vendor/tcsh/dist/nls/italian/set19 (props changed) vendor/tcsh/dist/nls/italian/set2 (props changed) vendor/tcsh/dist/nls/italian/set21 (props changed) vendor/tcsh/dist/nls/italian/set22 (props changed) vendor/tcsh/dist/nls/italian/set23 (props changed) vendor/tcsh/dist/nls/italian/set24 (props changed) vendor/tcsh/dist/nls/italian/set25 (props changed) vendor/tcsh/dist/nls/italian/set26 (props changed) vendor/tcsh/dist/nls/italian/set27 (props changed) vendor/tcsh/dist/nls/italian/set29 (props changed) vendor/tcsh/dist/nls/italian/set3 (props changed) vendor/tcsh/dist/nls/italian/set30 (props changed) vendor/tcsh/dist/nls/italian/set31 (props changed) vendor/tcsh/dist/nls/italian/set4 (props changed) vendor/tcsh/dist/nls/italian/set5 (props changed) vendor/tcsh/dist/nls/italian/set6 (props changed) vendor/tcsh/dist/nls/italian/set7 (props changed) vendor/tcsh/dist/nls/italian/set8 (props changed) vendor/tcsh/dist/nls/ja/charset (props changed) vendor/tcsh/dist/nls/ja/set10 (props changed) vendor/tcsh/dist/nls/ja/set11 (props changed) vendor/tcsh/dist/nls/ja/set12 (props changed) vendor/tcsh/dist/nls/ja/set13 (props changed) vendor/tcsh/dist/nls/ja/set15 (props changed) vendor/tcsh/dist/nls/ja/set16 (props changed) vendor/tcsh/dist/nls/ja/set17 (props changed) vendor/tcsh/dist/nls/ja/set18 (props changed) vendor/tcsh/dist/nls/ja/set2 (props changed) vendor/tcsh/dist/nls/ja/set21 (props changed) vendor/tcsh/dist/nls/ja/set24 (props changed) vendor/tcsh/dist/nls/ja/set29 (props changed) vendor/tcsh/dist/nls/ja/set3 (props changed) vendor/tcsh/dist/nls/ja/set30 (props changed) vendor/tcsh/dist/nls/ja/set4 (props changed) vendor/tcsh/dist/nls/ja/set5 (props changed) vendor/tcsh/dist/nls/ja/set6 (props changed) vendor/tcsh/dist/nls/ja/set7 (props changed) vendor/tcsh/dist/nls/ja/set8 (props changed) vendor/tcsh/dist/nls/pl/README (props changed) vendor/tcsh/dist/nls/pl/charset (props changed) vendor/tcsh/dist/nls/pl/set10 (props changed) vendor/tcsh/dist/nls/pl/set11 (props changed) vendor/tcsh/dist/nls/pl/set12 (props changed) vendor/tcsh/dist/nls/pl/set13 (props changed) vendor/tcsh/dist/nls/pl/set14 (props changed) vendor/tcsh/dist/nls/pl/set15 (props changed) vendor/tcsh/dist/nls/pl/set16 (props changed) vendor/tcsh/dist/nls/pl/set17 (props changed) vendor/tcsh/dist/nls/pl/set18 (props changed) vendor/tcsh/dist/nls/pl/set19 (props changed) vendor/tcsh/dist/nls/pl/set2 (props changed) vendor/tcsh/dist/nls/pl/set21 (props changed) vendor/tcsh/dist/nls/pl/set22 (props changed) vendor/tcsh/dist/nls/pl/set23 (props changed) vendor/tcsh/dist/nls/pl/set24 (props changed) vendor/tcsh/dist/nls/pl/set25 (props changed) vendor/tcsh/dist/nls/pl/set26 (props changed) vendor/tcsh/dist/nls/pl/set27 (props changed) vendor/tcsh/dist/nls/pl/set29 (props changed) vendor/tcsh/dist/nls/pl/set3 (props changed) vendor/tcsh/dist/nls/pl/set30 (props changed) vendor/tcsh/dist/nls/pl/set31 (props changed) vendor/tcsh/dist/nls/pl/set4 (props changed) vendor/tcsh/dist/nls/pl/set5 (props changed) vendor/tcsh/dist/nls/pl/set6 (props changed) vendor/tcsh/dist/nls/pl/set7 (props changed) vendor/tcsh/dist/nls/pl/set8 (props changed) vendor/tcsh/dist/nls/russian/charset (props changed) vendor/tcsh/dist/nls/russian/set10 (props changed) vendor/tcsh/dist/nls/russian/set11 (props changed) vendor/tcsh/dist/nls/russian/set12 (props changed) vendor/tcsh/dist/nls/russian/set13 (props changed) vendor/tcsh/dist/nls/russian/set14 (props changed) vendor/tcsh/dist/nls/russian/set15 (props changed) vendor/tcsh/dist/nls/russian/set16 (props changed) vendor/tcsh/dist/nls/russian/set17 (props changed) vendor/tcsh/dist/nls/russian/set18 (props changed) vendor/tcsh/dist/nls/russian/set19 (props changed) vendor/tcsh/dist/nls/russian/set2 (props changed) vendor/tcsh/dist/nls/russian/set21 (props changed) vendor/tcsh/dist/nls/russian/set22 (props changed) vendor/tcsh/dist/nls/russian/set23 (props changed) vendor/tcsh/dist/nls/russian/set24 (props changed) vendor/tcsh/dist/nls/russian/set25 (props changed) vendor/tcsh/dist/nls/russian/set26 (props changed) vendor/tcsh/dist/nls/russian/set27 (props changed) vendor/tcsh/dist/nls/russian/set29 (props changed) vendor/tcsh/dist/nls/russian/set3 (props changed) vendor/tcsh/dist/nls/russian/set30 (props changed) vendor/tcsh/dist/nls/russian/set31 (props changed) vendor/tcsh/dist/nls/russian/set4 (props changed) vendor/tcsh/dist/nls/russian/set5 (props changed) vendor/tcsh/dist/nls/russian/set6 (props changed) vendor/tcsh/dist/nls/russian/set7 (props changed) vendor/tcsh/dist/nls/russian/set8 (props changed) vendor/tcsh/dist/nls/spanish/charset (props changed) vendor/tcsh/dist/nls/spanish/set10 (props changed) vendor/tcsh/dist/nls/spanish/set11 (props changed) vendor/tcsh/dist/nls/spanish/set12 (props changed) vendor/tcsh/dist/nls/spanish/set13 (props changed) vendor/tcsh/dist/nls/spanish/set14 (props changed) vendor/tcsh/dist/nls/spanish/set15 (props changed) vendor/tcsh/dist/nls/spanish/set16 (props changed) vendor/tcsh/dist/nls/spanish/set17 (props changed) vendor/tcsh/dist/nls/spanish/set18 (props changed) vendor/tcsh/dist/nls/spanish/set19 (props changed) vendor/tcsh/dist/nls/spanish/set2 (props changed) vendor/tcsh/dist/nls/spanish/set21 (props changed) vendor/tcsh/dist/nls/spanish/set22 (props changed) vendor/tcsh/dist/nls/spanish/set23 (props changed) vendor/tcsh/dist/nls/spanish/set24 (props changed) vendor/tcsh/dist/nls/spanish/set25 (props changed) vendor/tcsh/dist/nls/spanish/set26 (props changed) vendor/tcsh/dist/nls/spanish/set27 (props changed) vendor/tcsh/dist/nls/spanish/set29 (props changed) vendor/tcsh/dist/nls/spanish/set3 (props changed) vendor/tcsh/dist/nls/spanish/set30 (props changed) vendor/tcsh/dist/nls/spanish/set31 (props changed) vendor/tcsh/dist/nls/spanish/set4 (props changed) vendor/tcsh/dist/nls/spanish/set5 (props changed) vendor/tcsh/dist/nls/spanish/set6 (props changed) vendor/tcsh/dist/nls/spanish/set7 (props changed) vendor/tcsh/dist/nls/spanish/set8 (props changed) vendor/tcsh/dist/nls/ukrainian/charset (props changed) vendor/tcsh/dist/nls/ukrainian/set10 (props changed) vendor/tcsh/dist/nls/ukrainian/set11 (props changed) vendor/tcsh/dist/nls/ukrainian/set12 (props changed) vendor/tcsh/dist/nls/ukrainian/set13 (props changed) vendor/tcsh/dist/nls/ukrainian/set14 (props changed) vendor/tcsh/dist/nls/ukrainian/set15 (props changed) vendor/tcsh/dist/nls/ukrainian/set16 (props changed) vendor/tcsh/dist/nls/ukrainian/set17 (props changed) vendor/tcsh/dist/nls/ukrainian/set18 (props changed) vendor/tcsh/dist/nls/ukrainian/set19 (props changed) vendor/tcsh/dist/nls/ukrainian/set2 (props changed) vendor/tcsh/dist/nls/ukrainian/set21 (props changed) vendor/tcsh/dist/nls/ukrainian/set22 (props changed) vendor/tcsh/dist/nls/ukrainian/set23 (props changed) vendor/tcsh/dist/nls/ukrainian/set24 (props changed) vendor/tcsh/dist/nls/ukrainian/set25 (props changed) vendor/tcsh/dist/nls/ukrainian/set26 (props changed) vendor/tcsh/dist/nls/ukrainian/set27 (props changed) vendor/tcsh/dist/nls/ukrainian/set29 (props changed) vendor/tcsh/dist/nls/ukrainian/set3 (props changed) vendor/tcsh/dist/nls/ukrainian/set30 (props changed) vendor/tcsh/dist/nls/ukrainian/set31 (props changed) vendor/tcsh/dist/nls/ukrainian/set4 (props changed) vendor/tcsh/dist/nls/ukrainian/set5 (props changed) vendor/tcsh/dist/nls/ukrainian/set6 (props changed) vendor/tcsh/dist/nls/ukrainian/set7 (props changed) vendor/tcsh/dist/nls/ukrainian/set8 (props changed) vendor/tcsh/dist/pathnames.h (props changed) vendor/tcsh/dist/sh.char.c (props changed) vendor/tcsh/dist/sh.dir.h (props changed) vendor/tcsh/dist/sh.parse.c (props changed) vendor/tcsh/dist/sh.types.h (props changed) vendor/tcsh/dist/snames.h (props changed) vendor/tcsh/dist/src.desc (props changed) vendor/tcsh/dist/tc.disc.c (props changed) vendor/tcsh/dist/tc.h (props changed) vendor/tcsh/dist/tc.os.h (props changed) vendor/tcsh/dist/tc.sched.c (props changed) vendor/tcsh/dist/tc.sig.c (props changed) vendor/tcsh/dist/tc.sig.h (props changed) vendor/tcsh/dist/tc.vers.c (props changed) vendor/tcsh/dist/tc.wait.h (props changed) vendor/tcsh/dist/tcsh.man2html (props changed) vendor/tcsh/dist/termcap.vms (props changed) vendor/tcsh/dist/tw.h (props changed) vendor/tcsh/dist/tw.help.c (props changed) vendor/tcsh/dist/tw.init.c (props changed) vendor/tcsh/dist/tw.spell.c (props changed) vendor/tcsh/dist/vms.termcap.c (props changed) Modified: vendor/tcsh/dist/Copyright ============================================================================== --- vendor/tcsh/dist/Copyright Sat Mar 18 20:41:07 2017 (r315511) +++ vendor/tcsh/dist/Copyright Sat Mar 18 21:41:53 2017 (r315512) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: vendor/tcsh/dist/Fixes ============================================================================== --- vendor/tcsh/dist/Fixes Sat Mar 18 20:41:07 2017 (r315511) +++ vendor/tcsh/dist/Fixes Sat Mar 18 21:41:53 2017 (r315512) @@ -1,3 +1,95 @@ + 20. V6.20.00 - 20161124 + 19. Don't resize the screen if it did not change size. + 18. V6.19.01 - 20161025 + 17. restore file description when cleaning up after eval: + repeat 99 time + 16. PR/572: Fix $SHLVL issue when exec'ing subshells. + 15. PR/403: Fix backquote expansion for multi-byte character sets. + 14. Fix drawing issu with multi-line prompt (Kensuke Iwahashi/David Kaspar) + 13. always send prusage to stdout. + 12. PR/526: Fix double \\ printing from previous fix in history expansion. + 11. Android updates from Corinna Vinschen + 10. PR/526: Quote backslashes properly so they can be preserved in `` + expansions + 9. Fix memory leak for paraml + 8. Add notempty and ask values for the noclobber setting (Martin Tournoij) + 7. more correct $wordchars for vimode (Luke Mewburn) + 6. expose VImode in $vimode (Luke Mewburn) + 5. display what the compiled in editor is in bindkey -d (Luke Mewburn) + 4. run-fg-editor improvements and documentation (Luke Mewburn) + 3. Fix parsing of 'if (cond)then' (Fridolin Pokorny) + 2. PR/437: Fix handling of invalid unicode characters. + 1. PR/451: Fix error messages containing %c to be always '%c' + + 41. V6.19.00 - 20150521 + 40. V6.18.05 - 20150510 + 39. fix reseting when interrupted inside an eval "eval sleep 10^C" + (paulo.cesar.pereira.de.andrade) + 38. rename handle_intr -> handle_interrupt as originally intended. + 37. fix input tests that need stdin on a tty + 36. V6.18.04 - 20150504 + 35. revert fix echo "\1", it is incorrect. + 34. revert fix to PR/437, breaks short strings. + 33. V6.18.03 - 20150503 + 32. PR/437: Nakajima Akira: Fix segmentation fault reading input files + 31. PR/291: Print job status messages to stderr. + 30. Fridolin Pokorny NUL in `` does not mean EOF. + 29. Pavel Raiskup fix hang with: + while (1) + ( date & ; wait ) + end + 28. Add cdtohome special variable (Martin Tournoij) + 27. Fix root prompt char for windows (Corinna Vinschen) + 26. For "next" completion matches only consider exact matches of the previous + word (Jamie Landeg-Jones) + 25. Fix echo "\1" for echo_style=both where the first character was + not processed properly (Gary Duzan) + 24. V6.18.02 - 20140618 + 23. fix ls-F /non printing exit value twice. + 22. rename configure.in to configure.ac, add aclocal.m4 to CVS + 21. set foo="aabaabaa"; echo $foo:as/a// should produce bb + 20. Add locked merge history support (Marcin Konarski) + 19. Support more resource limits from various BSD's + 18. Cache history count to speed up thing + 17. PR/240: minix support + 16. revert fix for 15. Causes extra quoting, for example (foo is a program + that prints its arguments): + $ ./foo 'abc' * + '\a\b\c' + 15. fix globbing for ``, stripping backslashes. Example: + cat << _EOF > huh + echo 'hello\;world' + _EOF + echo `./huh 0` + echo `./huh $?` + 14. fix for `` that causes hang. Example: + cat << _EOF > huh + #!/bin/sh + echo "[$@]" + echo "I am running" + echo "I am running ($$)" >> huh.out + _EOF + cat << _EOF > huh.tcsh + #!/bin/tcsh -f + + ./huh \ + `#comment blah blah blah` \ + parameter a \ + `#comment blah blah blah` \ + parameter b \ + `#comment blah blah blah` \ + parameter c + echo ok + _EOF + 13. remove AsciiOnly fix now that the real issue has been fixed (Roman Kollar) + 12. define utmp file for aix (Laurence Darby) + 11. fix if history in loops + 10. make ls-F print to stderr and set the exit code + 9. make rmstar interruptible on linux + 8. Get rid of pret_t and make the printf functions return the number of + characters printed as the system ones do. + 7. Parse a FreeBSD compat $LSCOLORS. What to do when both LSCOLORS and + LS_COLORS are set. I am not documenting this until we decide. 6. V6.18.01 - 20120214 5. fix interruptible wait again 4. ignore bogus compiler overflow message Modified: vendor/tcsh/dist/Imakefile ============================================================================== --- vendor/tcsh/dist/Imakefile Sat Mar 18 20:41:07 2017 (r315511) +++ vendor/tcsh/dist/Imakefile Sat Mar 18 21:41:53 2017 (r315512) @@ -1,5 +1,5 @@ XCOMM -XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $ +XCOMM $tcsh: Imakefile,v 1.88 2014/07/07 20:34:58 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -526,8 +526,8 @@ MISCF = Makefile.std Fixes MAKEDIFFS MAK WishList config_f.h eight-bit.me glob.3 patchlevel.h \ pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ README.imake complete.tcsh vmsreadme.txt Makefile.vms termcap.vms \ - snames.h host.defs gethost.c tcsh.man2html Makefile.in configure.in \ - Makefile.win32 + snames.h host.defs gethost.c tcsh.man2html Makefile.in configure.ac \ + Makefile.win32 aclocal.m4 CONFSRCS=config/[a-z]* Modified: vendor/tcsh/dist/Makefile.in ============================================================================== --- vendor/tcsh/dist/Makefile.in Sat Mar 18 20:41:07 2017 (r315511) +++ vendor/tcsh/dist/Makefile.in Sat Mar 18 21:41:53 2017 (r315512) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $ +# $tcsh: Makefile.in,v 3.59 2015/08/24 20:09:04 kim Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -315,8 +315,8 @@ CPP = @CPP@ # on the suns does not know how to make dynamically linked binaries. # This is set by autoconf. CC = @CC@ -#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -# -ansi -pedantic +#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -Wcast-qual -Wwrite-strings -Wold-style-definition -Wuninitialized -Wpointer-sign +# -Wconversion -Wformat=2 -ansi -pedantic #CC= gcc -Wall -pipe -B/bin/ # Generate code for Intel 486 (linux) #CC= gcc -m486 -pipe -Wall @@ -377,14 +377,14 @@ ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h \ tw.color.c -PSSRCS= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ +PSSRCS= sh.decls.h glob.c glob.h dotlock.c dotlock.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ vms.termcap.c SHSRCS= ${ASSRCS} ${PSSRCS} SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \ sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \ sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \ sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \ - sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} \ + sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} dotlock.${SUF} \ mi.termios.${SUF} ma.setp.${SUF} vms.termcap.${SUF} TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ @@ -411,12 +411,12 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin WishList config_f.h eight-bit.me glob.3 patchlevel.h \ pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ - host.defs gethost.c tcsh.man2html configure.in configure config.h.in \ - tests/testsuite.at + host.defs gethost.c tcsh.man2html configure.ac configure config.h.in \ + tests/testsuite.at aclocal.m4 TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \ tests/expr.at tests/lexical.at tests/mb-eucjp.at \ - tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \ - tests/variables.at tests/sh.dol.at + tests/mb-utf8.at tests/noexec.at tests/parenthesis.at tests/syntax.at \ + tests/subst.at tests/variables.at tests/sh.dol.at VHSRCS=${PVSRCS} ${AVSRCS} @@ -533,11 +533,11 @@ tc.const.h: tc.const.c sh.char.h config. ${CPP} $(CPPFLAGS) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\ $(srcdir)/tc.const.c | \ sed -n -e 's/^\(Char STR[a-zA-Z0-9_]*\) *\[ *\].*/extern \1[];/p' | \ - sort >> $@.tmp + LC_COLLATE=C sort >> $@.tmp @echo '#endif /* _h_tc_const */' >> $@.tmp @if [ -f $@ ] && cmp -s $@.tmp $@; then echo $@ unchanged.; rm -f $@.tmp; else mv -f $@.tmp $@; echo $@ recreated.; fi -$(srcdir)/tests/package.m4: $(srcdir)/configure.in +$(srcdir)/tests/package.m4: $(srcdir)/configure.ac { \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ @@ -594,12 +594,12 @@ vgrind: @vgrind -t -x -h Index index >/crp/bill/csh/index.t install-strip: install + -strip ${DESTBIN}/tcsh$(EXEEXT) install: tcsh$(EXEEXT) install.catalogs install.man -mkdir -p ${DESTBIN} -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT) - -strip ${DESTBIN}/tcsh$(EXEEXT) chmod 755 ${DESTBIN}/tcsh$(EXEEXT) install.catalogs: @@ -623,25 +623,6 @@ install.man: tcsh.man # nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z # chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z -install.cygwin: install - -gzip ${DESTMAN}/tcsh.${MANSECT} - -mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh - cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh - cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh - cp ${srcdir}/WishList ${srcdir}/Y2K ${DESTDIR}${prefix}/share/doc/tcsh - perl ${srcdir}/tcsh.man2html ${srcdir}/tcsh.man - cp -rp tcsh.html ${DESTDIR}${prefix}/share/doc/tcsh - -mkdir -p ${DESTDIR}/etc/defaults/etc/profile.d - -mkdir -p ${DESTDIR}/etc/profile.d - -mkdir -p ${DESTDIR}/etc/postinstall - -mkdir -p ${DESTDIR}/etc/preremove - cp -p ${srcdir}/cygwin/csh.cshrc ${DESTDIR}/etc/defaults/etc - cp -p ${srcdir}/cygwin/csh.login ${DESTDIR}/etc/defaults/etc - cp -p ${srcdir}/cygwin/bindkey.tcsh ${DESTDIR}/etc/defaults/etc/profile.d - cp -p ${srcdir}/complete.tcsh ${DESTDIR}/etc/defaults/etc/profile.d - cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh - cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh - clean: clean.catalogs ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost ${RM} -f *.${SUF} *.i *.s @@ -748,11 +729,11 @@ ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${ autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in -$(srcdir)/configure: $(srcdir)/configure.in +$(srcdir)/configure: $(srcdir)/configure.ac cd $(srcdir) && autoconf $(srcdir)/config.h.in: $(srcdir)/stamp-h.in -$(srcdir)/stamp-h.in: $(srcdir)/configure.in +$(srcdir)/stamp-h.in: $(srcdir)/configure.ac cd $(srcdir) && autoheader @echo timestamp > $(srcdir)/stamp-h.in @@ -787,6 +768,9 @@ ${TWOBJS} ${TWINC}: ${TWH} # glob.h glob.${SUF} sh.glob.${SUF}: glob.h +# dotlock.h +dotlock.${SUF}: dotlock.h + # ed.defns.h EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF} ${EDOBJS} ${EDDINC}: ed.defns.h Added: vendor/tcsh/dist/Makefile.man2html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcsh/dist/Makefile.man2html Sat Mar 18 21:41:53 2017 (r315512) @@ -0,0 +1,17 @@ +# +# Create the HTML version of the manual page +# + +CGI=tcsh.html/tcsh.cgi + +tcsh.html/top.html: tcsh.man tcsh.man2html + perl tcsh.man2html -i + -rm -f tcsh.html/index.html + chmod -R a+rX tcsh.html + mv ${CGI} ${CGI}.bak + sed -e '1s,^.*$$,#!/usr/bin/perl,' < ${CGI}.bak > ${CGI} + chmod a+rx ${CGI} + rm -f ${CGI}.bak + +clean: + -rm -rf tcsh.html Modified: vendor/tcsh/dist/Makefile.std ============================================================================== --- vendor/tcsh/dist/Makefile.std Sat Mar 18 20:41:07 2017 (r315511) +++ vendor/tcsh/dist/Makefile.std Sat Mar 18 21:41:53 2017 (r315512) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.std,v 1.97 2006/03/02 18:46:44 christos Exp $ +# $tcsh: Makefile.std,v 1.100 2015/08/24 20:09:04 kim Exp $ # Makefile.std 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -287,14 +287,14 @@ ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h -PSSRCS= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ +PSSRCS= sh.decls.h glob.c glob.h dotlock.c dotlock.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ vms.termcap.c SHSRCS= ${ASSRCS} ${PSSRCS} SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \ sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \ sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \ sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \ - sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} \ + sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} dotlock.${SUF} \ mi.termios.${SUF} ma.setp.${SUF} vms.termcap.${SUF} TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ @@ -321,7 +321,8 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin WishList config_f.h eight-bit.me glob.3 patchlevel.h \ pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ - host.defs gethost.c tcsh.man2html configure.in configure config.h.in + host.defs gethost.c tcsh.man2html configure.ac configure config.h.in \ + aclocal.m4 VHSRCS=${PVSRCS} ${AVSRCS} @@ -424,7 +425,7 @@ tc.const.h: tc.const.c sh.char.h config. ${CPP} $(INCLUDES) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\ $(srcdir)/tc.const.c | grep 'Char STR' | \ sed -e 's/Char \([a-zA-Z0-9_]*\) *\[ *\].*/extern Char \1[];/' | \ - sort >> $@ + LC_COLLATE=C sort >> $@ @echo '#endif /* _h_tc_const */' >> $@ csh.prof: ${OBJS} sh.prof.${SUF} mcrt0.${SUF} @@ -584,11 +585,11 @@ ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${ autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in -$(srcdir)/configure: $(srcdir)/configure.in +$(srcdir)/configure: $(srcdir)/configure.ac cd $(srcdir) && autoconf $(srcdir)/config.h.in: $(srcdir)/stamp-h.in -$(srcdir)/stamp-h.in: $(srcdir)/configure.in +$(srcdir)/stamp-h.in: $(srcdir)/configure.ac cd $(srcdir) && autoheader @echo timestamp > $(srcdir)/stamp-h.in @@ -620,6 +621,9 @@ ${TWOBJS} ${TWINC}: ${TWH} # glob.h glob.${SUF} sh.glob.${SUF}: glob.h +# dotlock.h +dotlock.${SUF}: dotlock.h + # ed.defns.h EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF} ${EDOBJS} ${EDDINC}: ed.defns.h Modified: vendor/tcsh/dist/Makefile.vms ============================================================================== --- vendor/tcsh/dist/Makefile.vms Sat Mar 18 20:41:07 2017 (r315511) +++ vendor/tcsh/dist/Makefile.vms Sat Mar 18 21:41:53 2017 (r315512) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.vms,v 1.39 2006/03/02 18:46:44 christos Exp $ +# $tcsh: Makefile.vms,v 1.40 2014/07/07 20:34:58 christos Exp $ # Makefile.vms 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -299,7 +299,7 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin WishList config_f.h eight-bit.me glob.3 patchlevel.h \ pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ - host.defs gethost.c tcsh.man2html configure.in + host.defs gethost.c tcsh.man2html configure.ac aclocal.m4 VHSRCS=${PVSRCS} ${AVSRCS} Modified: vendor/tcsh/dist/README ============================================================================== --- vendor/tcsh/dist/README Sat Mar 18 20:41:07 2017 (r315511) +++ vendor/tcsh/dist/README Sat Mar 18 21:41:53 2017 (r315512) @@ -1,4 +1,4 @@ -This is tcsh version 6.18.01. Tcsh is a version of the Berkeley +This is tcsh version 6.20.00. Tcsh is a version of the Berkeley C-Shell, with the addition of: a command line editor, command and file name completion, listing, etc. and a bunch of small additions to the shell itself. Added: vendor/tcsh/dist/aclocal.m4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcsh/dist/aclocal.m4 Sat Mar 18 21:41:53 2017 (r315512) @@ -0,0 +1,1409 @@ +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. + +# This file 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. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +# iconv.m4 serial 19 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_func_iconv=yes]) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + ]], + [[int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + result |= 16; + return result; +]])], + [am_cv_func_iconv_works=yes], , + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [m4_ifdef([gl_00GNULIB], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])])) +gl_iconv_AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL([am_cv_proto_iconv], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + ]], + [[]])], + [am_cv_proto_iconv_arg1=""], + [am_cv_proto_iconv_arg1="const"]) + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) + fi +]) + +# lib-ld.m4 serial 6 +dnl Copyright (C) 1996-2003, 2009-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid +dnl collision with libtool.m4. + +dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], +[# I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 /dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + 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 + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL([acl_cv_path_LD], +[if test -z "$LD"; then + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_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 `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl Autoconf >= 2.61 supports dots in --with options. + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH(P_A_C_K[-prefix], +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Mar 18 21:44:43 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71BC7D08CFC; Sat, 18 Mar 2017 21:44:43 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 277491A64; Sat, 18 Mar 2017 21:44:43 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2ILigwK052336; Sat, 18 Mar 2017 21:44:42 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2ILigT0052335; Sat, 18 Mar 2017 21:44:42 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703182144.v2ILigT0052335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 21:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r315513 - vendor/tcsh/6.20.00 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2017 21:44:43 -0000 Author: dchagin Date: Sat Mar 18 21:44:42 2017 New Revision: 315513 URL: https://svnweb.freebsd.org/changeset/base/315513 Log: Tag tcsh 6.20.00 release. Added: vendor/tcsh/6.20.00/ - copied from r315512, vendor/tcsh/dist/