From owner-svn-src-vendor@FreeBSD.ORG Sun Oct 21 18:18:10 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 49CD34BC; Sun, 21 Oct 2012 18:18:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A42D8FC08; Sun, 21 Oct 2012 18:18:10 +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 q9LIIA4H030998; Sun, 21 Oct 2012 18:18:10 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LII95d030989; Sun, 21 Oct 2012 18:18:09 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201210211818.q9LII95d030989@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 21 Oct 2012 18:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241816 - in vendor/dialog/dist: . package package/debian po samples samples/copifuncs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 21 Oct 2012 18:18:10 -0000 Author: nwhitehorn Date: Sun Oct 21 18:18:09 2012 New Revision: 241816 URL: http://svn.freebsd.org/changeset/base/241816 Log: Import dialog-1.1-20120706 Added: vendor/dialog/dist/samples/dft-cancel (contents, props changed) vendor/dialog/dist/samples/dft-extra (contents, props changed) vendor/dialog/dist/samples/dft-help (contents, props changed) vendor/dialog/dist/samples/dft-no (contents, props changed) vendor/dialog/dist/samples/fselect0 (contents, props changed) vendor/dialog/dist/samples/with-dquotes (contents, props changed) vendor/dialog/dist/samples/with-squotes (contents, props changed) Deleted: vendor/dialog/dist/samples/dselect vendor/dialog/dist/samples/valgrind.log Modified: vendor/dialog/dist/CHANGES vendor/dialog/dist/VERSION vendor/dialog/dist/aclocal.m4 vendor/dialog/dist/arrows.c vendor/dialog/dist/buttons.c vendor/dialog/dist/calendar.c vendor/dialog/dist/checklist.c vendor/dialog/dist/columns.c vendor/dialog/dist/configure vendor/dialog/dist/configure.in vendor/dialog/dist/dialog.1 vendor/dialog/dist/dialog.3 vendor/dialog/dist/dialog.c vendor/dialog/dist/dialog.h vendor/dialog/dist/dlg_colors.h vendor/dialog/dist/dlg_keys.c vendor/dialog/dist/dlg_keys.h vendor/dialog/dist/editbox.c vendor/dialog/dist/formbox.c vendor/dialog/dist/fselect.c vendor/dialog/dist/guage.c vendor/dialog/dist/headers-sh.in vendor/dialog/dist/inputbox.c vendor/dialog/dist/inputstr.c vendor/dialog/dist/makefile.in vendor/dialog/dist/menubox.c vendor/dialog/dist/mixedform.c vendor/dialog/dist/mixedgauge.c vendor/dialog/dist/msgbox.c vendor/dialog/dist/package/debian/changelog vendor/dialog/dist/package/dialog.spec vendor/dialog/dist/pause.c vendor/dialog/dist/po/cs.po vendor/dialog/dist/po/el.po vendor/dialog/dist/po/hr.po vendor/dialog/dist/po/sr.po vendor/dialog/dist/prgbox.c vendor/dialog/dist/progressbox.c vendor/dialog/dist/rc.c vendor/dialog/dist/samples/copifuncs/admin.funcs vendor/dialog/dist/samples/copifuncs/common.funcs vendor/dialog/dist/samples/copifuncs/copi.funcs vendor/dialog/dist/samples/copifuncs/copi.ifman2 vendor/dialog/dist/samples/copifuncs/copi.ifpoll2 vendor/dialog/dist/samples/copifuncs/copi.ifreq2 vendor/dialog/dist/samples/copifuncs/copi.sendifm1 vendor/dialog/dist/samples/copifuncs/copi.wheel vendor/dialog/dist/samples/copismall vendor/dialog/dist/samples/debian.rc vendor/dialog/dist/samples/dialog.py vendor/dialog/dist/samples/form1 vendor/dialog/dist/samples/inputmenu vendor/dialog/dist/samples/inputmenu-stdout vendor/dialog/dist/samples/inputmenu1 vendor/dialog/dist/samples/inputmenu2 vendor/dialog/dist/samples/inputmenu3 vendor/dialog/dist/samples/inputmenu4 vendor/dialog/dist/samples/killall vendor/dialog/dist/samples/prgbox vendor/dialog/dist/samples/prgbox2 vendor/dialog/dist/samples/report-button vendor/dialog/dist/samples/report-edit vendor/dialog/dist/samples/report-string vendor/dialog/dist/samples/report-tempfile vendor/dialog/dist/samples/report-yesno vendor/dialog/dist/samples/setup-edit vendor/dialog/dist/samples/setup-tempfile vendor/dialog/dist/samples/setup-utf8 vendor/dialog/dist/samples/setup-vars vendor/dialog/dist/samples/slackware.rc vendor/dialog/dist/samples/sourcemage.rc vendor/dialog/dist/samples/suse.rc vendor/dialog/dist/samples/tailboxbg vendor/dialog/dist/samples/tailboxbg1 vendor/dialog/dist/samples/tailboxbg2 vendor/dialog/dist/samples/testdata-8bit vendor/dialog/dist/samples/wheel vendor/dialog/dist/samples/whiptail.rc vendor/dialog/dist/tailbox.c vendor/dialog/dist/textbox.c vendor/dialog/dist/timebox.c vendor/dialog/dist/trace.c vendor/dialog/dist/ui_getc.c vendor/dialog/dist/util.c vendor/dialog/dist/yesno.c Modified: vendor/dialog/dist/CHANGES ============================================================================== --- vendor/dialog/dist/CHANGES Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/CHANGES Sun Oct 21 18:18:09 2012 (r241816) @@ -1,9 +1,172 @@ --- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $ +-- $Id: CHANGES,v 1.419 2012/07/06 18:18:48 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: +2012/07/06 + + modify samples/setup-tempfile to work with Tru64's shell. + + modify inputmenu sample scripts to make them more portable: + + use "id" rather than "$GROUPS", use sed to work with Solaris. + + use sed to split-up the rename results to work with HPUX. + + fix regression in msgbox (ArchLinux #30574) + +2012/07/03 + + modify prgbox widget to work with --extra-button, etc. + + add case values to several widgets to allow for mouse-clicks with + "--extra-button" and "--help-button" additions. + + correct timebox widget's exit code for "--extra-button" when handing + the "enter" key. + + modify msgbox widget to honor "--extra-button". + + corrected processing of "--trace" option, which did not update the + index into command-line to point past its value. + + add a check in dialog program for valid characters used in option, + e.g., to generate an error if a script attempts to add option value + using "=" rather than with whitespace. + + add new command-line option --default-button and library function + dlg_default_button() to retrieve the value set by the option + to provide a way to set the default button directly rather than + by combining --nook, etc. (patch by Zoltan Kelemen). + + amend include of unctrl.h to apply only to the case where curses.h + is included, to avoid conflict of ncurses' unctrl.h with a system + implementation (report by Martin Roedlach) + + add limit-check to dlg_toupper() in non-wide curses mode to work + when non-character values such as arrow-key codes are passed to + it (patch by Zoltan Kelemen). + + override timeout value, e.g., as set via --timeout command-line + option in pause widget because that interferes with pause's behavior + (report by Jan Spitalnik). + + modify samples/inputmenu* to allow ":" in renamed text (report by + Andreas Stoewing). + + modify double-quoting to make it more consistent, i.e., checklist + output is quoted only when needed. This fixes the case where + single-quotes were used whether or not needed, but also modifies + older checklist behavior for double-quoting which always added those + (Debian #663664). + + correct exit-code used in inputmenu for "rename" button (Debian + #673041, forwarded from Ubuntu #333909, patch by Lebedev Vadim). + + update el.po and hr.po from + http://translationproject.org/latest/dialog/ + + use checkbashisms to clean up sample scripts. + +2012/02/15 + + modify menubox.c to use the same improvement as in checklist.c + + improve auto width computation for checklist widget by using + dlg_calc_list_width as in the non-auto case (Edho Arief). + + eliminate some bashisms in the sample scripts (Pedro Giffuni). + + makefile fixes from FreeBSD ports (Li-Wen Hsu): + + make --with-package option of configure script work. + + get LIBTOOL_VERSION from configure script, needed by + ${LIBTOOL_VERSION} in LIBTOOL_CREATE (LIB_CREATE in configure and + aclocal.m4) + + update cs.po and sr.po from + http://translationproject.org/latest/dialog/ + + updated configure script macros, improving CF_XOPEN_SOURCE among + other fixes. + +2011/10/20 + + fix --analyze warnings for clang versions 2.8, 2.9. + + add configure check for lint program. + + add check in dlg_getc() in case its window is freed as a side effect + of removing callbacks. + + fix logic in freeing subwindows (report by xDog Walker). + + fix a regression in logic distinguishing between inputmenu and menu + widgets (report by xDog Walker). + + minor fixes to library manpage. + +2011/10/18 + + modify header-sh.in to work around limit on sed script length on + HPUX. + + add a special case of parameter parsing for "--trace" to the + initialization done before calling init_dialog(), to allow users to + capture the initial state of the parameter list before any options + are processed and removed. This is only done if "--trace" is the + first option, otherwise it is handled in the common options as before + (report by xDog Walker). + + modify samples/testdata-8bit, discarding $1 from the parameter list + if it was used, so that the source'ing scripts can consistently use + "$@" to insert parameters before the widget, e.g., as an alternative + to using $DIALOGOPTS (report by xDog Walker). + + modify treatment of function pointers in menubox.c, make + dlg_renamed_menutext() and dlg_dummy_menutext() visible to library + users (request by xDog Walker). + + add dlg_count_real_columns(), use to modify centering for "--hline" + text to account for "\Z"s (report by xDog Walker). + + improve check in dlg_draw_arrows2() for conflict between the window + title and up-arrow marker to take into account that the given window + may not be the top-level window of the widget. + + change width of page up/down mouse areas in fselect panes to use the + full width of the panes rather than only the portion from the left + margin to the up/down arrow. + + add/use dlg_draw_box2() and dlg_draw_bottom_box2() to use the + secondary borders. + + modify rc-file read/write to accept/generate color values that refer + to previously-processed items in the color table. This reduces the + number of distinct colors that must be specified to set up a color + scheme. + + add color table entries for secondary borders, i.e., the ones that + are normally drawn with the dialog's text-colors (Debian #641168). + + modify fselect.c to scan the current directory if the input field + happens to be empty (Debian #640905). + + repeated the discussion of environment variables that can override + the exit-status values in the manpage's return-codes section + (Debian #642105). + + add an example to the manpage showing how to override the form + widget's keys used for field/button traversal (Debian #642108). + + modify call to dlg_register_window() in formbox.c so that the editing + bindings are attached to the form sub-window rather than the + top-level dialog window. Also change the name by which the editing + bindings are bound for editbox.c, fselect.c and inputbox.c, so that + the editing and navigation bindings can be different. + + correct logic in dlg_lookup_key() so that it matches the widget name + before using a binding from .dialogrc, allowing the inner/outer + windows of form and other editing widgets to have different bindings. + + modify dlg_register_window() to call dlg_dump_window_keys() after + its updates, via the --trace output, to supplement the manpage + description of key bindings (Debian #642108). + + add DLGK_FORM_PREV and DLGK_FORM_NEXT key-bindings to form.c, to + allow binding a single key to traverse both form-fields and buttons + (Debian #642108). + + modify dlg_parse_rc() to check for error return from + dlg_parse_bindkey(). + + add function dlg_dump_window_keys(), to help with debugging widgets. + + add CR, LF, TAB, FF and ESC to table of curses names to help make + key bindings more readable. + + update table of dialog key-names so that helpfile and trace are + dumped properly. + + correct dlg_dump_keys(), which was showing only the first item in + the matched binding table. + + save/restore window current position in dlg_update_mixedgauge(). + + pass return-code from pause_for_ok() from dlg_progressbox() when + pauseopt is set, rather than only DLG_OK. + + call setlocale() in init_dialog() rather than relying on on-demand + use within inputstr.c, since there are paths in textbox widget which + do not exercise the latter (report by xDog Walker). + + fix some places where checks for "\Z" were done without also checking + dialog_vars.colors (report by Moray Henderson). + + correct logic for DIALOGOPTS parsing so that the parse happens only + once unless memory leak checking is enabled (report by xDog Walker). + + remove an incorrect free() call in dlg_free_gauge() (report by xDog + Walker). + + modify dlg_trace_win() to log wide-characters (report by xDog Walker). + + make traces shorter by skipping repeated ERR's, but showing the + number skipped (report by xDog Walker). + + improve description in manpage to distinguish program box and + progress box from tailboxes (adapted from email by xDog Walker). + + modify dlg_trace_win() so that it looks for the topmost window in a + dialog. Because subwindows share space with the top window, tracing + the latter shows the whole widget (report by xDog Walker). + + expand tracing so that each window is traced before soliciting input, + making the ^T feature to print a window on demand partly redundant + (suggested by xDog Walker). + + cosmetic change in dialog.h to avoid "*/*" strings from comments next + to "*" (report by xDog Walker). + + ensure result from dlg_align_columns() has trailing null on each + string. Analysis was hindered by libc6's continuance of libc5's + early-1990s misfeature of clearing the result from malloc, noting + that libc6's documentation incorrectly claims that it does not do + this (report by xDog Walker). + 2011/07/07 + modify util.c to work better with old versions of ncurses: + suppress use of wchgat() before fix in 20060715 which is needed @@ -87,7 +250,7 @@ to it: + CF_XOPEN_SOURCE, workaround for cygwin to get ncurses' configure script to define _XOPEN_SOURCE_EXTENDED (cygwin's features.h doesn't do anything, so it needs a crutch). - + updated config.guess, config.sub + + update config.guess, config.sub 2011/03/02 + add --prgbox and --programbox (adapted from patch by David Boyd). @@ -155,7 +318,7 @@ to it: CF_ADD_LIBDIR for the curses-directory here, from CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even with the default checking, e.g., no --with-ncurses, etc. - + updated config.guess, config.sub + + update config.guess, config.sub 2010/04/28 + several improvements to configure script: @@ -250,7 +413,7 @@ to it: libutf8 and libiconv. + update da.po, ru.po from http://translationproject.org/latest/dialog/ - + updated config.guess, config.sub + + update config.guess, config.sub 2008/08/19 + amend changes to quoting; by default, the checklist widget quotes its @@ -333,7 +496,7 @@ to it: ESC to be returned, quitting dialog (report by Reiner Huober). + add extern "C" declarations to dlg_keys.h so the corresponding function declarations are exported to C++ as C symbols. - + updated config.guess, config.sub + + update config.guess, config.sub 2007/06/04 + fix a memory leak in editbox.c @@ -436,7 +599,7 @@ to it: CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE. - + updated config.guess, config.sub + + update config.guess, config.sub > adapted fixes from SuSE package (Werner Fink): + add some limit-checks in dlg_draw_shadow(). + make shadows resizable, using new dlg_move_window() in msgbox.c Modified: vendor/dialog/dist/VERSION ============================================================================== --- vendor/dialog/dist/VERSION Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/VERSION Sun Oct 21 18:18:09 2012 (r241816) @@ -1 +1 @@ -10:0:0 1.1 20110707 +10:4:0 1.1 20120706 Modified: vendor/dialog/dist/aclocal.m4 ============================================================================== --- vendor/dialog/dist/aclocal.m4 Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/aclocal.m4 Sun Oct 21 18:18:09 2012 (r241816) @@ -1,7 +1,7 @@ dnl macros used for DIALOG configure script -dnl $Id: aclocal.m4,v 1.82 2011/06/28 22:48:31 tom Exp $ +dnl $Id: aclocal.m4,v 1.87 2012/02/16 02:11:26 tom Exp $ dnl --------------------------------------------------------------------------- -dnl Copyright 1999-2010,2011 -- Thomas E. Dickey +dnl Copyright 1999-2011,2012 -- Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -592,6 +592,31 @@ changequote([,])dnl AC_SUBST(GENCAT) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03 +dnl ------------------ +dnl Conditionally generate script according to whether we're using a given autoconf. +dnl +dnl $1 = version to compare against +dnl $2 = code to use if AC_ACVERSION is at least as high as $1. +dnl $3 = code to use if AC_ACVERSION is older than $1. +define(CF_ACVERSION_CHECK, +[ +ifdef([m4_version_compare], +[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], +[CF_ACVERSION_COMPARE( +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), +AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50 +dnl -------------------- +dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, +dnl MAJOR2, MINOR2, TERNARY2, +dnl PRINTABLE2, not FOUND, FOUND) +define(CF_ACVERSION_COMPARE, +[ifelse(builtin([eval], [$2 < $5]), 1, +[ifelse([$8], , ,[$8])], +[ifelse([$9], , ,[$9])])])dnl +dnl --------------------------------------------------------------------------- dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56 dnl ------------ dnl Conditionally generate script according to whether we're using the release @@ -1227,7 +1252,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08 +dnl CF_CURSES_LIBS version: 35 updated: 2011/08/09 21:06:37 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1307,7 +1332,7 @@ if test ".$ac_cv_func_initscr" != .yes ; # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ - for cf_term_lib in $cf_check_list termcap termlib unknown + for cf_term_lib in $cf_check_list otermcap termcap termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[break]) done @@ -1533,6 +1558,30 @@ fi test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WGETPARENT version: 2 updated: 2011/10/17 20:12:04 +dnl -------------------- +dnl Check for curses support for directly determining the parent of a given +dnl window. Some implementations make this difficult, so we provide for +dnl defining an application-specific function that gives this functionality. +dnl +dnl $1 = name of function to use if the feature is missing +AC_DEFUN([CF_CURSES_WGETPARENT],[ +CF_CURSES_FUNCS(wgetparent) +if test "x$cf_cv_func_wgetparent" != xyes +then + AC_MSG_CHECKING(if WINDOW has _parent member) + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], + [WINDOW *p = stdscr->_parent], + [cf_window__parent=yes], + [cf_window__parent=no]) + AC_MSG_RESULT($cf_window__parent) + if test "$cf_window__parent" = yes + then + AC_DEFINE(HAVE_WINDOW__PARENT) + fi +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. @@ -2337,7 +2386,7 @@ ifdef([AC_FUNC_FSEEKO],[ ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13 +dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41 dnl --------------- dnl For the given system and compiler, find the compiler flags to pass to the dnl loader to use the "rpath" feature. @@ -2361,7 +2410,7 @@ linux*|gnu*|k*bsd*-gnu) #(vi openbsd[[2-9]].*|mirbsd*) #(vi LD_RPATH_OPT="-Wl,-rpath," ;; -freebsd*) #(vi +dragonfly*|freebsd*) #(vi LD_RPATH_OPT="-rpath " ;; netbsd*) #(vi @@ -2420,11 +2469,11 @@ CF_SUBDIR_PATH($1,$2,lib) $1="$cf_library_path_list [$]$1" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16 +dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 dnl ------------- dnl Compute the library-prefix for the given host system dnl $1 = variable to set -AC_DEFUN([CF_LIB_PREFIX], +define([CF_LIB_PREFIX], [ case $cf_cv_system_name in #(vi OS/2*|os2*) #(vi @@ -2645,7 +2694,7 @@ printf("old\n"); ,[$1=no]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30 +dnl CF_NCURSES_CONFIG version: 9 updated: 2011/11/26 15:42:05 dnl ----------------- dnl Tie together the configure-script macros for ncurses. dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis. @@ -2657,7 +2706,10 @@ AC_DEFUN([CF_NCURSES_CONFIG], cf_ncuconfig_root=ifelse($1,,ncurses,$1) echo "Looking for ${cf_ncuconfig_root}-config" -AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none) + +CF_ACVERSION_CHECK(2.52, + [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)], + [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)]) if test "$NCURSES_CONFIG" != none ; then @@ -3171,6 +3223,14 @@ AC_SUBST(PROG_EXT) test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT") ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 +dnl ------------ +AC_DEFUN([CF_PROG_LINT], +[ +AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) +AC_SUBST(LINT_OPTS) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list @@ -3418,6 +3478,45 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50 +dnl ------------------- +dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we +dnl can define it successfully. +AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ +AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ + AC_TRY_COMPILE([ +#include +#include +#include +],[ +#ifndef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" + AC_TRY_COMPILE([ +#include +#include +#include +],[ +#ifdef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) + CPPFLAGS="$cf_save" + ]) +]) + +if test "$cf_cv_xopen_source" != no ; then + CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) + CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) + cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" + CF_ADD_CFLAGS($cf_temp_xopen_source) +fi +]) +dnl --------------------------------------------------------------------------- dnl CF_UNION_WAIT version: 5 updated: 1997/11/23 14:49:44 dnl ------------- dnl Check to see if the BSD-style union wait is declared. Some platforms may @@ -3680,7 +3779,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL version: 27 updated: 2011/06/28 18:45:38 +dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32 dnl --------------- dnl Provide a configure option to incorporate libtool. Define several useful dnl symbols for the makefile rules. @@ -3781,7 +3880,7 @@ ifdef([AC_PROG_LIBTOOL],[ # special hack to add -no-undefined (which libtool should do for itself) LT_UNDEF= case "$cf_cv_system_name" in #(vi - cygwin*|mingw32*|uwin*|aix[[456]]) #(vi + cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi LT_UNDEF=-no-undefined ;; esac @@ -3950,7 +4049,7 @@ AC_TRY_LINK([ test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37 +dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -3966,7 +4065,7 @@ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[ cf_xopen_source= case $host_os in #(vi -aix[[456]]*) #(vi +aix[[4-7]]*) #(vi cf_xopen_source="-D_ALL_SOURCE" ;; cygwin) #(vi @@ -3977,6 +4076,7 @@ darwin[[0-8]].*) #(vi ;; darwin*) #(vi cf_xopen_source="-D_DARWIN_C_SOURCE" + cf_XOPEN_SOURCE= ;; freebsd*|dragonfly*) #(vi # 5.x headers associate @@ -3994,15 +4094,23 @@ hpux*) #(vi ;; irix[[56]].*) #(vi cf_xopen_source="-D_SGI_SOURCE" + cf_XOPEN_SOURCE= ;; linux*|gnu*|mint*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; mirbsd*) #(vi - # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks + # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types + cf_XOPEN_SOURCE= + CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; netbsd*) #(vi - # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw + cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw + ;; +openbsd[[4-9]]*) #(vi + # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw + cf_xopen_source="-D_BSD_SOURCE" + cf_XOPEN_SOURCE=600 ;; openbsd*) #(vi # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw @@ -4016,36 +4124,11 @@ nto-qnx*) #(vi sco*) #(vi # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;; -solaris2.1[[0-9]]) #(vi - cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - ;; -solaris2.[[1-9]]) #(vi +solaris2.*) #(vi cf_xopen_source="-D__EXTENSIONS__" ;; *) - AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ - AC_TRY_COMPILE([#include ],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - AC_TRY_COMPILE([#include ],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) - CPPFLAGS="$cf_save" - ]) -]) - if test "$cf_cv_xopen_source" != no ; then - CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) - CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) - cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" - CF_ADD_CFLAGS($cf_temp_xopen_source) - fi + CF_TRY_XOPEN_SOURCE CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; esac @@ -4053,6 +4136,35 @@ esac if test -n "$cf_xopen_source" ; then CF_ADD_CFLAGS($cf_xopen_source) fi + +dnl In anything but the default case, we may have system-specific setting +dnl which is still not guaranteed to provide all of the entrypoints that +dnl _XOPEN_SOURCE would yield. +if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then + AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) + AC_TRY_COMPILE([#include ],[ +#ifndef _XOPEN_SOURCE +make an error +#endif], + [cf_XOPEN_SOURCE_set=yes], + [cf_XOPEN_SOURCE_set=no]) + AC_MSG_RESULT($cf_XOPEN_SOURCE_set) + if test $cf_XOPEN_SOURCE_set = yes + then + AC_TRY_COMPILE([#include ],[ +#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE +make an error +#endif], + [cf_XOPEN_SOURCE_set_ok=yes], + [cf_XOPEN_SOURCE_set_ok=no]) + if test $cf_XOPEN_SOURCE_set_ok = no + then + AC_MSG_WARN(_XOPEN_SOURCE is lower than requested) + fi + else + CF_TRY_XOPEN_SOURCE + fi +fi ]) dnl --------------------------------------------------------------------------- dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49 Modified: vendor/dialog/dist/arrows.c ============================================================================== --- vendor/dialog/dist/arrows.c Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/arrows.c Sun Oct 21 18:18:09 2012 (r241816) @@ -1,5 +1,5 @@ /* - * $Id: arrows.c,v 1.36 2011/06/27 09:13:56 tom Exp $ + * $Id: arrows.c,v 1.41 2011/10/20 23:37:17 tom Exp $ * * arrows.c -- draw arrows to indicate end-of-range for lists * @@ -79,9 +79,9 @@ dlg_draw_helpline(WINDOW *win, bool deco const int *cols = dlg_index_columns(dialog_vars.help_line); int other = decorations ? (ON_LEFT + ON_RIGHT) : 0; int avail = (getmaxx(win) - other - 2); - int limit = dlg_limit_columns(dialog_vars.help_line, avail, 0); + int limit = dlg_count_real_columns(dialog_vars.help_line) + 2; - if (limit > 0) { + if (limit < avail) { getyx(win, cur_y, cur_x); other = decorations ? ON_LEFT : 0; (void) wmove(win, bottom, other + (avail - limit) / 2); @@ -107,13 +107,14 @@ dlg_draw_arrows2(WINDOW *win, int cur_x, cur_y; int limit_x = getmaxx(win); bool draw_top = TRUE; + bool is_toplevel = (wgetparent(win) == stdscr); getyx(win, cur_y, cur_x); /* * If we're drawing a centered title, do not overwrite with the arrows. */ - if (dialog_vars.title) { + if (dialog_vars.title && is_toplevel && (top - getbegy(win)) < MARGIN) { int have = (limit_x - dlg_count_columns(dialog_vars.title)) / 2; int need = x + 5; if (need > have) @@ -123,11 +124,11 @@ dlg_draw_arrows2(WINDOW *win, if (draw_top) { (void) wmove(win, top, x); if (top_arrow) { - wattrset(win, merge_colors(uarrow_attr, attr)); + (void) wattrset(win, merge_colors(uarrow_attr, attr)); (void) add_acs(win, ACS_UARROW); (void) waddstr(win, "(-)"); } else { - wattrset(win, attr); + (void) wattrset(win, attr); (void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT); } } @@ -135,11 +136,11 @@ dlg_draw_arrows2(WINDOW *win, (void) wmove(win, bottom, x); if (bottom_arrow) { - wattrset(win, merge_colors(darrow_attr, attr)); + (void) wattrset(win, merge_colors(darrow_attr, attr)); (void) add_acs(win, ACS_DARROW); (void) waddstr(win, "(+)"); } else { - wattrset(win, borderattr); + (void) wattrset(win, borderattr); (void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT); } mouse_mkbutton(bottom, x - 1, 6, KEY_NPAGE); @@ -147,7 +148,7 @@ dlg_draw_arrows2(WINDOW *win, (void) wmove(win, cur_y, cur_x); wrefresh(win); - wattrset(win, save); + (void) wattrset(win, save); } void @@ -166,14 +167,13 @@ dlg_draw_scrollbar(WINDOW *win, char buffer[80]; int percent; int len; - int oldy, oldx, maxy, maxx; + int oldy, oldx; chtype save = dlg_get_attrs(win); int top_arrow = (first_data != 0); int bottom_arrow = (next_data < total_data); getyx(win, oldy, oldx); - getmaxyx(win, maxy, maxx); dlg_draw_helpline(win, TRUE); if (bottom_arrow || top_arrow || dialog_state.use_scrollbar) { @@ -187,12 +187,12 @@ dlg_draw_scrollbar(WINDOW *win, else if (percent > 100) percent = 100; - wattrset(win, position_indicator_attr); + (void) wattrset(win, position_indicator_attr); (void) sprintf(buffer, "%d%%", percent); (void) wmove(win, bottom, right - 7); (void) waddstr(win, buffer); if ((len = dlg_count_columns(buffer)) < 4) { - wattrset(win, border_attr); + (void) wattrset(win, border_attr); whline(win, dlg_boxchar(ACS_HLINE), 4 - len); } } @@ -212,7 +212,7 @@ dlg_draw_scrollbar(WINDOW *win, if (bar_high < all_high) { wmove(win, top + 1, right); - wattrset(win, save); + (void) wattrset(win, save); wvline(win, ACS_VLINE | A_REVERSE, all_high); bar_y = BARSIZE(this_data); @@ -221,7 +221,7 @@ dlg_draw_scrollbar(WINDOW *win, wmove(win, top + 1 + bar_y, right); - wattrset(win, position_indicator_attr); + (void) wattrset(win, position_indicator_attr); wattron(win, A_REVERSE); wvline(win, ACS_BLOCK, bar_high); } @@ -236,7 +236,7 @@ dlg_draw_scrollbar(WINDOW *win, attr, borderattr); - wattrset(win, save); + (void) wattrset(win, save); wmove(win, oldy, oldx); } @@ -255,6 +255,6 @@ dlg_draw_arrows(WINDOW *win, x, top, bottom, - menubox_attr, + menubox_border2_attr, menubox_border_attr); } Modified: vendor/dialog/dist/buttons.c ============================================================================== --- vendor/dialog/dist/buttons.c Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/buttons.c Sun Oct 21 18:18:09 2012 (r241816) @@ -1,9 +1,9 @@ /* - * $Id: buttons.c,v 1.86 2011/06/28 10:46:46 tom Exp $ + * $Id: buttons.c,v 1.90 2012/07/01 20:42:05 tom Exp $ * * buttons.c -- draw buttons, e.g., OK/Cancel * - * Copyright 2000-2010,2011 Thomas E. Dickey + * Copyright 2000-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -104,11 +104,11 @@ print_button(WINDOW *win, char *label, i : button_label_inactive_attr); (void) wmove(win, y, x); - wattrset(win, selected - ? button_active_attr - : button_inactive_attr); + (void) wattrset(win, selected + ? button_active_attr + : button_inactive_attr); (void) waddstr(win, "<"); - wattrset(win, label_attr); + (void) wattrset(win, label_attr); for (i = 0; i < limit; ++i) { int first = indx[i]; int last = indx[i + 1]; @@ -120,14 +120,14 @@ print_button(WINDOW *win, char *label, i const char *temp = (label + first); int cmp = string_to_char(&temp); if (dlg_isupper(cmp)) { - wattrset(win, key_attr); + (void) wattrset(win, key_attr); state = 1; } break; } #endif if (dlg_isupper(UCH(label[first]))) { - wattrset(win, key_attr); + (void) wattrset(win, key_attr); state = 1; } break; @@ -138,9 +138,9 @@ print_button(WINDOW *win, char *label, i } waddnstr(win, label + first, last - first); } - wattrset(win, selected - ? button_active_attr - : button_inactive_attr); + (void) wattrset(win, selected + ? button_active_attr + : button_inactive_attr); (void) waddstr(win, ">"); (void) wmove(win, y, x + ((int) strspn(label, " ")) + 1); } @@ -310,7 +310,7 @@ dlg_draw_buttons(WINDOW *win, (void) wmove(win, final_y, final_x); wrefresh(win); free(buffer); - wattrset(win, save); + (void) wattrset(win, save); } /* @@ -488,10 +488,12 @@ dlg_exit_buttoncode(int button) const char ** dlg_ok_label(void) { - static const char *labels[3]; + static const char *labels[4]; int n = 0; labels[n++] = my_ok_label(); + if (dialog_vars.extra_button) + labels[n++] = my_extra_label(); if (dialog_vars.help_button) labels[n++] = my_help_label(); labels[n] = 0; @@ -537,6 +539,7 @@ dlg_ok_buttoncode(int button) } else if (dialog_vars.help_button && (button == n)) { result = DLG_EXIT_HELP; } + dlg_trace_msg("# dlg_ok_buttoncode(%d) = %d\n", button, result); return result; } @@ -575,7 +578,7 @@ dlg_prev_ok_buttonindex(int current, int /* * Find the button-index for the "OK" or "Cancel" button, according to * whether --defaultno is given. If --nocancel was given, we always return - * the index for "OK". + * the index for the first button (usually "OK" unless --nook was used). */ int dlg_defaultno_button(void) @@ -586,6 +589,30 @@ dlg_defaultno_button(void) while (dlg_ok_buttoncode(result) != DLG_EXIT_CANCEL) ++result; } + dlg_trace_msg("# dlg_defaultno_button() = %d\n", result); + return result; +} + +/* + * Find the button-index for a button named with --default-button. If the + * option was not specified, or if the selected button does not exist, return + * the index of the first button (usually "OK" unless --nook was used). + */ +int +dlg_default_button(void) +{ + int i, n; + int result = 0; + + if (dialog_vars.default_button >= 0) { + for (i = 0; (n = dlg_ok_buttoncode(i)) >= 0; i++) { + if (n == dialog_vars.default_button) { + result = i; + break; + } + } + } + dlg_trace_msg("# dlg_default_button() = %d\n", result); return result; } Modified: vendor/dialog/dist/calendar.c ============================================================================== --- vendor/dialog/dist/calendar.c Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/calendar.c Sun Oct 21 18:18:09 2012 (r241816) @@ -1,9 +1,9 @@ /* - * $Id: calendar.c,v 1.62 2011/06/29 09:47:06 tom Exp $ + * $Id: calendar.c,v 1.66 2012/07/01 18:13:07 Zoltan.Kelemen Exp $ * * calendar.c -- implements the calendar box * - * Copyright 2001-2010,2011 Thomas E. Dickey + * Copyright 2001-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -225,12 +225,14 @@ draw_day(BOX * data, struct tm *current) int prev = days_in_month(current, -1); werase(data->window); - dlg_draw_box(data->parent, - data->y - MARGIN, data->x - MARGIN, - data->height + (2 * MARGIN), data->width + (2 * MARGIN), - menubox_border_attr, menubox_attr); /* border of daybox */ + dlg_draw_box2(data->parent, + data->y - MARGIN, data->x - MARGIN, + data->height + (2 * MARGIN), data->width + (2 * MARGIN), + menubox_attr, + menubox_border_attr, + menubox_border2_attr); - wattrset(data->window, menubox_attr); /* daynames headline */ + (void) wattrset(data->window, menubox_attr); /* daynames headline */ for (x = 0; x < 7; x++) { mvwprintw(data->window, 0, (x + 1) * cell_wide, "%*.*s ", @@ -246,7 +248,7 @@ draw_day(BOX * data, struct tm *current) week = (current->tm_yday + 6 + mday - current->tm_mday) / 7; for (y = 1; mday < last; y++) { - wattrset(data->window, menubox_attr); /* weeknumbers headline */ + (void) wattrset(data->window, menubox_attr); /* weeknumbers headline */ mvwprintw(data->window, y, 0, "%*d ", @@ -257,9 +259,9 @@ draw_day(BOX * data, struct tm *current) ++mday; if (wmove(data->window, y, this_x) == ERR) continue; - wattrset(data->window, item_attr); /* not selected days */ + (void) wattrset(data->window, item_attr); /* not selected days */ if (mday == day) { - wattrset(data->window, item_selected_attr); /* selected day */ + (void) wattrset(data->window, item_selected_attr); /* selected day */ save_y = y; save_x = this_x; } @@ -294,13 +296,15 @@ draw_month(BOX * data, struct tm *curren month = current->tm_mon + 1; - wattrset(data->parent, dialog_attr); /* Headline "Month" */ + (void) wattrset(data->parent, dialog_attr); /* Headline "Month" */ (void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Month")); - dlg_draw_box(data->parent, - data->y - 1, data->x - 1, - data->height + 2, data->width + 2, - menubox_border_attr, menubox_attr); /* borders of monthbox */ - wattrset(data->window, item_attr); /* color the month selection */ + dlg_draw_box2(data->parent, + data->y - 1, data->x - 1, + data->height + 2, data->width + 2, + menubox_attr, + menubox_border_attr, + menubox_border2_attr); + (void) wattrset(data->window, item_attr); /* color the month selection */ mvwprintw(data->window, 0, 0, "%s", nameOfMonth(month - 1)); wmove(data->window, 0, 0); return 0; @@ -314,13 +318,15 @@ draw_year(BOX * data, struct tm *current { int year = current->tm_year + 1900; - wattrset(data->parent, dialog_attr); /* Headline "Year" */ + (void) wattrset(data->parent, dialog_attr); /* Headline "Year" */ (void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Year")); - dlg_draw_box(data->parent, - data->y - 1, data->x - 1, - data->height + 2, data->width + 2, - menubox_border_attr, menubox_attr); /* borders of yearbox */ - wattrset(data->window, item_attr); /* color the year selection */ + dlg_draw_box2(data->parent, + data->y - 1, data->x - 1, + data->height + 2, data->width + 2, + menubox_attr, + menubox_border_attr, + menubox_border2_attr); + (void) wattrset(data->window, item_attr); /* color the year selection */ mvwprintw(data->window, 0, 0, "%4d", year); wmove(data->window, 0, 0); return 0; @@ -430,7 +436,7 @@ dialog_calendar(const char *title, WINDOW *dialog; time_t now_time = time((time_t *) 0); struct tm current; - int state = dlg_defaultno_button(); + int state = dlg_default_button(); const char **buttons = dlg_ok_labels(); char *prompt = dlg_strclone(subtitle); int mincols = MIN_WIDE; @@ -491,11 +497,11 @@ dialog_calendar(const char *title, dlg_register_buttons(dialog, "calendar", buttons); /* mainbox */ - dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); - dlg_draw_bottom_box(dialog); + dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); dlg_draw_title(dialog, title); - wattrset(dialog, dialog_attr); /* text mainbox */ + (void) wattrset(dialog, dialog_attr); /* text mainbox */ dlg_print_autowrap(dialog, prompt, height, width); /* compute positions of day, month and year boxes */ @@ -539,6 +545,7 @@ dialog_calendar(const char *title, return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars); } + dlg_trace_win(dialog); while (result == DLG_EXIT_UNKNOWN) { BOX *obj = (state == sDAY ? &dy_box : (state == sMONTH ? &mn_box : Modified: vendor/dialog/dist/checklist.c ============================================================================== --- vendor/dialog/dist/checklist.c Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/checklist.c Sun Oct 21 18:18:09 2012 (r241816) @@ -1,9 +1,9 @@ /* - * $Id: checklist.c,v 1.127 2011/06/29 23:04:09 tom Exp $ + * $Id: checklist.c,v 1.135 2012/07/01 16:30:04 Zoltan.Kelemen Exp $ * * checklist.c -- implements the checklist box * - * Copyright 2000-2010,2011 Thomas E. Dickey + * Copyright 2000-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -58,7 +58,7 @@ print_arrows(WINDOW *win, box_x + list_width, box_y, box_y + list_height + 1, - menubox_attr, + menubox_border2_attr, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sun Oct 21 18:18:50 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 05B22715; Sun, 21 Oct 2012 18:18:50 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6E428FC16; Sun, 21 Oct 2012 18:18: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 q9LIInap031131; Sun, 21 Oct 2012 18:18:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LIInHB031130; Sun, 21 Oct 2012 18:18:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201210211818.q9LIInHB031130@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 21 Oct 2012 18:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241817 - vendor/dialog/dialog-1.1-20120706 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 21 Oct 2012 18:18:50 -0000 Author: nwhitehorn Date: Sun Oct 21 18:18:49 2012 New Revision: 241817 URL: http://svn.freebsd.org/changeset/base/241817 Log: Tag dialog-1.1-20120706 Added: vendor/dialog/dialog-1.1-20120706/ - copied from r241816, vendor/dialog/dist/ From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 22 10:08:49 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 A6987878; Mon, 22 Oct 2012 10:08:49 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 851B58FC08; Mon, 22 Oct 2012 10:08: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 q9MA8nNT086272; Mon, 22 Oct 2012 10:08:49 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MA8nnm086269; Mon, 22 Oct 2012 10:08:49 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221008.q9MA8nnm086269@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241867 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Oct 2012 10:08:49 -0000 Author: edwin Date: Mon Oct 22 10:08:48 2012 New Revision: 241867 URL: http://svn.freebsd.org/changeset/base/241867 Log: Vendor import of tzdata2012g: - Fix end of DST in Gaza and Hebron - Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013. Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: vendor/tzdata/dist/asia vendor/tzdata/dist/australasia Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Mon Oct 22 09:38:07 2012 (r241866) +++ vendor/tzdata/dist/asia Mon Oct 22 10:08:48 2012 (r241867) @@ -2293,6 +2293,8 @@ Rule Palestine 2010 only - Aug 11 0:00 0 # From Arthur David Olson (2011-09-20): # 2011 transitions per http://www.timeanddate.com as of 2011-09-20. +# From Paul Eggert (2012-10-12): +# 2012 transitions per http://www.timeanddate.com as of 2012-10-12. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2303,7 +2305,7 @@ Zone Asia/Gaza 2:17:52 - LMT 1900 Oct 2:00 Palestine EE%sT 2011 Apr 2 12:01 2:00 1:00 EEST 2011 Aug 1 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET Zone Asia/Hebron 2:20:23 - LMT 1900 Oct @@ -2318,7 +2320,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct 2:00 - EET 2011 Aug 30 2:00 1:00 EEST 2011 Sep 30 3:00 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 3:00 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET # Paracel Is Modified: vendor/tzdata/dist/australasia ============================================================================== --- vendor/tzdata/dist/australasia Mon Oct 22 09:38:07 2012 (r241866) +++ vendor/tzdata/dist/australasia Mon Oct 22 10:08:48 2012 (r241867) @@ -628,6 +628,23 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 # Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012 # seasons, there is not yet any indication that this trend will continue on # a regular basis. For now, we have explicitly listed the transitions below. +# +# From Nicky (2012-09-10): +# Daylight Saving Time commences on Sunday 30th September 2012 and +# ends on Sunday 7th of April 2013. +# +# Please find link below for more information. +# http://www.mcil.gov.ws/mcil_publications.html +# +# That publication also includes dates for Summer of 2013/4 as well +# which give the impression of a pattern in selecting dates for the +# future, so for now, we will guess this will continue. + +# Western Samoa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule WS 2012 max - Sep lastSun 3:00 1 D +Rule WS 2012 max - Apr Sun>=1 4:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time @@ -635,8 +652,8 @@ Zone Pacific/Apia 12:33:04 - LMT 1879 J -11:00 1:00 WSDT 2011 Apr 2 4:00 -11:00 - WST 2011 Sep 24 3:00 -11:00 1:00 WSDT 2011 Dec 30 - 13:00 1:00 WSDT 2012 Apr 1 4:00 - 13:00 - WST + 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00 + 13:00 WS WS%sT # Solomon Is # excludes Bougainville, for which see Papua New Guinea From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 22 10:18:42 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 5756FD26; Mon, 22 Oct 2012 10:18:42 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25EC38FC0A; Mon, 22 Oct 2012 10:18:42 +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 q9MAIgsT087834; Mon, 22 Oct 2012 10:18:42 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MAIfZJ087833; Mon, 22 Oct 2012 10:18:41 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221018.q9MAIfZJ087833@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241868 - vendor/tzdata/tzdata2012g X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Oct 2012 10:18:42 -0000 Author: edwin Date: Mon Oct 22 10:18:41 2012 New Revision: 241868 URL: http://svn.freebsd.org/changeset/base/241868 Log: Tag of tzdata2012g sources Added: vendor/tzdata/tzdata2012g/ - copied from r241867, vendor/tzdata/dist/ From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 22 18:04:00 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 ED03FB6D; Mon, 22 Oct 2012 18:04:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D07368FC0A; Mon, 22 Oct 2012 18:04:00 +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 q9MI40ql065531; Mon, 22 Oct 2012 18:04:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MI407b065523; Mon, 22 Oct 2012 18:04:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210221804.q9MI407b065523@svn.freebsd.org> From: Dimitry Andric Date: Mon, 22 Oct 2012 18:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241900 - in vendor/libc++/dist: . include include/support src src/support X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Oct 2012 18:04:01 -0000 Author: dim Date: Mon Oct 22 18:04:00 2012 New Revision: 241900 URL: http://svn.freebsd.org/changeset/base/241900 Log: Vendor import of libc++ trunk r165949: http://llvm.org/svn/llvm-project/libcxx/trunk@165949 Added: vendor/libc++/dist/CREDITS.TXT vendor/libc++/dist/LICENSE.TXT Deleted: vendor/libc++/dist/include/support/ vendor/libc++/dist/src/support/ Modified: vendor/libc++/dist/include/__bit_reference vendor/libc++/dist/include/__config vendor/libc++/dist/include/__hash_table vendor/libc++/dist/include/__locale vendor/libc++/dist/include/__mutex_base vendor/libc++/dist/include/__tree vendor/libc++/dist/include/__tuple vendor/libc++/dist/include/__undef_min_max vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/array vendor/libc++/dist/include/atomic vendor/libc++/dist/include/bitset vendor/libc++/dist/include/chrono vendor/libc++/dist/include/cmath vendor/libc++/dist/include/complex vendor/libc++/dist/include/condition_variable vendor/libc++/dist/include/cstddef vendor/libc++/dist/include/cstdio vendor/libc++/dist/include/cstdlib vendor/libc++/dist/include/deque vendor/libc++/dist/include/exception vendor/libc++/dist/include/forward_list vendor/libc++/dist/include/fstream vendor/libc++/dist/include/functional vendor/libc++/dist/include/future vendor/libc++/dist/include/ios vendor/libc++/dist/include/iosfwd vendor/libc++/dist/include/istream vendor/libc++/dist/include/iterator vendor/libc++/dist/include/list vendor/libc++/dist/include/locale vendor/libc++/dist/include/map vendor/libc++/dist/include/memory vendor/libc++/dist/include/mutex vendor/libc++/dist/include/new vendor/libc++/dist/include/ostream vendor/libc++/dist/include/queue vendor/libc++/dist/include/random vendor/libc++/dist/include/regex vendor/libc++/dist/include/stack vendor/libc++/dist/include/streambuf vendor/libc++/dist/include/string vendor/libc++/dist/include/system_error vendor/libc++/dist/include/thread vendor/libc++/dist/include/tuple vendor/libc++/dist/include/type_traits vendor/libc++/dist/include/unordered_map vendor/libc++/dist/include/utility vendor/libc++/dist/include/valarray vendor/libc++/dist/include/vector vendor/libc++/dist/src/condition_variable.cpp vendor/libc++/dist/src/debug.cpp vendor/libc++/dist/src/exception.cpp vendor/libc++/dist/src/future.cpp vendor/libc++/dist/src/ios.cpp vendor/libc++/dist/src/iostream.cpp vendor/libc++/dist/src/locale.cpp vendor/libc++/dist/src/memory.cpp vendor/libc++/dist/src/mutex.cpp vendor/libc++/dist/src/new.cpp vendor/libc++/dist/src/random.cpp vendor/libc++/dist/src/stdexcept.cpp vendor/libc++/dist/src/thread.cpp vendor/libc++/dist/src/typeinfo.cpp Added: vendor/libc++/dist/CREDITS.TXT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/CREDITS.TXT Mon Oct 22 18:04:00 2012 (r241900) @@ -0,0 +1,76 @@ +This file is a partial list of people who have contributed to the LLVM/libc++ +project. If you have contributed a patch or made some other contribution to +LLVM/libc++, please submit a patch to this file to add yourself, and it will be +done! + +The list is sorted by surname and formatted to allow easy grepping and +beautification by scripts. The fields are: name (N), email (E), web-address +(W), PGP key ID and fingerprint (P), description (D), and snail-mail address +(S). + +N: Howard Hinnant +E: hhinnant@apple.com +D: Architect and primary author of libc++ + +N: Marshall Clow +E: mclow.lists@gmail.com +E: marshall@idio.com +D: Minor patches and bug fixes. + +N: Bjorn Reese +E: breese@users.sourceforge.net +D: Initial regex prototype + +N: David Chisnall +E: theraven at theravensnest dot org +D: FreeBSD and Solaris ports, libcxxrt support, some atomics work. + +N: Ruben Van Boxem +E: vanboxem dot ruben at gmail dot com +D: Initial Windows patches. + +N: Arvid Picciani +E: aep at exys dot org +D: Minor patches and musl port. + +N: Craig Silverstein +E: csilvers@google.com +D: Implemented Cityhash as the string hash function on 64-bit machines + +N: Google Inc. +D: Copyright owner and contributor of the CityHash algorithm + +N: Jeffrey Yasskin +E: jyasskin@gmail.com +E: jyasskin@google.com +D: Linux fixes. + +N: Jonathan Sauer +D: Minor patches, mostly related to constexpr + +N: Richard Smith +D: Minor patches. + +N: Andrew Morrow +E: andrew.c.morrow@gmail.com +D: Minor patches and Linux fixes. + +N: Hyeon-bin Jeong +E: tuhertz@gmail.com +D: Minor patches and bug fixes. + +N: Michel Morin +E: mimomorin@gmail.com +D: Minor patches to is_convertible. + +N: Dimitry Andric +E: dimitry@andric.com +D: Visibility fixes, minor FreeBSD portability patches. + +N: Holger Arnold +E: holgerar@gmail.com +D: Minor fix. + +N: Argyrios Kyrtzidis +E: kyrtzidis@apple.com +D: Bug fixes. Added: vendor/libc++/dist/LICENSE.TXT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/LICENSE.TXT Mon Oct 22 18:04:00 2012 (r241900) @@ -0,0 +1,76 @@ +============================================================================== +libc++ License +============================================================================== + +The libc++ library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. Modified: vendor/libc++/dist/include/__bit_reference ============================================================================== --- vendor/libc++/dist/include/__bit_reference Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__bit_reference Mon Oct 22 18:04:00 2012 (r241900) @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template class __bit_iterator; +template class __bit_iterator; template class __bit_const_reference; template @@ -131,13 +131,14 @@ public: __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT : __seg_(__x.__seg_), __mask_(__x.__mask_) {} - _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT {return __bit_iterator<_Cp, true>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT : __seg_(__s), __mask_(__m) {} @@ -146,11 +147,11 @@ private: // find -template -__bit_iterator<_Cp, false> -__find_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +__bit_iterator<_Cp, _IsConst> +__find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -180,11 +181,11 @@ __find_bool_true(__bit_iterator<_Cp, fal return _It(__first.__seg_, static_cast(__n)); } -template -__bit_iterator<_Cp, false> -__find_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +__bit_iterator<_Cp, _IsConst> +__find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -193,7 +194,7 @@ __find_bool_false(__bit_iterator<_Cp, fa __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); __storage_type __dn = _VSTD::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - __storage_type __b = ~(*__first.__seg_ & __m); + __storage_type __b = ~*__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); __n -= __dn; @@ -210,17 +211,17 @@ __find_bool_false(__bit_iterator<_Cp, fa if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - __storage_type __b = ~(*__first.__seg_ & __m); + __storage_type __b = ~*__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); } return _It(__first.__seg_, static_cast(__n)); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_Cp, false> -find(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) +__bit_iterator<_Cp, _IsConst> +find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) { if (static_cast(__value_)) return __find_bool_true(__first, static_cast(__last - __first)); @@ -229,11 +230,11 @@ find(__bit_iterator<_Cp, false> __first, // count -template -typename __bit_iterator<_Cp, false>::difference_type -__count_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +typename __bit_iterator<_Cp, _IsConst>::difference_type +__count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -260,11 +261,11 @@ __count_bool_true(__bit_iterator<_Cp, fa return __r; } -template -typename __bit_iterator<_Cp, false>::difference_type -__count_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +typename __bit_iterator<_Cp, _IsConst>::difference_type +__count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -275,7 +276,7 @@ __count_bool_false(__bit_iterator<_Cp, f __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); __storage_type __dn = _VSTD::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - __r = _VSTD::__pop_count(~(*__first.__seg_ & __m)); + __r = _VSTD::__pop_count(~*__first.__seg_ & __m); __n -= __dn; ++__first.__seg_; } @@ -286,15 +287,15 @@ __count_bool_false(__bit_iterator<_Cp, f if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - __r += _VSTD::__pop_count(~(*__first.__seg_ & __m)); + __r += _VSTD::__pop_count(~*__first.__seg_ & __m); } return __r; } -template +template inline _LIBCPP_INLINE_VISIBILITY -typename __bit_iterator<_Cp, false>::difference_type -count(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) +typename __bit_iterator<_Cp, _IsConst>::difference_type +count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) { if (static_cast(__value_)) return __count_bool_true(__first, static_cast(__last - __first)); @@ -926,12 +927,12 @@ rotate(__bit_iterator<_Cp, false> __firs // equal -template +template bool -__equal_unaligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, - __bit_iterator<_Cp, true> __first2) +__equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, + __bit_iterator<_Cp, _IC2> __first2) { - typedef __bit_iterator<_Cp, true> _It; + typedef __bit_iterator<_Cp, _IC1> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -950,11 +951,15 @@ __equal_unaligned(__bit_iterator<_Cp, tr __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r); __m = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn)); if (__first2.__ctz_ > __first1.__ctz_) + { if ((*__first2.__seg_ & __m) != (__b << (__first2.__ctz_ - __first1.__ctz_))) return false; + } else + { if ((*__first2.__seg_ & __m) != (__b >> (__first1.__ctz_ - __first2.__ctz_))) return false; + } __first2.__seg_ += (__ddn + __first2.__ctz_) / __bits_per_word; __first2.__ctz_ = static_cast((__ddn + __first2.__ctz_) % __bits_per_word); __dn -= __ddn; @@ -1004,12 +1009,12 @@ __equal_unaligned(__bit_iterator<_Cp, tr return true; } -template +template bool -__equal_aligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, - __bit_iterator<_Cp, true> __first2) +__equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, + __bit_iterator<_Cp, _IC2> __first2) { - typedef __bit_iterator<_Cp, true> _It; + typedef __bit_iterator<_Cp, _IC1> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1057,7 +1062,8 @@ equal(__bit_iterator<_Cp, _IC1> __first1 return __equal_unaligned(__first1, __last1, __first2); } -template +template class __bit_iterator { public: @@ -1228,19 +1234,23 @@ private: template friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>); - template friend bool __equal_aligned(__bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>); - template friend bool __equal_unaligned(__bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>); + template friend bool __equal_aligned(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); + template friend bool __equal_unaligned(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); template friend bool equal(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>); - template friend __bit_iterator<_Dp, false> __find_bool_true(__bit_iterator<_Dp, false>, + template friend __bit_iterator<_Dp, _IC> __find_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); - template friend __bit_iterator<_Dp, false> __find_bool_false(__bit_iterator<_Dp, false>, + template friend __bit_iterator<_Dp, _IC> __find_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); + template friend typename __bit_iterator<_Dp, _IC>::difference_type + __count_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); + template friend typename __bit_iterator<_Dp, _IC>::difference_type + __count_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); }; _LIBCPP_END_NAMESPACE_STD Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__config Mon Oct 22 18:04:00 2012 (r241900) @@ -15,7 +15,11 @@ #pragma GCC system_header #endif -#define _LIBCPP_VERSION 1001 +#ifdef __GNUC__ +#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) +#endif + +#define _LIBCPP_VERSION 1101 #define _LIBCPP_ABI_VERSION 1 @@ -53,7 +57,8 @@ # define _LIBCPP_LITTLE_ENDIAN 1 # define _LIBCPP_BIG_ENDIAN 0 // Compiler intrinsics (GCC or MSVC) -# if (defined(_MSC_VER) && _MSC_VER >= 1400) || (__GNUC__ >= 4 && __GNUC_MINOR__ > 3) +# if (defined(_MSC_VER) && _MSC_VER >= 1400) \ + || (defined(__GNUC__) && _GNUC_VER > 403) # define _LIBCP_HAS_IS_BASE_OF # endif #endif // _WIN32 @@ -145,8 +150,10 @@ #if defined(__clang__) #if __has_feature(cxx_alignas) +# define _ALIGNAS_TYPE(x) alignas(x) # define _ALIGNAS(x) alignas(x) #else +# define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) # define _ALIGNAS(x) __attribute__((__aligned__(x))) #endif @@ -180,9 +187,9 @@ typedef __char32_t char32_t; #endif #if __has_feature(cxx_attributes) -# define _ATTRIBUTE(x) [[x]] +# define _LIBCPP_NORETURN [[noreturn]] #else -# define _ATTRIBUTE(x) __attribute__ ((x)) +# define _LIBCPP_NORETURN __attribute__ ((noreturn)) #endif #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS @@ -245,8 +252,9 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif -#if __FreeBSD__ +#if __FreeBSD__ && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L) #define _LIBCPP_HAS_QUICK_EXIT +#define _LIBCPP_HAS_C11_FEATURES #endif #if (__has_feature(cxx_noexcept)) @@ -274,8 +282,9 @@ namespace std { #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) +#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) -#define _ATTRIBUTE(x) __attribute__((x)) +#define _LIBCPP_NORETURN __attribute__((noreturn)) #if !__EXCEPTIONS #define _LIBCPP_NO_EXCEPTIONS @@ -305,15 +314,15 @@ namespace std { #define _LIBCPP_HAS_NO_TRAILING_RETURN #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) +#if _GNUC_VER < 403 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) +#if _GNUC_VER < 403 #define _LIBCPP_HAS_NO_STATIC_ASSERT #endif -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) +#if _GNUC_VER < 404 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_DECLTYPE #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS @@ -321,9 +330,9 @@ namespace std { #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS -#endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) +#endif // _GNUC_VER < 404 -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) +#if _GNUC_VER < 406 #define _LIBCPP_HAS_NO_NULLPTR #endif @@ -347,7 +356,7 @@ using namespace _LIBCPP_NAMESPACE __attr #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define __alignof__ __alignof -#define _ATTRIBUTE __declspec +#define _LIBCPP_NORETURN __declspec(noreturn) #define _ALIGNAS(x) __declspec(align(x)) #define _LIBCPP_HAS_NO_VARIADICS @@ -389,6 +398,12 @@ template struct __static_asse #define _LIBCPP_CONSTEXPR constexpr #endif +#ifdef __GNUC__ +#define _NOALIAS __attribute__((malloc)) +#else +#define _NOALIAS +#endif + #ifndef __has_feature #define __has_feature(__x) 0 #endif @@ -404,6 +419,7 @@ template struct __static_asse #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ _ __v_; \ _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \ + _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<_>(__v)) {} \ _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ }; #else // _LIBCPP_HAS_NO_STRONG_ENUMS Modified: vendor/libc++/dist/include/__hash_table ============================================================================== --- vendor/libc++/dist/include/__hash_table Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__hash_table Mon Oct 22 18:04:00 2012 (r241900) @@ -58,10 +58,31 @@ struct __hash_node value_type __value_; }; +inline _LIBCPP_INLINE_VISIBILITY +bool +__is_power2(size_t __bc) +{ + return __bc > 2 && !(__bc & (__bc - 1)); +} + +inline _LIBCPP_INLINE_VISIBILITY +size_t +__constrain_hash(size_t __h, size_t __bc) +{ + return !(__bc & (__bc - 1)) ? __h & (__bc - 1) : __h % __bc; +} + +inline _LIBCPP_INLINE_VISIBILITY +size_t +__next_pow2(size_t __n) +{ + return size_t(1) << (std::numeric_limits::digits - __clz(__n-1)); +} + template class __hash_table; -template class __hash_const_iterator; -template class __hash_map_iterator; -template class __hash_map_const_iterator; +template class _LIBCPP_VISIBLE __hash_const_iterator; +template class _LIBCPP_VISIBLE __hash_map_iterator; +template class _LIBCPP_VISIBLE __hash_map_const_iterator; template class _LIBCPP_VISIBLE unordered_map; @@ -240,7 +261,7 @@ public: __hash_local_iterator& operator++() { __node_ = __node_->__next_; - if (__node_ != nullptr && __node_->__hash_ % __bucket_count_ != __bucket_) + if (__node_ != nullptr && __constrain_hash(__node_->__hash_, __bucket_count_) != __bucket_) __node_ = nullptr; return *this; } @@ -330,7 +351,7 @@ public: __hash_const_local_iterator& operator++() { __node_ = __node_->__next_; - if (__node_ != nullptr && __node_->__hash_ % __bucket_count_ != __bucket_) + if (__node_ != nullptr && __constrain_hash(__node_->__hash_, __bucket_count_) != __bucket_) __node_ = nullptr; return *this; } @@ -637,7 +658,7 @@ public: template _LIBCPP_INLINE_VISIBILITY size_type bucket(const _Key& __k) const - {return hash_function()(__k) % bucket_count();} + {return __constrain_hash(hash_function()(__k), bucket_count());} template iterator find(const _Key& __x); @@ -871,7 +892,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { if (size() > 0) { - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); __u.__p1_.first().__next_ = nullptr; __u.size() = 0; @@ -895,7 +916,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { __p1_.first().__next_ = __u.__p1_.first().__next_; __u.__p1_.first().__next_ = nullptr; - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); size() = __u.size(); __u.size() = 0; @@ -992,7 +1013,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __p1_.first().__next_ = __u.__p1_.first().__next_; if (size() > 0) { - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); __u.__p1_.first().__next_ = nullptr; __u.size() = 0; @@ -1190,12 +1211,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_t __chash; if (__bc != 0) { - __chash = __nd->__hash_ % __bc; + __chash = __constrain_hash(__nd->__hash_, __bc); __ndptr = __bucket_list_[__chash]; if (__ndptr != nullptr) { for (__ndptr = __ndptr->__next_; __ndptr != nullptr && - __ndptr->__hash_ % __bc == __chash; + __constrain_hash(__ndptr->__hash_, __bc) == __chash; __ndptr = __ndptr->__next_) { if (key_eq()(__ndptr->__value_, __nd->__value_)) @@ -1206,10 +1227,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); - __chash = __nd->__hash_ % __bc; + __chash = __constrain_hash(__nd->__hash_, __bc); } // insert_after __bucket_list_[__chash], or __first_node if bucket is null __node_pointer __pn = __bucket_list_[__chash]; @@ -1221,7 +1242,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__nd->__next_ != nullptr) - __bucket_list_[__nd->__next_->__hash_ % __bc] = __nd; + __bucket_list_[__constrain_hash(__nd->__next_->__hash_, __bc)] = __nd; } else { @@ -1245,11 +1266,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); } - size_t __chash = __cp->__hash_ % __bc; + size_t __chash = __constrain_hash(__cp->__hash_, __bc); __node_pointer __pn = __bucket_list_[__chash]; if (__pn == nullptr) { @@ -1259,12 +1280,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__cp->__next_ != nullptr) - __bucket_list_[__cp->__next_->__hash_ % __bc] = __cp; + __bucket_list_[__constrain_hash(__cp->__next_->__hash_, __bc)] = __cp; } else { for (bool __found = false; __pn->__next_ != nullptr && - __pn->__next_->__hash_ % __bc == __chash; + __constrain_hash(__pn->__next_->__hash_, __bc) == __chash; __pn = __pn->__next_) { // __found key_eq() action @@ -1285,7 +1306,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __pn->__next_ = __cp; if (__cp->__next_ != nullptr) { - size_t __nhash = __cp->__next_->__hash_ % __bc; + size_t __nhash = __constrain_hash(__cp->__next_->__hash_, __bc); if (__nhash != __chash) __bucket_list_[__nhash] = __cp; } @@ -1306,11 +1327,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); } - size_t __chash = __cp->__hash_ % __bc; + size_t __chash = __constrain_hash(__cp->__hash_, __bc); __node_pointer __pp = __bucket_list_[__chash]; while (__pp->__next_ != __np) __pp = __pp->__next_; @@ -1333,12 +1354,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_t __chash; if (__bc != 0) { - __chash = __hash % __bc; + __chash = __constrain_hash(__hash, __bc); __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __x)) @@ -1350,10 +1371,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __node_holder __h = __construct_node(__x, __hash); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); - __chash = __hash % __bc; + __chash = __constrain_hash(__hash, __bc); } // insert_after __bucket_list_[__chash], or __first_node if bucket is null __node_pointer __pn = __bucket_list_[__chash]; @@ -1365,7 +1386,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__h->__next_ != nullptr) - __bucket_list_[__h->__next_->__hash_ % __bc] = __h.get(); + __bucket_list_[__constrain_hash(__h->__next_->__hash_, __bc)] = __h.get(); } else { @@ -1489,16 +1510,20 @@ template ::rehash(size_type __n) { - __n = __next_prime(_VSTD::max(__n, size() > 0)); + if (__n == 1) + __n = 2; + else if (__n & (__n - 1)) + __n = __next_prime(__n); size_type __bc = bucket_count(); if (__n > __bc) __rehash(__n); - else + else if (__n < __bc) { __n = _VSTD::max ( __n, - __next_prime(size_t(ceil(float(size()) / max_load_factor()))) + __is_power2(__bc) ? __next_pow2(size_t(ceil(float(size()) / max_load_factor()))) : + __next_prime(size_t(ceil(float(size()) / max_load_factor()))) ); if (__n < __bc) __rehash(__n); @@ -1521,13 +1546,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __node_pointer __cp = __pp->__next_; if (__cp != nullptr) { - size_type __chash = __cp->__hash_ % __nbc; + size_type __chash = __constrain_hash(__cp->__hash_, __nbc); __bucket_list_[__chash] = __pp; size_type __phash = __chash; for (__pp = __cp, __cp = __cp->__next_; __cp != nullptr; __cp = __pp->__next_) { - __chash = __cp->__hash_ % __nbc; + __chash = __constrain_hash(__cp->__hash_, __nbc); if (__chash == __phash) __pp = __cp; else @@ -1565,12 +1590,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (__bc != 0) { - size_t __chash = __hash % __bc; + size_t __chash = __constrain_hash(__hash, __bc); __node_pointer __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __k)) @@ -1590,12 +1615,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (__bc != 0) { - size_t __chash = __hash % __bc; + size_t __chash = __constrain_hash(__hash, __bc); __node_const_pointer __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __k)) @@ -1734,7 +1759,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // current node __node_pointer __cn = const_cast<__node_pointer>(__p.__node_); size_type __bc = bucket_count(); - size_t __chash = __cn->__hash_ % __bc; + size_t __chash = __constrain_hash(__cn->__hash_, __bc); // find previous node __node_pointer __pn = __bucket_list_[__chash]; for (; __pn->__next_ != __cn; __pn = __pn->__next_) @@ -1742,15 +1767,15 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // Fix up __bucket_list_ // if __pn is not in same bucket (before begin is not in same bucket) && // if __cn->__next_ is not in same bucket (nullptr is not in same bucket) - if (__pn == _VSTD::addressof(__p1_.first()) || __pn->__hash_ % __bc != __chash) + if (__pn == _VSTD::addressof(__p1_.first()) || __constrain_hash(__pn->__hash_, __bc) != __chash) { - if (__cn->__next_ == nullptr || __cn->__next_->__hash_ % __bc != __chash) + if (__cn->__next_ == nullptr || __constrain_hash(__cn->__next_->__hash_, __bc) != __chash) __bucket_list_[__chash] = nullptr; } // if __cn->__next_ is not in same bucket (nullptr is in same bucket) if (__cn->__next_ != nullptr) { - size_t __nhash = __cn->__next_->__hash_ % __bc; + size_t __nhash = __constrain_hash(__cn->__next_->__hash_, __bc); if (__nhash != __chash) __bucket_list_[__nhash] = __pn; } @@ -1881,10 +1906,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __p2_.swap(__u.__p2_); __p3_.swap(__u.__p3_); if (size() > 0) - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); if (__u.size() > 0) - __u.__bucket_list_[__u.__p1_.first().__next_->__hash_ % __u.bucket_count()] = + __u.__bucket_list_[__constrain_hash(__u.__p1_.first().__next_->__hash_, __u.bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__u.__p1_.first())); } @@ -1898,7 +1923,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> if (__np != nullptr) { for (__np = __np->__next_; __np != nullptr && - __np->__hash_ % __bc == __n; + __constrain_hash(__np->__hash_, __bc) == __n; __np = __np->__next_, ++__r) ; } Modified: vendor/libc++/dist/include/__locale ============================================================================== --- vendor/libc++/dist/include/__locale Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__locale Mon Oct 22 18:04:00 2012 (r241900) @@ -31,17 +31,24 @@ _LIBCPP_BEGIN_NAMESPACE_STD -class locale; +class _LIBCPP_VISIBLE locale; -template bool has_facet(const locale&) _NOEXCEPT; -template const _Facet& use_facet(const locale&); +template +_LIBCPP_INLINE_VISIBILITY +bool +has_facet(const locale&) _NOEXCEPT; + +template +_LIBCPP_INLINE_VISIBILITY +const _Facet& +use_facet(const locale&); class _LIBCPP_VISIBLE locale { public: // types: - class facet; - class id; + class _LIBCPP_VISIBLE facet; + class _LIBCPP_VISIBLE id; typedef int category; static const category // values assigned here are for exposition only @@ -119,7 +126,7 @@ class _LIBCPP_VISIBLE locale::id static int32_t __next_id; public: - _LIBCPP_INLINE_VISIBILITY id() {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR id() :__id_(0) {} private: void __init(); void operator=(const id&); // = delete; Modified: vendor/libc++/dist/include/__mutex_base ============================================================================== --- vendor/libc++/dist/include/__mutex_base Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__mutex_base Mon Oct 22 18:04:00 2012 (r241900) @@ -38,7 +38,11 @@ class _LIBCPP_VISIBLE mutex public: _LIBCPP_INLINE_VISIBILITY - mutex() {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} +#ifndef _LIBCPP_HAS_NO_CONSTEXPR + constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} +#else + mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} +#endif ~mutex(); private: @@ -47,8 +51,8 @@ private: public: void lock(); - bool try_lock(); - void unlock(); + bool try_lock() _NOEXCEPT; + void unlock() _NOEXCEPT; typedef pthread_mutex_t* native_handle_type; _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;} @@ -58,17 +62,19 @@ struct _LIBCPP_VISIBLE defer_lock_t {}; struct _LIBCPP_VISIBLE try_to_lock_t {}; struct _LIBCPP_VISIBLE adopt_lock_t {}; -//constexpr -extern const -defer_lock_t defer_lock; - -//constexpr -extern const -try_to_lock_t try_to_lock; - -//constexpr -extern const -adopt_lock_t adopt_lock; +#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_MUTEX) + +extern const defer_lock_t defer_lock; +extern const try_to_lock_t try_to_lock; +extern const adopt_lock_t adopt_lock; + +#else + +constexpr defer_lock_t defer_lock = defer_lock_t(); +constexpr try_to_lock_t try_to_lock = try_to_lock_t(); +constexpr adopt_lock_t adopt_lock = adopt_lock_t(); + +#endif template class _LIBCPP_VISIBLE lock_guard @@ -106,12 +112,12 @@ private: public: _LIBCPP_INLINE_VISIBILITY - unique_lock() : __m_(nullptr), __owns_(false) {} + unique_lock() _NOEXCEPT : __m_(nullptr), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY explicit unique_lock(mutex_type& __m) : __m_(&__m), __owns_(true) {__m_->lock();} _LIBCPP_INLINE_VISIBILITY - unique_lock(mutex_type& __m, defer_lock_t) + unique_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT : __m_(&__m), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, try_to_lock_t) @@ -141,11 +147,11 @@ private: public: #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY - unique_lock(unique_lock&& __u) + unique_lock(unique_lock&& __u) _NOEXCEPT : __m_(__u.__m_), __owns_(__u.__owns_) {__u.__m_ = nullptr; __u.__owns_ = false;} _LIBCPP_INLINE_VISIBILITY - unique_lock& operator=(unique_lock&& __u) + unique_lock& operator=(unique_lock&& __u) _NOEXCEPT { if (__owns_) __m_->unlock(); @@ -190,13 +196,13 @@ public: void unlock(); _LIBCPP_INLINE_VISIBILITY *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 22 18:05:02 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 9B2C9CCF; Mon, 22 Oct 2012 18:05:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 695DE8FC0A; Mon, 22 Oct 2012 18:05:02 +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 q9MI529i065924; Mon, 22 Oct 2012 18:05:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MI52MP065923; Mon, 22 Oct 2012 18:05:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210221805.q9MI52MP065923@svn.freebsd.org> From: Dimitry Andric Date: Mon, 22 Oct 2012 18:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241901 - vendor/libc++/r165949 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Oct 2012 18:05:02 -0000 Author: dim Date: Mon Oct 22 18:05:01 2012 New Revision: 241901 URL: http://svn.freebsd.org/changeset/base/241901 Log: Tag libc++ trunk r165949. Added: vendor/libc++/r165949/ - copied from r241900, vendor/libc++/dist/ From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 22 18:47:59 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 D5634311; Mon, 22 Oct 2012 18:47:59 +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 B2F3B8FC12; Mon, 22 Oct 2012 18:47:59 +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 q9MIlxM0077105; Mon, 22 Oct 2012 18:47:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MIlxJD077101; Mon, 22 Oct 2012 18:47:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210221847.q9MIlxJD077101@svn.freebsd.org> From: Xin LI Date: Mon, 22 Oct 2012 18:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241904 - vendor/netcat/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Oct 2012 18:47:59 -0000 Author: delphij Date: Mon Oct 22 18:47:59 2012 New Revision: 241904 URL: http://svn.freebsd.org/changeset/base/241904 Log: Vendor import from OpenBSD 5.1. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c vendor/netcat/dist/socks.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Mon Oct 22 18:25:04 2012 (r241903) +++ vendor/netcat/dist/nc.1 Mon Oct 22 18:47:59 2012 (r241904) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.60 2012/02/07 12:11:43 lum Exp $ +.\" $OpenBSD: nc.1,v 1.61 2012/07/07 15:33:02 haesbaert Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: October 4 2011 $ +.Dd $Mdocdate: February 7 2012 $ .Dt NC 1 .Os .Sh NAME @@ -119,6 +119,10 @@ is completed. It is an error to use this option without the .Fl l option. +When used together with the +.Fl u +option, the server socket is not connected and it can receive UDP datagrams from +multiple hosts. .It Fl l Used to specify that .Nm Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Mon Oct 22 18:25:04 2012 (r241903) +++ vendor/netcat/dist/netcat.c Mon Oct 22 18:47:59 2012 (r241904) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ +/* $OpenBSD: netcat.c,v 1.109 2012/07/07 15:33:02 haesbaert Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -67,7 +67,6 @@ /* Command Line Options */ int dflag; /* detached, no stdin */ unsigned int iflag; /* Interval Flag */ -int jflag; /* use jumbo frames if we can */ int kflag; /* More than one connect */ int lflag; /* Bind to local port */ int nflag; /* Don't do name look up */ @@ -107,6 +106,7 @@ int unix_connect(char *); int unix_listen(char *); void set_common_sockopts(int); int map_tos(char *, int *); +void report_connect(const struct sockaddr *, socklen_t); void usage(int); int @@ -131,7 +131,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt(argc, argv, - "46DdhI:i:jklnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) { + "46DdhI:i:klnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) { switch (ch) { case '4': family = AF_INET; @@ -163,9 +163,6 @@ main(int argc, char *argv[]) if (errstr) errx(1, "interval %s: %s", errstr, optarg); break; - case 'j': - jflag = 1; - break; case 'k': kflag = 1; break; @@ -348,17 +345,23 @@ main(int argc, char *argv[]) if (s < 0) err(1, NULL); /* - * For UDP, we will use recvfrom() initially - * to wait for a caller, then use the regular - * functions to talk to the caller. + * For UDP and -k, don't connect the socket, let it + * receive datagrams from multiple socket pairs. */ - if (uflag) { + if (uflag && kflag) + readwrite(s); + /* + * For UDP and not -k, we will use recvfrom() initially + * to wait for a caller, then use the regular functions + * to talk to the caller. + */ + else if (uflag && !kflag) { int rv, plen; char buf[16384]; struct sockaddr_storage z; len = sizeof(z); - plen = jflag ? 16384 : 2048; + plen = 2048; rv = recvfrom(s, buf, plen, MSG_PEEK, (struct sockaddr *)&z, &len); if (rv < 0) @@ -368,11 +371,20 @@ main(int argc, char *argv[]) if (rv < 0) err(1, "connect"); + if (vflag) + report_connect((struct sockaddr *)&z, len); + readwrite(s); } else { len = sizeof(cliaddr); connfd = accept(s, (struct sockaddr *)&cliaddr, &len); + if (connfd == -1) + err(1, "accept"); + + if (vflag) + report_connect((struct sockaddr *)&cliaddr, len); + readwrite(connfd); close(connfd); } @@ -717,7 +729,7 @@ readwrite(int nfd) int lfd = fileno(stdout); int plen; - plen = jflag ? 16384 : 2048; + plen = 2048; /* Setup Network FD */ pfd[0].fd = nfd; @@ -896,11 +908,6 @@ set_common_sockopts(int s) &x, sizeof(x)) == -1) err(1, NULL); } - if (jflag) { - if (setsockopt(s, SOL_SOCKET, SO_JUMBO, - &x, sizeof(x)) == -1) - err(1, NULL); - } if (Tflag != -1) { if (setsockopt(s, IPPROTO_IP, IP_TOS, &Tflag, sizeof(Tflag)) == -1) @@ -967,6 +974,32 @@ map_tos(char *s, int *val) } void +report_connect(const struct sockaddr *sa, socklen_t salen) +{ + char remote_host[NI_MAXHOST]; + char remote_port[NI_MAXSERV]; + int herr; + int flags = NI_NUMERICSERV; + + if (nflag) + flags |= NI_NUMERICHOST; + + if ((herr = getnameinfo(sa, salen, + remote_host, sizeof(remote_host), + remote_port, sizeof(remote_port), + flags)) != 0) { + if (herr == EAI_SYSTEM) + err(1, "getnameinfo"); + else + errx(1, "getnameinfo: %s", gai_strerror(herr)); + } + + fprintf(stderr, + "Connection from %s %s " + "received!\n", remote_host, remote_port); +} + +void help(void) { usage(0); Modified: vendor/netcat/dist/socks.c ============================================================================== --- vendor/netcat/dist/socks.c Mon Oct 22 18:25:04 2012 (r241903) +++ vendor/netcat/dist/socks.c Mon Oct 22 18:47:59 2012 (r241904) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.19 2011/02/12 15:54:18 okan Exp $ */ +/* $OpenBSD: socks.c,v 1.20 2012/03/08 09:56:28 espie Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -231,12 +231,12 @@ socks_connect(const char *host, const ch case SOCKS_IPV4: cnt = atomicio(read, proxyfd, buf + 4, 6); if (cnt != 6) - err(1, "read failed (%d/6)", cnt); + err(1, "read failed (%zu/6)", cnt); break; case SOCKS_IPV6: cnt = atomicio(read, proxyfd, buf + 4, 18); if (cnt != 18) - err(1, "read failed (%d/18)", cnt); + err(1, "read failed (%zu/18)", cnt); break; default: errx(1, "connection failed, unsupported address type"); From owner-svn-src-vendor@FreeBSD.ORG Mon Oct 22 18:49:04 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 B7A49788; Mon, 22 Oct 2012 18:49:04 +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 D96718FC18; Mon, 22 Oct 2012 18:49:03 +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 q9MIn33o077394; Mon, 22 Oct 2012 18:49:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MIn3QI077393; Mon, 22 Oct 2012 18:49:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210221849.q9MIn3QI077393@svn.freebsd.org> From: Xin LI Date: Mon, 22 Oct 2012 18:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241905 - vendor/netcat/5.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Oct 2012 18:49:04 -0000 Author: delphij Date: Mon Oct 22 18:49:03 2012 New Revision: 241905 URL: http://svn.freebsd.org/changeset/base/241905 Log: Tag netcat from OpenBSD 5.2. Added: vendor/netcat/5.2/ - copied from r241904, vendor/netcat/dist/ From owner-svn-src-vendor@FreeBSD.ORG Thu Oct 25 20:31:23 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 051D9346; Thu, 25 Oct 2012 20:31:23 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE48E8FC0A; Thu, 25 Oct 2012 20:31:22 +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 q9PKVM4V039423; Thu, 25 Oct 2012 20:31:22 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PKVMVD039417; Thu, 25 Oct 2012 20:31:22 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201210252031.q9PKVMVD039417@svn.freebsd.org> From: "Simon J. Gerraty" Date: Thu, 25 Oct 2012 20:31:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r242093 - vendor/NetBSD/bmake/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Oct 2012 20:31:23 -0000 Author: sjg Date: Thu Oct 25 20:31:22 2012 New Revision: 242093 URL: http://svn.freebsd.org/changeset/base/242093 Log: Import bmake-20121010 Relevant items from ChangeLog: o [Makefile.in:] protect syntax that only bmake parses correctly. o compat.c: ignore empty commands - same as jobs mode. o make.1: document meta chars that cause use of shell Approved by: marcelm (mentor) Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/Makefile.in vendor/NetBSD/bmake/dist/bmake.1 vendor/NetBSD/bmake/dist/bmake.cat1 vendor/NetBSD/bmake/dist/bsd.after-import.mk vendor/NetBSD/bmake/dist/compat.c vendor/NetBSD/bmake/dist/make.1 Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Thu Oct 25 20:23:04 2012 (r242092) +++ vendor/NetBSD/bmake/dist/ChangeLog Thu Oct 25 20:31:22 2012 (r242093) @@ -1,3 +1,27 @@ +2012-10-10 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121010 + o protect syntax that only bmake parses correctly. + o remove auto setting of FORCE_MACHINE, use configure's + --with-force-machine=whatever if that is desired. + +2012-10-08 Simon J. Gerraty + + * Makefile.in: do not lose history from make.1 when generating bmake.1 + +2012-10-07 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121007 + Merge with NetBSD make, pick up + o compat.c: ignore empty commands - same as jobs mode. + o make.1: document meta chars that cause use of shell + +2012-09-11 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): bump version to 20120911 + * bsd.after-import.mk: include Makefile.inc early and allow it to + override PROG + 2012-08-31 Simon J. Gerraty * Makefile.in (MAKE_VERSION): bump version to 20120831 Modified: vendor/NetBSD/bmake/dist/Makefile.in ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile.in Thu Oct 25 20:23:04 2012 (r242092) +++ vendor/NetBSD/bmake/dist/Makefile.in Thu Oct 25 20:31:22 2012 (r242093) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $ +# $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -21,7 +21,7 @@ srcdir= @srcdir@ CC?= @CC@ # Base version on src date -MAKE_VERSION= 20120831 +MAKE_VERSION= 20121010 MACHINE=@machine@ MACHINE_ARCH=@machine_arch@ DEFAULT_SYS_PATH = @default_sys_path@ @@ -71,10 +71,9 @@ SUBDIR= PSD.doc .endif .endif +.if defined(.PARSEDIR) +# we cannot rely on anything but bmake to parse this correctly. .if empty(isBSD44:M${OS}) -# XXX not sure if we still want this given that configure -# lets us force or not the definition of MACHINE. -CFLAGS_main.o+= "-DFORCE_MACHINE=\"${MACHINE}\"" MANTARGET=cat INSTALL?=${srcdir}/install-sh .if (${MACHINE} == "sun386") @@ -85,7 +84,7 @@ SRCS+= sigcompat.c CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART .endif .endif -.if defined(.PARSEDIR) + .if make(obj) || make(clean) SUBDIR+= unit-tests .endif @@ -104,14 +103,18 @@ EXTRACT_MAN=no MAN=${PROG}.1 .if (${PROG} != "make") -${MAN}: make.1 - @echo making ${PROG}.1 - @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' -e '/^.Sh HISTORY/,$$d' ${srcdir}/make.1 > $@ - @(echo ".Sh HISTORY"; \ - echo ".Nm"; \ +my.history: ${MAKEFILE} + @(echo ".Nm"; \ echo "is derived from NetBSD"; \ echo ".Xr make 1 ."; \ - echo It uses autoconf to facilitate portability to other platforms.) >> $@ + echo "It uses autoconf to facilitate portability to other platforms."; \ + echo ".Pp") > $@ + +${MAN}: make.1 my.history + @echo making ${PROG}.1 + @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' \ + -e '/^.Sh HISTORY/rmy.history' \ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${.CURDIR}/make.1 > $@ .endif Modified: vendor/NetBSD/bmake/dist/bmake.1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.1 Thu Oct 25 20:23:04 2012 (r242092) +++ vendor/NetBSD/bmake/dist/bmake.1 Thu Oct 25 20:31:22 2012 (r242093) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.206 2012/08/30 22:35:37 wiz Exp $ +.\" $NetBSD: make.1,v 1.209 2012/10/08 15:09:48 christos Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd August 30, 2012 +.Dd October 8, 2012 .Dt MAKE 1 .Os .Sh NAME @@ -2042,6 +2042,13 @@ or To be compatible with Makefiles that do this, one can use .Fl B to disable this behavior. +.Pp +In compatibility mode, each command is run in a separate process. +If the command contains any shell meta characters +.Pq Ql #=|^(){};&<>*?[]:$`\e\en +it will be passed to the shell, otherwise +.Nm +will attempt direct execution. .Sh SEE ALSO .Xr mkdep 1 .Sh HISTORY @@ -2049,3 +2056,26 @@ to disable this behavior. is derived from NetBSD .Xr make 1 . It uses autoconf to facilitate portability to other platforms. +.Pp +A +make +command appeared in +.At v7 . +This +make +implementation is based on Adam De Boor's pmake program which was written +for Sprite at Berkeley. +It was designed to be a parallel distributed make running jobs on different +machines using a daemon called +.Dq customs . +.Sh BUGS +The +make +syntax is difficult to parse without actually acting of the data. +For instance finding the end of a variable use should involve scanning each +the modifiers using the correct terminator for each field. +In many places +make +just counts {} and () in order to find the end of a variable expansion. +.Pp +There is no way of escaping a space character in a filename. Modified: vendor/NetBSD/bmake/dist/bmake.cat1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.cat1 Thu Oct 25 20:23:04 2012 (r242092) +++ vendor/NetBSD/bmake/dist/bmake.cat1 Thu Oct 25 20:31:22 2012 (r242093) @@ -1301,1321 +1301,30 @@ CCOOMMPPAATTIIBBIILLIITTYY ``chdir''. To be compatible with Makefiles that do this, one can use --BB to disable this behavior. + In compatibility mode, each command is run in a separate process. If the + command contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it + will be passed to the shell, otherwise bbmmaakkee will attempt direct execu- + tion. + SSEEEE AALLSSOO mkdep(1) HHIISSTTOORRYY bbmmaakkee is derived from NetBSD make(1). It uses autoconf to facilitate -MAKE(1) NetBSD General Commands Manual MAKE(1) - portability to other platforms. -NNAAMMEE - bbmmaakkee -- maintain program dependencies - -SSYYNNOOPPSSIISS - bbmmaakkee [--BBeeiikkNNnnqqrrssttWWXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] - [--ff _m_a_k_e_f_i_l_e] [--II _d_i_r_e_c_t_o_r_y] [--JJ _p_r_i_v_a_t_e] [--jj _m_a_x___j_o_b_s] - [--mm _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--VV _v_a_r_i_a_b_l_e] [_v_a_r_i_a_b_l_e_=_v_a_l_u_e] - [_t_a_r_g_e_t _._._.] - -DDEESSCCRRIIPPTTIIOONN - bbmmaakkee is a program designed to simplify the maintenance of other pro- - grams. Its input is a list of specifications as to the files upon which - programs and other files depend. If no --ff _m_a_k_e_f_i_l_e makefile option is - given, bbmmaakkee will try to open `_m_a_k_e_f_i_l_e' then `_M_a_k_e_f_i_l_e' in order to find - the specifications. If the file `_._d_e_p_e_n_d' exists, it is read (see - mkdep(1)). - - This manual page is intended as a reference document only. For a more - thorough description of bbmmaakkee and makefiles, please refer to _P_M_a_k_e _- _A - _T_u_t_o_r_i_a_l. - - bbmmaakkee will prepend the contents of the _M_A_K_E_F_L_A_G_S environment variable to - the command line arguments before parsing them. - - The options are as follows: - - --BB Try to be backwards compatible by executing a single shell per - command and by executing the commands to make the sources of a - dependency line in sequence. - - --CC _d_i_r_e_c_t_o_r_y - Change to _d_i_r_e_c_t_o_r_y before reading the makefiles or doing any- - thing else. If multiple --CC options are specified, each is inter- - preted relative to the previous one: --CC _/ --CC _e_t_c is equivalent to - --CC _/_e_t_c. - - --DD _v_a_r_i_a_b_l_e - Define _v_a_r_i_a_b_l_e to be 1, in the global context. - - --dd _[_-_]_f_l_a_g_s - Turn on debugging, and specify which portions of bbmmaakkee are to - print debugging information. Unless the flags are preceded by - `-' they are added to the _M_A_K_E_F_L_A_G_S environment variable and will - be processed by any child make processes. By default, debugging - information is printed to standard error, but this can be changed - using the _F debugging flag. The debugging output is always - unbuffered; in addition, if debugging is enabled but debugging - output is not directed to standard output, then the standard out- - put is line buffered. _F_l_a_g_s is one or more of the following: - - _A Print all possible debugging information; equivalent to - specifying all of the debugging flags. - - _a Print debugging information about archive searching and - caching. - - _C Print debugging information about current working direc- - tory. - - _c Print debugging information about conditional evaluation. - - _d Print debugging information about directory searching and - caching. - - _e Print debugging information about failed commands and - targets. - - _F[++]_f_i_l_e_n_a_m_e - Specify where debugging output is written. This must be - the last flag, because it consumes the remainder of the - argument. If the character immediately after the `F' - flag is `+', then the file will be opened in append mode; - otherwise the file will be overwritten. If the file name - is `stdout' or `stderr' then debugging output will be - written to the standard output or standard error output - file descriptors respectively (and the `+' option has no - effect). Otherwise, the output will be written to the - named file. If the file name ends `.%d' then the `%d' is - replaced by the pid. - - _f Print debugging information about loop evaluation. - - _g_1 Print the input graph before making anything. - - _g_2 Print the input graph after making everything, or before - exiting on error. - - _g_3 Print the input graph before exiting on error. - - _j Print debugging information about running multiple - shells. - - _l Print commands in Makefiles regardless of whether or not - they are prefixed by `@' or other "quiet" flags. Also - known as "loud" behavior. - - _M Print debugging information about "meta" mode decisions - about targets. - - _m Print debugging information about making targets, includ- - ing modification dates. - - _n Don't delete the temporary command scripts created when - running commands. These temporary scripts are created in - the directory referred to by the TMPDIR environment vari- - able, or in _/_t_m_p if TMPDIR is unset or set to the empty - string. The temporary scripts are created by mkstemp(3), - and have names of the form _m_a_k_e_X_X_X_X_X_X. _N_O_T_E: This can - create many files in TMPDIR or _/_t_m_p, so use with care. - - _p Print debugging information about makefile parsing. - - _s Print debugging information about suffix-transformation - rules. - - _t Print debugging information about target list mainte- - nance. - - _V Force the --VV option to print raw value of variables. - - _v Print debugging information about variable assignment. - - _x Run shell commands with --xx so the actual commands are - printed as they are executed. - - --ee Specify that environment variables override macro assignments - within makefiles. - - --ff _m_a_k_e_f_i_l_e - Specify a makefile to read instead of the default `_m_a_k_e_f_i_l_e'. If - _m_a_k_e_f_i_l_e is `--', standard input is read. Multiple makefiles may - be specified, and are read in the order specified. - - --II _d_i_r_e_c_t_o_r_y - Specify a directory in which to search for makefiles and included - makefiles. The system makefile directory (or directories, see - the --mm option) is automatically included as part of this list. - - --ii Ignore non-zero exit of shell commands in the makefile. Equiva- - lent to specifying `--' before each command line in the makefile. - - --JJ _p_r_i_v_a_t_e - This option should _n_o_t be specified by the user. - - When the _j option is in use in a recursive build, this option is - passed by a make to child makes to allow all the make processes - in the build to cooperate to avoid overloading the system. - - --jj _m_a_x___j_o_b_s - Specify the maximum number of jobs that bbmmaakkee may have running at - any one time. The value is saved in _._M_A_K_E_._J_O_B_S. Turns compati- - bility mode off, unless the _B flag is also specified. When com- - patibility mode is off, all commands associated with a target are - executed in a single shell invocation as opposed to the tradi- - tional one shell invocation per line. This can break traditional - scripts which change directories on each command invocation and - then expect to start with a fresh environment on the next line. - It is more efficient to correct the scripts rather than turn - backwards compatibility on. - - --kk Continue processing after errors are encountered, but only on - those targets that do not depend on the target whose creation - caused the error. - - --mm _d_i_r_e_c_t_o_r_y - Specify a directory in which to search for sys.mk and makefiles - included via the <_f_i_l_e>-style include statement. The --mm option - can be used multiple times to form a search path. This path will - override the default system include path: /usr/share/mk. Fur- - thermore the system include path will be appended to the search - path used for "_f_i_l_e"-style include statements (see the --II - option). - - If a file or directory name in the --mm argument (or the - MAKESYSPATH environment variable) starts with the string ".../" - then bbmmaakkee will search for the specified file or directory named - in the remaining part of the argument string. The search starts - with the current directory of the Makefile and then works upward - towards the root of the filesystem. If the search is successful, - then the resulting directory replaces the ".../" specification in - the --mm argument. If used, this feature allows bbmmaakkee to easily - search in the current source tree for customized sys.mk files - (e.g., by using ".../mk/sys.mk" as an argument). - - --nn Display the commands that would have been executed, but do not - actually execute them unless the target depends on the .MAKE spe- - cial source (see below). - - --NN Display the commands which would have been executed, but do not - actually execute any of them; useful for debugging top-level - makefiles without descending into subdirectories. - - --qq Do not execute any commands, but exit 0 if the specified targets - are up-to-date and 1, otherwise. - - --rr Do not use the built-in rules specified in the system makefile. - - --ss Do not echo any commands as they are executed. Equivalent to - specifying `@@' before each command line in the makefile. - - --TT _t_r_a_c_e_f_i_l_e - When used with the --jj flag, append a trace record to _t_r_a_c_e_f_i_l_e - for each job started and completed. - - --tt Rather than re-building a target as specified in the makefile, - create it or update its modification time to make it appear up- - to-date. - - --VV _v_a_r_i_a_b_l_e - Print bbmmaakkee's idea of the value of _v_a_r_i_a_b_l_e, in the global con- - text. Do not build any targets. Multiple instances of this - option may be specified; the variables will be printed one per - line, with a blank line for each null or undefined variable. If - _v_a_r_i_a_b_l_e contains a `$' then the value will be expanded before - printing. - - --WW Treat any warnings during makefile parsing as errors. - - --XX Don't export variables passed on the command line to the environ- - ment individually. Variables passed on the command line are - still exported via the _M_A_K_E_F_L_A_G_S environment variable. This - option may be useful on systems which have a small limit on the - size of command arguments. - - _v_a_r_i_a_b_l_e_=_v_a_l_u_e - Set the value of the variable _v_a_r_i_a_b_l_e to _v_a_l_u_e. Normally, all - values passed on the command line are also exported to sub-makes - in the environment. The --XX flag disables this behavior. Vari- - able assignments should follow options for POSIX compatibility - but no ordering is enforced. - - There are seven different types of lines in a makefile: file dependency - specifications, shell commands, variable assignments, include statements, - conditional directives, for loops, and comments. - - In general, lines may be continued from one line to the next by ending - them with a backslash (`\'). The trailing newline character and initial - whitespace on the following line are compressed into a single space. - -FFIILLEE DDEEPPEENNDDEENNCCYY SSPPEECCIIFFIICCAATTIIOONNSS - Dependency lines consist of one or more targets, an operator, and zero or - more sources. This creates a relationship where the targets ``depend'' - on the sources and are usually created from them. The exact relationship - between the target and the source is determined by the operator that sep- - arates them. The three operators are as follows: - - :: A target is considered out-of-date if its modification time is less - than those of any of its sources. Sources for a target accumulate - over dependency lines when this operator is used. The target is - removed if bbmmaakkee is interrupted. - - !! Targets are always re-created, but not until all sources have been - examined and re-created as necessary. Sources for a target accumu- - late over dependency lines when this operator is used. The target - is removed if bbmmaakkee is interrupted. - - :::: If no sources are specified, the target is always re-created. Oth- - erwise, a target is considered out-of-date if any of its sources - has been modified more recently than the target. Sources for a - target do not accumulate over dependency lines when this operator - is used. The target will not be removed if bbmmaakkee is interrupted. - - Targets and sources may contain the shell wildcard values `?', `*', `[]', - and `{}'. The values `?', `*', and `[]' may only be used as part of the - final component of the target or source, and must be used to describe - existing files. The value `{}' need not necessarily be used to describe - existing files. Expansion is in directory order, not alphabetically as - done in the shell. - -SSHHEELLLL CCOOMMMMAANNDDSS - Each target may have associated with it a series of shell commands, nor- - mally used to create the target. Each of the commands in this script - _m_u_s_t be preceded by a tab. While any target may appear on a dependency - line, only one of these dependencies may be followed by a creation - script, unless the `::::' operator is used. - - If the first characters of the command line are any combination of `@@', - `++', or `--', the command is treated specially. A `@@' causes the command - not to be echoed before it is executed. A `++' causes the command to be - executed even when --nn is given. This is similar to the effect of the - .MAKE special source, except that the effect can be limited to a single - line of a script. A `--' causes any non-zero exit status of the command - line to be ignored. - -VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS - Variables in make are much like variables in the shell, and, by tradi- - tion, consist of all upper-case letters. - - VVaarriiaabbllee aassssiiggnnmmeenntt mmooddiiffiieerrss - The five operators that can be used to assign values to variables are as - follows: - - == Assign the value to the variable. Any previous value is overrid- - den. - - ++== Append the value to the current value of the variable. - - ??== Assign the value to the variable if it is not already defined. - - ::== Assign with expansion, i.e. expand the value before assigning it - to the variable. Normally, expansion is not done until the vari- - able is referenced. _N_O_T_E: References to undefined variables are - _n_o_t expanded. This can cause problems when variable modifiers - are used. - - !!== Expand the value and pass it to the shell for execution and - assign the result to the variable. Any newlines in the result - are replaced with spaces. - - Any white-space before the assigned _v_a_l_u_e is removed; if the value is - being appended, a single space is inserted between the previous contents - of the variable and the appended value. - - Variables are expanded by surrounding the variable name with either curly - braces (`{}') or parentheses (`()') and preceding it with a dollar sign - (`$'). If the variable name contains only a single letter, the surround- - ing braces or parentheses are not required. This shorter form is not - recommended. - - If the variable name contains a dollar, then the name itself is expanded - first. This allows almost arbitrary variable names, however names con- - taining dollar, braces, parenthesis, or whitespace are really best - avoided! - - If the result of expanding a variable contains a dollar sign (`$') the - string is expanded again. - - Variable substitution occurs at three distinct times, depending on where - the variable is being used. - - 1. Variables in dependency lines are expanded as the line is read. - - 2. Variables in shell commands are expanded when the shell command is - executed. - - 3. ``.for'' loop index variables are expanded on each loop iteration. - Note that other variables are not expanded inside loops so the fol- - lowing example code: - - - .for i in 1 2 3 - a+= ${i} - j= ${i} - b+= ${j} - .endfor - - all: - @echo ${a} - @echo ${b} - - will print: - - 1 2 3 - 3 3 3 - - Because while ${a} contains ``1 2 3'' after the loop is executed, - ${b} contains ``${j} ${j} ${j}'' which expands to ``3 3 3'' since - after the loop completes ${j} contains ``3''. - - VVaarriiaabbllee ccllaasssseess - The four different classes of variables (in order of increasing prece- - dence) are: - - Environment variables - Variables defined as part of bbmmaakkee's environment. - - Global variables - Variables defined in the makefile or in included makefiles. - - Command line variables - Variables defined as part of the command line. - - Local variables - Variables that are defined specific to a certain target. The - seven local variables are as follows: - - _._A_L_L_S_R_C The list of all sources for this target; also known as - `_>'. - - _._A_R_C_H_I_V_E The name of the archive file. - - _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the - source from which the target is to be transformed (the - ``implied'' source); also known as `_<'. It is not - defined in explicit rules. - - _._M_E_M_B_E_R The name of the archive member. - - _._O_O_D_A_T_E The list of sources for this target that were deemed - out-of-date; also known as `_?'. - - _._P_R_E_F_I_X The file prefix of the target, containing only the file - portion, no suffix or preceding directory components; - also known as `_*'. - - _._T_A_R_G_E_T The name of the target; also known as `_@'. - - The shorter forms `_@', `_?', `_<', `_>', and `_*' are permitted for - backward compatibility with historical makefiles and are not rec- - ommended. The six variables `_@_F', `_@_D', `_<_F', `_<_D', `_*_F', and - `_*_D' are permitted for compatibility with AT&T System V UNIX - makefiles and are not recommended. - - Four of the local variables may be used in sources on dependency - lines because they expand to the proper value for each target on - the line. These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', - and `_._M_E_M_B_E_R'. - - AAddddiittiioonnaall bbuuiilltt--iinn vvaarriiaabblleess - In addition, bbmmaakkee sets or knows about the following variables: - - _$ A single dollar sign `$', i.e. `$$' expands to a single - dollar sign. - - _._A_L_L_T_A_R_G_E_T_S The list of all targets encountered in the Makefile. If - evaluated during Makefile parsing, lists only those tar- - gets encountered thus far. - - _._C_U_R_D_I_R A path to the directory where bbmmaakkee was executed. Refer - to the description of `PWD' for more details. - - MAKE The name that bbmmaakkee was executed with (_a_r_g_v_[_0_]). For - compatibility bbmmaakkee also sets _._M_A_K_E with the same value. - The preferred variable to use is the environment variable - MAKE because it is more compatible with other versions of - bbmmaakkee and cannot be confused with the special target with - the same name. - - _._M_A_K_E_._D_E_P_E_N_D_F_I_L_E - Names the makefile (default `_._d_e_p_e_n_d') from which gener- - ated dependencies are read. - - _._M_A_K_E_._E_X_P_A_N_D___V_A_R_I_A_B_L_E_S - A boolean that controls the default behavior of the --VV - option. - - _._M_A_K_E_._E_X_P_O_R_T_E_D The list of variables exported by bbmmaakkee. - - _._M_A_K_E_._J_O_B_S The argument to the --jj option. - - _._M_A_K_E_._J_O_B_._P_R_E_F_I_X - If bbmmaakkee is run with _j then output for each target is - prefixed with a token `--- target ---' the first part of - which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. - For example: - .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] - would produce tokens like `---make[1234] target ---' mak- - ing it easier to track the degree of parallelism being - achieved. - - MAKEFLAGS The environment variable `MAKEFLAGS' may contain anything - that may be specified on bbmmaakkee's command line. Anything - specified on bbmmaakkee's command line is appended to the - `MAKEFLAGS' variable which is then entered into the envi- - ronment for all programs which bbmmaakkee executes. - - _._M_A_K_E_._L_E_V_E_L The recursion depth of bbmmaakkee. The initial instance of - bbmmaakkee will be 0, and an incremented value is put into the - environment to be seen by the next generation. This - allows tests like: .if ${.MAKE.LEVEL} == 0 to protect - things which should only be evaluated in the initial - instance of bbmmaakkee. - - _._M_A_K_E_._M_A_K_E_F_I_L_E___P_R_E_F_E_R_E_N_C_E - The ordered list of makefile names (default `_m_a_k_e_f_i_l_e', - `_M_a_k_e_f_i_l_e') that bbmmaakkee will look for. - - _._M_A_K_E_._M_A_K_E_F_I_L_E_S - The list of makefiles read by bbmmaakkee, which is useful for - tracking dependencies. Each makefile is recorded only - once, regardless of the number of times read. - - _._M_A_K_E_._M_O_D_E Processed after reading all makefiles. Can affect the - mode that bbmmaakkee runs in. It can contain a number of key- - words: - - _c_o_m_p_a_t Like --BB, puts bbmmaakkee into "compat" mode. - - _m_e_t_a Puts bbmmaakkee into "meta" mode, where meta files - are created for each target to capture the - command run, the output generated and if - filemon(4) is available, the system calls - which are of interest to bbmmaakkee. The captured - output can be very useful when diagnosing - errors. - - _c_u_r_d_i_r_O_k_= _b_f Normally bbmmaakkee will not create .meta files - in `_._C_U_R_D_I_R'. This can be overridden by set- - ting _b_f to a value which represents True. - - _e_n_v For debugging, it can be useful to inlcude - the environment in the .meta file. - - _v_e_r_b_o_s_e If in "meta" mode, print a clue about the - target being built. This is useful if the - build is otherwise running silently. The - message printed the value of: - _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X. - - _i_g_n_o_r_e_-_c_m_d Some makefiles have commands which are simply - not stable. This keyword causes them to be - ignored for determining whether a target is - out of date in "meta" mode. See also - ..NNOOMMEETTAA__CCMMPP. - - _s_i_l_e_n_t_= _b_f If _b_f is True, when a .meta file is created, - mark the target ..SSIILLEENNTT. - - _._M_A_K_E_._M_E_T_A_._B_A_I_L_I_W_I_C_K - In "meta" mode, provides a list of prefixes which match - the directories controlled by bbmmaakkee. If a file that was - generated outside of _._O_B_J_D_I_R but within said bailiwick is - missing, the current target is considered out-of-date. - - _._M_A_K_E_._M_E_T_A_._C_R_E_A_T_E_D - In "meta" mode, this variable contains a list of all the - meta files updated. If not empty, it can be used to - trigger processing of _._M_A_K_E_._M_E_T_A_._F_I_L_E_S. - - _._M_A_K_E_._M_E_T_A_._F_I_L_E_S - In "meta" mode, this variable contains a list of all the - meta files used (updated or not). This list can be used - to process the meta files to extract dependency informa- - tion. - - _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X - Defines the message printed for each meta file updated in - "meta verbose" mode. The default value is: - Building ${.TARGET:H:tA}/${.TARGET:T} - - _._M_A_K_E_O_V_E_R_R_I_D_E_S This variable is used to record the names of variables - assigned to on the command line, so that they may be - exported as part of `MAKEFLAGS'. This behaviour can be - disabled by assigning an empty value to `_._M_A_K_E_O_V_E_R_R_I_D_E_S' - within a makefile. Extra variables can be exported from - a makefile by appending their names to `_._M_A_K_E_O_V_E_R_R_I_D_E_S'. - `MAKEFLAGS' is re-exported whenever `_._M_A_K_E_O_V_E_R_R_I_D_E_S' is - modified. - - _._M_A_K_E_._P_I_D The process-id of bbmmaakkee. - - _._M_A_K_E_._P_P_I_D The parent process-id of bbmmaakkee. - - _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R - When bbmmaakkee stops due to an error, it prints its name and - the value of `_._C_U_R_D_I_R' as well as the value of any vari- - ables named in `_M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R'. - - _._n_e_w_l_i_n_e This variable is simply assigned a newline character as - its value. This allows expansions using the ::@@ modifier - to put a newline between iterations of the loop rather - than a space. For example, the printing of - `_M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R' could be done as - ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}. - - _._O_B_J_D_I_R A path to the directory where the targets are built. Its - value is determined by trying to chdir(2) to the follow- - ing directories in order and using the first match: - - 1. ${MAKEOBJDIRPREFIX}${.CURDIR} - - (Only if `MAKEOBJDIRPREFIX' is set in the environ- - ment or on the command line.) - - 2. ${MAKEOBJDIR} - - (Only if `MAKEOBJDIR' is set in the environment or - on the command line.) - - 3. ${.CURDIR}_/_o_b_j_.${MACHINE} - - 4. ${.CURDIR}_/_o_b_j - - 5. _/_u_s_r_/_o_b_j_/${.CURDIR} - - 6. ${.CURDIR} - - Variable expansion is performed on the value before it's - used, so expressions such as - ${.CURDIR:S,^/usr/src,/var/obj,} - may be used. This is especially useful with - `MAKEOBJDIR'. - - `_._O_B_J_D_I_R' may be modified in the makefile as a global - variable. In all cases, bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' - and set `PWD' to that directory before executing any tar- - gets. - - _._P_A_R_S_E_D_I_R A path to the directory of the current `_M_a_k_e_f_i_l_e' being - parsed. - - _._P_A_R_S_E_F_I_L_E The basename of the current `_M_a_k_e_f_i_l_e' being parsed. - This variable and `_._P_A_R_S_E_D_I_R' are both set only while the - `_M_a_k_e_f_i_l_e_s' are being parsed. If you want to retain - their current values, assign them to a variable using - assignment with expansion: (`::=='). - - _._P_A_T_H A variable that represents the list of directories that - bbmmaakkee will search for files. The search list should be - updated using the target `_._P_A_T_H' rather than the vari- - able. - - PWD Alternate path to the current directory. bbmmaakkee normally - sets `_._C_U_R_D_I_R' to the canonical path given by getcwd(3). - However, if the environment variable `PWD' is set and - gives a path to the current directory, then bbmmaakkee sets - `_._C_U_R_D_I_R' to the value of `PWD' instead. This behaviour - is disabled if `MAKEOBJDIRPREFIX' is set or `MAKEOBJDIR' - contains a variable transform. `PWD' is set to the value - of `_._O_B_J_D_I_R' for all programs which bbmmaakkee executes. - - .TARGETS The list of targets explicitly specified on the command - line, if any. - - VPATH Colon-separated (``:'') lists of directories that bbmmaakkee - will search for files. The variable is supported for - compatibility with old make programs only, use `_._P_A_T_H' - instead. - - VVaarriiaabbllee mmooddiiffiieerrss - Variable expansion may be modified to select or modify each word of the - variable (where a ``word'' is white-space delimited sequence of charac- - ters). The general format of a variable expansion is as follows: - - ${variable[:modifier[:...]]} - - Each modifier begins with a colon, which may be escaped with a backslash - (`\'). - - A set of modifiers can be specified via a variable, as follows: - - modifier_variable=modifier[:...] - ${variable:${modifier_variable}[:...]} - - In this case the first modifier in the modifier_variable does not start - with a colon, since that must appear in the referencing variable. If any - of the modifiers in the modifier_variable contain a dollar sign (`$'), - these must be doubled to avoid early expansion. - - The supported modifiers are: - - ::EE Replaces each word in the variable with its suffix. - - ::HH Replaces each word in the variable with everything but the last com- - ponent. - - ::MM_p_a_t_t_e_r_n - Select only those words that match _p_a_t_t_e_r_n. The standard shell - wildcard characters (`*', `?', and `[]') may be used. The wildcard - characters may be escaped with a backslash (`\'). - - ::NN_p_a_t_t_e_r_n - This is identical to `::MM', but selects all words which do not match - _p_a_t_t_e_r_n. - - ::OO Order every word in variable alphabetically. To sort words in - reverse order use the `::OO::[[--11....11]]' combination of modifiers. + A make command appeared in Version 7 AT&T UNIX. This make implementation + is based on Adam De Boor's pmake program which was written for Sprite at + Berkeley. It was designed to be a parallel distributed make running jobs + on different machines using a daemon called ``customs''. + +BBUUGGSS + The make syntax is difficult to parse without actually acting of the + data. For instance finding the end of a variable use should involve + scanning each the modifiers using the correct terminator for each field. + In many places make just counts {} and () in order to find the end of a + variable expansion. - ::OOxx Randomize words in variable. The results will be different each - time you are referring to the modified variable; use the assignment - with expansion (`::==') to prevent such behaviour. For example, - - LIST= uno due tre quattro - RANDOM_LIST= ${LIST:Ox} - STATIC_RANDOM_LIST:= ${LIST:Ox} - - all: - @echo "${RANDOM_LIST}" - @echo "${RANDOM_LIST}" - @echo "${STATIC_RANDOM_LIST}" - @echo "${STATIC_RANDOM_LIST}" - may produce output similar to: - - quattro due tre uno - tre due quattro uno - due uno quattro tre - due uno quattro tre - - ::QQ Quotes every shell meta-character in the variable, so that it can be - passed safely through recursive invocations of bbmmaakkee. - - ::RR Replaces each word in the variable with everything but its suffix. - - ::ggmmttiimmee - The value is a format string for strftime(3), using the current - gmtime(3). - - ::hhaasshh - Compute a 32bit hash of the value and encode it as hex digits. - - ::llooccaallttiimmee - The value is a format string for strftime(3), using the current - localtime(3). - - ::ttAA Attempt to convert variable to an absolute path using realpath(3), - if that fails, the value is unchanged. - - ::ttll Converts variable to lower-case letters. - - ::ttss_c - Words in the variable are normally separated by a space on expan- - sion. This modifier sets the separator to the character _c. If _c is - omitted, then no separator is used. The common escapes (including - octal numeric codes), work as expected. - - ::ttuu Converts variable to upper-case letters. - - ::ttWW Causes the value to be treated as a single word (possibly containing - embedded white space). See also `::[[**]]'. - - ::ttww Causes the value to be treated as a sequence of words delimited by - white space. See also `::[[@@]]'. - - ::SS/_o_l_d___s_t_r_i_n_g/_n_e_w___s_t_r_i_n_g/[11ggWW] - Modify the first occurrence of _o_l_d___s_t_r_i_n_g in the variable's value, - replacing it with _n_e_w___s_t_r_i_n_g. If a `g' is appended to the last - slash of the pattern, all occurrences in each word are replaced. If - a `1' is appended to the last slash of the pattern, only the first - word is affected. If a `W' is appended to the last slash of the - pattern, then the value is treated as a single word (possibly con- - taining embedded white space). If _o_l_d___s_t_r_i_n_g begins with a caret - (`^'), _o_l_d___s_t_r_i_n_g is anchored at the beginning of each word. If - _o_l_d___s_t_r_i_n_g ends with a dollar sign (`$'), it is anchored at the end - of each word. Inside _n_e_w___s_t_r_i_n_g, an ampersand (`&') is replaced by - _o_l_d___s_t_r_i_n_g (without any `^' or `$'). Any character may be used as a - delimiter for the parts of the modifier string. The anchoring, - ampersand and delimiter characters may be escaped with a backslash - (`\'). - - Variable expansion occurs in the normal fashion inside both - _o_l_d___s_t_r_i_n_g and _n_e_w___s_t_r_i_n_g with the single exception that a backslash - is used to prevent the expansion of a dollar sign (`$'), not a pre- - ceding dollar sign as is usual. - - ::CC/_p_a_t_t_e_r_n/_r_e_p_l_a_c_e_m_e_n_t/[11ggWW] - The ::CC modifier is just like the ::SS modifier except that the old and - new strings, instead of being simple strings, are a regular expres- - sion (see regex(3)) string _p_a_t_t_e_r_n and an ed(1)-style string - _r_e_p_l_a_c_e_m_e_n_t. Normally, the first occurrence of the pattern _p_a_t_t_e_r_n - in each word of the value is substituted with _r_e_p_l_a_c_e_m_e_n_t. The `1' - modifier causes the substitution to apply to at most one word; the - `g' modifier causes the substitution to apply to as many instances - of the search pattern _p_a_t_t_e_r_n as occur in the word or words it is - found in; the `W' modifier causes the value to be treated as a sin- - gle word (possibly containing embedded white space). Note that `1' - and `g' are orthogonal; the former specifies whether multiple words - are potentially affected, the latter whether multiple substitutions - can potentially occur within each affected word. - - ::TT Replaces each word in the variable with its last component. - - ::uu Remove adjacent duplicate words (like uniq(1)). - - ::??_t_r_u_e___s_t_r_i_n_g::_f_a_l_s_e___s_t_r_i_n_g - If the variable name (not its value), when parsed as a .if condi- - tional expression, evaluates to true, return as its value the - _t_r_u_e___s_t_r_i_n_g, otherwise return the _f_a_l_s_e___s_t_r_i_n_g. Since the variable - name is used as the expression, :? must be the first modifier after - the variable name itself - which will, of course, usually contain - variable expansions. A common error is trying to use expressions - like - ${NUMBERS:M42:?match:no} - which actually tests defined(NUMBERS), to determine is any words - match "42" you need to use something like: - ${"${NUMBERS:M42}" != "":?match:no}. - - _:_o_l_d___s_t_r_i_n_g_=_n_e_w___s_t_r_i_n_g - This is the AT&T System V UNIX style variable substitution. It must - be the last modifier specified. If _o_l_d___s_t_r_i_n_g or _n_e_w___s_t_r_i_n_g do not - contain the pattern matching character _% then it is assumed that - they are anchored at the end of each word, so only suffixes or - entire words may be replaced. Otherwise _% is the substring of - _o_l_d___s_t_r_i_n_g to be replaced in _n_e_w___s_t_r_i_n_g. - - Variable expansion occurs in the normal fashion inside both - _o_l_d___s_t_r_i_n_g and _n_e_w___s_t_r_i_n_g with the single exception that a backslash - is used to prevent the expansion of a dollar sign (`$'), not a pre- - ceding dollar sign as is usual. - - ::@@_t_e_m_p@@_s_t_r_i_n_g@@ - This is the loop expansion mechanism from the OSF Development Envi- - ronment (ODE) make. Unlike ..ffoorr loops expansion occurs at the time - of reference. Assign _t_e_m_p to each word in the variable and evaluate - _s_t_r_i_n_g. The ODE convention is that _t_e_m_p should start and end with a - period. For example. - ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} - - However a single character varaiable is often more readable: - ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} - - ::UU_n_e_w_v_a_l - If the variable is undefined _n_e_w_v_a_l is the value. If the variable - is defined, the existing value is returned. This is another ODE - make feature. It is handy for setting per-target CFLAGS for - instance: - ${_${.TARGET:T}_CFLAGS:U${DEF_CFLAGS}} - If a value is only required if the variable is undefined, use: - ${VAR:D:Unewval} - - ::DD_n_e_w_v_a_l - If the variable is defined _n_e_w_v_a_l is the value. - - ::LL The name of the variable is the value. - - ::PP The path of the node which has the same name as the variable is the - value. If no such node exists or its path is null, then the name of - the variable is used. In order for this modifier to work, the name - (node) must at least have appeared on the rhs of a dependency. - - ::!!_c_m_d!! - The output of running _c_m_d is the value. - - ::sshh If the variable is non-empty it is run as a command and the output - becomes the new value. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Thu Oct 25 20:34: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 6D37F4EB; Thu, 25 Oct 2012 20:34:45 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BA8D8FC0A; Thu, 25 Oct 2012 20:34: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 q9PKYjl7040041; Thu, 25 Oct 2012 20:34:45 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PKYjC5040040; Thu, 25 Oct 2012 20:34:45 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201210252034.q9PKYjC5040040@svn.freebsd.org> From: "Simon J. Gerraty" Date: Thu, 25 Oct 2012 20:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r242094 - vendor/NetBSD/bmake/20121010 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Oct 2012 20:34:45 -0000 Author: sjg Date: Thu Oct 25 20:34:44 2012 New Revision: 242094 URL: http://svn.freebsd.org/changeset/base/242094 Log: Tag bmake/20121010 Approved by: marcel (mentor) Added: vendor/NetBSD/bmake/20121010/ - copied from r242093, vendor/NetBSD/bmake/dist/