From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 23 20:20:01 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C49F7106564A; Mon, 23 Jul 2012 20:20:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A81088FC08; Mon, 23 Jul 2012 20:20:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6NKK1g5045908; Mon, 23 Jul 2012 20:20:01 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6NKK1oM045903; Mon, 23 Jul 2012 20:20:01 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207232020.q6NKK1oM045903@svn.freebsd.org> From: Martin Matuska Date: Mon, 23 Jul 2012 20:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238725 - in vendor/illumos/dist: cmd/zhack cmd/zpool lib/libzfs/common man/man1m X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Jul 2012 20:20:01 -0000 Author: mm Date: Mon Jul 23 20:20:00 2012 New Revision: 238725 URL: http://svn.freebsd.org/changeset/base/238725 Log: Update vendor/illumos to illumos-gate 13753:2aba784c276b Obtained from: ssh://anonhg@hg.illumos.org/illumos-gate Modified: vendor/illumos/dist/cmd/zhack/zhack.c vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_status.c vendor/illumos/dist/man/man1m/zpool.1m Modified: vendor/illumos/dist/cmd/zhack/zhack.c ============================================================================== --- vendor/illumos/dist/cmd/zhack/zhack.c Mon Jul 23 19:23:49 2012 (r238724) +++ vendor/illumos/dist/cmd/zhack/zhack.c Mon Jul 23 20:20:00 2012 (r238725) @@ -280,7 +280,7 @@ feature_enable_sync(void *arg1, void *ar spa_feature_enable(spa, feature, tx); spa_history_log_internal(spa, "zhack enable feature", tx, - "name=%s can_readonly=%u", + "guid=%s can_readonly=%u", feature->fi_guid, feature->fi_can_readonly); } @@ -360,7 +360,7 @@ feature_incr_sync(void *arg1, void *arg2 spa_feature_incr(spa, feature, tx); spa_history_log_internal(spa, "zhack feature incr", tx, - "name=%s", feature->fi_guid); + "guid=%s", feature->fi_guid); } static void @@ -371,7 +371,7 @@ feature_decr_sync(void *arg1, void *arg2 spa_feature_decr(spa, feature, tx); spa_history_log_internal(spa, "zhack feature decr", tx, - "name=%s", feature->fi_guid); + "guid=%s", feature->fi_guid); } static void Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Mon Jul 23 19:23:49 2012 (r238724) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Mon Jul 23 20:20:00 2012 (r238725) @@ -381,6 +381,18 @@ print_vdev_tree(zpool_handle_t *zhp, con } } +static boolean_t +prop_list_contains_feature(nvlist_t *proplist) +{ + nvpair_t *nvp; + for (nvp = nvlist_next_nvpair(proplist, NULL); NULL != nvp; + nvp = nvlist_next_nvpair(proplist, nvp)) { + if (zpool_prop_feature(nvpair_name(nvp))) + return (B_TRUE); + } + return (B_FALSE); +} + /* * Add a property pair (name, string-value) into a property nvlist. */ @@ -404,12 +416,30 @@ add_prop_list(const char *propname, char proplist = *props; if (poolprop) { + const char *vname = zpool_prop_to_name(ZPOOL_PROP_VERSION); + if ((prop = zpool_name_to_prop(propname)) == ZPROP_INVAL && !zpool_prop_feature(propname)) { (void) fprintf(stderr, gettext("property '%s' is " "not a valid pool property\n"), propname); return (2); } + + /* + * feature@ properties and version should not be specified + * at the same time. + */ + if ((prop == ZPROP_INVAL && zpool_prop_feature(propname) && + nvlist_exists(proplist, vname)) || + (prop == ZPOOL_PROP_VERSION && + prop_list_contains_feature(proplist))) { + (void) fprintf(stderr, gettext("'feature@' and " + "'version' properties cannot be specified " + "together\n")); + return (2); + } + + if (zpool_prop_feature(propname)) normnm = propname; else @@ -1461,8 +1491,8 @@ show_import(nvlist_t *config) break; case ZPOOL_STATUS_VERSION_OLDER: - (void) printf(gettext(" status: The pool is formatted using an " - "older on-disk version.\n")); + (void) printf(gettext(" status: The pool is formatted using a " + "legacy on-disk version.\n")); break; case ZPOOL_STATUS_VERSION_NEWER: @@ -1470,6 +1500,11 @@ show_import(nvlist_t *config) "incompatible version.\n")); break; + case ZPOOL_STATUS_FEAT_DISABLED: + (void) printf(gettext(" status: Some supported features are " + "not enabled on the pool.\n")); + break; + case ZPOOL_STATUS_UNSUP_FEAT_READ: (void) printf(gettext("status: The pool uses the following " "feature(s) not supported on this sytem:\n")); @@ -1516,19 +1551,21 @@ show_import(nvlist_t *config) * Print out an action according to the overall state of the pool. */ if (vs->vs_state == VDEV_STATE_HEALTHY) { - if (reason == ZPOOL_STATUS_VERSION_OLDER) + if (reason == ZPOOL_STATUS_VERSION_OLDER || + reason == ZPOOL_STATUS_FEAT_DISABLED) { (void) printf(gettext(" action: The pool can be " "imported using its name or numeric identifier, " "though\n\tsome features will not be available " "without an explicit 'zpool upgrade'.\n")); - else if (reason == ZPOOL_STATUS_HOSTID_MISMATCH) + } else if (reason == ZPOOL_STATUS_HOSTID_MISMATCH) { (void) printf(gettext(" action: The pool can be " "imported using its name or numeric " "identifier and\n\tthe '-f' flag.\n")); - else + } else { (void) printf(gettext(" action: The pool can be " "imported using its name or numeric " "identifier.\n")); + } } else if (vs->vs_state == VDEV_STATE_DEGRADED) { (void) printf(gettext(" action: The pool can be imported " "despite missing or damaged devices. The\n\tfault " @@ -3986,12 +4023,13 @@ status_callback(zpool_handle_t *zhp, voi break; case ZPOOL_STATUS_VERSION_OLDER: - (void) printf(gettext("status: The pool is formatted using an " - "older on-disk format. The pool can\n\tstill be used, but " - "some features are unavailable.\n")); + (void) printf(gettext("status: The pool is formatted using a " + "legacy on-disk format. The pool can\n\tstill be used, " + "but some features are unavailable.\n")); (void) printf(gettext("action: Upgrade the pool using 'zpool " "upgrade'. Once this is done, the\n\tpool will no longer " - "be accessible on older software versions.\n")); + "be accessible on software that does not support feature\n" + "\tflags.\n")); break; case ZPOOL_STATUS_VERSION_NEWER: @@ -4003,6 +4041,16 @@ status_callback(zpool_handle_t *zhp, voi "backup.\n")); break; + case ZPOOL_STATUS_FEAT_DISABLED: + (void) printf(gettext("status: Some supported features are not " + "enabled on the pool. The pool can\n\tstill be used, but " + "some features are unavailable.\n")); + (void) printf(gettext("action: Enable all features using " + "'zpool upgrade'. Once this is done,\n\tthe pool may no " + "longer be accessible by software that does not support\n\t" + "the features. See zpool-features(5) for details.\n")); + break; + case ZPOOL_STATUS_UNSUP_FEAT_READ: (void) printf(gettext("status: The pool cannot be accessed on " "this system because it uses the\n\tfollowing feature(s) " @@ -4232,66 +4280,153 @@ zpool_do_status(int argc, char **argv) } typedef struct upgrade_cbdata { - int cb_all; int cb_first; - int cb_newer; int cb_argc; uint64_t cb_version; char **cb_argv; } upgrade_cbdata_t; static int +upgrade_version(zpool_handle_t *zhp, uint64_t version) +{ + int ret; + nvlist_t *config; + uint64_t oldversion; + + config = zpool_get_config(zhp, NULL); + verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, + &oldversion) == 0); + + assert(SPA_VERSION_IS_SUPPORTED(oldversion)); + assert(oldversion < version); + + ret = zpool_upgrade(zhp, version); + if (ret != 0) + return (ret); + + if (version >= SPA_VERSION_FEATURES) { + (void) printf(gettext("Successfully upgraded " + "'%s' from version %llu to feature flags.\n"), + zpool_get_name(zhp), oldversion); + } else { + (void) printf(gettext("Successfully upgraded " + "'%s' from version %llu to version %llu.\n"), + zpool_get_name(zhp), oldversion, version); + } + + return (0); +} + +static int +upgrade_enable_all(zpool_handle_t *zhp, int *countp) +{ + int i, ret, count; + boolean_t firstff = B_TRUE; + nvlist_t *enabled = zpool_get_features(zhp); + + count = 0; + for (i = 0; i < SPA_FEATURES; i++) { + const char *fname = spa_feature_table[i].fi_uname; + const char *fguid = spa_feature_table[i].fi_guid; + if (!nvlist_exists(enabled, fguid)) { + char *propname; + verify(-1 != asprintf(&propname, "feature@%s", fname)); + ret = zpool_set_prop(zhp, propname, + ZFS_FEATURE_ENABLED); + if (ret != 0) { + free(propname); + return (ret); + } + count++; + + if (firstff) { + (void) printf(gettext("Enabled the " + "following features on '%s':\n"), + zpool_get_name(zhp)); + firstff = B_FALSE; + } + (void) printf(gettext(" %s\n"), fname); + free(propname); + } + } + + if (countp != NULL) + *countp = count; + return (0); +} + +static int upgrade_cb(zpool_handle_t *zhp, void *arg) { upgrade_cbdata_t *cbp = arg; nvlist_t *config; uint64_t version; - int ret = 0; + boolean_t printnl = B_FALSE; + int ret; config = zpool_get_config(zhp, NULL); verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) == 0); - if (!cbp->cb_newer && SPA_VERSION_IS_SUPPORTED(version) && - version != SPA_VERSION) { - if (!cbp->cb_all) { - if (cbp->cb_first) { - (void) printf(gettext("The following pools are " - "out of date, and can be upgraded. After " - "being\nupgraded, these pools will no " - "longer be accessible by older software " - "versions.\n\n")); - (void) printf(gettext("VER POOL\n")); - (void) printf(gettext("--- ------------\n")); - cbp->cb_first = B_FALSE; - } + assert(SPA_VERSION_IS_SUPPORTED(version)); - (void) printf("%2llu %s\n", (u_longlong_t)version, - zpool_get_name(zhp)); - } else { + if (version < cbp->cb_version) { + cbp->cb_first = B_FALSE; + ret = upgrade_version(zhp, cbp->cb_version); + if (ret != 0) + return (ret); + printnl = B_TRUE; + + /* + * If they did "zpool upgrade -a", then we could + * be doing ioctls to different pools. We need + * to log this history once to each pool, and bypass + * the normal history logging that happens in main(). + */ + (void) zpool_log_history(g_zfs, history_str); + log_history = B_FALSE; + } + + if (cbp->cb_version >= SPA_VERSION_FEATURES) { + int count; + ret = upgrade_enable_all(zhp, &count); + if (ret != 0) + return (ret); + + if (count > 0) { cbp->cb_first = B_FALSE; - ret = zpool_upgrade(zhp, cbp->cb_version); - if (!ret) { - (void) printf(gettext("Successfully upgraded " - "'%s'\n\n"), zpool_get_name(zhp)); - } - /* - * If they did "zpool upgrade -a", then we could - * be doing ioctls to different pools. We need - * to log this history once to each pool, and bypass - * the normal history logging that happens in main(). - */ - (void) zpool_log_history(g_zfs, history_str); - log_history = B_FALSE; + printnl = B_TRUE; } - } else if (cbp->cb_newer && !SPA_VERSION_IS_SUPPORTED(version)) { - assert(!cbp->cb_all); + } + + if (printnl) { + (void) printf(gettext("\n")); + } + + return (0); +} +static int +upgrade_list_older_cb(zpool_handle_t *zhp, void *arg) +{ + upgrade_cbdata_t *cbp = arg; + nvlist_t *config; + uint64_t version; + + config = zpool_get_config(zhp, NULL); + verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, + &version) == 0); + + assert(SPA_VERSION_IS_SUPPORTED(version)); + + if (version < SPA_VERSION_FEATURES) { if (cbp->cb_first) { (void) printf(gettext("The following pools are " - "formatted using an unsupported software version " - "and\ncannot be accessed on the current " - "system.\n\n")); + "formatted with legacy version numbers and can\n" + "be upgraded to use feature flags. After " + "being upgraded, these pools\nwill no " + "longer be accessible by software that does not " + "support feature\nflags.\n\n")); (void) printf(gettext("VER POOL\n")); (void) printf(gettext("--- ------------\n")); cbp->cb_first = B_FALSE; @@ -4301,14 +4436,65 @@ upgrade_cb(zpool_handle_t *zhp, void *ar zpool_get_name(zhp)); } - zpool_close(zhp); - return (ret); + return (0); +} + +static int +upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg) +{ + upgrade_cbdata_t *cbp = arg; + nvlist_t *config; + uint64_t version; + + config = zpool_get_config(zhp, NULL); + verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, + &version) == 0); + + if (version >= SPA_VERSION_FEATURES) { + int i; + boolean_t poolfirst = B_TRUE; + nvlist_t *enabled = zpool_get_features(zhp); + + for (i = 0; i < SPA_FEATURES; i++) { + const char *fguid = spa_feature_table[i].fi_guid; + const char *fname = spa_feature_table[i].fi_uname; + if (!nvlist_exists(enabled, fguid)) { + if (cbp->cb_first) { + (void) printf(gettext("\nSome " + "supported features are not " + "enabled on the following pools. " + "Once a\nfeature is enabled the " + "pool may become incompatible with " + "software\nthat does not support " + "the feature. See " + "zpool-features(5) for " + "details.\n\n")); + (void) printf(gettext("POOL " + "FEATURE\n")); + (void) printf(gettext("------" + "---------\n")); + cbp->cb_first = B_FALSE; + } + + if (poolfirst) { + (void) printf(gettext("%s\n"), + zpool_get_name(zhp)); + poolfirst = B_FALSE; + } + + (void) printf(gettext(" %s\n"), fname); + } + } + } + + return (0); } /* ARGSUSED */ static int upgrade_one(zpool_handle_t *zhp, void *data) { + boolean_t printnl = B_FALSE; upgrade_cbdata_t *cbp = data; uint64_t cur_version; int ret; @@ -4323,26 +4509,45 @@ upgrade_one(zpool_handle_t *zhp, void *d cur_version = zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL); if (cur_version > cbp->cb_version) { (void) printf(gettext("Pool '%s' is already formatted " - "using more current version '%llu'.\n"), + "using more current version '%llu'.\n\n"), zpool_get_name(zhp), cur_version); return (0); } - if (cur_version == cbp->cb_version) { + + if (cbp->cb_version != SPA_VERSION && cur_version == cbp->cb_version) { (void) printf(gettext("Pool '%s' is already formatted " - "using the current version.\n"), zpool_get_name(zhp)); + "using version %llu.\n\n"), zpool_get_name(zhp), + cbp->cb_version); return (0); } - ret = zpool_upgrade(zhp, cbp->cb_version); + if (cur_version != cbp->cb_version) { + printnl = B_TRUE; + ret = upgrade_version(zhp, cbp->cb_version); + if (ret != 0) + return (ret); + } + + if (cbp->cb_version >= SPA_VERSION_FEATURES) { + int count = 0; + ret = upgrade_enable_all(zhp, &count); + if (ret != 0) + return (ret); - if (!ret) { - (void) printf(gettext("Successfully upgraded '%s' " - "from version %llu to version %llu\n\n"), - zpool_get_name(zhp), (u_longlong_t)cur_version, - (u_longlong_t)cbp->cb_version); + if (count != 0) { + printnl = B_TRUE; + } else if (cur_version == SPA_VERSION) { + (void) printf(gettext("Pool '%s' already has all " + "supported features enabled.\n"), + zpool_get_name(zhp)); + } } - return (ret != 0); + if (printnl) { + (void) printf(gettext("\n")); + } + + return (0); } /* @@ -4361,6 +4566,7 @@ zpool_do_upgrade(int argc, char **argv) upgrade_cbdata_t cb = { 0 }; int ret = 0; boolean_t showversions = B_FALSE; + boolean_t upgradeall = B_FALSE; char *end; @@ -4368,7 +4574,7 @@ zpool_do_upgrade(int argc, char **argv) while ((c = getopt(argc, argv, ":avV:")) != -1) { switch (c) { case 'a': - cb.cb_all = B_TRUE; + upgradeall = B_TRUE; break; case 'v': showversions = B_TRUE; @@ -4401,19 +4607,19 @@ zpool_do_upgrade(int argc, char **argv) if (cb.cb_version == 0) { cb.cb_version = SPA_VERSION; - } else if (!cb.cb_all && argc == 0) { + } else if (!upgradeall && argc == 0) { (void) fprintf(stderr, gettext("-V option is " "incompatible with other arguments\n")); usage(B_FALSE); } if (showversions) { - if (cb.cb_all || argc != 0) { + if (upgradeall || argc != 0) { (void) fprintf(stderr, gettext("-v option is " "incompatible with other arguments\n")); usage(B_FALSE); } - } else if (cb.cb_all) { + } else if (upgradeall) { if (argc != 0) { (void) fprintf(stderr, gettext("-a option should not " "be used along with a pool name\n")); @@ -4423,9 +4629,25 @@ zpool_do_upgrade(int argc, char **argv) (void) printf(gettext("This system supports ZFS pool feature " "flags.\n\n")); - cb.cb_first = B_TRUE; if (showversions) { - (void) printf(gettext("The following versions are " + int i; + + (void) printf(gettext("The following features are " + "supported:\n\n")); + (void) printf(gettext("FEAT DESCRIPTION\n")); + (void) printf("----------------------------------------------" + "---------------\n"); + for (i = 0; i < SPA_FEATURES; i++) { + zfeature_info_t *fi = &spa_feature_table[i]; + const char *ro = fi->fi_can_readonly ? + " (read-only compatible)" : ""; + + (void) printf("%-37s%s\n", fi->fi_uname, ro); + (void) printf(" %s\n", fi->fi_desc); + } + (void) printf("\n"); + + (void) printf(gettext("The following legacy versions are also " "supported:\n\n")); (void) printf(gettext("VER DESCRIPTION\n")); (void) printf("--- -----------------------------------------" @@ -4468,32 +4690,44 @@ zpool_do_upgrade(int argc, char **argv) (void) printf(gettext("\nFor more information on a particular " "version, including supported releases,\n")); (void) printf(gettext("see the ZFS Administration Guide.\n\n")); - } else if (argc == 0) { - int notfound; - + } else if (argc == 0 && upgradeall) { + cb.cb_first = B_TRUE; ret = zpool_iter(g_zfs, upgrade_cb, &cb); - notfound = cb.cb_first; - - if (!cb.cb_all && ret == 0) { - if (!cb.cb_first) - (void) printf("\n"); - cb.cb_first = B_TRUE; - cb.cb_newer = B_TRUE; - ret = zpool_iter(g_zfs, upgrade_cb, &cb); - if (!cb.cb_first) { - notfound = B_FALSE; - (void) printf("\n"); + if (ret == 0 && cb.cb_first) { + if (cb.cb_version == SPA_VERSION) { + (void) printf(gettext("All pools are already " + "formatted using feature flags.\n\n")); + (void) printf(gettext("Every feature flags " + "pool already has all supported features " + "enabled.\n")); + } else { + (void) printf(gettext("All pools are already " + "formatted with version %llu or higher.\n"), + cb.cb_version); } } + } else if (argc == 0) { + cb.cb_first = B_TRUE; + ret = zpool_iter(g_zfs, upgrade_list_older_cb, &cb); + assert(ret == 0); + + if (cb.cb_first) { + (void) printf(gettext("All pools are formatted " + "using feature flags.\n\n")); + } else { + (void) printf(gettext("\nUse 'zpool upgrade -v' " + "for a list of available legacy versions.\n")); + } - if (ret == 0) { - if (notfound) - (void) printf(gettext("All pools are formatted " - "using this version.\n")); - else if (!cb.cb_all) - (void) printf(gettext("Use 'zpool upgrade -v' " - "for a list of available versions and " - "their associated\nfeatures.\n")); + cb.cb_first = B_TRUE; + ret = zpool_iter(g_zfs, upgrade_list_disabled_cb, &cb); + assert(ret == 0); + + if (cb.cb_first) { + (void) printf(gettext("Every feature flags pool has " + "all supported features enabled.\n")); + } else { + (void) printf(gettext("\n")); } } else { ret = for_each_pool(argc, argv, B_FALSE, NULL, Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs.h Mon Jul 23 19:23:49 2012 (r238724) +++ vendor/illumos/dist/lib/libzfs/common/libzfs.h Mon Jul 23 20:20:00 2012 (r238725) @@ -316,7 +316,8 @@ typedef enum { * requiring administrative attention. There is no corresponding * message ID. */ - ZPOOL_STATUS_VERSION_OLDER, /* older on-disk version */ + ZPOOL_STATUS_VERSION_OLDER, /* older legacy on-disk version */ + ZPOOL_STATUS_FEAT_DISABLED, /* supported features are disabled */ ZPOOL_STATUS_RESILVERING, /* device being resilvered */ ZPOOL_STATUS_OFFLINE_DEV, /* device online */ ZPOOL_STATUS_REMOVED_DEV, /* removed device */ Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_status.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_status.c Mon Jul 23 19:23:49 2012 (r238724) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_status.c Mon Jul 23 20:20:00 2012 (r238725) @@ -44,6 +44,7 @@ #include #include #include "libzfs_impl.h" +#include "zfeature_common.h" /* * Message ID table. This must be kept in sync with the ZPOOL_STATUS_* defines @@ -319,6 +320,30 @@ check_status(nvlist_t *config, boolean_t if (SPA_VERSION_IS_SUPPORTED(version) && version != SPA_VERSION) return (ZPOOL_STATUS_VERSION_OLDER); + /* + * Usable pool with disabled features + */ + if (version >= SPA_VERSION_FEATURES) { + int i; + nvlist_t *feat; + + if (isimport) { + feat = fnvlist_lookup_nvlist(config, + ZPOOL_CONFIG_LOAD_INFO); + feat = fnvlist_lookup_nvlist(feat, + ZPOOL_CONFIG_ENABLED_FEAT); + } else { + feat = fnvlist_lookup_nvlist(config, + ZPOOL_CONFIG_FEATURE_STATS); + } + + for (i = 0; i < SPA_FEATURES; i++) { + zfeature_info_t *fi = &spa_feature_table[i]; + if (!nvlist_exists(feat, fi->fi_guid)) + return (ZPOOL_STATUS_FEAT_DISABLED); + } + } + return (ZPOOL_STATUS_OK); } Modified: vendor/illumos/dist/man/man1m/zpool.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zpool.1m Mon Jul 23 19:23:49 2012 (r238724) +++ vendor/illumos/dist/man/man1m/zpool.1m Mon Jul 23 20:20:00 2012 (r238725) @@ -1692,11 +1692,10 @@ data errors since the last complete pool .ad .sp .6 .RS 4n -Displays all pools formatted using a different \fBZFS\fR on-disk version. Older -versions can continue to be used, but some features may not be available. These -pools can be upgraded using "\fBzpool upgrade -a\fR". Pools that are formatted -with a more recent version are also displayed, although these pools will be -inaccessible on the system. +Displays pools which do not have all supported features enabled and pools +formatted using a legacy ZFS version number. These pools can continue to be +used, but some features may not be available. Use "\fBzpool upgrade -a\fR" +to enable all features on all pools. .RE .sp @@ -1706,9 +1705,9 @@ inaccessible on the system. .ad .sp .6 .RS 4n -Displays \fBZFS\fR versions supported by the current software. The current -\fBZFS\fR versions and all previous supported versions are displayed, along -with an explanation of the features provided with each version. +Displays legacy \fBZFS\fR versions supported by the current software. See +\fBzfs-features\fR(5) for a description of feature flags features supported +by the current software. .RE .sp @@ -1718,16 +1717,18 @@ with an explanation of the features prov .ad .sp .6 .RS 4n -Upgrades the given pool to the latest on-disk version. Once this is done, the -pool will no longer be accessible on systems running older versions of the -software. +Enables all supported features on the given pool. Once this is done, the +pool will no longer be accessible on systems that do not support feature +flags. See \fBzfs-features\fR(5) for details on compatability with systems +that support feature flags, but do not support all features enabled on the +pool. .sp .ne 2 .na \fB\fB-a\fR\fR .ad .RS 14n -Upgrades all pools. +Enables all supported features on all pools. .RE .sp @@ -1736,10 +1737,9 @@ Upgrades all pools. \fB\fB-V\fR \fIversion\fR\fR .ad .RS 14n -Upgrade to the specified version. If the \fB-V\fR flag is not specified, the -pool is upgraded to the most recent version. This option can only be used to -increase the version number, and only up to the most recent version supported -by this software. +Upgrade to the specified legacy version. If the \fB-V\fR flag is specified, no +features will be enabled on the pool. This option can only be used to increase +the version number up to the last supported legacy version number. .RE .RE From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 23 20:20:24 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABD7310657F0; Mon, 23 Jul 2012 20:20:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3108FC0A; Mon, 23 Jul 2012 20:20:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6NKKOqn045966; Mon, 23 Jul 2012 20:20:24 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6NKKOA5045961; Mon, 23 Jul 2012 20:20:24 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207232020.q6NKKOA5045961@svn.freebsd.org> From: Martin Matuska Date: Mon, 23 Jul 2012 20:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238726 - in vendor-sys/illumos/dist/uts/common: fs/zfs fs/zfs/sys sys/fs X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Jul 2012 20:20:24 -0000 Author: mm Date: Mon Jul 23 20:20:23 2012 New Revision: 238726 URL: http://svn.freebsd.org/changeset/base/238726 Log: Update vendor-sys/illumos to illumos-gate 13753:2aba784c276b Obtained from: ssh://anonhg@hg.illumos.org/illumos-gate Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfeature.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Mon Jul 23 20:20:00 2012 (r238725) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Mon Jul 23 20:20:23 2012 (r238726) @@ -2149,7 +2149,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_ if (spa_version(spa) >= SPA_VERSION_FEATURES) { boolean_t missing_feat_read = B_FALSE; - nvlist_t *unsup_feat; + nvlist_t *unsup_feat, *enabled_feat; if (spa_dir_prop(spa, DMU_POOL_FEATURES_FOR_READ, &spa->spa_feat_for_read_obj) != 0) { @@ -2166,27 +2166,32 @@ spa_load_impl(spa_t *spa, uint64_t pool_ return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } - VERIFY(nvlist_alloc(&unsup_feat, NV_UNIQUE_NAME, KM_SLEEP) == - 0); + enabled_feat = fnvlist_alloc(); + unsup_feat = fnvlist_alloc(); if (!feature_is_supported(spa->spa_meta_objset, spa->spa_feat_for_read_obj, spa->spa_feat_desc_obj, - unsup_feat)) + unsup_feat, enabled_feat)) missing_feat_read = B_TRUE; if (spa_writeable(spa) || state == SPA_LOAD_TRYIMPORT) { if (!feature_is_supported(spa->spa_meta_objset, spa->spa_feat_for_write_obj, spa->spa_feat_desc_obj, - unsup_feat)) + unsup_feat, enabled_feat)) { missing_feat_write = B_TRUE; + } } + fnvlist_add_nvlist(spa->spa_load_info, + ZPOOL_CONFIG_ENABLED_FEAT, enabled_feat); + if (!nvlist_empty(unsup_feat)) { - VERIFY(nvlist_add_nvlist(spa->spa_load_info, - ZPOOL_CONFIG_UNSUP_FEAT, unsup_feat) == 0); + fnvlist_add_nvlist(spa->spa_load_info, + ZPOOL_CONFIG_UNSUP_FEAT, unsup_feat); } - nvlist_free(unsup_feat); + fnvlist_free(enabled_feat); + fnvlist_free(unsup_feat); if (!missing_feat_read) { fnvlist_add_boolean(spa->spa_load_info, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfeature.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfeature.h Mon Jul 23 20:20:00 2012 (r238725) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfeature.h Mon Jul 23 20:20:23 2012 (r238726) @@ -35,7 +35,7 @@ extern "C" { #endif extern boolean_t feature_is_supported(objset_t *os, uint64_t obj, - uint64_t desc_obj, nvlist_t *unsup_feat); + uint64_t desc_obj, nvlist_t *unsup_feat, nvlist_t *enabled_feat); struct spa; extern void spa_feature_create_zap_objects(struct spa *, dmu_tx_t *); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c Mon Jul 23 20:20:00 2012 (r238725) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c Mon Jul 23 20:20:23 2012 (r238726) @@ -173,7 +173,7 @@ typedef enum { */ boolean_t feature_is_supported(objset_t *os, uint64_t obj, uint64_t desc_obj, - nvlist_t *unsup_feat) + nvlist_t *unsup_feat, nvlist_t *enabled_feat) { boolean_t supported; zap_cursor_t zc; @@ -186,11 +186,16 @@ feature_is_supported(objset_t *os, uint6 ASSERT(za.za_integer_length == sizeof (uint64_t) && za.za_num_integers == 1); + if (NULL != enabled_feat) { + fnvlist_add_uint64(enabled_feat, za.za_name, + za.za_first_integer); + } + if (za.za_first_integer != 0 && !zfeature_is_supported(za.za_name)) { supported = B_FALSE; - if (unsup_feat != NULL) { + if (NULL != unsup_feat) { char *desc = ""; char buf[MAXPATHLEN]; Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Mon Jul 23 20:20:00 2012 (r238725) +++ vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Mon Jul 23 20:20:23 2012 (r238726) @@ -528,6 +528,7 @@ typedef struct zpool_rewind_policy { #define ZPOOL_CONFIG_LOAD_INFO "load_info" /* not stored on disk */ #define ZPOOL_CONFIG_REWIND_INFO "rewind_info" /* not stored on disk */ #define ZPOOL_CONFIG_UNSUP_FEAT "unsup_feat" /* not stored on disk */ +#define ZPOOL_CONFIG_ENABLED_FEAT "enabled_feat" /* not stored on disk */ #define ZPOOL_CONFIG_CAN_RDONLY "can_rdonly" /* not stored on disk */ #define ZPOOL_CONFIG_FEATURES_FOR_READ "features_for_read" #define ZPOOL_CONFIG_FEATURE_STATS "feature_stats" /* not stored on disk */ From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 23 21:31:55 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 566AB106564A; Mon, 23 Jul 2012 21:31:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A97B8FC16; Mon, 23 Jul 2012 21:31:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6NLVtgq051935; Mon, 23 Jul 2012 21:31:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6NLVs6x051886; Mon, 23 Jul 2012 21:31:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207232131.q6NLVs6x051886@svn.freebsd.org> From: Xin LI Date: Mon, 23 Jul 2012 21:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238727 - vendor/less/dist X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Jul 2012 21:31:55 -0000 Author: delphij Date: Mon Jul 23 21:31:53 2012 New Revision: 238727 URL: http://svn.freebsd.org/changeset/base/238727 Log: Vendor import of v451 (beta) Modified: vendor/less/dist/NEWS vendor/less/dist/README vendor/less/dist/brac.c vendor/less/dist/ch.c vendor/less/dist/charset.c vendor/less/dist/charset.h vendor/less/dist/cmd.h vendor/less/dist/cmdbuf.c vendor/less/dist/command.c vendor/less/dist/cvt.c vendor/less/dist/decode.c vendor/less/dist/defines.ds vendor/less/dist/defines.o2 vendor/less/dist/defines.o9 vendor/less/dist/defines.wn vendor/less/dist/edit.c vendor/less/dist/filename.c vendor/less/dist/forwback.c vendor/less/dist/funcs.h vendor/less/dist/help.c vendor/less/dist/ifile.c vendor/less/dist/input.c vendor/less/dist/jump.c vendor/less/dist/less.h vendor/less/dist/less.hlp vendor/less/dist/less.man vendor/less/dist/less.nro vendor/less/dist/lessecho.c vendor/less/dist/lessecho.man vendor/less/dist/lessecho.nro vendor/less/dist/lesskey.c vendor/less/dist/lesskey.h vendor/less/dist/lesskey.man vendor/less/dist/lesskey.nro vendor/less/dist/lglob.h vendor/less/dist/line.c vendor/less/dist/linenum.c vendor/less/dist/lsystem.c vendor/less/dist/main.c vendor/less/dist/mark.c vendor/less/dist/mkhelp.c vendor/less/dist/optfunc.c vendor/less/dist/option.c vendor/less/dist/option.h vendor/less/dist/opttbl.c vendor/less/dist/os.c vendor/less/dist/output.c vendor/less/dist/pattern.c vendor/less/dist/pattern.h vendor/less/dist/pckeys.h vendor/less/dist/position.c vendor/less/dist/position.h vendor/less/dist/prompt.c vendor/less/dist/screen.c vendor/less/dist/scrsize.c vendor/less/dist/search.c vendor/less/dist/signal.c vendor/less/dist/tags.c vendor/less/dist/ttyin.c vendor/less/dist/version.c Modified: vendor/less/dist/NEWS ============================================================================== --- vendor/less/dist/NEWS Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/NEWS Mon Jul 23 21:31:53 2012 (r238727) @@ -11,7 +11,7 @@ ====================================================================== - Major changes between "less" versions 444 and 449 + Major changes between "less" versions 444 and 451 * Add ESC-F command to keep reading data until a pattern is found. Modified: vendor/less/dist/README ============================================================================== --- vendor/less/dist/README Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/README Mon Jul 23 21:31:53 2012 (r238727) @@ -1,7 +1,7 @@ - Less, version 449 + Less, version 451 - This is the distribution of less, version 449, released 26 Jun 2012. + This is the distribution of less, version 451, released 21 Jul 2012. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or Modified: vendor/less/dist/brac.c ============================================================================== --- vendor/less/dist/brac.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/brac.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/ch.c ============================================================================== --- vendor/less/dist/ch.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/ch.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* @@ -807,6 +807,17 @@ seekable(f) } /* + * Force EOF to be at the current read position. + * This is used after an ignore_eof read, during which the EOF may change. + */ + public void +ch_set_eof() +{ + ch_fsize = ch_fpos; +} + + +/* * Initialize file state for a new file. */ public void Modified: vendor/less/dist/charset.c ============================================================================== --- vendor/less/dist/charset.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/charset.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/charset.h ============================================================================== --- vendor/less/dist/charset.h Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/charset.h Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ #define IS_ASCII_OCTET(c) (((c) & 0x80) == 0) #define IS_UTF8_TRAIL(c) (((c) & 0xC0) == 0x80) Modified: vendor/less/dist/cmd.h ============================================================================== --- vendor/less/dist/cmd.h Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/cmd.h Mon Jul 23 21:31:53 2012 (r238727) @@ -1,14 +1,14 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ -#define MAX_USERCMD 500 +#define MAX_USERCMD 1000 #define MAX_CMDLEN 16 #define A_B_LINE 2 Modified: vendor/less/dist/cmdbuf.c ============================================================================== --- vendor/less/dist/cmdbuf.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/cmdbuf.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* @@ -1087,7 +1087,11 @@ init_compl() tk_text = fcomplete(word); } else { +#if MSDOS_COMPILER + char *qword = NULL; +#else char *qword = shell_quote(word+1); +#endif if (qword == NULL) tk_text = fcomplete(word+1); else Modified: vendor/less/dist/command.c ============================================================================== --- vendor/less/dist/command.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/command.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* @@ -983,13 +983,15 @@ forw_loop(until_hilite) forward(1, 0, 0); } ignore_eoi = 0; + ch_set_eof(); /* * This gets us back in "F mode" after processing * a non-abort signal (e.g. window-change). */ if (sigs && !ABORT_SIGS()) - return (A_F_FOREVER); + return (until_hilite ? A_F_UNTIL_HILITE : A_F_FOREVER); + return (A_NOACTION); } Modified: vendor/less/dist/cvt.c ============================================================================== --- vendor/less/dist/cvt.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/cvt.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* * Routines to convert text in various ways. Used by search. Modified: vendor/less/dist/decode.c ============================================================================== --- vendor/less/dist/decode.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/decode.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/defines.ds ============================================================================== --- vendor/less/dist/defines.ds Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/defines.ds Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* DOS definition file for less. */ @@ -321,6 +321,9 @@ /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define HAVE_FLOAT if your compiler supports the "double" type. */ +#define HAVE_FLOAT 1 + /* Define if you have the header file. */ #define HAVE_LIMITS_H 1 Modified: vendor/less/dist/defines.o2 ============================================================================== --- vendor/less/dist/defines.o2 Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/defines.o2 Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* OS/2 definition file for less. */ Modified: vendor/less/dist/defines.o9 ============================================================================== --- vendor/less/dist/defines.o9 Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/defines.o9 Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* OS/9 definition file for less. */ Modified: vendor/less/dist/defines.wn ============================================================================== --- vendor/less/dist/defines.wn Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/defines.wn Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Windows definition file for less. */ Modified: vendor/less/dist/edit.c ============================================================================== --- vendor/less/dist/edit.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/edit.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ #include "less.h" Modified: vendor/less/dist/filename.c ============================================================================== --- vendor/less/dist/filename.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/filename.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/forwback.c ============================================================================== --- vendor/less/dist/forwback.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/forwback.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/funcs.h ============================================================================== --- vendor/less/dist/funcs.h Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/funcs.h Mon Jul 23 21:31:53 2012 (r238727) @@ -46,6 +46,7 @@ public void ch_setbufspace (); public void ch_flush (); public int seekable (); + public void ch_set_eof (); public void ch_init (); public void ch_close (); public int ch_getflags (); Modified: vendor/less/dist/help.c ============================================================================== --- vendor/less/dist/help.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/help.c Mon Jul 23 21:31:53 2012 (r238727) @@ -6,7 +6,7 @@ constant char helpdata[] = { '\n', ' ',' ',' ',' ',' ',' ','C','o','m','m','a','n','d','s',' ','m','a','r','k','e','d',' ','w','i','t','h',' ','*',' ','m','a','y',' ','b','e',' ','p','r','e','c','e','d','e','d',' ','b','y',' ','a',' ','n','u','m','b','e','r',',',' ','_','\b','N','.','\n', ' ',' ',' ',' ',' ',' ','N','o','t','e','s',' ','i','n',' ','p','a','r','e','n','t','h','e','s','e','s',' ','i','n','d','i','c','a','t','e',' ','t','h','e',' ','b','e','h','a','v','i','o','r',' ','i','f',' ','_','\b','N',' ','i','s',' ','g','i','v','e','n','.','\n', -' ',' ',' ',' ',' ',' ','A',' ','k','e','y',' ','p','r','e','c','e','d','e','d',' ','b','y',' ','a',' ','c','a','r','a','t',' ','i','n','d','i','c','a','t','e','s',' ','t','h','e',' ','C','t','r','l',' ','k','e','y',';',' ','t','h','u','s',' ','^','K',' ','i','s',' ','c','t','r','l','-','K','.','\n', +' ',' ',' ',' ',' ',' ','A',' ','k','e','y',' ','p','r','e','c','e','d','e','d',' ','b','y',' ','a',' ','c','a','r','e','t',' ','i','n','d','i','c','a','t','e','s',' ','t','h','e',' ','C','t','r','l',' ','k','e','y',';',' ','t','h','u','s',' ','^','K',' ','i','s',' ','c','t','r','l','-','K','.','\n', '\n', ' ',' ','h',' ',' ','H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','i','s','p','l','a','y',' ','t','h','i','s',' ','h','e','l','p','.','\n', ' ',' ','q',' ',' ',':','q',' ',' ','Q',' ',' ',':','Q',' ',' ','Z','Z',' ',' ',' ',' ',' ','E','x','i','t','.','\n', Modified: vendor/less/dist/ifile.c ============================================================================== --- vendor/less/dist/ifile.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/ifile.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/input.c ============================================================================== --- vendor/less/dist/input.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/input.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/jump.c ============================================================================== --- vendor/less/dist/jump.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/jump.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/less.h ============================================================================== --- vendor/less/dist/less.h Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/less.h Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ #define NEWBOT 1 Modified: vendor/less/dist/less.hlp ============================================================================== --- vendor/less/dist/less.hlp Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/less.hlp Mon Jul 23 21:31:53 2012 (r238727) @@ -3,7 +3,7 @@ Commands marked with * may be preceded by a number, _N. Notes in parentheses indicate the behavior if _N is given. - A key preceded by a carat indicates the Ctrl key; thus ^K is ctrl-K. + A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K. h H Display this help. q :q Q :Q ZZ Exit. Modified: vendor/less/dist/less.man ============================================================================== --- vendor/less/dist/less.man Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/less.man Mon Jul 23 21:31:53 2012 (r238727) @@ -1606,4 +1606,4 @@ LESS(1) - Version 449: 26 Jun 2012 LESS(1) + Version 451: 21 Jul 2012 LESS(1) Modified: vendor/less/dist/less.nro ============================================================================== --- vendor/less/dist/less.nro Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/less.nro Mon Jul 23 21:31:53 2012 (r238727) @@ -1,4 +1,4 @@ -.TH LESS 1 "Version 449: 26 Jun 2012" +.TH LESS 1 "Version 451: 21 Jul 2012" .SH NAME less \- opposite of more .SH SYNOPSIS Modified: vendor/less/dist/lessecho.c ============================================================================== --- vendor/less/dist/lessecho.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lessecho.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/lessecho.man ============================================================================== --- vendor/less/dist/lessecho.man Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lessecho.man Mon Jul 23 21:31:53 2012 (r238727) @@ -51,4 +51,4 @@ LESSECHO(1) - Version 449: 26 Jun 2012 LESSECHO(1) + Version 451: 21 Jul 2012 LESSECHO(1) Modified: vendor/less/dist/lessecho.nro ============================================================================== --- vendor/less/dist/lessecho.nro Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lessecho.nro Mon Jul 23 21:31:53 2012 (r238727) @@ -1,4 +1,4 @@ -.TH LESSECHO 1 "Version 449: 26 Jun 2012" +.TH LESSECHO 1 "Version 451: 21 Jul 2012" .SH NAME lessecho \- expand metacharacters .SH SYNOPSIS Modified: vendor/less/dist/lesskey.c ============================================================================== --- vendor/less/dist/lesskey.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lesskey.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* @@ -449,7 +449,7 @@ tstr(pp, xlate) } case '^': /* - * Carat means CONTROL. + * Caret means CONTROL. */ *pp = p+2; buf[0] = CONTROL(p[1]); Modified: vendor/less/dist/lesskey.h ============================================================================== --- vendor/less/dist/lesskey.h Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lesskey.h Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/lesskey.man ============================================================================== --- vendor/less/dist/lesskey.man Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lesskey.man Mon Jul 23 21:31:53 2012 (r238727) @@ -349,10 +349,8 @@ LESSKEY(1) AUTHOR Mark Nudelman - Send bug reports or comments to the above address or to bug- - less@gnu.org. + Send bug reports or comments to bug-less@gnu.org. - - Version 449: 26 Jun 2012 LESSKEY(1) + Version 451: 21 Jul 2012 LESSKEY(1) Modified: vendor/less/dist/lesskey.nro ============================================================================== --- vendor/less/dist/lesskey.nro Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lesskey.nro Mon Jul 23 21:31:53 2012 (r238727) @@ -1,4 +1,4 @@ -.TH LESSKEY 1 "Version 449: 26 Jun 2012" +.TH LESSKEY 1 "Version 451: 21 Jul 2012" .SH NAME lesskey \- specify key bindings for less .SH SYNOPSIS @@ -378,5 +378,4 @@ Suite 330, Boston, MA 02111-1307, USA. .PP Mark Nudelman .br -Send bug reports or comments to the above address or to bug-less@gnu.org. - +Send bug reports or comments to bug-less@gnu.org. Modified: vendor/less/dist/lglob.h ============================================================================== --- vendor/less/dist/lglob.h Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lglob.h Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/line.c ============================================================================== --- vendor/less/dist/line.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/line.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/linenum.c ============================================================================== --- vendor/less/dist/linenum.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/linenum.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/lsystem.c ============================================================================== --- vendor/less/dist/lsystem.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/lsystem.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/main.c ============================================================================== --- vendor/less/dist/main.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/main.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/mark.c ============================================================================== --- vendor/less/dist/mark.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/mark.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ #include "less.h" Modified: vendor/less/dist/mkhelp.c ============================================================================== --- vendor/less/dist/mkhelp.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/mkhelp.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/optfunc.c ============================================================================== --- vendor/less/dist/optfunc.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/optfunc.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/option.c ============================================================================== --- vendor/less/dist/option.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/option.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/option.h ============================================================================== --- vendor/less/dist/option.h Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/option.h Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ #define END_OPTION_STRING ('$') Modified: vendor/less/dist/opttbl.c ============================================================================== --- vendor/less/dist/opttbl.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/opttbl.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/os.c ============================================================================== --- vendor/less/dist/os.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/os.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: vendor/less/dist/output.c ============================================================================== --- vendor/less/dist/output.c Mon Jul 23 20:20:23 2012 (r238726) +++ vendor/less/dist/output.c Mon Jul 23 21:31:53 2012 (r238727) @@ -1,11 +1,11 @@ -/* - * Copyright (C) 1984-2012 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* @@ -272,13 +272,16 @@ flush() break; if (at & 1) { -#if MSDOS_COMPILER==WIN32C - fg |= FOREGROUND_INTENSITY; - bg |= BACKGROUND_INTENSITY; -#else - fg = bo_fg_color; - bg = bo_bg_color; -#endif + /* + * If \e[1m use defined bold + * color, else set intensity. + */ + if (p[-2] == '[') + { + fg = bo_fg_color; + bg = bo_bg_color; + } else + fg |= 8; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 23 21:32:38 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 080021065672; Mon, 23 Jul 2012 21:32:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA7258FC1E; Mon, 23 Jul 2012 21:32:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6NLWbTP052032; Mon, 23 Jul 2012 21:32:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6NLWbxb052031; Mon, 23 Jul 2012 21:32:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207232132.q6NLWbxb052031@svn.freebsd.org> From: Xin LI Date: Mon, 23 Jul 2012 21:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238728 - vendor/less/v451 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Jul 2012 21:32:38 -0000 Author: delphij Date: Mon Jul 23 21:32:37 2012 New Revision: 238728 URL: http://svn.freebsd.org/changeset/base/238728 Log: Tag v451. Added: vendor/less/v451/ - copied from r238727, vendor/less/dist/ From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 02:58:11 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ADD8106566C; Tue, 24 Jul 2012 02:58:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03B3B8FC0C; Tue, 24 Jul 2012 02:58:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6O2wA4H078945; Tue, 24 Jul 2012 02:58:10 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6O2wAj0078936; Tue, 24 Jul 2012 02:58:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207240258.q6O2wAj0078936@svn.freebsd.org> From: Warner Losh Date: Tue, 24 Jul 2012 02:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238733 - in vendor/dtc/dist: . Documentation libfdt tests X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 02:58:11 -0000 Author: imp Date: Tue Jul 24 02:58:10 2012 New Revision: 238733 URL: http://svn.freebsd.org/changeset/base/238733 Log: Import dtc from git://git.jdl.com/software/dtc hash f807af192828222dee7a5c9f94d999673bb4d8a1 Modified: vendor/dtc/dist/Documentation/dts-format.txt vendor/dtc/dist/Documentation/manual.txt vendor/dtc/dist/Makefile vendor/dtc/dist/checks.c vendor/dtc/dist/convert-dtsv0-lexer.l vendor/dtc/dist/data.c vendor/dtc/dist/dtc-lexer.l vendor/dtc/dist/dtc-parser.y vendor/dtc/dist/dtc.c vendor/dtc/dist/dtc.h vendor/dtc/dist/flattree.c vendor/dtc/dist/fstree.c vendor/dtc/dist/libfdt/Makefile.libfdt vendor/dtc/dist/libfdt/fdt.c vendor/dtc/dist/libfdt/fdt_ro.c vendor/dtc/dist/libfdt/fdt_rw.c vendor/dtc/dist/libfdt/libfdt.h vendor/dtc/dist/libfdt/libfdt_env.h vendor/dtc/dist/libfdt/libfdt_internal.h vendor/dtc/dist/livetree.c vendor/dtc/dist/srcpos.c vendor/dtc/dist/srcpos.h vendor/dtc/dist/tests/Makefile.tests vendor/dtc/dist/tests/dtbs_equal_ordered.c vendor/dtc/dist/tests/dtc-checkfails.sh vendor/dtc/dist/tests/extra-terminating-null.c vendor/dtc/dist/tests/get_alias.c vendor/dtc/dist/tests/include1.dts vendor/dtc/dist/tests/mangle-layout.c vendor/dtc/dist/tests/notfound.c vendor/dtc/dist/tests/open_pack.c vendor/dtc/dist/tests/path_offset.c vendor/dtc/dist/tests/path_offset_aliases.c vendor/dtc/dist/tests/run_tests.sh vendor/dtc/dist/tests/rw_tree1.c vendor/dtc/dist/tests/setprop.c vendor/dtc/dist/tests/setprop_inplace.c vendor/dtc/dist/tests/subnode_offset.c vendor/dtc/dist/tests/sw_tree1.c vendor/dtc/dist/tests/test_tree1.dts vendor/dtc/dist/tests/testdata.h vendor/dtc/dist/tests/tests.h vendor/dtc/dist/tests/tests.sh vendor/dtc/dist/tests/testutils.c vendor/dtc/dist/tests/trees.S vendor/dtc/dist/tests/value-labels.c vendor/dtc/dist/treesource.c vendor/dtc/dist/util.c vendor/dtc/dist/util.h Modified: vendor/dtc/dist/Documentation/dts-format.txt ============================================================================== --- vendor/dtc/dist/Documentation/dts-format.txt Tue Jul 24 02:35:30 2012 (r238732) +++ vendor/dtc/dist/Documentation/dts-format.txt Tue Jul 24 02:58:10 2012 (r238733) @@ -29,18 +29,28 @@ except for properties with empty (zero l form: [label:] property-name; -Property values may be defined as an array of 32-bit integer cells, as -NUL-terminated strings, as bytestrings or a combination of these. +Property values may be defined as an array of 8, 16, 32, or 64-bit integer +elements, as NUL-terminated strings, as bytestrings or a combination of these. -* Arrays of cells are represented by angle brackets surrounding a - space separated list of C-style integers +* Arrays are represented by angle brackets surrounding a space separated list + of C-style integers or character literals. Array elements default to 32-bits + in size. An array of 32-bit elements is also known as a cell list or a list + of cells. A cell being an unsigned 32-bit integer. e.g. interrupts = <17 0xc>; -* A 64-bit value is represented with two 32-bit cells. +* A 64-bit value can be represented with two 32-bit elements. e.g. clock-frequency = <0x00000001 0x00000000>; +* The storage size of an element can be changed using the /bits/ prefix. The + /bits/ prefix allows for the creation of 8, 16, 32, and 64-bit elements. + The resulting array will not be padded to a multiple of the default 32-bit + element size. + + e.g. interrupts = /bits/ 8 <17 0xc>; + e.g. clock-frequency = /bits/ 64 <0x0000000100000000>; + * A NUL-terminated string value is represented using double quotes (the property value is considered to include the terminating NUL character). @@ -59,19 +69,20 @@ NUL-terminated strings, as bytestrings o e.g. compatible = "ns16550", "ns8250"; example = <0xf00f0000 19>, "a strange property format"; -* In a cell array a reference to another node will be expanded to that - node's phandle. References may by '&' followed by a node's label: +* In an array a reference to another node will be expanded to that node's + phandle. References may by '&' followed by a node's label: e.g. interrupt-parent = < &mpic >; or they may be '&' followed by a node's full path in braces: e.g. interrupt-parent = < &{/soc/interrupt-controller@40000} >; + References are only permitted in arrays that have an element size of + 32-bits. -* Outside a cell array, a reference to another node will be expanded - to that node's full path. +* Outside an array, a reference to another node will be expanded to that + node's full path. e.g. ethernet0 = &EMAC0; * Labels may also appear before or after any component of a property - value, or between cells of a cell array, or between bytes of a - bytestring. + value, or between elements of an array, or between bytes of a bytestring. e.g. reg = reglabel: <0 sizelabel: 0x1000000>; e.g. prop = [ab cd ef byte4: 00 ff fe]; e.g. str = start: "string value" end: ; @@ -108,3 +119,4 @@ Version 1 DTS files have the overall lay -- David Gibson -- Yoder Stuart + -- Anton Staaf Modified: vendor/dtc/dist/Documentation/manual.txt ============================================================================== --- vendor/dtc/dist/Documentation/manual.txt Tue Jul 24 02:35:30 2012 (r238732) +++ vendor/dtc/dist/Documentation/manual.txt Tue Jul 24 02:58:10 2012 (r238733) @@ -21,7 +21,7 @@ III - libfdt IV - Utility Tools 1) convert-dtsv0 -- Conversion to Version 1 - 1) ftdump + 1) fdtdump I - "dtc", the device tree compiler @@ -106,6 +106,9 @@ Options: -O The generated output format, as listed above. + -d + Generate a dependency file during compilation. + -q Quiet: -q suppress warnings, -qq errors, -qqq all @@ -643,10 +646,10 @@ a new file with a "v1" appended the file Comments, empty lines, etc. are preserved. -2) ftdump -- Flat Tree dumping utility +2) fdtdump -- Flat Device Tree dumping utility -The ftdump program prints a readable version of a flat device tree file. +The fdtdump program prints a readable version of a flat device tree file. -The syntax of the ftdump command line is: +The syntax of the fdtdump command line is: - ftdump + fdtdump Modified: vendor/dtc/dist/Makefile ============================================================================== --- vendor/dtc/dist/Makefile Tue Jul 24 02:35:30 2012 (r238732) +++ vendor/dtc/dist/Makefile Tue Jul 24 02:58:10 2012 (r238733) @@ -9,14 +9,16 @@ # CONFIG_LOCALVERSION from some future config system. # VERSION = 1 -PATCHLEVEL = 2 +PATCHLEVEL = 3 SUBLEVEL = 0 EXTRAVERSION = LOCAL_VERSION = CONFIG_LOCALVERSION = -CPPFLAGS = -I libfdt -CFLAGS = -Wall -g -Os -fPIC -Wpointer-arith -Wcast-qual +CPPFLAGS = -I libfdt -I . +WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls +CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) BISON = bison LEX = flex @@ -103,12 +105,15 @@ endef include Makefile.convert-dtsv0 include Makefile.dtc -include Makefile.ftdump +include Makefile.utils BIN += convert-dtsv0 BIN += dtc -BIN += ftdump +BIN += fdtdump +BIN += fdtget +BIN += fdtput +SCRIPTS = dtdiff all: $(BIN) libfdt @@ -116,7 +121,9 @@ all: $(BIN) libfdt ifneq ($(DEPTARGETS),) -include $(DTC_OBJS:%.o=%.d) -include $(CONVERT_OBJS:%.o=%.d) --include $(FTDUMP_OBJS:%.o=%.d) +-include $(FDTDUMP_OBJS:%.o=%.d) +-include $(FDTGET_OBJS:%.o=%.d) +-include $(FDTPUT_OBJS:%.o=%.d) endif @@ -127,7 +134,7 @@ endif LIBFDT_objdir = libfdt LIBFDT_srcdir = libfdt LIBFDT_archive = $(LIBFDT_objdir)/libfdt.a -LIBFDT_lib = $(LIBFDT_objdir)/libfdt.$(SHAREDLIB_EXT) +LIBFDT_lib = $(LIBFDT_objdir)/libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT) LIBFDT_include = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_INCLUDES)) LIBFDT_version = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_VERSION)) @@ -153,12 +160,14 @@ endif # intermediate target and building them again "for real" .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) -install: all +install: all $(SCRIPTS) @$(VECHO) INSTALL $(INSTALL) -d $(DESTDIR)$(BINDIR) - $(INSTALL) $(BIN) $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) $(INSTALL) -d $(DESTDIR)$(LIBDIR) $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) + ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) + ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) $(INSTALL) -m 644 $(LIBFDT_include) $(DESTDIR)$(INCLUDEDIR) @@ -173,19 +182,29 @@ convert-dtsv0: $(CONVERT_OBJS) @$(VECHO) LD $@ $(LINK.c) -o $@ $^ -ftdump: $(FTDUMP_OBJS) +fdtdump: $(FDTDUMP_OBJS) + +fdtget: $(FDTGET_OBJS) $(LIBFDT_archive) + +fdtput: $(FDTPUT_OBJS) $(LIBFDT_archive) # # Testsuite rules # TESTS_PREFIX=tests/ + +TESTS_BIN += dtc +TESTS_BIN += convert-dtsv0 +TESTS_BIN += fdtput +TESTS_BIN += fdtget + include tests/Makefile.tests # # Clean rules # -STD_CLEANFILES = *~ *.o *.so *.d *.a *.i *.s core a.out vgcore.* \ +STD_CLEANFILES = *~ *.o *.$(SHAREDLIB_EXT) *.d *.a *.i *.s core a.out vgcore.* \ *.tab.[ch] *.lex.c *.output clean: libfdt_clean tests_clean @@ -231,8 +250,7 @@ clean: libfdt_clean tests_clean $(LIBFDT_lib): @$(VECHO) LD $@ - $(CC) $(LDFLAGS) -fPIC $(SHAREDLIB_LINK_OPTIONS)$(notdir $@) -o $(LIBFDT_objdir)/libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT) $^ - ln -sf libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT) $(LIBFDT_objdir)/libfdt.$(SHAREDLIB_EXT) + $(CC) $(LDFLAGS) -fPIC $(SHAREDLIB_LINK_OPTIONS)$(LIBFDT_soname) -o $(LIBFDT_lib) $^ %.lex.c: %.l @$(VECHO) LEX $@ Modified: vendor/dtc/dist/checks.c ============================================================================== --- vendor/dtc/dist/checks.c Tue Jul 24 02:35:30 2012 (r238732) +++ vendor/dtc/dist/checks.c Tue Jul 24 02:58:10 2012 (r238733) @@ -31,12 +31,6 @@ #define TRACE(c, fmt, ...) do { } while (0) #endif -enum checklevel { - IGNORE = 0, - WARN = 1, - ERROR = 2, -}; - enum checkstatus { UNCHECKED = 0, PREREQ, @@ -57,14 +51,14 @@ struct check { node_check_fn node_fn; prop_check_fn prop_fn; void *data; - enum checklevel level; + bool warn, error; enum checkstatus status; int inprogress; int num_prereqs; struct check **prereq; }; -#define CHECK(nm, tfn, nfn, pfn, d, lvl, ...) \ +#define CHECK_ENTRY(nm, tfn, nfn, pfn, d, w, e, ...) \ static struct check *nm##_prereqs[] = { __VA_ARGS__ }; \ static struct check nm = { \ .name = #nm, \ @@ -72,20 +66,37 @@ struct check { .node_fn = (nfn), \ .prop_fn = (pfn), \ .data = (d), \ - .level = (lvl), \ + .warn = (w), \ + .error = (e), \ .status = UNCHECKED, \ .num_prereqs = ARRAY_SIZE(nm##_prereqs), \ .prereq = nm##_prereqs, \ }; - -#define TREE_CHECK(nm, d, lvl, ...) \ - CHECK(nm, check_##nm, NULL, NULL, d, lvl, __VA_ARGS__) -#define NODE_CHECK(nm, d, lvl, ...) \ - CHECK(nm, NULL, check_##nm, NULL, d, lvl, __VA_ARGS__) -#define PROP_CHECK(nm, d, lvl, ...) \ - CHECK(nm, NULL, NULL, check_##nm, d, lvl, __VA_ARGS__) -#define BATCH_CHECK(nm, lvl, ...) \ - CHECK(nm, NULL, NULL, NULL, NULL, lvl, __VA_ARGS__) +#define WARNING(nm, tfn, nfn, pfn, d, ...) \ + CHECK_ENTRY(nm, tfn, nfn, pfn, d, true, false, __VA_ARGS__) +#define ERROR(nm, tfn, nfn, pfn, d, ...) \ + CHECK_ENTRY(nm, tfn, nfn, pfn, d, false, true, __VA_ARGS__) +#define CHECK(nm, tfn, nfn, pfn, d, ...) \ + CHECK_ENTRY(nm, tfn, nfn, pfn, d, false, false, __VA_ARGS__) + +#define TREE_WARNING(nm, d, ...) \ + WARNING(nm, check_##nm, NULL, NULL, d, __VA_ARGS__) +#define TREE_ERROR(nm, d, ...) \ + ERROR(nm, check_##nm, NULL, NULL, d, __VA_ARGS__) +#define TREE_CHECK(nm, d, ...) \ + CHECK(nm, check_##nm, NULL, NULL, d, __VA_ARGS__) +#define NODE_WARNING(nm, d, ...) \ + WARNING(nm, NULL, check_##nm, NULL, d, __VA_ARGS__) +#define NODE_ERROR(nm, d, ...) \ + ERROR(nm, NULL, check_##nm, NULL, d, __VA_ARGS__) +#define NODE_CHECK(nm, d, ...) \ + CHECK(nm, NULL, check_##nm, NULL, d, __VA_ARGS__) +#define PROP_WARNING(nm, d, ...) \ + WARNING(nm, NULL, NULL, check_##nm, d, __VA_ARGS__) +#define PROP_ERROR(nm, d, ...) \ + ERROR(nm, NULL, NULL, check_##nm, d, __VA_ARGS__) +#define PROP_CHECK(nm, d, ...) \ + CHECK(nm, NULL, NULL, check_##nm, d, __VA_ARGS__) #ifdef __GNUC__ static inline void check_msg(struct check *c, const char *fmt, ...) __attribute__((format (printf, 2, 3))); @@ -95,13 +106,13 @@ static inline void check_msg(struct chec va_list ap; va_start(ap, fmt); - if ((c->level < WARN) || (c->level <= quiet)) - return; /* Suppress message */ - - fprintf(stderr, "%s (%s): ", - (c->level == ERROR) ? "ERROR" : "Warning", c->name); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); + if ((c->warn && (quiet < 1)) + || (c->error && (quiet < 2))) { + fprintf(stderr, "%s (%s): ", + (c->error) ? "ERROR" : "Warning", c->name); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + } } #define FAIL(c, ...) \ @@ -167,7 +178,7 @@ static int run_check(struct check *c, st out: c->inprogress = 0; - if ((c->status != PASSED) && (c->level == ERROR)) + if ((c->status != PASSED) && (c->error)) error = 1; return error; } @@ -176,6 +187,13 @@ out: * Utility check functions */ +/* A check which always fails, for testing purposes only */ +static inline void check_always_fail(struct check *c, struct node *dt) +{ + FAIL(c, "always_fail check"); +} +TREE_CHECK(always_fail, NULL); + static void check_is_string(struct check *c, struct node *root, struct node *node) { @@ -190,8 +208,10 @@ static void check_is_string(struct check FAIL(c, "\"%s\" property in %s is not a string", propname, node->fullpath); } -#define CHECK_IS_STRING(nm, propname, lvl) \ - CHECK(nm, NULL, check_is_string, NULL, (propname), (lvl)) +#define WARNING_IF_NOT_STRING(nm, propname) \ + WARNING(nm, NULL, check_is_string, NULL, (propname)) +#define ERROR_IF_NOT_STRING(nm, propname) \ + ERROR(nm, NULL, check_is_string, NULL, (propname)) static void check_is_cell(struct check *c, struct node *root, struct node *node) @@ -207,8 +227,10 @@ static void check_is_cell(struct check * FAIL(c, "\"%s\" property in %s is not a single cell", propname, node->fullpath); } -#define CHECK_IS_CELL(nm, propname, lvl) \ - CHECK(nm, NULL, check_is_cell, NULL, (propname), (lvl)) +#define WARNING_IF_NOT_CELL(nm, propname) \ + WARNING(nm, NULL, check_is_cell, NULL, (propname)) +#define ERROR_IF_NOT_CELL(nm, propname) \ + ERROR(nm, NULL, check_is_cell, NULL, (propname)) /* * Structural check functions @@ -227,7 +249,7 @@ static void check_duplicate_node_names(s FAIL(c, "Duplicate node name %s", child->fullpath); } -NODE_CHECK(duplicate_node_names, NULL, ERROR); +NODE_ERROR(duplicate_node_names, NULL); static void check_duplicate_property_names(struct check *c, struct node *dt, struct node *node) @@ -240,7 +262,7 @@ static void check_duplicate_property_nam FAIL(c, "Duplicate property name %s in %s", prop->name, node->fullpath); } -NODE_CHECK(duplicate_property_names, NULL, ERROR); +NODE_ERROR(duplicate_property_names, NULL); #define LOWERCASE "abcdefghijklmnopqrstuvwxyz" #define UPPERCASE "ABCDEFGHIJKLMNOPQRSTUVWXYZ" @@ -256,7 +278,7 @@ static void check_node_name_chars(struct FAIL(c, "Bad character '%c' in node %s", node->name[n], node->fullpath); } -NODE_CHECK(node_name_chars, PROPNODECHARS "@", ERROR); +NODE_ERROR(node_name_chars, PROPNODECHARS "@"); static void check_node_name_format(struct check *c, struct node *dt, struct node *node) @@ -265,7 +287,7 @@ static void check_node_name_format(struc FAIL(c, "Node %s has multiple '@' characters in name", node->fullpath); } -NODE_CHECK(node_name_format, NULL, ERROR, &node_name_chars); +NODE_ERROR(node_name_format, NULL, &node_name_chars); static void check_property_name_chars(struct check *c, struct node *dt, struct node *node, struct property *prop) @@ -276,7 +298,63 @@ static void check_property_name_chars(st FAIL(c, "Bad character '%c' in property name \"%s\", node %s", prop->name[n], prop->name, node->fullpath); } -PROP_CHECK(property_name_chars, PROPNODECHARS, ERROR); +PROP_ERROR(property_name_chars, PROPNODECHARS); + +#define DESCLABEL_FMT "%s%s%s%s%s" +#define DESCLABEL_ARGS(node,prop,mark) \ + ((mark) ? "value of " : ""), \ + ((prop) ? "'" : ""), \ + ((prop) ? (prop)->name : ""), \ + ((prop) ? "' in " : ""), (node)->fullpath + +static void check_duplicate_label(struct check *c, struct node *dt, + const char *label, struct node *node, + struct property *prop, struct marker *mark) +{ + struct node *othernode = NULL; + struct property *otherprop = NULL; + struct marker *othermark = NULL; + + othernode = get_node_by_label(dt, label); + + if (!othernode) + otherprop = get_property_by_label(dt, label, &othernode); + if (!othernode) + othermark = get_marker_label(dt, label, &othernode, + &otherprop); + + if (!othernode) + return; + + if ((othernode != node) || (otherprop != prop) || (othermark != mark)) + FAIL(c, "Duplicate label '%s' on " DESCLABEL_FMT + " and " DESCLABEL_FMT, + label, DESCLABEL_ARGS(node, prop, mark), + DESCLABEL_ARGS(othernode, otherprop, othermark)); +} + +static void check_duplicate_label_node(struct check *c, struct node *dt, + struct node *node) +{ + struct label *l; + + for_each_label(node->labels, l) + check_duplicate_label(c, dt, l->label, node, NULL, NULL); +} +static void check_duplicate_label_prop(struct check *c, struct node *dt, + struct node *node, struct property *prop) +{ + struct marker *m = prop->val.markers; + struct label *l; + + for_each_label(prop->labels, l) + check_duplicate_label(c, dt, l->label, node, prop, NULL); + + for_each_marker_of_type(m, LABEL) + check_duplicate_label(c, dt, m->ref, node, prop, m); +} +ERROR(duplicate_label, NULL, check_duplicate_label_node, + check_duplicate_label_prop, NULL); static void check_explicit_phandles(struct check *c, struct node *root, struct node *node, struct property *prop) @@ -335,7 +413,7 @@ static void check_explicit_phandles(stru node->phandle = phandle; } -PROP_CHECK(explicit_phandles, NULL, ERROR); +PROP_ERROR(explicit_phandles, NULL); static void check_name_properties(struct check *c, struct node *root, struct node *node) @@ -364,8 +442,8 @@ static void check_name_properties(struct free(prop); } } -CHECK_IS_STRING(name_is_string, "name", ERROR); -NODE_CHECK(name_properties, NULL, ERROR, &name_is_string); +ERROR_IF_NOT_STRING(name_is_string, "name"); +NODE_ERROR(name_properties, NULL, &name_is_string); /* * Reference fixup functions @@ -392,7 +470,7 @@ static void fixup_phandle_references(str *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle); } } -CHECK(phandle_references, NULL, NULL, fixup_phandle_references, NULL, ERROR, +ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL, &duplicate_node_names, &explicit_phandles); static void fixup_path_references(struct check *c, struct node *dt, @@ -417,19 +495,19 @@ static void fixup_path_references(struct strlen(path) + 1); } } -CHECK(path_references, NULL, NULL, fixup_path_references, NULL, ERROR, +ERROR(path_references, NULL, NULL, fixup_path_references, NULL, &duplicate_node_names); /* * Semantic checks */ -CHECK_IS_CELL(address_cells_is_cell, "#address-cells", WARN); -CHECK_IS_CELL(size_cells_is_cell, "#size-cells", WARN); -CHECK_IS_CELL(interrupt_cells_is_cell, "#interrupt-cells", WARN); - -CHECK_IS_STRING(device_type_is_string, "device_type", WARN); -CHECK_IS_STRING(model_is_string, "model", WARN); -CHECK_IS_STRING(status_is_string, "status", WARN); +WARNING_IF_NOT_CELL(address_cells_is_cell, "#address-cells"); +WARNING_IF_NOT_CELL(size_cells_is_cell, "#size-cells"); +WARNING_IF_NOT_CELL(interrupt_cells_is_cell, "#interrupt-cells"); + +WARNING_IF_NOT_STRING(device_type_is_string, "device_type"); +WARNING_IF_NOT_STRING(model_is_string, "model"); +WARNING_IF_NOT_STRING(status_is_string, "status"); static void fixup_addr_size_cells(struct check *c, struct node *dt, struct node *node) @@ -447,8 +525,8 @@ static void fixup_addr_size_cells(struct if (prop) node->size_cells = propval_cell(prop); } -CHECK(addr_size_cells, NULL, fixup_addr_size_cells, NULL, NULL, WARN, - &address_cells_is_cell, &size_cells_is_cell); +WARNING(addr_size_cells, NULL, fixup_addr_size_cells, NULL, NULL, + &address_cells_is_cell, &size_cells_is_cell); #define node_addr_cells(n) \ (((n)->addr_cells == -1) ? 2 : (n)->addr_cells) @@ -482,7 +560,7 @@ static void check_reg_format(struct chec "(#address-cells == %d, #size-cells == %d)", node->fullpath, prop->val.len, addr_cells, size_cells); } -NODE_CHECK(reg_format, NULL, WARN, &addr_size_cells); +NODE_WARNING(reg_format, NULL, &addr_size_cells); static void check_ranges_format(struct check *c, struct node *dt, struct node *node) @@ -523,7 +601,7 @@ static void check_ranges_format(struct c p_addr_cells, c_addr_cells, c_size_cells); } } -NODE_CHECK(ranges_format, NULL, WARN, &addr_size_cells); +NODE_WARNING(ranges_format, NULL, &addr_size_cells); /* * Style checks @@ -550,7 +628,7 @@ static void check_avoid_default_addr_siz FAIL(c, "Relying on default #size-cells value for %s", node->fullpath); } -NODE_CHECK(avoid_default_addr_size, NULL, WARN, &addr_size_cells); +NODE_WARNING(avoid_default_addr_size, NULL, &addr_size_cells); static void check_obsolete_chosen_interrupt_controller(struct check *c, struct node *dt) @@ -567,12 +645,15 @@ static void check_obsolete_chosen_interr FAIL(c, "/chosen has obsolete \"interrupt-controller\" " "property"); } -TREE_CHECK(obsolete_chosen_interrupt_controller, NULL, WARN); +TREE_WARNING(obsolete_chosen_interrupt_controller, NULL); static struct check *check_table[] = { &duplicate_node_names, &duplicate_property_names, &node_name_chars, &node_name_format, &property_name_chars, &name_is_string, &name_properties, + + &duplicate_label, + &explicit_phandles, &phandle_references, &path_references, @@ -583,8 +664,71 @@ static struct check *check_table[] = { &avoid_default_addr_size, &obsolete_chosen_interrupt_controller, + + &always_fail, }; +static void enable_warning_error(struct check *c, bool warn, bool error) +{ + int i; + + /* Raising level, also raise it for prereqs */ + if ((warn && !c->warn) || (error && !c->error)) + for (i = 0; i < c->num_prereqs; i++) + enable_warning_error(c->prereq[i], warn, error); + + c->warn = c->warn || warn; + c->error = c->error || error; +} + +static void disable_warning_error(struct check *c, bool warn, bool error) +{ + int i; + + /* Lowering level, also lower it for things this is the prereq + * for */ + if ((warn && c->warn) || (error && c->error)) { + for (i = 0; i < ARRAY_SIZE(check_table); i++) { + struct check *cc = check_table[i]; + int j; + + for (j = 0; j < cc->num_prereqs; j++) + if (cc->prereq[j] == c) + disable_warning_error(cc, warn, error); + } + } + + c->warn = c->warn && !warn; + c->error = c->error && !error; +} + +void parse_checks_option(bool warn, bool error, const char *optarg) +{ + int i; + const char *name = optarg; + bool enable = true; + + if ((strncmp(optarg, "no-", 3) == 0) + || (strncmp(optarg, "no_", 3) == 0)) { + name = optarg + 3; + enable = false; + } + + for (i = 0; i < ARRAY_SIZE(check_table); i++) { + struct check *c = check_table[i]; + + if (streq(c->name, name)) { + if (enable) + enable_warning_error(c, warn, error); + else + disable_warning_error(c, warn, error); + return; + } + } + + die("Unrecognized check name \"%s\"\n", name); +} + void process_checks(int force, struct boot_info *bi) { struct node *dt = bi->dt; @@ -594,7 +738,7 @@ void process_checks(int force, struct bo for (i = 0; i < ARRAY_SIZE(check_table); i++) { struct check *c = check_table[i]; - if (c->level != IGNORE) + if (c->warn || c->error) error = error || run_check(c, dt); } Modified: vendor/dtc/dist/convert-dtsv0-lexer.l ============================================================================== --- vendor/dtc/dist/convert-dtsv0-lexer.l Tue Jul 24 02:35:30 2012 (r238732) +++ vendor/dtc/dist/convert-dtsv0-lexer.l Tue Jul 24 02:58:10 2012 (r238733) @@ -17,7 +17,7 @@ * USA */ -%option noyywrap nounput noinput +%option noyywrap nounput noinput never-interactive %x INCLUDE %x BYTESTRING @@ -210,8 +210,10 @@ static void convert_file(const char *fna memcpy(newname, fname, len); memcpy(newname + len, suffix, sizeof(suffix)); - srcpos_file = dtc_open_file(fname, NULL); - yyin = srcpos_file->file; + yyin = fopen(fname, "r"); + if (!yyin) + die("Couldn't open input file %s: %s\n", + fname, strerror(errno)); yyout = fopen(newname, "w"); if (!yyout) Modified: vendor/dtc/dist/data.c ============================================================================== --- vendor/dtc/dist/data.c Tue Jul 24 02:35:30 2012 (r238732) +++ vendor/dtc/dist/data.c Tue Jul 24 02:58:10 2012 (r238733) @@ -68,40 +68,6 @@ struct data data_copy_mem(const char *me return d; } -static char get_oct_char(const char *s, int *i) -{ - char x[4]; - char *endx; - long val; - - x[3] = '\0'; - strncpy(x, s + *i, 3); - - val = strtol(x, &endx, 8); - - assert(endx > x); - - (*i) += endx - x; - return val; -} - -static char get_hex_char(const char *s, int *i) -{ - char x[3]; - char *endx; - long val; - - x[2] = '\0'; - strncpy(x, s + *i, 2); - - val = strtol(x, &endx, 16); - if (!(endx > x)) - die("\\x used with no following hex digits\n"); - - (*i) += endx - x; - return val; -} - struct data data_copy_escape_string(const char *s, int len) { int i = 0; @@ -114,53 +80,10 @@ struct data data_copy_escape_string(cons while (i < len) { char c = s[i++]; - if (c != '\\') { - q[d.len++] = c; - continue; - } - - c = s[i++]; - assert(c); - switch (c) { - case 'a': - q[d.len++] = '\a'; - break; - case 'b': - q[d.len++] = '\b'; - break; - case 't': - q[d.len++] = '\t'; - break; - case 'n': - q[d.len++] = '\n'; - break; - case 'v': - q[d.len++] = '\v'; - break; - case 'f': - q[d.len++] = '\f'; - break; - case 'r': - q[d.len++] = '\r'; - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - i--; /* need to re-read the first digit as - * part of the octal value */ - q[d.len++] = get_oct_char(s, &i); - break; - case 'x': - q[d.len++] = get_hex_char(s, &i); - break; - default: - q[d.len++] = c; - } + if (c == '\\') + c = get_escape_char(s, &i); + + q[d.len++] = c; } q[d.len++] = '\0'; @@ -245,11 +168,33 @@ struct data data_merge(struct data d1, s return d; } -struct data data_append_cell(struct data d, cell_t word) +struct data data_append_integer(struct data d, uint64_t value, int bits) { - cell_t beword = cpu_to_fdt32(word); + uint8_t value_8; + uint16_t value_16; + uint32_t value_32; + uint64_t value_64; + + switch (bits) { + case 8: + value_8 = value; + return data_append_data(d, &value_8, 1); + + case 16: + value_16 = cpu_to_fdt16(value); + return data_append_data(d, &value_16, 2); + + case 32: + value_32 = cpu_to_fdt32(value); + return data_append_data(d, &value_32, 4); + + case 64: + value_64 = cpu_to_fdt64(value); + return data_append_data(d, &value_64, 8); - return data_append_data(d, &beword, sizeof(beword)); + default: + die("Invalid literal size (%d)\n", bits); + } } struct data data_append_re(struct data d, const struct fdt_reserve_entry *re) @@ -262,11 +207,14 @@ struct data data_append_re(struct data d return data_append_data(d, &bere, sizeof(bere)); } -struct data data_append_addr(struct data d, uint64_t addr) +struct data data_append_cell(struct data d, cell_t word) { - uint64_t beaddr = cpu_to_fdt64(addr); + return data_append_integer(d, word, sizeof(word) * 8); +} - return data_append_data(d, &beaddr, sizeof(beaddr)); +struct data data_append_addr(struct data d, uint64_t addr) +{ + return data_append_integer(d, addr, sizeof(addr) * 8); } struct data data_append_byte(struct data d, uint8_t byte) Modified: vendor/dtc/dist/dtc-lexer.l ============================================================================== --- vendor/dtc/dist/dtc-lexer.l Tue Jul 24 02:35:30 2012 (r238732) +++ vendor/dtc/dist/dtc-lexer.l Tue Jul 24 02:58:10 2012 (r238733) @@ -18,7 +18,7 @@ * USA */ -%option noyywrap nounput noinput yylineno +%option noyywrap nounput noinput never-interactive %x INCLUDE %x BYTESTRING @@ -29,6 +29,7 @@ PROPNODECHAR [a-zA-Z0-9,._+*#?@-] PATHCHAR ({PROPNODECHAR}|[/]) LABEL [a-zA-Z_][a-zA-Z0-9_]* STRING \"([^\\"]|\\.)*\" +CHAR_LITERAL '([^']|\\')*' WS [[:space:]] COMMENT "/*"([^*]|\*+[^*/])*\*+"/" LINECOMMENT "//".*\n @@ -38,10 +39,12 @@ LINECOMMENT "//".*\n #include "srcpos.h" #include "dtc-parser.tab.h" +YYLTYPE yylloc; + +/* CAUTION: this will stop working if we ever use yyless() or yyunput() */ #define YY_USER_ACTION \ { \ - yylloc.file = srcpos_file; \ - yylloc.first_line = yylineno; \ + srcpos_update(&yylloc, yytext, yyleng); \ } /*#define LEXDEBUG 1*/ @@ -94,6 +97,12 @@ static int pop_input_file(void); return DT_MEMRESERVE; } +<*>"/bits/" { + DPRINT("Keyword: /bits/\n"); + BEGIN_DEFAULT(); + return DT_BITS; + } + <*>{LABEL}: { DPRINT("Label: %s\n", yytext); yylval.labelref = xstrdup(yytext); @@ -101,19 +110,26 @@ static int pop_input_file(void); return DT_LABEL; } -[0-9]+|0[xX][0-9a-fA-F]+ { +([0-9]+|0[xX][0-9a-fA-F]+)(U|L|UL|LL|ULL)? { yylval.literal = xstrdup(yytext); DPRINT("Literal: '%s'\n", yylval.literal); return DT_LITERAL; } -\&{LABEL} { /* label reference */ +<*>{CHAR_LITERAL} { + yytext[yyleng-1] = '\0'; + yylval.literal = xstrdup(yytext+1); + DPRINT("Character literal: %s\n", yylval.literal); + return DT_CHAR_LITERAL; + } + +<*>\&{LABEL} { /* label reference */ DPRINT("Ref: %s\n", yytext+1); yylval.labelref = xstrdup(yytext+1); return DT_REF; } -"&{/"{PATHCHAR}+\} { /* new-style path reference */ +<*>"&{/"{PATHCHAR}+\} { /* new-style path reference */ yytext[yyleng-1] = '\0'; DPRINT("Ref: %s\n", yytext+2); yylval.labelref = xstrdup(yytext+2); @@ -148,6 +164,15 @@ static int pop_input_file(void); <*>{COMMENT}+ /* eat C-style comments */ <*>{LINECOMMENT}+ /* eat C++-style comments */ +<*>"<<" { return DT_LSHIFT; }; +<*>">>" { return DT_RSHIFT; }; +<*>"<=" { return DT_LE; }; +<*>">=" { return DT_GE; }; +<*>"==" { return DT_EQ; }; +<*>"!=" { return DT_NE; }; +<*>"&&" { return DT_AND; }; +<*>"||" { return DT_OR; }; + <*>. { DPRINT("Char: %c (\\x%02x)\n", yytext[0], (unsigned)yytext[0]); @@ -165,100 +190,25 @@ static int pop_input_file(void); %% - -/* - * Stack of nested include file contexts. - */ - -struct incl_file { - struct dtc_file *file; - YY_BUFFER_STATE yy_prev_buf; - int yy_prev_lineno; - struct incl_file *prev; -}; - -static struct incl_file *incl_file_stack; - - -/* - * Detect infinite include recursion. - */ -#define MAX_INCLUDE_DEPTH (100) - -static int incl_depth = 0; - - static void push_input_file(const char *filename) { - struct incl_file *incl_file; - struct dtc_file *newfile; - struct search_path search, *searchptr = NULL; - assert(filename); - if (incl_depth++ >= MAX_INCLUDE_DEPTH) - die("Includes nested too deeply"); - - if (srcpos_file) { - search.dir = srcpos_file->dir; - search.next = NULL; - search.prev = NULL; - searchptr = &search; - } - - newfile = dtc_open_file(filename, searchptr); + srcfile_push(filename); - incl_file = xmalloc(sizeof(struct incl_file)); + yyin = current_srcfile->f; - /* - * Save current context. - */ - incl_file->yy_prev_buf = YY_CURRENT_BUFFER; - incl_file->yy_prev_lineno = yylineno; - incl_file->file = srcpos_file; - incl_file->prev = incl_file_stack; - - incl_file_stack = incl_file; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 03:03:13 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40929106566B; Tue, 24 Jul 2012 03:03:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11E2F8FC0A; Tue, 24 Jul 2012 03:03:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6O33C5f079480; Tue, 24 Jul 2012 03:03:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6O33CX0079479; Tue, 24 Jul 2012 03:03:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207240303.q6O33CX0079479@svn.freebsd.org> From: Warner Losh Date: Tue, 24 Jul 2012 03:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238734 - vendor/dtc/dtc-f807af19 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 03:03:13 -0000 Author: imp Date: Tue Jul 24 03:03:12 2012 New Revision: 238734 URL: http://svn.freebsd.org/changeset/base/238734 Log: Tag DTC f807af192828222dee7a5c9f94d999673bb4d8a1 Added: vendor/dtc/dtc-f807af19/ - copied from r238733, vendor/dtc/dist/ From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 04:12:45 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31F35106564A; Tue, 24 Jul 2012 04:12:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18D218FC12; Tue, 24 Jul 2012 04:12:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6O4Cji5085495; Tue, 24 Jul 2012 04:12:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6O4Cic3085487; Tue, 24 Jul 2012 04:12:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207240412.q6O4Cic3085487@svn.freebsd.org> From: Warner Losh Date: Tue, 24 Jul 2012 04:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238737 - in vendor/dtc/dist: . libfdt tests tests/search_dir tests/search_dir_b X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 04:12:45 -0000 Author: imp Date: Tue Jul 24 04:12:44 2012 New Revision: 238737 URL: http://svn.freebsd.org/changeset/base/238737 Log: Add missing files in f807af192828222dee7a5c9f94d999673bb4d8a1 import. Added: vendor/dtc/dist/Makefile.utils (contents, props changed) vendor/dtc/dist/dtdiff vendor/dtc/dist/fdtdump.c (contents, props changed) vendor/dtc/dist/fdtget.c (contents, props changed) vendor/dtc/dist/fdtput.c (contents, props changed) vendor/dtc/dist/libfdt/fdt_empty_tree.c (contents, props changed) vendor/dtc/dist/tests/appendprop.dts vendor/dtc/dist/tests/appendprop1.c (contents, props changed) vendor/dtc/dist/tests/appendprop2.c (contents, props changed) vendor/dtc/dist/tests/boot-cpuid.dts vendor/dtc/dist/tests/char_literal.c (contents, props changed) vendor/dtc/dist/tests/char_literal.dts vendor/dtc/dist/tests/dependencies.cmp vendor/dtc/dist/tests/dependencies.dts vendor/dtc/dist/tests/deps_inc1.dtsi vendor/dtc/dist/tests/deps_inc2.dtsi vendor/dtc/dist/tests/dtb_reverse.c (contents, props changed) vendor/dtc/dist/tests/dtbs_equal_unordered.c (contents, props changed) vendor/dtc/dist/tests/dtc-fails.sh (contents, props changed) vendor/dtc/dist/tests/fdtget-runtest.sh (contents, props changed) vendor/dtc/dist/tests/fdtput-runtest.sh (contents, props changed) vendor/dtc/dist/tests/include5a.dts vendor/dtc/dist/tests/integer-expressions.c (contents, props changed) vendor/dtc/dist/tests/label_repeated.dts vendor/dtc/dist/tests/lorem.txt (contents, props changed) vendor/dtc/dist/tests/multilabel.dts vendor/dtc/dist/tests/multilabel_merge.dts vendor/dtc/dist/tests/nonexist-node-ref2.dts vendor/dtc/dist/tests/reuse-label.dts vendor/dtc/dist/tests/reuse-label1.dts vendor/dtc/dist/tests/reuse-label2.dts vendor/dtc/dist/tests/reuse-label3.dts vendor/dtc/dist/tests/reuse-label4.dts vendor/dtc/dist/tests/reuse-label5.dts vendor/dtc/dist/tests/reuse-label6.dts vendor/dtc/dist/tests/search_dir/ vendor/dtc/dist/tests/search_dir/search_test.dtsi vendor/dtc/dist/tests/search_dir/search_test2.dtsi vendor/dtc/dist/tests/search_dir_b/ vendor/dtc/dist/tests/search_dir_b/search_paths_subdir.dts vendor/dtc/dist/tests/search_dir_b/search_test_b.dtsi vendor/dtc/dist/tests/search_dir_b/search_test_b2.dtsi vendor/dtc/dist/tests/search_dir_b/search_test_c.dtsi vendor/dtc/dist/tests/search_paths.dts vendor/dtc/dist/tests/search_paths_b.dts vendor/dtc/dist/tests/sized_cells.c (contents, props changed) vendor/dtc/dist/tests/sized_cells.dts vendor/dtc/dist/tests/test_tree1_merge.dts vendor/dtc/dist/tests/test_tree1_merge_labelled.dts vendor/dtc/dist/tests/test_tree1_merge_path.dts vendor/dtc/dist/tests/test_tree1_wrong1.dts vendor/dtc/dist/tests/test_tree1_wrong2.dts vendor/dtc/dist/tests/test_tree1_wrong3.dts vendor/dtc/dist/tests/test_tree1_wrong4.dts vendor/dtc/dist/tests/test_tree1_wrong5.dts vendor/dtc/dist/tests/test_tree1_wrong6.dts vendor/dtc/dist/tests/test_tree1_wrong7.dts vendor/dtc/dist/tests/test_tree1_wrong8.dts vendor/dtc/dist/tests/test_tree1_wrong9.dts vendor/dtc/dist/tests/utilfdt_test.c (contents, props changed) Added: vendor/dtc/dist/Makefile.utils ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dtc/dist/Makefile.utils Tue Jul 24 04:12:44 2012 (r238737) @@ -0,0 +1,24 @@ +# +# This is not a complete Makefile of itself. Instead, it is designed to +# be easily embeddable into other systems of Makefiles. +# + +FDTDUMP_SRCS = \ + fdtdump.c \ + util.c + +FDTDUMP_OBJS = $(FDTDUMP_SRCS:%.c=%.o) + + +FDTGET_SRCS = \ + fdtget.c \ + util.c + +FDTGET_OBJS = $(FDTGET_SRCS:%.c=%.o) + + +FDTPUT_SRCS = \ + fdtput.c \ + util.c + +FDTPUT_OBJS = $(FDTPUT_SRCS:%.c=%.o) Added: vendor/dtc/dist/dtdiff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dtc/dist/dtdiff Tue Jul 24 04:12:44 2012 (r238737) @@ -0,0 +1,38 @@ +#! /bin/bash + +# This script uses the bash <(...) extension. +# If you want to change this to work with a generic /bin/sh, make sure +# you fix that. + + +DTC=dtc + +source_and_sort () { + DT="$1" + if [ -d "$DT" ]; then + IFORMAT=fs + elif [ -f "$DT" ]; then + case "$DT" in + *.dts) + IFORMAT=dts + ;; + *.dtb) + IFORMAT=dtb + ;; + esac + fi + + if [ -z "$IFORMAT" ]; then + echo "Unrecognized format for $DT" >&2 + exit 2 + fi + + $DTC -I $IFORMAT -O dts -qq -f -s -o - "$DT" +} + +if [ $# != 2 ]; then + echo "Usage: dtdiff " >&2 + exit 1 +fi + +diff -u <(source_and_sort "$1") <(source_and_sort "$2") Added: vendor/dtc/dist/fdtdump.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dtc/dist/fdtdump.c Tue Jul 24 04:12:44 2012 (r238737) @@ -0,0 +1,162 @@ +/* + * fdtdump.c - Contributed by Pantelis Antoniou + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include "util.h" + +#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) +#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) +#define GET_CELL(p) (p += 4, *((const uint32_t *)(p-4))) + +static void print_data(const char *data, int len) +{ + int i; + const char *p = data; + + /* no data, don't print */ + if (len == 0) + return; + + if (util_is_printable_string(data, len)) { + printf(" = \"%s\"", (const char *)data); + } else if ((len % 4) == 0) { + printf(" = <"); + for (i = 0; i < len; i += 4) + printf("0x%08x%s", fdt32_to_cpu(GET_CELL(p)), + i < (len - 4) ? " " : ""); + printf(">"); + } else { + printf(" = ["); + for (i = 0; i < len; i++) + printf("%02x%s", *p++, i < len - 1 ? " " : ""); + printf("]"); + } +} + +static void dump_blob(void *blob) +{ + struct fdt_header *bph = blob; + uint32_t off_mem_rsvmap = fdt32_to_cpu(bph->off_mem_rsvmap); + uint32_t off_dt = fdt32_to_cpu(bph->off_dt_struct); + uint32_t off_str = fdt32_to_cpu(bph->off_dt_strings); + struct fdt_reserve_entry *p_rsvmap = + (struct fdt_reserve_entry *)((char *)blob + off_mem_rsvmap); + const char *p_struct = (const char *)blob + off_dt; + const char *p_strings = (const char *)blob + off_str; + uint32_t version = fdt32_to_cpu(bph->version); + uint32_t totalsize = fdt32_to_cpu(bph->totalsize); + uint32_t tag; + const char *p, *s, *t; + int depth, sz, shift; + int i; + uint64_t addr, size; + + depth = 0; + shift = 4; + + printf("/dts-v1/;\n"); + printf("// magic:\t\t0x%x\n", fdt32_to_cpu(bph->magic)); + printf("// totalsize:\t\t0x%x (%d)\n", totalsize, totalsize); + printf("// off_dt_struct:\t0x%x\n", off_dt); + printf("// off_dt_strings:\t0x%x\n", off_str); + printf("// off_mem_rsvmap:\t0x%x\n", off_mem_rsvmap); + printf("// version:\t\t%d\n", version); + printf("// last_comp_version:\t%d\n", + fdt32_to_cpu(bph->last_comp_version)); + if (version >= 2) + printf("// boot_cpuid_phys:\t0x%x\n", + fdt32_to_cpu(bph->boot_cpuid_phys)); + + if (version >= 3) + printf("// size_dt_strings:\t0x%x\n", + fdt32_to_cpu(bph->size_dt_strings)); + if (version >= 17) + printf("// size_dt_struct:\t0x%x\n", + fdt32_to_cpu(bph->size_dt_struct)); + printf("\n"); + + for (i = 0; ; i++) { + addr = fdt64_to_cpu(p_rsvmap[i].address); + size = fdt64_to_cpu(p_rsvmap[i].size); + if (addr == 0 && size == 0) + break; + + printf("/memreserve/ %llx %llx;\n", + (unsigned long long)addr, (unsigned long long)size); + } + + p = p_struct; + while ((tag = fdt32_to_cpu(GET_CELL(p))) != FDT_END) { + + /* printf("tag: 0x%08x (%d)\n", tag, p - p_struct); */ + + if (tag == FDT_BEGIN_NODE) { + s = p; + p = PALIGN(p + strlen(s) + 1, 4); + + if (*s == '\0') + s = "/"; + + printf("%*s%s {\n", depth * shift, "", s); + + depth++; + continue; + } + + if (tag == FDT_END_NODE) { + depth--; + + printf("%*s};\n", depth * shift, ""); + continue; + } + + if (tag == FDT_NOP) { + printf("%*s// [NOP]\n", depth * shift, ""); + continue; + } + + if (tag != FDT_PROP) { + fprintf(stderr, "%*s ** Unknown tag 0x%08x\n", depth * shift, "", tag); + break; + } + sz = fdt32_to_cpu(GET_CELL(p)); + s = p_strings + fdt32_to_cpu(GET_CELL(p)); + if (version < 16 && sz >= 8) + p = PALIGN(p, 8); + t = p; + + p = PALIGN(p + sz, 4); + + printf("%*s%s", depth * shift, "", s); + print_data(t, sz); + printf(";\n"); + } +} + + +int main(int argc, char *argv[]) +{ + char *buf; + + if (argc < 2) { + fprintf(stderr, "supply input filename\n"); + return 5; + } + + buf = utilfdt_read(argv[1]); + if (buf) + dump_blob(buf); + else + return 10; + + return 0; +} Added: vendor/dtc/dist/fdtget.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dtc/dist/fdtget.c Tue Jul 24 04:12:44 2012 (r238737) @@ -0,0 +1,366 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * + * Portions from U-Boot cmd_fdt.c (C) Copyright 2007 + * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com + * Based on code written by: + * Pantelis Antoniou and + * Matthew McClintock + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include "util.h" + +enum display_mode { + MODE_SHOW_VALUE, /* show values for node properties */ + MODE_LIST_PROPS, /* list the properties for a node */ + MODE_LIST_SUBNODES, /* list the subnodes of a node */ +}; + +/* Holds information which controls our output and options */ +struct display_info { + int type; /* data type (s/i/u/x or 0 for default) */ + int size; /* data size (1/2/4) */ + enum display_mode mode; /* display mode that we are using */ + const char *default_val; /* default value if node/property not found */ +}; + +static void report_error(const char *where, int err) +{ + fprintf(stderr, "Error at '%s': %s\n", where, fdt_strerror(err)); +} + +/** + * Displays data of a given length according to selected options + * + * If a specific data type is provided in disp, then this is used. Otherwise + * we try to guess the data type / size from the contents. + * + * @param disp Display information / options + * @param data Data to display + * @param len Maximum length of buffer + * @return 0 if ok, -1 if data does not match format + */ +static int show_data(struct display_info *disp, const char *data, int len) +{ + int i, size; + const uint8_t *p = (const uint8_t *)data; + const char *s; + int value; + int is_string; + char fmt[3]; + + /* no data, don't print */ + if (len == 0) + return 0; + + is_string = (disp->type) == 's' || + (!disp->type && util_is_printable_string(data, len)); + if (is_string) { + if (data[len - 1] != '\0') { + fprintf(stderr, "Unterminated string\n"); + return -1; + } + for (s = data; s - data < len; s += strlen(s) + 1) { + if (s != data) + printf(" "); + printf("%s", (const char *)s); + } + return 0; + } + size = disp->size; + if (size == -1) { + size = (len % 4) == 0 ? 4 : 1; + } else if (len % size) { + fprintf(stderr, "Property length must be a multiple of " + "selected data size\n"); + return -1; + } + fmt[0] = '%'; + fmt[1] = disp->type ? disp->type : 'd'; + fmt[2] = '\0'; + for (i = 0; i < len; i += size, p += size) { + if (i) + printf(" "); + value = size == 4 ? fdt32_to_cpu(*(const uint32_t *)p) : + size == 2 ? (*p << 8) | p[1] : *p; + printf(fmt, value); + } + return 0; +} + +/** + * List all properties in a node, one per line. + * + * @param blob FDT blob + * @param node Node to display + * @return 0 if ok, or FDT_ERR... if not. + */ +static int list_properties(const void *blob, int node) +{ + const struct fdt_property *data; + const char *name; + int prop; + + prop = fdt_first_property_offset(blob, node); + do { + /* Stop silently when there are no more properties */ + if (prop < 0) + return prop == -FDT_ERR_NOTFOUND ? 0 : prop; + data = fdt_get_property_by_offset(blob, prop, NULL); + name = fdt_string(blob, fdt32_to_cpu(data->nameoff)); + if (name) + puts(name); + prop = fdt_next_property_offset(blob, prop); + } while (1); +} + +#define MAX_LEVEL 32 /* how deeply nested we will go */ + +/** + * List all subnodes in a node, one per line + * + * @param blob FDT blob + * @param node Node to display + * @return 0 if ok, or FDT_ERR... if not. + */ +static int list_subnodes(const void *blob, int node) +{ + int nextoffset; /* next node offset from libfdt */ + uint32_t tag; /* current tag */ + int level = 0; /* keep track of nesting level */ + const char *pathp; + int depth = 1; /* the assumed depth of this node */ + + while (level >= 0) { + tag = fdt_next_tag(blob, node, &nextoffset); + switch (tag) { + case FDT_BEGIN_NODE: + pathp = fdt_get_name(blob, node, NULL); + if (level <= depth) { + if (pathp == NULL) + pathp = "/* NULL pointer error */"; + if (*pathp == '\0') + pathp = "/"; /* root is nameless */ + if (level == 1) + puts(pathp); + } + level++; + if (level >= MAX_LEVEL) { + printf("Nested too deep, aborting.\n"); + return 1; + } + break; + case FDT_END_NODE: + level--; + if (level == 0) + level = -1; /* exit the loop */ + break; + case FDT_END: + return 1; + case FDT_PROP: + break; + default: + if (level <= depth) + printf("Unknown tag 0x%08X\n", tag); + return 1; + } + node = nextoffset; + } + return 0; +} + +/** + * Show the data for a given node (and perhaps property) according to the + * display option provided. + * + * @param blob FDT blob + * @param disp Display information / options + * @param node Node to display + * @param property Name of property to display, or NULL if none + * @return 0 if ok, -ve on error + */ +static int show_data_for_item(const void *blob, struct display_info *disp, + int node, const char *property) +{ + const void *value = NULL; + int len, err = 0; + + switch (disp->mode) { + case MODE_LIST_PROPS: + err = list_properties(blob, node); + break; + + case MODE_LIST_SUBNODES: + err = list_subnodes(blob, node); + break; + + default: + assert(property); + value = fdt_getprop(blob, node, property, &len); + if (value) { + if (show_data(disp, value, len)) + err = -1; + else + printf("\n"); + } else if (disp->default_val) { + puts(disp->default_val); + } else { + report_error(property, len); + err = -1; + } + break; + } + + return err; +} + +/** + * Run the main fdtget operation, given a filename and valid arguments + * + * @param disp Display information / options + * @param filename Filename of blob file + * @param arg List of arguments to process + * @param arg_count Number of arguments + * @param return 0 if ok, -ve on error + */ +static int do_fdtget(struct display_info *disp, const char *filename, + char **arg, int arg_count, int args_per_step) +{ + char *blob; + const char *prop; + int i, node; + + blob = utilfdt_read(filename); + if (!blob) + return -1; + + for (i = 0; i + args_per_step <= arg_count; i += args_per_step) { + node = fdt_path_offset(blob, arg[i]); + if (node < 0) { + if (disp->default_val) { + puts(disp->default_val); + continue; + } else { + report_error(arg[i], node); + return -1; + } + } + prop = args_per_step == 1 ? NULL : arg[i + 1]; + + if (show_data_for_item(blob, disp, node, prop)) + return -1; + } + return 0; +} + +static const char *usage_msg = + "fdtget - read values from device tree\n" + "\n" + "Each value is printed on a new line.\n\n" + "Usage:\n" + " fdtget
[ ]...\n" + " fdtget -p
[ ]...\n" + "Options:\n" + "\t-t \tType of data\n" + "\t-p\t\tList properties for each node\n" + "\t-l\t\tList subnodes for each node\n" + "\t-d\t\tDefault value to display when the property is " + "missing\n" + "\t-h\t\tPrint this help\n\n" + USAGE_TYPE_MSG; + +static void usage(const char *msg) +{ + if (msg) + fprintf(stderr, "Error: %s\n\n", msg); + + fprintf(stderr, "%s", usage_msg); + exit(2); +} + +int main(int argc, char *argv[]) +{ + char *filename = NULL; + struct display_info disp; + int args_per_step = 2; + + /* set defaults */ + memset(&disp, '\0', sizeof(disp)); + disp.size = -1; + disp.mode = MODE_SHOW_VALUE; + for (;;) { + int c = getopt(argc, argv, "d:hlpt:"); + if (c == -1) + break; + + switch (c) { + case 'h': + case '?': + usage(NULL); + + case 't': + if (utilfdt_decode_type(optarg, &disp.type, + &disp.size)) + usage("Invalid type string"); + break; + + case 'p': + disp.mode = MODE_LIST_PROPS; + args_per_step = 1; + break; + + case 'l': + disp.mode = MODE_LIST_SUBNODES; + args_per_step = 1; + break; + + case 'd': + disp.default_val = optarg; + break; + } + } + + if (optind < argc) + filename = argv[optind++]; + if (!filename) + usage("Missing filename"); + + argv += optind; + argc -= optind; + + /* Allow no arguments, and silently succeed */ + if (!argc) + return 0; + + /* Check for node, property arguments */ + if (args_per_step == 2 && (argc % 2)) + usage("Must have an even number of arguments"); + + if (do_fdtget(&disp, filename, argv, argc, args_per_step)) + return 1; + return 0; +} Added: vendor/dtc/dist/fdtput.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dtc/dist/fdtput.c Tue Jul 24 04:12:44 2012 (r238737) @@ -0,0 +1,362 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include "util.h" + +/* These are the operations we support */ +enum oper_type { + OPER_WRITE_PROP, /* Write a property in a node */ + OPER_CREATE_NODE, /* Create a new node */ +}; + +struct display_info { + enum oper_type oper; /* operation to perform */ + int type; /* data type (s/i/u/x or 0 for default) */ + int size; /* data size (1/2/4) */ + int verbose; /* verbose output */ + int auto_path; /* automatically create all path components */ +}; + + +/** + * Report an error with a particular node. + * + * @param name Node name to report error on + * @param namelen Length of node name, or -1 to use entire string + * @param err Error number to report (-FDT_ERR_...) + */ +static void report_error(const char *name, int namelen, int err) +{ + if (namelen == -1) + namelen = strlen(name); + fprintf(stderr, "Error at '%1.*s': %s\n", namelen, name, + fdt_strerror(err)); +} + +/** + * Encode a series of arguments in a property value. + * + * @param disp Display information / options + * @param arg List of arguments from command line + * @param arg_count Number of arguments (may be 0) + * @param valuep Returns buffer containing value + * @param *value_len Returns length of value encoded + */ +static int encode_value(struct display_info *disp, char **arg, int arg_count, + char **valuep, int *value_len) +{ + char *value = NULL; /* holding area for value */ + int value_size = 0; /* size of holding area */ + char *ptr; /* pointer to current value position */ + int len; /* length of this cell/string/byte */ + int ival; + int upto; /* the number of bytes we have written to buf */ + char fmt[3]; + + upto = 0; + + if (disp->verbose) + fprintf(stderr, "Decoding value:\n"); + + fmt[0] = '%'; + fmt[1] = disp->type ? disp->type : 'd'; + fmt[2] = '\0'; + for (; arg_count > 0; arg++, arg_count--, upto += len) { + /* assume integer unless told otherwise */ + if (disp->type == 's') + len = strlen(*arg) + 1; + else + len = disp->size == -1 ? 4 : disp->size; + + /* enlarge our value buffer by a suitable margin if needed */ + if (upto + len > value_size) { + value_size = (upto + len) + 500; + value = realloc(value, value_size); + if (!value) { + fprintf(stderr, "Out of mmory: cannot alloc " + "%d bytes\n", value_size); + return -1; + } + } + + ptr = value + upto; + if (disp->type == 's') { + memcpy(ptr, *arg, len); + if (disp->verbose) + fprintf(stderr, "\tstring: '%s'\n", ptr); + } else { + int *iptr = (int *)ptr; + sscanf(*arg, fmt, &ival); + if (len == 4) + *iptr = cpu_to_fdt32(ival); + else + *ptr = (uint8_t)ival; + if (disp->verbose) { + fprintf(stderr, "\t%s: %d\n", + disp->size == 1 ? "byte" : + disp->size == 2 ? "short" : "int", + ival); + } + } + } + *value_len = upto; + *valuep = value; + if (disp->verbose) + fprintf(stderr, "Value size %d\n", upto); + return 0; +} + +static int store_key_value(void *blob, const char *node_name, + const char *property, const char *buf, int len) +{ + int node; + int err; + + node = fdt_path_offset(blob, node_name); + if (node < 0) { + report_error(node_name, -1, node); + return -1; + } + + err = fdt_setprop(blob, node, property, buf, len); + if (err) { + report_error(property, -1, err); + return -1; + } + return 0; +} + +/** + * Create paths as needed for all components of a path + * + * Any components of the path that do not exist are created. Errors are + * reported. + * + * @param blob FDT blob to write into + * @param in_path Path to process + * @return 0 if ok, -1 on error + */ +static int create_paths(void *blob, const char *in_path) +{ + const char *path = in_path; + const char *sep; + int node, offset = 0; + + /* skip leading '/' */ + while (*path == '/') + path++; + + for (sep = path; *sep; path = sep + 1, offset = node) { + /* equivalent to strchrnul(), but it requires _GNU_SOURCE */ + sep = strchr(path, '/'); + if (!sep) + sep = path + strlen(path); + + node = fdt_subnode_offset_namelen(blob, offset, path, + sep - path); + if (node == -FDT_ERR_NOTFOUND) { + node = fdt_add_subnode_namelen(blob, offset, path, + sep - path); + } + if (node < 0) { + report_error(path, sep - path, node); + return -1; + } + } + + return 0; +} + +/** + * Create a new node in the fdt. + * + * This will overwrite the node_name string. Any error is reported. + * + * TODO: Perhaps create fdt_path_offset_namelen() so we don't need to do this. + * + * @param blob FDT blob to write into + * @param node_name Name of node to create + * @return new node offset if found, or -1 on failure + */ +static int create_node(void *blob, const char *node_name) +{ + int node = 0; + char *p; + + p = strrchr(node_name, '/'); + if (!p) { + report_error(node_name, -1, -FDT_ERR_BADPATH); + return -1; + } + *p = '\0'; + + if (p > node_name) { + node = fdt_path_offset(blob, node_name); + if (node < 0) { + report_error(node_name, -1, node); + return -1; + } + } + + node = fdt_add_subnode(blob, node, p + 1); + if (node < 0) { + report_error(p + 1, -1, node); + return -1; + } + + return 0; +} + +static int do_fdtput(struct display_info *disp, const char *filename, + char **arg, int arg_count) +{ + char *value; + char *blob; + int len, ret = 0; + + blob = utilfdt_read(filename); + if (!blob) + return -1; + + switch (disp->oper) { + case OPER_WRITE_PROP: + /* + * Convert the arguments into a single binary value, then + * store them into the property. + */ + assert(arg_count >= 2); + if (disp->auto_path && create_paths(blob, *arg)) + return -1; + if (encode_value(disp, arg + 2, arg_count - 2, &value, &len) || + store_key_value(blob, *arg, arg[1], value, len)) + ret = -1; + break; + case OPER_CREATE_NODE: + for (; ret >= 0 && arg_count--; arg++) { + if (disp->auto_path) + ret = create_paths(blob, *arg); + else + ret = create_node(blob, *arg); + } + break; + } + if (ret >= 0) + ret = utilfdt_write(filename, blob); + + free(blob); + return ret; +} + +static const char *usage_msg = + "fdtput - write a property value to a device tree\n" + "\n" + "The command line arguments are joined together into a single value.\n" + "\n" + "Usage:\n" + " fdtput
[...]\n" + " fdtput -c
[...]\n" + "Options:\n" + "\t-c\t\tCreate nodes if they don't already exist\n" + "\t-p\t\tAutomatically create nodes as needed for the node path\n" + "\t-t \tType of data\n" + "\t-v\t\tVerbose: display each value decoded from command line\n" + "\t-h\t\tPrint this help\n\n" + USAGE_TYPE_MSG; + +static void usage(const char *msg) +{ + if (msg) + fprintf(stderr, "Error: %s\n\n", msg); + + fprintf(stderr, "%s", usage_msg); + exit(2); +} + +int main(int argc, char *argv[]) +{ + struct display_info disp; + char *filename = NULL; + + memset(&disp, '\0', sizeof(disp)); + disp.size = -1; + disp.oper = OPER_WRITE_PROP; + for (;;) { + int c = getopt(argc, argv, "chpt:v"); + if (c == -1) + break; + + /* + * TODO: add options to: + * - delete property + * - delete node (optionally recursively) + * - rename node + * - pack fdt before writing + * - set amount of free space when writing + * - expand fdt if value doesn't fit + */ + switch (c) { + case 'c': + disp.oper = OPER_CREATE_NODE; + break; + case 'h': + case '?': + usage(NULL); + case 'p': + disp.auto_path = 1; + break; + case 't': + if (utilfdt_decode_type(optarg, &disp.type, + &disp.size)) + usage("Invalid type string"); + break; + + case 'v': + disp.verbose = 1; + break; + } + } + + if (optind < argc) + filename = argv[optind++]; + if (!filename) + usage("Missing filename"); + + argv += optind; + argc -= optind; + + if (disp.oper == OPER_WRITE_PROP) { + if (argc < 1) + usage("Missing node"); + if (argc < 2) + usage("Missing property"); + } + + if (do_fdtput(&disp, filename, argv, argc)) + return 1; + return 0; +} Added: vendor/dtc/dist/libfdt/fdt_empty_tree.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dtc/dist/libfdt/fdt_empty_tree.c Tue Jul 24 04:12:44 2012 (r238737) @@ -0,0 +1,84 @@ +/* + * libfdt - Flat Device Tree manipulation + * Copyright (C) 2012 David Gibson, IBM Corporation. + * + * libfdt is dual licensed: you can use it either under the terms of + * the GPL, or the BSD license, at your option. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + * + * Alternatively, + * + * b) Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 04:14:17 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 991C1106564A; Tue, 24 Jul 2012 04:14:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B02D8FC18; Tue, 24 Jul 2012 04:14:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6O4EHwN085645; Tue, 24 Jul 2012 04:14:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6O4EHiE085644; Tue, 24 Jul 2012 04:14:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207240414.q6O4EHiE085644@svn.freebsd.org> From: Warner Losh Date: Tue, 24 Jul 2012 04:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238738 - vendor/dtc/dtc-f807af19/dist X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 04:14:17 -0000 Author: imp Date: Tue Jul 24 04:14:16 2012 New Revision: 238738 URL: http://svn.freebsd.org/changeset/base/238738 Log: Recopy after fixing f807af192828222dee7a5c9f94d999673bb4d8a1 import. Added: vendor/dtc/dtc-f807af19/dist/ - copied from r238737, vendor/dtc/dist/ From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 18:48:17 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA013106566C; Tue, 24 Jul 2012 18:48:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B41808FC15; Tue, 24 Jul 2012 18:48:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6OImHBs061688; Tue, 24 Jul 2012 18:48:17 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6OImHtG061683; Tue, 24 Jul 2012 18:48:17 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207241848.q6OImHtG061683@svn.freebsd.org> From: Doug Barton Date: Tue, 24 Jul 2012 18:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238744 - in vendor/bind9/dist: . lib/dns X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 18:48:17 -0000 Author: dougb Date: Tue Jul 24 18:48:17 2012 New Revision: 238744 URL: http://svn.freebsd.org/changeset/base/238744 Log: Vendor import of BIND 9.8.3-P2 Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/lib/dns/resolver.c vendor/bind9/dist/lib/dns/zone.c vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Tue Jul 24 18:01:28 2012 (r238743) +++ vendor/bind9/dist/CHANGES Tue Jul 24 18:48:17 2012 (r238744) @@ -1,3 +1,12 @@ + --- 9.8.3-P2 released --- + +3346. [security] Bad-cache data could be used before it was + initialized, causing an assert. [RT #30025] + +3342. [bug] Change #3314 broke saving of stub zones to disk + resulting in excessive cpu usage in some cases. + [RT #29952] + --- 9.8.3-P1 released --- 3331. [security] dns_rdataslab_fromrdataset could produce bad Modified: vendor/bind9/dist/lib/dns/resolver.c ============================================================================== --- vendor/bind9/dist/lib/dns/resolver.c Tue Jul 24 18:01:28 2012 (r238743) +++ vendor/bind9/dist/lib/dns/resolver.c Tue Jul 24 18:48:17 2012 (r238744) @@ -8448,6 +8448,7 @@ dns_resolver_addbadcache(dns_resolver_t goto cleanup; bad->type = type; bad->hashval = hashval; + bad->expire = *expire; isc_buffer_init(&buffer, bad + 1, name->length); dns_name_init(&bad->name, NULL); dns_name_copy(name, &bad->name, &buffer); @@ -8459,8 +8460,8 @@ dns_resolver_addbadcache(dns_resolver_t if (resolver->badcount < resolver->badhash * 2 && resolver->badhash > DNS_BADCACHE_SIZE) resizehash(resolver, &now, ISC_FALSE); - } - bad->expire = *expire; + } else + bad->expire = *expire; cleanup: UNLOCK(&resolver->lock); } Modified: vendor/bind9/dist/lib/dns/zone.c ============================================================================== --- vendor/bind9/dist/lib/dns/zone.c Tue Jul 24 18:01:28 2012 (r238743) +++ vendor/bind9/dist/lib/dns/zone.c Tue Jul 24 18:48:17 2012 (r238744) @@ -8027,13 +8027,14 @@ zone_maintenance(dns_zone_t *zone) { case dns_zone_master: case dns_zone_slave: case dns_zone_key: + case dns_zone_stub: LOCK_ZONE(zone); if (zone->masterfile != NULL && isc_time_compare(&now, &zone->dumptime) >= 0 && DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED) && DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDDUMP)) { dumping = was_dumping(zone); - } else + } else dumping = ISC_TRUE; UNLOCK_ZONE(zone); if (!dumping) { @@ -8386,7 +8387,7 @@ zone_dump(dns_zone_t *zone, isc_boolean_ goto fail; } - if (compact) { + if (compact && zone->type != dns_zone_stub) { dns_zone_t *dummy = NULL; LOCK_ZONE(zone); zone_iattach(zone, &dummy); @@ -9242,7 +9243,7 @@ stub_callback(isc_task_t *task, isc_even dns_zone_t *zone = NULL; char master[ISC_SOCKADDR_FORMATSIZE]; char source[ISC_SOCKADDR_FORMATSIZE]; - isc_uint32_t nscnt, cnamecnt; + isc_uint32_t nscnt, cnamecnt, refresh, retry, expire; isc_result_t result; isc_time_t now; isc_boolean_t exiting = ISC_FALSE; @@ -9390,19 +9391,32 @@ stub_callback(isc_task_t *task, isc_even ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_write); if (zone->db == NULL) zone_attachdb(zone, stub->db); + result = zone_get_from_db(zone, zone->db, NULL, NULL, NULL, &refresh, + &retry, &expire, NULL, NULL); + if (result == ISC_R_SUCCESS) { + zone->refresh = RANGE(refresh, zone->minrefresh, + zone->maxrefresh); + zone->retry = RANGE(retry, zone->minretry, zone->maxretry); + zone->expire = RANGE(expire, zone->refresh + zone->retry, + DNS_MAX_EXPIRE); + DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_HAVETIMERS); + } ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_write); dns_db_detach(&stub->db); - if (zone->masterfile != NULL) - zone_needdump(zone, 0); - dns_message_destroy(&msg); isc_event_free(&event); dns_request_destroy(&zone->request); + DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH); + DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_LOADED); DNS_ZONE_JITTER_ADD(&now, zone->refresh, &zone->refreshtime); isc_interval_set(&i, zone->expire, 0); DNS_ZONE_TIME_ADD(&now, zone->expire, &zone->expiretime); + + if (zone->masterfile != NULL) + zone_needdump(zone, 0); + zone_settimer(zone, &now); goto free_stub; Modified: vendor/bind9/dist/version ============================================================================== --- vendor/bind9/dist/version Tue Jul 24 18:01:28 2012 (r238743) +++ vendor/bind9/dist/version Tue Jul 24 18:48:17 2012 (r238744) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=1 +RELEASEVER=2 From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 18:49:19 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2ED581065677; Tue, 24 Jul 2012 18:49:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 017548FC20; Tue, 24 Jul 2012 18:49:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6OInII6061806; Tue, 24 Jul 2012 18:49:18 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6OInIXq061805; Tue, 24 Jul 2012 18:49:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207241849.q6OInIXq061805@svn.freebsd.org> From: Doug Barton Date: Tue, 24 Jul 2012 18:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238745 - vendor/bind9/9.8.3-P2 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 18:49:19 -0000 Author: dougb Date: Tue Jul 24 18:49:18 2012 New Revision: 238745 URL: http://svn.freebsd.org/changeset/base/238745 Log: Tag the 9.8.3-P2 release Added: vendor/bind9/9.8.3-P2/ - copied from r238744, vendor/bind9/dist/ From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 19:00:37 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 105341065670; Tue, 24 Jul 2012 19:00:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E49BC8FC15; Tue, 24 Jul 2012 19:00:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6OJ0axm062854; Tue, 24 Jul 2012 19:00:36 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6OJ0aiG062848; Tue, 24 Jul 2012 19:00:36 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207241900.q6OJ0aiG062848@svn.freebsd.org> From: Doug Barton Date: Tue, 24 Jul 2012 19:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238747 - in vendor/bind9/dist-9.6: . lib/dns lib/isc X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 19:00:37 -0000 Author: dougb Date: Tue Jul 24 19:00:36 2012 New Revision: 238747 URL: http://svn.freebsd.org/changeset/base/238747 Log: Vendor import of BIND 9.6-ESV-R7-P2 Modified: vendor/bind9/dist-9.6/CHANGES vendor/bind9/dist-9.6/lib/dns/resolver.c vendor/bind9/dist-9.6/lib/dns/zone.c vendor/bind9/dist-9.6/lib/isc/random.c vendor/bind9/dist-9.6/version Modified: vendor/bind9/dist-9.6/CHANGES ============================================================================== --- vendor/bind9/dist-9.6/CHANGES Tue Jul 24 18:53:28 2012 (r238746) +++ vendor/bind9/dist-9.6/CHANGES Tue Jul 24 19:00:36 2012 (r238747) @@ -1,3 +1,14 @@ + --- 9.6-ESV-R7-P2 released --- + +3346. [security] Bad-cache data could be used before it was + initialized, causing an assert. [RT #30025] + +3343. [bug] Relax isc_random_jitter() REQUIRE tests. [RT #29821] + +3342. [bug] Change #3314 broke saving of stub zones to disk + resulting in excessive cpu usage in some cases. + [RT #29952] + --- 9.6-ESV-R7-P1 released --- 3331. [security] dns_rdataslab_fromrdataset could produce bad Modified: vendor/bind9/dist-9.6/lib/dns/resolver.c ============================================================================== --- vendor/bind9/dist-9.6/lib/dns/resolver.c Tue Jul 24 18:53:28 2012 (r238746) +++ vendor/bind9/dist-9.6/lib/dns/resolver.c Tue Jul 24 19:00:36 2012 (r238747) @@ -8124,6 +8124,7 @@ dns_resolver_addbadcache(dns_resolver_t goto cleanup; bad->type = type; bad->hashval = hashval; + bad->expire = *expire; isc_buffer_init(&buffer, bad + 1, name->length); dns_name_init(&bad->name, NULL); dns_name_copy(name, &bad->name, &buffer); @@ -8135,8 +8136,8 @@ dns_resolver_addbadcache(dns_resolver_t if (resolver->badcount < resolver->badhash * 2 && resolver->badhash > DNS_BADCACHE_SIZE) resizehash(resolver, &now, ISC_FALSE); - } - bad->expire = *expire; + } else + bad->expire = *expire; cleanup: UNLOCK(&resolver->lock); } Modified: vendor/bind9/dist-9.6/lib/dns/zone.c ============================================================================== --- vendor/bind9/dist-9.6/lib/dns/zone.c Tue Jul 24 18:53:28 2012 (r238746) +++ vendor/bind9/dist-9.6/lib/dns/zone.c Tue Jul 24 19:00:36 2012 (r238747) @@ -6054,6 +6054,7 @@ zone_maintenance(dns_zone_t *zone) { switch (zone->type) { case dns_zone_master: case dns_zone_slave: + case dns_zone_stub: LOCK_ZONE(zone); if (zone->masterfile != NULL && isc_time_compare(&now, &zone->dumptime) >= 0 && @@ -6395,7 +6396,7 @@ zone_dump(dns_zone_t *zone, isc_boolean_ goto fail; } - if (compact) { + if (compact && zone->type != dns_zone_stub) { dns_zone_t *dummy = NULL; LOCK_ZONE(zone); zone_iattach(zone, &dummy); @@ -7251,7 +7252,7 @@ stub_callback(isc_task_t *task, isc_even dns_zone_t *zone = NULL; char master[ISC_SOCKADDR_FORMATSIZE]; char source[ISC_SOCKADDR_FORMATSIZE]; - isc_uint32_t nscnt, cnamecnt; + isc_uint32_t nscnt, cnamecnt, refresh, retry, expire; isc_result_t result; isc_time_t now; isc_boolean_t exiting = ISC_FALSE; @@ -7399,19 +7400,32 @@ stub_callback(isc_task_t *task, isc_even ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_write); if (zone->db == NULL) zone_attachdb(zone, stub->db); + result = zone_get_from_db(zone, zone->db, NULL, NULL, NULL, &refresh, + &retry, &expire, NULL, NULL); + if (result == ISC_R_SUCCESS) { + zone->refresh = RANGE(refresh, zone->minrefresh, + zone->maxrefresh); + zone->retry = RANGE(retry, zone->minretry, zone->maxretry); + zone->expire = RANGE(expire, zone->refresh + zone->retry, + DNS_MAX_EXPIRE); + DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_HAVETIMERS); + } ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_write); dns_db_detach(&stub->db); - if (zone->masterfile != NULL) - zone_needdump(zone, 0); - dns_message_destroy(&msg); isc_event_free(&event); dns_request_destroy(&zone->request); + DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH); + DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_LOADED); DNS_ZONE_JITTER_ADD(&now, zone->refresh, &zone->refreshtime); isc_interval_set(&i, zone->expire, 0); DNS_ZONE_TIME_ADD(&now, zone->expire, &zone->expiretime); + + if (zone->masterfile != NULL) + zone_needdump(zone, 0); + zone_settimer(zone, &now); goto free_stub; Modified: vendor/bind9/dist-9.6/lib/isc/random.c ============================================================================== --- vendor/bind9/dist-9.6/lib/isc/random.c Tue Jul 24 18:53:28 2012 (r238746) +++ vendor/bind9/dist-9.6/lib/isc/random.c Tue Jul 24 19:00:36 2012 (r238747) @@ -103,7 +103,7 @@ isc_uint32_t isc_random_jitter(isc_uint32_t max, isc_uint32_t jitter) { isc_uint32_t rnd; - REQUIRE(jitter < max); + REQUIRE(jitter < max || (jitter == 0 && max == 0)); if (jitter == 0) return (max); Modified: vendor/bind9/dist-9.6/version ============================================================================== --- vendor/bind9/dist-9.6/version Tue Jul 24 18:53:28 2012 (r238746) +++ vendor/bind9/dist-9.6/version Tue Jul 24 19:00:36 2012 (r238747) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=6 PATCHVER= RELEASETYPE=-ESV -RELEASEVER=-R7-P1 +RELEASEVER=-R7-P2 From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 19:00:57 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0BFBA106564A; Tue, 24 Jul 2012 19:00:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D156F8FC08; Tue, 24 Jul 2012 19:00:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6OJ0ujR062911; Tue, 24 Jul 2012 19:00:56 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6OJ0uWW062910; Tue, 24 Jul 2012 19:00:56 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207241900.q6OJ0uWW062910@svn.freebsd.org> From: Doug Barton Date: Tue, 24 Jul 2012 19:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238748 - vendor/bind9/9.6-ESV-R7-P2 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 19:00:57 -0000 Author: dougb Date: Tue Jul 24 19:00:56 2012 New Revision: 238748 URL: http://svn.freebsd.org/changeset/base/238748 Log: Tag the 9.6-ESV-R7-P2 release Added: vendor/bind9/9.6-ESV-R7-P2/ - copied from r238747, vendor/bind9/dist-9.6/ From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 24 19:08:12 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C14761065673; Tue, 24 Jul 2012 19:08:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91E278FC19; Tue, 24 Jul 2012 19:08:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6OJ8CK6063622; Tue, 24 Jul 2012 19:08:12 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6OJ8CJj063618; Tue, 24 Jul 2012 19:08:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207241908.q6OJ8CJj063618@svn.freebsd.org> From: Doug Barton Date: Tue, 24 Jul 2012 19:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238750 - in vendor/bind9: dist dist-9.6 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2012 19:08:12 -0000 Author: dougb Date: Tue Jul 24 19:08:12 2012 New Revision: 238750 URL: http://svn.freebsd.org/changeset/base/238750 Log: Update to reflect new svn realities Modified: vendor/bind9/dist-9.6/FREEBSD-Upgrade vendor/bind9/dist/FREEBSD-Upgrade Modified: vendor/bind9/dist-9.6/FREEBSD-Upgrade ============================================================================== --- vendor/bind9/dist-9.6/FREEBSD-Upgrade Tue Jul 24 19:04:35 2012 (r238749) +++ vendor/bind9/dist-9.6/FREEBSD-Upgrade Tue Jul 24 19:08:12 2012 (r238750) @@ -7,7 +7,8 @@ 2) Check out the head of the subversion "vendor branch" - svn co $REPO/vendor/bind9/dist-9.6 + REPO=svn+ssh://svn.freebsd.org/ + svn co $REPO/base/vendor/bind9/dist-9.6 3) Unpack the tarball in a suitable directory: @@ -32,21 +33,21 @@ 7) Commit the update to the vendor files: cd dist-9.6 ; svn ci -m "Vendor import of BIND 9.X.Y" - svn cp $REPO/vendor/bind9/dist-9.6 $REPO/vendor/bind9/${version} + svn cp $REPO/base/vendor/bind9/dist-9.6 $REPO/base/vendor/bind9/${version} (this is a server-side operation, you dont have to check it out) 8) Update the files in src/contrib/bind9: - cd head/contrib/bind9 + cd stable/8/contrib/bind9 Make sure you are up to date: svn update ; svn status - svn merge $REPO/vendor/bind9/dist-9.6 . + svn merge $REPO/base/vendor/bind9/dist-9.6 . Resolve conflicts (if any) Carefully check the output of 'svn status' and 'svn diff' - NOTE: You may need 2 copies of head/contrib/bind9 at this point, + NOTE: You may need 2 copies of stable/8/contrib/bind9 at this point, one to do the work in steps 9 and 10 below, and a clean version to commit in step 16. Modified: vendor/bind9/dist/FREEBSD-Upgrade ============================================================================== --- vendor/bind9/dist/FREEBSD-Upgrade Tue Jul 24 19:04:35 2012 (r238749) +++ vendor/bind9/dist/FREEBSD-Upgrade Tue Jul 24 19:08:12 2012 (r238750) @@ -7,7 +7,8 @@ 2) Check out the head of the subversion "vendor branch" - svn co $REPO/vendor/bind9/dist + REPO=svn+ssh://svn.freebsd.org/ + svn co $REPO/base/vendor/bind9/dist 3) Unpack the tarball in a suitable directory: @@ -32,7 +33,7 @@ 7) Commit the update to the vendor files: cd dist ; svn ci -m "Vendor import of BIND 9.X.Y" - svn cp $REPO/vendor/bind9/dist $REPO/vendor/bind9/${version} + svn cp $REPO/base/vendor/bind9/dist $REPO/base/vendor/bind9/${version} (this is a server-side operation, you dont have to check it out) 8) Update the files in src/contrib/bind9: @@ -42,7 +43,7 @@ Make sure you are up to date: svn update ; svn status - svn merge $REPO/vendor/bind9/dist . + svn merge $REPO/base/vendor/bind9/dist . Resolve conflicts (if any) Carefully check the output of 'svn status' and 'svn diff' From owner-svn-src-vendor@FreeBSD.ORG Thu Jul 26 10:41:49 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD583106566B; Thu, 26 Jul 2012 10:41:49 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D43E8FC14; Thu, 26 Jul 2012 10:41:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6QAfnFg067810; Thu, 26 Jul 2012 10:41:49 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6QAfnIX067806; Thu, 26 Jul 2012 10:41:49 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201207261041.q6QAfnIX067806@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 26 Jul 2012 10:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238796 - vendor/groff/dist/tmac X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 26 Jul 2012 10:41:50 -0000 Author: ru Date: Thu Jul 26 10:41:48 2012 New Revision: 238796 URL: http://svn.freebsd.org/changeset/base/238796 Log: Cherry-pick vendor changes to mdoc: : 2012-07-17 Ingo Schwarze : : [mdoc] Make `Fl' correctly restore fonts. : : * tmac/doc.tmac (doc-flag-recursion): Do it. : : 2012-01-25 Ingo Schwarze : : [mdoc] * tmac/doc-syms: Fix meaning of XBD acronym. : : 2012-01-03 Kristaps Dzonsons : : [mdoc] Add `-isoC-2011'. : : * tmac/doc-syms (doc-str-St--isoC-2011): Add it. : * tmac/groff_mdoc.man: Document it. Modified: vendor/groff/dist/tmac/doc-syms vendor/groff/dist/tmac/doc.tmac vendor/groff/dist/tmac/groff_mdoc.man Modified: vendor/groff/dist/tmac/doc-syms ============================================================================== --- vendor/groff/dist/tmac/doc-syms Thu Jul 26 10:10:54 2012 (r238795) +++ vendor/groff/dist/tmac/doc-syms Thu Jul 26 10:41:48 2012 (r238796) @@ -605,6 +605,8 @@ .ds doc-str-St--isoC \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:1990 .as doc-str-St--isoC " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^90\*[doc-str-St]\*[Rq]) .als doc-str-St--isoC-90 doc-str-St--isoC +.ds doc-str-St--isoC-2011 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:2011 +.as doc-str-St--isoC-2011 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^11\*[doc-str-St]\*[Rq]) .ds doc-str-St--isoC-99 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:1999 .as doc-str-St--isoC-99 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^99\*[doc-str-St]\*[Rq]) .ds doc-str-St--isoC-amd1 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899/AMD1:1995 @@ -659,7 +661,7 @@ .as doc-str-St--susv3 " (\*[Lq]\*[doc-Tn-font-size]SUSv3\*[doc-str-St]\*[Rq]) .ds doc-str-St--svid4 System\~V Interface Definition, Fourth Edition .as doc-str-St--svid4 " (\*[Lq]\*[doc-Tn-font-size]SVID\*[doc-str-St]\^4\*[Rq]) -.ds doc-str-St--xbd5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interface Definitions Issue\~5 +.ds doc-str-St--xbd5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Base Definitions Issue\~5 .as doc-str-St--xbd5 " (\*[Lq]\*[doc-Tn-font-size]XBD\*[doc-str-St]\^5\*[Rq]) .ds doc-str-St--xcu5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Commands and Utilities Issue\~5 .as doc-str-St--xcu5 " (\*[Lq]\*[doc-Tn-font-size]XCU\*[doc-str-St]\^5\*[Rq]) Modified: vendor/groff/dist/tmac/doc.tmac ============================================================================== --- vendor/groff/dist/tmac/doc.tmac Thu Jul 26 10:10:54 2012 (r238795) +++ vendor/groff/dist/tmac/doc.tmac Thu Jul 26 10:41:48 2012 (r238796) @@ -438,7 +438,7 @@ . \" last argument . if (\n[doc-reg-dfr1] == 4) \ . nop \|\-\c -. nop \f[]\s[0]\c +. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c . doc-print-and-reset . \} . el \{\ Modified: vendor/groff/dist/tmac/groff_mdoc.man ============================================================================== --- vendor/groff/dist/tmac/groff_mdoc.man Thu Jul 26 10:10:54 2012 (r238795) +++ vendor/groff/dist/tmac/groff_mdoc.man Thu Jul 26 10:41:48 2012 (r238796) @@ -2036,6 +2036,8 @@ are: .St -isoC-90 .It Li \-isoC\-99 .St -isoC-99 +.It Li \-isoC\-2011 +.St -isoC-2011 .El .Pp . From owner-svn-src-vendor@FreeBSD.ORG Fri Jul 27 08:24:13 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50176106566C; Fri, 27 Jul 2012 08:24:13 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37EA88FC08; Fri, 27 Jul 2012 08:24:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6R8ODU8082584; Fri, 27 Jul 2012 08:24:13 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6R8OCh3082572; Fri, 27 Jul 2012 08:24:12 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207270824.q6R8OCh3082572@svn.freebsd.org> From: Martin Matuska Date: Fri, 27 Jul 2012 08:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238825 - in vendor/libarchive/dist: . build build/cmake build/utils cpio cpio/test doc libarchive libarchive/test libarchive_fe tar tar/test X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 27 Jul 2012 08:24:13 -0000 Author: mm Date: Fri Jul 27 08:24:12 2012 New Revision: 238825 URL: http://svn.freebsd.org/changeset/base/238825 Log: Update libarchive's vendor dist to version 3.0.4 from release branch. Git branch: release Git commit: 8076b31490c90aaf0edccecf760004c30bd95edc Obtained from: https://github.com/libarchive/libarchive.git Added: vendor/libarchive/dist/libarchive/archive_getdate.c vendor/libarchive/dist/libarchive/archive_match.c vendor/libarchive/dist/libarchive/archive_pathmatch.c vendor/libarchive/dist/libarchive/archive_pathmatch.h vendor/libarchive/dist/libarchive/archive_write_add_filter.c vendor/libarchive/dist/libarchive/test/test_archive_getdate.c vendor/libarchive/dist/libarchive/test/test_archive_match_owner.c vendor/libarchive/dist/libarchive/test/test_archive_match_path.c vendor/libarchive/dist/libarchive/test/test_archive_match_time.c vendor/libarchive/dist/libarchive/test/test_archive_pathmatch.c vendor/libarchive/dist/tar/test/test_format_newc.c vendor/libarchive/dist/tar/test/test_option_nodump.c Deleted: vendor/libarchive/dist/cpio/test/test_pathmatch.c vendor/libarchive/dist/libarchive_fe/matching.c vendor/libarchive/dist/libarchive_fe/matching.h vendor/libarchive/dist/libarchive_fe/pathmatch.c vendor/libarchive/dist/libarchive_fe/pathmatch.h vendor/libarchive/dist/tar/getdate.c vendor/libarchive/dist/tar/test/test_getdate.c vendor/libarchive/dist/tar/tree.c vendor/libarchive/dist/tar/tree.h Modified: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/NEWS vendor/libarchive/dist/README vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/dist/build/utils/gen_archive_string_composition_h.sh vendor/libarchive/dist/build/version vendor/libarchive/dist/configure.ac vendor/libarchive/dist/cpio/CMakeLists.txt vendor/libarchive/dist/cpio/bsdcpio.1 vendor/libarchive/dist/cpio/cmdline.c vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/cpio/cpio.h vendor/libarchive/dist/cpio/cpio_windows.c vendor/libarchive/dist/cpio/test/CMakeLists.txt vendor/libarchive/dist/cpio/test/main.c vendor/libarchive/dist/cpio/test/test.h vendor/libarchive/dist/doc/mdoc2man.awk vendor/libarchive/dist/doc/mdoc2wiki.awk vendor/libarchive/dist/doc/update.sh vendor/libarchive/dist/libarchive/CMakeLists.txt vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_acl.c vendor/libarchive/dist/libarchive/archive_check_magic.c vendor/libarchive/dist/libarchive/archive_endian.h vendor/libarchive/dist/libarchive/archive_entry.3 vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_entry_acl.3 vendor/libarchive/dist/libarchive/archive_entry_copy_bhfi.c vendor/libarchive/dist/libarchive/archive_entry_link_resolver.c vendor/libarchive/dist/libarchive/archive_entry_linkify.3 vendor/libarchive/dist/libarchive/archive_entry_paths.3 vendor/libarchive/dist/libarchive/archive_entry_perms.3 vendor/libarchive/dist/libarchive/archive_entry_stat.3 vendor/libarchive/dist/libarchive/archive_entry_stat.c vendor/libarchive/dist/libarchive/archive_entry_time.3 vendor/libarchive/dist/libarchive/archive_ppmd7.c vendor/libarchive/dist/libarchive/archive_private.h vendor/libarchive/dist/libarchive/archive_read.3 vendor/libarchive/dist/libarchive/archive_read.c vendor/libarchive/dist/libarchive/archive_read_data.3 vendor/libarchive/dist/libarchive/archive_read_disk.3 vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_disk_posix.c vendor/libarchive/dist/libarchive/archive_read_disk_private.h vendor/libarchive/dist/libarchive/archive_read_disk_windows.c vendor/libarchive/dist/libarchive/archive_read_extract.3 vendor/libarchive/dist/libarchive/archive_read_filter.3 vendor/libarchive/dist/libarchive/archive_read_format.3 vendor/libarchive/dist/libarchive/archive_read_free.3 vendor/libarchive/dist/libarchive/archive_read_header.3 vendor/libarchive/dist/libarchive/archive_read_new.3 vendor/libarchive/dist/libarchive/archive_read_open.3 vendor/libarchive/dist/libarchive/archive_read_open_fd.c vendor/libarchive/dist/libarchive/archive_read_open_filename.c vendor/libarchive/dist/libarchive/archive_read_private.h vendor/libarchive/dist/libarchive/archive_read_set_options.3 vendor/libarchive/dist/libarchive/archive_read_support_filter_rpm.c vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_string.c vendor/libarchive/dist/libarchive/archive_string.h vendor/libarchive/dist/libarchive/archive_string_composition.h vendor/libarchive/dist/libarchive/archive_string_sprintf.c vendor/libarchive/dist/libarchive/archive_util.3 vendor/libarchive/dist/libarchive/archive_util.c vendor/libarchive/dist/libarchive/archive_windows.c vendor/libarchive/dist/libarchive/archive_windows.h vendor/libarchive/dist/libarchive/archive_write.3 vendor/libarchive/dist/libarchive/archive_write.c vendor/libarchive/dist/libarchive/archive_write_add_filter_bzip2.c vendor/libarchive/dist/libarchive/archive_write_add_filter_compress.c vendor/libarchive/dist/libarchive/archive_write_add_filter_gzip.c vendor/libarchive/dist/libarchive/archive_write_add_filter_program.c vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c vendor/libarchive/dist/libarchive/archive_write_blocksize.3 vendor/libarchive/dist/libarchive/archive_write_data.3 vendor/libarchive/dist/libarchive/archive_write_disk.3 vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_disk_set_standard_lookup.c vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/dist/libarchive/archive_write_filter.3 vendor/libarchive/dist/libarchive/archive_write_finish_entry.3 vendor/libarchive/dist/libarchive/archive_write_format.3 vendor/libarchive/dist/libarchive/archive_write_free.3 vendor/libarchive/dist/libarchive/archive_write_header.3 vendor/libarchive/dist/libarchive/archive_write_new.3 vendor/libarchive/dist/libarchive/archive_write_open.3 vendor/libarchive/dist/libarchive/archive_write_open_filename.c vendor/libarchive/dist/libarchive/archive_write_private.h vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c vendor/libarchive/dist/libarchive/archive_write_set_format_ar.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio_newc.c vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c vendor/libarchive/dist/libarchive/archive_write_set_format_mtree.c vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c vendor/libarchive/dist/libarchive/archive_write_set_format_ustar.c vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c vendor/libarchive/dist/libarchive/archive_write_set_options.3 vendor/libarchive/dist/libarchive/cpio.5 vendor/libarchive/dist/libarchive/libarchive-formats.5 vendor/libarchive/dist/libarchive/libarchive.3 vendor/libarchive/dist/libarchive/libarchive_changes.3 vendor/libarchive/dist/libarchive/libarchive_internals.3 vendor/libarchive/dist/libarchive/mtree.5 vendor/libarchive/dist/libarchive/tar.5 vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/libarchive/test/main.c vendor/libarchive/dist/libarchive/test/read_open_memory.c vendor/libarchive/dist/libarchive/test/test.h vendor/libarchive/dist/libarchive/test/test_archive_string_conversion.c vendor/libarchive/dist/libarchive/test/test_compat_zip.c vendor/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c vendor/libarchive/dist/libarchive/test/test_read_format_7zip.c vendor/libarchive/dist/libarchive/test/test_read_format_cab.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c vendor/libarchive/dist/libarchive/test/test_read_format_rar.c vendor/libarchive/dist/libarchive/test/test_read_format_rar_unicode.rar.uu vendor/libarchive/dist/libarchive/test/test_read_format_tar_filename.c vendor/libarchive/dist/libarchive/test/test_read_pax_truncated.c vendor/libarchive/dist/libarchive/test/test_read_position.c vendor/libarchive/dist/libarchive/test/test_sparse_basic.c vendor/libarchive/dist/libarchive/test/test_write_format_zip.c vendor/libarchive/dist/libarchive_fe/err.c vendor/libarchive/dist/libarchive_fe/err.h vendor/libarchive/dist/tar/CMakeLists.txt vendor/libarchive/dist/tar/bsdtar.1 vendor/libarchive/dist/tar/bsdtar.c vendor/libarchive/dist/tar/bsdtar.h vendor/libarchive/dist/tar/bsdtar_windows.c vendor/libarchive/dist/tar/read.c vendor/libarchive/dist/tar/test/CMakeLists.txt vendor/libarchive/dist/tar/test/main.c vendor/libarchive/dist/tar/test/test.h vendor/libarchive/dist/tar/write.c Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/CMakeLists.txt Fri Jul 27 08:24:12 2012 (r238825) @@ -1,13 +1,36 @@ # +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6 FATAL_ERROR) # PROJECT(libarchive C) # -CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) endif() -SET(CMAKE_BUILD_TYPE "Release") +# +# Set the Build type for make based generators. +# You can choose following types: +# Debug : Debug build +# Release : Release build +# RelWithDebInfo : Release build with Debug Info +# MinSizeRel : Release Min Size build +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) +# Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the +# value type is "UNINITIALIZED". +GET_PROPERTY(cached_type CACHE CMAKE_BUILD_TYPE PROPERTY TYPE) +IF("${cached_type}" STREQUAL "UNINITIALIZED") + SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build Type" FORCE) +ENDIF("${cached_type}" STREQUAL "UNINITIALIZED") +# Check the Build Type. +IF(NOT "${CMAKE_BUILD_TYPE}" + MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$") + MESSAGE(FATAL_ERROR + "Unknown keyword for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n" + "Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel") +ENDIF(NOT "${CMAKE_BUILD_TYPE}" + MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$") # On MacOS, prefer MacPorts libraries to system libraries. # I haven't come up with a compelling argument for this to be conditional. @@ -47,13 +70,73 @@ math(EXPR INTERFACE_VERSION "12 + ${_mi # ?? Should there be more here ?? SET(SOVERSION "${INTERFACE_VERSION}") +# Enalbe CMAKE_PUSH_CHECK_STATE() and CMAKE_POP_CHECK_STATE() macros +# saving and restoring the state of the variables. +INCLUDE(CMakePushCheckState) + +# Initialize the state of the variables. This initialization is not +# necessary but this shows you what value the variables initially have. +SET(CMAKE_REQUIRED_DEFINITIONS) +SET(CMAKE_REQUIRED_INCLUDES) +SET(CMAKE_REQUIRED_LIBRARIES) +SET(CMAKE_REQUIRED_FLAGS) + # Especially for early development, we want to be a little # aggressive about diagnosing build problems; this can get # relaxed somewhat in final shipping versions. IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") - ADD_DEFINITIONS(-Wall) - SET(CMAKE_REQUIRED_FLAGS "-Wall") + SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security") + ################################################################# + # Set compile flags for all build types. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security") + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror -Wextra -Wunused") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual") ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") +IF (MSVC) + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + # Enable level 4 C4061: The enumerate has no associated handler in a switch + # statement. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4061") + # Enable level 4 C4254: A larger bit field was assigned to a smaller bit + # field. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4254") + # Enable level 4 C4295: An array was initialized but the last character in + # the array is not a null; accessing the array may + # produce unexpected results. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4295") + # Enable level 4 C4296: An unsigned variable was used in a comparison + # operation with zero. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4296") + # Enable level 4 C4389: An operation involved signed and unsigned variables. + # This could result in a loss of data. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4389") + # Enable level 4 C4505: The given function is local and not referenced in + # the body of the module; therefore, the function is + # dead code. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4505") + # Enable level 4 C4514: The optimizer removed an inline function that is not + # called. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4514") + # Enable level 4 C4702: Unreachable code. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4702") + # Enable level 4 C4706: The test value in a conditional expression was the + # result of an assignment. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4706") + # /WX option is the same as gcc's -Werror option. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX") + # /Oi option enables built-in functions. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Oi") + ################################################################# + # Set compile flags for release build. + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi") +ENDIF (MSVC) # Enable CTest/CDash support include(CTest) @@ -74,10 +157,18 @@ IF(ENABLE_TEST) ENDIF(ENABLE_TEST) IF(WIN32) - SET(_WIN32_WINNT 0x0500 CACHE INTERNAL "Setting _WIN32_WINNT to 0x0500 for Windows 2000 APIs") - SET(WINVER 0x0500 CACHE INTERNAL "Setting WINVER to 0x0500 for Windows 2000 APIs") + IF(MSVC60) + SET(WINVER 0x0400) + ELSE() + SET(WINVER 0x0500) + ENDIF() + SET(_WIN32_WINNT ${WINVER}) ENDIF(WIN32) +IF("${CMAKE_C_PLATFORM_ID}" MATCHES "^(HP-UX)$") + ADD_DEFINITIONS(-D_XOPEN_SOURCE=500) # Ask wchar.h for mbstate_t +ENDIF() + # INCLUDE(CheckCSourceCompiles) INCLUDE(CheckCSourceRuns) @@ -125,7 +216,38 @@ MACRO (INSTALL_MAN __mans) INSTALL(FILES ${_man} DESTINATION "share/man/man${_mansect}") ENDFOREACH (_man) ENDMACRO (INSTALL_MAN __mans) - +# +# Find out what macro is needed to use libraries on Windows. +# +MACRO (TRY_MACRO_FOR_LIBRARY INCLUDES LIBRARIES + TRY_TYPE SAMPLE_SOURCE MACRO_LIST) + IF(WIN32 AND NOT CYGWIN) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + SET(CMAKE_REQUIRED_INCLUDES ${INCLUDES}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBRARIES}) + FOREACH(VAR ${MACRO_LIST}) + # Clear ${VAR} from CACHE If the libraries which ${VAR} was + # checked with are changed. + SET(VAR_WITH_LIB "${VAR}_WITH_LIB") + GET_PROPERTY(PREV_VAR_WITH_LIB VARIABLE PROPERTY ${VAR_WITH_LIB}) + IF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}") + UNSET(${VAR} CACHE) + ENDIF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}") + # Check if the library can be used with the macro. + IF("${TRY_TYPE}" MATCHES "COMPILES") + CHECK_C_SOURCE_COMPILES("${SAMPLE_SOURCE}" ${VAR}) + ELSEIF("${TRY_TYPE}" MATCHES "RUNS") + CHECK_C_SOURCE_RUNS("${SAMPLE_SOURCE}" ${VAR}) + ELSE("${TRY_TYPE}" MATCHES "COMPILES") + MESSAGE(FATAL_ERROR "UNKNOWN KEYWORD \"${TRY_TYPE}\" FOR TRY_TYPE") + ENDIF("${TRY_TYPE}" MATCHES "COMPILES") + # Save the libraries which ${VAR} is checked with. + SET(${VAR_WITH_LIB} "${LIBRARIES}" CACHE INTERNAL + "Macro ${VAR} is checked with") + ENDFOREACH(VAR) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + ENDIF(WIN32 AND NOT CYGWIN) +ENDMACRO (TRY_MACRO_FOR_LIBRARY) # # Check compress/decompress libraries # @@ -172,11 +294,27 @@ IF(ZLIB_FOUND) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) IF(WIN32 AND NOT CYGWIN) - SET(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR}) - SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES}) - CHECK_C_SOURCE_Runs( - "#ifndef ZLIB_WINAPI\n#define ZLIB_WINAPI\n#endif\n#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" + # + # Test if ZLIB_WINAPI macro is needed to use. + # + TRY_MACRO_FOR_LIBRARY( + "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" + RUNS + "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" ZLIB_WINAPI) + IF(ZLIB_WINAPI) + ADD_DEFINITIONS(-DZLIB_WINAPI) + ELSE(ZLIB_WINAPI) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" + COMPILES + "#include \nint main() {return zlibVersion()?1:0; }" + "ZLIB_DLL;WITHOUT_ZLIB_DLL") + IF(ZLIB_DLL) + ADD_DEFINITIONS(-DZLIB_DLL) + ENDIF(ZLIB_DLL) + ENDIF(ZLIB_WINAPI) ENDIF(WIN32 AND NOT CYGWIN) ENDIF(ZLIB_FOUND) MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR) @@ -190,9 +328,20 @@ IF(BZIP2_FOUND) SET(HAVE_BZLIB_H 1) INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${BZIP2_LIBRARIES}) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${BZIP2_INCLUDE_DIR}" "${BZIP2_LIBRARIES}" + COMPILES + "#include \nint main() {return BZ2_bzlibVersion()?1:0; }" + "USE_BZIP2_DLL;USE_BZIP2_STATIC") + IF(USE_BZIP2_DLL) + ADD_DEFINITIONS(-DUSE_BZIP2_DLL) + ELSEIF(USE_BZIP2_STATIC) + ADD_DEFINITIONS(-DUSE_BZIP2_STATIC) + ENDIF(USE_BZIP2_DLL) ENDIF(BZIP2_FOUND) MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR) -MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARY) +MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARIES) # # Find LZMA # @@ -202,6 +351,15 @@ IF(LZMA_FOUND) SET(HAVE_LZMA_H 1) INCLUDE_DIRECTORIES(${LZMA_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${LZMA_LIBRARIES}) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${LZMA_INCLUDE_DIR}" "${LZMA_LIBRARIES}" + COMPILES + "#include \nint main() {return (int)lzma_version_number(); }" + "WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC") + IF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC) + ADD_DEFINITIONS(-DLZMA_API_STATIC) + ENDIF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC) ELSEIF(LZMADEC_FOUND) SET(HAVE_LIBLZMADEC 1) SET(HAVE_LZMADEC_H 1) @@ -244,6 +402,7 @@ LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_ LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H) LA_CHECK_INCLUDE_FILE("langinfo.h" HAVE_LANGINFO_H) LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H) +LA_CHECK_INCLUDE_FILE("linux/types.h" HAVE_LINUX_TYPES_H) LA_CHECK_INCLUDE_FILE("linux/fiemap.h" HAVE_LINUX_FIEMAP_H) LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H) LA_CHECK_INCLUDE_FILE("linux/magic.h" HAVE_LINUX_MAGIC_H) @@ -307,9 +466,11 @@ CHECK_C_SOURCE_COMPILES( IF(ENABLE_NETTLE) CHECK_LIBRARY_EXISTS(nettle "nettle_sha1_digest" "" NETTLE_FOUND) IF(NETTLE_FOUND) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables SET(CMAKE_REQUIRED_LIBRARIES "nettle") FIND_LIBRARY(NETTLE_LIBRARY NAMES nettle) LIST(APPEND ADDITIONAL_LIBS ${NETTLE_LIBRARY}) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables ELSE(NETTLE_FOUND) SET(ENABLE_NETTLE OFF) ENDIF(NETTLE_FOUND) @@ -328,9 +489,11 @@ ENDIF() # FreeBSD libmd CHECK_LIBRARY_EXISTS(md "MD5Init" "" LIBMD_FOUND) IF(LIBMD_FOUND) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables SET(CMAKE_REQUIRED_LIBRARIES "md") FIND_LIBRARY(LIBMD_LIBRARY NAMES md) LIST(APPEND ADDITIONAL_LIBS ${LIBMD_LIBRARY}) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables ENDIF(LIBMD_FOUND) # @@ -386,10 +549,10 @@ ${ARCHIVE_CRYPTO_C} int main(int argc, char **argv) { - archive_${lower_crypto}_ctx ctx; - archive_${lower_crypto}_init(&ctx); - archive_${lower_crypto}_update(&ctx, *argv, argc); - archive_${lower_crypto}_final(&ctx, NULL); + archive_${lower_algorithm}_ctx ctx; + archive_${lower_algorithm}_init(&ctx); + archive_${lower_algorithm}_update(&ctx, *argv, argc); + archive_${lower_algorithm}_final(&ctx, NULL); return 0; } ") @@ -511,6 +674,20 @@ ENDMACRO(CHECK_CRYPTO_WIN CRYPTO_LIST) # MACRO(CHECK_ICONV LIB TRY_ICONV_CONST) IF(NOT HAVE_ICONV) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") + # + # During checking iconv proto type, we should use -Werror to avoid the + # success of iconv detection with a warnig which success is a miss + # detection. So this needs for all build mode(even it's a release mode). + # + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") + ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") + IF (MSVC) + # NOTE: /WX option is the same as gcc's -Werror option. + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /WX") + ENDIF (MSVC) + # CHECK_C_SOURCE_COMPILES( "#include #include @@ -526,10 +703,12 @@ MACRO(CHECK_ICONV LIB TRY_ICONV_CONST) SET(HAVE_ICONV true) SET(ICONV_CONST ${TRY_ICONV_CONST}) ENDIF(HAVE_ICONV_${LIB}_${TRY_ICONV_CONST}) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables ENDIF(NOT HAVE_ICONV) ENDMACRO(CHECK_ICONV TRY_ICONV_CONST) IF(ENABLE_ICONV) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables FIND_PATH(ICONV_INCLUDE_DIR iconv.h) IF(ICONV_INCLUDE_DIR) #SET(INCLUDES ${INCLUDES} "iconv.h") @@ -540,9 +719,30 @@ IF(ENABLE_ICONV) CHECK_ICONV("libc" "") # If iconv isn't in libc and we have a libiconv, try that. - FIND_LIBRARY(LIBICONV_PATH iconv) + FIND_LIBRARY(LIBICONV_PATH NAMES iconv libiconv) IF(NOT HAVE_ICONV AND LIBICONV_PATH) LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBICONV_PATH}) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${ICONV_INCLUDE_DIR}" "${LIBICONV_PATH}" + COMPILES + "#include \nint main() {return iconv_close((iconv_t)0);}" + "WITHOUT_LIBICONV_STATIC;LIBICONV_STATIC") + IF(NOT WITHOUT_LIBICONV_STATIC AND LIBICONV_STATIC) + ADD_DEFINITIONS(-DLIBICONV_STATIC) + ENDIF(NOT WITHOUT_LIBICONV_STATIC AND LIBICONV_STATIC) + # + # Set up CMAKE_REQUIRED_* for CHECK_ICONV + # + SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBICONV_PATH}) + IF(LIBICONV_STATIC) + # LIBICONV_STATIC is necessary for the success of CHECK_ICONV + # on Windows. + SET(CMAKE_REQUIRED_DEFINITIONS "-DLIBICONV_STATIC") + ELSE(LIBICONV_STATIC) + SET(CMAKE_REQUIRED_DEFINITIONS) + ENDIF(LIBICONV_STATIC) CHECK_ICONV("libiconv" "const") CHECK_ICONV("libiconv" "") IF (HAVE_ICONV) @@ -554,19 +754,36 @@ IF(ENABLE_ICONV) # Find locale_charset() for libiconv. # IF(LIBICONV_PATH) + SET(CMAKE_REQUIRED_DEFINITIONS) + SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES) CHECK_INCLUDE_FILES("localcharset.h" HAVE_LOCALCHARSET_H) - CHECK_FUNCTION_EXISTS_GLIBC(locale_charset HAVE_LOCALE_CHARSET) - IF(NOT HAVE_LOCALE_CHARSET) - FIND_LIBRARY(LIBCHARSET_PATH charset) - IF(LIBCHARSET_PATH) - SET(CMAKE_REQUIRED_LIBRARIES ${LIBCHARSET_PATH}) + FIND_LIBRARY(LIBCHARSET_PATH NAMES charset libcharset) + IF(LIBCHARSET_PATH) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBCHARSET_PATH}) + IF(WIN32 AND NOT CYGWIN) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${ICONV_INCLUDE_DIR}" "${LIBCHARSET_PATH}" + COMPILES + "#include \nint main() {return locale_charset()?1:0;}" + "WITHOUT_LIBCHARSET_STATIC;LIBCHARSET_STATIC") + IF(NOT WITHOUT_LIBCHARSET_STATIC AND LIBCHARSET_STATIC) + ADD_DEFINITIONS(-DLIBCHARSET_STATIC) + ENDIF(NOT WITHOUT_LIBCHARSET_STATIC AND LIBCHARSET_STATIC) + IF(WITHOUT_LIBCHARSET_STATIC OR LIBCHARSET_STATIC) + SET(HAVE_LOCALE_CHARSET ON CACHE INTERNAL + "Have function locale_charset") + ENDIF(WITHOUT_LIBCHARSET_STATIC OR LIBCHARSET_STATIC) + ELSE(WIN32 AND NOT CYGWIN) CHECK_FUNCTION_EXISTS_GLIBC(locale_charset HAVE_LOCALE_CHARSET) - IF(HAVE_LOCALE_CHARSET) - LIST(APPEND ADDITIONAL_LIBS ${LIBCHARSET_PATH}) - ENDIF(HAVE_LOCALE_CHARSET) - ENDIF(LIBCHARSET_PATH) - ENDIF(NOT HAVE_LOCALE_CHARSET) + ENDIF(WIN32 AND NOT CYGWIN) + IF(HAVE_LOCALE_CHARSET) + LIST(APPEND ADDITIONAL_LIBS ${LIBCHARSET_PATH}) + ENDIF(HAVE_LOCALE_CHARSET) + ENDIF(LIBCHARSET_PATH) ENDIF(LIBICONV_PATH) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables ELSE(ENABLE_ICONV) # Make sure ICONV variables are not in CACHE after ENABLE_ICONV disabled # (once enabled). @@ -578,6 +795,10 @@ ELSE(ENABLE_ICONV) UNSET(HAVE_ICONV_libiconv_const CACHE) UNSET(ICONV_INCLUDE_DIR CACHE) UNSET(LIBICONV_PATH CACHE) + UNSET(LIBICONV_DLL CACHE) + UNSET(LIBICONV_STATIC CACHE) + UNSET(LIBCHARSET_DLL CACHE) + UNSET(LIBCHARSET_STATIC CACHE) ENDIF(ENABLE_ICONV) # @@ -585,6 +806,7 @@ ENDIF(ENABLE_ICONV) # FIND_PACKAGE(LibXml2) IF(LIBXML2_FOUND) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${LIBXML2_LIBRARIES}) SET(HAVE_LIBXML2 1) @@ -592,20 +814,33 @@ IF(LIBXML2_FOUND) SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}) CHECK_INCLUDE_FILES("libxml/xmlreader.h" HAVE_LIBXML_XMLREADER_H) CHECK_INCLUDE_FILES("libxml/xmlwriter.h" HAVE_LIBXML_XMLWRITER_H) - SET(CMAKE_REQUIRED_INCLUDES "") + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${ICONV_INCLUDE_DIR};${LIBXML2_INCLUDE_DIR}" + "ws2_32.lib;${ZLIB_LIBRARIES};${LIBICONV_PATH};${LIBXML2_LIBRARIES}" + COMPILES + "#include \n#include \nint main() {return xmlTextReaderRead((xmlTextReaderPtr)(void *)0);}" + "WITHOUT_LIBXML_STATIC;LIBXML_STATIC") + IF(NOT WITHOUT_LIBXML_STATIC AND LIBXML_STATIC) + ADD_DEFINITIONS(-DLIBXML_STATIC) + ENDIF(NOT WITHOUT_LIBXML_STATIC AND LIBXML_STATIC) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables ELSE(LIBXML2_FOUND) # # Find Expat # FIND_PACKAGE(EXPAT) IF(EXPAT_FOUND) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${EXPAT_LIBRARIES}) SET(HAVE_LIBEXPAT 1) LA_CHECK_INCLUDE_FILE("expat.h" HAVE_EXPAT_H) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables ENDIF(EXPAT_FOUND) ENDIF(LIBXML2_FOUND) - +MARK_AS_ADVANCED(CLEAR LIBXML2_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR LIBXML2_LIBRARIES) # # Find Libregex # @@ -616,6 +851,7 @@ IF(REGEX_INCLUDE_DIR) # If libc does not provide regex, find libregex. # IF(NOT HAVE_REGCOMP_LIBC) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables FIND_LIBRARY(REGEX_LIBRARY regex) IF(REGEX_LIBRARY) SET(CMAKE_REQUIRED_LIBRARIES ${REGEX_LIBRARY}) @@ -632,21 +868,33 @@ IF(REGEX_INCLUDE_DIR) SET(CMAKE_REQUIRED_INCLUDES ${REGEX_INCLUDE_DIR}) LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H) ENDIF(NOT HAVE_REGEX_H) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${REGEX_INCLUDE_DIR}" "${REGEX_LIBRARY}" + COMPILES + "#include \n#include \nint main() {regex_t r;return regcomp(&r, \"\", 0);}" + "USE_REGEX_DLL;USE_REGEX_STATIC") + IF(USE_REGEX_DLL) + ADD_DEFINITIONS(-DUSE_REGEX_DLL) + ELSEIF(USE_REGEX_STATIC) + ADD_DEFINITIONS(-DUSE_REGEX_STATIC) + ENDIF(USE_REGEX_DLL) ENDIF(HAVE_REGCOMP_LIBREGEX) ENDIF(REGEX_LIBRARY) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables ENDIF(NOT HAVE_REGCOMP_LIBC) ENDIF(REGEX_INCLUDE_DIR) # # Check functions # +CMAKE_PUSH_CHECK_STATE() # Save the state of the variables IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") # # During checking functions, we should use -fno-builtin to avoid the # failure of function detection which failure is an error "conflicting # types for built-in function" caused by using -Werror option. # - SET(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-builtin") ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") CHECK_SYMBOL_EXISTS(_CrtSetReportMode "crtdbg.h" HAVE__CrtSetReportMode) @@ -685,7 +933,6 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) -CHECK_FUNCTION_EXISTS_GLIBC(mbsnrtowcs HAVE_MBSNRTOWCS) CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) @@ -719,7 +966,6 @@ CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) -CHECK_FUNCTION_EXISTS_GLIBC(wcsnrtombs HAVE_WCSNRTOMBS) CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) @@ -736,10 +982,7 @@ CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRIN CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) -# Restore CMAKE_REQUIRED_FLAGS -IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") - SET(CMAKE_REQUIRED_FLAGS ${SAVE_CMAKE_REQUIRED_FLAGS}) -ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") +CMAKE_POP_CHECK_STATE() # Restore the state of the variables # Make sure we have the POSIX version of readdir_r, not the # older 2-argument version. @@ -826,6 +1069,12 @@ CHECK_STRUCT_MEMBER("struct stat" st_blk # Check for st_flags in struct stat (BSD fflags) CHECK_STRUCT_MEMBER("struct stat" st_flags "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_FLAGS) + +IF(HAVE_SYS_STATVFS_H) + CHECK_STRUCT_MEMBER("struct statvfs" f_iosize + "sys/types.h;sys/statvfs.h" HAVE_STRUCT_STATVFS_F_IOSIZE) +ENDIF() + # # CHECK_STRUCT_MEMBER("struct tm" tm_sec @@ -1120,11 +1369,6 @@ IF(MSVC) ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) ENDIF(MSVC) -# We need CoreServices on Mac OS. -IF(APPLE) - LIST(APPEND ADDITIONAL_LIBS "-framework CoreServices") -ENDIF(APPLE) - IF(ENABLE_TEST) ADD_CUSTOM_TARGET(run_all_tests) ENDIF(ENABLE_TEST) Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/Makefile.am Fri Jul 27 08:24:12 2012 (r238825) @@ -21,7 +21,11 @@ TESTS= libarchive_test $(bsdtar_test_pro TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $(bsdcpio_TESTS_ENVIRONMENT) # Always build and test both bsdtar and bsdcpio as part of 'distcheck' DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio -AM_CFLAGS=-Wall +COMMON_CFLAGS=-Wall -Wformat -Wformat-security +# The next line is commented out by default in shipping libarchive releases. +# It is uncommented by default in trunk. +# DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual +AM_CFLAGS=$(COMMON_CFLAGS) $(DEV_CFLAGS) PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@ AM_CPPFLAGS=$(PLATFORMCPPFLAGS) @@ -100,8 +104,12 @@ libarchive_la_SOURCES= \ libarchive/archive_entry_stat.c \ libarchive/archive_entry_strmode.c \ libarchive/archive_entry_xattr.c \ + libarchive/archive_getdate.c \ + libarchive/archive_match.c \ libarchive/archive_options.c \ libarchive/archive_options_private.h \ + libarchive/archive_pathmatch.c \ + libarchive/archive_pathmatch.h \ libarchive/archive_platform.h \ libarchive/archive_ppmd_private.h \ libarchive/archive_ppmd7.c \ @@ -161,6 +169,7 @@ libarchive_la_SOURCES= \ libarchive/archive_write_open_filename.c \ libarchive/archive_write_open_memory.c \ libarchive/archive_write_private.h \ + libarchive/archive_write_add_filter.c \ libarchive/archive_write_add_filter_bzip2.c \ libarchive/archive_write_add_filter_compress.c \ libarchive/archive_write_add_filter_gzip.c \ @@ -253,6 +262,11 @@ libarchive_test_SOURCES= \ libarchive/test/test_archive_api_feature.c \ libarchive/test/test_archive_clear_error.c \ libarchive/test/test_archive_crypto.c \ + libarchive/test/test_archive_getdate.c \ + libarchive/test/test_archive_match_owner.c \ + libarchive/test/test_archive_match_path.c \ + libarchive/test/test_archive_match_time.c \ + libarchive/test/test_archive_pathmatch.c \ libarchive/test/test_archive_read_close_twice.c \ libarchive/test/test_archive_read_close_twice_open_fd.c \ libarchive/test/test_archive_read_close_twice_open_filename.c \ @@ -572,12 +586,9 @@ libarchive_fe_la_SOURCES= \ libarchive_fe/err.h \ libarchive_fe/lafe_platform.h \ libarchive_fe/line_reader.c \ - libarchive_fe/line_reader.h \ - libarchive_fe/matching.c \ - libarchive_fe/matching.h \ - libarchive_fe/pathmatch.c \ - libarchive_fe/pathmatch.h + libarchive_fe/line_reader.h +libarchive_fe_la_CPPFLAGS= -I$(top_srcdir)/libarchive # # # bsdtar source, docs, etc. @@ -589,11 +600,8 @@ bsdtar_SOURCES= \ tar/bsdtar.h \ tar/bsdtar_platform.h \ tar/cmdline.c \ - tar/getdate.c \ tar/read.c \ tar/subst.c \ - tar/tree.c \ - tar/tree.h \ tar/util.c \ tar/write.c @@ -638,14 +646,13 @@ endif # bsdtar_test_SOURCES= \ - tar/getdate.c \ tar/test/main.c \ tar/test/test.h \ tar/test/test_0.c \ tar/test/test_basic.c \ tar/test/test_copy.c \ tar/test/test_empty_mtree.c \ - tar/test/test_getdate.c \ + tar/test/test_format_newc.c \ tar/test/test_help.c \ tar/test/test_option_C_upper.c \ tar/test/test_option_H_upper.c \ @@ -661,6 +668,7 @@ bsdtar_test_SOURCES= \ tar/test/test_option_keep_newer_files.c \ tar/test/test_option_n.c \ tar/test/test_option_newer_than.c \ + tar/test/test_option_nodump.c \ tar/test/test_option_q.c \ tar/test/test_option_r.c \ tar/test/test_option_s.c \ @@ -784,8 +792,7 @@ bsdcpio_test_SOURCES= \ cpio/test/test_option_z.c \ cpio/test/test_owner_parse.c \ cpio/test/test_passthrough_dotdot.c \ - cpio/test/test_passthrough_reverse.c \ - cpio/test/test_pathmatch.c + cpio/test/test_passthrough_reverse.c bsdcpio_test_CPPFLAGS= \ -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \ Modified: vendor/libarchive/dist/NEWS ============================================================================== --- vendor/libarchive/dist/NEWS Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/NEWS Fri Jul 27 08:24:12 2012 (r238825) @@ -1,14 +1,10 @@ -Jan 10, 2012: Issue 223: Skip atime tests if atime not supported -Jan 09, 2012: Issue 222: Errors saving sparse files to pax archives -Jan 09, 2012: Issue 221: allow archive_*_free(NULL) -Dec 31, 2011: Issue 212: configure script on Solaris -Dec 30, 2011: Issue 218: empty contents extracting Zip files with bsdcpio -Dec 30, 2011: Issue 217: fix compile warning -Dec 30, 2011: Issue 216: truncated filenames in listings -Dec 28, 2011: Issue 210: memory leak on Windows -Dec 28, 2011: Issue 206: fix hardlink tests on Windows 2000 -Dec 27, 2011: Issue 208: Don't hang when using external compression - program on Windows +Mar 27, 2012: libarchive 3.0.4 released + +Feb 05, 2012: libarchive development now hosted at GitHub. + http://libarchive.github.com/ +Feb 05, 2012: libarchive's issue tracker remains at Google Code. + http://code.google.com/p/libarchive/issues/list +Feb 05, 2012: libarchive's mailing lists remain at Google Groups. Dec 24, 2011: libarchive 3.0.2 released Dec 23, 2011: Various fixes merged from FreeBSD Modified: vendor/libarchive/dist/README ============================================================================== --- vendor/libarchive/dist/README Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/README Fri Jul 27 08:24:12 2012 (r238825) @@ -1,9 +1,14 @@ README for libarchive bundle. Questions? Issues? - * http://libarchive.googlecode.com/ is the home for ongoing - libarchive development, including issue tracker, additional - documentation, and links to the libarchive mailing lists. + * http://libarchive.github.com/ is the home for ongoing + libarchive development, including documentation, and + links to the libarchive mailing lists. + * To report an issue, use the issue tracker at + http://code.google.com/p/libarchive/issues/list + * To submit an enhancement to libarchive, please submit + a pull request via GitHub. + https://github.com/libarchive/libarchive/pulls This distribution bundle includes the following components: * libarchive: a library for reading and writing streaming archives @@ -66,6 +71,7 @@ Currently, the library automatically det * ZIP archives (with uncompressed or "deflate" compressed entries) * GNU and BSD 'ar' archives * 'mtree' format + * 7-Zip archives * Microsoft CAB format * LHA and LZH archives * RAR archives @@ -92,6 +98,7 @@ The library can create archives in any o * GNU and BSD 'ar' archives * 'mtree' format * ISO9660 format + * 7-Zip archives * XAR archives When creating archives, the result can be filtered with any of the following: Modified: vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake ============================================================================== --- vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake Fri Jul 27 08:24:12 2012 (r238825) @@ -19,7 +19,7 @@ GET_FILENAME_COMPONENT(_selfdir_CheckFil MACRO (CHECK_FILE_OFFSET_BITS) IF(NOT DEFINED _FILE_OFFSET_BITS) - MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files") + MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files") TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64 ${CMAKE_CURRENT_BINARY_DIR} ${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c @@ -33,10 +33,10 @@ MACRO (CHECK_FILE_OFFSET_BITS) IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64) SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files") - MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - needed") + MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - needed") ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64) SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files") - MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - not needed") + MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - not needed") ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64) ENDIF(NOT DEFINED _FILE_OFFSET_BITS) Modified: vendor/libarchive/dist/build/cmake/config.h.in ============================================================================== --- vendor/libarchive/dist/build/cmake/config.h.in Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/build/cmake/config.h.in Fri Jul 27 08:24:12 2012 (r238825) @@ -609,6 +609,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the header file. */ #cmakedefine HAVE_LINUX_MAGIC_H 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_TYPES_H 1 + /* Define to 1 if you have the `listea' function. */ #cmakedefine HAVE_LISTEA 1 @@ -661,9 +664,6 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `mbrtowc' function. */ #cmakedefine HAVE_MBRTOWC 1 -/* Define to 1 if you have the `mbsnrtowcs' function. */ -#cmakedefine HAVE_MBSNRTOWCS 1 - /* Define to 1 if you have the `memmove' function. */ #cmakedefine HAVE_MEMMOVE 1 @@ -782,6 +782,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if `f_namemax' is a member of `struct statfs'. */ #cmakedefine HAVE_STRUCT_STATFS_F_NAMEMAX 1 +/* Define to 1 if `f_iosize' is a member of `struct statvfs'. */ +#cmakedefine HAVE_STRUCT_STATVFS_F_IOSIZE 1 + /* Define to 1 if `st_birthtime' is a member of `struct stat'. */ #cmakedefine HAVE_STRUCT_STAT_ST_BIRTHTIME 1 @@ -943,9 +946,6 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `wcslen' function. */ #cmakedefine HAVE_WCSLEN 1 -/* Define to 1 if you have the `wcsnrtombs' function. */ -#cmakedefine HAVE_WCSNRTOMBS 1 - /* Define to 1 if you have the `wctomb' function. */ #cmakedefine HAVE_WCTOMB 1 Modified: vendor/libarchive/dist/build/utils/gen_archive_string_composition_h.sh ============================================================================== --- vendor/libarchive/dist/build/utils/gen_archive_string_composition_h.sh Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/build/utils/gen_archive_string_composition_h.sh Fri Jul 27 08:24:12 2012 (r238825) @@ -1,10 +1,13 @@ #!/bin/sh # -# This needs http://unicode.org/Public/UNIDATA/UnicodeData.txt +# This needs http://unicode.org/Public/6.0.0/ucd/UnicodeData.txt # inputfile="$1" # Expect UnicodeData.txt outfile=archive_string_composition.h pickout=/tmp/mk_unicode_composition_tbl$$.awk +pickout2=/tmp/mk_unicode_composition_tbl2$$.awk +#nfdtmp=/tmp/mk_unicode_decomposition_tmp$$.txt +nfdtmp="nfdtmpx" ################################################################################# # # Append the file header of "archive_string_composition.h" @@ -14,7 +17,7 @@ append_copyright() { cat > ${outfile} < ${outfile} < NFD table. + if (length(\$1) == 4) + print "0"\$1, "0"cp[1], "0"cp[2] >>nfdtbl + else + print \$1, cp[1], cp[2] >>nfdtbl +} +AWK_END +################################################################################# +# awk script +# +################################################################################# +cat > ${pickout2} <> ${outfile} +awk -f ${pickout2} ${nfdtmp} >> ${outfile} +echo "#endif /* ARCHIVE_STRING_COMPOSITION_H_INCLUDED */" >> ${outfile} +echo "" >> ${outfile} # # Remove awk the script. rm ${pickout} +rm ${pickout2} +rm ${nfdtmp} Modified: vendor/libarchive/dist/build/version ============================================================================== --- vendor/libarchive/dist/build/version Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/build/version Fri Jul 27 08:24:12 2012 (r238825) @@ -1 +1 @@ -3000003 +3000004 Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/configure.ac Fri Jul 27 08:24:12 2012 (r238825) @@ -4,8 +4,8 @@ dnl First, define all of the version num dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.0.3]) -m4_define([LIBARCHIVE_VERSION_N],[3000003]) +m4_define([LIBARCHIVE_VERSION_S],[3.0.4]) +m4_define([LIBARCHIVE_VERSION_N],[3000004]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) @@ -17,7 +17,7 @@ AC_PREREQ(2.65) # Now starts the "real" configure script. # -AC_INIT([libarchive],LIBARCHIVE_VERSION_S(),[kientzle@FreeBSD.org]) +AC_INIT([libarchive],LIBARCHIVE_VERSION_S(),[libarchive-discuss@googlegroups.com]) # Make sure the srcdir contains "libarchive" directory AC_CONFIG_SRCDIR([libarchive]) # Use auxiliary subscripts from this subdirectory (cleans up root) @@ -197,13 +197,6 @@ case $host in ;; esac -# We need CoreServices on Mac OS. -case $host in - *darwin* ) - LIBS="${LIBS} -framework CoreServices" - ;; -esac - # Checks for header files. AC_HEADER_DIRENT AC_HEADER_SYS_WAIT @@ -223,7 +216,7 @@ AS_VAR_IF([ac_cv_have_decl_EXT2_IOC_GETF [Define to 1 if you have a working EXT2_IOC_GETFLAGS])]) AC_CHECK_HEADERS([inttypes.h io.h langinfo.h limits.h]) -AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h linux/magic.h]) +AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h linux/magic.h linux/types.h]) AC_CHECK_HEADERS([locale.h paths.h poll.h pwd.h regex.h signal.h stdarg.h]) AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/extattr.h sys/ioctl.h]) @@ -268,8 +261,8 @@ AC_ARG_WITH([iconv], AS_HELP_STRING([--without-iconv], [Don't try to link against iconv])) if test "x$with_iconv" != "xno"; then - AC_CHECK_HEADERS([iconv.h],[],[],[#include ]) AM_ICONV + AC_CHECK_HEADERS([iconv.h],[],[],[#include ]) if test "x$am_cv_func_iconv" = "xyes"; then AC_CHECK_HEADERS([localcharset.h]) am_save_LIBS="$LIBS" @@ -364,6 +357,12 @@ AC_CHECK_MEMBERS([struct statfs.f_namema #include ]) +# Check for f_iosize in struct statvfs +AC_CHECK_MEMBERS([struct statvfs.f_iosize],,, +[ +#include +]) + # Check for birthtime in struct stat AC_CHECK_MEMBERS([struct stat.st_birthtime]) @@ -440,13 +439,13 @@ AC_CHECK_FUNCS([futimens futimes futimes AC_CHECK_FUNCS([geteuid getpid getgrgid_r getgrnam_r]) AC_CHECK_FUNCS([getpwnam_r getpwuid_r getvfsbyname gmtime_r]) AC_CHECK_FUNCS([lchflags lchmod lchown link localtime_r lstat lutimes]) -AC_CHECK_FUNCS([mbrtowc mbsnrtowcs memmove memset]) +AC_CHECK_FUNCS([mbrtowc memmove memset]) AC_CHECK_FUNCS([mkdir mkfifo mknod mkstemp]) AC_CHECK_FUNCS([nl_langinfo openat pipe poll readlink readlinkat]) AC_CHECK_FUNCS([select setenv setlocale sigaction statfs statvfs]) AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strrchr symlink timegm]) AC_CHECK_FUNCS([tzset unsetenv utime utimensat utimes vfork]) -AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wcsnrtombs wctomb wmemcmp wmemcpy]) +AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wctomb wmemcmp wmemcpy]) AC_CHECK_FUNCS([_ctime64_s _fseeki64]) AC_CHECK_FUNCS([_get_timezone _localtime64_s _mkgmtime64]) # detects cygwin-1.7, as opposed to older versions Modified: vendor/libarchive/dist/cpio/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/cpio/CMakeLists.txt Fri Jul 27 05:48:42 2012 (r238824) +++ vendor/libarchive/dist/cpio/CMakeLists.txt Fri Jul 27 08:24:12 2012 (r238825) @@ -15,10 +15,6 @@ IF(ENABLE_CPIO) ../libarchive_fe/lafe_platform.h ../libarchive_fe/line_reader.c ../libarchive_fe/line_reader.h - ../libarchive_fe/matching.c - ../libarchive_fe/matching.h - ../libarchive_fe/pathmatch.c *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Jul 27 10:39:30 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B04C01065673; Fri, 27 Jul 2012 10:39:30 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82C188FC08; Fri, 27 Jul 2012 10:39:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6RAdU3q095491; Fri, 27 Jul 2012 10:39:30 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6RAdUwU095490; Fri, 27 Jul 2012 10:39:30 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207271039.q6RAdUwU095490@svn.freebsd.org> From: Martin Matuska Date: Fri, 27 Jul 2012 10:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238833 - vendor/libarchive/3.0.4 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 27 Jul 2012 10:39:30 -0000 Author: mm Date: Fri Jul 27 10:39:30 2012 New Revision: 238833 URL: http://svn.freebsd.org/changeset/base/238833 Log: Tag vendor/libarchive/dist as 3.0.4 Added: vendor/libarchive/3.0.4/ - copied from r238825, vendor/libarchive/dist/