From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 6 05:54:40 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 226EE5EF; Mon, 6 Oct 2014 05:54:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 0CC43116; Mon, 6 Oct 2014 05:54:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s965sdRL065145; Mon, 6 Oct 2014 05:54:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s965sdTP065144; Mon, 6 Oct 2014 05:54:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410060554.s965sdTP065144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Oct 2014 05:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272585 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb 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.18-1 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: Mon, 06 Oct 2014 05:54:40 -0000 Author: delphij Date: Mon Oct 6 05:54:39 2014 New Revision: 272585 URL: https://svnweb.freebsd.org/changeset/base/272585 Log: 5176 lock contention on godfather zio Reviewed by: Adam Leventhal Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Reviewed by: Bayard Bell Approved by: Garrett D'Amore Author: Matthew Ahrens illumos/illumos-gate@6f834bc197c703a6568554c889157fb345bac079 Modified: vendor/illumos/dist/cmd/zdb/zdb.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Mon Oct 6 05:46:51 2014 (r272584) +++ vendor/illumos/dist/cmd/zdb/zdb.c Mon Oct 6 05:54:39 2014 (r272585) @@ -2565,10 +2565,12 @@ dump_block_stats(spa_t *spa) * all async I/Os to complete. */ if (dump_opt['c']) { - (void) zio_wait(spa->spa_async_zio_root); - spa->spa_async_zio_root = zio_root(spa, NULL, NULL, - ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | - ZIO_FLAG_GODFATHER); + for (int i = 0; i < max_ncpus; i++) { + (void) zio_wait(spa->spa_async_zio_root[i]); + spa->spa_async_zio_root[i] = zio_root(spa, NULL, NULL, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | + ZIO_FLAG_GODFATHER); + } } if (zcb.zcb_haderrors) { From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 6 05:54:41 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DDBE66C; Mon, 6 Oct 2014 05:54:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 315BC117; Mon, 6 Oct 2014 05:54:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s965sfPo065154; Mon, 6 Oct 2014 05:54:41 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s965segc065150; Mon, 6 Oct 2014 05:54:40 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410060554.s965segc065150@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Oct 2014 05:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272585 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb 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.18-1 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: Mon, 06 Oct 2014 05:54:41 -0000 Author: delphij Date: Mon Oct 6 05:54:39 2014 New Revision: 272585 URL: https://svnweb.freebsd.org/changeset/base/272585 Log: 5176 lock contention on godfather zio Reviewed by: Adam Leventhal Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Reviewed by: Bayard Bell Approved by: Garrett D'Amore Author: Matthew Ahrens illumos/illumos-gate@6f834bc197c703a6568554c889157fb345bac079 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zdb/zdb.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Mon Oct 6 05:46:51 2014 (r272584) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Mon Oct 6 05:54:39 2014 (r272585) @@ -1222,7 +1222,9 @@ spa_unload(spa_t *spa) * Wait for any outstanding async I/O to complete. */ if (spa->spa_async_zio_root != NULL) { - (void) zio_wait(spa->spa_async_zio_root); + for (int i = 0; i < max_ncpus; i++) + (void) zio_wait(spa->spa_async_zio_root[i]); + kmem_free(spa->spa_async_zio_root, max_ncpus * sizeof (void *)); spa->spa_async_zio_root = NULL; } @@ -2141,8 +2143,13 @@ spa_load_impl(spa_t *spa, uint64_t pool_ /* * Create "The Godfather" zio to hold all async IOs */ - spa->spa_async_zio_root = zio_root(spa, NULL, NULL, - ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | ZIO_FLAG_GODFATHER); + spa->spa_async_zio_root = kmem_alloc(max_ncpus * sizeof (void *), + KM_SLEEP); + for (int i = 0; i < max_ncpus; i++) { + spa->spa_async_zio_root[i] = zio_root(spa, NULL, NULL, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | + ZIO_FLAG_GODFATHER); + } /* * Parse the configuration into a vdev tree. We explicitly set the @@ -3481,8 +3488,13 @@ spa_create(const char *pool, nvlist_t *n /* * Create "The Godfather" zio to hold all async IOs */ - spa->spa_async_zio_root = zio_root(spa, NULL, NULL, - ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | ZIO_FLAG_GODFATHER); + spa->spa_async_zio_root = kmem_alloc(max_ncpus * sizeof (void *), + KM_SLEEP); + for (int i = 0; i < max_ncpus; i++) { + spa->spa_async_zio_root[i] = zio_root(spa, NULL, NULL, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | + ZIO_FLAG_GODFATHER); + } /* * Create the root vdev. Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h Mon Oct 6 05:46:51 2014 (r272584) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h Mon Oct 6 05:54:39 2014 (r272585) @@ -204,7 +204,8 @@ struct spa { uint64_t spa_failmode; /* failure mode for the pool */ uint64_t spa_delegation; /* delegation on/off */ list_t spa_config_list; /* previous cache file(s) */ - zio_t *spa_async_zio_root; /* root of all async I/O */ + /* per-CPU array of root of async I/O: */ + zio_t **spa_async_zio_root; zio_t *spa_suspend_zio_root; /* root of all suspended I/O */ kmutex_t spa_suspend_lock; /* protects suspend_zio_root */ kcondvar_t spa_suspend_cv; /* notification of resume */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Mon Oct 6 05:46:51 2014 (r272584) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Mon Oct 6 05:54:39 2014 (r272585) @@ -1367,7 +1367,7 @@ zio_nowait(zio_t *zio) */ spa_t *spa = zio->io_spa; - zio_add_child(spa->spa_async_zio_root, zio); + zio_add_child(spa->spa_async_zio_root[CPU_SEQID], zio); } zio_execute(zio); From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 6 06:00:51 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62DAFB39; Mon, 6 Oct 2014 06:00:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 4EF18166; Mon, 6 Oct 2014 06:00:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9660plZ068710; Mon, 6 Oct 2014 06:00:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9660pJr068709; Mon, 6 Oct 2014 06:00:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410060600.s9660pJr068709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Oct 2014 06:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272588 - vendor/illumos/dist/cmd/zdb 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.18-1 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: Mon, 06 Oct 2014 06:00:51 -0000 Author: delphij Date: Mon Oct 6 06:00:50 2014 New Revision: 272588 URL: https://svnweb.freebsd.org/changeset/base/272588 Log: 5178 zdb -vvvvv on old-format pool fails in dump_deadlist() Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Lowe Reviewed by: Saso Kiselkov Reviewed by: Richard Elling Reviewed by: Alek Pinchuk Approved by: Garrett D'Amore Author: Matthew Ahrens illumos/illumos-gate@90c76c66a2e21307c5370ae1bd3c7145a60c874f Modified: vendor/illumos/dist/cmd/zdb/zdb.c Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Mon Oct 6 06:00:06 2014 (r272587) +++ vendor/illumos/dist/cmd/zdb/zdb.c Mon Oct 6 06:00:50 2014 (r272588) @@ -1434,6 +1434,11 @@ dump_deadlist(dsl_deadlist_t *dl) if (dump_opt['d'] < 3) return; + if (dl->dl_oldfmt) { + dump_bpobj(&dl->dl_bpobj, "old-format deadlist", 0); + return; + } + zdb_nicenum(dl->dl_phys->dl_used, bytes); zdb_nicenum(dl->dl_phys->dl_comp, comp); zdb_nicenum(dl->dl_phys->dl_uncomp, uncomp); From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 6 06:04:11 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DD8DEE6; Mon, 6 Oct 2014 06:04:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2E47E20F; Mon, 6 Oct 2014 06:04:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9664BBL070221; Mon, 6 Oct 2014 06:04:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9664Abr070219; Mon, 6 Oct 2014 06:04:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410060604.s9664Abr070219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Oct 2014 06:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272591 - vendor-sys/illumos/dist/uts/common/fs/zfs 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.18-1 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: Mon, 06 Oct 2014 06:04:11 -0000 Author: delphij Date: Mon Oct 6 06:04:10 2014 New Revision: 272591 URL: https://svnweb.freebsd.org/changeset/base/272591 Log: 5162 zfs recv should use loaned arc buffer to avoid copy Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Bayard Bell Reviewed by: Richard Elling Approved by: Garrett D'Amore Author: Matthew Ahrens illumos/illumos-gate@8a9047098ad8ce5afa38b6d012c8b509bb619f40 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Mon Oct 6 06:03:25 2014 (r272590) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Mon Oct 6 06:04:10 2014 (r272591) @@ -1264,7 +1264,14 @@ dmu_assign_arcbuf(dmu_buf_t *handle, uin rw_exit(&dn->dn_struct_rwlock); DB_DNODE_EXIT(dbuf); - if (offset == db->db.db_offset && blksz == db->db.db_size) { + /* + * We can only assign if the offset is aligned, the arc buf is the + * same size as the dbuf, and the dbuf is not metadata. It + * can't be metadata because the loaned arc buf comes from the + * user-data kmem arena. + */ + if (offset == db->db.db_offset && blksz == db->db.db_size && + DBUF_GET_BUFC_TYPE(db) == ARC_BUFC_DATA) { dbuf_assign_arcbuf(db, buf, tx); dbuf_rele(db, FTAG); } else { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Oct 6 06:03:25 2014 (r272590) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Oct 6 06:04:10 2014 (r272591) @@ -1212,11 +1212,13 @@ free_guid_map_onexit(void *arg) } static void * -restore_read(struct restorearg *ra, int len) +restore_read(struct restorearg *ra, int len, char *buf) { - void *rv; int done = 0; + if (buf == NULL) + buf = ra->buf; + /* some things will require 8-byte alignment, so everything must */ ASSERT0(len % 8); @@ -1224,7 +1226,7 @@ restore_read(struct restorearg *ra, int ssize_t resid; ra->err = vn_rdwr(UIO_READ, ra->vp, - (caddr_t)ra->buf + done, len - done, + buf + done, len - done, ra->voff, UIO_SYSSPACE, FAPPEND, RLIM64_INFINITY, CRED(), &resid); @@ -1237,12 +1239,11 @@ restore_read(struct restorearg *ra, int } ASSERT3U(done, ==, len); - rv = ra->buf; if (ra->byteswap) - fletcher_4_incremental_byteswap(rv, len, &ra->cksum); + fletcher_4_incremental_byteswap(buf, len, &ra->cksum); else - fletcher_4_incremental_native(rv, len, &ra->cksum); - return (rv); + fletcher_4_incremental_native(buf, len, &ra->cksum); + return (buf); } static void @@ -1357,7 +1358,7 @@ restore_object(struct restorearg *ra, ob return (SET_ERROR(EINVAL)); if (drro->drr_bonuslen) { - data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); + data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8), NULL); if (ra->err != 0) return (ra->err); } @@ -1454,19 +1455,30 @@ restore_write(struct restorearg *ra, obj !DMU_OT_IS_VALID(drrw->drr_type)) return (SET_ERROR(EINVAL)); - data = restore_read(ra, drrw->drr_length); - if (data == NULL) - return (ra->err); - if (dmu_object_info(os, drrw->drr_object, NULL) != 0) return (SET_ERROR(EINVAL)); + dmu_buf_t *bonus; + if (dmu_bonus_hold(os, drrw->drr_object, FTAG, &bonus) != 0) + return (SET_ERROR(EINVAL)); + + arc_buf_t *abuf = dmu_request_arcbuf(bonus, drrw->drr_length); + + data = restore_read(ra, drrw->drr_length, abuf->b_data); + if (data == NULL) { + dmu_return_arcbuf(abuf); + dmu_buf_rele(bonus, FTAG); + return (ra->err); + } + tx = dmu_tx_create(os); dmu_tx_hold_write(tx, drrw->drr_object, drrw->drr_offset, drrw->drr_length); err = dmu_tx_assign(tx, TXG_WAIT); if (err != 0) { + dmu_return_arcbuf(abuf); + dmu_buf_rele(bonus, FTAG); dmu_tx_abort(tx); return (err); } @@ -1475,9 +1487,9 @@ restore_write(struct restorearg *ra, obj DMU_OT_BYTESWAP(drrw->drr_type); dmu_ot_byteswap[byteswap].ob_func(data, drrw->drr_length); } - dmu_write(os, drrw->drr_object, - drrw->drr_offset, drrw->drr_length, data, tx); + dmu_assign_arcbuf(bonus, drrw->drr_offset, abuf, tx); dmu_tx_commit(tx); + dmu_buf_rele(bonus, FTAG); return (0); } @@ -1559,7 +1571,7 @@ restore_write_embedded(struct restorearg if (drrwnp->drr_compression >= ZIO_COMPRESS_FUNCTIONS) return (EINVAL); - data = restore_read(ra, P2ROUNDUP(drrwnp->drr_psize, 8)); + data = restore_read(ra, P2ROUNDUP(drrwnp->drr_psize, 8), NULL); if (data == NULL) return (ra->err); @@ -1594,7 +1606,7 @@ restore_spill(struct restorearg *ra, obj drrs->drr_length > SPA_MAXBLOCKSIZE) return (SET_ERROR(EINVAL)); - data = restore_read(ra, drrs->drr_length); + data = restore_read(ra, drrs->drr_length, NULL); if (data == NULL) return (ra->err); @@ -1735,7 +1747,7 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, */ pcksum = ra.cksum; while (ra.err == 0 && - NULL != (drr = restore_read(&ra, sizeof (*drr)))) { + NULL != (drr = restore_read(&ra, sizeof (*drr), NULL))) { if (issig(JUSTLOOKING) && issig(FORREAL)) { ra.err = SET_ERROR(EINTR); goto out; From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 6 14:55:41 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7464CE4C; Mon, 6 Oct 2014 14:55:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5C31E841; Mon, 6 Oct 2014 14:55:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s96EtfCV028024; Mon, 6 Oct 2014 14:55:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Etdw5028006; Mon, 6 Oct 2014 14:55:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410061455.s96Etdw5028006@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 6 Oct 2014 14:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272651 - in vendor/byacc/dist: . package package/debian package/pkgsrc test test/btyacc test/yacc 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.18-1 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: Mon, 06 Oct 2014 14:55:41 -0000 Author: bapt Date: Mon Oct 6 14:55:38 2014 New Revision: 272651 URL: https://svnweb.freebsd.org/changeset/base/272651 Log: import byacc 20141005 Added: vendor/byacc/dist/test/btyacc/btyacc_demo2.error vendor/byacc/dist/test/btyacc/btyacc_demo2.output vendor/byacc/dist/test/btyacc/btyacc_demo2.tab.c (contents, props changed) vendor/byacc/dist/test/btyacc/btyacc_demo2.tab.h (contents, props changed) vendor/byacc/dist/test/btyacc/btyacc_destroy1.error vendor/byacc/dist/test/btyacc/btyacc_destroy1.output vendor/byacc/dist/test/btyacc/btyacc_destroy1.tab.c (contents, props changed) vendor/byacc/dist/test/btyacc/btyacc_destroy1.tab.h (contents, props changed) vendor/byacc/dist/test/btyacc/btyacc_destroy2.error vendor/byacc/dist/test/btyacc/btyacc_destroy2.output vendor/byacc/dist/test/btyacc/btyacc_destroy2.tab.c (contents, props changed) vendor/byacc/dist/test/btyacc/btyacc_destroy2.tab.h (contents, props changed) vendor/byacc/dist/test/btyacc/btyacc_destroy3.error vendor/byacc/dist/test/btyacc/btyacc_destroy3.output vendor/byacc/dist/test/btyacc/btyacc_destroy3.tab.c (contents, props changed) vendor/byacc/dist/test/btyacc/btyacc_destroy3.tab.h (contents, props changed) vendor/byacc/dist/test/btyacc_destroy1.y vendor/byacc/dist/test/btyacc_destroy2.y vendor/byacc/dist/test/btyacc_destroy3.y Modified: vendor/byacc/dist/CHANGES vendor/byacc/dist/MANIFEST vendor/byacc/dist/VERSION vendor/byacc/dist/aclocal.m4 vendor/byacc/dist/btyaccpar.c vendor/byacc/dist/closure.c vendor/byacc/dist/config.sub vendor/byacc/dist/configure vendor/byacc/dist/defs.h vendor/byacc/dist/lalr.c vendor/byacc/dist/main.c vendor/byacc/dist/output.c vendor/byacc/dist/package/byacc.spec vendor/byacc/dist/package/debian/changelog vendor/byacc/dist/package/mingw-byacc.spec vendor/byacc/dist/package/pkgsrc/Makefile vendor/byacc/dist/reader.c vendor/byacc/dist/test/btyacc/btyacc_calc1.tab.c vendor/byacc/dist/test/btyacc/btyacc_demo.tab.c vendor/byacc/dist/test/btyacc/calc.tab.c vendor/byacc/dist/test/btyacc/calc1.tab.c vendor/byacc/dist/test/btyacc/calc2.tab.c vendor/byacc/dist/test/btyacc/calc3.tab.c vendor/byacc/dist/test/btyacc/code_calc.code.c vendor/byacc/dist/test/btyacc/code_calc.tab.c vendor/byacc/dist/test/btyacc/code_error.code.c vendor/byacc/dist/test/btyacc/code_error.tab.c vendor/byacc/dist/test/btyacc/empty.tab.c vendor/byacc/dist/test/btyacc/err_inherit1.tab.c vendor/byacc/dist/test/btyacc/err_inherit2.tab.c vendor/byacc/dist/test/btyacc/err_inherit3.tab.c vendor/byacc/dist/test/btyacc/err_inherit4.tab.c vendor/byacc/dist/test/btyacc/err_inherit5.tab.c vendor/byacc/dist/test/btyacc/err_syntax1.tab.c vendor/byacc/dist/test/btyacc/err_syntax10.tab.c vendor/byacc/dist/test/btyacc/err_syntax11.tab.c vendor/byacc/dist/test/btyacc/err_syntax12.tab.c vendor/byacc/dist/test/btyacc/err_syntax13.tab.c vendor/byacc/dist/test/btyacc/err_syntax14.tab.c vendor/byacc/dist/test/btyacc/err_syntax15.tab.c vendor/byacc/dist/test/btyacc/err_syntax16.tab.c vendor/byacc/dist/test/btyacc/err_syntax17.tab.c vendor/byacc/dist/test/btyacc/err_syntax18.tab.c vendor/byacc/dist/test/btyacc/err_syntax19.tab.c vendor/byacc/dist/test/btyacc/err_syntax2.tab.c vendor/byacc/dist/test/btyacc/err_syntax20.tab.c vendor/byacc/dist/test/btyacc/err_syntax21.tab.c vendor/byacc/dist/test/btyacc/err_syntax22.tab.c vendor/byacc/dist/test/btyacc/err_syntax23.tab.c vendor/byacc/dist/test/btyacc/err_syntax24.tab.c vendor/byacc/dist/test/btyacc/err_syntax25.tab.c vendor/byacc/dist/test/btyacc/err_syntax26.tab.c vendor/byacc/dist/test/btyacc/err_syntax27.tab.c vendor/byacc/dist/test/btyacc/err_syntax3.tab.c vendor/byacc/dist/test/btyacc/err_syntax4.tab.c vendor/byacc/dist/test/btyacc/err_syntax5.tab.c vendor/byacc/dist/test/btyacc/err_syntax6.tab.c vendor/byacc/dist/test/btyacc/err_syntax7.tab.c vendor/byacc/dist/test/btyacc/err_syntax7a.tab.c vendor/byacc/dist/test/btyacc/err_syntax7b.tab.c vendor/byacc/dist/test/btyacc/err_syntax8.tab.c vendor/byacc/dist/test/btyacc/err_syntax8a.tab.c vendor/byacc/dist/test/btyacc/err_syntax9.tab.c vendor/byacc/dist/test/btyacc/error.tab.c vendor/byacc/dist/test/btyacc/grammar.tab.c vendor/byacc/dist/test/btyacc/inherit0.tab.c vendor/byacc/dist/test/btyacc/inherit1.tab.c vendor/byacc/dist/test/btyacc/inherit2.tab.c vendor/byacc/dist/test/btyacc/ok_syntax1.tab.c vendor/byacc/dist/test/btyacc/pure_calc.tab.c vendor/byacc/dist/test/btyacc/pure_error.tab.c vendor/byacc/dist/test/btyacc/quote_calc-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc.tab.c vendor/byacc/dist/test/btyacc/quote_calc2-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc2.tab.c vendor/byacc/dist/test/btyacc/quote_calc3-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc3.tab.c vendor/byacc/dist/test/btyacc/quote_calc4-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc4.tab.c vendor/byacc/dist/test/btyacc/rename_debug.c vendor/byacc/dist/test/btyacc/varsyntax_calc1.tab.c vendor/byacc/dist/test/yacc/calc2.tab.c vendor/byacc/dist/test/yacc/calc3.tab.c vendor/byacc/dist/test/yacc/ok_syntax1.tab.c vendor/byacc/dist/yacc.1 Modified: vendor/byacc/dist/CHANGES ============================================================================== --- vendor/byacc/dist/CHANGES Mon Oct 6 14:52:04 2014 (r272650) +++ vendor/byacc/dist/CHANGES Mon Oct 6 14:55:38 2014 (r272651) @@ -1,3 +1,125 @@ +2014-10-05 Thomas E. Dickey + + * main.c: + make change to umask before calling mkstemp, as suggested in Coverity #56902 + + * reader.c: + adjust logic in copy_action to avoid potential null-pointer dereference + (Coverity #56901) + + * reader.c: + adjust logic to avoid potential null-pointer dereference in compile_args + (Coverity #63407) + + * reader.c: eliminate strcpy into fixed-size buffer (Coverity #63408) + + * yacc.1: document changes made with respect to %parse-param + + * output.c: + add parameters from %parse-param to destructor. The order of the parameters + is intentionally inconsistent with yyparse/yyerror, for "compatibility" with + bison. + + * test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c: + regen + + * output.c: + use puts_param_types/puts_param_names to output lex_param data. + + * test/btyacc/ok_syntax1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c , test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/rename_debug.c: + regen + + * btyaccpar.c: add casts, change types to fix strict compiler warnings + + * test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax2.tab.c, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax24.tab.c, test/btyacc/err_syntax25.tab.c, test/btyacc/err_syntax26.tab.c, test/btyacc/err_syntax27.tab.c, test/btyacc/err_syntax3.tab.c, test/btyacc/err_syntax4.tab.c, test/btyacc/err_syntax5.tab.c, test/btyacc/err_syntax6.tab.c, test/btyacc/err_syntax7.tab.c, test/btyacc/err_syntax7a.tab.c, test/btyacc/err_syntax7b.tab.c, test/btyacc/err_syntax8.tab.c, test/btyacc/err_syntax8a.tab.c, test/btyacc/err_syntax9.tab.c, test/btyacc/err_inherit1.tab.c, test/btyacc/err_inherit2.tab.c, test/btyacc/err_inherit5.tab.c, test/btyacc/err_syntax1.tab.c, test/btyacc/err_syntax13.tab.c, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax16.tab.c: + regen + + * output.c: gcc-warning + + * test/btyacc/code_calc.tab.c, test/btyacc/code_error.tab.c: regen + + * output.c: fix limit when merging real/workaround tables + + * output.c: + for btyacc, it is possible to have no conflicts - but in that case, the + "ctable" was not generated at all, while the skeleton uses the table. + The most straightforward (workaround) is generating a dummy table which + rejects any state. + + * test/btyacc_destroy3.y, test/btyacc_destroy2.y, test/btyacc_destroy1.y: + fix "make check_make" + + * test/yacc/calc3.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/calc2.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c: + regen + + * reader.c: + trim blanks from interim value in copy_param() to handle special case when + a space precedes a comma. + + * output.c: + use two new functions, puts_param_types and puts_param_names, to improve + format of the parse_param list (by trimming space after "*") as well as + correcting the output of the comma-separated names (only the last name + was output). + + * test/btyacc/ok_syntax1.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c: + regen + + * reader.c: + modify copy_param() to handle resulting comma-separated list. Before, it + only expected a single parameter. + +2014-10-04 Thomas E. Dickey + + * reader.c: split-out save_param() from copy_param() + + * reader.c: trim_blanks() did not always convert spaces - fix. + + * reader.c: fix some minor regressions with error-reporting + + * aclocal.m4: update CF_XOPEN_SOURCE for Unixware change from lynx + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * reader.c: + modify copy_param() to accept multiple parameters, each in curly braces like + recent bison, as well as honoring bison's undocumented feature to accept the + parameters as a comma-separated list. + + * test/btyacc/btyacc_destroy3.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.error, test/btyacc/btyacc_destroy3.output, test/btyacc/btyacc_destroy3.tab.h, test/btyacc/btyacc_destroy2.error, test/btyacc/btyacc_destroy2.output, test/btyacc/btyacc_destroy2.tab.h: + RCS_BASE + +2014-10-03 Thomas E. Dickey + + * test/btyacc/btyacc_demo2.error, test/btyacc/btyacc_demo2.output, test/btyacc/btyacc_demo2.tab.c, test/btyacc/btyacc_demo2.tab.h, test/btyacc/btyacc_destroy1.error, test/btyacc/btyacc_destroy1.output, test/btyacc/btyacc_destroy1.tab.h, test/btyacc_destroy3.y, test/btyacc_destroy1.y, test/btyacc_destroy2.y: + RCS_BASE + +2014-10-02 Thomas E. Dickey + + * main.c, reader.c, defs.h: + use calloc in get_line() when allocating line to ensure it is fully initialized, + fixes a later uninitialized value in copy_param() (FreeBSD #193499). + +2014-09-17 Thomas E. Dickey + + * closure.c, lalr.c, output.c, defs.h: + rephrase odd addressing to fix Coverity #48848, #38950, #38860, not actually + a bug. + +2014-09-01 Thomas E. Dickey + + * config.sub: update to 2014-07-28 + +2014-07-27 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: modified to support port to Minix3.2 + + * package/pkgsrc/Makefile, VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec: + bump + 2014-07-15 Thomas E. Dickey * aclocal.m4: resync with my-autoconf (no change to configure script) Modified: vendor/byacc/dist/MANIFEST ============================================================================== --- vendor/byacc/dist/MANIFEST Mon Oct 6 14:52:04 2014 (r272650) +++ vendor/byacc/dist/MANIFEST Mon Oct 6 14:55:38 2014 (r272651) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20140715, version t20140715 +MANIFEST for byacc-20141005, version t20141005 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: vendor/byacc/dist/VERSION ============================================================================== --- vendor/byacc/dist/VERSION Mon Oct 6 14:52:04 2014 (r272650) +++ vendor/byacc/dist/VERSION Mon Oct 6 14:55:38 2014 (r272651) @@ -1 +1 @@ -20140715 +20141005 Modified: vendor/byacc/dist/aclocal.m4 ============================================================================== --- vendor/byacc/dist/aclocal.m4 Mon Oct 6 14:52:04 2014 (r272650) +++ vendor/byacc/dist/aclocal.m4 Mon Oct 6 14:55:38 2014 (r272651) @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.35 2014/07/15 19:38:05 tom Exp $ +dnl $Id: aclocal.m4,v 1.37 2014/10/04 16:40:06 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- dnl Copyright 2004-2013,2014 Thomas E. Dickey @@ -54,7 +54,7 @@ define([CF_ACVERSION_COMPARE], [ifelse([$8], , ,[$8])], [ifelse([$9], , ,[$9])])])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42 +dnl CF_ADD_CFLAGS version: 11 updated: 2014/07/22 05:32:57 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. @@ -79,7 +79,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -116,7 +116,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -1085,7 +1085,7 @@ fi fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 46 updated: 2014/02/09 19:30:15 +dnl CF_XOPEN_SOURCE version: 48 updated: 2014/09/01 12:29:14 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -1136,6 +1136,9 @@ irix[[56]].*) #(vi linux*|gnu*|mint*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; +minix*) #(vi + cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... + ;; mirbsd*) #(vi # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= @@ -1165,6 +1168,10 @@ solaris2.*) #(vi cf_xopen_source="-D__EXTENSIONS__" cf_cv_xopen_source=broken ;; +sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2) + cf_XOPEN_SOURCE= + cf_POSIX_C_SOURCE= + ;; *) CF_TRY_XOPEN_SOURCE CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) @@ -1172,7 +1179,7 @@ solaris2.*) #(vi esac if test -n "$cf_xopen_source" ; then - CF_ADD_CFLAGS($cf_xopen_source) + CF_ADD_CFLAGS($cf_xopen_source,true) fi dnl In anything but the default case, we may have system-specific setting Modified: vendor/byacc/dist/btyaccpar.c ============================================================================== --- vendor/byacc/dist/btyaccpar.c Mon Oct 6 14:52:04 2014 (r272650) +++ vendor/byacc/dist/btyaccpar.c Mon Oct 6 14:55:38 2014 (r272651) @@ -18,7 +18,7 @@ const char *const banner[] = { "/* original parser id follows */", "/* yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\" */", - "/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */", + "/* (use YYMAJOR/YYMINOR for ifdefs dependent of parser version) */", "", "#define YYBYACC 1", CONCAT1("#define YYMAJOR ", YYMAJOR), @@ -56,7 +56,7 @@ const char *const tables[] = "#if YYBTYACC", "extern const YYINT yycindex[];", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "extern const YYINT yygindex[];", "extern const YYINT yytable[];", "extern const YYINT yycheck[];", @@ -64,7 +64,7 @@ const char *const tables[] = "#if YYBTYACC", "extern const YYINT yyctable[];", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "#if YYDEBUG", "extern const char *const yyname[];", @@ -127,7 +127,7 @@ const char *const hdr_defs[] = "#define YYLVQUEUEGROWTH 32", "#endif", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "/* define the initial stack-sizes */", "#ifdef YYSTACKSIZE", @@ -172,7 +172,7 @@ const char *const hdr_defs[] = "};", "typedef struct YYParseState_s YYParseState;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ 0 }; @@ -220,7 +220,7 @@ const char *const hdr_vars[] = "", "static short *yylexemes = 0;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ 0 }; @@ -277,7 +277,7 @@ const char *const body_vars[] = "", " static short *yylexemes = 0;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ 0 }; @@ -290,14 +290,14 @@ const char *const body_1[] = "#if YYBTYACC", "#define yytrial (yyps->save)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "#if YYDEBUG", - "#include /* needed for printf */", + "#include /* needed for printf */", "#endif", "", - "#include /* needed for malloc, etc */", - "#include /* needed for memset */", + "#include /* needed for malloc, etc */", + "#include /* needed for memset */", "", "/* allocate initial stack or double stack size, up to YYMAXDEPTH */", "static int yygrowstack(YYSTACKDATA *data)", @@ -404,7 +404,7 @@ const char *const body_1[] = " free(p);", "}", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "#define YYABORT goto yyabort", "#define YYREJECT goto yyabort", @@ -416,7 +416,7 @@ const char *const body_1[] = "#define YYVALID_NESTED do { if (yyps->save && \\", " yyps->save->save == 0) goto yyvalid; } while(0)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "int", "YYPARSE_DECL()", @@ -432,7 +432,7 @@ const char *const body_2[] = " int yynewerrflag;", " YYParseState *yyerrctx = NULL;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " YYLTYPE yyerror_loc_range[2]; /* position of error start & end */", "#endif", @@ -454,7 +454,7 @@ const char *const body_2[] = " yyps = yyNewState(0); if (yyps == 0) goto yyenomem;", " yyps->save = 0;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yynerrs = 0;", " yyerrflag = 0;", " yychar = YYEMPTY;", @@ -495,8 +495,8 @@ const char *const body_2[] = " /* in trial mode; save scanner results for future parse attempts */", " if (yylvp == yylvlim)", " { /* Enlarge lexical value queue */", - " int p = yylvp - yylvals;", - " int s = yylvlim - yylvals;", + " size_t p = (size_t) (yylvp - yylvals);", + " size_t s = (size_t) (yylvlim - yylvals);", "", " s += YYLVQUEUEGROWTH;", " if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;", @@ -524,13 +524,13 @@ const char *const body_2[] = " }", " /* normal operation, no conflict encountered */", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yychar = YYLEX;", #if defined(YYBTYACC) "#if YYBTYACC", " } while (0);", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " if (yychar < 0) yychar = YYEOF;", " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */", "#if YYDEBUG", @@ -544,7 +544,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " fprintf(stderr, \" <%s>\", YYSTYPE_TOSTRING(yychar, yylval));", "#endif", " fputc('\\n', stderr);", @@ -598,12 +598,12 @@ const char *const body_2[] = " save->state = yystate;", " save->errflag = yyerrflag;", " save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base);", - " memcpy (save->yystack.s_base, yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base);", - " memcpy (save->yystack.l_base, yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " save->yystack.p_mark = save->yystack.p_base + (yystack.p_mark - yystack.p_base);", - " memcpy (save->yystack.p_base, yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", " ctry = yytable[yyn];", " if (yyctable[ctry] == -1)", @@ -658,7 +658,7 @@ const char *const body_2[] = " yylexp--;", " yychar = YYEMPTY;", " }", - " save->lexeme = yylvp - yylvals;", + " save->lexeme = (int) (yylvp - yylvals);", " yyps->save = save;", " }", " if (yytable[yyn] == ctry)", @@ -695,7 +695,7 @@ const char *const body_2[] = " }", " } /* End of code dealing with conflicts */", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&", " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)", " {", @@ -754,14 +754,14 @@ const char *const body_2[] = " yyerrctx->state = yystate;", " yyerrctx->errflag = yyerrflag;", " yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);", - " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);", - " memcpy (yyerrctx->yystack.l_base, yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base);", - " memcpy (yyerrctx->yystack.p_base, yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", - " yyerrctx->lexeme = yylvp - yylvals;", + " yyerrctx->lexeme = (int) (yylvp - yylvals);", " }", " yylvp = yylvals + save->lexeme;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -770,12 +770,12 @@ const char *const body_2[] = " yylexp = yylexemes + save->lexeme;", " yychar = YYEMPTY;", " yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);", - " memcpy (yystack.s_base, save->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);", - " memcpy (yystack.l_base, save->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base);", - " memcpy (yystack.p_base, save->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", " ctry = ++save->ctry;", " yystate = save->state;", @@ -805,12 +805,12 @@ const char *const body_2[] = " yylloc = yylpp[-1];", "#endif", " yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);", - " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);", - " memcpy (yystack.l_base, yyerrctx->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base);", - " memcpy (yystack.p_base, yyerrctx->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", " yystate = yyerrctx->state;", " yyFreeState(yyerrctx);", @@ -820,7 +820,7 @@ const char *const body_2[] = " }", " if (yynewerrflag == 0) goto yyinrecovery;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", " YYERROR_CALL(\"syntax error\");", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -876,7 +876,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " YYDESTRUCT_CALL(\"error: discarding state\",", " yystos[*yystack.s_mark], yystack.l_mark, yystack.p_mark);", @@ -909,7 +909,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " YYDESTRUCT_CALL(\"error: discarding token\", yychar, &yylval, &yylloc);", "#else", @@ -932,7 +932,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " if (yym > 0)", " {", " int i;", @@ -961,7 +961,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " {", " YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);", " /* just in case YYERROR is invoked within the action, save", @@ -998,7 +998,7 @@ const char *const trailer[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " fprintf(stderr, \"result is <%s>, \", YYSTYPE_TOSTRING(yystos[YYFINAL], yyval));", "#endif", " fprintf(stderr, \"shifting from state 0 to final state %d\\n\", YYFINAL);", @@ -1030,8 +1030,8 @@ const char *const trailer[] = " /* in trial mode; save scanner results for future parse attempts */", " if (yylvp == yylvlim)", " { /* Enlarge lexical value queue */", - " int p = yylvp - yylvals;", - " int s = yylvlim - yylvals;", + " size_t p = (size_t) (yylvp - yylvals);", + " size_t s = (size_t) (yylvlim - yylvals);", "", " s += YYLVQUEUEGROWTH;", " if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)", @@ -1062,13 +1062,13 @@ const char *const trailer[] = " }", " /* normal operation, no conflict encountered */", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yychar = YYLEX;", #if defined(YYBTYACC) "#if YYBTYACC", " } while (0);", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " if (yychar < 0) yychar = YYEOF;", " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */", "#if YYDEBUG", @@ -1097,7 +1097,7 @@ const char *const trailer[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " fprintf(stderr, \"result is <%s>, \", YYSTYPE_TOSTRING(yystos[yystate], yyval));", "#endif", " fprintf(stderr, \"shifting from state %d to state %d\\n\", *yystack.s_mark, yystate);", @@ -1140,17 +1140,17 @@ const char *const trailer[] = " yylexp = yylexemes + yypath->lexeme;", " yychar = YYEMPTY;", " yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);", - " memcpy (yystack.s_base, yypath->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);", - " memcpy (yystack.l_base, yypath->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base);", - " memcpy (yystack.p_base, yypath->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", " yystate = yypath->state;", " goto yyloop;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "yyoverflow:", " YYERROR_CALL(\"yacc stack overflow\");", @@ -1161,7 +1161,7 @@ const char *const trailer[] = " YYERROR_CALL(\"memory exhausted\");", "yyabort_nomem:", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yyresult = 2;", " goto yyreturn;", "", @@ -1174,7 +1174,7 @@ const char *const trailer[] = "#if YYBTYACC", " if (yyps->save) goto yyvalid;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yyresult = 0;", "", "yyreturn:", @@ -1224,7 +1224,7 @@ const char *const trailer[] = " yyFreeState(save);", " }", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yyfreestack(&yystack);", " return (yyresult);", "}", Modified: vendor/byacc/dist/closure.c ============================================================================== --- vendor/byacc/dist/closure.c Mon Oct 6 14:52:04 2014 (r272650) +++ vendor/byacc/dist/closure.c Mon Oct 6 14:55:38 2014 (r272651) @@ -1,4 +1,4 @@ -/* $Id: closure.c,v 1.10 2014/02/19 00:45:42 Tom.Shields Exp $ */ +/* $Id: closure.c,v 1.11 2014/09/18 00:40:07 tom Exp $ */ #include "defs.h" @@ -6,6 +6,7 @@ Value_t *itemset; Value_t *itemsetend; unsigned *ruleset; +static unsigned *first_base; static unsigned *first_derives; static unsigned *EFF; @@ -68,7 +69,8 @@ set_first_derives(void) rulesetsize = WORDSIZE(nrules); varsetsize = WORDSIZE(nvars); - first_derives = NEW2(nvars * rulesetsize, unsigned) - ntokens * rulesetsize; + first_base = NEW2(nvars * rulesetsize, unsigned); + first_derives = first_base - ntokens * rulesetsize; set_EFF(); @@ -176,7 +178,7 @@ finalize_closure(void) { FREE(itemset); FREE(ruleset); - FREE(first_derives + ntokens * WORDSIZE(nrules)); + FREE(first_base); } #ifdef DEBUG Modified: vendor/byacc/dist/config.sub ============================================================================== --- vendor/byacc/dist/config.sub Mon Oct 6 14:52:04 2014 (r272650) +++ vendor/byacc/dist/config.sub Mon Oct 6 14:55:38 2014 (r272651) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2014-04-03' +timestamp='2014-07-28' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -283,8 +283,10 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ @@ -401,8 +403,10 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -824,6 +828,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1369,7 +1377,7 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ Modified: vendor/byacc/dist/configure ============================================================================== --- vendor/byacc/dist/configure Mon Oct 6 14:52:04 2014 (r272650) +++ vendor/byacc/dist/configure Mon Oct 6 14:55:38 2014 (r272651) @@ -1936,7 +1936,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -1977,7 +1977,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -2498,6 +2498,9 @@ echo "${ECHO_T}$cf_cv_gnu_source" >&6 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" ;; +minix*) #(vi + cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... + ;; mirbsd*) #(vi # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= @@ -2515,16 +2518,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAG sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:2518: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:2521: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:2524: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:2527: testing if the symbol is already defined go no further ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 2527 "configure" +#line 2530 "configure" #include "confdefs.h" #include int @@ -2539,16 +2542,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2542: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2545: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2545: \$? = $ac_status" >&5 + echo "$as_me:2548: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2548: \"$ac_try\"") >&5 + { (eval echo "$as_me:2551: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2551: \$? = $ac_status" >&5 + echo "$as_me:2554: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_c_source=no else @@ -2569,7 +2572,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >conftest.$ac_ext <<_ACEOF -#line 2572 "configure" +#line 2575 "configure" #include "confdefs.h" #include int @@ -2584,16 +2587,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2587: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2590: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2590: \$? = $ac_status" >&5 + echo "$as_me:2593: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2593: \"$ac_try\"") >&5 + { (eval echo "$as_me:2596: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2596: \$? = $ac_status" >&5 + echo "$as_me:2599: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2604,15 +2607,15 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "${as_me:-configure}:2607: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me:-configure}:2610: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" -echo "${as_me:-configure}:2612: testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me:-configure}:2615: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 2615 "configure" +#line 2618 "configure" #include "confdefs.h" #include int @@ -2627,16 +2630,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2630: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2633: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2633: \$? = $ac_status" >&5 + echo "$as_me:2636: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2636: \"$ac_try\"") >&5 + { (eval echo "$as_me:2639: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2639: \$? = $ac_status" >&5 + echo "$as_me:2642: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2652,7 +2655,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2655: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:2658: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -2674,7 +2677,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -2715,7 +2718,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -2766,14 +2769,14 @@ solaris2.*) #(vi ;; *) -echo "$as_me:2769: checking if we should define _XOPEN_SOURCE" >&5 +echo "$as_me:2772: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2776 "configure" +#line 2779 "configure" #include "confdefs.h" #include @@ -2792,16 +2795,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2795: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2798: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2798: \$? = $ac_status" >&5 + echo "$as_me:2801: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2801: \"$ac_try\"") >&5 + { (eval echo "$as_me:2804: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2804: \$? = $ac_status" >&5 + echo "$as_me:2807: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else @@ -2810,7 +2813,7 @@ cat conftest.$ac_ext >&5 cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >conftest.$ac_ext <<_ACEOF -#line 2813 "configure" +#line 2816 "configure" #include "confdefs.h" #include @@ -2829,16 +2832,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2832: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2835: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2835: \$? = $ac_status" >&5 + echo "$as_me:2838: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2838: \"$ac_try\"") >&5 + { (eval echo "$as_me:2841: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2841: \$? = $ac_status" >&5 + echo "$as_me:2844: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else @@ -2853,7 +2856,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2856: result: $cf_cv_xopen_source" >&5 +echo "$as_me:2859: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -2883,7 +2886,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -2924,7 +2927,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -2961,16 +2964,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAG sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:2964: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:2967: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:2970: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:2973: testing if the symbol is already defined go no further ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 2973 "configure" +#line 2976 "configure" #include "confdefs.h" #include int @@ -2985,16 +2988,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2991: \$? = $ac_status" >&5 + echo "$as_me:2994: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2994: \"$ac_try\"") >&5 + { (eval echo "$as_me:2997: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2997: \$? = $ac_status" >&5 + echo "$as_me:3000: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_c_source=no else @@ -3015,7 +3018,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >conftest.$ac_ext <<_ACEOF -#line 3018 "configure" +#line 3021 "configure" #include "confdefs.h" #include int @@ -3030,16 +3033,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 6 14:57:26 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE83CCB; Mon, 6 Oct 2014 14:57:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 90EEC872; Mon, 6 Oct 2014 14:57:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s96EvQ1O028290; Mon, 6 Oct 2014 14:57:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96EvQfc028289; Mon, 6 Oct 2014 14:57:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410061457.s96EvQfc028289@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 6 Oct 2014 14:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272652 - vendor/byacc/20141005 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.18-1 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: Mon, 06 Oct 2014 14:57:26 -0000 Author: bapt Date: Mon Oct 6 14:57:26 2014 New Revision: 272652 URL: https://svnweb.freebsd.org/changeset/base/272652 Log: Tag import of byacc 20141005 Added: vendor/byacc/20141005/ - copied from r272651, vendor/byacc/dist/ From owner-svn-src-vendor@FreeBSD.ORG Wed Oct 8 20:41:57 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A71147AD; Wed, 8 Oct 2014 20:41:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 92038AA5; Wed, 8 Oct 2014 20:41:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s98Kfvvq001934; Wed, 8 Oct 2014 20:41:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98KfuGj001928; Wed, 8 Oct 2014 20:41:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410082041.s98KfuGj001928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 8 Oct 2014 20:41:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272767 - in vendor/byacc/dist: . package package/debian package/debian/source package/pkgsrc 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.18-1 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, 08 Oct 2014 20:41:57 -0000 Author: bapt Date: Wed Oct 8 20:41:56 2014 New Revision: 272767 URL: https://svnweb.freebsd.org/changeset/base/272767 Log: Import byacc 20140906 Modified: vendor/byacc/dist/CHANGES vendor/byacc/dist/MANIFEST vendor/byacc/dist/VERSION vendor/byacc/dist/configure vendor/byacc/dist/configure.in vendor/byacc/dist/main.c vendor/byacc/dist/package/byacc.spec vendor/byacc/dist/package/debian/changelog vendor/byacc/dist/package/debian/source/format vendor/byacc/dist/package/mingw-byacc.spec vendor/byacc/dist/package/pkgsrc/Makefile vendor/byacc/dist/reader.c Modified: vendor/byacc/dist/CHANGES ============================================================================== --- vendor/byacc/dist/CHANGES Wed Oct 8 20:25:21 2014 (r272766) +++ vendor/byacc/dist/CHANGES Wed Oct 8 20:41:56 2014 (r272767) @@ -1,3 +1,23 @@ +2014-10-06 Thomas E. Dickey + + * package/debian/source/format: + change to native format to work around regression in Debian packaging. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * configure: regen + + * main.c: + correct parameter for umask - for very old mkstemp's - and use type mode_t + to quiet compiler warning + + * configure.in: add configure check for mode_t + + * reader.c: + better fix for get_line, by ensuring there is enough space to null-terminate + its result (prompted by discussion with Craig Rodrigues). + 2014-10-05 Thomas E. Dickey * main.c: Modified: vendor/byacc/dist/MANIFEST ============================================================================== --- vendor/byacc/dist/MANIFEST Wed Oct 8 20:25:21 2014 (r272766) +++ vendor/byacc/dist/MANIFEST Wed Oct 8 20:41:56 2014 (r272767) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20141005, version t20141005 +MANIFEST for byacc-20141006, version t20141006 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: vendor/byacc/dist/VERSION ============================================================================== --- vendor/byacc/dist/VERSION Wed Oct 8 20:25:21 2014 (r272766) +++ vendor/byacc/dist/VERSION Wed Oct 8 20:41:56 2014 (r272767) @@ -1 +1 @@ -20141005 +20141006 Modified: vendor/byacc/dist/configure ============================================================================== --- vendor/byacc/dist/configure Wed Oct 8 20:25:21 2014 (r272766) +++ vendor/byacc/dist/configure Wed Oct 8 20:41:56 2014 (r272767) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.19 . +# From configure.in Revision: 1.20 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20121002. # @@ -106,6 +106,42 @@ SHELL=${CONFIG_SHELL-/bin/sh} : ${ac_max_here_lines=38} ac_unique_file="main.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" # Initialize some variables set by options. ac_init_help= @@ -854,7 +890,7 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:857: loading site script $ac_site_file" >&5 + { echo "$as_me:893: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 . "$ac_site_file" @@ -865,7 +901,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:868: loading cache $cache_file" >&5 + { echo "$as_me:904: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -873,7 +909,7 @@ echo "$as_me: loading cache $cache_file" esac fi else - { echo "$as_me:876: creating cache $cache_file" >&5 + { echo "$as_me:912: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -889,21 +925,21 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:892: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:928: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:896: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:932: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:902: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:938: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:904: former value: $ac_old_val" >&5 + { echo "$as_me:940: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:906: current value: $ac_new_val" >&5 + { echo "$as_me:942: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -922,9 +958,9 @@ echo "$as_me: current value: $ac_new_v fi done if $ac_cache_corrupted; then - { echo "$as_me:925: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:961: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:927: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:963: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -945,10 +981,10 @@ esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:948: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:984: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:951: \$? = $ac_status" >&5 + echo "$as_me:987: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_path_separator=';' else @@ -976,7 +1012,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:979: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:1015: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -986,11 +1022,11 @@ ac_configure="$SHELL $ac_aux_dir/configu # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:989: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:1025: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:993: checking build system type" >&5 +echo "$as_me:1029: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -999,23 +1035,23 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1002: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:1038: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:1006: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:1042: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1011: result: $ac_cv_build" >&5 +echo "$as_me:1047: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1018: checking host system type" >&5 +echo "$as_me:1054: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1024,12 +1060,12 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:1027: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1063: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1032: result: $ac_cv_host" >&5 +echo "$as_me:1068: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1037,7 +1073,7 @@ host_vendor=`echo $ac_cv_host | sed 's/^ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then - echo "$as_me:1040: checking target system type" >&5 + echo "$as_me:1076: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1046,12 +1082,12 @@ else test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:1049: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:1085: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1054: result: $ac_cv_target" >&5 +echo "$as_me:1090: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1083,13 +1119,13 @@ else fi test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$as_me:1086: result: Configuring for $cf_cv_system_name" >&5 +test -n "$cf_cv_system_name" && echo "$as_me:1122: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 if test ".$system_name" != ".$cf_cv_system_name" ; then - echo "$as_me:1090: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "$as_me:1126: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 - { { echo "$as_me:1092: error: \"Please remove config.cache and try again.\"" >&5 + { { echo "$as_me:1128: error: \"Please remove config.cache and try again.\"" >&5 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1116,7 +1152,7 @@ ac_main_return=return if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1119: checking for $ac_word" >&5 +echo "$as_me:1155: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1131,7 +1167,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1134: found $ac_dir/$ac_word" >&5 +echo "$as_me:1170: found $ac_dir/$ac_word" >&5 break done @@ -1139,10 +1175,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1142: result: $CC" >&5 + echo "$as_me:1178: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1145: result: no" >&5 + echo "$as_me:1181: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1151,7 +1187,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1154: checking for $ac_word" >&5 +echo "$as_me:1190: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1166,7 +1202,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1169: found $ac_dir/$ac_word" >&5 +echo "$as_me:1205: found $ac_dir/$ac_word" >&5 break done @@ -1174,10 +1210,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1177: result: $ac_ct_CC" >&5 + echo "$as_me:1213: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1180: result: no" >&5 + echo "$as_me:1216: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1190,7 +1226,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1193: checking for $ac_word" >&5 +echo "$as_me:1229: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1205,7 +1241,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1208: found $ac_dir/$ac_word" >&5 +echo "$as_me:1244: found $ac_dir/$ac_word" >&5 break done @@ -1213,10 +1249,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1216: result: $CC" >&5 + echo "$as_me:1252: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1219: result: no" >&5 + echo "$as_me:1255: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1225,7 +1261,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1228: checking for $ac_word" >&5 +echo "$as_me:1264: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1240,7 +1276,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1243: found $ac_dir/$ac_word" >&5 +echo "$as_me:1279: found $ac_dir/$ac_word" >&5 break done @@ -1248,10 +1284,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1251: result: $ac_ct_CC" >&5 + echo "$as_me:1287: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1254: result: no" >&5 + echo "$as_me:1290: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1264,7 +1300,7 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1267: checking for $ac_word" >&5 +echo "$as_me:1303: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1284,7 +1320,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/c continue fi ac_cv_prog_CC="cc" -echo "$as_me:1287: found $ac_dir/$ac_word" >&5 +echo "$as_me:1323: found $ac_dir/$ac_word" >&5 break done @@ -1306,10 +1342,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1309: result: $CC" >&5 + echo "$as_me:1345: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1312: result: no" >&5 + echo "$as_me:1348: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1320,7 +1356,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1323: checking for $ac_word" >&5 +echo "$as_me:1359: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1335,7 +1371,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1338: found $ac_dir/$ac_word" >&5 +echo "$as_me:1374: found $ac_dir/$ac_word" >&5 break done @@ -1343,10 +1379,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1346: result: $CC" >&5 + echo "$as_me:1382: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1349: result: no" >&5 + echo "$as_me:1385: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1359,7 +1395,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1362: checking for $ac_word" >&5 +echo "$as_me:1398: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1374,7 +1410,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1377: found $ac_dir/$ac_word" >&5 +echo "$as_me:1413: found $ac_dir/$ac_word" >&5 break done @@ -1382,10 +1418,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1385: result: $ac_ct_CC" >&5 + echo "$as_me:1421: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1388: result: no" >&5 + echo "$as_me:1424: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1397,32 +1433,32 @@ fi fi -test -z "$CC" && { { echo "$as_me:1400: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1436: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1405:" \ +echo "$as_me:1441:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1408: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:1444: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1411: \$? = $ac_status" >&5 + echo "$as_me:1447: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1413: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:1449: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1416: \$? = $ac_status" >&5 + echo "$as_me:1452: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1418: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:1454: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1421: \$? = $ac_status" >&5 + echo "$as_me:1457: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1425 "configure" +#line 1461 "configure" #include "confdefs.h" int @@ -1438,13 +1474,13 @@ ac_clean_files="$ac_clean_files a.out a. # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1441: checking for C compiler default output" >&5 +echo "$as_me:1477: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1444: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1480: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1447: \$? = $ac_status" >&5 + echo "$as_me:1483: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1467,34 +1503,34 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1470: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:1506: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1476: result: $ac_file" >&5 +echo "$as_me:1512: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1481: checking whether the C compiler works" >&5 +echo "$as_me:1517: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1487: \"$ac_try\"") >&5 + { (eval echo "$as_me:1523: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1490: \$? = $ac_status" >&5 + echo "$as_me:1526: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1497: error: cannot run C compiled programs. + { { echo "$as_me:1533: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1502,24 +1538,24 @@ If you meant to cross compile, use \`--h fi fi fi -echo "$as_me:1505: result: yes" >&5 +echo "$as_me:1541: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1512: checking whether we are cross compiling" >&5 +echo "$as_me:1548: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1514: result: $cross_compiling" >&5 +echo "$as_me:1550: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1517: checking for executable suffix" >&5 +echo "$as_me:1553: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1519: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1555: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1522: \$? = $ac_status" >&5 + echo "$as_me:1558: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1535,25 +1571,25 @@ for ac_file in `(ls conftest.exe; ls con esac done else - { { echo "$as_me:1538: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1574: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1544: result: $ac_cv_exeext" >&5 +echo "$as_me:1580: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1550: checking for object suffix" >&5 +echo "$as_me:1586: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1556 "configure" +#line 1592 "configure" #include "confdefs.h" int @@ -1565,10 +1601,10 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1568: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1604: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1571: \$? = $ac_status" >&5 + echo "$as_me:1607: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1580,24 +1616,24 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1583: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1619: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1590: result: $ac_cv_objext" >&5 +echo "$as_me:1626: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1594: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:1630: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1600 "configure" +#line 1636 "configure" #include "confdefs.h" int @@ -1612,16 +1648,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1615: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1651: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1618: \$? = $ac_status" >&5 + echo "$as_me:1654: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1621: \"$ac_try\"") >&5 + { (eval echo "$as_me:1657: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1624: \$? = $ac_status" >&5 + echo "$as_me:1660: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1633,19 +1669,19 @@ rm -f conftest.$ac_objext conftest.$ac_e ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1636: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:1672: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1642: checking whether $CC accepts -g" >&5 +echo "$as_me:1678: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1648 "configure" +#line 1684 "configure" #include "confdefs.h" int @@ -1657,16 +1693,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1660: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1663: \$? = $ac_status" >&5 + echo "$as_me:1699: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1666: \"$ac_try\"") >&5 + { (eval echo "$as_me:1702: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1669: \$? = $ac_status" >&5 + echo "$as_me:1705: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1676,7 +1712,7 @@ ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1679: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:1715: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1703,16 +1739,16 @@ cat >conftest.$ac_ext <<_ACEOF #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1706: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1742: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1709: \$? = $ac_status" >&5 + echo "$as_me:1745: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1712: \"$ac_try\"") >&5 + { (eval echo "$as_me:1748: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1715: \$? = $ac_status" >&5 + echo "$as_me:1751: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1724,7 +1760,7 @@ if { (eval echo "$as_me:1706: \"$ac_comp 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1727 "configure" +#line 1763 "configure" #include "confdefs.h" #include $ac_declaration @@ -1737,16 +1773,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1740: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1776: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1743: \$? = $ac_status" >&5 + echo "$as_me:1779: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1746: \"$ac_try\"") >&5 + { (eval echo "$as_me:1782: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1749: \$? = $ac_status" >&5 + echo "$as_me:1785: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1756,7 +1792,7 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1759 "configure" +#line 1795 "configure" #include "confdefs.h" $ac_declaration int @@ -1768,16 +1804,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1771: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1807: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1774: \$? = $ac_status" >&5 + echo "$as_me:1810: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1777: \"$ac_try\"") >&5 + { (eval echo "$as_me:1813: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1780: \$? = $ac_status" >&5 + echo "$as_me:1816: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1807,15 +1843,15 @@ ac_main_return=return GCC_VERSION=none if test "$GCC" = yes ; then - echo "$as_me:1810: checking version of $CC" >&5 + echo "$as_me:1846: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown - echo "$as_me:1814: result: $GCC_VERSION" >&5 + echo "$as_me:1850: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi -echo "$as_me:1818: checking for $CC option to accept ANSI C" >&5 +echo "$as_me:1854: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1823,7 +1859,7 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line 1826 "configure" +#line 1862 "configure" #include "confdefs.h" #include #include @@ -1872,16 +1908,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -A do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:1875: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1878: \$? = $ac_status" >&5 + echo "$as_me:1914: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1881: \"$ac_try\"") >&5 + { (eval echo "$as_me:1917: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1884: \$? = $ac_status" >&5 + echo "$as_me:1920: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break @@ -1898,10 +1934,10 @@ fi case "x$ac_cv_prog_cc_stdc" in x|xno) - echo "$as_me:1901: result: none needed" >&5 + echo "$as_me:1937: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) - echo "$as_me:1904: result: $ac_cv_prog_cc_stdc" >&5 + echo "$as_me:1940: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac @@ -1909,13 +1945,13 @@ esac # This should have been defined by AC_PROG_CC : ${CC:=cc} -echo "$as_me:1912: checking \$CC variable" >&5 +echo "$as_me:1948: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in #(vi *[\ \ ]-[IUD]*) - echo "$as_me:1916: result: broken" >&5 + echo "$as_me:1952: result: broken" >&5 echo "${ECHO_T}broken" >&6 - { echo "$as_me:1918: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 + { echo "$as_me:1954: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'` @@ -2001,12 +2037,12 @@ fi ;; *) - echo "$as_me:2004: result: ok" >&5 + echo "$as_me:2040: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2009: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:2045: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then @@ -2026,11 +2062,11 @@ fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:2029: result: yes" >&5 + echo "$as_me:2065: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:2033: result: no" >&5 + echo "$as_me:2069: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -2047,7 +2083,7 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2050: checking for a BSD compatible install" >&5 +echo "$as_me:2086: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2096,7 +2132,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2099: result: $INSTALL" >&5 +echo "$as_me:2135: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2107,7 +2143,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:2110: checking if filesystem supports mixed-case filenames" >&5 +echo "$as_me:2146: checking if filesystem supports mixed-case filenames" >&5 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6 if test "${cf_cv_mixedcase+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2134,7 +2170,7 @@ else fi fi -echo "$as_me:2137: result: $cf_cv_mixedcase" >&5 +echo "$as_me:2173: result: $cf_cv_mixedcase" >&5 echo "${ECHO_T}$cf_cv_mixedcase" >&6 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF @@ -2145,7 +2181,7 @@ for ac_prog in exctags ctags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Wed Oct 8 20:44:06 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02B3D984; Wed, 8 Oct 2014 20:44:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C9EC9AC9; Wed, 8 Oct 2014 20:44:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s98Ki5G6002262; Wed, 8 Oct 2014 20:44:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98Ki5NO002261; Wed, 8 Oct 2014 20:44:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410082044.s98Ki5NO002261@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 8 Oct 2014 20:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272768 - vendor/byacc/20141006 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.18-1 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, 08 Oct 2014 20:44:06 -0000 Author: bapt Date: Wed Oct 8 20:44:05 2014 New Revision: 272768 URL: https://svnweb.freebsd.org/changeset/base/272768 Log: Tag import of byacc 20141006 Added: vendor/byacc/20141006/ - copied from r272767, vendor/byacc/dist/ From owner-svn-src-vendor@FreeBSD.ORG Thu Oct 9 05:48:07 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 329E3E4B; Thu, 9 Oct 2014 05:48:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1E6827D5; Thu, 9 Oct 2014 05:48:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s995m6df062602; Thu, 9 Oct 2014 05:48:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s995m6q1062601; Thu, 9 Oct 2014 05:48:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410090548.s995m6q1062601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 9 Oct 2014 05:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272802 - vendor/illumos/dist/cmd/zdb 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.18-1 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, 09 Oct 2014 05:48:07 -0000 Author: delphij Date: Thu Oct 9 05:48:06 2014 New Revision: 272802 URL: https://svnweb.freebsd.org/changeset/base/272802 Log: 5169 zdb should limit its ARC size 5170 zdb -c should create more scrub i/os by default 5171 zdb should print status while loading metaslabs for leak detection Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Bayard Bell Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@06be98028b8a84e7f327188613dd09a708294d1a Modified: vendor/illumos/dist/cmd/zdb/zdb.c Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Thu Oct 9 05:42:07 2014 (r272801) +++ vendor/illumos/dist/cmd/zdb/zdb.c Thu Oct 9 05:48:06 2014 (r272802) @@ -76,8 +76,10 @@ #ifndef lint extern boolean_t zfs_recover; +extern uint64_t zfs_arc_max, zfs_arc_meta_limit; #else boolean_t zfs_recover; +uint64_t zfs_arc_max, zfs_arc_meta_limit; #endif const char cmdname[] = "zdb"; @@ -89,7 +91,7 @@ extern void dump_intent_log(zilog_t *); uint64_t *zopt_object = NULL; int zopt_objects = 0; libzfs_handle_t *g_zfs; -uint64_t max_inflight = 200; +uint64_t max_inflight = 1000; /* * These libumem hooks provide a reasonable set of defaults for the allocator's @@ -2353,7 +2355,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog zcb->zcb_readfails = 0; - if (dump_opt['b'] < 5 && isatty(STDERR_FILENO) && + if (dump_opt['b'] < 5 && gethrtime() > zcb->zcb_lastprint + NANOSEC) { uint64_t now = gethrtime(); char buf[10]; @@ -2438,9 +2440,9 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) if (!dump_opt['L']) { vdev_t *rvd = spa->spa_root_vdev; - for (int c = 0; c < rvd->vdev_children; c++) { + for (uint64_t c = 0; c < rvd->vdev_children; c++) { vdev_t *vd = rvd->vdev_child[c]; - for (int m = 0; m < vd->vdev_ms_count; m++) { + for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; mutex_enter(&msp->ms_lock); metaslab_unload(msp); @@ -2453,6 +2455,15 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) * interfaces. */ if (msp->ms_sm != NULL) { + (void) fprintf(stderr, + "\rloading space map for " + "vdev %llu of %llu, " + "metaslab %llu of %llu ...", + (longlong_t)c, + (longlong_t)rvd->vdev_children, + (longlong_t)m, + (longlong_t)vd->vdev_ms_count); + msp->ms_ops = &zdb_metaslab_ops; VERIFY0(space_map_load(msp->ms_sm, msp->ms_tree, SM_ALLOC)); @@ -2461,6 +2472,7 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) mutex_exit(&msp->ms_lock); } } + (void) fprintf(stderr, "\n"); } spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); @@ -3460,6 +3472,12 @@ main(int argc, char **argv) usage(); } + /* + * ZDB does not typically re-read blocks; therefore limit the ARC + * to 256 MB, which can be used entirely for metadata. + */ + zfs_arc_max = zfs_arc_meta_limit = 256 * 1024 * 1024; + kernel_init(FREAD); g_zfs = libzfs_init(); ASSERT(g_zfs != NULL); From owner-svn-src-vendor@FreeBSD.ORG Thu Oct 9 05:50:25 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C0B5F8A; Thu, 9 Oct 2014 05:50:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 173067E0; Thu, 9 Oct 2014 05:50:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s995oOB0062974; Thu, 9 Oct 2014 05:50:24 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s995oOuP062966; Thu, 9 Oct 2014 05:50:24 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410090550.s995oOuP062966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 9 Oct 2014 05:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272803 - 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.18-1 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, 09 Oct 2014 05:50:25 -0000 Author: delphij Date: Thu Oct 9 05:50:23 2014 New Revision: 272803 URL: https://svnweb.freebsd.org/changeset/base/272803 Log: 5175 implement dmu_read_uio_dbuf() to improve cached read performance Reviewed by: Adam Leventhal Reviewed by: Alex Reece Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@f8554bb92be6be88a684bea58293b41a6168a538 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Thu Oct 9 05:48:06 2014 (r272802) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Thu Oct 9 05:50:23 2014 (r272803) @@ -1015,8 +1015,8 @@ xuio_stat_wbuf_nocopy() } #ifdef _KERNEL -int -dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size) +static int +dmu_read_uio_dnode(dnode_t *dn, uio_t *uio, uint64_t size) { dmu_buf_t **dbp; int numbufs, i, err; @@ -1026,8 +1026,8 @@ dmu_read_uio(objset_t *os, uint64_t obje * NB: we could do this block-at-a-time, but it's nice * to be reading in parallel. */ - err = dmu_buf_hold_array(os, object, uio->uio_loffset, size, TRUE, FTAG, - &numbufs, &dbp); + err = dmu_buf_hold_array_by_dnode(dn, uio->uio_loffset, size, + TRUE, FTAG, &numbufs, &dbp, 0); if (err) return (err); @@ -1072,6 +1072,58 @@ dmu_read_uio(objset_t *os, uint64_t obje return (err); } +/* + * Read 'size' bytes into the uio buffer. + * From object zdb->db_object. + * Starting at offset uio->uio_loffset. + * + * If the caller already has a dbuf in the target object + * (e.g. its bonus buffer), this routine is faster than dmu_read_uio(), + * because we don't have to find the dnode_t for the object. + */ +int +dmu_read_uio_dbuf(dmu_buf_t *zdb, uio_t *uio, uint64_t size) +{ + dmu_buf_impl_t *db = (dmu_buf_impl_t *)zdb; + dnode_t *dn; + int err; + + if (size == 0) + return (0); + + DB_DNODE_ENTER(db); + dn = DB_DNODE(db); + err = dmu_read_uio_dnode(dn, uio, size); + DB_DNODE_EXIT(db); + + return (err); +} + +/* + * Read 'size' bytes into the uio buffer. + * From the specified object + * Starting at offset uio->uio_loffset. + */ +int +dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size) +{ + dnode_t *dn; + int err; + + if (size == 0) + return (0); + + err = dnode_hold(os, object, FTAG, &dn); + if (err) + return (err); + + err = dmu_read_uio_dnode(dn, uio, size); + + dnode_rele(dn, FTAG); + + return (err); +} + static int dmu_write_uio_dnode(dnode_t *dn, uio_t *uio, uint64_t size, dmu_tx_t *tx) { @@ -1124,6 +1176,15 @@ dmu_write_uio_dnode(dnode_t *dn, uio_t * return (err); } +/* + * Write 'size' bytes from the uio buffer. + * To object zdb->db_object. + * Starting at offset uio->uio_loffset. + * + * If the caller already has a dbuf in the target object + * (e.g. its bonus buffer), this routine is faster than dmu_write_uio(), + * because we don't have to find the dnode_t for the object. + */ int dmu_write_uio_dbuf(dmu_buf_t *zdb, uio_t *uio, uint64_t size, dmu_tx_t *tx) @@ -1143,6 +1204,11 @@ dmu_write_uio_dbuf(dmu_buf_t *zdb, uio_t return (err); } +/* + * Write 'size' bytes from the uio buffer. + * To the specified object. + * Starting at offset uio->uio_loffset. + */ int dmu_write_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size, dmu_tx_t *tx) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Thu Oct 9 05:48:06 2014 (r272802) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Thu Oct 9 05:50:23 2014 (r272803) @@ -614,6 +614,7 @@ void dmu_write(objset_t *os, uint64_t ob void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, dmu_tx_t *tx); int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size); +int dmu_read_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size); int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size, dmu_tx_t *tx); int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Thu Oct 9 05:48:06 2014 (r272802) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Thu Oct 9 05:50:23 2014 (r272803) @@ -406,7 +406,6 @@ static int mappedread(vnode_t *vp, int nbytes, uio_t *uio) { znode_t *zp = VTOZ(vp); - objset_t *os = zp->z_zfsvfs->z_os; int64_t start, off; int len = nbytes; int error = 0; @@ -425,7 +424,8 @@ mappedread(vnode_t *vp, int nbytes, uio_ zfs_unmap_page(pp, va); page_unlock(pp); } else { - error = dmu_read_uio(os, zp->z_id, uio, bytes); + error = dmu_read_uio_dbuf(sa_get_db(zp->z_sa_hdl), + uio, bytes); } len -= bytes; off = 0; @@ -460,7 +460,6 @@ zfs_read(vnode_t *vp, uio_t *uio, int io { znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; - objset_t *os; ssize_t n, nbytes; int error = 0; rl_t *rl; @@ -468,7 +467,6 @@ zfs_read(vnode_t *vp, uio_t *uio, int io ZFS_ENTER(zfsvfs); ZFS_VERIFY_ZP(zp); - os = zfsvfs->z_os; if (zp->z_pflags & ZFS_AV_QUARANTINED) { ZFS_EXIT(zfsvfs); @@ -558,10 +556,12 @@ zfs_read(vnode_t *vp, uio_t *uio, int io nbytes = MIN(n, zfs_read_chunk_size - P2PHASE(uio->uio_loffset, zfs_read_chunk_size)); - if (vn_has_cached_data(vp)) + if (vn_has_cached_data(vp)) { error = mappedread(vp, nbytes, uio); - else - error = dmu_read_uio(os, zp->z_id, uio, nbytes); + } else { + error = dmu_read_uio_dbuf(sa_get_db(zp->z_sa_hdl), + uio, nbytes); + } if (error) { /* convert checksum errors into IO errors */ if (error == ECKSUM) From owner-svn-src-vendor@FreeBSD.ORG Thu Oct 9 05:53:06 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8535C157; Thu, 9 Oct 2014 05:53:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7020C880; Thu, 9 Oct 2014 05:53:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s995r6Ap066654; Thu, 9 Oct 2014 05:53:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s995r5Di066650; Thu, 9 Oct 2014 05:53:05 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410090553.s995r5Di066650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 9 Oct 2014 05:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272804 - 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.18-1 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, 09 Oct 2014 05:53:06 -0000 Author: delphij Date: Thu Oct 9 05:53:04 2014 New Revision: 272804 URL: https://svnweb.freebsd.org/changeset/base/272804 Log: 3693 restore_object uses at least two transactions to restore an object Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Andriy Gapon Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@e77d42eaa49fe55bfae1e0e0065c6e99affc001b Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_object.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Thu Oct 9 05:50:23 2014 (r272803) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Thu Oct 9 05:53:04 2014 (r272804) @@ -1848,6 +1848,7 @@ dmu_object_info_from_dnode(dnode_t *dn, doi->doi_indirection = dn->dn_nlevels; doi->doi_checksum = dn->dn_checksum; doi->doi_compress = dn->dn_compress; + doi->doi_nblkptr = dn->dn_nblkptr; doi->doi_physical_blocks_512 = (DN_USED_BYTES(dnp) + 256) >> 9; doi->doi_max_offset = (dn->dn_maxblkid + 1) * dn->dn_datablksz; doi->doi_fill_count = 0; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_object.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_object.c Thu Oct 9 05:50:23 2014 (r272803) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_object.c Thu Oct 9 05:53:04 2014 (r272804) @@ -20,7 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright 2014 HybridCluster. All rights reserved. */ #include @@ -107,11 +108,9 @@ dmu_object_claim(objset_t *os, uint64_t int dmu_object_reclaim(objset_t *os, uint64_t object, dmu_object_type_t ot, - int blocksize, dmu_object_type_t bonustype, int bonuslen) + int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) { dnode_t *dn; - dmu_tx_t *tx; - int nblkptr; int err; if (object == DMU_META_DNODE_OBJECT) @@ -122,44 +121,9 @@ dmu_object_reclaim(objset_t *os, uint64_ if (err) return (err); - if (dn->dn_type == ot && dn->dn_datablksz == blocksize && - dn->dn_bonustype == bonustype && dn->dn_bonuslen == bonuslen) { - /* nothing is changing, this is a noop */ - dnode_rele(dn, FTAG); - return (0); - } - - if (bonustype == DMU_OT_SA) { - nblkptr = 1; - } else { - nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) >> SPA_BLKPTRSHIFT); - } - - /* - * If we are losing blkptrs or changing the block size this must - * be a new file instance. We must clear out the previous file - * contents before we can change this type of metadata in the dnode. - */ - if (dn->dn_nblkptr > nblkptr || dn->dn_datablksz != blocksize) { - err = dmu_free_long_range(os, object, 0, DMU_OBJECT_END); - if (err) - goto out; - } - - tx = dmu_tx_create(os); - dmu_tx_hold_bonus(tx, object); - err = dmu_tx_assign(tx, TXG_WAIT); - if (err) { - dmu_tx_abort(tx); - goto out; - } - dnode_reallocate(dn, ot, blocksize, bonustype, bonuslen, tx); - dmu_tx_commit(tx); -out: dnode_rele(dn, FTAG); - return (err); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Thu Oct 9 05:50:23 2014 (r272803) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Thu Oct 9 05:53:04 2014 (r272804) @@ -23,6 +23,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. + * Copyright 2014 HybridCluster. All rights reserved. */ #include @@ -1333,12 +1334,25 @@ backup_byteswap(dmu_replay_record_t *drr #undef DO32 } +static inline uint8_t +deduce_nblkptr(dmu_object_type_t bonus_type, uint64_t bonus_size) +{ + if (bonus_type == DMU_OT_SA) { + return (1); + } else { + return (1 + + ((DN_MAX_BONUSLEN - bonus_size) >> SPA_BLKPTRSHIFT)); + } +} + static int restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro) { - int err; + dmu_object_info_t doi; dmu_tx_t *tx; void *data = NULL; + uint64_t object; + int err; if (drro->drr_type == DMU_OT_NONE || !DMU_OT_IS_VALID(drro->drr_type) || @@ -1352,10 +1366,11 @@ restore_object(struct restorearg *ra, ob return (SET_ERROR(EINVAL)); } - err = dmu_object_info(os, drro->drr_object, NULL); + err = dmu_object_info(os, drro->drr_object, &doi); if (err != 0 && err != ENOENT) return (SET_ERROR(EINVAL)); + object = err == 0 ? drro->drr_object : DMU_NEW_OBJECT; if (drro->drr_bonuslen) { data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8), NULL); @@ -1363,37 +1378,53 @@ restore_object(struct restorearg *ra, ob return (ra->err); } - if (err == ENOENT) { - /* currently free, want to be allocated */ - tx = dmu_tx_create(os); - dmu_tx_hold_bonus(tx, DMU_NEW_OBJECT); - err = dmu_tx_assign(tx, TXG_WAIT); - if (err != 0) { - dmu_tx_abort(tx); - return (err); + /* + * If we are losing blkptrs or changing the block size this must + * be a new file instance. We must clear out the previous file + * contents before we can change this type of metadata in the dnode. + */ + if (err == 0) { + int nblkptr; + + nblkptr = deduce_nblkptr(drro->drr_bonustype, + drro->drr_bonuslen); + + if (drro->drr_blksz != doi.doi_data_block_size || + nblkptr < doi.doi_nblkptr) { + err = dmu_free_long_range(os, drro->drr_object, + 0, DMU_OBJECT_END); + if (err != 0) + return (SET_ERROR(EINVAL)); } + } + + tx = dmu_tx_create(os); + dmu_tx_hold_bonus(tx, object); + err = dmu_tx_assign(tx, TXG_WAIT); + if (err != 0) { + dmu_tx_abort(tx); + return (err); + } + + if (object == DMU_NEW_OBJECT) { + /* currently free, want to be allocated */ err = dmu_object_claim(os, drro->drr_object, drro->drr_type, drro->drr_blksz, drro->drr_bonustype, drro->drr_bonuslen, tx); - dmu_tx_commit(tx); - } else { - /* currently allocated, want to be allocated */ + } else if (drro->drr_type != doi.doi_type || + drro->drr_blksz != doi.doi_data_block_size || + drro->drr_bonustype != doi.doi_bonus_type || + drro->drr_bonuslen != doi.doi_bonus_size) { + /* currently allocated, but with different properties */ err = dmu_object_reclaim(os, drro->drr_object, drro->drr_type, drro->drr_blksz, - drro->drr_bonustype, drro->drr_bonuslen); + drro->drr_bonustype, drro->drr_bonuslen, tx); } if (err != 0) { + dmu_tx_commit(tx); return (SET_ERROR(EINVAL)); } - tx = dmu_tx_create(os); - dmu_tx_hold_bonus(tx, drro->drr_object); - err = dmu_tx_assign(tx, TXG_WAIT); - if (err != 0) { - dmu_tx_abort(tx); - return (err); - } - dmu_object_set_checksum(os, drro->drr_object, drro->drr_checksumtype, tx); dmu_object_set_compress(os, drro->drr_object, drro->drr_compress, tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Thu Oct 9 05:50:23 2014 (r272803) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Thu Oct 9 05:53:04 2014 (r272804) @@ -25,6 +25,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright 2013 DEY Storage Systems, Inc. + * Copyright 2014 HybridCluster. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -339,7 +340,7 @@ uint64_t dmu_object_alloc(objset_t *os, int dmu_object_claim(objset_t *os, uint64_t object, dmu_object_type_t ot, int blocksize, dmu_object_type_t bonus_type, int bonus_len, dmu_tx_t *tx); int dmu_object_reclaim(objset_t *os, uint64_t object, dmu_object_type_t ot, - int blocksize, dmu_object_type_t bonustype, int bonuslen); + int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *txp); /* * Free an object from this objset. @@ -653,7 +654,8 @@ typedef struct dmu_object_info { uint8_t doi_indirection; /* 2 = dnode->indirect->data */ uint8_t doi_checksum; uint8_t doi_compress; - uint8_t doi_pad[5]; + uint8_t doi_nblkptr; + uint8_t doi_pad[4]; uint64_t doi_physical_blocks_512; /* data + metadata, 512b blks */ uint64_t doi_max_offset; uint64_t doi_fill_count; /* number of non-empty blocks */ From owner-svn-src-vendor@FreeBSD.ORG Thu Oct 9 23:11:36 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A70AC582; Thu, 9 Oct 2014 23:11:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 919D4ABA; Thu, 9 Oct 2014 23:11:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s99NBa50067094; Thu, 9 Oct 2014 23:11:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NBaZ7067093; Thu, 9 Oct 2014 23:11:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410092311.s99NBaZ7067093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 9 Oct 2014 23:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272851 - vendor/illumos/dist/man/man4 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.18-1 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, 09 Oct 2014 23:11:36 -0000 Author: markj Date: Thu Oct 9 23:11:36 2014 New Revision: 272851 URL: https://svnweb.freebsd.org/changeset/base/272851 Log: 5202 want ctf(4) Reviewed by: Keith M Wesolowski Reviewed by: Jerry Jelinek Reviewed by: Garrett D'Amore Approved by: Dan McDonald Author: Robert Mustacchi illumos/illumos-gate@fe2e029eea29fd49d0d9058dbd5b79a252667e6b Added: vendor/illumos/dist/man/man4/ vendor/illumos/dist/man/man4/ctf.4 (contents, props changed) Added: vendor/illumos/dist/man/man4/ctf.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/man/man4/ctf.4 Thu Oct 9 23:11:36 2014 (r272851) @@ -0,0 +1,1140 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright (c) 2014 Joyent, Inc. +.\" +.Dd Sep 26, 2014 +.Dt CTF 4 +.Os +.Sh NAME +.Nm ctf +.Nd Compact C Type Format +.Sh SYNOPSIS +.In sys/ctf.h +.Sh DESCRIPTION +.Nm +is designed to be a compact representation of the C programming +language's type information focused on serving the needs of dynamic +tracing, debuggers, and other in-situ and post-mortem introspection +tools. +.Nm +data is generally included in +.Sy ELF +objects and is tagged as +.Sy SHT_PROGBITS +to ensure that the data is accessible in a running process and in subsequent +core dumps, if generated. +.Lp +The +.Nm +data contained in each file has information about the layout and +sizes of C types, including intrinsic types, enumerations, structures, +typedefs, and unions, that are used by the corresponding +.Sy ELF +object. The +.Nm +data may also include information about the types of global objects and +the return type and arguments of functions in the symbol table. +.Lp +Because a +.Nm +file is often embedded inside a file, rather than being a standalone +file itself, it may also be referred to as a +.Nm +.Sy container . +.Lp +On illumos systems, +.Nm +data is consumed by multiple programs. It can be used by the modular +debugger, +.Xr mdb 1 , +as well as by +.Xr dtrace 1M . +Programmatic access to +.Nm +data can be obtained through +.Xr libctf 3LIB . +.Lp +The +.Nm +file format is broken down into seven different sections. The first +section is the +.Sy preamble +and +.Sy header , +which describes the version of the +.Nm +file, links it has to other +.Nm +files, and the sizes of the other sections. The next section is the +.Sy label +section, +which provides a way of identifying similar groups of +.Nm +data across multiple files. This is followed by the +.Sy object +information section, which describes the type of global +symbols. The subsequent section is the +.Sy function +information section, which describes the return +types and arguments of functions. The next section is the +.Sy type +information section, which describes +the format and layout of the C types themselves, and finally the last +section is the +.Sy string +section, which contains the names of types, enumerations, members, and +labels. +.Lp +While strictly speaking, only the +.Sy preamble +and +.Sy header +are required, to be actually useful, both the type and string +sections are necessary. +.Lp +A +.Nm +file may contain all of the type information that it requires, or it +may optionally refer to another +.Nm +file which holds the remaining types. When a +.Nm +file refers to another file, it is called the +.Sy child +and the file it refers to is called the +.Sy parent . +A given file may only refer to one parent. This process is called +.Em uniquification +because it ensures each child only has type information that is +unique to it. A common example of this is that most kernel modules in +illumos are uniquified against the kernel module +.Sy genunix +and the type information that comes from the +.Sy IP +module. This means that a module only has types that are unique to +itself and the most common types in the kernel are not duplicated. +.Sh FILE FORMAT +This documents version +.Em two +of the +.Nm +file format. All applications and tools currently produce and operate on +this version. +.Lp +The file format can be summarized with the following image, the +following sections will cover this in more detail. +.Bd -literal + + +-------------+ 0t0 ++--------| Preamble | +| +-------------+ 0t4 +|+-------| Header | +|| +-------------+ 0t36 + cth_lbloff +||+------| Labels | +||| +-------------+ 0t36 + cth_objtoff +|||+-----| Objects | +|||| +-------------+ 0t36 + cth_funcoff +||||+----| Functions | +||||| +-------------+ 0t36 + cth_typeoff +|||||+---| Types | +|||||| +-------------+ 0t36 + cth_stroff +||||||+--| Strings | +||||||| +-------------+ 0t36 + cth_stroff + cth_strlen +||||||| +||||||| +||||||| +||||||| +-- magic - vers flags +||||||| | | | | +||||||| +------+------+------+------+ ++---------| 0xcf | 0xf1 | 0x02 | 0x00 | + |||||| +------+------+------+------+ + |||||| 0 1 2 3 4 + |||||| + |||||| + parent label + objects + |||||| | + parent name | + functions + strings + |||||| | | + label | | + types | + strlen + |||||| | | | | | | | | + |||||| +------+------+------+------+------+-------+-------+-------+ + +--------| 0x00 | 0x00 | 0x00 | 0x08 | 0x36 | 0x110 | 0x5f4 | 0x611 | + ||||| +------+------+------+------+------+-------+-------+-------+ + ||||| 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 + ||||| + ||||| + Label name + ||||| | + Label type + ||||| | | + Next label + ||||| | | | + ||||| +-------+------+-----+ + +-----------| 0x01 | 0x42 | ... | + |||| +-------+------+-----+ + |||| cth_lbloff +0x4 +0x8 cth_objtoff + |||| + |||| + |||| Symidx 0t15 0t43 0t44 + |||| +------+------+------+-----+ + +----------| 0x00 | 0x42 | 0x36 | ... | + ||| +------+------+------+-----+ + ||| cth_objtoff +0x2 +0x4 +0x6 cth_funcoff + ||| + ||| + CTF_TYPE_INFO + CTF_TYPE_INFO + ||| | + Return type | + ||| | | + arg0 | + ||| +--------+------+------+-----+ + +---------| 0x2c10 | 0x08 | 0x0c | ... | + || +--------+------+------+-----+ + || cth_funcff +0x2 +0x4 +0x6 cth_typeoff + || + || + ctf_stype_t for type 1 + || | integer + integer encoding + || | | + ctf_stype_t for type 2 + || | | | + || +--------------------+-----------+-----+ + +--------| 0x19 * 0xc01 * 0x0 | 0x1000000 | ... | + | +--------------------+-----------+-----+ + | cth_typeoff +0x08 +0x0c cth_stroff + | + | +--- str 0 + | | +--- str 1 + str 2 + | | | | + | v v v + | +----+---+---+---+----+---+---+---+---+---+----+ + +---| \\0 | i | n | t | \\0 | f | o | o | _ | t | \\0 | + +----+---+---+---+----+---+---+---+---+---+----+ + 0 1 2 3 4 5 6 7 8 9 10 11 +.Ed +.Lp +Every +.Nm +file begins with a +.Sy preamble , +followed by a +.Sy header . +The +.Sy preamble +is defined as follows: +.Bd -literal +typedef struct ctf_preamble { + ushort_t ctp_magic; /* magic number (CTF_MAGIC) */ + uchar_t ctp_version; /* data format version number (CTF_VERSION) */ + uchar_t ctp_flags; /* flags (see below) */ +} ctf_preamble_t; +.Ed +.Pp +The +.Sy preamble +is four bytes long and must be four byte aligned. +This +.Sy preamble +defines the version of the +.Nm +file which defines the format of the rest of the header. While the +header may change in subsequent versions, the preamble will not change +across versions, though the interpretation of its flags may change from +version to version. The +.Em ctp_magic +member defines the magic number for the +.Nm +file format. This must always be +.Li 0xcff1 . +If another value is encountered, then the file should not be treated as +a +.Nm +file. The +.Em ctp_version +member defines the version of the +.Nm +file. The current version is +.Li 2 . +It is possible to encounter an unsupported version. In that case, +software should not try to parse the format, as it may have changed. +Finally, the +.Em ctp_flags +member describes aspects of the file which modify its interpretation. +The following flags are currently defined: +.Bd -literal +#define CTF_F_COMPRESS 0x01 +.Ed +.Pp +The flag +.Sy CTF_F_COMPRESS +indicates that the body of the +.Nm +file, all the data following the +.Sy header , +has been compressed through the +.Sy zlib +library and its +.Sy deflate +algorithm. If this flag is not present, then the body has not been +compressed and no special action is needed to interpret it. All offsets +into the data as described by +.Sy header , +always refer to the +.Sy uncompressed +data. +.Lp +In version two of the +.Nm +file format, the +.Sy header +denotes whether whether or not this +.Nm +file is the child of another +.Nm +file and also indicates the size of the remaining sections. The +structure for the +.Sy header , +logically contains a copy of the +.Sy preamble +and the two have a combined size of 36 bytes. +.Bd -literal +typedef struct ctf_header { + ctf_preamble_t cth_preamble; + uint_t cth_parlabel; /* ref to name of parent lbl uniq'd against */ + uint_t cth_parname; /* ref to basename of parent */ + uint_t cth_lbloff; /* offset of label section */ + uint_t cth_objtoff; /* offset of object section */ + uint_t cth_funcoff; /* offset of function section */ + uint_t cth_typeoff; /* offset of type section */ + uint_t cth_stroff; /* offset of string section */ + uint_t cth_strlen; /* length of string section in bytes */ +} ctf_header_t; +.Ed +.Pp +After the +.Sy preamble , +the next two members +.Em cth_parlablel +and +.Em cth_parname , +are used to identify the parent. The value of both members are offsets +into the +.Sy string +section which point to the start of a null-terminated string. For more +information on the encoding of strings, see the subsection on +.Sx String Identifiers . +If the value of either is zero, then there is no entry for that +member. If the member +.Em cth_parlabel +is set, then the +.Em ctf_parname +member must be set, otherwise it will not be possible to find the +parent. If +.Em ctf_parname +is set, it is not necessary to define +.Em cth_parlabel , +as the parent may not have a label. For more information on labels +and their interpretation, see +.Sx The Label Section . +.Lp +The remaining members (excepting +.Em cth_strlen ) +describe the beginning of the corresponding sections. These offsets are +relative to the end of the +.Sy header . +Therefore, something with an offset of 0 is at an offset of thirty-six +bytes relative to the start of the +.Nm +file. The difference between members +indicates the size of the section itself. Different offsets have +different alignment requirements. The start of the +.Em cth_objotoff +and +.Em cth_funcoff +must be two byte aligned, while the sections +.Em cth_lbloff +and +.Em cth_typeoff +must be four-byte aligned. The section +.Em cth_stroff +has no alignment requirements. To calculate the size of a given section, +excepting the +.Sy string +section, one should subtract the offset of the section from the following one. For +example, the size of the +.Sy types +section can be calculated by subtracting +.Em cth_stroff +from +.Em cth_typeoff . +.Lp +Finally, the member +.Em cth_strlen +describes the length of the string section itself. From it, you can also +calculate the size of the entire +.Nm +file by adding together the size of the +.Sy ctf_header_t , +the offset of the string section in +.Em cth_stroff , +and the size of the string section in +.Em cth_srlen . +.Ss Type Identifiers +Through the +.Nm ctf +data, types are referred to by identifiers. A given +.Nm +file supports up to 32767 (0x7fff) types. The first valid type identifier is 0x1. +When a given +.Nm +file is a child, indicated by a non-zero entry for the +.Sy header Ns 's +.Em cth_parname , +then the first valid type identifier is 0x8000 and the last is 0xffff. +In this case, type identifiers 0x1 through 0x7fff are references to the +parent. +.Lp +The type identifier zero is a sentinel value used to indicate that there +is no type information available or it is an unknown type. +.Lp +Throughout the file format, the identifier is stored in different sized +values; however, the minimum size to represent a given identifier is a +.Sy uint16_t . +Other consumers of +.Nm +information may use larger or opaque identifiers. +.Ss String Identifiers +String identifiers are always encoded as four byte unsigned integers +which are an offset into a string table. The +.Nm +format supports two different string tables which have an identifier of +zero or one. This identifier is stored in the high-order bit of the +unsigned four byte offset. Therefore, the maximum supported offset into +one of these tables is 0x7ffffffff. +.Lp +Table identifier zero, always refers to the +.Sy string +section in the CTF file itself. String table identifier one refers to an +external string table which is the ELF string table for the ELF symbol +table associated with the +.Nm +container. +.Ss Type Encoding +Every +.Nm +type begins with metadata encoded into a +.Sy uint16_t . +This encoded information tells us three different pieces of information: +.Bl -bullet -offset indent -compact +.It +The kind of the type +.It +Whether this type is a root type or not +.It +The length of the variable data +.El +.Lp +The 16 bits that make up the encoding are broken down such that you have +five bits for the kind, one bit for indicating whether or not it is a +root type, and 10 bits for the variable length. This is laid out as +follows: +.Bd -literal -offset indent ++--------------------+ +| kind | root | vlen | ++--------------------+ +15 11 10 9 0 +.Ed +.Lp +The current version of the file format defines 14 different kinds. The +interpretation of these different kinds will be discussed in the section +.Sx The Type Section . +If a kind is encountered that is not listed below, then it is not a valid +.Nm +file. The kinds are defined as follows: +.Bd -literal -offset indent +#define CTF_K_UNKNOWN 0 +#define CTF_K_INTEGER 1 +#define CTF_K_FLOAT 2 +#define CTF_K_POINTER 3 +#define CTF_K_ARRAY 4 +#define CTF_K_FUNCTION 5 +#define CTF_K_STRUCT 6 +#define CTF_K_UNION 7 +#define CTF_K_ENUM 8 +#define CTF_K_FORWARD 9 +#define CTF_K_TYPEDEF 10 +#define CTF_K_VOLATILE 11 +#define CTF_K_CONST 12 +#define CTF_K_RESTRICT 13 +.Ed +.Lp +Programs directly reference many types; however, other types are referenced +indirectly because they are part of some other structure. These types that are +referenced directly and used are called +.Sy root +types. Other types may be used indirectly, for example, a program may reference +a structure directly, but not one of its members which has a type. That type is +not considered a +.Sy root +type. If a type is a +.Sy root +type, then it will have bit 10 set. +.Lp +The variable length section is specific to each kind and is discussed in the +section +.Sx The Type Section . +.Lp +The following macros are useful for constructing and deconstructing the encoded +type information: +.Bd -literal -offset indent + +#define CTF_MAX_VLEN 0x3ff +#define CTF_INFO_KIND(info) (((info) & 0xf800) >> 11) +#define CTF_INFO_ISROOT(info) (((info) & 0x0400) >> 10) +#define CTF_INFO_VLEN(info) (((info) & CTF_MAX_VLEN)) + +#define CTF_TYPE_INFO(kind, isroot, vlen) \\ + (((kind) << 11) | (((isroot) ? 1 : 0) << 10) | ((vlen) & CTF_MAX_VLEN)) +.Ed +.Ss The Label Section +When consuming +.Nm +data, it is often useful to know whether two different +.Nm +containers come from the same source base and version. For example, when +building illumos, there are many kernel modules that are built against a +single collection of source code. A label is encoded into the +.Nm +files that corresponds with the particular build. This ensures that if +files on the system were to become mixed up from multiple releases, that +they are not used together by tools, particularly when a child needs to +refer to a type in the parent. Because they are linked used the type +identifiers, if the wrong parent is used then the wrong type will be +encountered. +.Lp +Each label is encoded in the file format using the following eight byte +structure: +.Bd -literal +typedef struct ctf_lblent { + uint_t ctl_label; /* ref to name of label */ + uint_t ctl_typeidx; /* last type associated with this label */ +} ctf_lblent_t; +.Ed +.Lp +Each label has two different components, a name and a type identifier. +The name is encoded in the +.Em ctl_label +member which is in the format defined in the section +.Sx String Identifiers . +Generally, the names of all labels are found in the internal string +section. +.Lp +The type identifier encoded in the member +.Em ctl_typeidx +refers to the last type identifier that a label refers to in the current +file. Labels only refer to types in the current file, if the +.Nm +file is a child, then it will have the same label as its parent; +however, its label will only refer to its types, not its parents. +.Lp +It is also possible, though rather uncommon, for a +.Nm +file to have multiple labels. Labels are placed one after another, every +eight bytes. When multiple labels are present, types may only belong to +a single label. +.Ss The Object Section +The object section provides a mapping from ELF symbols of type +.Sy STT_OBJECT +in the symbol table to a type identifier. Every entry in this section is +a +.Sy uint16_t +which contains a type identifier as described in the section +.Sx Type Identifiers . +If there is no information for an object, then the type identifier 0x0 +is stored for that entry. +.Lp +To walk the object section, you need to have a corresponding +.Sy symbol table +in the ELF object that contains the +.Nm +data. Not every object is included in this section. Specifically, when +walking the symbol table. An entry is skipped if it matches any of the +following conditions: +.Lp +.Bl -bullet -offset indent -compact +.It +The symbol type is not +.Sy STT_OBJECT +.It +The symbol's section index is +.Sy SHN_UNDEF +.It +The symbol's name offset is zero +.It +The symbol's section index is +.Sy SHN_ABS +and the value of the symbol is zero. +.It +The symbol's name is +.Li _START_ +or +.Li _END_ . +These are skipped because they are used for scoping local symbols in +ELF. +.El +.Lp +The following sample code shows an example of iterating the object +section and skipping the correct symbols: +.Bd -literal +#include +#include + +/* + * Given the start of the object section in the CTF file, the number of symbols, + * and the ELF Data sections for the symbol table and the string table, this + * prints the type identifiers that correspond to objects. Note, a more robust + * implementation should ensure that they don't walk beyond the end of the CTF + * object section. + */ +static int +walk_symbols(uint16_t *objtoff, Elf_Data *symdata, Elf_Data *strdata, + long nsyms) +{ + long i; + uintptr_t strbase = strdata->d_buf; + + for (i = 1; i < nsyms; i++, objftoff++) { + const char *name; + GElf_Sym sym; + + if (gelf_getsym(symdata, i, &sym) == NULL) + return (1); + + if (GELF_ST_TYPE(sym.st_info) != STT_OBJECT) + continue; + if (sym.st_shndx == SHN_UNDEF || sym.st_name == 0) + continue; + if (sym.st_shndx == SHN_ABS && sym.st_value == 0) + continue; + name = (const char *)(strbase + sym.st_name); + if (strcmp(name, "_START_") == 0 || strcmp(name, "_END_") == 0) + continue; + + (void) printf("Symbol %d has type %d\n", i, *objtoff); + } + + return (0); +} +.Ed +.Ss The Function Section +The function section of the +.Nm +file encodes the types of both the function's arguments and the function's +return type. Similar to +.Sx The Object Section , +the function section encodes information for all symbols of type +.Sy STT_FUNCTION , +excepting those that fit specific criteria. Unlike with objects, because +functions have a variable number of arguments, they start with a type encoding +as defined in +.Sx Type Encoding , +which is the size of a +.Sy uint16_t . +For functions which have no type information available, they are encoded as +.Li CTF_TYPE_INFO(CTF_K_UNKNOWN, 0, 0) . +Functions with arguments are encoded differently. Here, the variable length is +turned into the number of arguments in the function. If a function is a +.Sy varargs +type function, then the number of arguments is increased by one. Functions with +type information are encoded as: +.Li CTF_TYPE_INFO(CTF_K_FUNCTION, 0, nargs) . +.Lp +For functions that have no type information, nothing else is encoded, and the +next function is encoded. For functions with type information, the next +.Sy uint16_t +is encoded with the type identifier of the return type of the function. It is +followed by each of the type identifiers of the arguments, if any exist, in the +order that they appear in the function. Therefore, argument 0 is the first type +identifier and so on. When a function has a final varargs argument, that is +encoded with the type identifier of zero. +.Lp +Like +.Sx The Object Section , +the function section is encoded in the order of the symbol table. It has +similar, but slightly different considerations from objects. While iterating the +symbol table, if any of the following conditions are true, then the entry is +skipped and no corresponding entry is written: +.Lp +.Bl -bullet -offset indent -compact +.It +The symbol type is not +.Sy STT_FUNCTION +.It +The symbol's section index is +.Sy SHN_UNDEF +.It +The symbol's name offset is zero +.It +The symbol's name is +.Li _START_ +or +.Li _END_ . +These are skipped because they are used for scoping local symbols in +ELF. +.El +.Ss The Type Section +The type section is the heart of the +.Nm +data. It encodes all of the information about the types themselves. The base of +the type information comes in two forms, a short form and a long form, each of +which may be followed by a variable number of arguments. The following +definitions describe the short and long forms: +.Bd -literal +#define CTF_MAX_SIZE 0xfffe /* max size of a type in bytes */ +#define CTF_LSIZE_SENT 0xffff /* sentinel for ctt_size */ +#define CTF_MAX_LSIZE UINT64_MAX + +typedef struct ctf_stype { + uint_t ctt_name; /* reference to name in string table */ + ushort_t ctt_info; /* encoded kind, variant length */ + union { + ushort_t _size; /* size of entire type in bytes */ + ushort_t _type; /* reference to another type */ + } _u; +} ctf_stype_t; + +typedef struct ctf_type { + uint_t ctt_name; /* reference to name in string table */ + ushort_t ctt_info; /* encoded kind, variant length */ + union { + ushort_t _size; /* always CTF_LSIZE_SENT */ + ushort_t _type; /* do not use */ + } _u; + uint_t ctt_lsizehi; /* high 32 bits of type size in bytes */ + uint_t ctt_lsizelo; /* low 32 bits of type size in bytes */ +} ctf_type_t; + +#define ctt_size _u._size /* for fundamental types that have a size */ +#define ctt_type _u._type /* for types that reference another type */ +.Ed +.Pp +Type sizes are stored in +.Sy bytes . +The basic small form uses a +.Sy ushort_t +to store the number of bytes. If the number of bytes in a structure would exceed +0xfffe, then the alternate form, the +.Sy ctf_type_t , +is used instead. To indicate that the larger form is being used, the member +.Em ctt_size +is set to value of +.Sy CTF_LSIZE_SENT +(0xffff). In general, when going through the type section, consumers use the +.Sy ctf_type_t +structure, but pay attention to the value of the member +.Em ctt_size +to determine whether they should increment their scan by the size of the +.Sy ctf_stype_t +or +.Sy ctf_type_t . +Not all kinds of types use +.Sy ctt_size . +Those which do not, will always use the +.Sy ctf_stype_t +structure. The individual sections for each kind have more information. +.Lp +Types are written out in order. Therefore the first entry encountered has a type +id of 0x1, or 0x8000 if a child. The member +.Em ctt_name +is encoded as described in the section +.Sx String Identifiers . +The string that it points to is the name of the type. If the identifier points +to an empty string (one that consists solely of a null terminator) then the type +does not have a name, this is common with anonymous structures and unions that +only have a typedef to name them, as well as, pointers and qualifiers. +.Lp +The next member, the +.Em ctt_info , +is encoded as described in the section +.Sx Type Encoding . +The types kind tells us how to interpret the remaining data in the +.Sy ctf_type_t +and any variable length data that may exist. The rest of this section will be +broken down into the interpretation of the various kinds. +.Ss Encoding of Integers +Integers, which are of type +.Sy CTF_K_INTEGER , +have no variable length arguments. Instead, they are followed by a four byte +.Sy uint_t +which describes their encoding. All integers must be encoded with a variable +length of zero. The +.Em ctt_size +member describes the length of the integer in bytes. In general, integer sizes +will be rounded up to the closest power of two. +.Lp +The integer encoding contains three different pieces of information: +.Bl -bullet -offset indent -compact +.It +The encoding of the integer +.It +The offset in +.Sy bits +of the type +.It +The size in +.Sy bits +of the type +.El +.Pp +This encoding can be expressed through the following macros: +.Bd -literal -offset indent +#define CTF_INT_ENCODING(data) (((data) & 0xff000000) >> 24) +#define CTF_INT_OFFSET(data) (((data) & 0x00ff0000) >> 16) +#define CTF_INT_BITS(data) (((data) & 0x0000ffff)) + +#define CTF_INT_DATA(encoding, offset, bits) \\ + (((encoding) << 24) | ((offset) << 16) | (bits)) +.Ed +.Pp +The following flags are defined for the encoding at this time: +.Bd -literal -offset indent +#define CTF_INT_SIGNED 0x01 +#define CTF_INT_CHAR 0x02 +#define CTF_INT_BOOL 0x04 +#define CTF_INT_VARARGS 0x08 +.Ed +.Lp +By default, an integer is considered to be unsigned, unless it has the +.Sy CTF_INT_SIGNED +flag set. If the flag +.Sy CTF_INT_CHAR +is set, that indicates that the integer is of a type that stores character +data, for example the intrinsic C type +.Sy char +would have the +.Sy CTF_INT_CHAR +flag set. If the flag +.Sy CTF_INT_BOOL +is set, that indicates that the integer represents a boolean type. For example, +the intrinsic C type +.Sy _Bool +would have the +.Sy CTF_INT_BOOL +flag set. Finally, the flag +.Sy CTF_INT_VARARGS +indicates that the integer is used as part of a variable number of arguments. +This encoding is rather uncommon. +.Ss Encoding of Floats +Floats, which are of type +.Sy CTF_K_FLOAT , +are similar to their integer counterparts. They have no variable length +arguments and are followed by a four byte encoding which describes the kind of +float that exists. The +.Em ctt_size +member is the size, in bytes, of the float. The float encoding has three +different pieces of information inside of it: +.Lp +.Bl -bullet -offset indent -compact +.It +The specific kind of float that exists +.It +The offset in +.Sy bits +of the float +.It +The size in +.Sy bits +of the float +.El +.Lp +This encoding can be expressed through the following macros: +.Bd -literal -offset indent +#define CTF_FP_ENCODING(data) (((data) & 0xff000000) >> 24) +#define CTF_FP_OFFSET(data) (((data) & 0x00ff0000) >> 16) +#define CTF_FP_BITS(data) (((data) & 0x0000ffff)) + +#define CTF_FP_DATA(encoding, offset, bits) \\ + (((encoding) << 24) | ((offset) << 16) | (bits)) +.Ed +.Lp +Where as the encoding for integers was a series of flags, the encoding for +floats maps to a specific kind of float. It is not a flag-based value. The kinds of floats +correspond to both their size, and the encoding. This covers all of the basic C +intrinsic floating point types. The following are the different kinds of floats +represented in the encoding: +.Bd -literal -offset indent +#define CTF_FP_SINGLE 1 /* IEEE 32-bit float encoding */ +#define CTF_FP_DOUBLE 2 /* IEEE 64-bit float encoding */ +#define CTF_FP_CPLX 3 /* Complex encoding */ +#define CTF_FP_DCPLX 4 /* Double complex encoding */ +#define CTF_FP_LDCPLX 5 /* Long double complex encoding */ +#define CTF_FP_LDOUBLE 6 /* Long double encoding */ +#define CTF_FP_INTRVL 7 /* Interval (2x32-bit) encoding */ +#define CTF_FP_DINTRVL 8 /* Double interval (2x64-bit) encoding */ +#define CTF_FP_LDINTRVL 9 /* Long double interval (2x128-bit) encoding */ +#define CTF_FP_IMAGRY 10 /* Imaginary (32-bit) encoding */ +#define CTF_FP_DIMAGRY 11 /* Long imaginary (64-bit) encoding */ +#define CTF_FP_LDIMAGRY 12 /* Long double imaginary (128-bit) encoding */ +.Ed +.Ss Encoding of Arrays +Arrays, which are of type +.Sy CTF_K_ARRAY , +have no variable length arguments. They are followed by a structure which +describes the number of elements in the array, the type identifier of the +elements in the array, and the type identifier of the index of the array. With +arrays, the +.Em ctt_size +member is set to zero. The structure that follows an array is defined as: +.Bd -literal +typedef struct ctf_array { + ushort_t cta_contents; /* reference to type of array contents */ + ushort_t cta_index; /* reference to type of array index */ + uint_t cta_nelems; /* number of elements */ +} ctf_array_t; +.Ed +.Lp +The +.Em cta_contents +and +.Em cta_index +members of the +.Sy ctf_array_t +are type identifiers which are encoded as per the section +.Sx Type Identifiers . +The member +.Em cta_nelems +is a simple four byte unsigned count of the number of elements. This count may +be zero when encountering C99's flexible array members. +.Ss Encoding of Functions +Function types, which are of type +.Sy CTF_K_FUNCTION , +use the variable length list to be the number of arguments in the function. When +the function has a final member which is a varargs, then the argument count is +incremented by one to account for the variable argument. Here, the +.Em ctt_type +member is encoded with the type identifier of the return type of the function. +Note that the +.Em ctt_size +member is not used here. +.Lp +The variable argument list contains the type identifiers for the arguments of +the function, if any. Each one is represented by a +.Sy uint16_t +and encoded according to the +.Sx Type Identifiers +section. If the function's last argument is of type varargs, then it is also +written out, but the type identifier is zero. This is included in the count of +the function's arguments. +.Ss Encoding of Structures and Unions +Structures and Unions, which are encoded with +.Sy CTF_K_STRUCT +and +.Sy CTF_K_UNION +respectively, are very similar constructs in C. The main difference +between them is the fact that every member of a structure follows one another, +where as in a union, all members share the same memory. They are also very +similar in terms of their encoding in +.Nm . +The variable length argument for structures and unions represents the number of +members that they have. The value of the member +.Em ctt_size +is the size of the structure and union. There are two different structures which +are used to encode members in the variable list. When the size of a structure or +union is greater than or equal to the large member threshold, 8192, then a +different structure is used to encode the member, all members are encoded using +the same structure. The structure for members is as follows: +.Bd -literal +typedef struct ctf_member { + uint_t ctm_name; /* reference to name in string table */ + ushort_t ctm_type; /* reference to type of member */ + ushort_t ctm_offset; /* offset of this member in bits */ +} ctf_member_t; + +typedef struct ctf_lmember { + uint_t ctlm_name; /* reference to name in string table */ + ushort_t ctlm_type; /* reference to type of member */ + ushort_t ctlm_pad; /* padding */ + uint_t ctlm_offsethi; /* high 32 bits of member offset in bits */ + uint_t ctlm_offsetlo; /* low 32 bits of member offset in bits */ +} ctf_lmember_t; +.Ed +.Lp +Both the +.Em ctm_name +and +.Em ctlm_name +refer to the name of the member. The name is encoded as an offset into the +string table as described by the section +.Sx String Identifiers . +The members +.Sy ctm_type +and +.Sy ctlm_type +both refer to the type of the member. They are encoded as per the section +.Sx Type Identifiers . +.Lp +The last piece of information that is present is the offset which describes the +offset in memory that the member begins at. For unions, this value will always +be zero because the start of unions in memory is always zero. For structures, +this is the offset in +.Sy bits +that the member begins at. Note that a compiler may lay out a type with padding. +This means that the difference in offset between two consecutive members may be +larger than the size of the member. When the size of the overall structure is +strictly less than 8192 bytes, the normal structure, +.Sy ctf_member_t , +is used and the offset in bits is stored in the member +.Em ctm_offset . +However, when the size of the structure is greater than or equal to 8192 bytes, +then the number of bits is split into two 32-bit quantities. One member, +.Em ctlm_offsethi , +represents the upper 32 bits of the offset, while the other member, +.Em ctlm_offsetlo , +represents the lower 32 bits of the offset. These can be joined together to get +a 64-bit sized offset in bits by shifting the member +.Em ctlm_offsethi +to the left by thirty two and then doing a binary or of +.Em ctlm_offsetlo . +.Ss Encoding of Enumerations +Enumerations, noted by the type *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***