Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jun 2012 11:13:59 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r237600 - in user/ae/bootcode: contrib/gcc crypto/openssh include lib/libc/amd64/sys lib/libc/gen lib/libc/i386/sys lib/libc/include lib/libc/net lib/libc/stdlib lib/libc/stdtime lib/li...
Message-ID:  <201206261113.q5QBDxJn036855@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Tue Jun 26 11:13:58 2012
New Revision: 237600
URL: http://svn.freebsd.org/changeset/base/237600

Log:
  Sync with head/.

Added:
  user/ae/bootcode/lib/libc/amd64/sys/__vdso_gettc.c
     - copied unchanged from r237599, head/lib/libc/amd64/sys/__vdso_gettc.c
  user/ae/bootcode/lib/libc/i386/sys/__vdso_gettc.c
     - copied unchanged from r237599, head/lib/libc/i386/sys/__vdso_gettc.c
  user/ae/bootcode/lib/libc/sys/__vdso_gettimeofday.c
     - copied unchanged from r237599, head/lib/libc/sys/__vdso_gettimeofday.c
  user/ae/bootcode/lib/libc/sys/clock_gettime.c
     - copied unchanged from r237599, head/lib/libc/sys/clock_gettime.c
  user/ae/bootcode/lib/libc/sys/gettimeofday.c
     - copied unchanged from r237599, head/lib/libc/sys/gettimeofday.c
  user/ae/bootcode/lib/libz/test/
     - copied from r237599, head/lib/libz/test/
  user/ae/bootcode/sys/amd64/include/vdso.h
     - copied unchanged from r237599, head/sys/amd64/include/vdso.h
  user/ae/bootcode/sys/arm/include/vdso.h
     - copied unchanged from r237599, head/sys/arm/include/vdso.h
  user/ae/bootcode/sys/contrib/dev/acpica/common/ahpredef.c
     - copied unchanged from r237599, head/sys/contrib/dev/acpica/common/ahpredef.c
  user/ae/bootcode/sys/i386/include/vdso.h
     - copied unchanged from r237599, head/sys/i386/include/vdso.h
  user/ae/bootcode/sys/ia64/include/vdso.h
     - copied unchanged from r237599, head/sys/ia64/include/vdso.h
  user/ae/bootcode/sys/kern/kern_sharedpage.c
     - copied unchanged from r237599, head/sys/kern/kern_sharedpage.c
  user/ae/bootcode/sys/kern/subr_dummy_vdso_tc.c
     - copied unchanged from r237599, head/sys/kern/subr_dummy_vdso_tc.c
  user/ae/bootcode/sys/mips/include/vdso.h
     - copied unchanged from r237599, head/sys/mips/include/vdso.h
  user/ae/bootcode/sys/pc98/include/vdso.h
     - copied unchanged from r237599, head/sys/pc98/include/vdso.h
  user/ae/bootcode/sys/powerpc/include/vdso.h
     - copied unchanged from r237599, head/sys/powerpc/include/vdso.h
  user/ae/bootcode/sys/sparc64/include/vdso.h
     - copied unchanged from r237599, head/sys/sparc64/include/vdso.h
  user/ae/bootcode/sys/sys/vdso.h
     - copied unchanged from r237599, head/sys/sys/vdso.h
  user/ae/bootcode/sys/x86/include/vdso.h
     - copied unchanged from r237599, head/sys/x86/include/vdso.h
Deleted:
  user/ae/bootcode/lib/libz/example.c
  user/ae/bootcode/lib/libz/minigzip.c
Modified:
  user/ae/bootcode/contrib/gcc/ChangeLog.gcc43
  user/ae/bootcode/contrib/gcc/fold-const.c
  user/ae/bootcode/contrib/gcc/gimplify.c
  user/ae/bootcode/contrib/gcc/tree-ssa-ccp.c
  user/ae/bootcode/contrib/gcc/tree-ssa-pre.c
  user/ae/bootcode/crypto/openssh/ssh-keyscan.1
  user/ae/bootcode/crypto/openssh/ssh-keyscan.c
  user/ae/bootcode/include/wchar.h
  user/ae/bootcode/lib/libc/amd64/sys/Makefile.inc
  user/ae/bootcode/lib/libc/gen/aux.c
  user/ae/bootcode/lib/libc/gen/syslog.c
  user/ae/bootcode/lib/libc/i386/sys/Makefile.inc
  user/ae/bootcode/lib/libc/include/libc_private.h
  user/ae/bootcode/lib/libc/net/Makefile.inc
  user/ae/bootcode/lib/libc/stdlib/Makefile.inc
  user/ae/bootcode/lib/libc/stdlib/strfmon.3
  user/ae/bootcode/lib/libc/stdtime/Makefile.inc
  user/ae/bootcode/lib/libc/stdtime/strftime.3
  user/ae/bootcode/lib/libc/stdtime/strptime.3
  user/ae/bootcode/lib/libc/string/Makefile.inc
  user/ae/bootcode/lib/libc/sys/Makefile.inc
  user/ae/bootcode/lib/libedit/common.c
  user/ae/bootcode/lib/libedit/editline.3
  user/ae/bootcode/lib/libedit/editrc.5
  user/ae/bootcode/lib/libedit/el.c
  user/ae/bootcode/lib/libedit/el.h
  user/ae/bootcode/lib/libedit/histedit.h
  user/ae/bootcode/lib/libedit/history.c
  user/ae/bootcode/lib/libedit/key.c
  user/ae/bootcode/lib/libedit/key.h
  user/ae/bootcode/lib/libedit/prompt.c
  user/ae/bootcode/lib/libedit/prompt.h
  user/ae/bootcode/lib/libedit/read.c
  user/ae/bootcode/lib/libedit/refresh.c
  user/ae/bootcode/lib/libedit/search.c
  user/ae/bootcode/lib/libedit/sig.c
  user/ae/bootcode/lib/libedit/sig.h
  user/ae/bootcode/lib/libedit/term.c
  user/ae/bootcode/lib/libedit/term.h
  user/ae/bootcode/lib/libedit/tty.c
  user/ae/bootcode/lib/libedit/vi.c
  user/ae/bootcode/lib/libelf/Makefile
  user/ae/bootcode/lib/libstand/Makefile
  user/ae/bootcode/lib/libz/ChangeLog
  user/ae/bootcode/lib/libz/FAQ
  user/ae/bootcode/lib/libz/FREEBSD-upgrade   (contents, props changed)
  user/ae/bootcode/lib/libz/Makefile   (contents, props changed)
  user/ae/bootcode/lib/libz/README
  user/ae/bootcode/lib/libz/Symbol.map   (contents, props changed)
  user/ae/bootcode/lib/libz/Versions.def   (contents, props changed)
  user/ae/bootcode/lib/libz/adler32.c
  user/ae/bootcode/lib/libz/contrib/asm686/match.S   (contents, props changed)
  user/ae/bootcode/lib/libz/crc32.c
  user/ae/bootcode/lib/libz/crc32.h
  user/ae/bootcode/lib/libz/deflate.c
  user/ae/bootcode/lib/libz/deflate.h
  user/ae/bootcode/lib/libz/doc/algorithm.txt   (contents, props changed)
  user/ae/bootcode/lib/libz/gzguts.h   (contents, props changed)
  user/ae/bootcode/lib/libz/gzlib.c
  user/ae/bootcode/lib/libz/gzread.c
  user/ae/bootcode/lib/libz/gzwrite.c
  user/ae/bootcode/lib/libz/infback.c
  user/ae/bootcode/lib/libz/inffixed.h
  user/ae/bootcode/lib/libz/inflate.c
  user/ae/bootcode/lib/libz/inftrees.c
  user/ae/bootcode/lib/libz/trees.c
  user/ae/bootcode/lib/libz/zconf.h
  user/ae/bootcode/lib/libz/zlib.3
  user/ae/bootcode/lib/libz/zlib.h
  user/ae/bootcode/lib/libz/zopen.c   (contents, props changed)
  user/ae/bootcode/lib/libz/zutil.c
  user/ae/bootcode/lib/libz/zutil.h
  user/ae/bootcode/sbin/camcontrol/camcontrol.8
  user/ae/bootcode/sbin/camcontrol/camcontrol.c
  user/ae/bootcode/share/man/man4/Makefile
  user/ae/bootcode/share/man/man4/acpi_ibm.4
  user/ae/bootcode/share/man/man5/passwd.5
  user/ae/bootcode/share/man/man9/disk.9
  user/ae/bootcode/share/mk/bsd.crunchgen.mk
  user/ae/bootcode/sys/amd64/amd64/pmap.c
  user/ae/bootcode/sys/amd64/include/elf.h
  user/ae/bootcode/sys/arm/at91/at91_machdep.c
  user/ae/bootcode/sys/arm/at91/at91_twi.c
  user/ae/bootcode/sys/arm/at91/at91reg.h
  user/ae/bootcode/sys/arm/include/_stdint.h
  user/ae/bootcode/sys/arm/include/_types.h
  user/ae/bootcode/sys/arm/include/elf.h
  user/ae/bootcode/sys/boot/userboot/libstand/Makefile
  user/ae/bootcode/sys/cam/cam_periph.c
  user/ae/bootcode/sys/cam/cam_xpt.c
  user/ae/bootcode/sys/cam/scsi/scsi_all.c
  user/ae/bootcode/sys/cam/scsi/scsi_all.h
  user/ae/bootcode/sys/cam/scsi/scsi_cd.c
  user/ae/bootcode/sys/cam/scsi/scsi_da.c
  user/ae/bootcode/sys/cam/scsi/scsi_da.h
  user/ae/bootcode/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  user/ae/bootcode/sys/conf/files
  user/ae/bootcode/sys/conf/files.arm
  user/ae/bootcode/sys/conf/files.ia64
  user/ae/bootcode/sys/conf/files.mips
  user/ae/bootcode/sys/conf/files.powerpc
  user/ae/bootcode/sys/conf/files.sparc64
  user/ae/bootcode/sys/conf/options
  user/ae/bootcode/sys/contrib/dev/acpica/changes.txt   (contents, props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/common/dmextern.c
  user/ae/bootcode/sys/contrib/dev/acpica/common/dmrestag.c
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/aslcompile.c
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/aslerror.c
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/aslfiles.c
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/asllookup.c
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/aslmain.c
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/aslsupport.l
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/aslutils.c
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/dttemplate.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/debugger/dbdisply.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/debugger/dbexec.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/debugger/dbutils.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/events/evgpe.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/events/evgpeutil.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/events/evxfgpe.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/executer/exconfig.c
  user/ae/bootcode/sys/contrib/dev/acpica/components/utilities/utmisc.c
  user/ae/bootcode/sys/contrib/dev/acpica/include/acdebug.h
  user/ae/bootcode/sys/contrib/dev/acpica/include/acdisasm.h
  user/ae/bootcode/sys/contrib/dev/acpica/include/acglobal.h
  user/ae/bootcode/sys/contrib/dev/acpica/include/aclocal.h
  user/ae/bootcode/sys/contrib/dev/acpica/include/acpixf.h
  user/ae/bootcode/sys/contrib/dev/acpica/include/acpredef.h
  user/ae/bootcode/sys/contrib/dev/acpica/include/acutils.h
  user/ae/bootcode/sys/dev/acpi_support/acpi_ibm.c
  user/ae/bootcode/sys/dev/adb/adb_kbd.c
  user/ae/bootcode/sys/dev/agp/agp_i810.c
  user/ae/bootcode/sys/dev/ath/ath_dfs/null/dfs_null.c
  user/ae/bootcode/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
  user/ae/bootcode/sys/dev/ath/ath_rate/amrr/amrr.c
  user/ae/bootcode/sys/dev/ath/ath_rate/onoe/onoe.c
  user/ae/bootcode/sys/dev/ath/ath_rate/sample/sample.c
  user/ae/bootcode/sys/dev/ath/if_ath.c
  user/ae/bootcode/sys/dev/ath/if_ath_ahb.c
  user/ae/bootcode/sys/dev/ath/if_ath_rx.c
  user/ae/bootcode/sys/dev/ath/if_ath_tx.c
  user/ae/bootcode/sys/dev/ath/if_athdfs.h
  user/ae/bootcode/sys/dev/ath/if_athioctl.h
  user/ae/bootcode/sys/dev/cxgbe/common/common.h
  user/ae/bootcode/sys/dev/cxgbe/common/t4_hw.c
  user/ae/bootcode/sys/dev/cxgbe/common/t4_msg.h
  user/ae/bootcode/sys/dev/cxgbe/firmware/t4fw_cfg.txt
  user/ae/bootcode/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt
  user/ae/bootcode/sys/dev/cxgbe/firmware/t4fw_interface.h
  user/ae/bootcode/sys/dev/cxgbe/osdep.h
  user/ae/bootcode/sys/dev/cxgbe/t4_main.c
  user/ae/bootcode/sys/dev/cxgbe/t4_sge.c
  user/ae/bootcode/sys/dev/cxgbe/tom/t4_cpl_io.c
  user/ae/bootcode/sys/dev/drm2/drm_pciids.h
  user/ae/bootcode/sys/dev/isp/isp.c
  user/ae/bootcode/sys/dev/isp/isp_freebsd.c
  user/ae/bootcode/sys/dev/isp/isp_freebsd.h
  user/ae/bootcode/sys/dev/isp/isp_pci.c
  user/ae/bootcode/sys/dev/isp/ispmbox.h
  user/ae/bootcode/sys/dev/isp/ispvar.h
  user/ae/bootcode/sys/dev/mfi/mfi_tbolt.c
  user/ae/bootcode/sys/dev/mps/mps_sas.c
  user/ae/bootcode/sys/dev/mpt/mpt_cam.c
  user/ae/bootcode/sys/dev/re/if_re.c
  user/ae/bootcode/sys/dev/twa/tw_osl_cam.c
  user/ae/bootcode/sys/dev/xen/blkfront/blkfront.c
  user/ae/bootcode/sys/geom/geom.h
  user/ae/bootcode/sys/geom/geom_disk.c
  user/ae/bootcode/sys/geom/geom_disk.h
  user/ae/bootcode/sys/geom/geom_subr.c
  user/ae/bootcode/sys/i386/i386/elf_machdep.c
  user/ae/bootcode/sys/i386/i386/machdep.c
  user/ae/bootcode/sys/i386/include/elf.h
  user/ae/bootcode/sys/i386/include/vmparam.h
  user/ae/bootcode/sys/ia64/include/_stdint.h
  user/ae/bootcode/sys/ia64/include/_types.h
  user/ae/bootcode/sys/ia64/include/elf.h
  user/ae/bootcode/sys/kern/imgact_elf.c
  user/ae/bootcode/sys/kern/kern_exec.c
  user/ae/bootcode/sys/kern/kern_tc.c
  user/ae/bootcode/sys/kern/subr_firmware.c
  user/ae/bootcode/sys/mips/include/_stdint.h
  user/ae/bootcode/sys/mips/include/_types.h
  user/ae/bootcode/sys/mips/include/elf.h
  user/ae/bootcode/sys/mips/mips/pmap.c
  user/ae/bootcode/sys/modules/rdma/krping/Makefile
  user/ae/bootcode/sys/modules/toecore/Makefile
  user/ae/bootcode/sys/net80211/ieee80211_output.c
  user/ae/bootcode/sys/netinet/ipfw/ip_fw_table.c
  user/ae/bootcode/sys/netinet/sctp_bsd_addr.c
  user/ae/bootcode/sys/netinet/sctp_bsd_addr.h
  user/ae/bootcode/sys/netinet/sctp_indata.c
  user/ae/bootcode/sys/netinet/sctp_input.c
  user/ae/bootcode/sys/netinet/sctp_os_bsd.h
  user/ae/bootcode/sys/netinet/sctp_output.c
  user/ae/bootcode/sys/netinet/sctp_output.h
  user/ae/bootcode/sys/netinet/sctp_sysctl.c
  user/ae/bootcode/sys/netinet/sctp_sysctl.h
  user/ae/bootcode/sys/netinet/sctp_usrreq.c
  user/ae/bootcode/sys/netinet/sctputil.c
  user/ae/bootcode/sys/netinet6/in6.c
  user/ae/bootcode/sys/netinet6/in6_src.c
  user/ae/bootcode/sys/netinet6/sctp6_usrreq.c
  user/ae/bootcode/sys/ofed/include/linux/workqueue.h
  user/ae/bootcode/sys/powerpc/include/_stdint.h
  user/ae/bootcode/sys/powerpc/include/_types.h
  user/ae/bootcode/sys/powerpc/include/elf.h
  user/ae/bootcode/sys/sparc64/include/_stdint.h
  user/ae/bootcode/sys/sparc64/include/_types.h
  user/ae/bootcode/sys/sparc64/include/elf.h
  user/ae/bootcode/sys/sys/_types.h
  user/ae/bootcode/sys/sys/stdint.h
  user/ae/bootcode/sys/sys/sysent.h
  user/ae/bootcode/sys/vm/vm_object.h
  user/ae/bootcode/sys/x86/include/_stdint.h
  user/ae/bootcode/sys/x86/include/_types.h
  user/ae/bootcode/sys/x86/x86/tsc.c
  user/ae/bootcode/tools/tools/net80211/w00t/redir/buddy.c
  user/ae/bootcode/tools/tools/net80211/wesside/dics/dics.c
  user/ae/bootcode/usr.bin/minigzip/Makefile
  user/ae/bootcode/usr.sbin/acpi/iasl/Makefile
  user/ae/bootcode/usr.sbin/crunch/crunchgen/crunchgen.c
Directory Properties:
  user/ae/bootcode/   (props changed)
  user/ae/bootcode/contrib/gcc/   (props changed)
  user/ae/bootcode/crypto/openssh/   (props changed)
  user/ae/bootcode/lib/libc/   (props changed)
  user/ae/bootcode/lib/libc/stdtime/   (props changed)
  user/ae/bootcode/lib/libz/   (props changed)
  user/ae/bootcode/lib/libz/contrib/   (props changed)
  user/ae/bootcode/lib/libz/contrib/README.contrib   (props changed)
  user/ae/bootcode/lib/libz/contrib/asm686/   (props changed)
  user/ae/bootcode/lib/libz/contrib/asm686/README.686   (props changed)
  user/ae/bootcode/lib/libz/contrib/gcc_gvmat64/   (props changed)
  user/ae/bootcode/lib/libz/contrib/gcc_gvmat64/gvmat64.S   (props changed)
  user/ae/bootcode/lib/libz/doc/   (props changed)
  user/ae/bootcode/lib/libz/doc/rfc1950.txt   (props changed)
  user/ae/bootcode/lib/libz/doc/rfc1951.txt   (props changed)
  user/ae/bootcode/lib/libz/doc/rfc1952.txt   (props changed)
  user/ae/bootcode/lib/libz/doc/txtvsbin.txt   (props changed)
  user/ae/bootcode/lib/libz/gzclose.c   (props changed)
  user/ae/bootcode/sbin/   (props changed)
  user/ae/bootcode/share/man/man4/   (props changed)
  user/ae/bootcode/sys/   (props changed)
  user/ae/bootcode/sys/boot/   (props changed)
  user/ae/bootcode/sys/cddl/contrib/opensolaris/   (props changed)
  user/ae/bootcode/sys/conf/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/common/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/compiler/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/components/debugger/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/components/disassembler/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/components/dispatcher/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/components/events/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/components/executer/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/components/utilities/   (props changed)
  user/ae/bootcode/sys/contrib/dev/acpica/include/   (props changed)

Modified: user/ae/bootcode/contrib/gcc/ChangeLog.gcc43
==============================================================================
--- user/ae/bootcode/contrib/gcc/ChangeLog.gcc43	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/contrib/gcc/ChangeLog.gcc43	Tue Jun 26 11:13:58 2012	(r237600)
@@ -5,6 +5,18 @@
 	with SSE3 instruction set support.
 	* doc/invoke.texi: Likewise.
 
+2007-04-12  Richard Guenther  <rguenther@suse.de> (r123736)
+
+	PR tree-optimization/24689
+	PR tree-optimization/31307
+	* fold-const.c (operand_equal_p): Compare INTEGER_CST array
+	indices by value.
+	* gimplify.c (canonicalize_addr_expr): To be consistent with
+	gimplify_compound_lval only set operands two and three of
+	ARRAY_REFs if they are not gimple_min_invariant.  This makes
+	it never at this place.
+	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise.
+
 2007-04-07  H.J. Lu  <hongjiu.lu@intel.com> (r123639)
 
 	* config/i386/i386.c (ix86_handle_option): Handle SSSE3.
@@ -96,7 +108,7 @@
 
 	* doc/invoke.texi: Add entry about geode processor.
     
-2006-10-24  Richard Guenther  <rguenther@suse.de>
+2006-10-24  Richard Guenther  <rguenther@suse.de> (r118001)
 
 	PR middle-end/28796
 	* builtins.c (fold_builtin_classify): Use HONOR_INFINITIES
@@ -170,7 +182,13 @@
 
 	* doc/invoke.texi: Document -mssse3/-mno-ssse3 switches.
 
-2006-10-21  Richard Guenther  <rguenther@suse.de>
+2006-10-21  Richard Guenther  <rguenther@suse.de> (r117932)
+
+	PR tree-optimization/3511
+	* tree-ssa-pre.c (phi_translate): Fold CALL_EXPRs that
+	got new invariant arguments during PHI translation.
+
+2006-10-21  Richard Guenther  <rguenther@suse.de> (r117929)
 
 	* builtins.c (fold_builtin_classify): Fix typo.
 

Modified: user/ae/bootcode/contrib/gcc/fold-const.c
==============================================================================
--- user/ae/bootcode/contrib/gcc/fold-const.c	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/contrib/gcc/fold-const.c	Tue Jun 26 11:13:58 2012	(r237600)
@@ -2802,9 +2802,13 @@ operand_equal_p (tree arg0, tree arg1, u
 
 	case ARRAY_REF:
 	case ARRAY_RANGE_REF:
-	  /* Operands 2 and 3 may be null.  */
+	  /* Operands 2 and 3 may be null.
+	     Compare the array index by value if it is constant first as we
+	     may have different types but same value here.  */
 	  return (OP_SAME (0)
-		  && OP_SAME (1)
+		  && (tree_int_cst_equal (TREE_OPERAND (arg0, 1),
+					  TREE_OPERAND (arg1, 1))
+		      || OP_SAME (1))
 		  && OP_SAME_WITH_NULL (2)
 		  && OP_SAME_WITH_NULL (3));
 

Modified: user/ae/bootcode/contrib/gcc/gimplify.c
==============================================================================
--- user/ae/bootcode/contrib/gcc/gimplify.c	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/contrib/gcc/gimplify.c	Tue Jun 26 11:13:58 2012	(r237600)
@@ -1600,9 +1600,7 @@ canonicalize_addr_expr (tree *expr_p)
   /* All checks succeeded.  Build a new node to merge the cast.  */
   *expr_p = build4 (ARRAY_REF, dctype, obj_expr,
 		    TYPE_MIN_VALUE (TYPE_DOMAIN (datype)),
-		    TYPE_MIN_VALUE (TYPE_DOMAIN (datype)),
-		    size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UNIT (dctype),
-				size_int (TYPE_ALIGN_UNIT (dctype))));
+		    NULL_TREE, NULL_TREE);
   *expr_p = build1 (ADDR_EXPR, ctype, *expr_p);
 }
 

Modified: user/ae/bootcode/contrib/gcc/tree-ssa-ccp.c
==============================================================================
--- user/ae/bootcode/contrib/gcc/tree-ssa-ccp.c	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/contrib/gcc/tree-ssa-ccp.c	Tue Jun 26 11:13:58 2012	(r237600)
@@ -1621,9 +1621,7 @@ maybe_fold_offset_to_array_ref (tree bas
   if (!integer_zerop (elt_offset))
     idx = int_const_binop (PLUS_EXPR, idx, elt_offset, 0);
 
-  return build4 (ARRAY_REF, orig_type, base, idx, min_idx,
-		 size_int (tree_low_cst (elt_size, 1)
-			   / (TYPE_ALIGN_UNIT (elt_type))));
+  return build4 (ARRAY_REF, orig_type, base, idx, NULL_TREE, NULL_TREE);
 }
 
 

Modified: user/ae/bootcode/contrib/gcc/tree-ssa-pre.c
==============================================================================
--- user/ae/bootcode/contrib/gcc/tree-ssa-pre.c	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/contrib/gcc/tree-ssa-pre.c	Tue Jun 26 11:13:58 2012	(r237600)
@@ -1076,6 +1076,7 @@ phi_translate (tree expr, value_set_t se
 	    tree newexpr;
 	    tree vh = get_value_handle (expr);
 	    bool listchanged = false;
+	    bool invariantarg = false;
 	    VEC (tree, gc) *vuses = VALUE_HANDLE_VUSES (vh);
 	    VEC (tree, gc) *tvuses;
 
@@ -1134,10 +1135,26 @@ phi_translate (tree expr, value_set_t se
 		    if (newval != oldval)
 		      {
 			listchanged = true;
+			invariantarg |= is_gimple_min_invariant (newval);
 			TREE_VALUE (newwalker) = get_value_handle (newval);
 		      }
 		  }
 	      }
+
+	    /* In case of new invariant args we might try to fold the call
+	       again.  */
+	    if (invariantarg)
+	      {
+		tree tmp = fold_ternary (CALL_EXPR, TREE_TYPE (expr),
+					 newop0, newarglist, newop2);
+		if (tmp)
+		  {
+		    STRIP_TYPE_NOPS (tmp);
+		    if (is_gimple_min_invariant (tmp))
+		      return tmp;
+		  }
+	      }
+
 	    if (listchanged)
 	      vn_lookup_or_add (newarglist, NULL);
 

Modified: user/ae/bootcode/crypto/openssh/ssh-keyscan.1
==============================================================================
--- user/ae/bootcode/crypto/openssh/ssh-keyscan.1	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/crypto/openssh/ssh-keyscan.1	Tue Jun 26 11:13:58 2012	(r237600)
@@ -1,4 +1,4 @@
-.\"	$OpenBSD: ssh-keyscan.1,v 1.29 2010/08/31 11:54:45 djm Exp $
+.\"	$OpenBSD: ssh-keyscan.1,v 1.30 2012/04/11 13:34:17 djm Exp $
 .\"	$FreeBSD$
 .\"
 .\" Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
@@ -7,7 +7,7 @@
 .\" permitted provided that due credit is given to the author and the
 .\" OpenBSD project by leaving this copyright notice intact.
 .\"
-.Dd August 31, 2010
+.Dd April 11 2012
 .Dt SSH-KEYSCAN 1
 .Os
 .Sh NAME
@@ -95,8 +95,11 @@ or
 .Dq rsa
 for protocol version 2.
 Multiple values may be specified by separating them with commas.
-The default is
-.Dq rsa .
+The default is to fetch
+.Dq rsa
+and
+.Dq ecdsa
+keys.
 .It Fl v
 Verbose mode.
 Causes

Modified: user/ae/bootcode/crypto/openssh/ssh-keyscan.c
==============================================================================
--- user/ae/bootcode/crypto/openssh/ssh-keyscan.c	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/crypto/openssh/ssh-keyscan.c	Tue Jun 26 11:13:58 2012	(r237600)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.85 2011/03/15 10:36:02 okan Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.86 2012/04/11 13:34:17 djm Exp $ */
 /*
  * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
  *
@@ -57,7 +57,7 @@ int ssh_port = SSH_DEFAULT_PORT;
 #define KT_RSA		4
 #define KT_ECDSA	8
 
-int get_keytypes = KT_RSA;	/* Get only RSA keys by default */
+int get_keytypes = KT_RSA|KT_ECDSA;/* Get RSA and ECDSA keys by default */
 
 int hash_hosts = 0;		/* Hash hostname on output */
 

Modified: user/ae/bootcode/include/wchar.h
==============================================================================
--- user/ae/bootcode/include/wchar.h	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/include/wchar.h	Tue Jun 26 11:13:58 2012	(r237600)
@@ -88,10 +88,8 @@ typedef	__wint_t	wint_t;
 #define	_WINT_T_DECLARED
 #endif
 
-#ifndef	WCHAR_MIN 
-#define	WCHAR_MIN	__INT_MIN
-#define	WCHAR_MAX	__INT_MAX
-#endif
+#define	WCHAR_MIN	__WCHAR_MIN
+#define	WCHAR_MAX	__WCHAR_MAX
 
 #ifndef WEOF
 #define	WEOF 	((wint_t)-1)

Modified: user/ae/bootcode/lib/libc/amd64/sys/Makefile.inc
==============================================================================
--- user/ae/bootcode/lib/libc/amd64/sys/Makefile.inc	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/amd64/sys/Makefile.inc	Tue Jun 26 11:13:58 2012	(r237600)
@@ -1,7 +1,8 @@
 #	from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp
 # $FreeBSD$
 
-SRCS+=	amd64_get_fsbase.c amd64_get_gsbase.c amd64_set_fsbase.c amd64_set_gsbase.c
+SRCS+=	amd64_get_fsbase.c amd64_get_gsbase.c amd64_set_fsbase.c \
+	amd64_set_gsbase.c __vdso_gettc.c
 
 MDASM=	vfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
 	reboot.S sbrk.S setlogin.S sigreturn.S

Copied: user/ae/bootcode/lib/libc/amd64/sys/__vdso_gettc.c (from r237599, head/lib/libc/amd64/sys/__vdso_gettc.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/ae/bootcode/lib/libc/amd64/sys/__vdso_gettc.c	Tue Jun 26 11:13:58 2012	(r237600, copy of r237599, head/lib/libc/amd64/sys/__vdso_gettc.c)
@@ -0,0 +1,49 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <machine/cpufunc.h>
+
+static u_int
+__vdso_gettc_low(const struct vdso_timehands *th)
+{
+	uint32_t rv;
+
+	__asm __volatile("rdtsc; shrd %%cl, %%edx, %0"
+	    : "=a" (rv) : "c" (th->th_x86_shift) : "edx");
+	return (rv);
+}
+
+u_int
+__vdso_gettc(const struct vdso_timehands *th)
+{
+
+	return (th->th_x86_shift > 0 ? __vdso_gettc_low(th) : rdtsc32());
+}

Modified: user/ae/bootcode/lib/libc/gen/aux.c
==============================================================================
--- user/ae/bootcode/lib/libc/gen/aux.c	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/gen/aux.c	Tue Jun 26 11:13:58 2012	(r237600)
@@ -66,6 +66,7 @@ __init_elf_aux_vector(void)
 static pthread_once_t aux_once = PTHREAD_ONCE_INIT;
 static int pagesize, osreldate, canary_len, ncpus, pagesizes_len;
 static char *canary, *pagesizes;
+static void *timekeep;
 
 static void
 init_aux(void)
@@ -101,6 +102,10 @@ init_aux(void)
 		case AT_NCPUS:
 			ncpus = aux->a_un.a_val;
 			break;
+
+		case AT_TIMEKEEP:
+			timekeep = aux->a_un.a_ptr;
+			break;
 		}
 	}
 }
@@ -163,6 +168,16 @@ _elf_aux_info(int aux, void *buf, int bu
 		} else
 			res = EINVAL;
 		break;
+	case AT_TIMEKEEP:
+		if (buflen == sizeof(void *)) {
+			if (timekeep != NULL) {
+				*(void **)buf = timekeep;
+				res = 0;
+			} else
+				res = ENOENT;
+		} else
+			res = EINVAL;
+		break;
 	default:
 		res = ENOENT;
 		break;

Modified: user/ae/bootcode/lib/libc/gen/syslog.c
==============================================================================
--- user/ae/bootcode/lib/libc/gen/syslog.c	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/gen/syslog.c	Tue Jun 26 11:13:58 2012	(r237600)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/un.h>
 #include <netdb.h>
 
-#include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <paths.h>
@@ -414,7 +413,6 @@ void
 closelog(void)
 {
 	THREAD_LOCK();
-	assert(LogFile >= -1);
 	if (LogFile != -1) {
 		(void)_close(LogFile);
 		LogFile = -1;

Modified: user/ae/bootcode/lib/libc/i386/sys/Makefile.inc
==============================================================================
--- user/ae/bootcode/lib/libc/i386/sys/Makefile.inc	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/i386/sys/Makefile.inc	Tue Jun 26 11:13:58 2012	(r237600)
@@ -5,7 +5,8 @@
 SRCS+=	i386_clr_watch.c i386_set_watch.c i386_vm86.c
 .endif
 SRCS+=	i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \
-	i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c
+	i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c \
+	__vdso_gettc.c
 
 MDASM=	Ovfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
 	reboot.S sbrk.S setlogin.S sigreturn.S syscall.S

Copied: user/ae/bootcode/lib/libc/i386/sys/__vdso_gettc.c (from r237599, head/lib/libc/i386/sys/__vdso_gettc.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/ae/bootcode/lib/libc/i386/sys/__vdso_gettc.c	Tue Jun 26 11:13:58 2012	(r237600, copy of r237599, head/lib/libc/i386/sys/__vdso_gettc.c)
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <machine/cpufunc.h>
+
+static u_int
+__vdso_gettc_low(const struct vdso_timehands *th)
+{
+	uint32_t rv;
+
+	__asm __volatile("rdtsc; shrd %%cl, %%edx, %0"
+	    : "=a" (rv) : "c" (th->th_x86_shift) : "edx");
+	return (rv);
+}
+
+#pragma weak __vdso_gettc
+u_int
+__vdso_gettc(const struct vdso_timehands *th)
+{
+
+	return (th->th_x86_shift > 0 ? __vdso_gettc_low(th) : rdtsc32());
+}

Modified: user/ae/bootcode/lib/libc/include/libc_private.h
==============================================================================
--- user/ae/bootcode/lib/libc/include/libc_private.h	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/include/libc_private.h	Tue Jun 26 11:13:58 2012	(r237600)
@@ -34,6 +34,7 @@
 
 #ifndef _LIBC_PRIVATE_H_
 #define _LIBC_PRIVATE_H_
+#include <sys/_types.h>
 #include <sys/_pthreadtypes.h>
 
 /*
@@ -245,6 +246,12 @@ extern void *	__sys_freebsd6_mmap(void *
 /* Without back-compat translation */
 extern int	__sys_fcntl(int, int, ...);
 
+struct timespec;
+struct timeval;
+struct timezone;
+int	__sys_gettimeofday(struct timeval *, struct timezone *);
+int	__sys_clock_gettime(__clockid_t, struct timespec *ts);
+
 /* execve() with PATH processing to implement posix_spawnp() */
 int _execvpe(const char *, char * const *, char * const *);
 

Modified: user/ae/bootcode/lib/libc/net/Makefile.inc
==============================================================================
--- user/ae/bootcode/lib/libc/net/Makefile.inc	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/net/Makefile.inc	Tue Jun 26 11:13:58 2012	(r237600)
@@ -36,7 +36,7 @@ LFLAGS+=-P_nsyy
 
 CLEANFILES+=nslexer.c
 
-nslexer.c: nslexer.l
+nslexer.c: nslexer.l nsparser.h
 	${LEX} ${LFLAGS} -o/dev/stdout ${.IMPSRC} | \
 		sed -e '/YY_BUF_SIZE/s/16384/1024/' >${.TARGET}
 

Modified: user/ae/bootcode/lib/libc/stdlib/Makefile.inc
==============================================================================
--- user/ae/bootcode/lib/libc/stdlib/Makefile.inc	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/stdlib/Makefile.inc	Tue Jun 26 11:13:58 2012	(r237600)
@@ -42,6 +42,7 @@ MLINKS+=rand.3 rand_r.3 rand.3 srand.3 r
 MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \
 	random.3 srandomdev.3
 MLINKS+=radixsort.3 sradixsort.3
+MLINKS+=strfmon.3 strfmon_l.3
 MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3
 MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3
 MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3

Modified: user/ae/bootcode/lib/libc/stdlib/strfmon.3
==============================================================================
--- user/ae/bootcode/lib/libc/stdlib/strfmon.3	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/stdlib/strfmon.3	Tue Jun 26 11:13:58 2012	(r237600)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 12, 2002
+.Dd June 25, 2012
 .Dt STRFMON 3
 .Os
 .Sh NAME
@@ -36,6 +36,8 @@
 .In monetary.h
 .Ft ssize_t
 .Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..."
+.Ft ssize_t
+.Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..."
 .Sh DESCRIPTION
 The
 .Fn strfmon
@@ -47,6 +49,12 @@ No more than
 .Fa maxsize
 bytes are placed into the array.
 .Pp
+The
+.Fn strfmon_l
+function does the same as
+.Fn strfmon
+but takes an explicit locale rather than using the current locale.
+.Pp
 The format string is composed of zero or more directives:
 ordinary characters (not
 .Cm % ) ,
@@ -129,6 +137,11 @@ the contents of the array are indetermin
 and
 .Va errno
 is set to indicate the error.
+.Pp
+The
+.Fn strfmon_l
+function returns the same values as
+.Fn strfmon .
 .Sh ERRORS
 The
 .Fn strfmon
@@ -149,6 +162,10 @@ The
 function
 conforms to
 .St -p1003.1-2001 .
+The
+.Fn strfmon_l
+function conforms to
+.St -p1003.1-2008 .
 .Sh AUTHORS
 .An -nosplit
 The

Modified: user/ae/bootcode/lib/libc/stdtime/Makefile.inc
==============================================================================
--- user/ae/bootcode/lib/libc/stdtime/Makefile.inc	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/stdtime/Makefile.inc	Tue Jun 26 11:13:58 2012	(r237600)
@@ -18,4 +18,6 @@ MLINKS+=ctime.3 asctime.3 ctime.3 diffti
 	ctime.3 localtime.3 ctime.3 mktime.3 ctime.3 timegm.3 \
 	ctime.3 ctime_r.3 ctime.3 localtime_r.3 ctime.3 gmtime_r.3 \
 	ctime.3 asctime_r.3
+MLINKS+=strftime.3 strftime_l.3
+MLINKS+=strptime.3 strptime_l.3
 MLINKS+=time2posix.3 posix2time.3

Modified: user/ae/bootcode/lib/libc/stdtime/strftime.3
==============================================================================
--- user/ae/bootcode/lib/libc/stdtime/strftime.3	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/stdtime/strftime.3	Tue Jun 26 11:13:58 2012	(r237600)
@@ -32,7 +32,7 @@
 .\"     @(#)strftime.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd November 4, 2004
+.Dd June 25, 2012
 .Dt STRFTIME 3
 .Os
 .Sh NAME
@@ -49,6 +49,8 @@
 .Fa "const char * restrict format"
 .Fa "const struct tm * restrict timeptr"
 .Fc
+.Ft size_t
+.Fn strftime_l "char *restrict buf" "size_t maxsize" "const char * restrict format" "const struct tm *restrict timeptr" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn strftime
@@ -58,6 +60,11 @@ into the buffer
 .Fa buf
 according to the string pointed to by
 .Fa format .
+The function
+.Fn strftime_l
+does the same as
+.Fn strftime
+but takes an explicit locale rather than using the current locale.
 .Pp
 The
 .Fa format
@@ -268,6 +275,10 @@ The peculiar week number and year in the
 and
 .Ql \&%V
 are defined in ISO 8601: 1988.
+The
+.Fn strftime_l
+function conforms to
+.St -p1003.1-2008 .
 .Sh BUGS
 There is no conversion specification for the phase of the moon.
 .Pp

Modified: user/ae/bootcode/lib/libc/stdtime/strptime.3
==============================================================================
--- user/ae/bootcode/lib/libc/stdtime/strptime.3	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/stdtime/strptime.3	Tue Jun 26 11:13:58 2012	(r237600)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\" "
-.Dd January 4, 2003
+.Dd June 25, 2012
 .Dt STRPTIME 3
 .Os
 .Sh NAME
@@ -41,6 +41,10 @@
 .Fa "const char * restrict format"
 .Fa "struct tm * restrict timeptr"
 .Fc
+.In time.h
+.In xlocale.h
+.Ft char *
+.Fn strptime_l "const char * restrict buf" "const char * restrict format" "struct tm * restrict timeptr" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn strptime
@@ -53,6 +57,11 @@ and fills in the elements of the structu
 The resulting values will be relative to the local time zone.
 Thus, it can be considered the reverse operation of
 .Xr strftime 3 .
+The
+.Fn strptime_l
+function does the same as
+.Fn strptime ,
+but takes an explicit locale rather than using the current locale.
 .Pp
 The
 .Fa format
@@ -104,6 +113,9 @@ that has not been required to satisfy th
 It returns
 .Dv NULL
 if one of the conversions failed.
+.Fn strptime_l
+returns the same values as
+.Fn strptime .
 .Sh SEE ALSO
 .Xr date 1 ,
 .Xr scanf 3 ,

Modified: user/ae/bootcode/lib/libc/string/Makefile.inc
==============================================================================
--- user/ae/bootcode/lib/libc/string/Makefile.inc	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/string/Makefile.inc	Tue Jun 26 11:13:58 2012	(r237600)
@@ -42,10 +42,13 @@ MLINKS+=ffs.3 ffsl.3 \
 	ffs.3 flsll.3
 MLINKS+=index.3 rindex.3
 MLINKS+=memchr.3 memrchr.3
-MLINKS+=strcasecmp.3 strncasecmp.3
+MLINKS+=strcasecmp.3 strncasecmp.3 \
+	strcasecmp.3 strcasecmp_l.3 \
+	strcasecmp.3 strncasecmp_l.3
 MLINKS+=strcat.3 strncat.3
 MLINKS+=strchr.3 strrchr.3
 MLINKS+=strcmp.3 strncmp.3
+MLINKS+=strcoll.3 strcoll_l.3
 MLINKS+=strcpy.3 stpcpy.3 \
 	strcpy.3 stpncpy.3 \
 	strcpy.3 strncpy.3
@@ -57,8 +60,10 @@ MLINKS+=strerror.3 perror.3 \
 MLINKS+=strlcpy.3 strlcat.3
 MLINKS+=strlen.3 strnlen.3
 MLINKS+=strstr.3 strcasestr.3 \
-	strstr.3 strnstr.3
+	strstr.3 strnstr.3 \
+	strstr.3 strcasestr_l.3
 MLINKS+=strtok.3 strtok_r.3
+MLINKS+=strxfrm.3 strxfrm_l.3
 MLINKS+=wmemchr.3 wcpcpy.3 \
 	wmemchr.3 wcpncpy.3 \
 	wmemchr.3 wcscasecmp.3 \

Modified: user/ae/bootcode/lib/libc/sys/Makefile.inc
==============================================================================
--- user/ae/bootcode/lib/libc/sys/Makefile.inc	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libc/sys/Makefile.inc	Tue Jun 26 11:13:58 2012	(r237600)
@@ -15,6 +15,10 @@
 #
 .sinclude "${.CURDIR}/${LIBC_ARCH}/sys/Makefile.inc"
 
+SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c
+NOASM+=  clock_gettime.o gettimeofday.o
+PSEUDO+= _clock_gettime.o _gettimeofday.o
+
 # Sources common to both syscall interfaces:
 SRCS+=	stack_protector.c stack_protector_compat.c __error.c
 .if !defined(WITHOUT_SYSCALL_COMPAT)

Copied: user/ae/bootcode/lib/libc/sys/__vdso_gettimeofday.c (from r237599, head/lib/libc/sys/__vdso_gettimeofday.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/ae/bootcode/lib/libc/sys/__vdso_gettimeofday.c	Tue Jun 26 11:13:58 2012	(r237600, copy of r237599, head/lib/libc/sys/__vdso_gettimeofday.c)
@@ -0,0 +1,142 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/elf.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <errno.h>
+#include <time.h>
+#include <machine/atomic.h>
+#include "libc_private.h"
+
+static u_int
+tc_delta(const struct vdso_timehands *th)
+{
+
+	return ((__vdso_gettc(th) - th->th_offset_count) &
+	    th->th_counter_mask);
+}
+
+static int
+binuptime(struct bintime *bt, struct vdso_timekeep *tk, int abs)
+{
+	struct vdso_timehands *th;
+	uint32_t curr, gen;
+
+	do {
+		if (!tk->tk_enabled)
+			return (ENOSYS);
+
+		/*
+		 * XXXKIB. The load of tk->tk_current should use
+		 * atomic_load_acq_32 to provide load barrier. But
+		 * since tk points to r/o mapped page, x86
+		 * implementation of atomic_load_acq faults.
+		 */
+		curr = tk->tk_current;
+		rmb();
+		th = &tk->tk_th[curr];
+		if (th->th_algo != VDSO_TH_ALGO_1)
+			return (ENOSYS);
+		gen = th->th_gen;
+		*bt = th->th_offset;
+		bintime_addx(bt, th->th_scale * tc_delta(th));
+		if (abs)
+			bintime_add(bt, &th->th_boottime);
+
+		/*
+		 * Barrier for load of both tk->tk_current and th->th_gen.
+		 */
+		rmb();
+	} while (curr != tk->tk_current || gen == 0 || gen != th->th_gen);
+	return (0);
+}
+
+static struct vdso_timekeep *tk;
+
+int
+__vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+	struct bintime bt;
+	int error;
+
+	if (tz != NULL)
+		return (ENOSYS);
+	if (tk == NULL) {
+		error = _elf_aux_info(AT_TIMEKEEP, &tk, sizeof(tk));
+		if (error != 0 || tk == NULL)
+			return (ENOSYS);
+	}
+	if (tk->tk_ver != VDSO_TK_VER_CURR)
+		return (ENOSYS);
+	error = binuptime(&bt, tk, 1);
+	if (error != 0)
+		return (error);
+	bintime2timeval(&bt, tv);
+	return (0);
+}
+
+int
+__vdso_clock_gettime(clockid_t clock_id, struct timespec *ts)
+{
+	struct bintime bt;
+	int abs, error;
+
+	if (tk == NULL) {
+		error = _elf_aux_info(AT_TIMEKEEP, &tk, sizeof(tk));
+		if (error != 0 || tk == NULL)
+			return (ENOSYS);
+	}
+	if (tk->tk_ver != VDSO_TK_VER_CURR)
+		return (ENOSYS);
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+	case CLOCK_REALTIME_PRECISE:
+	case CLOCK_REALTIME_FAST:
+	case CLOCK_SECOND:
+		abs = 1;
+		break;
+	case CLOCK_MONOTONIC:
+	case CLOCK_MONOTONIC_PRECISE:
+	case CLOCK_MONOTONIC_FAST:
+	case CLOCK_UPTIME:
+	case CLOCK_UPTIME_PRECISE:
+	case CLOCK_UPTIME_FAST:
+		abs = 0;
+		break;
+	default:
+		return (ENOSYS);
+	}
+	error = binuptime(&bt, tk, abs);
+	if (error != 0)
+		return (error);
+	bintime2timespec(&bt, ts);
+	if (clock_id == CLOCK_SECOND)
+		ts->tv_nsec = 0;
+	return (0);
+}

Copied: user/ae/bootcode/lib/libc/sys/clock_gettime.c (from r237599, head/lib/libc/sys/clock_gettime.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/ae/bootcode/lib/libc/sys/clock_gettime.c	Tue Jun 26 11:13:58 2012	(r237600, copy of r237599, head/lib/libc/sys/clock_gettime.c)
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/syscall.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <errno.h>
+#include <time.h>
+#include "libc_private.h"
+
+int __clock_gettime(clockid_t, struct timespec *ts);
+
+__weak_reference(__clock_gettime, clock_gettime);
+
+int
+__clock_gettime(clockid_t clock_id, struct timespec *ts)
+{
+	int error;
+
+	if (__vdso_clock_gettime != NULL && __vdso_gettc != NULL)
+		error = __vdso_clock_gettime(clock_id, ts);
+	else
+		error = ENOSYS;
+	if (error == ENOSYS)
+		error = __sys_clock_gettime(clock_id, ts);
+	return (error);
+}

Copied: user/ae/bootcode/lib/libc/sys/gettimeofday.c (from r237599, head/lib/libc/sys/gettimeofday.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/ae/bootcode/lib/libc/sys/gettimeofday.c	Tue Jun 26 11:13:58 2012	(r237600, copy of r237599, head/lib/libc/sys/gettimeofday.c)
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/syscall.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <errno.h>
+#include "libc_private.h"
+
+int __gettimeofday(struct timeval *tv, struct timezone *tz);
+
+__weak_reference(__gettimeofday, gettimeofday);
+
+int
+__gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+	int error;
+
+	if (__vdso_gettimeofday != NULL && __vdso_gettc != NULL)
+		error = __vdso_gettimeofday(tv, tz);
+	else
+		error = ENOSYS;
+	if (error == ENOSYS)
+		error = __sys_gettimeofday(tv, tz);
+	return (error);
+}

Modified: user/ae/bootcode/lib/libedit/common.c
==============================================================================
--- user/ae/bootcode/lib/libedit/common.c	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libedit/common.c	Tue Jun 26 11:13:58 2012	(r237600)
@@ -905,7 +905,7 @@ ed_command(EditLine *el, int c __unused)
 	int tmplen;
 
 	tmplen = c_gets(el, tmpbuf, "\n: ");
-	term__putc('\n');
+	term__putc(el, '\n');
 
 	if (tmplen < 0 || (tmpbuf[tmplen] = 0, parse_line(el, tmpbuf)) == -1)
 		term_beep(el);

Modified: user/ae/bootcode/lib/libedit/editline.3
==============================================================================
--- user/ae/bootcode/lib/libedit/editline.3	Tue Jun 26 11:01:12 2012	(r237599)
+++ user/ae/bootcode/lib/libedit/editline.3	Tue Jun 26 11:13:58 2012	(r237600)
@@ -1,4 +1,4 @@
-.\"	$NetBSD: editline.3,v 1.55 2007/01/12 16:31:13 christos Exp $
+.\"	$NetBSD: editline.3,v 1.70 2009/07/05 21:55:24 perry Exp $
 .\"
 .\" Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 12, 2007
+.Dd July 5, 2009
 .Dt EDITLINE 3
 .Os
 .Sh NAME
@@ -162,6 +162,14 @@ is modified to contain the number of cha
 Returns the line read if successful, or
 .Dv NULL
 if no characters were read or if an error occurred.
+If an error occurred,
+.Fa count
+is set to \-1 and
+.Dv errno
+contains the error code that caused it.
+The return value may not remain valid across calls to
+.Fn el_gets
+and must be copied if the data is to be retained.
 .It Fn el_getc
 Read a character from the tty.
 .Fa ch
@@ -222,10 +230,30 @@ are supported, along with the required a
 Define prompt printing function as
 .Fa f ,
 which is to return a string that contains the prompt.
+.It Dv EL_PROMPT_ESC , Fa "char *(*f)(EditLine *)" , Fa "char c"
+Same as
+.Dv EL_PROMPT ,
+but the
+.Fa c
+argument indicates the start/stop literal prompt character.
+.Pp
+If a start/stop literal character is found in the prompt, the
+character itself
+is not printed, but characters after it are printed directly to the
+terminal without affecting the state of the current line.
+A subsequent second start/stop literal character ends this behavior.
+This is typically used to embed literal escape sequences that change the
+color/style of the terminal in the prompt.
+.Dv 0
+unsets it.
+.It Dv EL_REFRESH
+Re-display the current line on the next terminal line.
 .It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
 Define right side prompt printing function as
 .Fa f ,
 which is to return a string that contains the prompt.
+.It Dv EL_RPROMPT_ESC , Fa "char *(*f)(EditLine *)" , Fa "char c"
+Define the right prompt printing function but with a literal escape character.
 .It Dv EL_TERMINAL , Fa "const char *type"
 Define terminal type of the tty to be
 .Fa type ,
@@ -259,66 +287,43 @@ reading command input:
 and
 .Dv SIGWINCH .
 Otherwise, the current signal handlers will be used.
-.It Dv EL_BIND , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_BIND , Fa "const char *" , Fa "..." , Dv NULL
 Perform the
 .Ic bind
 builtin command.
 Refer to
 .Xr editrc 5
 for more information.
-.It Dv EL_ECHOTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_ECHOTC , Fa "const char *" , Fa "..." , Dv NULL
 Perform the
 .Ic echotc
 builtin command.
 Refer to
 .Xr editrc 5
 for more information.
-.It Dv EL_SETTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_SETTC , Fa "const char *" , Fa "..." , Dv NULL
 Perform the
 .Ic settc
 builtin command.
 Refer to
 .Xr editrc 5
 for more information.
-.It Dv EL_SETTY , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_SETTY , Fa "const char *" , Fa "..." , Dv NULL
 Perform the
 .Ic setty
 builtin command.
 Refer to
 .Xr editrc 5
 for more information.
-.It Dv EL_TELLTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_TELLTC , Fa "const char *" , Fa "..." , Dv NULL
 Perform the
 .Ic telltc

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206261113.q5QBDxJn036855>