changeset 359:9a6b535841da

Update to FreeBSD-HEAD @232391
author ray@terran.dlink.ua
date Fri, 02 Mar 2012 16:56:02 +0200
parents aeeb5a674d34
children a9e795a22198
files head/lib/clang/Makefile head/lib/clang/libllvmanalysis/Makefile head/lib/clang/libllvmipa/Makefile head/lib/clang/libllvmipo/Makefile head/lib/clang/libllvmmc/Makefile head/lib/clang/libllvmscalaropts/Makefile head/lib/clang/libllvmsupport/Makefile head/lib/clang/libllvmtransformutils/Makefile head/lib/clang/libllvmx86disassembler/Makefile head/lib/libarchive/Makefile head/lib/libarchive/config_freebsd.h head/lib/libarchive/test/Makefile head/lib/libc/amd64/gen/getcontextx.c head/lib/libc/arm/gen/Makefile.inc head/lib/libc/arm/gen/getcontextx.c head/lib/libc/db/man/hash.3 head/lib/libc/gen/arc4random.3 head/lib/libc/gen/aux.c head/lib/libc/gen/directory.3 head/lib/libc/gen/dlfcn.c head/lib/libc/gen/fmtmsg.c head/lib/libc/gen/fts.c head/lib/libc/gen/getgrouplist.3 head/lib/libc/gen/getutxent.3 head/lib/libc/gen/getutxent.c head/lib/libc/gen/opendir.c head/lib/libc/gen/sem.c head/lib/libc/gen/sem_new.c head/lib/libc/gen/sysctl.3 head/lib/libc/i386/gen/getcontextx.c head/lib/libc/ia64/gen/getcontextx.c head/lib/libc/include/libc_private.h head/lib/libc/locale/Symbol.map head/lib/libc/locale/btowc.3 head/lib/libc/locale/setrunelocale.c head/lib/libc/locale/table.c head/lib/libc/locale/xlocale.c head/lib/libc/locale/xlocale_private.h head/lib/libc/mips/gen/getcontextx.c head/lib/libc/net/eui64.3 head/lib/libc/net/getifaddrs.c head/lib/libc/net/nsdispatch.3 head/lib/libc/powerpc/SYS.h head/lib/libc/powerpc/gen/getcontextx.c head/lib/libc/powerpc/gen/setjmp.S head/lib/libc/powerpc64/SYS.h head/lib/libc/powerpc64/gen/getcontextx.c head/lib/libc/powerpc64/gen/setjmp.S head/lib/libc/rpc/Makefile.inc head/lib/libc/rpc/rpc.3 head/lib/libc/rpc/rpc_clnt_create.3 head/lib/libc/sparc64/gen/getcontextx.c head/lib/libc/string/strerror.3 head/lib/libc/sys/cap_enter.2 head/lib/libc/sys/getdirentries.2 head/lib/libc/sys/getsockopt.2 head/lib/libc/sys/jail.2 head/lib/libc/sys/kqueue.2 head/lib/libc/sys/nfssvc.2 head/lib/libc/sys/pdfork.2 head/lib/libc/sys/posix_fadvise.2 head/lib/libc/sys/posix_fallocate.2 head/lib/libc/sys/ptrace.2 head/lib/libc/uuid/uuid.3 head/lib/libc/yp/Makefile.inc head/lib/libcam/cam.3 head/lib/libcam/cam_cdbparse.3 head/lib/libdevstat/devstat.3 head/lib/libipsec/pfkey.c head/lib/libjail/jail.c head/lib/libkvm/kvm_proc.c head/lib/libmemstat/libmemstat.3 head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.3 head/lib/libpmc/pmc.atom.3 head/lib/libpmc/pmc.core.3 head/lib/libpmc/pmc.core2.3 head/lib/libpmc/pmc.corei7.3 head/lib/libpmc/pmc.corei7uc.3 head/lib/libpmc/pmc.iaf.3 head/lib/libpmc/pmc.k7.3 head/lib/libpmc/pmc.k8.3 head/lib/libpmc/pmc.mips.3 head/lib/libpmc/pmc.p4.3 head/lib/libpmc/pmc.p5.3 head/lib/libpmc/pmc.p6.3 head/lib/libpmc/pmc.tsc.3 head/lib/libpmc/pmc.ucf.3 head/lib/libpmc/pmc.westmere.3 head/lib/libpmc/pmc.westmereuc.3 head/lib/libpmc/pmc.xscale.3 head/lib/libpmc/pmc_allocate.3 head/lib/libpmc/pmc_attach.3 head/lib/libpmc/pmc_capabilities.3 head/lib/libpmc/pmc_configure_logfile.3 head/lib/libpmc/pmc_disable.3 head/lib/libpmc/pmc_event_names_of_class.3 head/lib/libpmc/pmc_get_driver_stats.3 head/lib/libpmc/pmc_get_msr.3 head/lib/libpmc/pmc_init.3 head/lib/libpmc/pmc_name_of_capability.3 head/lib/libpmc/pmc_read.3 head/lib/libpmc/pmc_set.3 head/lib/libpmc/pmc_start.3 head/lib/libpmc/pmclog.3 head/lib/libprocstat/common_kvm.c head/lib/libradius/libradius.3 head/lib/librpcsvc/Makefile head/lib/libsm/Makefile head/lib/libthr/arch/arm/arm/pthread_md.c head/lib/libthr/arch/arm/include/pthread_md.h head/lib/libthr/arch/mips/include/pthread_md.h head/lib/libthr/arch/mips/mips/pthread_md.c head/lib/libthr/thread/thr_list.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_rwlock.c head/lib/libthr/thread/thr_umtx.c head/lib/libthr/thread/thr_umtx.h head/lib/libthread_db/Makefile head/lib/libusb/libusb.3 head/lib/libutil/kinfo_getproc.3 head/lib/libutil/login_class.c head/lib/libutil/pidfile.3 head/lib/libutil/pidfile.c head/lib/libutil/pw_util.c head/lib/libvgl/vgl.3 head/lib/libypclnt/Makefile head/lib/libz/Makefile
diffstat 129 files changed, 1930 insertions(+), 1441 deletions(-) [+]
line wrap: on
line diff
--- a/head/lib/clang/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD: head/lib/clang/Makefile 226633 2011-10-22 14:08:43Z dim $
+# $FreeBSD: head/lib/clang/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 .if !make(install)
 SUBDIR=	libclanganalysis \
@@ -60,6 +62,19 @@
 	libllvmx86info \
 	libllvmx86instprinter \
 	libllvmx86utils
+
+.if ${MK_CLANG_EXTRAS} != "no"
+SUBDIR+=libllvmarchive \
+	libllvmdebuginfo \
+	libllvmexecutionengine \
+	libllvminterpreter \
+	libllvmjit \
+	libllvmlinker \
+	libllvmmcdisassembler \
+	libllvmmcjit \
+	libllvmobject \
+	libllvmruntimedyld
+.endif
 .endif
 
 SUBDIR+= include
--- a/head/lib/clang/libllvmanalysis/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/libllvmanalysis/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD: head/lib/clang/libllvmanalysis/Makefile 224145 2011-07-17 19:51:40Z dim $
+# $FreeBSD: head/lib/clang/libllvmanalysis/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 LIB=	llvmanalysis
 
@@ -55,6 +57,14 @@
 	TypeBasedAliasAnalysis.cpp \
 	ValueTracking.cpp
 
+.if ${MK_CLANG_EXTRAS} != "no"
+SRCS+=	BlockFrequencyInfo.cpp \
+	LibCallSemantics.cpp \
+	PathNumbering.cpp \
+	PathProfileInfo.cpp \
+	PathProfileVerifier.cpp
+.endif
+
 TGHDRS=	Intrinsics
 
 .include "../clang.lib.mk"
--- a/head/lib/clang/libllvmipa/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/libllvmipa/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD$
+# $FreeBSD: head/lib/clang/libllvmipa/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 LIB=	llvmipa
 
@@ -8,6 +10,10 @@
 	FindUsedTypes.cpp \
 	GlobalsModRef.cpp
 
+.if ${MK_CLANG_EXTRAS} != "no"
+SRCS+=	IPA.cpp
+.endif
+
 TGHDRS=	Intrinsics
 
 .include "../clang.lib.mk"
--- a/head/lib/clang/libllvmipo/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/libllvmipo/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD: head/lib/clang/libllvmipo/Makefile 226633 2011-10-22 14:08:43Z dim $
+# $FreeBSD: head/lib/clang/libllvmipo/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 LIB=	llvmipo
 
@@ -23,6 +25,10 @@
 	StripDeadPrototypes.cpp \
 	StripSymbols.cpp
 
+.if ${MK_CLANG_EXTRAS} != "no"
+SRCS+=	IPO.cpp
+.endif
+
 TGHDRS=	Intrinsics
 
 .include "../clang.lib.mk"
--- a/head/lib/clang/libllvmmc/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/libllvmmc/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD: head/lib/clang/libllvmmc/Makefile 226633 2011-10-22 14:08:43Z dim $
+# $FreeBSD: head/lib/clang/libllvmmc/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 LIB=	llvmmc
 
@@ -43,4 +45,8 @@
 	WinCOFFObjectWriter.cpp \
 	WinCOFFStreamer.cpp
 
+.if ${MK_CLANG_EXTRAS} != "no"
+SRCS+=	MCDisassembler.cpp
+.endif
+
 .include "../clang.lib.mk"
--- a/head/lib/clang/libllvmscalaropts/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/libllvmscalaropts/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD: head/lib/clang/libllvmscalaropts/Makefile 226633 2011-10-22 14:08:43Z dim $
+# $FreeBSD: head/lib/clang/libllvmscalaropts/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 LIB=	llvmscalaropts
 
@@ -31,6 +33,13 @@
 	Sink.cpp \
 	TailRecursionElimination.cpp
 
+.if ${MK_CLANG_EXTRAS} != "no"
+SRCS+=	LoopInstSimplify.cpp \
+	LowerAtomic.cpp \
+	Reg2Mem.cpp \
+	Scalar.cpp
+.endif
+
 TGHDRS=	Intrinsics
 
 .include "../clang.lib.mk"
--- a/head/lib/clang/libllvmsupport/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/libllvmsupport/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD: head/lib/clang/libllvmsupport/Makefile 224145 2011-07-17 19:51:40Z dim $
+# $FreeBSD: head/lib/clang/libllvmsupport/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 LIB=	llvmsupport
 
@@ -67,4 +69,14 @@
 	system_error.cpp
 LLVM_REQUIRES_RTTI=
 
+.if ${MK_CLANG_EXTRAS} != "no"
+SRCS+=	BlockFrequency.cpp \
+	BranchProbability.cpp \
+	DataExtractor.cpp \
+	Disassembler.cpp \
+	FileUtilities.cpp \
+	MemoryObject.cpp \
+	SystemUtils.cpp
+.endif
+
 .include "../clang.lib.mk"
--- a/head/lib/clang/libllvmtransformutils/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/libllvmtransformutils/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD: head/lib/clang/libllvmtransformutils/Makefile 226633 2011-10-22 14:08:43Z dim $
+# $FreeBSD: head/lib/clang/libllvmtransformutils/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 LIB=	llvmtransformutils
 
@@ -29,6 +31,11 @@
 	UnifyFunctionExitNodes.cpp \
 	ValueMapper.cpp
 
+.if ${MK_CLANG_EXTRAS} != "no"
+SRCS+=	SimplifyInstructions.cpp \
+	Utils.cpp
+.endif
+
 TGHDRS=	Intrinsics
 
 .include "../clang.lib.mk"
--- a/head/lib/clang/libllvmx86disassembler/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/clang/libllvmx86disassembler/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,6 @@
-# $FreeBSD: head/lib/clang/libllvmx86disassembler/Makefile 226633 2011-10-22 14:08:43Z dim $
+# $FreeBSD: head/lib/clang/libllvmx86disassembler/Makefile 231057 2012-02-05 23:56:22Z dim $
+
+.include <bsd.own.mk>
 
 LIB=	llvmx86disassembler
 
@@ -6,6 +8,10 @@
 INCDIR=	lib/Target/X86
 SRCS=	X86Disassembler.cpp
 
+.if ${MK_CLANG_EXTRAS} != "no"
+SRCS+=	X86DisassemblerDecoder.c
+.endif
+
 TGHDRS=	X86GenDisassemblerTables \
 	X86GenEDInfo \
 	X86GenInstrInfo \
--- a/head/lib/libarchive/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libarchive/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,4 @@
-# $FreeBSD: head/lib/libarchive/Makefile 228797 2011-12-22 08:42:07Z mm $
+# $FreeBSD: head/lib/libarchive/Makefile 232153 2012-02-25 10:58:02Z mm $
 .include <bsd.own.mk>
 
 LIBARCHIVEDIR=	${.CURDIR}/../../contrib/libarchive
@@ -20,7 +20,7 @@
 
 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
 # It has no real relation to the libarchive version number.
-SHLIB_MAJOR= 5
+SHLIB_MAJOR= 6
 
 CFLAGS+=	-DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
 CFLAGS+=	-I${.OBJDIR}
@@ -34,44 +34,68 @@
 LDADD+=	-lmd
 .endif
 
+.if ${MK_ICONV} != "no"
+CFLAGS+=	-DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const
+.endif
+
+.if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \
+	${MACHINE_ARCH:Msparc64*} != "" || ${MACHINE_ARCH:Mia64*} != ""
+NO_WCAST_ALIGN=	yes
+.if ${MACHINE_ARCH:M*64*} == ""
+CFLAGS+=	-DPPMD_32BIT
+.endif
+.endif
+
 .PATH: ${LIBARCHIVEDIR}/libarchive
 
 # Headers to be installed in /usr/include
 INCS=	archive.h archive_entry.h
 
 # Sources to be compiled.
-SRCS=	archive_check_magic.c				\
+SRCS=	archive_acl.c					\
+	archive_check_magic.c				\
+	archive_crypto.c				\
 	archive_entry.c					\
 	archive_entry_copy_stat.c			\
+	archive_entry_link_resolver.c			\
+	archive_entry_sparse.c				\
 	archive_entry_stat.c				\
 	archive_entry_strmode.c				\
-	archive_entry_link_resolver.c			\
 	archive_entry_xattr.c				\
+	archive_options.c				\
+	archive_ppmd7.c					\
+	archive_rb.c					\
 	archive_read.c					\
 	archive_read_data_into_fd.c			\
-	archive_read_disk.c				\
 	archive_read_disk_entry_from_file.c		\
+	archive_read_disk_posix.c			\
 	archive_read_disk_set_standard_lookup.c		\
 	archive_read_extract.c				\
 	archive_read_open_fd.c				\
 	archive_read_open_file.c			\
 	archive_read_open_filename.c			\
 	archive_read_open_memory.c			\
-	archive_read_support_compression_all.c		\
-	archive_read_support_compression_bzip2.c	\
-	archive_read_support_compression_compress.c	\
-	archive_read_support_compression_gzip.c		\
-	archive_read_support_compression_none.c		\
-	archive_read_support_compression_program.c	\
-	archive_read_support_compression_rpm.c		\
-	archive_read_support_compression_uu.c		\
-	archive_read_support_compression_xz.c		\
+	archive_read_set_options.c			\
+	archive_read_support_filter_all.c		\
+	archive_read_support_filter_bzip2.c		\
+	archive_read_support_filter_compress.c		\
+	archive_read_support_filter_gzip.c		\
+	archive_read_support_filter_none.c		\
+	archive_read_support_filter_program.c		\
+	archive_read_support_filter_rpm.c		\
+	archive_read_support_filter_uu.c		\
+	archive_read_support_filter_xz.c		\
+	archive_read_support_format_7zip.c		\
 	archive_read_support_format_all.c		\
 	archive_read_support_format_ar.c		\
+	archive_read_support_format_by_code.c		\
+	archive_read_support_format_cab.c		\
 	archive_read_support_format_cpio.c		\
 	archive_read_support_format_empty.c		\
 	archive_read_support_format_iso9660.c		\
+	archive_read_support_format_lha.c		\
 	archive_read_support_format_mtree.c		\
+	archive_read_support_format_rar.c		\
 	archive_read_support_format_raw.c		\
 	archive_read_support_format_tar.c		\
 	archive_read_support_format_xar.c		\
@@ -81,150 +105,231 @@
 	archive_util.c					\
 	archive_virtual.c				\
 	archive_write.c					\
-	archive_write_disk.c				\
 	archive_write_disk_set_standard_lookup.c	\
+	archive_write_disk_posix.c			\
 	archive_write_open_fd.c				\
 	archive_write_open_file.c			\
 	archive_write_open_filename.c			\
 	archive_write_open_memory.c			\
-	archive_write_set_compression_bzip2.c		\
-	archive_write_set_compression_compress.c	\
-	archive_write_set_compression_gzip.c		\
-	archive_write_set_compression_none.c		\
-	archive_write_set_compression_program.c		\
-	archive_write_set_compression_xz.c		\
+	archive_write_add_filter_bzip2.c		\
+	archive_write_add_filter_compress.c		\
+	archive_write_add_filter_gzip.c			\
+	archive_write_add_filter_none.c			\
+	archive_write_add_filter_program.c		\
+	archive_write_add_filter_xz.c			\
 	archive_write_set_format.c			\
+	archive_write_set_format_7zip.c			\
 	archive_write_set_format_ar.c			\
 	archive_write_set_format_by_name.c		\
 	archive_write_set_format_cpio.c			\
 	archive_write_set_format_cpio_newc.c		\
+	archive_write_set_format_gnutar.c		\
+	archive_write_set_format_iso9660.c		\
 	archive_write_set_format_mtree.c		\
 	archive_write_set_format_pax.c			\
 	archive_write_set_format_shar.c			\
 	archive_write_set_format_ustar.c		\
+	archive_write_set_format_xar.c			\
 	archive_write_set_format_zip.c			\
+	archive_write_set_options.c			\
 	filter_fork.c
 
 # Man pages to be installed.
 MAN=	archive_entry.3					\
+	archive_entry_acl.3				\
+	archive_entry_linkify.3				\
+	archive_entry_paths.3				\
+	archive_entry_perms.3				\
+	archive_entry_stat.3				\
+	archive_entry_time.3				\
 	archive_read.3					\
+	archive_read_data.3				\
 	archive_read_disk.3				\
+	archive_read_extract.3				\
+	archive_read_filter.3				\
+	archive_read_format.3				\
+	archive_read_free.3				\
+	archive_read_header.3				\
+	archive_read_new.3				\
+	archive_read_open.3				\
+	archive_read_set_options.3			\
 	archive_util.3					\
 	archive_write.3					\
+	archive_write_blocksize.3			\
+	archive_write_data.3				\
 	archive_write_disk.3				\
+	archive_write_filter.3				\
+	archive_write_finish_entry.3			\
+	archive_write_format.3				\
+	archive_write_free.3				\
+	archive_write_header.3				\
+	archive_write_new.3				\
+	archive_write_open.3				\
+	archive_write_set_options.3			\
 	cpio.5						\
 	libarchive.3					\
+	libarchive_internals.3				\
 	libarchive-formats.5				\
 	tar.5
 
 # Symlink the man pages under each function name.
-MLINKS+=	archive_entry.3 archive_entry_acl_add_entry.3
-MLINKS+=	archive_entry.3 archive_entry_acl_add_entry_w.3
-MLINKS+=	archive_entry.3 archive_entry_acl_clear.3
-MLINKS+=	archive_entry.3 archive_entry_acl_count.3
-MLINKS+=	archive_entry.3 archive_entry_acl_next.3
-MLINKS+=	archive_entry.3 archive_entry_acl_next_w.3
-MLINKS+=	archive_entry.3 archive_entry_acl_reset.3
-MLINKS+=	archive_entry.3 archive_entry_acl_text_w.3
 MLINKS+=	archive_entry.3 archive_entry_clear.3
 MLINKS+=	archive_entry.3 archive_entry_clone.3
-MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text.3
-MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
-MLINKS+=	archive_entry.3 archive_entry_copy_gname.3
-MLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
-MLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
-MLINKS+=	archive_entry.3 archive_entry_copy_link.3
-MLINKS+=	archive_entry.3 archive_entry_copy_link_w.3
-MLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
-MLINKS+=	archive_entry.3 archive_entry_copy_stat.3
-MLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
-MLINKS+=	archive_entry.3 archive_entry_copy_uname.3
-MLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
-MLINKS+=	archive_entry.3 archive_entry_dev.3
-MLINKS+=	archive_entry.3 archive_entry_devmajor.3
-MLINKS+=	archive_entry.3 archive_entry_devminor.3
-MLINKS+=	archive_entry.3 archive_entry_filetype.3
-MLINKS+=	archive_entry.3 archive_entry_fflags.3
-MLINKS+=	archive_entry.3 archive_entry_fflags_text.3
 MLINKS+=	archive_entry.3 archive_entry_free.3
-MLINKS+=	archive_entry.3 archive_entry_gid.3
-MLINKS+=	archive_entry.3 archive_entry_gname.3
-MLINKS+=	archive_entry.3 archive_entry_gname_w.3
-MLINKS+=	archive_entry.3 archive_entry_hardlink.3
-MLINKS+=	archive_entry.3 archive_entry_ino.3
-MLINKS+=	archive_entry.3 archive_entry_mode.3
-MLINKS+=	archive_entry.3 archive_entry_mtime.3
-MLINKS+=	archive_entry.3 archive_entry_mtime_nsec.3
-MLINKS+=	archive_entry.3 archive_entry_nlink.3
 MLINKS+=	archive_entry.3 archive_entry_new.3
-MLINKS+=	archive_entry.3 archive_entry_pathname.3
-MLINKS+=	archive_entry.3 archive_entry_pathname_w.3
-MLINKS+=	archive_entry.3 archive_entry_rdev.3
-MLINKS+=	archive_entry.3 archive_entry_rdevmajor.3
-MLINKS+=	archive_entry.3 archive_entry_rdevminor.3
-MLINKS+=	archive_entry.3 archive_entry_set_atime.3
-MLINKS+=	archive_entry.3 archive_entry_set_ctime.3
-MLINKS+=	archive_entry.3 archive_entry_set_dev.3
-MLINKS+=	archive_entry.3 archive_entry_set_devmajor.3
-MLINKS+=	archive_entry.3 archive_entry_set_devminor.3
-MLINKS+=	archive_entry.3 archive_entry_set_fflags.3
-MLINKS+=	archive_entry.3 archive_entry_set_gid.3
-MLINKS+=	archive_entry.3 archive_entry_set_gname.3
-MLINKS+=	archive_entry.3 archive_entry_set_hardlink.3
-MLINKS+=	archive_entry.3 archive_entry_set_link.3
-MLINKS+=	archive_entry.3 archive_entry_set_mode.3
-MLINKS+=	archive_entry.3 archive_entry_set_mtime.3
-MLINKS+=	archive_entry.3 archive_entry_set_nlink.3
-MLINKS+=	archive_entry.3 archive_entry_set_pathname.3
-MLINKS+=	archive_entry.3 archive_entry_set_rdev.3
-MLINKS+=	archive_entry.3 archive_entry_set_rdevmajor.3
-MLINKS+=	archive_entry.3 archive_entry_set_rdevminor.3
-MLINKS+=	archive_entry.3 archive_entry_set_size.3
-MLINKS+=	archive_entry.3 archive_entry_set_symlink.3
-MLINKS+=	archive_entry.3 archive_entry_set_uid.3
-MLINKS+=	archive_entry.3 archive_entry_set_uname.3
-MLINKS+=	archive_entry.3 archive_entry_size.3
-MLINKS+=	archive_entry.3 archive_entry_stat.3
-MLINKS+=	archive_entry.3 archive_entry_symlink.3
-MLINKS+=	archive_entry.3 archive_entry_uid.3
-MLINKS+=	archive_entry.3 archive_entry_uname.3
-MLINKS+=	archive_entry.3 archive_entry_uname_w.3
-MLINKS+=	archive_read.3 archive_read_data.3
-MLINKS+=	archive_read.3 archive_read_data_block.3
-MLINKS+=	archive_read.3 archive_read_data_into_buffer.3
-MLINKS+=	archive_read.3 archive_read_data_into_fd.3
-MLINKS+=	archive_read.3 archive_read_data_skip.3
-MLINKS+=	archive_read.3 archive_read_extract.3
-MLINKS+=	archive_read.3 archive_read_extract_set_progress_callback.3
-MLINKS+=	archive_read.3 archive_read_extract_set_skip_file.3
-MLINKS+=	archive_read.3 archive_read_finish.3
-MLINKS+=	archive_read.3 archive_read_new.3
-MLINKS+=	archive_read.3 archive_read_next_header.3
-MLINKS+=	archive_read.3 archive_read_next_header2.3
-MLINKS+=	archive_read.3 archive_read_open.3
-MLINKS+=	archive_read.3 archive_read_open2.3
-MLINKS+=	archive_read.3 archive_read_open_FILE.3
-MLINKS+=	archive_read.3 archive_read_open_fd.3
-MLINKS+=	archive_read.3 archive_read_open_file.3
-MLINKS+=	archive_read.3 archive_read_open_filename.3
-MLINKS+=	archive_read.3 archive_read_open_memory.3
-MLINKS+=	archive_read.3 archive_read_support_compression_all.3
-MLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
-MLINKS+=	archive_read.3 archive_read_support_compression_compress.3
-MLINKS+=	archive_read.3 archive_read_support_compression_gzip.3
-MLINKS+=	archive_read.3 archive_read_support_compression_lzma.3
-MLINKS+=	archive_read.3 archive_read_support_compression_none.3
-MLINKS+=	archive_read.3 archive_read_support_compression_program.3
-MLINKS+=	archive_read.3 archive_read_support_compression_program_signature.3
-MLINKS+=	archive_read.3 archive_read_support_compression_xz.3
-MLINKS+=	archive_read.3 archive_read_support_format_all.3
-MLINKS+=	archive_read.3 archive_read_support_format_ar.3
-MLINKS+=	archive_read.3 archive_read_support_format_cpio.3
-MLINKS+=	archive_read.3 archive_read_support_format_empty.3
-MLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
-MLINKS+=	archive_read.3 archive_read_support_format_raw.3
-MLINKS+=	archive_read.3 archive_read_support_format_tar.3
-MLINKS+=	archive_read.3 archive_read_support_format_zip.3
+MLINKS+=	archive_entry_acl.3 archive_entry_acl_add_entry.3
+MLINKS+=	archive_entry_acl.3 archive_entry_acl_add_entry_w.3
+MLINKS+=	archive_entry_acl.3 archive_entry_acl_clear.3
+MLINKS+=	archive_entry_acl.3 archive_entry_acl_count.3
+MLINKS+=	archive_entry_acl.3 archive_entry_acl_next.3
+MLINKS+=	archive_entry_acl.3 archive_entry_acl_next_w.3
+MLINKS+=	archive_entry_acl.3 archive_entry_acl_reset.3
+MLINKS+=	archive_entry_acl.3 archive_entry_acl_text_w.3
+MLINKS+=	archive_entry_linkify.3 archive_entry_linkresolver.3
+MLINKS+=	archive_entry_linkify.3 archive_entry_linkresolver_new.3
+MLINKS+=	archive_entry_linkify.3 archive_entry_linkresolver_set_strategy.3
+MLINKS+=	archive_entry_linkify.3 archive_entry_linkresolver_free.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_hardlink.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_hardlink_w.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_link.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_link_w.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_pathname.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_pathname_w.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_sourcepath.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_symlink.3
+MLINKS+=	archive_entry_paths.3 archive_entry_copy_symlink_w.3
+MLINKS+=	archive_entry_paths.3 archive_entry_hardlink.3
+MLINKS+=	archive_entry_paths.3 archive_entry_hardlink_w.3
+MLINKS+=	archive_entry_paths.3 archive_entry_pathname.3
+MLINKS+=	archive_entry_paths.3 archive_entry_pathname_w.3
+MLINKS+=	archive_entry_paths.3 archive_entry_set_hardlink.3
+MLINKS+=	archive_entry_paths.3 archive_entry_set_link.3
+MLINKS+=	archive_entry_paths.3 archive_entry_set_pathname.3
+MLINKS+=	archive_entry_paths.3 archive_entry_set_symlink.3
+MLINKS+=	archive_entry_paths.3 archive_entry_symlink.3
+MLINKS+=	archive_entry_paths.3 archive_entry_symlink_w.3
+MLINKS+=	archive_entry_paths.3 archive_entry_update_symlink_utf8.3
+MLINKS+=	archive_entry_paths.3 archive_entry_update_hardlink_utf8.3
+MLINKS+=	archive_entry_perms.3 archive_entry_copy_fflags_text.3
+MLINKS+=	archive_entry_perms.3 archive_entry_copy_fflags_text_w.3
+MLINKS+=	archive_entry_perms.3 archive_entry_copy_gname.3
+MLINKS+=	archive_entry_perms.3 archive_entry_copy_gname_w.3
+MLINKS+=	archive_entry_perms.3 archive_entry_copy_uname.3
+MLINKS+=	archive_entry_perms.3 archive_entry_copy_uname_w.3
+MLINKS+=	archive_entry_perms.3 archive_entry_fflags.3
+MLINKS+=	archive_entry_perms.3 archive_entry_fflags_text.3
+MLINKS+=	archive_entry_perms.3 archive_entry_gid.3
+MLINKS+=	archive_entry_perms.3 archive_entry_gname.3
+MLINKS+=	archive_entry_perms.3 archive_entry_gname_w.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_fflags.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_gid.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_gname.3
+MLINKS+=	archive_entry_perms.3 archive_entry_perm.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_fflags.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_gid.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_gname.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_perm.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_uid.3
+MLINKS+=	archive_entry_perms.3 archive_entry_set_uname.3
+MLINKS+=	archive_entry_perms.3 archive_entry_strmode.3
+MLINKS+=	archive_entry_perms.3 archive_entry_uid.3
+MLINKS+=	archive_entry_perms.3 archive_entry_uname.3
+MLINKS+=	archive_entry_perms.3 archive_entry_uname_w.3
+MLINKS+=	archive_entry_perms.3 archive_entry_update_gname_utf8.3
+MLINKS+=	archive_entry_perms.3 archive_entry_update_uname_utf8.3
+MLINKS+=	archive_entry_stat.3 archive_entry_copy_stat.3
+MLINKS+=	archive_entry_stat.3 archive_entry_dev.3
+MLINKS+=	archive_entry_stat.3 archive_entry_dev_is_set.3
+MLINKS+=	archive_entry_stat.3 archive_entry_devmajor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_devminor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_filetype.3
+MLINKS+=	archive_entry_stat.3 archive_entry_ino.3
+MLINKS+=	archive_entry_stat.3 archive_entry_ino64.3
+MLINKS+=	archive_entry_stat.3 archive_entry_ino_is_set.3
+MLINKS+=	archive_entry_stat.3 archive_entry_mode.3
+MLINKS+=	archive_entry_stat.3 archive_entry_nlink.3
+MLINKS+=	archive_entry_stat.3 archive_entry_rdev.3
+MLINKS+=	archive_entry_stat.3 archive_entry_rdevmajor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_rdevminor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_dev.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_devmajor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_devminor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_filetype.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_ino.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_ino64.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_mode.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_rdev.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_rdevmajor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_rdevminor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_size.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_nlink.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_rdev.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_rdevmajor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_rdevminor.3
+MLINKS+=	archive_entry_stat.3 archive_entry_set_size.3
+MLINKS+=	archive_entry_stat.3 archive_entry_size.3
+MLINKS+=	archive_entry_stat.3 archive_entry_size_is_set.3
+MLINKS+=	archive_entry_stat.3 archive_entry_unset_size.3
+MLINKS+=	archive_entry_time.3 archive_entry_atime.3
+MLINKS+=	archive_entry_time.3 archive_entry_atime_is_set.3
+MLINKS+=	archive_entry_time.3 archive_entry_atime_nsec.3
+MLINKS+=	archive_entry_time.3 archive_entry_birthtime.3
+MLINKS+=	archive_entry_time.3 archive_entry_birthtime_is_set.3
+MLINKS+=	archive_entry_time.3 archive_entry_birthtime_nsec.3
+MLINKS+=	archive_entry_time.3 archive_entry_ctime.3
+MLINKS+=	archive_entry_time.3 archive_entry_ctime_is_set.3
+MLINKS+=	archive_entry_time.3 archive_entry_ctime_nsec.3
+MLINKS+=	archive_entry_time.3 archive_entry_mtime.3
+MLINKS+=	archive_entry_time.3 archive_entry_mtime_is_set.3
+MLINKS+=	archive_entry_time.3 archive_entry_mtime_nsec.3
+MLINKS+=	archive_entry_time.3 archive_entry_set_atime.3
+MLINKS+=	archive_entry_time.3 archive_entry_set_birthtime.3
+MLINKS+=	archive_entry_time.3 archive_entry_set_ctime.3
+MLINKS+=	archive_entry_time.3 archive_entry_set_mtime.3
+MLINKS+=	archive_entry_time.3 archive_entry_unset_atime.3
+MLINKS+=	archive_entry_time.3 archive_entry_unset_birthtime.3
+MLINKS+=	archive_entry_time.3 archive_entry_unset_ctime.3
+MLINKS+=	archive_entry_time.3 archive_entry_unset_mtime.3
+MLINKS+=	archive_read_data.3 archive_read_data_block.3
+MLINKS+=	archive_read_data.3 archive_read_data_into_fd.3
+MLINKS+=	archive_read_data.3 archive_read_data_skip.3
+MLINKS+=	archive_read_header.3 archive_read_next_header.3
+MLINKS+=	archive_read_header.3 archive_read_next_header2.3
+MLINKS+=	archive_read_extract.3 archive_read_extract2.3
+MLINKS+=	archive_read_extract.3 archive_read_extract_set_progress_callback.3
+MLINKS+=	archive_read_extract.3 archive_read_extract_set_skip_file.3
+MLINKS+=	archive_read_open.3 archive_read_open2.3
+MLINKS+=	archive_read_open.3 archive_read_open_FILE.3
+MLINKS+=	archive_read_open.3 archive_read_open_fd.3
+MLINKS+=	archive_read_open.3 archive_read_open_file.3
+MLINKS+=	archive_read_open.3 archive_read_open_filename.3
+MLINKS+=	archive_read_open.3 archive_read_open_memory.3
+MLINKS+=	archive_read_free.3 archive_read_close.3
+MLINKS+=	archive_read_free.3 archive_read_finish.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_all.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_bzip2.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_compress.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_gzip.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_lzma.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_none.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_xz.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_program.3
+MLINKS+=	archive_read_filter.3 archive_read_support_filter_program_signature.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_7zip.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_all.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_ar.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_by_code.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_cab.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_cpio.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_empty.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_iso9660.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_lha.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_mtree.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_rar.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_raw.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_tar.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_xar.3
+MLINKS+=	archive_read_format.3 archive_read_support_format_zip.3
 MLINKS+=	archive_read_disk.3 archive_read_disk_entry_from_file.3
 MLINKS+=	archive_read_disk.3 archive_read_disk_gname.3
 MLINKS+=	archive_read_disk.3 archive_read_disk_new.3
@@ -235,46 +340,58 @@
 MLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_physical.3
 MLINKS+=	archive_read_disk.3 archive_read_disk_set_uname_lookup.3
 MLINKS+=	archive_read_disk.3 archive_read_disk_uname.3
+MLINKS+=	archive_read_set_options.3 archive_read_set_filter_option.3
+MLINKS+=	archive_read_set_options.3 archive_read_set_format_option.3
+MLINKS+=	archive_read_set_options.3 archive_read_set_option.3
 MLINKS+=	archive_util.3 archive_clear_error.3
 MLINKS+=	archive_util.3 archive_compression.3
 MLINKS+=	archive_util.3 archive_compression_name.3
+MLINKS+=	archive_util.3 archive_copy_error.3
 MLINKS+=	archive_util.3 archive_errno.3
 MLINKS+=	archive_util.3 archive_error_string.3
 MLINKS+=	archive_util.3 archive_file_count.3
+MLINKS+=	archive_util.3 archive_filter_code.3
+MLINKS+=	archive_util.3 archive_filter_count.3
+MLINKS+=	archive_util.3 archive_filter_name.3
 MLINKS+=	archive_util.3 archive_format.3
 MLINKS+=	archive_util.3 archive_format_name.3
+MLINKS+=	archive_util.3 archive_position.3
 MLINKS+=	archive_util.3 archive_set_error.3
-MLINKS+=	archive_write.3 archive_write_close.3
-MLINKS+=	archive_write.3 archive_write_data.3
-MLINKS+=	archive_write.3 archive_write_finish.3
-MLINKS+=	archive_write.3 archive_write_finish_entry.3
-MLINKS+=	archive_write.3 archive_write_get_bytes_in_last_block.3
-MLINKS+=	archive_write.3 archive_write_get_bytes_per_block.3
-MLINKS+=	archive_write.3 archive_write_header.3
-MLINKS+=	archive_write.3 archive_write_new.3
-MLINKS+=	archive_write.3 archive_write_open.3
-MLINKS+=	archive_write.3 archive_write_open_FILE.3
-MLINKS+=	archive_write.3 archive_write_open_fd.3
-MLINKS+=	archive_write.3 archive_write_open_file.3
-MLINKS+=	archive_write.3 archive_write_open_filename.3
-MLINKS+=	archive_write.3 archive_write_open_memory.3
-MLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
-MLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
-MLINKS+=	archive_write.3 archive_write_set_callbacks.3
-MLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
-MLINKS+=	archive_write.3 archive_write_set_compression_compress.3
-MLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
-MLINKS+=	archive_write.3 archive_write_set_compression_none.3
-MLINKS+=	archive_write.3 archive_write_set_compression_program.3
-MLINKS+=	archive_write.3 archive_write_set_format_pax.3
-MLINKS+=	archive_write.3 archive_write_set_format_shar.3
-MLINKS+=	archive_write.3 archive_write_set_format_ustar.3
+MLINKS+=	archive_write_blocksize.3 archive_write_get_bytes_in_last_block.3
+MLINKS+=	archive_write_blocksize.3 archive_write_get_bytes_per_block.3
+MLINKS+=	archive_write_blocksize.3 archive_write_set_bytes_in_last_block.3
+MLINKS+=	archive_write_blocksize.3 archive_write_set_bytes_per_block.3
+MLINKS+=	archive_write_disk.3 archive_write_data_block.3
 MLINKS+=	archive_write_disk.3 archive_write_disk_new.3
 MLINKS+=	archive_write_disk.3 archive_write_disk_set_group_lookup.3
 MLINKS+=	archive_write_disk.3 archive_write_disk_set_options.3
 MLINKS+=	archive_write_disk.3 archive_write_disk_set_skip_file.3
 MLINKS+=	archive_write_disk.3 archive_write_disk_set_standard_lookup.3
 MLINKS+=	archive_write_disk.3 archive_write_disk_set_user_lookup.3
+MLINKS+=	archive_write_filter.3 archive_write_add_filter_bzip2.3
+MLINKS+=	archive_write_filter.3 archive_write_add_filter_compress.3
+MLINKS+=	archive_write_filter.3 archive_write_add_filter_gzip.3
+MLINKS+=	archive_write_filter.3 archive_write_add_filter_lzip.3
+MLINKS+=	archive_write_filter.3 archive_write_add_filter_lzma.3
+MLINKS+=	archive_write_filter.3 archive_write_add_filter_none.3
+MLINKS+=	archive_write_filter.3 archive_write_add_filter_program.3
+MLINKS+=	archive_write_filter.3 archive_write_add_filter_xz.3
+MLINKS+=	archive_write_format.3 archive_write_set_format_cpio.3
+MLINKS+=	archive_write_format.3 archive_write_set_format_pax.3
+MLINKS+=	archive_write_format.3 archive_write_set_format_pax_restricted.3
+MLINKS+=	archive_write_format.3 archive_write_set_format_shar.3
+MLINKS+=	archive_write_format.3 archive_write_set_format_shar_dump.3
+MLINKS+=	archive_write_format.3 archive_write_set_format_ustar.3
+MLINKS+=	archive_write_free.3 archive_write_close.3
+MLINKS+=	archive_write_free.3 archive_write_finish.3
+MLINKS+=	archive_write_open.3 archive_write_open_FILE.3
+MLINKS+=	archive_write_open.3 archive_write_open_fd.3
+MLINKS+=	archive_write_open.3 archive_write_open_file.3
+MLINKS+=	archive_write_open.3 archive_write_open_filename.3
+MLINKS+=	archive_write_open.3 archive_write_open_memory.3
+MLINKS+=	archive_write_set_options.3 archive_write_set_filter_option.3
+MLINKS+=	archive_write_set_options.3 archive_write_set_format_option.3
+MLINKS+=	archive_write_set_options.3 archive_write_set_option.3
 MLINKS+=	libarchive.3 archive.3
 
 .PHONY: check test clean-test
--- a/head/lib/libarchive/config_freebsd.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libarchive/config_freebsd.h	Fri Mar 02 16:56:02 2012 +0200
@@ -22,163 +22,215 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: head/lib/libarchive/config_freebsd.h 228745 2011-12-20 20:06:33Z mm $
+ * $FreeBSD: head/lib/libarchive/config_freebsd.h 232153 2012-02-25 10:58:02Z mm $
  */
 
 /* FreeBSD 5.0 and later have ACL and extattr support. */
 #if __FreeBSD__ > 4
-#define	HAVE_ACL_CREATE_ENTRY 1
-#define	HAVE_ACL_GET_LINK_NP 1
-#define	HAVE_ACL_GET_PERM_NP 1
-#define	HAVE_ACL_INIT 1
-#define	HAVE_ACL_SET_FD 1
-#define	HAVE_ACL_SET_FD_NP 1
-#define	HAVE_ACL_SET_FILE 1
-#define	HAVE_ACL_USER 1
-#define	HAVE_EXTATTR_GET_FILE 1
-#define	HAVE_EXTATTR_LIST_FILE 1
-#define	HAVE_EXTATTR_SET_FD 1
-#define	HAVE_EXTATTR_SET_FILE 1
-#define	HAVE_SYS_ACL_H 1
-#define	HAVE_SYS_EXTATTR_H 1
+#define HAVE_ACL_CREATE_ENTRY 1
+#define HAVE_ACL_GET_LINK_NP 1
+#define HAVE_ACL_GET_PERM_NP 1
+#define HAVE_ACL_INIT 1
+#define HAVE_ACL_PERMSET_T 1
+#define HAVE_ACL_SET_FD 1
+#define HAVE_ACL_SET_FD_NP 1
+#define HAVE_ACL_SET_FILE 1
+#define HAVE_ACL_USER 1
+#define HAVE_EXTATTR_GET_FILE 1
+#define HAVE_EXTATTR_LIST_FILE 1
+#define HAVE_EXTATTR_SET_FD 1
+#define HAVE_EXTATTR_SET_FILE 1
+#define HAVE_SYS_ACL_H 1
+#define HAVE_SYS_EXTATTR_H 1
 #endif
 
 #ifdef WITH_OPENSSL
-#define	HAVE_OPENSSL_MD5_H 1
-#define	HAVE_OPENSSL_RIPEMD_H 1
-#define	HAVE_OPENSSL_SHA_H 1
-#define	HAVE_OPENSSL_SHA256_INIT 1
-#define	HAVE_OPENSSL_SHA384_INIT 1
-#define	HAVE_OPENSSL_SHA512_INIT 1
-#define	HAVE_SHA256 1
-#define	HAVE_SHA384 1
-#define	HAVE_SHA512 1
+#define HAVE_OPENSSL_MD5_H 1
+#define HAVE_OPENSSL_RIPEMD_H 1
+#define HAVE_OPENSSL_SHA_H 1
+#define HAVE_OPENSSL_SHA256_INIT 1
+#define HAVE_OPENSSL_SHA384_INIT 1
+#define HAVE_OPENSSL_SHA512_INIT 1
+#define HAVE_SHA256 1
+#define HAVE_SHA384 1
+#define HAVE_SHA512 1
 #else
-#define	HAVE_MD5_H 1
-#define	HAVE_MD5INIT 1
-#define	HAVE_SHA_H 1
-#define	HAVE_SHA1 1
-#define	HAVE_SHA1_INIT 1
-#define	HAVE_SHA256 1
-#define	HAVE_SHA256_H 1
-#define	HAVE_SHA256_INIT 1
-#define	HAVE_SHA512 1
-#define	HAVE_SHA512_H 1
-#define	HAVE_SHA512_INIT 1
+#define HAVE_MD5_H 1
+#define HAVE_MD5INIT 1
+#define HAVE_SHA_H 1
+#define HAVE_SHA1 1
+#define HAVE_SHA1_INIT 1
+#define HAVE_SHA256 1
+#define HAVE_SHA256_H 1
+#define HAVE_SHA256_INIT 1
+#define HAVE_SHA512 1
+#define HAVE_SHA512_H 1
+#define HAVE_SHA512_INIT 1
 #endif
 
-#define	HAVE_BSDXML_H 1
-#define	HAVE_BZLIB_H 1
-#define	HAVE_CHFLAGS 1
-#define	HAVE_CHOWN 1
-#define	HAVE_DECL_EXTATTR_NAMESPACE_USER 1
-#define	HAVE_DECL_INT64_MAX 1
-#define	HAVE_DECL_INT64_MIN 1
-#define	HAVE_DECL_SIZE_MAX 1
-#define	HAVE_DECL_SSIZE_MAX 1
-#define	HAVE_DECL_STRERROR_R 1
-#define	HAVE_DECL_UINT32_MAX 1
-#define	HAVE_DECL_UINT64_MAX 1
-#define	HAVE_DIRENT_H 1
-#define	HAVE_EFTYPE 1
-#define	HAVE_EILSEQ 1
-#define	HAVE_ERRNO_H 1
-#define	HAVE_FCHDIR 1
-#define	HAVE_FCHFLAGS 1
-#define	HAVE_FCHMOD 1
-#define	HAVE_FCHOWN 1
-#define	HAVE_FCNTL 1
-#define	HAVE_FCNTL_H 1
-#define	HAVE_FSEEKO 1
-#define	HAVE_FSTAT 1
-#define	HAVE_FTRUNCATE 1
-#define	HAVE_FUTIMES 1
-#define	HAVE_GETEUID 1
-#define	HAVE_GETGRGID_R 1
-#define	HAVE_GETPID 1
-#define	HAVE_GETPWUID_R 1
-#define	HAVE_GRP_H 1
-#define	HAVE_INTTYPES_H 1
-#define	HAVE_LCHFLAGS 1
-#define	HAVE_LCHMOD 1
-#define	HAVE_LCHOWN 1
-#define	HAVE_LIMITS_H 1
-#define	HAVE_LINK 1
-#define	HAVE_LSTAT 1
-#define	HAVE_LUTIMES 1
-#define	HAVE_MALLOC 1
-#define	HAVE_MD5 1
-#define	HAVE_MEMMOVE 1
-#define	HAVE_MKDIR 1
-#define	HAVE_MKFIFO 1
-#define	HAVE_MKNOD 1
-#define	HAVE_PIPE 1
-#define	HAVE_POLL 1
-#define	HAVE_POLL_H 1
-#define	HAVE_PWD_H 1
-#define	HAVE_READLINK 1
-#define	HAVE_RMD160 1
-#define	HAVE_SELECT 1
-#define	HAVE_SETENV 1
-#define	HAVE_SIGNAL_H 1
-#define	HAVE_STDINT_H 1
-#define	HAVE_STDLIB_H 1
-#define	HAVE_STRCHR 1
-#define	HAVE_STRDUP 1
-#define	HAVE_STRERROR 1
-#define	HAVE_STRERROR_R 1
-#define	HAVE_STRINGS_H 1
-#define	HAVE_STRING_H 1
-#define	HAVE_STRRCHR 1
-#define	HAVE_STRUCT_STAT_ST_BLKSIZE 1
-#define	HAVE_STRUCT_STAT_ST_BIRTHTIME 1
-#define	HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
-#define	HAVE_STRUCT_STAT_ST_FLAGS 1
-#define	HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
-#define	HAVE_SYMLINK 1
-#define	HAVE_SYS_CDEFS_H 1
-#define	HAVE_SYS_IOCTL_H 1
-#define	HAVE_SYS_SELECT_H 1
-#define	HAVE_SYS_STAT_H 1
-#define	HAVE_SYS_TIME_H 1
-#define	HAVE_SYS_TYPES_H 1
-#undef	HAVE_SYS_UTIME_H
-#define	HAVE_SYS_WAIT_H 1
-#define	HAVE_TIMEGM 1
-#define	HAVE_TZSET 1
-#define	HAVE_UNISTD_H 1
-#define	HAVE_UNSETENV 1
-#define	HAVE_UTIME 1
-#define	HAVE_UTIMES 1
-#define	HAVE_UTIME_H 1
-#define	HAVE_VFORK 1
-#define	HAVE_WCHAR_H 1
-#define	HAVE_WCSCMP 1
-#define	HAVE_WCSCPY 1
-#define	HAVE_WCSLEN 1
-#define	HAVE_WCTOMB 1
-#define	HAVE_WMEMCMP 1
-#define	HAVE_WMEMCPY 1
-#define	HAVE_ZLIB_H 1
-#define	TIME_WITH_SYS_TIME 1
+#define HAVE_BSDXML_H 1
+#define HAVE_BZLIB_H 1
+#define HAVE_CHFLAGS 1
+#define HAVE_CHOWN 1
+#define HAVE_CHROOT 1
+#define HAVE_CTIME_R 1
+#define HAVE_CTYPE_H 1
+#define HAVE_DECL_EXTATTR_NAMESPACE_USER 1
+#define HAVE_DECL_INT64_MAX 1
+#define HAVE_DECL_INT64_MIN 1
+#define HAVE_DECL_SIZE_MAX 1
+#define HAVE_DECL_SSIZE_MAX 1
+#define HAVE_DECL_STRERROR_R 1
+#define HAVE_DECL_UINT32_MAX 1
+#define HAVE_DECL_UINT64_MAX 1
+#define HAVE_DIRENT_H 1
+#define HAVE_DLFCN_H 1
+#define HAVE_D_MD_ORDER 1
+#define HAVE_EFTYPE 1
+#define HAVE_EILSEQ 1
+#define HAVE_ERRNO_H 1
+#define HAVE_FCHDIR 1
+#define HAVE_FCHFLAGS 1
+#define HAVE_FCHMOD 1
+#define HAVE_FCHOWN 1
+#define HAVE_FCNTL 1
+#define HAVE_FCNTL_H 1
+#define HAVE_FDOPENDIR 1
+#define HAVE_FORK 1
+#define HAVE_FSEEKO 1
+#define HAVE_FSTAT 1
+#define HAVE_FSTATAT 1
+#define HAVE_FSTATFS 1
+#define HAVE_FSTATVFS 1
+#define HAVE_FTRUNCATE 1
+#define HAVE_FUTIMES 1
+#define HAVE_FUTIMESAT 1
+#define HAVE_GETEUID 1
+#define HAVE_GETGRGID_R 1
+#define HAVE_GETGRNAM_R 1
+#define HAVE_GETPID 1
+#define HAVE_GETPWNAM_R 1
+#define HAVE_GETPWUID_R 1
+#define HAVE_GETVFSBYNAME 1
+#define HAVE_GMTIME_R 1
+#define HAVE_GRP_H 1
+#define HAVE_INTMAX_T 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_LANGINFO_H 1
+#define HAVE_LCHFLAGS 1
+#define HAVE_LCHMOD 1
+#define HAVE_LCHOWN 1
+#define HAVE_LIBZ 1
+#define HAVE_LIMITS_H 1
+#define HAVE_LINK 1
+#define HAVE_LOCALE_H 1
+#define HAVE_LOCALTIME_R 1
+#define HAVE_LONG_LONG_INT 1
+#define HAVE_LSTAT 1
+#define HAVE_LUTIMES 1
+#define HAVE_MBRTOWC 1
+#define HAVE_MBSNRTOWCS 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMORY_H 1
+#define HAVE_MEMSET 1
+#define HAVE_MKDIR 1
+#define HAVE_MKFIFO 1
+#define HAVE_MKNOD 1
+#define HAVE_MKSTEMP 1
+#define HAVE_NL_LANGINFO 1
+#define HAVE_OPENAT 1
+#define HAVE_PATHS_H 1
+#define HAVE_PIPE 1
+#define HAVE_POLL 1
+#define HAVE_POLL_H 1
+#define HAVE_PWD_H 1
+#define HAVE_READDIR_R 1
+#define HAVE_READLINK 1
+#define HAVE_READLINKAT 1
+#define HAVE_REGEX_H 1
+#define HAVE_SELECT 1
+#define HAVE_SETENV 1
+#define HAVE_SETLOCALE 1
+#define HAVE_SIGACTION 1
+#define HAVE_SIGNAL_H 1
+#define HAVE_STATFS 1
+#define HAVE_STATVFS 1
+#define HAVE_STDARG_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRCHR 1
+#define HAVE_STRDUP 1
+#define HAVE_STRERROR 1
+#define HAVE_STRERROR_R 1
+#define HAVE_STRFTIME 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRUCT_STATFS_F_NAMEMAX 1
+#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
+#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+#define HAVE_STRUCT_STAT_ST_FLAGS 1
+#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
+#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
+#define HAVE_STRUCT_TM_TM_GMTOFF 1
+#define HAVE_SYMLINK 1
+#define HAVE_SYS_CDEFS_H 1
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYS_MOUNT_H 1
+#define HAVE_SYS_PARAM_H 1
+#define HAVE_SYS_POLL_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_STATVFS_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_UTSNAME_H 1
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_TIMEGM 1
+#define HAVE_TIME_H 1
+#define HAVE_TZSET 1
+#define HAVE_UINTMAX_T 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UNSETENV 1
+#define HAVE_UNSIGNED_LONG_LONG 1
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+#define HAVE_UTIME 1
+#define HAVE_UTIMES 1
+#define HAVE_UTIME_H 1
+#define HAVE_VFORK 1
+#define HAVE_VPRINTF 1
+#define HAVE_WCHAR_H 1
+#define HAVE_WCHAR_T 1
+#define HAVE_WCRTOMB 1
+#define HAVE_WCSCMP 1
+#define HAVE_WCSCPY 1
+#define HAVE_WCSLEN 1
+#define HAVE_WCSNRTOMBS 1
+#define HAVE_WCTOMB 1
+#define HAVE_WCTYPE_H 1
+#define HAVE_WMEMCMP 1
+#define HAVE_WMEMCPY 1
+#define HAVE_ZLIB_H 1
+#define TIME_WITH_SYS_TIME 1
 
 /* FreeBSD 4 and earlier lack intmax_t/uintmax_t */
 #if __FreeBSD__ < 5
-#define	intmax_t int64_t
-#define	uintmax_t uint64_t
+#define intmax_t int64_t
+#define uintmax_t uint64_t
 #endif
 
 /* FreeBSD defines for archive_hash.h */
 #ifdef WITH_OPENSSL
-#define	ARCHIVE_HASH_MD5_OPENSSL 1
-#define	ARCHIVE_HASH_RMD160_OPENSSL 1
-#define	ARCHIVE_HASH_SHA1_OPENSSL
-#define	ARCHIVE_HASH_SHA256_OPENSSL 1
-#define	ARCHIVE_HASH_SHA384_OPENSSL 1
-#define	ARCHIVE_HASH_SHA512_OPENSSL 1
+#define ARCHIVE_HASH_MD5_OPENSSL 1
+#define ARCHIVE_HASH_RMD160_OPENSSL 1
+#define ARCHIVE_HASH_SHA1_OPENSSL
+#define ARCHIVE_HASH_SHA256_OPENSSL 1
+#define ARCHIVE_HASH_SHA384_OPENSSL 1
+#define ARCHIVE_HASH_SHA512_OPENSSL 1
 #else
-#define	ARCHIVE_HASH_MD5_LIBMD 1
-#define	ARCHIVE_HASH_SHA1_LIBMD 1
-#define	ARCHIVE_HASH_SHA256_LIBMD 1
-#define	ARCHIVE_HASH_SHA512_LIBMD 1
+#define ARCHIVE_HASH_MD5_LIBMD 1
+#define ARCHIVE_HASH_SHA1_LIBMD 1
+#define ARCHIVE_HASH_SHA256_LIBMD 1
+#define ARCHIVE_HASH_SHA512_LIBMD 1
 #endif
--- a/head/lib/libarchive/test/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libarchive/test/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,4 @@
-# $FreeBSD: head/lib/libarchive/test/Makefile 228797 2011-12-22 08:42:07Z mm $
+# $FreeBSD: head/lib/libarchive/test/Makefile 232153 2012-02-25 10:58:02Z mm $
 
 LIBARCHIVEDIR=	${.CURDIR}/../../../contrib/libarchive
 
@@ -10,7 +10,7 @@
 LDADD= -L ${.OBJDIR}/.. -larchive
 LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
 CFLAGS+= -g
-CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR} -I${.OBJDIR}
+CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR}/libarchive -I${.OBJDIR}
 CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
 
 # Uncomment to link against dmalloc
@@ -19,17 +19,42 @@
 
 .PATH:  ${LIBARCHIVEDIR}/libarchive/test
 TESTS= \
-	test_acl_basic.c			\
 	test_acl_freebsd.c			\
+	test_acl_nfs4.c				\
 	test_acl_pax.c				\
+	test_acl_posix1e.c			\
 	test_archive_api_feature.c		\
+	test_archive_clear_error.c		\
+	test_archive_crypto.c			\
+	test_archive_read_close_twice.c		\
+	test_archive_read_close_twice_open_fd.c	\
+	test_archive_read_close_twice_open_filename.c	\
+	test_archive_read_next_header_empty.c	\
+	test_archive_read_next_header_raw.c	\
+	test_archive_read_open2.c		\
+	test_archive_read_set_filter_option.c	\
+	test_archive_read_set_format_option.c	\
+	test_archive_read_set_option.c		\
+	test_archive_read_set_options.c		\
+	test_archive_read_support.c		\
+	test_archive_set_error.c		\
+	test_archive_string.c			\
+	test_archive_string_conversion.c	\
+	test_archive_write_set_filter_option.c	\
+	test_archive_write_set_format_option.c	\
+	test_archive_write_set_option.c		\
+	test_archive_write_set_options.c	\
 	test_bad_fd.c				\
 	test_compat_bzip2.c			\
 	test_compat_cpio.c			\
 	test_compat_gtar.c			\
 	test_compat_gzip.c			\
+	test_compat_lzip.c			\
 	test_compat_lzma.c			\
+	test_compat_mac.c			\
+	test_compat_pax_libarchive_2x.c		\
 	test_compat_solaris_tar_acl.c		\
+	test_compat_solaris_pax_sparse.c	\
 	test_compat_tar_hardlink.c		\
 	test_compat_xz.c			\
 	test_compat_zip.c			\
@@ -37,7 +62,9 @@
 	test_entry.c				\
 	test_entry_strmode.c			\
 	test_extattr_freebsd.c			\
+	test_filter_count.c			\
 	test_fuzz.c				\
+	test_gnutar_filename_encoding.c		\
 	test_link_resolver.c			\
 	test_open_fd.c				\
 	test_open_failure.c			\
@@ -47,86 +74,118 @@
 	test_read_compress_program.c		\
 	test_read_data_large.c			\
 	test_read_disk.c			\
+	test_read_disk_directory_traversals.c	\
 	test_read_disk_entry_from_file.c	\
 	test_read_extract.c			\
 	test_read_file_nonexistent.c		\
+	test_read_format_7zip.c			\
 	test_read_format_ar.c			\
+	test_read_format_cab.c			\
+	test_read_format_cab_filename.c		\
+	test_read_format_cpio_afio.c		\
 	test_read_format_cpio_bin.c		\
 	test_read_format_cpio_bin_Z.c		\
 	test_read_format_cpio_bin_be.c		\
 	test_read_format_cpio_bin_bz2.c		\
 	test_read_format_cpio_bin_gz.c		\
+	test_read_format_cpio_bin_lzip.c	\
 	test_read_format_cpio_bin_lzma.c	\
 	test_read_format_cpio_bin_xz.c		\
+	test_read_format_cpio_filename.c	\
 	test_read_format_cpio_odc.c		\
 	test_read_format_cpio_svr4_gzip.c	\
 	test_read_format_cpio_svr4c_Z.c		\
 	test_read_format_cpio_svr4_bzip2_rpm.c	\
 	test_read_format_cpio_svr4_gzip_rpm.c	\
 	test_read_format_empty.c		\
+	test_read_format_gtar_filename.c	\
 	test_read_format_gtar_gz.c		\
 	test_read_format_gtar_lzma.c		\
 	test_read_format_gtar_sparse.c		\
 	test_read_format_iso_Z.c		\
 	test_read_format_iso_multi_extent.c	\
+	test_read_format_iso_xorriso.c		\
 	test_read_format_isorr_rr_moved.c	\
 	test_read_format_isojoliet_bz2.c	\
 	test_read_format_isojoliet_long.c	\
 	test_read_format_isojoliet_rr.c		\
+	test_read_format_isojoliet_versioned.c	\
 	test_read_format_isorr_bz2.c		\
 	test_read_format_isorr_ce.c		\
 	test_read_format_isorr_new_bz2.c	\
 	test_read_format_isozisofs_bz2.c	\
+	test_read_format_lha.c			\
+	test_read_format_lha_filename.c		\
 	test_read_format_mtree.c		\
 	test_read_format_pax_bz2.c		\
+	test_read_format_rar.c			\
 	test_read_format_raw.c			\
 	test_read_format_tar.c			\
 	test_read_format_tar_empty_filename.c	\
+	test_read_format_tar_filename.c		\
 	test_read_format_tbz.c			\
 	test_read_format_tgz.c			\
 	test_read_format_tlz.c			\
 	test_read_format_txz.c			\
 	test_read_format_tz.c			\
+	test_read_format_ustar_filename.c	\
 	test_read_format_xar.c			\
 	test_read_format_zip.c			\
+	test_read_format_zip_filename.c		\
 	test_read_large.c			\
 	test_read_pax_truncated.c		\
 	test_read_position.c			\
 	test_read_truncated.c			\
+	test_read_truncated_filter.c		\
 	test_read_uu.c				\
+	test_sparse_basic.c			\
 	test_tar_filenames.c			\
 	test_tar_large.c			\
 	test_ustar_filenames.c			\
+	test_ustar_filename_encoding.c		\
 	test_write_compress.c			\
 	test_write_compress_bzip2.c		\
 	test_write_compress_gzip.c		\
+	test_write_compress_lzip.c		\
 	test_write_compress_lzma.c		\
 	test_write_compress_program.c		\
 	test_write_compress_xz.c		\
 	test_write_disk.c			\
 	test_write_disk_failures.c		\
 	test_write_disk_hardlink.c		\
+	test_write_disk_lookup.c		\
 	test_write_disk_perms.c			\
 	test_write_disk_secure.c		\
 	test_write_disk_sparse.c		\
 	test_write_disk_symlink.c		\
 	test_write_disk_times.c			\
+	test_write_format_7zip.c		\
 	test_write_format_ar.c			\
 	test_write_format_cpio.c		\
 	test_write_format_cpio_empty.c		\
 	test_write_format_cpio_newc.c		\
 	test_write_format_cpio_odc.c		\
+	test_write_format_gnutar.c		\
+	test_write_format_iso9660.c		\
+	test_write_format_iso9660_boot.c	\
+	test_write_format_iso9660_empty.c	\
+	test_write_format_iso9660_filename.c	\
+	test_write_format_iso9660_zisofs.c	\
 	test_write_format_mtree.c		\
+	test_write_format_mtree_fflags.c	\
 	test_write_format_pax.c			\
 	test_write_format_shar_empty.c		\
 	test_write_format_tar.c			\
 	test_write_format_tar_empty.c		\
+	test_write_format_tar_sparse.c		\
 	test_write_format_tar_ustar.c		\
+	test_write_format_xar.c			\
+	test_write_format_xar_empty.c		\
 	test_write_format_zip.c			\
 	test_write_format_zip_empty.c		\
 	test_write_format_zip_no_compression.c	\
-	test_write_open_memory.c
-
+	test_write_open_memory.c		\
+	test_zip_filename_encoding.c
 
 # Build the test program.
 SRCS= \
--- a/head/lib/libc/amd64/gen/getcontextx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/amd64/gen/getcontextx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/amd64/gen/getcontextx.c 230429 2012-01-21 18:00:28Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/amd64/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
@@ -39,7 +39,7 @@
 
 static int xstate_sz = -1;
 
-size_t
+int
 __getcontextx_size(void)
 {
 	u_int p[4];
--- a/head/lib/libc/arm/gen/Makefile.inc	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/arm/gen/Makefile.inc	Fri Mar 02 16:56:02 2012 +0200
@@ -1,6 +1,6 @@
 #	@(#)Makefile.inc	8.1 (Berkeley) 6/4/93
-# $FreeBSD: head/lib/libc/arm/gen/Makefile.inc 230429 2012-01-21 18:00:28Z kib $
+# $FreeBSD: head/lib/libc/arm/gen/Makefile.inc 231616 2012-02-14 00:12:15Z gonzo $
 
 SRCS+=	_ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \
 	getcontextx.c infinity.c ldexp.c makecontext.c \
-	setjmp.S signalcontext.c sigsetjmp.S divsi3.S flt_rounds.c
+	__aeabi_read_tp.c setjmp.S signalcontext.c sigsetjmp.S divsi3.S flt_rounds.c
--- a/head/lib/libc/arm/gen/getcontextx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/arm/gen/getcontextx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,14 +25,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/arm/gen/getcontextx.c 230429 2012-01-21 18:00:28Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/arm/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
 #include <errno.h>
 #include <stdlib.h>
 
-size_t
+int
 __getcontextx_size(void)
 {
 
--- a/head/lib/libc/db/man/hash.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/db/man/hash.3	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)hash.3	8.6 (Berkeley) 8/18/94
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/db/man/hash.3 231564 2012-02-12 18:29:56Z ed $
 .\"
 .Dd August 18, 1994
 .Dt HASH 3
@@ -65,7 +65,7 @@
 	u_int ffactor;
 	u_int nelem;
 	u_int cachesize;
-	u_int32_t (*hash)(const void *, size_t);
+	uint32_t (*hash)(const void *, size_t);
 	int lorder;
 } HASHINFO;
 .Ed
--- a/head/lib/libc/gen/arc4random.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/arc4random.3	Fri Mar 02 16:56:02 2012 +0200
@@ -28,7 +28,7 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" Manual page, using -mandoc macros
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/gen/arc4random.3 231564 2012-02-12 18:29:56Z ed $
 .\"
 .Dd April 15, 1997
 .Dt ARC4RANDOM 3
@@ -44,12 +44,12 @@
 .Lb libc
 .Sh SYNOPSIS
 .In stdlib.h
-.Ft u_int32_t
+.Ft uint32_t
 .Fn arc4random "void"
 .Ft void
 .Fn arc4random_buf "void *buf" "size_t nbytes"
-.Ft u_int32_t
-.Fn arc4random_uniform "u_int32_t upper_bound"
+.Ft uint32_t
+.Fn arc4random_uniform "uint32_t upper_bound"
 .Ft void
 .Fn arc4random_stir "void"
 .Ft void
--- a/head/lib/libc/gen/aux.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/aux.c	Fri Mar 02 16:56:02 2012 +0200
@@ -1,5 +1,5 @@
 /*-
- * Copyright 2010 Konstantin Belousov <[email protected]>.
+ * Copyright 2010, 2012 Konstantin Belousov <[email protected]>.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libc/gen/aux.c 231868 2012-02-17 10:49:29Z kib $");
 
 #include "namespace.h"
 #include <elf.h>
@@ -36,10 +36,34 @@
 #include "un-namespace.h"
 #include "libc_private.h"
 
-Elf_Auxinfo *__elf_aux_vector;
+extern char **environ;
+extern int _DYNAMIC;
+#pragma weak _DYNAMIC
+
+void *__elf_aux_vector;
+static pthread_once_t aux_vector_once = PTHREAD_ONCE_INIT;
+
+static void
+init_aux_vector_once(void)
+{
+	Elf_Addr *sp;
+
+	sp = (Elf_Addr *)environ;
+	while (*sp++ != 0)
+		;
+	__elf_aux_vector = (Elf_Auxinfo *)sp;
+}
+
+void
+__init_elf_aux_vector(void)
+{
+
+	if (&_DYNAMIC != NULL)
+		return;
+	_once(&aux_vector_once, init_aux_vector_once);
+}
 
 static pthread_once_t aux_once = PTHREAD_ONCE_INIT;
-
 static int pagesize, osreldate, canary_len, ncpus, pagesizes_len;
 static char *canary, *pagesizes;
 
@@ -86,6 +110,7 @@
 {
 	int res;
 
+	__init_elf_aux_vector();
 	if (__elf_aux_vector == NULL)
 		return (ENOSYS);
 	_once(&aux_once, init_aux);
--- a/head/lib/libc/gen/directory.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/directory.3	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)directory.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/gen/directory.3 231299 2012-02-09 20:49:03Z eadler $
 .\"
 .Dd April 16, 2008
 .Dt DIRECTORY 3
@@ -122,9 +122,12 @@
 returns a pointer to the next directory entry.
 It returns
 .Dv NULL
-upon reaching the end of the directory or detecting an invalid
-.Fn seekdir
-operation.
+upon reaching the end of the directory or on error.
+In the event of an error,
+.Va errno
+may be set to any of the values documented for the
+.Xr getdirentries 2
+system call.
 .Pp
 The
 .Fn readdir_r
--- a/head/lib/libc/gen/dlfcn.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/dlfcn.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/gen/dlfcn.c 229768 2012-01-07 10:33:01Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/gen/dlfcn.c 231868 2012-02-17 10:49:29Z kib $");
 
 /*
  * Linkage to services provided by the dynamic linker.
@@ -34,6 +34,10 @@
 #include <dlfcn.h>
 #include <link.h>
 #include <stddef.h>
+#include "namespace.h"
+#include <pthread.h>
+#include "un-namespace.h"
+#include "libc_private.h"
 
 static char sorry[] = "Service unavailable";
 
@@ -138,13 +142,58 @@
 	_rtld_error(sorry);
 }
 
+static pthread_once_t dl_phdr_info_once = PTHREAD_ONCE_INIT;
+static struct dl_phdr_info phdr_info;
+
+static void
+dl_init_phdr_info(void)
+{
+	Elf_Auxinfo *auxp;
+	size_t phent;
+	unsigned int i;
+
+	phent = 0;
+	for (auxp = __elf_aux_vector; auxp->a_type != AT_NULL; auxp++) {
+		switch (auxp->a_type) {
+		case AT_BASE:
+			phdr_info.dlpi_addr = (Elf_Addr)auxp->a_un.a_ptr;
+			break;
+		case AT_EXECPATH:
+			phdr_info.dlpi_name = (const char *)auxp->a_un.a_ptr;
+			break;
+		case AT_PHDR:
+			phdr_info.dlpi_phdr =
+			    (const Elf_Phdr *)auxp->a_un.a_ptr;
+			break;
+		case AT_PHENT:
+			phent = auxp->a_un.a_val;
+			break;
+		case AT_PHNUM:
+			phdr_info.dlpi_phnum = (Elf_Half)auxp->a_un.a_val;
+			break;
+		}
+	}
+	for (i = 0; i < phdr_info.dlpi_phnum; i++) {
+		if (phdr_info.dlpi_phdr[i].p_type == PT_TLS) {
+			phdr_info.dlpi_tls_modid = 1;
+			phdr_info.dlpi_tls_data =
+			    (void*)phdr_info.dlpi_phdr[i].p_vaddr;
+		}
+	}
+	phdr_info.dlpi_adds = 1;
+}
+
 #pragma weak dl_iterate_phdr
 int
 dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *),
     void *data)
 {
-	_rtld_error(sorry);
-	return 0;
+
+	__init_elf_aux_vector();
+	if (__elf_aux_vector == NULL)
+		return (1);
+	_once(&dl_phdr_info_once, dl_init_phdr_info);
+	return (callback(&phdr_info, sizeof(phdr_info), data));
 }
 
 #pragma weak fdlopen
--- a/head/lib/libc/gen/fmtmsg.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/fmtmsg.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libc/gen/fmtmsg.c 232007 2012-02-22 21:47:50Z jilles $");
 
 #include <fmtmsg.h>
 #include <stdio.h>
@@ -45,10 +45,6 @@
 		*sevinfo(int);
 static int	 validmsgverb(const char *);
 
-static const char *validlist[] = {
-	"label", "severity", "text", "action", "tag", NULL
-};
-
 int
 fmtmsg(long class, const char *label, int sev, const char *text,
     const char *action, const char *tag)
@@ -205,14 +201,18 @@
 static int
 validmsgverb(const char *msgverb)
 {
+	const char *validlist = "label\0severity\0text\0action\0tag\0";
 	char *msgcomp;
-	int i, equality;
+	size_t len1, len2;
+	const char *p;
+	int equality;
 
 	equality = 0;
 	while ((msgcomp = nextcomp(msgverb)) != NULL) {
 		equality--;
-		for (i = 0; validlist[i] != NULL; i++) {
-			if (strcmp(msgcomp, validlist[i]) == 0)
+		len1 = strlen(msgcomp);
+		for (p = validlist; (len2 = strlen(p)) != 0; p += len2 + 1) {
+			if (len1 == len2 && memcmp(msgcomp, p, len1) == 0)
 				equality++;
 		}
 	}
--- a/head/lib/libc/gen/fts.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/fts.c	Fri Mar 02 16:56:02 2012 +0200
@@ -36,7 +36,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libc/gen/fts.c 231891 2012-02-18 00:55:54Z delphij $");
 
 #include "namespace.h"
 #include <sys/param.h>
@@ -226,9 +226,7 @@
 }
 
 static void
-fts_load(sp, p)
-	FTS *sp;
-	FTSENT *p;
+fts_load(FTS *sp, FTSENT *p)
 {
 	size_t len;
 	char *cp;
@@ -252,8 +250,7 @@
 }
 
 int
-fts_close(sp)
-	FTS *sp;
+fts_close(FTS *sp)
 {
 	FTSENT *freep, *p;
 	int saved_errno;
@@ -307,8 +304,7 @@
 	    ? p->fts_pathlen - 1 : p->fts_pathlen)
 
 FTSENT *
-fts_read(sp)
-	FTS *sp;
+fts_read(FTS *sp)
 {
 	FTSENT *p, *tmp;
 	int instr;
@@ -501,10 +497,7 @@
  */
 /* ARGSUSED */
 int
-fts_set(sp, p, instr)
-	FTS *sp;
-	FTSENT *p;
-	int instr;
+fts_set(FTS *sp, FTSENT *p, int instr)
 {
 	if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
 	    instr != FTS_NOINSTR && instr != FTS_SKIP) {
@@ -516,9 +509,7 @@
 }
 
 FTSENT *
-fts_children(sp, instr)
-	FTS *sp;
-	int instr;
+fts_children(FTS *sp, int instr)
 {
 	FTSENT *p;
 	int fd;
@@ -628,9 +619,7 @@
  * been found, cutting the stat calls by about 2/3.
  */
 static FTSENT *
-fts_build(sp, type)
-	FTS *sp;
-	int type;
+fts_build(FTS *sp, int type)
 {
 	struct dirent *dp;
 	FTSENT *p, *head;
@@ -876,10 +865,7 @@
 }
 
 static int
-fts_stat(sp, p, follow)
-	FTS *sp;
-	FTSENT *p;
-	int follow;
+fts_stat(FTS *sp, FTSENT *p, int follow)
 {
 	FTSENT *t;
 	dev_t dev;
@@ -974,10 +960,7 @@
 }
 
 static FTSENT *
-fts_sort(sp, head, nitems)
-	FTS *sp;
-	FTSENT *head;
-	size_t nitems;
+fts_sort(FTS *sp, FTSENT *head, size_t nitems)
 {
 	FTSENT **ap, *p;
 
@@ -1006,10 +989,7 @@
 }
 
 static FTSENT *
-fts_alloc(sp, name, namelen)
-	FTS *sp;
-	char *name;
-	size_t namelen;
+fts_alloc(FTS *sp, char *name, size_t namelen)
 {
 	FTSENT *p;
 	size_t len;
@@ -1056,8 +1036,7 @@
 }
 
 static void
-fts_lfree(head)
-	FTSENT *head;
+fts_lfree(FTSENT *head)
 {
 	FTSENT *p;
 
@@ -1075,9 +1054,7 @@
  * plus 256 bytes so don't realloc the path 2 bytes at a time.
  */
 static int
-fts_palloc(sp, more)
-	FTS *sp;
-	size_t more;
+fts_palloc(FTS *sp, size_t more)
 {
 
 	sp->fts_pathlen += more + 256;
@@ -1090,9 +1067,7 @@
  * already returned.
  */
 static void
-fts_padjust(sp, head)
-	FTS *sp;
-	FTSENT *head;
+fts_padjust(FTS *sp, FTSENT *head)
 {
 	FTSENT *p;
 	char *addr = sp->fts_path;
@@ -1133,11 +1108,7 @@
  * Assumes p->fts_dev and p->fts_ino are filled in.
  */
 static int
-fts_safe_changedir(sp, p, fd, path)
-	FTS *sp;
-	FTSENT *p;
-	int fd;
-	char *path;
+fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path)
 {
 	int ret, oerrno, newfd;
 	struct stat sb;
--- a/head/lib/libc/gen/getgrouplist.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/getgrouplist.3	Fri Mar 02 16:56:02 2012 +0200
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)getgrouplist.3	8.1 (Berkeley) 6/9/93
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/gen/getgrouplist.3 231945 2012-02-20 20:46:27Z pjd $
 .\"
-.Dd June 9, 1993
+.Dd February 20, 2012
 .Dt GETGROUPLIST 3
 .Os
 .Sh NAME
@@ -64,7 +64,7 @@
 The
 .Fn getgrouplist
 function
-returns \-1 if the size of the group list is too small to
+returns 0 on success and \-1 if the size of the group list is too small to
 hold all the user's groups.
 Here, the group array will be filled with as many groups as will fit.
 .Sh FILES
--- a/head/lib/libc/gen/getutxent.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/getutxent.3	Fri Mar 02 16:56:02 2012 +0200
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libc/gen/getutxent.3 230060 2012-01-13 15:40:49Z ed $
+.\" $FreeBSD: head/lib/libc/gen/getutxent.3 231530 2012-02-11 20:28:42Z ed $
 .\"
 .Dd October 27, 2011
 .Dt GETUTXENT 3
@@ -423,7 +423,7 @@
 .Xr tty 4 ,
 .Xr ac 8 ,
 .Xr newsyslog 8 ,
-.Xr utxrm 8
+.Xr utx 8
 .Sh STANDARDS
 The
 .Fn endutxent ,
--- a/head/lib/libc/gen/getutxent.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/getutxent.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libc/gen/getutxent.c 231514 2012-02-11 11:11:13Z ed $");
 
 #include "namespace.h"
 #include <sys/endian.h>
@@ -70,13 +70,18 @@
 	if (uf == NULL)
 		return (-1);
 
-	/* Safety check: never use broken files. */
-	if (db != UTXDB_LOG && _fstat(fileno(uf), &sb) != -1 &&
-	    sb.st_size % sizeof(struct futx) != 0) {
-		fclose(uf);
-		uf = NULL;
-		errno = EFTYPE;
-		return (-1);
+	if (db != UTXDB_LOG) {
+		/* Safety check: never use broken files. */
+		if (_fstat(fileno(uf), &sb) != -1 &&
+		    sb.st_size % sizeof(struct futx) != 0) {
+			fclose(uf);
+			uf = NULL;
+			errno = EFTYPE;
+			return (-1);
+		}
+		/* Prevent reading of partial records. */
+		(void)setvbuf(uf, NULL, _IOFBF,
+		    rounddown(BUFSIZ, sizeof(struct futx)));
 	}
 
 	udb = db;
--- a/head/lib/libc/gen/opendir.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/opendir.c	Fri Mar 02 16:56:02 2012 +0200
@@ -31,7 +31,7 @@
 static char sccsid[] = "@(#)opendir.c	8.8 (Berkeley) 5/1/95";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/gen/opendir.c 227852 2011-11-22 23:46:56Z jilles $");
+__FBSDID("$FreeBSD: head/lib/libc/gen/opendir.c 232385 2012-03-02 10:03:38Z ru $");
 
 #include "namespace.h"
 #include <sys/param.h>
@@ -66,7 +66,17 @@
 DIR *
 fdopendir(int fd)
 {
+	struct stat statb;
 
+	/* Check that fd is associated with a directory. */
+	if (_fstat(fd, &statb) != 0)
+		return (NULL);
+	if (!S_ISDIR(statb.st_mode)) {
+		errno = ENOTDIR;
+		return (NULL);
+	}
+	if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
+		return (NULL);
 	return (__opendir_common(fd, NULL, DTF_HIDEW|DTF_NODUP));
 }
 
@@ -74,21 +84,11 @@
 __opendir2(const char *name, int flags)
 {
 	int fd;
-	struct stat statb;
 	DIR *dir;
 	int saved_errno;
 
-	/*
-	 * stat() before _open() because opening of special files may be
-	 * harmful.
-	 */
-	if (stat(name, &statb) != 0)
-		return (NULL);
-	if (!S_ISDIR(statb.st_mode)) {
-		errno = ENOTDIR;
-		return (NULL);
-	}
-	if ((fd = _open(name, O_RDONLY | O_NONBLOCK | O_DIRECTORY)) == -1)
+	if ((fd = _open(name,
+	    O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC)) == -1)
 		return (NULL);
 
 	dir = __opendir_common(fd, name, flags);
@@ -119,19 +119,9 @@
 	int saved_errno;
 	int unionstack;
 	int fd2;
-	struct stat statb;
 
-	dirp = NULL;
-	/* _fstat() the open handler because the file may have changed.  */
-	if (_fstat(fd, &statb) != 0)
-		goto fail;
-	if (!S_ISDIR(statb.st_mode)) {
-		errno = ENOTDIR;
-		goto fail;
-	}
-	if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 ||
-	    (dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL)
-		goto fail;
+	if ((dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL)
+		return (NULL);
 
 	dirp->dd_td = (struct _telldir *)((char *)dirp + sizeof(DIR));
 	LIST_INIT(&dirp->dd_td->td_locq);
--- a/head/lib/libc/gen/sem.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/sem.c	Fri Mar 02 16:56:02 2012 +0200
@@ -27,7 +27,7 @@
  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: head/lib/libc/gen/sem.c 230201 2012-01-16 06:15:14Z davidxu $
+ * $FreeBSD: head/lib/libc/gen/sem.c 232144 2012-02-25 02:12:17Z davidxu $
  */
 
 /*
@@ -312,15 +312,24 @@
 }
 
 static int
-_umtx_wait_uint(volatile unsigned *mtx, unsigned id, const struct timespec *timeout)
+_umtx_wait_uint(volatile unsigned *mtx, unsigned id, const struct timespec *abstime)
 {
-	if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 &&
-	    timeout->tv_nsec <= 0))) {
-		errno = ETIMEDOUT;
-		return (-1);
+	struct _umtx_time *tm_p, timeout;
+	size_t tm_size;
+
+	if (abstime == NULL) {
+		tm_p = NULL;
+		tm_size = 0;
+	} else {
+		timeout._clockid = CLOCK_REALTIME;
+		timeout._flags = UMTX_ABSTIME;
+		timeout._timeout = *abstime;
+		tm_p = &timeout;
+		tm_size = sizeof(timeout);
 	}
 	return _umtx_op(__DEVOLATILE(void *, mtx),
-		UMTX_OP_WAIT_UINT_PRIVATE, id, NULL, __DECONST(void*, timeout));
+		UMTX_OP_WAIT_UINT_PRIVATE, id, 
+		(void *)tm_size, __DECONST(void*, tm_p));
 }
 
 static int
@@ -355,7 +364,6 @@
 _libc_sem_timedwait_compat(sem_t * __restrict sem,
 	const struct timespec * __restrict abstime)
 {
-	struct timespec ts, ts2;
 	int val, retval;
 
 	if (sem_check_validity(sem) != 0)
@@ -384,13 +392,11 @@
 				errno = EINVAL;
 				return (-1);
 			}
-			clock_gettime(CLOCK_REALTIME, &ts);
-	                TIMESPEC_SUB(&ts2, abstime, &ts);
 		}
 		atomic_add_int(&(*sem)->nwaiters, 1);
 		pthread_cleanup_push(sem_cancel_handler, sem);
 		_pthread_cancel_enter(1);
-		retval = _umtx_wait_uint(&(*sem)->count, 0, abstime ? &ts2 : NULL);
+		retval = _umtx_wait_uint(&(*sem)->count, 0, abstime);
 		_pthread_cancel_leave(0);
 		pthread_cleanup_pop(0);
 		atomic_add_int(&(*sem)->nwaiters, -1);
--- a/head/lib/libc/gen/sem_new.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/sem_new.c	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: head/lib/libc/gen/sem_new.c 230201 2012-01-16 06:15:14Z davidxu $
+ * $FreeBSD: head/lib/libc/gen/sem_new.c 232144 2012-02-25 02:12:17Z davidxu $
  */
 
 #include "namespace.h"
@@ -339,15 +339,23 @@
 }
 
 static __inline int
-usem_wait(struct _usem *sem, const struct timespec *timeout)
+usem_wait(struct _usem *sem, const struct timespec *abstime)
 {
-	if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 &&
-	    timeout->tv_nsec <= 0))) {
-		errno = ETIMEDOUT;
-		return (-1);
+	struct _umtx_time *tm_p, timeout;
+	size_t tm_size;
+
+	if (abstime == NULL) {
+		tm_p = NULL;
+		tm_size = 0;
+	} else {
+		timeout._clockid = CLOCK_REALTIME;
+		timeout._flags = UMTX_ABSTIME;
+		timeout._timeout = *abstime;
+		tm_p = &timeout;
+		tm_size = sizeof(timeout);
 	}
-	return _umtx_op(sem, UMTX_OP_SEM_WAIT, 0, NULL,
-			__DECONST(void*, timeout));
+	return _umtx_op(sem, UMTX_OP_SEM_WAIT, 0, 
+		    (void *)tm_size, __DECONST(void*, tm_p));
 }
 
 int
@@ -381,7 +389,6 @@
 _sem_timedwait(sem_t * __restrict sem,
 	const struct timespec * __restrict abstime)
 {
-	struct timespec ts, ts2;
 	int val, retval;
 
 	if (sem_check_validity(sem) != 0)
@@ -408,11 +415,9 @@
 				errno = EINVAL;
 				return (-1);
 			}
-			clock_gettime(CLOCK_REALTIME, &ts);
-			TIMESPEC_SUB(&ts2, abstime, &ts);
 		}
 		_pthread_cancel_enter(1);
-		retval = usem_wait(&sem->_kern, abstime ? &ts2 : NULL);
+		retval = usem_wait(&sem->_kern, abstime);
 		_pthread_cancel_leave(0);
 	}
 	return (retval);
--- a/head/lib/libc/gen/sysctl.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/gen/sysctl.3	Fri Mar 02 16:56:02 2012 +0200
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/gen/sysctl.3 231505 2012-02-11 06:02:16Z bz $
 .\"
-.Dd April 25, 2010
+.Dd February 11, 2012
 .Dt SYSCTL 3
 .Os
 .Sh NAME
@@ -554,6 +554,7 @@
 .It "NET_RT_DUMP	None"
 .It "NET_RT_IFLIST	0 or if_index"
 .It "NET_RT_IFMALIST	0 or if_index"
+.It "NET_RT_IFLISTL	0 or if_index"
 .El
 .Pp
 The
@@ -561,6 +562,19 @@
 name returns information about multicast group memberships on all interfaces
 if 0 is specified, or for the interface specified by
 .Va if_index .
+.Pp
+The
+.Dv NET_RT_IFLISTL
+is like
+.Dv NET_RT_IFLIST ,
+just returning message header structs with additional fields allowing the
+interface to be extended without breaking binary compatibility.
+The
+.Dv NET_RT_IFLISTL
+uses 'l' versions of the message header structures:
+.Va struct if_msghdrl
+and
+.Va struct ifa_msghdrl .
 .It Li PF_INET
 Get or set various global information about the IPv4
 (Internet Protocol version 4).
--- a/head/lib/libc/i386/gen/getcontextx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/i386/gen/getcontextx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/i386/gen/getcontextx.c 230429 2012-01-21 18:00:28Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/i386/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
@@ -38,7 +38,7 @@
 
 static int xstate_sz = -1;
 
-size_t
+int
 __getcontextx_size(void)
 {
 	u_int p[4];
--- a/head/lib/libc/ia64/gen/getcontextx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/ia64/gen/getcontextx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,14 +25,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/ia64/gen/getcontextx.c 230429 2012-01-21 18:00:28Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/ia64/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
 #include <errno.h>
 #include <stdlib.h>
 
-size_t
+int
 __getcontextx_size(void)
 {
 
--- a/head/lib/libc/include/libc_private.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/include/libc_private.h	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/lib/libc/include/libc_private.h 228843 2011-12-23 15:00:37Z cperciva $
+ * $FreeBSD: head/lib/libc/include/libc_private.h 231868 2012-02-17 10:49:29Z kib $
  *
  * Private definitions for libc, libc_r and libpthread.
  *
@@ -44,6 +44,15 @@
 extern int	__isthreaded;
 
 /*
+ * Elf_Auxinfo *__elf_aux_vector, the pointer to the ELF aux vector
+ * provided by kernel. Either set for us by rtld, or found at runtime
+ * on stack for static binaries.
+ *
+ * Type is void to avoid polluting whole libc with ELF types.
+ */
+extern void	*__elf_aux_vector;
+
+/*
  * libc should use libc_dlopen internally, which respects a global
  * flag where loading of new shared objects can be restricted.
  */
@@ -229,6 +238,7 @@
 int _elf_aux_info(int aux, void *buf, int buflen);
 struct dl_phdr_info;
 int __elf_phdr_match_addr(struct dl_phdr_info *, void *);
+void __init_elf_aux_vector(void);
 
 void	_pthread_cancel_enter(int);
 void	_pthread_cancel_leave(int);
--- a/head/lib/libc/locale/Symbol.map	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/locale/Symbol.map	Fri Mar 02 16:56:02 2012 +0200
@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: head/lib/libc/locale/Symbol.map 227753 2011-11-20 14:45:42Z theraven $
+ * $FreeBSD: head/lib/libc/locale/Symbol.map 231714 2012-02-14 21:48:46Z dim $
  */
 
 FBSD_1.0 {
--- a/head/lib/libc/locale/btowc.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/locale/btowc.3	Fri Mar 02 16:56:02 2012 +0200
@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/locale/btowc.3 231632 2012-02-14 02:03:17Z delphij $
 .\"
-.Dd August 3, 2002
+.Dd February 13, 2012
 .Dt BTOWC 3
 .Os
 .Sh NAME
@@ -58,7 +58,7 @@
 or not able to be represented as a single byte in the initial shift state,
 .Fn wctob
 returns
-.Dv WEOF .
+.Dv EOF .
 .Sh SEE ALSO
 .Xr mbrtowc 3 ,
 .Xr multibyte 3 ,
--- a/head/lib/libc/locale/setrunelocale.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/locale/setrunelocale.c	Fri Mar 02 16:56:02 2012 +0200
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/locale/setrunelocale.c 227753 2011-11-20 14:45:42Z theraven $");
+__FBSDID("$FreeBSD: head/lib/libc/locale/setrunelocale.c 231714 2012-02-14 21:48:46Z dim $");
 
 #include <runetype.h>
 #include <errno.h>
--- a/head/lib/libc/locale/table.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/locale/table.c	Fri Mar 02 16:56:02 2012 +0200
@@ -39,7 +39,7 @@
 static char sccsid[] = "@(#)table.c	8.1 (Berkeley) 6/27/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/locale/table.c 227753 2011-11-20 14:45:42Z theraven $");
+__FBSDID("$FreeBSD: head/lib/libc/locale/table.c 231714 2012-02-14 21:48:46Z dim $");
 
 #include <ctype.h>
 #include <runetype.h>
--- a/head/lib/libc/locale/xlocale.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/locale/xlocale.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/lib/libc/locale/xlocale.c 227818 2011-11-22 14:11:42Z theraven $
+ * $FreeBSD: head/lib/libc/locale/xlocale.c 231714 2012-02-14 21:48:46Z dim $
  */
 
 #include <pthread.h>
--- a/head/lib/libc/locale/xlocale_private.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/locale/xlocale_private.h	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/lib/libc/locale/xlocale_private.h 227753 2011-11-20 14:45:42Z theraven $
+ * $FreeBSD: head/lib/libc/locale/xlocale_private.h 231714 2012-02-14 21:48:46Z dim $
  */
 
 #ifndef _XLOCALE_PRIVATE__H_
--- a/head/lib/libc/mips/gen/getcontextx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/mips/gen/getcontextx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,14 +25,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/mips/gen/getcontextx.c 230429 2012-01-21 18:00:28Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/mips/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
 #include <errno.h>
 #include <stdlib.h>
 
-size_t
+int
 __getcontextx_size(void)
 {
 
--- a/head/lib/libc/net/eui64.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/net/eui64.3	Fri Mar 02 16:56:02 2012 +0200
@@ -54,7 +54,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/net/eui64.3 231196 2012-02-08 11:30:13Z brooks $
 .\"
 .Dd March 4, 2004
 .Dt EUI64 3
@@ -221,10 +221,3 @@
 They are derived from the
 .Xr ethers 3
 family of functions.
-.Sh BUGS
-The
-.Fn eui64_aton
-and
-.Fn eui64_ntoa
-functions returns values that are stored in static memory areas
-which may be overwritten the next time they are called.
--- a/head/lib/libc/net/getifaddrs.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/net/getifaddrs.c	Fri Mar 02 16:56:02 2012 +0200
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/net/getifaddrs.c 228571 2011-12-16 12:16:56Z glebius $");
+__FBSDID("$FreeBSD: head/lib/libc/net/getifaddrs.c 231506 2012-02-11 06:05:40Z bz $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -72,19 +72,6 @@
 #define	ALIGN(p)	(((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES)
 #endif
 
-#if	_BSDI_VERSION >= 199701
-#define	HAVE_IFM_DATA
-#endif
-
-#if	(_BSDI_VERSION >= 199802) || (__FreeBSD_version >= 1000003) 
-/* ifam_data is very specific to recent versions of bsdi */
-#define	HAVE_IFAM_DATA
-#endif
-
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
-#define	HAVE_IFM_DATA
-#endif
-
 #define MAX_SYSCTL_TRY 5
 
 int
@@ -93,7 +80,6 @@
 	int icnt = 1;
 	int dcnt = 0;
 	int ncnt = 0;
-#ifdef	NET_RT_IFLIST
 	int ntry = 0;
 	int mib[6];
 	size_t needed;
@@ -102,30 +88,23 @@
 	struct ifaddrs *cif = 0;
 	char *p, *p0;
 	struct rt_msghdr *rtm;
-	struct if_msghdr *ifm;
-	struct ifa_msghdr *ifam;
+	struct if_msghdrl *ifm;
+	struct ifa_msghdrl *ifam;
 	struct sockaddr_dl *dl;
 	struct sockaddr *sa;
 	struct ifaddrs *ifa, *ift;
+	struct if_data *if_data;
 	u_short idx = 0;
-#else	/* NET_RT_IFLIST */
-	char buf[1024];
-	int m, sock;
-	struct ifconf ifc;
-	struct ifreq *ifr;
-	struct ifreq *lifr;
-#endif	/* NET_RT_IFLIST */
 	int i;
 	size_t len, alen;
 	char *data;
 	char *names;
 
-#ifdef	NET_RT_IFLIST
 	mib[0] = CTL_NET;
 	mib[1] = PF_ROUTE;
 	mib[2] = 0;             /* protocol */
 	mib[3] = 0;             /* wildcard address family */
-	mib[4] = NET_RT_IFLIST;
+	mib[4] = NET_RT_IFLISTL;/* extra fields for extensible msghdr structs */
 	mib[5] = 0;             /* no flags */
 	do {
 		/*
@@ -159,34 +138,33 @@
 			continue;
 		switch (rtm->rtm_type) {
 		case RTM_IFINFO:
-			ifm = (struct if_msghdr *)(void *)rtm;
+			ifm = (struct if_msghdrl *)(void *)rtm;
 			if (ifm->ifm_addrs & RTA_IFP) {
 				idx = ifm->ifm_index;
 				++icnt;
-				dl = (struct sockaddr_dl *)(void *)(ifm + 1);
+				if_data = IF_MSGHDRL_IFM_DATA(ifm);
+				dcnt += if_data->ifi_datalen;
+				dl = (struct sockaddr_dl *)IF_MSGHDRL_RTA(ifm);
 				dcnt += SA_RLEN((struct sockaddr *)(void*)dl) +
 				    ALIGNBYTES;
-#ifdef	HAVE_IFM_DATA
-				dcnt += sizeof(ifm->ifm_data);
-#endif	/* HAVE_IFM_DATA */
 				ncnt += dl->sdl_nlen + 1;
 			} else
 				idx = 0;
 			break;
 
 		case RTM_NEWADDR:
-			ifam = (struct ifa_msghdr *)(void *)rtm;
+			ifam = (struct ifa_msghdrl *)(void *)rtm;
 			if (idx && ifam->ifam_index != idx)
 				abort();	/* this cannot happen */
 
 #define	RTA_MASKS	(RTA_NETMASK | RTA_IFA | RTA_BRD)
 			if (idx == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0)
 				break;
-			p = (char *)(void *)(ifam + 1);
+			p = (char *)IFA_MSGHDRL_RTA(ifam);
 			++icnt;
-#ifdef	HAVE_IFAM_DATA
-			dcnt += sizeof(ifam->ifam_data) + ALIGNBYTES;
-#endif	/* HAVE_IFAM_DATA */
+			if_data = IFA_MSGHDRL_IFAM_DATA(ifam);
+			dcnt += if_data->ifi_datalen + ALIGNBYTES;
+
 			/* Scan to look for length of address */
 			alen = 0;
 			for (p0 = p, i = 0; i < RTAX_MAX; i++) {
@@ -216,34 +194,6 @@
 			break;
 		}
 	}
-#else	/* NET_RT_IFLIST */
-	ifc.ifc_buf = buf;
-	ifc.ifc_len = sizeof(buf);
-
-	if ((sock = _socket(AF_INET, SOCK_STREAM, 0)) < 0)
-		return (-1);
-	i =  _ioctl(sock, SIOCGIFCONF, (char *)&ifc);
-	_close(sock);
-	if (i < 0)
-		return (-1);
-
-	ifr = ifc.ifc_req;
-	lifr = (struct ifreq *)&ifc.ifc_buf[ifc.ifc_len];
-
-	while (ifr < lifr) {
-		struct sockaddr *sa;
-
-		sa = &ifr->ifr_addr;
-		++icnt;
-		dcnt += SA_RLEN(sa);
-		ncnt += sizeof(ifr->ifr_name) + 1;
-		
-		if (SA_LEN(sa) < sizeof(*sa))
-			ifr = (struct ifreq *)(((char *)sa) + sizeof(*sa));
-		else
-			ifr = (struct ifreq *)(((char *)sa) + SA_LEN(sa));
-	}
-#endif	/* NET_RT_IFLIST */
 
 	if (icnt + dcnt + ncnt == 1) {
 		*pif = NULL;
@@ -263,7 +213,6 @@
 	memset(ifa, 0, sizeof(struct ifaddrs) * icnt);
 	ift = ifa;
 
-#ifdef	NET_RT_IFLIST
 	idx = 0;
 	for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
 		rtm = (struct rt_msghdr *)(void *)next;
@@ -271,41 +220,38 @@
 			continue;
 		switch (rtm->rtm_type) {
 		case RTM_IFINFO:
-			ifm = (struct if_msghdr *)(void *)rtm;
-			if (ifm->ifm_addrs & RTA_IFP) {
-				idx = ifm->ifm_index;
-				dl = (struct sockaddr_dl *)(void *)(ifm + 1);
+			ifm = (struct if_msghdrl *)(void *)rtm;
+			if ((ifm->ifm_addrs & RTA_IFP) == 0) {
+				idx = 0;
+				break;
+			}
 
-				cif = ift;
-				ift->ifa_name = names;
-				ift->ifa_flags = (int)ifm->ifm_flags;
-				memcpy(names, dl->sdl_data,
-				    (size_t)dl->sdl_nlen);
-				names[dl->sdl_nlen] = 0;
-				names += dl->sdl_nlen + 1;
+			idx = ifm->ifm_index;
+			dl = (struct sockaddr_dl *)IF_MSGHDRL_RTA(ifm);
 
-				ift->ifa_addr = (struct sockaddr *)(void *)data;
-				memcpy(data, dl,
-				    (size_t)SA_LEN((struct sockaddr *)
-				    (void *)dl));
-				data += SA_RLEN((struct sockaddr *)(void *)dl);
+			cif = ift;
+			ift->ifa_name = names;
+			ift->ifa_flags = (int)ifm->ifm_flags;
+			memcpy(names, dl->sdl_data, (size_t)dl->sdl_nlen);
+			names[dl->sdl_nlen] = 0;
+			names += dl->sdl_nlen + 1;
 
-#ifdef	HAVE_IFM_DATA
-				/* ifm_data needs to be aligned */
-				ift->ifa_data = data = (void *)ALIGN(data);
-				memcpy(data, &ifm->ifm_data, sizeof(ifm->ifm_data));
- 				data += sizeof(ifm->ifm_data);
-#else	/* HAVE_IFM_DATA */
-				ift->ifa_data = NULL;
-#endif	/* HAVE_IFM_DATA */
+			ift->ifa_addr = (struct sockaddr *)(void *)data;
+			memcpy(data, dl, (size_t)SA_LEN((struct sockaddr *)
+			    (void *)dl));
+			data += SA_RLEN((struct sockaddr *)(void *)dl);
 
-				ift = (ift->ifa_next = ift + 1);
-			} else
-				idx = 0;
+			if_data = IF_MSGHDRL_IFM_DATA(ifm);
+			/* ifm_data needs to be aligned */
+			ift->ifa_data = data = (void *)ALIGN(data);
+			memcpy(data, if_data, if_data->ifi_datalen);
+			data += if_data->ifi_datalen;
+
+			ift = (ift->ifa_next = ift + 1);
 			break;
 
 		case RTM_NEWADDR:
-			ifam = (struct ifa_msghdr *)(void *)rtm;
+			ifam = (struct ifa_msghdrl *)(void *)rtm;
 			if (idx && ifam->ifam_index != idx)
 				abort();	/* this cannot happen */
 
@@ -314,7 +260,8 @@
 			ift->ifa_name = cif->ifa_name;
 			ift->ifa_flags = cif->ifa_flags;
 			ift->ifa_data = NULL;
-			p = (char *)(void *)(ifam + 1);
+
+			p = (char *)IFA_MSGHDRL_RTA(ifam);
 			/* Scan to look for length of address */
 			alen = 0;
 			for (p0 = p, i = 0; i < RTAX_MAX; i++) {
@@ -365,12 +312,11 @@
 				p += len;
 			}
 
-#ifdef	HAVE_IFAM_DATA
+			if_data = IFA_MSGHDRL_IFAM_DATA(ifam);
 			/* ifam_data needs to be aligned */
 			ift->ifa_data = data = (void *)ALIGN(data);
-			memcpy(data, &ifam->ifam_data, sizeof(ifam->ifam_data));
-			data += sizeof(ifam->ifam_data);
-#endif	/* HAVE_IFAM_DATA */
+			memcpy(data, if_data, if_data->ifi_datalen);
+			data += if_data->ifi_datalen;
 
 			ift = (ift->ifa_next = ift + 1);
 			break;
@@ -378,28 +324,7 @@
 	}
 
 	free(buf);
-#else	/* NET_RT_IFLIST */
-	ifr = ifc.ifc_req;
-	lifr = (struct ifreq *)&ifc.ifc_buf[ifc.ifc_len];
 
-	while (ifr < lifr) {
-		struct sockaddr *sa;
-
-		ift->ifa_name = names;
-		names[sizeof(ifr->ifr_name)] = 0;
-		strncpy(names, ifr->ifr_name, sizeof(ifr->ifr_name));
-		while (*names++)
-			;
-
-		ift->ifa_addr = (struct sockaddr *)data;
-		sa = &ifr->ifr_addr;
-		memcpy(data, sa, SA_LEN(sa));
-		data += SA_RLEN(sa);
-		
-		ifr = (struct ifreq *)(((char *)sa) + SA_LEN(sa));
-		ift = (ift->ifa_next = ift + 1);
-	}
-#endif	/* NET_RT_IFLIST */
 	if (--ift >= ifa) {
 		ift->ifa_next = NULL;
 		*pif = ifa;
--- a/head/lib/libc/net/nsdispatch.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/net/nsdispatch.3	Fri Mar 02 16:56:02 2012 +0200
@@ -30,7 +30,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/net/nsdispatch.3 231564 2012-02-12 18:29:56Z ed $
 .\"
 .Dd April 4, 2010
 .Dt NSDISPATCH 3
@@ -129,7 +129,7 @@
 .Bd -literal -offset indent
 typedef struct _ns_src {
 	const char	*src;
-	u_int32_t	 flags;
+	uint32_t	 flags;
 } ns_src;
 .Ed
 .Bd -ragged -offset indent
--- a/head/lib/libc/powerpc/SYS.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/powerpc/SYS.h	Fri Mar 02 16:56:02 2012 +0200
@@ -27,44 +27,44 @@
  * SUCH DAMAGE.
  *
  *	$NetBSD: SYS.h,v 1.8 2002/01/14 00:55:56 thorpej Exp $
- * $FreeBSD: head/lib/libc/powerpc/SYS.h 229693 2012-01-06 09:21:40Z andreast $
+ * $FreeBSD: head/lib/libc/powerpc/SYS.h 231044 2012-02-05 20:04:43Z andreast $
  */
 
 #include <sys/syscall.h>
 #include <machine/asm.h>
 
-#define _SYSCALL(x)						\
+#define	_SYSCALL(name)						\
 	.text;							\
 	.align 2;						\
-	li	0,(__CONCAT(SYS_,x));				\
+	li	0,(__CONCAT(SYS_, name));			\
 	sc
 
-#define	SYSCALL(x)						\
+#define	SYSCALL(name)						\
 	.text;							\
 	.align 2;						\
 2:	b	PIC_PLT(CNAME(HIDENAME(cerror)));		\
-ENTRY(__CONCAT(__sys_,x));					\
-	WEAK_ALIAS(x,__CONCAT(__sys_,x));			\
-	WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x));		\
-	_SYSCALL(x);						\
+ENTRY(__CONCAT(__sys_, name));				\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), name);		\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\
+	_SYSCALL(name);						\
 	bso	2b
 
-#define	PSEUDO(x)						\
+#define	PSEUDO(name)						\
 	.text;							\
 	.align 2;						\
-ENTRY(__CONCAT(__sys_,x));					\
-	WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x));		\
-	_SYSCALL(x);						\
+ENTRY(__CONCAT(__sys_, name));				\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\
+	_SYSCALL(name);						\
 	bnslr;							\
 	b	PIC_PLT(CNAME(HIDENAME(cerror)))
 
-#define	RSYSCALL(x)						\
+#define	RSYSCALL(name)						\
 	.text;							\
 	.align 2;						\
 2:	b	PIC_PLT(CNAME(HIDENAME(cerror)));		\
-ENTRY(__CONCAT(__sys_,x));					\
-	WEAK_ALIAS(x,__CONCAT(__sys_,x));			\
-	WEAK_ALIAS(__CONCAT(_,x), __CONCAT(__sys_,x));		\
-	_SYSCALL(x);						\
+ENTRY(__CONCAT(__sys_, name));				\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), name);		\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\
+	_SYSCALL(name);						\
 	bnslr;							\
 	b	PIC_PLT(CNAME(HIDENAME(cerror)))
--- a/head/lib/libc/powerpc/gen/getcontextx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/powerpc/gen/getcontextx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,14 +25,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/powerpc/gen/getcontextx.c 230429 2012-01-21 18:00:28Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/powerpc/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
 #include <errno.h>
 #include <stdlib.h>
 
-size_t
+int
 __getcontextx_size(void)
 {
 
--- a/head/lib/libc/powerpc/gen/setjmp.S	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/powerpc/gen/setjmp.S	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
 /*      $NetBSD: setjmp.S,v 1.3 1998/10/03 12:30:38 tsubai Exp $        */
 
 #include <machine/asm.h>
-__FBSDID("$FreeBSD: head/lib/libc/powerpc/gen/setjmp.S 229806 2012-01-08 11:57:38Z andreast $");
+__FBSDID("$FreeBSD: head/lib/libc/powerpc/gen/setjmp.S 231044 2012-02-05 20:04:43Z andreast $");
 
 #include <sys/syscall.h>
 	
@@ -69,7 +69,7 @@
 	li	%r3,0			/* return (0) */
 	blr
 
-	WEAK_ALIAS(longjmp, __longjmp)
+	WEAK_REFERENCE(CNAME(__longjmp), longjmp)
 ENTRY(__longjmp)
 	lmw	%r9,20(%r3)		/* restore regs */
 	mr	%r6,%r4			/* save val param */
--- a/head/lib/libc/powerpc64/SYS.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/powerpc64/SYS.h	Fri Mar 02 16:56:02 2012 +0200
@@ -27,19 +27,19 @@
  * SUCH DAMAGE.
  *
  *	$NetBSD: SYS.h,v 1.8 2002/01/14 00:55:56 thorpej Exp $
- * $FreeBSD: head/lib/libc/powerpc64/SYS.h 229693 2012-01-06 09:21:40Z andreast $
+ * $FreeBSD: head/lib/libc/powerpc64/SYS.h 231044 2012-02-05 20:04:43Z andreast $
  */
 
 #include <sys/syscall.h>
 #include <machine/asm.h>
 
-#define _SYSCALL(x)						\
+#define	_SYSCALL(name)						\
 	.text;							\
 	.align 2;						\
-	li	0,(__CONCAT(SYS_,x));				\
+	li	0,(__CONCAT(SYS_, name));			\
 	sc
 
-#define	SYSCALL(x)						\
+#define	SYSCALL(name)						\
 	.text;							\
 	.align 2;						\
 2:	mflr	%r0;						\
@@ -51,18 +51,18 @@
 	ld	%r0,16(%r1);					\
 	mtlr	%r0;						\
 	blr;							\
-ENTRY(__CONCAT(__sys_,x));					\
-	WEAK_ALIAS(x,__CONCAT(__sys_,x));			\
-	WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x));		\
-	_SYSCALL(x);						\
+ENTRY(__CONCAT(__sys_, name));						\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), name);			\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name)); 	\
+	_SYSCALL(name);							\
 	bso	2b
 
-#define	PSEUDO(x)						\
+#define	PSEUDO(name)						\
 	.text;							\
 	.align 2;						\
-ENTRY(__CONCAT(__sys_,x));					\
-	WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x));		\
-	_SYSCALL(x);						\
+ENTRY(__CONCAT(__sys_, name));					\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));   \
+	_SYSCALL(name);						\
 	bnslr;							\
 	mflr	%r0;						\
 	std	%r0,16(%r1);					\
@@ -74,13 +74,13 @@
 	mtlr	%r0;						\
 	blr;
 
-#define	RSYSCALL(x)						\
+#define	RSYSCALL(name)						\
 	.text;							\
 	.align 2;						\
-ENTRY(__CONCAT(__sys_,x));					\
-	WEAK_ALIAS(x,__CONCAT(__sys_,x));			\
-	WEAK_ALIAS(__CONCAT(_,x), __CONCAT(__sys_,x));		\
-	_SYSCALL(x);						\
+ENTRY(__CONCAT(__sys_, name));					\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), name);		\
+	WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\
+	_SYSCALL(name);						\
 	bnslr;							\
 								\
 	mflr	%r0;						\
--- a/head/lib/libc/powerpc64/gen/getcontextx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/powerpc64/gen/getcontextx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,14 +25,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/powerpc64/gen/getcontextx.c 230429 2012-01-21 18:00:28Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/powerpc64/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
 #include <errno.h>
 #include <stdlib.h>
 
-size_t
+int
 __getcontextx_size(void)
 {
 
--- a/head/lib/libc/powerpc64/gen/setjmp.S	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/powerpc64/gen/setjmp.S	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
 /*      $NetBSD: setjmp.S,v 1.3 1998/10/03 12:30:38 tsubai Exp $        */
 
 #include <machine/asm.h>
-__FBSDID("$FreeBSD: head/lib/libc/powerpc64/gen/setjmp.S 229806 2012-01-08 11:57:38Z andreast $");
+__FBSDID("$FreeBSD: head/lib/libc/powerpc64/gen/setjmp.S 231044 2012-02-05 20:04:43Z andreast $");
 
 #include <sys/syscall.h>
 	
@@ -93,7 +93,7 @@
 	li	%r3,0			/* return (0) */
 	blr
 
-	WEAK_ALIAS(longjmp, __longjmp)
+	WEAK_REFERENCE(__longjmp, longjmp)
 ENTRY(__longjmp)
 	ld	%r9,40 + 0*8(%r3)
 	ld	%r10,40 + 1*8(%r3)
--- a/head/lib/libc/rpc/Makefile.inc	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/rpc/Makefile.inc	Fri Mar 02 16:56:02 2012 +0200
@@ -1,5 +1,5 @@
 #	@(#)Makefile    5.11 (Berkeley) 9/6/90
-# $FreeBSD$
+# $FreeBSD: head/lib/libc/rpc/Makefile.inc 231118 2012-02-07 09:27:07Z dim $
 
 .PATH: ${.CURDIR}/rpc ${.CURDIR}/.
 SRCS+=	auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \
@@ -34,7 +34,7 @@
 CLEANFILES+= crypt_clnt.c crypt_xdr.c crypt.h
 
 RPCDIR= ${DESTDIR}/usr/include/rpcsvc
-RPCGEN= rpcgen -C
+RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C
 
 crypt_clnt.c: ${RPCDIR}/crypt.x crypt.h
 	${RPCGEN} -l -o ${.TARGET} ${RPCDIR}/crypt.x
--- a/head/lib/libc/rpc/rpc.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/rpc/rpc.3	Fri Mar 02 16:56:02 2012 +0200
@@ -1,7 +1,7 @@
 .\" @(#)rpc.3n 1.31 93/08/31 SMI; from SVr4
 .\" Copyright 1989 AT&T
 .\" $NetBSD: rpc.3,v 1.10 2000/06/02 23:11:12 fvdl Exp $
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/rpc/rpc.3 231564 2012-02-12 18:29:56Z ed $
 .Dd May 7, 1993
 .Dt RPC 3
 .Os
@@ -119,12 +119,12 @@
 .Sh Derived Types
 The derived types used in the RPC interfaces are defined as follows:
 .Bd -literal
-	typedef u_int32_t rpcprog_t;
-	typedef u_int32_t rpcvers_t;
-	typedef u_int32_t rpcproc_t;
-	typedef u_int32_t rpcprot_t;
-	typedef u_int32_t rpcport_t;
-	typedef   int32_t rpc_inline_t;
+	typedef uint32_t rpcprog_t;
+	typedef uint32_t rpcvers_t;
+	typedef uint32_t rpcproc_t;
+	typedef uint32_t rpcprot_t;
+	typedef uint32_t rpcport_t;
+	typedef int32_t  rpc_inline_t;
 .Ed
 .Sh "Data Structures"
 Some of the data structures used by the
--- a/head/lib/libc/rpc/rpc_clnt_create.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/rpc/rpc_clnt_create.3	Fri Mar 02 16:56:02 2012 +0200
@@ -3,7 +3,7 @@
 .\" @(#)rpc_clnt_create 1.5 89/07/24 SMI;
 .\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
 .\" $NetBSD: rpc_clnt_create.3,v 1.2 2000/06/20 00:53:08 fvdl Exp $
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/rpc/rpc_clnt_create.3 231564 2012-02-12 18:29:56Z ed $
 .Dd May 7, 1993
 .Dt RPC_CLNT_CREATE 3
 .Os
@@ -106,10 +106,10 @@
 .It Dv CLGET_FD Ta "int *" Ta "get fd from handle"
 .It Dv CLSET_FD_CLOSE Ta "void" Ta "close fd on destroy"
 .It Dv CLSET_FD_NCLOSE Ta void Ta "do not close fd on destroy"
-.It Dv CLGET_VERS Ta "u_int32_t *" Ta "get RPC program version"
-.It Dv CLSET_VERS Ta "u_int32_t *" Ta "set RPC program version"
-.It Dv CLGET_XID Ta "u_int32_t *" Ta "get XID of previous call"
-.It Dv CLSET_XID Ta "u_int32_t *" Ta "set XID of next call"
+.It Dv CLGET_VERS Ta "uint32_t *" Ta "get RPC program version"
+.It Dv CLSET_VERS Ta "uint32_t *" Ta "set RPC program version"
+.It Dv CLGET_XID Ta "uint32_t *" Ta "get XID of previous call"
+.It Dv CLSET_XID Ta "uint32_t *" Ta "set XID of next call"
 .El
 .Pp
 The following operations are valid for connectionless transports only:
--- a/head/lib/libc/sparc64/gen/getcontextx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sparc64/gen/getcontextx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,14 +25,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libc/sparc64/gen/getcontextx.c 230429 2012-01-21 18:00:28Z kib $");
+__FBSDID("$FreeBSD: head/lib/libc/sparc64/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
 #include <errno.h>
 #include <stdlib.h>
 
-size_t
+int
 __getcontextx_size(void)
 {
 
--- a/head/lib/libc/string/strerror.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/string/strerror.3	Fri Mar 02 16:56:02 2012 +0200
@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)strerror.3	8.1 (Berkeley) 6/9/93
-.\" $FreeBSD: head/lib/libc/string/strerror.3 220376 2011-04-05 21:56:05Z jilles $
+.\" $FreeBSD: head/lib/libc/string/strerror.3 231813 2012-02-16 05:06:07Z eadler $
 .\"
 .Dd April 5, 2011
 .Dt STRERROR 3
@@ -147,6 +147,7 @@
 should be used instead.
 .Sh SEE ALSO
 .Xr intro 2 ,
+.Xr err 3 ,
 .Xr psignal 3
 .Sh STANDARDS
 The
--- a/head/lib/libc/sys/cap_enter.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/cap_enter.2	Fri Mar 02 16:56:02 2012 +0200
@@ -26,9 +26,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libc/sys/cap_enter.2 228040 2011-11-27 19:45:41Z rwatson $
+.\" $FreeBSD: head/lib/libc/sys/cap_enter.2 232157 2012-02-25 14:31:25Z gjb $
 .\"
-.Dd June 11, 2009
+.Dd February 25, 2012
 .Dt CAP_ENTER 2
 .Os
 .Sh NAME
@@ -68,7 +68,7 @@
 returns a flag indicating whether or not the process is in a capability mode
 sandbox.
 .Sh CAVEAT
-Creating effecive process sandboxes is a tricky process that involves
+Creating effective process sandboxes is a tricky process that involves
 identifying the least possible rights required by the process and then
 passing those rights into the process in a safe manner.
 See the CAVEAT
--- a/head/lib/libc/sys/getdirentries.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/getdirentries.2	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)getdirentries.2	8.2 (Berkeley) 5/3/95
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/sys/getdirentries.2 231564 2012-02-12 18:29:56Z ed $
 .\"
 .Dd May 3, 1995
 .Dt GETDIRENTRIES 2
@@ -71,10 +71,10 @@
 .Vt dirent
 structures each containing the following entries:
 .Bd -literal -offset indent
-u_int32_t d_fileno;
-u_int16_t d_reclen;
-u_int8_t  d_type;
-u_int8_t  d_namlen;
+uint32_t d_fileno;
+uint16_t d_reclen;
+uint8_t  d_type;
+uint8_t  d_namlen;
 char	d_name[MAXNAMELEN + 1];	/* see below */
 .Ed
 .Pp
--- a/head/lib/libc/sys/getsockopt.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/getsockopt.2	Fri Mar 02 16:56:02 2012 +0200
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)getsockopt.2	8.4 (Berkeley) 5/2/95
-.\" $FreeBSD: head/lib/libc/sys/getsockopt.2 227792 2011-11-21 14:36:19Z pluknet $
+.\" $FreeBSD: head/lib/libc/sys/getsockopt.2 232180 2012-02-26 13:57:24Z kib $
 .\"
-.Dd November 21, 2011
+.Dd February 26, 2012
 .Dt GETSOCKOPT 2
 .Os
 .Sh NAME
@@ -172,6 +172,8 @@
 .It Dv SO_BINTIME Ta "enables reception of a timestamp with datagrams"
 .It Dv SO_ACCEPTCONN Ta "get listening status of the socket (get only)"
 .It Dv SO_TYPE Ta "get the type of the socket (get only)"
+.It Dv SO_PROTOCOL Ta "get the protocol number for the socket (get only)"
+.It Dv SO_PROTOTYPE Ta "SunOS alias for the Linux SO_PROTOCOL (get only)"
 .It Dv SO_ERROR Ta "get and clear error on the socket (get only)"
 .It Dv SO_SETFIB Ta "set the associated FIB (routing table) for the socket (set only)"
 .El
@@ -449,7 +451,10 @@
 .Ed
 .Pp
 .Dv SO_ACCEPTCONN ,
-.Dv SO_TYPE
+.Dv SO_TYPE ,
+.Dv SO_PROTOCOL
+(and its alias
+.Dv SO_PROTOTYPE )
 and
 .Dv SO_ERROR
 are options used only with
@@ -463,6 +468,12 @@
 returns the type of the socket, such as
 .Dv SOCK_STREAM ;
 it is useful for servers that inherit sockets on startup.
+.Dv SO_PROTOCOL
+returns the protocol number for the socket, for
+.Dv AF_INET
+and
+.Dv AF_INET6
+address families.
 .Dv SO_ERROR
 returns any pending error on the socket and clears
 the error status.
--- a/head/lib/libc/sys/jail.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/jail.2	Fri Mar 02 16:56:02 2012 +0200
@@ -23,9 +23,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/sys/jail.2 231564 2012-02-12 18:29:56Z ed $
 .\"
-.Dd June 23, 2009
+.Dd February 8, 2012
 .Dt JAIL 2
 .Os
 .Sh NAME
@@ -59,7 +59,7 @@
 The argument is a pointer to a structure describing the prison:
 .Bd -literal -offset indent
 struct jail {
-	u_int32_t	version;
+	uint32_t	version;
 	char		*path;
 	char		*hostname;
 	char		*jailname;
@@ -400,6 +400,8 @@
 system calls
 will fail if:
 .Bl -tag -width Er
+.It Bq Er EPERM
+A user other than the super-user attempted to attach to or remove a jail.
 .It Bq Er EINVAL
 The jail specified by
 .Fa jid
--- a/head/lib/libc/sys/kqueue.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/kqueue.2	Fri Mar 02 16:56:02 2012 +0200
@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libc/sys/kqueue.2 228318 2011-12-07 11:06:18Z ru $
+.\" $FreeBSD: head/lib/libc/sys/kqueue.2 231777 2012-02-15 18:34:57Z delphij $
 .\"
-.Dd December 7, 2011
+.Dd February 15, 2012
 .Dt KQUEUE 2
 .Os
 .Sh NAME
@@ -322,6 +322,9 @@
 .Va sigev_notify_kqueue
 containing the descriptor of the kqueue that the event should
 be attached to,
+.Va sigev_notify_kevent_flags
+containing the kevent flags which should be EV_ONESHOT, EV_CLEAR or
+EV_DISPATCH,
 .Va sigev_value
 containing the udata value, and
 .Va sigev_notify
--- a/head/lib/libc/sys/nfssvc.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/nfssvc.2	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)nfssvc.2	8.1 (Berkeley) 6/9/93
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/sys/nfssvc.2 231564 2012-02-12 18:29:56Z ed $
 .\"
 .Dd June 9, 1993
 .Dt NFSSVC 2
@@ -143,14 +143,14 @@
 struct nfsd_srvargs {
 	struct nfsd	*nsd_nfsd;	/* Pointer to in kernel nfsd struct */
 	uid_t		nsd_uid;	/* Effective uid mapped to cred */
-	u_int32_t	nsd_haddr;	/* Ip address of client */
+	uint32_t	nsd_haddr;	/* Ip address of client */
 	struct ucred	nsd_cr;		/* Cred. uid maps to */
 	int		nsd_authlen;	/* Length of auth string (ret) */
 	u_char		*nsd_authstr;	/* Auth string (ret) */
 	int		nsd_verflen;	/* and the verifier */
 	u_char		*nsd_verfstr;
 	struct timeval	nsd_timestamp;	/* timestamp from verifier */
-	u_int32_t	nsd_ttl;	/* credential ttl (sec) */
+	uint32_t	nsd_ttl;	/* credential ttl (sec) */
 	NFSKERBKEY_T	nsd_key;	/* Session key */
 };
 .Ed
--- a/head/lib/libc/sys/pdfork.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/pdfork.2	Fri Mar 02 16:56:02 2012 +0200
@@ -26,9 +26,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libc/sys/pdfork.2 224987 2011-08-18 22:51:30Z jonathan $
+.\" $FreeBSD: head/lib/libc/sys/pdfork.2 232158 2012-02-25 15:21:43Z gjb $
 .\"
-.Dd August 16, 2011
+.Dd February 25, 2012
 .Dt PDFORK 2
 .Os
 .Sh NAME
@@ -87,7 +87,7 @@
 rather than a PID.
 .Pp
 .Fn pdwait4
-behaves identially to
+behaves identically to
 .Xr wait4 2 ,
 but operates with respect to a process descriptor argument rather than a PID.
 .Pp
@@ -101,7 +101,8 @@
 .Fa st_ctime
 and
 .Fa st_mtime
-fields are defined. If the owner read, write, and execute bits are set then the
+fields are defined.
+If the owner read, write, and execute bits are set then the
 process represented by the process descriptor is still alive.
 .Pp
 .Xr poll 2
--- a/head/lib/libc/sys/posix_fadvise.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/posix_fadvise.2	Fri Mar 02 16:56:02 2012 +0200
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)madvise.2	8.1 (Berkeley) 6/9/93
-.\" $FreeBSD: head/lib/libc/sys/posix_fadvise.2 227070 2011-11-04 04:02:50Z jhb $
+.\" $FreeBSD: head/lib/libc/sys/posix_fadvise.2 232157 2012-02-25 14:31:25Z gjb $
 .\"
-.Dd October 26, 2011
+.Dd February 25, 2012
 .Dt POSIX_FADVISE 2
 .Os
 .Sh NAME
@@ -74,7 +74,7 @@
 detect sequential behavior.
 .It Dv POSIX_FADV_WILLNEED
 Tells the system that the specified data will be accessed in the near future.
-The system may initiate an asychronous read of the data if it is not already
+The system may initiate an asynchronous read of the data if it is not already
 present in memory.
 .It Dv POSIX_FADV_DONTNEED
 Tells the system that the specified data will not be accessed in the near
--- a/head/lib/libc/sys/posix_fallocate.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/posix_fallocate.2	Fri Mar 02 16:56:02 2012 +0200
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)open.2	8.2 (Berkeley) 11/16/93
-.\" $FreeBSD: head/lib/libc/sys/posix_fallocate.2 220791 2011-04-18 16:32:22Z mdf $
+.\" $FreeBSD: head/lib/libc/sys/posix_fallocate.2 232157 2012-02-25 14:31:25Z gjb $
 .\"
-.Dd April 13, 2011
+.Dd February 25, 2012
 .Dt POSIX_FALLOCATE 2
 .Os
 .Sh NAME
@@ -48,7 +48,7 @@
 .Fa len
 in the file referenced by
 .Fa fd
-is guarateed to be allocated upon successful return.
+is guaranteed to be allocated upon successful return.
 That is, if
 .Fn posix_fallocate
 returns successfully, subsequent writes to the specified file data
--- a/head/lib/libc/sys/ptrace.2	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/sys/ptrace.2	Fri Mar 02 16:56:02 2012 +0200
@@ -1,8 +1,8 @@
-.\" $FreeBSD: head/lib/libc/sys/ptrace.2 226066 2011-10-06 17:35:38Z kib $
+.\" $FreeBSD: head/lib/libc/sys/ptrace.2 231902 2012-02-18 22:26:32Z kib $
 .\"	$NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
 .\"
 .\" This file is in the public domain.
-.Dd October 5, 2011
+.Dd February 19, 2012
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -355,6 +355,11 @@
 .Va pl_child_pid
 member of
 .Vt "struct ptrace_lwpinfo" .
+.It PL_FLAG_CHILD
+The flag is set for first event reported from a new child, which is
+automatically attached due to
+.Dv PT_FOLLOW_FORK
+enabled.
 .El
 .It pl_sigmask
 The current signal mask of the LWP
--- a/head/lib/libc/uuid/uuid.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/uuid/uuid.3	Fri Mar 02 16:56:02 2012 +0200
@@ -23,9 +23,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libc/uuid/uuid.3 232339 2012-03-01 14:39:01Z ae $
 .\"
-.Dd August 13, 2008
+.Dd March 1, 2012
 .Dt UUID 3
 .Os
 .Sh NAME
@@ -84,6 +84,15 @@
 .Fn uuid_hash .
 .Pp
 The
+.Fn uuid_to_string
+function set
+.Fa *str
+to be a pointer to a buffer sufficiently large to hold the string.
+This pointer should be passed to
+.Xr free 3
+to release the allocated storage when it is no longer needed.
+.Pp
+The
 .Fn uuid_enc_le
 and
 .Fn uuid_enc_be
@@ -116,7 +125,7 @@
 .It Dv uuid_s_invalid_string_uuid
 The string representation of an UUID is not valid.
 .It Dv uuid_s_no_memory
-The meaning of the code escaped the writers mind.
+The function can not allocate memory to store an UUID representation.
 .El
 .Sh SEE ALSO
 .Xr uuidgen 1 ,
--- a/head/lib/libc/yp/Makefile.inc	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libc/yp/Makefile.inc	Fri Mar 02 16:56:02 2012 +0200
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile.inc	5.3 (Berkeley) 2/20/91
-# $FreeBSD$
+# $FreeBSD: head/lib/libc/yp/Makefile.inc 231118 2012-02-07 09:27:07Z dim $
 
 # yp sources
 .PATH: ${.CURDIR}/yp
@@ -10,7 +10,7 @@
 SYM_MAPS+=	${.CURDIR}/yp/Symbol.map
 
 RPCSRC=	${DESTDIR}/usr/include/rpcsvc/yp.x
-RPCGEN=	rpcgen -C
+RPCGEN=	RPCGEN_CPP=${CPP:Q} rpcgen -C
 
 yp_xdr.c: ${RPCSRC}
 	${RPCGEN} -c -o ${.TARGET} ${RPCSRC}
--- a/head/lib/libcam/cam.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libcam/cam.3	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libcam/cam.3 231564 2012-02-12 18:29:56Z ed $
 .\"
 .Dd October 10, 1998
 .Dt CAM 3
@@ -145,7 +145,7 @@
 						     * Device name given by
 						     * the user.
 						     */
-	u_int32_t	given_unit_number;	    /*
+	uint32_t	given_unit_number;	    /*
 						     * Unit number given by
 						     * the user.
 						     */
@@ -153,7 +153,7 @@
 						  * Name of the device,
 						  * e.g. 'pass'
 						  */
-	u_int32_t	dev_unit_num;	/* Unit number of the passthrough
+	uint32_t	dev_unit_num;	/* Unit number of the passthrough
 					 * device associated with this
 					 * particular device.
 					 */
@@ -161,18 +161,18 @@
 	char		sim_name[SIM_IDLEN+1];/*
 					       * Controller name, e.g.'ahc'
 					       */
-	u_int32_t	sim_unit_number; /* Controller unit number */
-	u_int32_t	bus_id;		 /* Controller bus number */
+	uint32_t	sim_unit_number; /* Controller unit number */
+	uint32_t	bus_id;		 /* Controller bus number */
 	lun_id_t	target_lun;	 /* Logical Unit Number */
 	target_id_t	target_id;	 /* Target ID */
 	path_id_t	path_id;	 /* System SCSI bus number */
-	u_int16_t	pd_type;	 /* type of peripheral device */
+	uint16_t	pd_type;	 /* type of peripheral device */
 	struct scsi_inquiry_data inq_data;  /* SCSI Inquiry data */
-	u_int8_t	serial_num[252]; /* device serial number */
-	u_int8_t	serial_num_len;  /* length of the serial number */
-	u_int8_t	sync_period;	 /* Negotiated sync period */
-	u_int8_t	sync_offset;	 /* Negotiated sync offset */
-	u_int8_t	bus_width;	 /* Negotiated bus width */
+	uint8_t		serial_num[252]; /* device serial number */
+	uint8_t		serial_num_len;  /* length of the serial number */
+	uint8_t		sync_period;	 /* Negotiated sync period */
+	uint8_t		sync_offset;	 /* Negotiated sync offset */
+	uint8_t		bus_width;	 /* Negotiated bus width */
 	int		fd;		 /* file descriptor for device */
 };
 .Ed
--- a/head/lib/libcam/cam_cdbparse.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libcam/cam_cdbparse.3	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libcam/cam_cdbparse.3 231564 2012-02-12 18:29:56Z ed $
 .\"
 .\" This man page borrows heavily from the old scsi(3) man page, which had
 .\" the following copyright:
@@ -83,9 +83,9 @@
 .Ft int
 .Fo csio_build
 .Fa "struct ccb_scsiio *csio"
-.Fa "u_int8_t *data_ptr"
-.Fa "u_int32_t dxfer_len"
-.Fa "u_int32_t flags"
+.Fa "uint8_t *data_ptr"
+.Fa "uint32_t dxfer_len"
+.Fa "uint32_t flags"
 .Fa "int retry_count"
 .Fa "int timeout"
 .Fa "const char *cmd_spec"
@@ -94,9 +94,9 @@
 .Ft int
 .Fo csio_build_visit
 .Fa "struct ccb_scsiio *csio"
-.Fa "u_int8_t *data_ptr"
-.Fa "u_int32_t dxfer_len"
-.Fa "u_int32_t flags"
+.Fa "uint8_t *data_ptr"
+.Fa "uint32_t dxfer_len"
+.Fa "uint32_t flags"
 .Fa "int retry_count"
 .Fa "int timeout"
 .Fa "const char *cmd_spec"
@@ -122,14 +122,14 @@
 .Fc
 .Ft int
 .Fo buff_decode
-.Fa "u_int8_t *buff"
+.Fa "uint8_t *buff"
 .Fa "size_t len"
 .Fa "const char *fmt"
 .Fa "..."
 .Fc
 .Ft int
 .Fo buff_decode_visit
-.Fa "u_int8_t *buff"
+.Fa "uint8_t *buff"
 .Fa "size_t len"
 .Fa "const char *fmt"
 .Fa "void (*arg_put)(void *, int, void *, int, char *)"
@@ -150,7 +150,7 @@
 .Fc
 .Ft int
 .Fo buff_encode_visit
-.Fa "u_int8_t *buff"
+.Fa "uint8_t *buff"
 .Fa "size_t len"
 .Fa "const char *fmt"
 .Fa "int (*arg_get)(void *hook, char *field_name)"
--- a/head/lib/libdevstat/devstat.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libdevstat/devstat.3	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libdevstat/devstat.3 231564 2012-02-12 18:29:56Z ed $
 .\"
 .Dd March 18, 2003
 .Dt DEVSTAT 3
@@ -193,7 +193,7 @@
 .Bd -literal -offset indent
 struct devinfo {
 	struct devstat	*devices;
-	u_int8_t	*mem_ptr;
+	uint8_t		*mem_ptr;
 	long		generation;
 	int		numdevs;
 };
@@ -472,7 +472,7 @@
 For each statistics to be calculated, the user should supply the proper
 enumerated type (listed below), and a variable of the indicated type.
 All statistics are either integer values, for which a
-.Vt u_int64_t
+.Vt uint64_t
 is used,
 or floating point, for which a
 .Vt "long double"
@@ -489,7 +489,7 @@
 It is an argument list terminator.
 .It Dv DSM_TOTAL_BYTES
 type:
-.Vt "u_int64_t *"
+.Vt "uint64_t *"
 .Pp
 The total number of bytes transferred between the acquisition of
 .Fa previous
@@ -499,7 +499,7 @@
 .It Dv DSM_TOTAL_BYTES_WRITE
 .It Dv DSM_TOTAL_BYTES_FREE
 type:
-.Vt "u_int64_t *"
+.Vt "uint64_t *"
 .Pp
 The total number of bytes in transactions of the specified type
 between the acquisition of
@@ -508,7 +508,7 @@
 .Fa current .
 .It Dv DSM_TOTAL_TRANSFERS
 type:
-.Vt "u_int64_t *"
+.Vt "uint64_t *"
 .Pp
 The total number of transfers between the acquisition of
 .Fa previous
@@ -519,7 +519,7 @@
 .It Dv DSM_TOTAL_TRANSFERS_WRITE
 .It Dv DSM_TOTAL_TRANSFERS_FREE
 type:
-.Vt "u_int64_t *"
+.Vt "uint64_t *"
 .Pp
 The total number of transactions of the specified type between
 the acquisition of
@@ -528,7 +528,7 @@
 .Fa current .
 .It Dv DSM_TOTAL_BLOCKS
 type:
-.Vt "u_int64_t *"
+.Vt "uint64_t *"
 .Pp
 The total number of blocks transferred between the acquisition of
 .Fa previous
@@ -541,7 +541,7 @@
 .It Dv DSM_TOTAL_BLOCKS_WRITE
 .It Dv DSM_TOTAL_BLOCKS_FREE
 type:
-.Vt "u_int64_t *"
+.Vt "uint64_t *"
 .Pp
 The total number of blocks of the specified type between the acquisition of
 .Fa previous
@@ -665,7 +665,7 @@
 .Fa current .
 .It Dv DSM_QUEUE_LENGTH
 type:
-.Vt "u_int64_t *"
+.Vt "uint64_t *"
 .Pp
 The number of not yet completed transactions at the time when
 .Fa current
--- a/head/lib/libipsec/pfkey.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libipsec/pfkey.c	Fri Mar 02 16:56:02 2012 +0200
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libipsec/pfkey.c 231532 2012-02-11 20:43:01Z bz $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -662,7 +662,7 @@
 {
 	int len, algno;
 
-	if (satype == PF_UNSPEC) {
+	if (satype == SADB_SATYPE_UNSPEC) {
 		for (algno = 0;
 		     algno < sizeof(supported_map)/sizeof(supported_map[0]);
 		     algno++) {
@@ -1778,6 +1778,18 @@
 		case SADB_X_EXT_SA2:
 			mhp[ext->sadb_ext_type] = (caddr_t)ext;
 			break;
+		case SADB_X_EXT_NAT_T_TYPE:
+		case SADB_X_EXT_NAT_T_SPORT:
+		case SADB_X_EXT_NAT_T_DPORT:
+		/* case SADB_X_EXT_NAT_T_OA: is OAI */
+		case SADB_X_EXT_NAT_T_OAI:
+		case SADB_X_EXT_NAT_T_OAR:
+		case SADB_X_EXT_NAT_T_FRAG:
+			if (feature_present("ipsec_natt")) {
+				mhp[ext->sadb_ext_type] = (caddr_t)ext;
+				break;
+			}
+			/* FALLTHROUGH */
 		default:
 			__ipsec_errcode = EIPSEC_INVAL_EXTTYPE;
 			return -1;
--- a/head/lib/libjail/jail.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libjail/jail.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libjail/jail.c 232342 2012-03-01 15:09:41Z jamie $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -885,36 +885,20 @@
 		 * the "no" counterpart to a boolean.
 		 */
 		nname = nononame(jp->jp_name);
-		if (nname != NULL) {
-			snprintf(desc.s, sizeof(desc.s), SJPARAM ".%s", nname);
-			free(nname);
-			miblen = sizeof(mib) - 2 * sizeof(int);
-			if (sysctl(mib, 2, mib + 2, &miblen, desc.s,
-			    strlen(desc.s)) >= 0) {
-				mib[1] = 4;
-				desclen = sizeof(desc);
-				if (sysctl(mib, (miblen / sizeof(int)) + 2,
-				    &desc, &desclen, NULL, 0) < 0) {
-					snprintf(jail_errmsg,
-					    JAIL_ERRMSGLEN,
-					    "sysctl(0.4.%s): %s", desc.s,
-					    strerror(errno));
-					return (-1);
-				}
-				if ((desc.i & CTLTYPE) == CTLTYPE_INT &&
-				    desc.s[0] == 'B') {
-					jp->jp_ctltype = desc.i;
-					jp->jp_flags |= JP_NOBOOL;
-					jp->jp_valuelen = sizeof(int);
-					return (0);
-				}
-			}
+		if (nname == NULL) {
+		unknown_parameter:
+			snprintf(jail_errmsg, JAIL_ERRMSGLEN,
+			    "unknown parameter: %s", jp->jp_name);
+			errno = ENOENT;
+			return (-1);
 		}
-	unknown_parameter:
-		snprintf(jail_errmsg, JAIL_ERRMSGLEN,
-		    "unknown parameter: %s", jp->jp_name);
-		errno = ENOENT;
-		return (-1);
+		snprintf(desc.s, sizeof(desc.s), SJPARAM ".%s", nname);
+		free(nname);
+		miblen = sizeof(mib) - 2 * sizeof(int);
+		if (sysctl(mib, 2, mib + 2, &miblen, desc.s,
+		    strlen(desc.s)) < 0)
+			goto unknown_parameter;
+		jp->jp_flags |= JP_NOBOOL;
 	}
  mib_desc:
 	mib[1] = 4;
@@ -925,6 +909,16 @@
 		    "sysctl(0.4.%s): %s", jp->jp_name, strerror(errno));
 		return (-1);
 	}
+	jp->jp_ctltype = desc.i;
+	/* If this came from removing a "no", it better be a boolean. */
+	if (jp->jp_flags & JP_NOBOOL) {
+		if ((desc.i & CTLTYPE) == CTLTYPE_INT && desc.s[0] == 'B') {
+			jp->jp_valuelen = sizeof(int);
+			return (0);
+		}
+		else if ((desc.i & CTLTYPE) != CTLTYPE_NODE)
+			goto unknown_parameter;
+	}
 	/* See if this is an array type. */
 	p = strchr(desc.s, '\0');
 	isarray  = 0;
@@ -935,7 +929,6 @@
 		p[-2] = 0;
 	}
 	/* Look for types we understand. */
-	jp->jp_ctltype = desc.i;
 	switch (desc.i & CTLTYPE) {
 	case CTLTYPE_INT:
 		if (desc.s[0] == 'B')
--- a/head/lib/libkvm/kvm_proc.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libkvm/kvm_proc.c	Fri Mar 02 16:56:02 2012 +0200
@@ -38,7 +38,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libkvm/kvm_proc.c 230146 2012-01-15 18:51:07Z trociny $");
+__FBSDID("$FreeBSD: head/lib/libkvm/kvm_proc.c 230873 2012-02-01 18:02:13Z trociny $");
 
 /*
  * Proc traversal interface for kvm.  ps and w are (probably) the exclusive
@@ -474,7 +474,7 @@
 kvm_getprocs(kvm_t *kd, int op, int arg, int *cnt)
 {
 	int mib[4], st, nprocs;
-	size_t size;
+	size_t size, osize;
 	int temp_op;
 
 	if (kd->procbase != 0) {
@@ -524,10 +524,11 @@
 			    _kvm_realloc(kd, kd->procbase, size);
 			if (kd->procbase == 0)
 				return (0);
+			osize = size;
 			st = sysctl(mib, temp_op == KERN_PROC_ALL ||
 			    temp_op == KERN_PROC_PROC ? 3 : 4,
 			    kd->procbase, &size, NULL, 0);
-		} while (st == -1 && errno == ENOMEM);
+		} while (st == -1 && errno == ENOMEM && size == osize);
 		if (st == -1) {
 			_kvm_syserr(kd, kd->program, "kvm_getprocs");
 			return (0);
--- a/head/lib/libmemstat/libmemstat.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libmemstat/libmemstat.3	Fri Mar 02 16:56:02 2012 +0200
@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libmemstat/libmemstat.3 224569 2011-08-01 09:43:35Z pluknet $
+.\" $FreeBSD: head/lib/libmemstat/libmemstat.3 232157 2012-02-25 14:31:25Z gjb $
 .\"
-.Dd July 21, 2011
+.Dd February 25, 2012
 .Dt LIBMEMSTAT 3
 .Os
 .Sh NAME
@@ -345,7 +345,7 @@
 Set a caller-owned per-CPU pointer for the memory type.
 .It Fn memstat_get_percpu_caller_uint64
 Return a caller-owned per-CPU integer for the memory type.
-.It Fn memsttat_set_percpu_caller_uint64
+.It Fn memstat_set_percpu_caller_uint64
 Set a caller-owned per-CPU integer for the memory type.
 .It Fn memstat_get_percpu_free
 If the memory allocator supports a per-CPU cache, return the number of free
--- a/head/lib/libpmc/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,4 @@
-# $FreeBSD$
+# $FreeBSD: head/lib/libpmc/Makefile 232366 2012-03-01 21:23:26Z davide $
 
 LIB=	pmc
 
@@ -35,6 +35,8 @@
 MAN+=	pmc.p6.3
 MAN+=	pmc.corei7.3
 MAN+=	pmc.corei7uc.3
+MAN+=	pmc.sandybridge.3
+MAN+=	pmc.sandybridgeuc.3	
 MAN+=	pmc.westmere.3
 MAN+=	pmc.westmereuc.3
 MAN+=	pmc.tsc.3
--- a/head/lib/libpmc/libpmc.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/libpmc.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libpmc/libpmc.c 228869 2011-12-24 19:34:52Z jhibbits $");
+__FBSDID("$FreeBSD: head/lib/libpmc/libpmc.c 232366 2012-03-01 21:23:26Z davide $");
 
 #include <sys/types.h>
 #include <sys/module.h>
@@ -179,6 +179,11 @@
 	__PMC_EV_ALIAS_COREI7()
 };
 
+static const struct pmc_event_descr sandybridge_event_table[] = 
+{
+	__PMC_EV_ALIAS_SANDYBRIDGE()
+};
+
 static const struct pmc_event_descr westmere_event_table[] =
 {
 	__PMC_EV_ALIAS_WESTMERE()
@@ -189,6 +194,11 @@
 	__PMC_EV_ALIAS_COREI7UC()
 };
 
+static const struct pmc_event_descr sandybridgeuc_event_table[] =
+{
+	__PMC_EV_ALIAS_SANDYBRIDGEUC()
+};
+
 static const struct pmc_event_descr westmereuc_event_table[] =
 {
 	__PMC_EV_ALIAS_WESTMEREUC()
@@ -208,6 +218,7 @@
 PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC);
 PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC);
 PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP);
+PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP);
 PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP);
 PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC);
 PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC);
@@ -242,9 +253,11 @@
 PMC_CLASS_TABLE_DESC(core, IAP, core, iap);
 PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap);
 PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap);
+PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap);
 PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap);
 PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf);
 PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp);
+PMC_CLASS_TABLE_DESC(sandybridgeuc, UCP, sandybridgeuc, ucp);
 PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp);
 #endif
 #if	defined(__i386__)
@@ -530,6 +543,8 @@
 #define	atom_aliases_without_iaf	core2_aliases_without_iaf
 #define corei7_aliases			core2_aliases
 #define corei7_aliases_without_iaf	core2_aliases_without_iaf
+#define sandybridge_aliases		core2_aliases
+#define sandybridge_aliases_without_iaf	core2_aliases_without_iaf
 #define westmere_aliases		core2_aliases
 #define westmere_aliases_without_iaf	core2_aliases_without_iaf
 
@@ -2562,6 +2577,10 @@
 			ev = corei7_event_table;
 			count = PMC_EVENT_TABLE_SIZE(corei7);
 			break;
+		case PMC_CPU_INTEL_SANDYBRIDGE:
+			ev = sandybridge_event_table;
+			count = PMC_EVENT_TABLE_SIZE(sandybridge);
+			break;
 		case PMC_CPU_INTEL_WESTMERE:
 			ev = westmere_event_table;
 			count = PMC_EVENT_TABLE_SIZE(westmere);
@@ -2583,6 +2602,10 @@
 			ev = corei7uc_event_table;
 			count = PMC_EVENT_TABLE_SIZE(corei7uc);
 			break;
+		case PMC_CPU_INTEL_SANDYBRIDGE:
+			ev = sandybridgeuc_event_table;
+			count = PMC_EVENT_TABLE_SIZE(sandybridgeuc);
+			break;
 		case PMC_CPU_INTEL_WESTMERE:
 			ev = westmereuc_event_table;
 			count = PMC_EVENT_TABLE_SIZE(westmereuc);
@@ -2814,6 +2837,11 @@
 		pmc_class_table[n++] = &corei7uc_class_table_descr;
 		PMC_MDEP_INIT_INTEL_V2(corei7);
 		break;
+	case PMC_CPU_INTEL_SANDYBRIDGE:
+		pmc_class_table[n++] = &ucf_class_table_descr;
+		pmc_class_table[n++] = &sandybridgeuc_class_table_descr;
+		PMC_MDEP_INIT_INTEL_V2(sandybridge);
+		break;
 	case PMC_CPU_INTEL_WESTMERE:
 		pmc_class_table[n++] = &ucf_class_table_descr;
 		pmc_class_table[n++] = &westmereuc_class_table_descr;
@@ -2937,6 +2965,10 @@
 			ev = corei7_event_table;
 			evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7);
 			break;
+		case PMC_CPU_INTEL_SANDYBRIDGE:
+			ev = sandybridge_event_table;
+			evfence = sandybridge_event_table + PMC_EVENT_TABLE_SIZE(sandybridge);
+			break;
 		case PMC_CPU_INTEL_WESTMERE:
 			ev = westmere_event_table;
 			evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere);
@@ -2953,6 +2985,10 @@
 			ev = corei7uc_event_table;
 			evfence = corei7uc_event_table + PMC_EVENT_TABLE_SIZE(corei7uc);
 			break;
+		case PMC_CPU_INTEL_SANDYBRIDGE:
+			ev = sandybridgeuc_event_table;
+			evfence = sandybridgeuc_event_table + PMC_EVENT_TABLE_SIZE(sandybridgeuc);
+			break;
 		case PMC_CPU_INTEL_WESTMERE:
 			ev = westmereuc_event_table;
 			evfence = westmereuc_event_table + PMC_EVENT_TABLE_SIZE(westmereuc);
--- a/head/lib/libpmc/pmc.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD: head/lib/libpmc/pmc.3 226514 2011-10-18 15:25:43Z fabient $
+.\" $FreeBSD: head/lib/libpmc/pmc.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 24, 2008
 .Dt PMC 3
--- a/head/lib/libpmc/pmc.atom.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.atom.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.atom.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 12, 2008
 .Dt PMC.ATOM 3
--- a/head/lib/libpmc/pmc.core.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.core.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD: head/lib/libpmc/pmc.core.3 226436 2011-10-16 14:30:28Z eadler $
+.\" $FreeBSD: head/lib/libpmc/pmc.core.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 12, 2008
 .Dt PMC.CORE 3
--- a/head/lib/libpmc/pmc.core2.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.core2.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.core2.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd June 8, 2009
 .Dt PMC.CORE2 3
--- a/head/lib/libpmc/pmc.corei7.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.corei7.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD: head/lib/libpmc/pmc.corei7.3 229470 2012-01-04 07:58:36Z fabient $
+.\" $FreeBSD: head/lib/libpmc/pmc.corei7.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd March 24, 2010
 .Dt PMC.COREI7 3
--- a/head/lib/libpmc/pmc.corei7uc.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.corei7uc.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.corei7uc.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd March 24, 2010
 .Dt PMC.COREI7UC 3
--- a/head/lib/libpmc/pmc.iaf.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.iaf.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.iaf.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 14, 2008
 .Dt PMC.IAF 3
--- a/head/lib/libpmc/pmc.k7.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.k7.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.k7.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd October 4, 2008
 .Dt PMC.K7 3
--- a/head/lib/libpmc/pmc.k8.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.k8.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.k8.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd October 4, 2008
 .Dt PMC.K8 3
--- a/head/lib/libpmc/pmc.mips.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.mips.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,21 +9,21 @@
 .\"    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 ``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 George Neville-Neil 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.mips.3 232158 2012-02-25 15:21:43Z gjb $
 .\"
-.Dd February 11, 2010
+.Dd February 25, 2012
 .Dt PMC.MIPS 3
 .Os
 .Sh NAME
@@ -54,16 +54,16 @@
 .Bl -tag -width indent
 .It Li CYCLE
 .Pq Event 0, Counter 0/1
-Total number of cycles. 
+Total number of cycles.
 The performance counters are clocked by the
-top-level gated clock. 
+top-level gated clock.
 If the core is built with that clock gater
 present, none of the counters will increment while the clock is
 stopped - due to a WAIT instruction.
 .It Li INSTR_EXECUTED
 .Pq Event 1, Counter 0/1
 Total number of instructions completed.
-.It Li BRANCH_COMPLETED 
+.It Li BRANCH_COMPLETED
 .Pq Event 2, Counter 0
 Total number of branch instructions completed.
 .It Li BRANCH_MISPRED
@@ -85,9 +85,9 @@
 .Pq Event 5, Counter 0
 Counts ITLB accesses that are due to fetches showing up in the
 instruction fetch stage of the pipeline and which do not use a fixed
-mapping or are not in unmapped space. 
+mapping or are not in unmapped space.
 If an address is fetched twice from the pipe (as in the case of a
-cache miss), that instruction willcount as 2 ITLB accesses. 
+cache miss), that instruction willcount as 2 ITLB accesses.
 Since each fetch gets us 2 instructions,there is one access marked per double
 word.
 .It Li ITLB_MISS
@@ -102,7 +102,8 @@
 Counts DTLB access including those in unmapped address spaces.
 .It Li DTLB_MISS
 .Pq Event 6, Counter 1
-Counts DTLB misses. Back to back misses that result in only one DTLB
+Counts DTLB misses.
+Back to back misses that result in only one DTLB
 entry getting refilled are counted as a single miss.
 .It Li JTLB_IACCESS
 .Pq Event 7, Counter 0
@@ -119,7 +120,8 @@
 Counts data JTLB accesses that result in no match or a match on an invalid translation.
 .It Li IC_FETCH
 .Pq Event 9, Counter 0
-Counts every time the instruction cache is accessed. All replays,
+Counts every time the instruction cache is accessed.
+All replays,
 wasted fetches etc. are counted.
 For example, following a branch, even though the prediction is taken,
 the fall through access is counted.
@@ -166,7 +168,7 @@
 purpose register, but where the destination register was set to r0.
 .It Li INTEGER_MULDIV_COMPLETED
 .Pq Event 17, Counter 1
-Integer multipy and divide instructions completed.  (MULxx, DIVx, MADDx, MSUBx).
+Integer multiply and divide instructions completed.  (MULxx, DIVx, MADDx, MSUBx).
 .It Li RF_STALL
 .Pq Event 18, Counter 0
 Counts the total number of cycles where no instructions are issued
@@ -179,7 +181,8 @@
 replay traps (other than uTLB)
 .It Li STORE_COND_COMPLETED
 .Pq Event 19, Counter 0
-Conditional stores completed.  Counts all events, including failed stores.
+Conditional stores completed.
+Counts all events, including failed stores.
 .It Li STORE_COND_FAILED
 .Pq Event 19, Counter 1
 Conditional store instruction that did not update memory.
@@ -189,7 +192,7 @@
 causing some inaccuracy in the measured ratio.
 .It Li ICACHE_REQUESTS
 .Pq Event 20, Counter 0
-Note that this only counts PREFs that are actually attempted. 
+Note that this only counts PREFs that are actually attempted.
 PREFs to uncached addresses or ones with translation errors are not counted
 .It Li ICACHE_HIT
 .Pq Event 20, Counter 1
@@ -214,7 +217,7 @@
 Counts cycles where the LSU is in fixup and cannot accept a new
 instruction from the ALU.
 Fixups are replays within the LSU that occur when an instruction needs
-to re-access the cache or the DTLB. 
+to re-access the cache or the DTLB.
 .It Li IFU_CYCLES_STALLED
 .Pq Event 25, Counter 0
 Counts the number of cycles where the fetch unit is not providing a
@@ -256,7 +259,7 @@
 in the Fill Store Buffer.
 .It Li DMISS_CYCLES
 .Pq Event 39, Counter 0
-Data miss is outstanding, but not necessarily stalling the pipeline. 
+Data miss is outstanding, but not necessarily stalling the pipeline.
 The difference between this and D$ miss stall cycles can show the gain
 from non-blocking cache misses.
 .It Li L2_MISS_CYCLES
@@ -282,7 +285,8 @@
 Count all pipeline bubbles that are a result of multicycle ISPRAM
 access.
 Pipeline bubbles are defined as all cycles that IFU doesn't present an
-instruction to ALU. The four cycles after a redirect are not counted.
+instruction to ALU.
+The four cycles after a redirect are not counted.
 .It Li DSPRAM_STALL_CYCLES
 .Pq Event 43, Counter 1
 Counts stall cycles created by an instruction waiting for access to DSPRAM.
@@ -372,10 +376,10 @@
 .Lb libpmc
 and the underlying hardware events used.
 .Bl -column "branch-mispredicts" "cpu_clk_unhalted.core_p"
-.It Em Alias Ta Em Event Ta 
+.It Em Alias Ta Em Event Ta
 .It Li instructions Ta Li INSTR_EXECUTED Ta
-.It Li branches Ta Li BRANCH_COMPLETED Ta 
-.It Li branch-mispredicts Ta Li BRANCH_MISPRED Ta 
+.It Li branches Ta Li BRANCH_COMPLETED Ta
+.It Li branch-mispredicts Ta Li BRANCH_MISPRED Ta
 .El
 .Sh SEE ALSO
 .Xr pmc 3 ,
--- a/head/lib/libpmc/pmc.p4.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.p4.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.p4.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd October 4, 2008
 .Dt PMC.P4 3
--- a/head/lib/libpmc/pmc.p5.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.p5.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.p5.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd October 4, 2008
 .Dt PMC 3
--- a/head/lib/libpmc/pmc.p6.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.p6.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.p6.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd October 4, 2008
 .Dt PMC.P6 3
--- a/head/lib/libpmc/pmc.tsc.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.tsc.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.tsc.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd October 4, 2008
 .Dt PMC.TSC 3
--- a/head/lib/libpmc/pmc.ucf.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.ucf.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.ucf.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd March 30, 2010
 .Dt PMC.UCF 3
--- a/head/lib/libpmc/pmc.westmere.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.westmere.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,21 +9,21 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.westmere.3 232159 2012-02-25 16:02:12Z gjb $
 .\"
-.Dd March 24, 2010
+.Dd February 25, 2012
 .Dt PMC.WESTMERE 3
 .Os
 .Sh NAME
@@ -92,15 +92,17 @@
 .It Li DMND_DATA_RD
 Counts the number of demand and DCU prefetch data reads of full
 and partial cachelines as well as demand data page table entry
-cacheline reads. Does not count L2 data read prefetches or
+cacheline reads.
+Does not count L2 data read prefetches or
 instruction fetches.
 .It Li DMND_RFO
 Counts the number of demand and DCU prefetch reads for ownership
-(RFO) requests generated by a write to data cacheline. Does not
-count L2 RFO.
+(RFO) requests generated by a write to data cacheline.
+Does not count L2 RFO.
 .It Li DMND_IFETCH
 Counts the number of demand and DCU prefetch instruction cacheline
-reads. Does not count L2 code read prefetches.
+reads.
+Does not count L2 code read prefetches.
 WB
 Counts the number of writeback (modified to exclusive) transactions.
 .It Li PF_DATA_RD
@@ -181,7 +183,8 @@
 All store referenced with misaligned address
 .It Li STORE_BLOCKS.AT_RET
 .Pq Event 06H , Umask 04H
-Counts number of loads delayed with at-Retirement block code. The following
+Counts number of loads delayed with at-Retirement block code.
+The following
 loads need to be executed at retirement and wait for all senior stores on
 the same thread to be drained: load splitting across 4K boundary (page
 split), load accessing uncacheable (UC or USWC) memory, load lock, and load
@@ -225,9 +228,10 @@
 In conjunction with ld_lat facility
 .It Li MEM_STORE_RETIRED.DTLB_MISS
 .Pq Event 0CH , Umask 01H
-The event counts the number of retired stores that missed the DTLB. The DTLB
-miss is not counted if the store operation causes a fault. Does not counter
-prefetches. Counts both primary and secondary misses to the TLB
+The event counts the number of retired stores that missed the DTLB.
+The DTLB miss is not counted if the store operation causes a fault.
+Does not counter prefetches.
+Counts both primary and secondary misses to the TLB
 .It Li UOPS_ISSUED.ANY
 .Pq Event 0EH , Umask 01H
 Counts the number of Uops issued by the Register Allocation Table to the
@@ -264,9 +268,11 @@
 Load instructions retired I/O (Precise Event)
 .It Li FP_COMP_OPS_EXE.X87
 .Pq Event 10H , Umask 01H
-Counts the number of FP Computational Uops Executed. The number of FADD,
+Counts the number of FP Computational Uops Executed.
+The number of FADD,
 FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer
-DIVs, and IDIVs. This event does not distinguish an FADD used in the middle
+DIVs, and IDIVs.
+This event does not distinguish an FADD used in the middle
 of a transcendental flow from a separate FADD instruction.
 .It Li FP_COMP_OPS_EXE.MMX
 .Pq Event 10H , Umask 02H
@@ -316,9 +322,9 @@
 the Memory Order Buffer.
 .It Li LOAD_DISPATCH.RS_DELAYED
 .Pq Event 13H , Umask 02H
-Counts the number of delayed RS dispatches at the stage latch. If an RS
-dispatch can not bypass to LB, it has another chance to dispatch from the
-one-cycle delayed staging latch before it is written into the LB.
+Counts the number of delayed RS dispatches at the stage latch.
+If an RS dispatch can not bypass to LB, it has another chance to dispatch
+from the one-cycle delayed staging latch before it is written into the LB.
 .It Li LOAD_DISPATCH.MOB
 .Pq Event 13H , Umask 04H
 Counts the number of loads dispatched from the Reservation Station to the
@@ -329,13 +335,15 @@
 .It Li ARITH.CYCLES_DIV_BUSY
 .Pq Event 14H , Umask 01H
 Counts the number of cycles the divider is busy executing divide or square
-root operations. The divide can be integer, X87 or Streaming SIMD Extensions
-(SSE). The square root operation can be either X87 or SSE.
+root operations.
+The divide can be integer, X87 or Streaming SIMD Extensions (SSE).
+The square root operation can be either X87 or SSE.
 Set 'edge =1, invert=1, cmask=1' to count the number of divides.
 Count may be incorrect When SMT is on
 .It Li ARITH.MUL
 .Pq Event 14H , Umask 02H
-Counts the number of multiply operations executed. This includes integer as
+Counts the number of multiply operations executed.
+This includes integer as
 well as floating point multiply operations but excludes DPPS mul and MPSAD.
 Count may be incorrect When SMT is on
 .It Li INST_QUEUE_WRITES
@@ -344,64 +352,72 @@
 cycle.
 .It Li INST_DECODED.DEC0
 .Pq Event 18H , Umask 01H
-Counts number of instructions that require decoder 0 to be decoded. Usually,
-this means that the instruction maps to more than 1 uop
+Counts number of instructions that require decoder 0 to be decoded.
+Usually, this means that the instruction maps to more than 1 uop
 .It Li TWO_UOP_INSTS_DECODED
 .Pq Event 19H , Umask 01H
 An instruction that generates two uops was decoded
 .It Li INST_QUEUE_WRITE_CYCLES
 .Pq Event 1EH , Umask 01H
 This event counts the number of cycles during which instructions are written
-to the instruction queue. Dividing this counter by the number of
+to the instruction queue.
+Dividing this counter by the number of
 instructions written to the instruction queue (INST_QUEUE_WRITES) yields the
-average number of instructions decoded each cycle. If this number is less
+average number of instructions decoded each cycle.
+If this number is less
 than four and the pipe stalls, this indicates that the decoder is failing to
 decode enough instructions per cycle to sustain the 4-wide pipeline.
 If SSE* instructions that are 6 bytes or longer arrive one after another,
-then front end throughput may limit execution speed. In such case,
+then front end throughput may limit execution speed.
+In such case,
 .It Li LSD_OVERFLOW
 .Pq Event 20H , Umask 01H
 Number of loops that can not stream from the instruction queue.
 .It Li L2_RQSTS.LD_HIT
 .Pq Event 24H , Umask 01H
-Counts number of loads that hit the L2 cache. L2 loads include both L1D
-demand misses as well as L1D prefetches. L2 loads can be rejected for
-various reasons. Only non rejected loads are counted.
+Counts number of loads that hit the L2 cache.
+L2 loads include both L1D demand misses as well as L1D prefetches.
+L2 loads can be rejected for various reasons.
+Only non rejected loads are counted.
 .It Li L2_RQSTS.LD_MISS
 .Pq Event 24H , Umask 02H
-Counts the number of loads that miss the L2 cache. L2 loads include both L1D
-demand misses as well as L1D prefetches.
+Counts the number of loads that miss the L2 cache.
+L2 loads include both L1D demand misses as well as L1D prefetches.
 .It Li L2_RQSTS.LOADS
 .Pq Event 24H , Umask 03H
-Counts all L2 load requests. L2 loads include both L1D demand misses as well
-as L1D prefetches.
+Counts all L2 load requests.
+L2 loads include both L1D demand misses as well as L1D prefetches.
 .It Li L2_RQSTS.RFO_HIT
 .Pq Event 24H , Umask 04H
-Counts the number of store RFO requests that hit the L2 cache. L2 RFO
-requests include both L1D demand RFO misses as well as L1D RFO prefetches.
+Counts the number of store RFO requests that hit the L2 cache.
+L2 RFO requests include both L1D demand RFO misses as well as L1D RFO
+prefetches.
 Count includes WC memory requests, where the data is not fetched but the
 permission to write the line is required.
 .It Li L2_RQSTS.RFO_MISS
 .Pq Event 24H , Umask 08H
-Counts the number of store RFO requests that miss the L2 cache. L2 RFO
-requests include both L1D demand RFO misses as well as L1D RFO prefetches.
+Counts the number of store RFO requests that miss the L2 cache.
+L2 RFO requests include both L1D demand RFO misses as well as L1D RFO
+prefetches.
 .It Li L2_RQSTS.RFOS
 .Pq Event 24H , Umask 0CH
-Counts all L2 store RFO requests. L2 RFO requests include both L1D demand
+Counts all L2 store RFO requests.
+L2 RFO requests include both L1D demand
 RFO misses as well as L1D RFO prefetches.
 .It Li L2_RQSTS.IFETCH_HIT
 .Pq Event 24H , Umask 10H
-Counts number of instruction fetches that hit the L2 cache. L2 instruction
-fetches include both L1I demand misses as well as L1I instruction
-prefetches.
+Counts number of instruction fetches that hit the L2 cache.
+L2 instruction fetches include both L1I demand misses as well as L1I
+instruction prefetches.
 .It Li L2_RQSTS.IFETCH_MISS
 .Pq Event 24H , Umask 20H
-Counts number of instruction fetches that miss the L2 cache. L2 instruction
-fetches include both L1I demand misses as well as L1I instruction
-prefetches.
+Counts number of instruction fetches that miss the L2 cache.
+L2 instruction fetches include both L1I demand misses as well as L1I
+instruction prefetches.
 .It Li L2_RQSTS.IFETCHES
 .Pq Event 24H , Umask 30H
-Counts all instruction fetches. L2 instruction fetches include both L1I
+Counts all instruction fetches.
+L2 instruction fetches include both L1I
 demand misses as well as L1I instruction prefetches.
 .It Li L2_RQSTS.PREFETCH_HIT
 .Pq Event 24H , Umask 40H
@@ -421,26 +437,30 @@
 .It Li L2_DATA_RQSTS.DEMAND.I_STATE
 .Pq Event 26H , Umask 01H
 Counts number of L2 data demand loads where the cache line to be loaded is
-in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D
-demand misses and L1D prefetches.
+in the I (invalid) state, i.e. a cache miss.
+L2 demand loads are both L1D demand misses and L1D prefetches.
 .It Li L2_DATA_RQSTS.DEMAND.S_STATE
 .Pq Event 26H , Umask 02H
 Counts number of L2 data demand loads where the cache line to be loaded is
-in the S (shared) state. L2 demand loads are both L1D demand misses and L1D
+in the S (shared) state.
+L2 demand loads are both L1D demand misses and L1D
 prefetches.
 .It Li L2_DATA_RQSTS.DEMAND.E_STATE
 .Pq Event 26H , Umask 04H
 Counts number of L2 data demand loads where the cache line to be loaded is
-in the E (exclusive) state. L2 demand loads are both L1D demand misses and
+in the E (exclusive) state.
+L2 demand loads are both L1D demand misses and
 L1D prefetches.
 .It Li L2_DATA_RQSTS.DEMAND.M_STATE
 .Pq Event 26H , Umask 08H
 Counts number of L2 data demand loads where the cache line to be loaded is
-in the M (modified) state. L2 demand loads are both L1D demand misses and
+in the M (modified) state.
+L2 demand loads are both L1D demand misses and
 L1D prefetches.
 .It Li L2_DATA_RQSTS.DEMAND.MESI
 .Pq Event 26H , Umask 0FH
-Counts all L2 data demand requests. L2 demand loads are both L1D demand
+Counts all L2 data demand requests.
+L2 demand loads are both L1D demand
 misses and L1D prefetches.
 .It Li L2_DATA_RQSTS.PREFETCH.I_STATE
 .Pq Event 26H , Umask 10H
@@ -449,7 +469,8 @@
 .It Li L2_DATA_RQSTS.PREFETCH.S_STATE
 .Pq Event 26H , Umask 20H
 Counts number of L2 prefetch data loads where the cache line to be loaded is
-in the S (shared) state. A prefetch RFO will miss on an S state line, while
+in the S (shared) state.
+A prefetch RFO will miss on an S state line, while
 a prefetch read will hit on an S state line.
 .It Li L2_DATA_RQSTS.PREFETCH.E_STATE
 .Pq Event 26H , Umask 40H
@@ -468,23 +489,27 @@
 .It Li L2_WRITE.RFO.I_STATE
 .Pq Event 27H , Umask 01H
 Counts number of L2 demand store RFO requests where the cache line to be
-loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher
+loaded is in the I (invalid) state, i.e, a cache miss.
+The L1D prefetcher
 does not issue a RFO prefetch.
 This is a demand RFO request
 .It Li L2_WRITE.RFO.S_STATE
 .Pq Event 27H , Umask 02H
 Counts number of L2 store RFO requests where the cache line to be loaded is
-in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch.
+in the S (shared) state.
+The L1D prefetcher does not issue a RFO prefetch.
 This is a demand RFO request.
 .It Li L2_WRITE.RFO.M_STATE
 .Pq Event 27H , Umask 08H
 Counts number of L2 store RFO requests where the cache line to be loaded is
-in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch.
+in the M (modified) state.
+The L1D prefetcher does not issue a RFO prefetch.
 This is a demand RFO request.
 .It Li L2_WRITE.RFO.HIT
 .Pq Event 27H , Umask 0EH
 Counts number of L2 store RFO requests where the cache line to be loaded is
-in either the S, E or M states. The L1D prefetcher does not issue a RFO
+in either the S, E or M states.
+The L1D prefetcher does not issue a RFO
 prefetch.
 This is a demand RFO request
 .It Li L2_WRITE.RFO.MESI
@@ -536,21 +561,23 @@
 Counts all L1 writebacks to the L2.
 .It Li L3_LAT_CACHE.REFERENCE
 .Pq Event 2EH , Umask 02H
-Counts uncore Last Level Cache references. Because cache hierarchy, cache
+Counts uncore Last Level Cache references.
+Because cache hierarchy, cache
 sizes and other implementation-specific characteristics; value comparison to
 estimate performance differences is not recommended.
 See Table A-1.
 .It Li L3_LAT_CACHE.MISS
 .Pq Event 2EH , Umask 01H
-Counts uncore Last Level Cache misses. Because cache hierarchy, cache sizes
+Counts uncore Last Level Cache misses.
+Because cache hierarchy, cache sizes
 and other implementation-specific characteristics; value comparison to
 estimate performance differences is not recommended.
 See Table A-1.
 .It Li CPU_CLK_UNHALTED.THREAD_P
 .Pq Event 3CH , Umask 00H
 Counts the number of thread cycles while the thread is not in a halt state.
-The thread enters the halt state when it is running the HLT instruction. The
-core frequency may change from time to time due to power or thermal
+The thread enters the halt state when it is running the HLT instruction.
+The core frequency may change from time to time due to power or thermal
 throttling.
 see Table A-1
 .It Li CPU_CLK_UNHALTED.REF_P
@@ -569,7 +596,8 @@
 .It Li DTLB_MISSES.STLB_HIT
 .Pq Event 49H , Umask 10H
 Counts the number of DTLB first level misses that hit in the second level
-TLB. This event is only relevant if the core contains multiple DTLB levels.
+TLB.
+This event is only relevant if the core contains multiple DTLB levels.
 .It Li DTLB_MISSES.LARGE_WALK_COMPLETED
 .Pq Event 49H , Umask 80H
 Counts number of completed large page walks due to misses in the STLB.
@@ -584,17 +612,22 @@
 FIFO.
 .It Li L1D_PREFETCH.MISS
 .Pq Event 4EH , Umask 02H
-Counts number of hardware prefetch requests that miss the L1D. There are two
-prefetchers in the L1D. A streamer, which predicts lines sequentially after
+Counts number of hardware prefetch requests that miss the L1D.
+There are two
+prefetchers in the L1D.
+A streamer, which predicts lines sequentially after
 this one should be fetched, and the IP prefetcher that remembers access
-patterns for the current instruction. The streamer prefetcher stops on an
+patterns for the current instruction.
+The streamer prefetcher stops on an
 L1D hit, while the IP prefetcher does not.
 .It Li L1D_PREFETCH.TRIGGERS
 .Pq Event 4EH , Umask 04H
 Counts number of prefetch requests triggered by the Finite State Machine and
-pushed into the prefetch FIFO. Some of the prefetch requests are dropped due
+pushed into the prefetch FIFO.
+Some of the prefetch requests are dropped due
 to overwrites or competition between the IP index prefetcher and streamer
-prefetcher. The prefetch FIFO contains 4 entries.
+prefetcher.
+The prefetch FIFO contains 4 entries.
 .It Li EPT.WALK_CYCLES
 .Pq Event 4FH , Umask 10H
 Counts Extended Page walk cycles.
@@ -626,31 +659,33 @@
 accepted into the fill buffer.
 .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_DATA
 .Pq Event 60H , Umask 01H
-Counts weighted cycles of offcore demand data read requests. Does not
-include L2 prefetch requests.
+Counts weighted cycles of offcore demand data read requests.
+Does not include L2 prefetch requests.
 Counter 0.
 .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_CODE
 .Pq Event 60H , Umask 02H
-Counts weighted cycles of offcore demand code read requests. Does not
-include L2 prefetch requests.
+Counts weighted cycles of offcore demand code read requests.
+Does not include L2 prefetch requests.
 Counter 0.
 .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.RFO
 .Pq Event 60H , Umask 04H
-Counts weighted cycles of offcore demand RFO requests. Does not include L2
-prefetch requests.
+Counts weighted cycles of offcore demand RFO requests.
+Does not include L2 prefetch requests.
 Counter 0.
 .It Li OFFCORE_REQUESTS_OUTSTANDING.ANY.READ
 .Pq Event 60H , Umask 08H
-Counts weighted cycles of offcore read requests of any kind. Include L2
-prefetch requests.
-Ccounter 0.
+Counts weighted cycles of offcore read requests of any kind.
+Include L2 prefetch requests.
+Counter 0.
 .It Li CACHE_LOCK_CYCLES.L1D_L2
 .Pq Event 63H , Umask 01H
-Cycle count during which the L1D and L2 are locked. A lock is asserted when
+Cycle count during which the L1D and L2 are locked.
+A lock is asserted when
 there is a locked memory access, due to uncacheable memory, a locked
 operation that spans two cache lines, or a page walk from an uncacheable
 page table.
-Counter 0, 1 only. L1D and L2 locks have a very high performance penalty and
+Counter 0, 1 only.
+L1D and L2 locks have a very high performance penalty and
 it is highly recommended to avoid such accesses.
 .It Li CACHE_LOCK_CYCLES.L1D
 .Pq Event 63H , Umask 02H
@@ -665,9 +700,11 @@
 Counts all instruction fetches that hit the L1 instruction cache.
 .It Li L1I.MISSES
 .Pq Event 80H , Umask 02H
-Counts all instruction fetches that miss the L1I cache. This includes
+Counts all instruction fetches that miss the L1I cache.
+This includes
 instruction cache misses, streaming buffer misses, victim cache misses and
-uncacheable fetches. An instruction fetch miss is counted only once and not
+uncacheable fetches.
+An instruction fetch miss is counted only once and not
 once for every cycle it is outstanding.
 .It Li L1I.READS
 .Pq Event 80H , Umask 03H
@@ -747,10 +784,10 @@
 Counts taken near branches executed, but not necessarily retired.
 .It Li BR_INST_EXEC.ANY
 .Pq Event 88H , Umask 7FH
-Counts all near executed branches (not necessarily retired). This includes
-only instructions and not micro-op branches. Frequent branching is not
-necessarily a major performance issue. However frequent branch
-mispredictions may be a problem.
+Counts all near executed branches (not necessarily retired).
+This includes only instructions and not micro-op branches.
+Frequent branching is not necessarily a major performance issue.
+However frequent branch mispredictions may be a problem.
 .It Li BR_MISP_EXEC.COND
 .Pq Event 89H , Umask 01H
 Counts the number of mispredicted conditional near branch instructions
@@ -791,9 +828,10 @@
 executed, but not necessarily retired.
 .It Li RESOURCE_STALLS.ANY
 .Pq Event A2H , Umask 01H
-Counts the number of Allocator resource related stalls. Includes register
-renaming buffer entries, memory buffer entries. In addition to resource
-related stalls, this event counts some other events. Includes stalls arising
+Counts the number of Allocator resource related stalls.
+Includes register renaming buffer entries, memory buffer entries.
+In addition to resource related stalls, this event counts some other events.
+Includes stalls arising
 during branch misprediction recovery, such as if retirement of the
 mispredicted branch is delayed and stalls arising while store buffer is
 draining from synchronizing operations.
@@ -806,7 +844,8 @@
 .Pq Event A2H , Umask 04H
 This event counts the number of cycles when the number of instructions in
 the pipeline waiting for execution reaches the limit the processor can
-handle. A high count of this event indicates that there are long latency
+handle.
+A high count of this event indicates that there are long latency
 operations in the pipe (possibly load and store operations that miss the L2
 cache, or instructions dependent upon instructions further down the pipeline
 that have yet to retire.
@@ -816,7 +855,8 @@
 .Pq Event A2H , Umask 08H
 This event counts the number of cycles that a resource related stall will
 occur due to the number of store instructions reaching the limit of the
-pipeline, (i.e. all store buffers are used). The stall ends when a store
+pipeline, (i.e. all store buffers are used).
+The stall ends when a store
 instruction commits its data to the cache or memory.
 .It Li RESOURCE_STALLS.ROB_FULL
 .Pq Event A2H , Umask 10H
@@ -828,7 +868,8 @@
 .It Li RESOURCE_STALLS.MXCSR
 .Pq Event A2H , Umask 40H
 Stalls due to the MXCSR register rename occurring to close to a previous
-MXCSR rename. The MXCSR provides control and status for the MMX registers.
+MXCSR rename.
+The MXCSR provides control and status for the MMX registers.
 .It Li RESOURCE_STALLS.OTHER
 .Pq Event A2H , Umask 80H
 Counts the number of cycles while execution was stalled due to other
@@ -839,12 +880,14 @@
 necessarily executed or retired.
 .It Li BACLEAR_FORCE_IQ
 .Pq Event A7H , Umask 01H
-Counts number of times a BACLEAR was forced by the Instruction Queue. The IQ
-is also responsible for providing conditional branch prediction direction
-based on a static scheme and dynamic data provided by the L2 Branch
-Prediction Unit. If the conditional branch target is not found in the Target
+Counts number of times a BACLEAR was forced by the Instruction Queue.
+The IQ is also responsible for providing conditional branch prediction
+direction based on a static scheme and dynamic data provided by the L2
+Branch Prediction Unit.
+If the conditional branch target is not found in the Target
 Array and the IQ predicts that the branch is taken, then the IQ will force
-the Branch Address Calculator to issue a BACLEAR. Each BACLEAR asserted by
+the Branch Address Calculator to issue a BACLEAR.
+Each BACLEAR asserted by
 the BAC generates approximately an 8 cycle bubble in the instruction fetch
 pipeline.
 .It Li LSD.UOPS
@@ -856,22 +899,24 @@
 Counts the number of ITLB flushes
 .It Li OFFCORE_REQUESTS.DEMAND.READ_DATA
 .Pq Event B0H , Umask 01H
-Counts number of offcore demand data read requests. Does not count L2
-prefetch requests.
+Counts number of offcore demand data read requests.
+Does not count L2 prefetch requests.
 .It Li OFFCORE_REQUESTS.DEMAND.READ_CODE
 .Pq Event B0H , Umask 02H
-Counts number of offcore demand code read requests. Does not count L2
-prefetch requests.
+Counts number of offcore demand code read requests.
+Does not count L2 prefetch requests.
 .It Li OFFCORE_REQUESTS.DEMAND.RFO
 .Pq Event B0H , Umask 04H
-Counts number of offcore demand RFO requests. Does not count L2 prefetch
-requests.
+Counts number of offcore demand RFO requests.
+Does not count L2 prefetch requests.
 .It Li OFFCORE_REQUESTS.ANY.READ
 .Pq Event B0H , Umask 08H
-Counts number of offcore read requests. Includes L2 prefetch requests.
+Counts number of offcore read requests.
+Includes L2 prefetch requests.
 .It Li OFFCORE_REQUESTS.ANY.RFO
 .Pq Event 80H , Umask 10H
-Counts number of offcore RFO requests. Includes L2 prefetch requests.
+Counts number of offcore RFO requests.
+Includes L2 prefetch requests.
 .It Li OFFCORE_REQUESTS.L1D_WRITEBACK
 .Pq Event B0H , Umask 40H
 Counts number of L1D writebacks to the uncore.
@@ -880,38 +925,42 @@
 Counts all offcore requests.
 .It Li UOPS_EXECUTED.PORT0
 .Pq Event B1H , Umask 01H
-Counts number of Uops executed that were issued on port 0. Port 0 handles
-integer arithmetic, SIMD and FP add Uops.
+Counts number of Uops executed that were issued on port 0.
+Port 0 handles integer arithmetic, SIMD and FP add Uops.
 .It Li UOPS_EXECUTED.PORT1
 .Pq Event B1H , Umask 02H
-Counts number of Uops executed that were issued on port 1. Port 1 handles
-integer arithmetic, SIMD, integer shift, FP multiply and FP divide Uops.
+Counts number of Uops executed that were issued on port 1.
+Port 1 handles integer arithmetic, SIMD, integer shift, FP multiply and
+FP divide Uops.
 .It Li UOPS_EXECUTED.PORT2_CORE
 .Pq Event B1H , Umask 04H
-Counts number of Uops executed that were issued on port 2. Port 2 handles
-the load Uops. This is a core count only and can not be collected per
+Counts number of Uops executed that were issued on port 2.
+Port 2 handles the load Uops.
+This is a core count only and can not be collected per
 thread.
 .It Li UOPS_EXECUTED.PORT3_CORE
 .Pq Event B1H , Umask 08H
-Counts number of Uops executed that were issued on port 3. Port 3 handles
-store Uops. This is a core count only and can not be collected per thread.
+Counts number of Uops executed that were issued on port 3.
+Port 3 handles store Uops.
+This is a core count only and can not be collected per thread.
 .It Li UOPS_EXECUTED.PORT4_CORE
 .Pq Event B1H , Umask 10H
-Counts number of Uops executed that where issued on port 4. Port 4 handles
-the value to be stored for the store Uops issued on port 3. This is a core
-count only and can not be collected per thread.
+Counts number of Uops executed that where issued on port 4.
+Port 4 handles the value to be stored for the store Uops issued on port 3.
+This is a core count only and can not be collected per thread.
 .It Li UOPS_EXECUTED.CORE_ACTIVE_CYCLES_NO_PORT5
 .Pq Event B1H , Umask 1FH
 Counts number of cycles there are one or more uops being executed and were
-issued on ports 0-4. This is a core count only and can not be collected per
-thread.
+issued on ports 0-4.
+This is a core count only and can not be collected per thread.
 .It Li UOPS_EXECUTED.PORT5
 .Pq Event B1H , Umask 20H
 Counts number of Uops executed that where issued on port 5.
 .It Li UOPS_EXECUTED.CORE_ACTIVE_CYCLES
 .Pq Event B1H , Umask 3FH
 Counts number of cycles there are one or more uops being executed on any
-ports. This is a core count only and can not be collected per thread.
+ports.
+This is a core count only and can not be collected per thread.
 .It Li UOPS_EXECUTED.PORT015
 .Pq Event B1H , Umask 40H
 Counts number of Uops executed that where issued on port 0, 1, or 5.
@@ -924,15 +973,18 @@
 Counts number of cycles the SQ is full to handle off-core requests.
 .It Li SNOOPQ_REQUESTS_OUTSTANDING.DATA
 .Pq Event B3H , Umask 01H
-Counts weighted cycles of snoopq requests for data. Counter 0 only
+Counts weighted cycles of snoopq requests for data.
+Counter 0 only
 Use cmask=1 to count cycles not empty.
 .It Li SNOOPQ_REQUESTS_OUTSTANDING.INVALIDATE
 .Pq Event B3H , Umask 02H
-Counts weighted cycles of snoopq invalidate requests. Counter 0 only.
+Counts weighted cycles of snoopq invalidate requests.
+Counter 0 only.
 Use cmask=1 to count cycles not empty.
 .It Li SNOOPQ_REQUESTS_OUTSTANDING.CODE
 .Pq Event B3H , Umask 04H
-Counts weighted cycles of snoopq requests for code. Counter 0 only.
+Counts weighted cycles of snoopq requests for code.
+Counter 0 only.
 Use cmask=1 to count cycles not empty.
 .It Li SNOOPQ_REQUESTS.CODE
 .Pq Event B4H , Umask 01H
@@ -970,7 +1022,8 @@
 See Table A-1
 Notes: INST_RETIRED.ANY is counted by a designated fixed counter.
 INST_RETIRED.ANY_P is counted by a programmable counter and is an
-architectural performance event. Event is supported if CPUID.A.EBX[1] = 0.
+architectural performance event.
+Event is supported if CPUID.A.EBX[1] = 0.
 Counting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not
 count as retired instructions.
 .It Li INST_RETIRED.X87
@@ -985,8 +1038,9 @@
 .It Li UOPS_RETIRED.ANY
 .Pq Event C2H , Umask 01H
 Counts the number of micro-ops retired, (macro-fused=1, micro- fused=2,
-others=1; maximum count of 8 per cycle). Most instructions are composed of
-one or two micro-ops. Some instructions are decoded into longer sequences
+others=1; maximum count of 8 per cycle).
+Most instructions are composed of one or two micro-ops.
+Some instructions are decoded into longer sequences
 such as repeat instructions, floating point transcendental instructions, and
 assists.
 Use cmask=1 and invert to count active cycles or stalled cycles
@@ -1006,7 +1060,8 @@
 .Pq Event C3H , Umask 04H
 Counts the number of times that a program writes to a code section.
 Self-modifying code causes a sever penalty in all Intel 64 and IA-32
-processors. The modified cache line is written back to the L2 and L3caches.
+processors.
+The modified cache line is written back to the L2 and L3caches.
 .It Li BR_INST_RETIRED.ANY_P
 .Pq Event C4H , Umask 00H
 See Table A-1.
@@ -1063,23 +1118,25 @@
 .It Li MEM_LOAD_RETIRED.OTHER_CORE_L2_HIT_HITM
 .Pq Event CBH , Umask 08H
 Counts number of retired loads that hit in a sibling core's L2 (on die
-core). Since the L3 is inclusive of all cores on the package, this is an L3
-hit. This counts both clean or modified hits.
+core).
+Since the L3 is inclusive of all cores on the package, this is an L3 hit.
+This counts both clean or modified hits.
 .It Li MEM_LOAD_RETIRED.L3_MISS
 .Pq Event CBH , Umask 10H
-Counts number of retired loads that miss the L3 cache. The load was
-satisfied by a remote socket, local memory or an IOH.
+Counts number of retired loads that miss the L3 cache.
+The load was satisfied by a remote socket, local memory or an IOH.
 .It Li MEM_LOAD_RETIRED.HIT_LFB
 .Pq Event CBH , Umask 40H
 Counts number of retired loads that miss the L1D and the address is located
-in an allocated line fill buffer and will soon be committed to cache. This
-is counting secondary L1D misses.
+in an allocated line fill buffer and will soon be committed to cache.
+This is counting secondary L1D misses.
 .It Li MEM_LOAD_RETIRED.DTLB_MISS
 .Pq Event CBH , Umask 80H
-Counts the number of retired loads that missed the DTLB. The DTLB miss is
-not counted if the load operation causes a fault. This event counts loads
-from cacheable memory only. The event does not count loads by software
-prefetches. Counts both primary and secondary misses to the TLB.
+Counts the number of retired loads that missed the DTLB.
+The DTLB miss is not counted if the load operation causes a fault.
+This event counts loads from cacheable memory only.
+The event does not count loads by software prefetches.
+Counts both primary and secondary misses to the TLB.
 .It Li FP_MMX_TRANS.TO_FP
 .Pq Event CCH , Umask 01H
 Counts the first floating-point instruction following any MMX instruction.
@@ -1087,15 +1144,15 @@
 floating-point and MMX technology states.
 .It Li FP_MMX_TRANS.TO_MMX
 .Pq Event CCH , Umask 02H
-Counts the first MMX instruction following a floating-point instruction. You
-can use this event to estimate the penalties for the transitions between
+Counts the first MMX instruction following a floating-point instruction.
+You can use this event to estimate the penalties for the transitions between
 floating-point and MMX technology states.
 .It Li FP_MMX_TRANS.ANY
 .Pq Event CCH , Umask 03H
 Counts all transitions from floating point to MMX instructions and from MMX
-instructions to floating point instructions. You can use this event to
-estimate the penalties for the transitions between floating-point and MMX
-technology states.
+instructions to floating point instructions.
+You can use this event to estimate the penalties for the transitions between
+floating-point and MMX technology states.
 .It Li MACRO_INSTS.DECODED
 .Pq Event D0H , Umask 01H
 Counts the number of instructions decoded, (but not necessarily executed or
@@ -1105,14 +1162,15 @@
 Counts the cycles of decoder stalls.
 .It Li UOPS_DECODED.MS
 .Pq Event D1H , Umask 02H
-Counts the number of Uops decoded by the Microcode Sequencer, MS. The MS
-delivers uops when the instruction is more than 4 uops long or a microcode
-assist is occurring.
+Counts the number of Uops decoded by the Microcode Sequencer, MS.
+The MS delivers uops when the instruction is more than 4 uops long or a
+microcode assist is occurring.
 .It Li UOPS_DECODED.ESP_FOLDING
 .Pq Event D1H , Umask 04H
 Counts number of stack pointer (ESP) instructions decoded: push , pop , call
 , ret, etc. ESP instructions do not generate a Uop to increment or decrement
-ESP. Instead, they update an ESP_Offset register that keeps track of the
+ESP.
+Instead, they update an ESP_Offset register that keeps track of the
 delta to the current value of the ESP register.
 .It Li UOPS_DECODED.ESP_SYNC
 .Pq Event D1H , Umask 08H
@@ -1122,7 +1180,8 @@
 .It Li RAT_STALLS.FLAGS
 .Pq Event D2H , Umask 01H
 Counts the number of cycles during which execution stalled due to several
-reasons, one of which is a partial flag register stall. A partial register
+reasons, one of which is a partial flag register stall.
+A partial register
 stall may occur when two conditions are met: 1) an instruction modifies
 some, but not all, of the flags in the flag register and 2) the next
 instruction, which depends on flags, depends on flags that were not modified
@@ -1135,28 +1194,34 @@
 .It Li RAT_STALLS.ROB_READ_PORT
 .Pq Event D2H , Umask 04H
 Counts the number of cycles when ROB read port stalls occurred, which did
-not allow new micro-ops to enter the out-of-order pipeline. Note that, at
+not allow new micro-ops to enter the out-of-order pipeline.
+Note that, at
 this stage in the pipeline, additional stalls may occur at the same cycle
-and prevent the stalled micro-ops from entering the pipe. In such a case,
+and prevent the stalled micro-ops from entering the pipe.
+In such a case,
 micro-ops retry entering the execution pipe in the next cycle and the
 ROB-read port stall is counted again.
 .It Li RAT_STALLS.SCOREBOARD
 .Pq Event D2H , Umask 08H
 Counts the cycles where we stall due to microarchitecturally required
-serialization. Microcode scoreboarding stalls.
+serialization.
+Microcode scoreboarding stalls.
 .It Li RAT_STALLS.ANY
 .Pq Event D2H , Umask 0FH
 Counts all Register Allocation Table stall cycles due to: Cycles when ROB
 read port stalls occurred, which did not allow new micro-ops to enter the
-execution pipe. Cycles when partial register stalls occurred Cycles when
+execution pipe.
+Cycles when partial register stalls occurred Cycles when
 flag stalls occurred Cycles floating-point unit (FPU) status word stalls
-occurred. To count each of these conditions separately use the events:
+occurred.
+To count each of these conditions separately use the events:
 RAT_STALLS.ROB_READ_PORT, RAT_STALLS.PARTIAL, RAT_STALLS.FLAGS, and
 RAT_STALLS.FPSW.
 .It Li SEG_RENAME_STALLS
 .Pq Event D4H , Umask 01H
 Counts the number of stall cycles due to the lack of renaming resources for
-the ES, DS, FS, and GS segment registers. If a segment is renamed but not
+the ES, DS, FS, and GS segment registers.
+If a segment is renamed but not
 retired and a second update to the same segment occurs, a stall occurs in
 the front- end of the pipeline until the renamed segment retires.
 .It Li ES_REG_RENAMES
@@ -1176,16 +1241,18 @@
 .Pq Event E6H , Umask 01H
 Counts the number of times the front end is resteered, mainly when the
 Branch Prediction Unit cannot provide a correct prediction and this is
-corrected by the Branch Address Calculator at the front end. This can occur
+corrected by the Branch Address Calculator at the front end.
+This can occur
 if the code has many branches such that they cannot be consumed by the BPU.
 Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble
-in the instruction fetch pipeline. The effect on total execution time
-depends on the surrounding code.
+in the instruction fetch pipeline.
+The effect on total execution time depends on the surrounding code.
 .It Li BACLEAR.BAD_TARGET
 .Pq Event E6H , Umask 02H
 Counts number of Branch Address Calculator clears (BACLEAR) asserted due to
 conditional branch instructions in which there was a target hit but the
-direction was wrong. Each BACLEAR asserted by the BAC generates
+direction was wrong.
+Each BACLEAR asserted by the BAC generates
 approximately an 8 cycle bubble in the instruction fetch pipeline.
 .It Li BPU_CLEARS.EARLY
 .Pq Event E8H , Umask 01H
@@ -1195,7 +1262,8 @@
 .It Li BPU_CLEARS.LATE
 .Pq Event E8H , Umask 02H
 Counts late Branch Prediction Unit clears due to Most Recently Used
-conflicts. The PBU clear leads to a 3 cycle bubble in the Front End.
+conflicts.
+The PBU clear leads to a 3 cycle bubble in the Front End.
 .It Li THREAD_ACTIVE
 .Pq Event ECH , Umask 01H
 Counts cycles threads are active.
@@ -1258,12 +1326,13 @@
 Counts the number of SQ lock splits across a cache line.
 .It Li SQ_FULL_STALL_CYCLES
 .Pq Event F6H , Umask 01H
-Counts cycles the Super Queue is full. Neither of the threads on this core
-will be able to access the uncore.
+Counts cycles the Super Queue is full.
+Neither of the threads on this core will be able to access the uncore.
 .It Li FP_ASSIST.ALL
 .Pq Event F7H , Umask 01H
 Counts the number of floating point operations executed that required
-micro-code assist intervention. Assists are required in the following cases:
+micro-code assist intervention.
+Assists are required in the following cases:
 SSE instructions, (Denormal input when the DAZ flag is off or Underflow
 result when the FTZ flag is off): x87 instructions, (NaN or denormal are
 loaded to a register or used as input from memory, Division by 0 or
--- a/head/lib/libpmc/pmc.westmereuc.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.westmereuc.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.westmereuc.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd March 24, 2010
 .Dt PMC.WESTMEREUC 3
--- a/head/lib/libpmc/pmc.xscale.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc.xscale.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Rui Paulo ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc.xscale.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd December 23, 2009
 .Dt PMC.XSCALE 3
--- a/head/lib/libpmc/pmc_allocate.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_allocate.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_allocate.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd September 22, 2008
 .Dt PMC_ALLOCATE 3
--- a/head/lib/libpmc/pmc_attach.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_attach.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_attach.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 25, 2007
 .Dt PMC_ATTACH 3
--- a/head/lib/libpmc/pmc_capabilities.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_capabilities.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_capabilities.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd September 22, 2008
 .Dt PMC_CAPABILITIES 3
--- a/head/lib/libpmc/pmc_configure_logfile.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_configure_logfile.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD: head/lib/libpmc/pmc_configure_logfile.3 226514 2011-10-18 15:25:43Z fabient $
+.\" $FreeBSD: head/lib/libpmc/pmc_configure_logfile.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 24, 2007
 .Dt PMC_CONFIGURE_LOGFILE 3
--- a/head/lib/libpmc/pmc_disable.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_disable.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_disable.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd September 22, 2008
 .Dt PMC_ENABLE 3
--- a/head/lib/libpmc/pmc_event_names_of_class.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_event_names_of_class.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_event_names_of_class.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 23, 2007
 .Dt PMC_EVENT_NAMES_OF_CLASS 3
--- a/head/lib/libpmc/pmc_get_driver_stats.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_get_driver_stats.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_get_driver_stats.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 25, 2007
 .Dt PMC_GET_DRIVER_STATS 3
--- a/head/lib/libpmc/pmc_get_msr.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_get_msr.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_get_msr.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 25, 2007
 .Dt PMC_GET_MSR 3
--- a/head/lib/libpmc/pmc_init.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_init.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_init.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 24, 2007
 .Dt PMC_INIT 3
--- a/head/lib/libpmc/pmc_name_of_capability.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_name_of_capability.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_name_of_capability.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 24, 2007
 .Dt PMC_NAME_OF_CAPABILITY 3
--- a/head/lib/libpmc/pmc_read.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_read.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_read.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 25, 2007
 .Dt PMC_READ 3
--- a/head/lib/libpmc/pmc_set.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_set.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_set.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd November 25, 2007
 .Dt PMC_SET 3
--- a/head/lib/libpmc/pmc_start.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmc_start.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmc_start.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd September 22, 2008
 .Dt PMC_START 3
--- a/head/lib/libpmc/pmclog.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libpmc/pmclog.3	Fri Mar 02 16:56:02 2012 +0200
@@ -9,19 +9,19 @@
 .\"    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 Joseph Koshy ``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 Joseph Koshy 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.
+.\" 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.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/lib/libpmc/pmclog.3 231871 2012-02-17 11:09:51Z brueffer $
 .\"
 .Dd March 26, 2006
 .Dt PMCLOG 3
--- a/head/lib/libprocstat/common_kvm.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libprocstat/common_kvm.c	Fri Mar 02 16:56:02 2012 +0200
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libprocstat/common_kvm.c 221807 2011-05-12 10:11:39Z stas $");
+__FBSDID("$FreeBSD: head/lib/libprocstat/common_kvm.c 231384 2012-02-10 13:47:40Z ed $");
 
 #include <sys/param.h>
 #include <sys/user.h>
@@ -80,7 +80,7 @@
 	assert(buf);
 	if (!kvm_read_all(kd, (unsigned long)dev, &si, sizeof(si)))
 		return (1);
-	strlcpy(buf, si.__si_namebuf, SPECNAMELEN + 1);
+	strlcpy(buf, si.si_name, SPECNAMELEN + 1);
 	return (0);
 }
 
--- a/head/lib/libradius/libradius.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libradius/libradius.3	Fri Mar 02 16:56:02 2012 +0200
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libradius/libradius.3 228730 2011-12-20 11:13:44Z melifaro $
+.\" $FreeBSD: head/lib/libradius/libradius.3 231564 2012-02-12 18:29:56Z ed $
 .\"
 .Dd August 5, 2009
 .Dt LIBRADIUS 3
@@ -51,14 +51,14 @@
 .Fn rad_create_response "struct rad_handle *h" "int code"
 .Ft "struct in_addr"
 .Fn rad_cvt_addr "const void *data"
-.Ft u_int32_t
+.Ft uint32_t
 .Fn rad_cvt_int "const void *data"
 .Ft char *
 .Fn rad_cvt_string "const void *data" "size_t len"
 .Ft int
 .Fn rad_get_attr "struct rad_handle *h" "const void **data" "size_t *len"
 .Ft int
-.Fn rad_get_vendor_attr "u_int32_t *vendor" "const void **data" "size_t *len"
+.Fn rad_get_vendor_attr "uint32_t *vendor" "const void **data" "size_t *len"
 .Ft int
 .Fn rad_init_send_request "struct rad_handle *h" "int *fd" "struct timeval *tv"
 .Ft int
@@ -66,7 +66,7 @@
 .Ft int
 .Fn rad_put_attr "struct rad_handle *h" "int type" "const void *data" "size_t len"
 .Ft int
-.Fn rad_put_int "struct rad_handle *h" "int type" "u_int32_t value"
+.Fn rad_put_int "struct rad_handle *h" "int type" "uint32_t value"
 .Ft int
 .Fn rad_put_string "struct rad_handle *h" "int type" "const char *str"
 .Ft int
@@ -76,7 +76,7 @@
 .Ft int
 .Fn rad_put_vendor_attr "struct rad_handle *h" "int vendor" "int type" "const void *data" "size_t len"
 .Ft int
-.Fn rad_put_vendor_int "struct rad_handle *h" "int vendor" "int type" "u_int32_t value"
+.Fn rad_put_vendor_int "struct rad_handle *h" "int vendor" "int type" "uint32_t value"
 .Ft int
 .Fn rad_put_vendor_string "struct rad_handle *h" "int vendor" "int type" "const char *str"
 .Ft ssize_t
--- a/head/lib/librpcsvc/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/librpcsvc/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile    5.10 (Berkeley) 6/24/90
-# $FreeBSD$
+# $FreeBSD: head/lib/librpcsvc/Makefile 231118 2012-02-07 09:27:07Z dim $
 
 .include <bsd.own.mk>
 
@@ -18,7 +18,7 @@
 OTHERSRCS+= yp_passwd.c yp_update.c
 .endif
 
-RPCCOM = rpcgen -C
+RPCCOM=	RPCGEN_CPP=${CPP:Q} rpcgen -C
 
 INCDIRS= -I${DESTDIR}/usr/include/rpcsvc
 
--- a/head/lib/libsm/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libsm/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,4 @@
-# $FreeBSD: head/lib/libsm/Makefile 228590 2011-12-16 17:02:25Z dim $
+# $FreeBSD: head/lib/libsm/Makefile 232263 2012-02-28 18:30:18Z dim $
 
 .include <bsd.own.mk>
 
@@ -18,12 +18,10 @@
 
 WARNS?=	2
 
-.if ${CC:T:Mclang} == "clang"
 # Unfortunately, clang gives warnings about sendmail code that cannot
 # be turned off yet.  Since this is contrib code, and we don't really
 # care about the warnings, just make them non-fatal for now.
-NO_WERROR=
-.endif
+NO_WERROR.clang=
 
 LIB=	sm
 
--- a/head/lib/libthr/arch/arm/arm/pthread_md.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/arch/arm/arm/pthread_md.c	Fri Mar 02 16:56:02 2012 +0200
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/lib/libthr/arch/arm/arm/pthread_md.c 231619 2012-02-14 00:17:43Z gonzo $
  */
 
 #include <stdlib.h>
@@ -37,14 +37,17 @@
 {
 	struct tcb *tcb;
 
-	tcb = malloc(sizeof(struct tcb));
+	tcb = _rtld_allocate_tls((initial) ? _tcb_get() :  NULL,
+	    sizeof(struct tcb), 16);
 	if (tcb)
 		tcb->tcb_thread = thread;
+
 	return (tcb);
 }
 
 void
 _tcb_dtor(struct tcb *tcb)
 {
-	free(tcb);
+
+	_rtld_free_tls(tcb, sizeof(struct tcb), 16);
 }
--- a/head/lib/libthr/arch/arm/include/pthread_md.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/arch/arm/include/pthread_md.h	Fri Mar 02 16:56:02 2012 +0200
@@ -23,7 +23,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.
  *
- * $FreeBSD$
+ * $FreeBSD: head/lib/libthr/arch/arm/include/pthread_md.h 231619 2012-02-14 00:17:43Z gonzo $
  */
 
 /*
@@ -43,10 +43,8 @@
  * Variant II tcb, first two members are required by rtld.
  */
 struct tcb {
-	struct tcb		*tcb_self;	/* required by rtld */
 	void			*tcb_dtv;	/* required by rtld */
 	struct pthread		*tcb_thread;	/* our hook */
-	void			*tcb_spare[1];
 };
 
 /*
--- a/head/lib/libthr/arch/mips/include/pthread_md.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/arch/mips/include/pthread_md.h	Fri Mar 02 16:56:02 2012 +0200
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * from: src/lib/libthr/arch/arm/include/pthread_md.h,v 1.3 2005/10/29 13:40:31 davidxu
- * $FreeBSD$
+ * $FreeBSD: head/lib/libthr/arch/mips/include/pthread_md.h 231350 2012-02-10 06:53:25Z gonzo $
  */
 
 /*
@@ -39,15 +39,19 @@
 
 #define	CPU_SPINWAIT
 #define	DTV_OFFSET		offsetof(struct tcb, tcb_dtv)
+#ifdef __mips_n64
+#define	TP_OFFSET		0x7010
+#else
+#define	TP_OFFSET		0x7008
+#endif
 
 /*
- * Variant II tcb, first two members are required by rtld.
+ * Variant I tcb. The structure layout is fixed, don't blindly
+ * change it!
  */
 struct tcb {
-	struct tcb		*tcb_self;	/* required by rtld */
-	void			*tcb_dtv;	/* required by rtld */
-	struct pthread		*tcb_thread;	/* our hook */
-	void			*tcb_spare[1];
+	void			*tcb_dtv;
+	struct pthread		*tcb_thread;
 };
 
 /*
@@ -61,7 +65,7 @@
 _tcb_set(struct tcb *tcb)
 {
 
-	sysarch(MIPS_SET_TLS, tcb);
+	sysarch(MIPS_SET_TLS, ((uint8_t*)tcb + TP_OFFSET));
 }
 
 /*
@@ -70,10 +74,10 @@
 static __inline struct tcb *
 _tcb_get(void)
 {
-	void *tcb;
+	uint8_t *tcb;
 
 	sysarch(MIPS_GET_TLS, &tcb);
-	return tcb;
+	return ((struct tcb *)(tcb - TP_OFFSET));
 }
 
 extern struct pthread *_thr_initial;
--- a/head/lib/libthr/arch/mips/mips/pthread_md.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/arch/mips/mips/pthread_md.c	Fri Mar 02 16:56:02 2012 +0200
@@ -27,13 +27,15 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libthr/arch/mips/mips/pthread_md.c 231350 2012-02-10 06:53:25Z gonzo $");
 
 #include <stdlib.h>
 #include <sys/types.h>
 #include <rtld_tls.h>
 #include <strings.h>
 
+#include <machine/sysarch.h>
+
 #include "pthread_md.h"
 
 struct tcb *
@@ -41,16 +43,17 @@
 {
 	struct tcb *tcb;
 
-	tcb = malloc(sizeof(struct tcb));
-	if (tcb) {
-		bzero(tcb, sizeof(struct tcb));
+	tcb = _rtld_allocate_tls((initial) ? _tcb_get() :  NULL,
+	    sizeof(struct tcb), 16);
+	if (tcb)
 		tcb->tcb_thread = thread;
-	}
+
 	return (tcb);
 }
 
 void
 _tcb_dtor(struct tcb *tcb)
 {
-	free(tcb);
+
+	_rtld_free_tls(tcb, sizeof(struct tcb), 16);
 }
--- a/head/lib/libthr/thread/thr_list.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/thread/thr_list.c	Fri Mar 02 16:56:02 2012 +0200
@@ -24,7 +24,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.
  *
- * $FreeBSD$
+ * $FreeBSD: head/lib/libthr/thread/thr_list.c 231503 2012-02-11 04:12:12Z davidxu $
  */
 
 #include <sys/types.h>
@@ -149,11 +149,20 @@
 		if (total_threads > MAX_THREADS)
 			return (NULL);
 		atomic_fetchadd_int(&total_threads, 1);
-		thread = malloc(sizeof(struct pthread));
+		thread = calloc(1, sizeof(struct pthread));
 		if (thread == NULL) {
 			atomic_fetchadd_int(&total_threads, -1);
 			return (NULL);
 		}
+		if ((thread->sleepqueue = _sleepq_alloc()) == NULL ||
+		    (thread->wake_addr = _thr_alloc_wake_addr()) == NULL) {
+			thr_destroy(curthread, thread);
+			atomic_fetchadd_int(&total_threads, -1);
+			return (NULL);
+		}
+	} else {
+		bzero(&thread->_pthread_startzero, 
+			__rangeof(struct pthread, _pthread_startzero, _pthread_endzero));
 	}
 	if (curthread != NULL) {
 		THR_LOCK_ACQUIRE(curthread, &tcb_lock);
@@ -163,10 +172,7 @@
 		tcb = _tcb_ctor(thread, 1 /* initial tls */);
 	}
 	if (tcb != NULL) {
-		memset(thread, 0, sizeof(*thread));
 		thread->tcb = tcb;
-		thread->sleepqueue = _sleepq_alloc();
-		thread->wake_addr = _thr_alloc_wake_addr();
 	} else {
 		thr_destroy(curthread, thread);
 		atomic_fetchadd_int(&total_threads, -1);
@@ -194,8 +200,6 @@
 	}
 	thread->tcb = NULL;
 	if ((curthread == NULL) || (free_thread_count >= MAX_CACHED_THREADS)) {
-		_sleepq_free(thread->sleepqueue);
-		_thr_release_wake_addr(thread->wake_addr);
 		thr_destroy(curthread, thread);
 		atomic_fetchadd_int(&total_threads, -1);
 	} else {
@@ -213,6 +217,10 @@
 static void
 thr_destroy(struct pthread *curthread __unused, struct pthread *thread)
 {
+	if (thread->sleepqueue != NULL)
+		_sleepq_free(thread->sleepqueue);
+	if (thread->wake_addr != NULL)
+		_thr_release_wake_addr(thread->wake_addr);
 	free(thread);
 }
 
--- a/head/lib/libthr/thread/thr_private.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/thread/thr_private.h	Fri Mar 02 16:56:02 2012 +0200
@@ -26,7 +26,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.
  *
- * $FreeBSD$
+ * $FreeBSD: head/lib/libthr/thread/thr_private.h 231106 2012-02-07 02:57:36Z davidxu $
  */
 
 #ifndef _THR_PRIVATE_H
@@ -343,6 +343,7 @@
  * Thread structure.
  */
 struct pthread {
+#define _pthread_startzero	tid
 	/* Kernel thread id. */
 	long			tid;
 #define	TID_TERMINATED		1
@@ -506,12 +507,6 @@
 	/* Event */
 	td_event_msg_t		event_buf;
 
-	struct wake_addr	*wake_addr;
-#define WAKE_ADDR(td)           ((td)->wake_addr)
-
-	/* Sleep queue */
-	struct	sleepqueue	*sleepqueue;
-
 	/* Wait channel */
 	void			*wchan;
 
@@ -526,6 +521,14 @@
 
 	/* Deferred threads from pthread_cond_signal. */
 	unsigned int 		*defer_waiters[MAX_DEFER_WAITERS];
+#define _pthread_endzero	wake_addr
+
+	struct wake_addr	*wake_addr;
+#define WAKE_ADDR(td)           ((td)->wake_addr)
+
+	/* Sleep queue */
+	struct	sleepqueue	*sleepqueue;
+
 };
 
 #define THR_SHOULD_GC(thrd) 						\
--- a/head/lib/libthr/thread/thr_rwlock.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/thread/thr_rwlock.c	Fri Mar 02 16:56:02 2012 +0200
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/lib/libthr/thread/thr_rwlock.c 232209 2012-02-27 13:38:52Z davidxu $
  */
 
 #include <errno.h>
@@ -123,7 +123,6 @@
 {
 	struct pthread *curthread = _get_curthread();
 	pthread_rwlock_t prwlock;
-	struct timespec ts, ts2, *tsp;
 	int flags;
 	int ret;
 
@@ -162,18 +161,8 @@
 		return (EINVAL);
 
 	for (;;) {
-		if (abstime) {
-			clock_gettime(CLOCK_REALTIME, &ts);
-			TIMESPEC_SUB(&ts2, abstime, &ts);
-			if (ts2.tv_sec < 0 || 
-			    (ts2.tv_sec == 0 && ts2.tv_nsec <= 0))
-				return (ETIMEDOUT);
-			tsp = &ts2;
-		} else
-			tsp = NULL;
-
 		/* goto kernel and lock it */
-		ret = __thr_rwlock_rdlock(&prwlock->lock, flags, tsp);
+		ret = __thr_rwlock_rdlock(&prwlock->lock, flags, abstime);
 		if (ret != EINTR)
 			break;
 
@@ -255,7 +244,6 @@
 {
 	struct pthread *curthread = _get_curthread();
 	pthread_rwlock_t prwlock;
-	struct timespec ts, ts2, *tsp;
 	int ret;
 
 	CHECK_AND_INIT_RWLOCK
@@ -275,18 +263,8 @@
 		return (EINVAL);
 
 	for (;;) {
-		if (abstime != NULL) {
-			clock_gettime(CLOCK_REALTIME, &ts);
-			TIMESPEC_SUB(&ts2, abstime, &ts);
-			if (ts2.tv_sec < 0 || 
-			    (ts2.tv_sec == 0 && ts2.tv_nsec <= 0))
-				return (ETIMEDOUT);
-			tsp = &ts2;
-		} else
-			tsp = NULL;
-
 		/* goto kernel and lock it */
-		ret = __thr_rwlock_wrlock(&prwlock->lock, tsp);
+		ret = __thr_rwlock_wrlock(&prwlock->lock, abstime);
 		if (ret == 0) {
 			prwlock->owner = curthread;
 			break;
--- a/head/lib/libthr/thread/thr_umtx.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/thread/thr_umtx.c	Fri Mar 02 16:56:02 2012 +0200
@@ -23,7 +23,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.
  *
- * $FreeBSD: head/lib/libthr/thread/thr_umtx.c 227604 2011-11-17 01:43:50Z davidxu $
+ * $FreeBSD: head/lib/libthr/thread/thr_umtx.c 232209 2012-02-27 13:38:52Z davidxu $
  *
  */
 
@@ -109,23 +109,30 @@
 
 int
 __thr_umutex_timedlock(struct umutex *mtx, uint32_t id,
-	const struct timespec *ets)
+	const struct timespec *abstime)
 {
-	struct timespec timo, cts;
+	struct _umtx_time *tm_p, timeout;
+	size_t tm_size;
 	uint32_t owner;
 	int ret;
 
-	clock_gettime(CLOCK_REALTIME, &cts);
-	TIMESPEC_SUB(&timo, ets, &cts);
-
-	if (timo.tv_sec < 0)
-		return (ETIMEDOUT);
+	if (abstime == NULL) {
+		tm_p = NULL;
+		tm_size = 0;
+	} else {
+		timeout._clockid = CLOCK_REALTIME;
+		timeout._flags = UMTX_ABSTIME;
+		timeout._timeout = *abstime;
+		tm_p = &timeout;
+		tm_size = sizeof(timeout);
+	}
 
 	for (;;) {
 		if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) == 0) {
 
 			/* wait in kernel */
-			ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0, 0, &timo);
+			ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0,
+				 (void *)tm_size, __DECONST(void *, tm_p));
 
 			/* now try to lock it */
 			owner = mtx->m_owner;
@@ -133,18 +140,13 @@
 			     atomic_cmpset_acq_32(&mtx->m_owner, owner, id|owner))
 				return (0);
 		} else {
-			ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, 0, &timo);
+			ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, 
+				 (void *)tm_size, __DECONST(void *, tm_p));
 			if (ret == 0)
 				break;
 		}
 		if (ret == ETIMEDOUT)
 			break;
-		clock_gettime(CLOCK_REALTIME, &cts);
-		TIMESPEC_SUB(&timo, ets, &cts);
-		if (timo.tv_sec < 0 || (timo.tv_sec == 0 && timo.tv_nsec == 0)) {
-			ret = ETIMEDOUT;
-			break;
-		}
 	}
 	return (ret);
 }
@@ -200,20 +202,23 @@
 _thr_umtx_timedwait_uint(volatile u_int *mtx, u_int id, int clockid,
 	const struct timespec *abstime, int shared)
 {
-	struct timespec ts, ts2, *tsp;
+	struct _umtx_time *tm_p, timeout;
+	size_t tm_size;
 
-	if (abstime != NULL) {
-		clock_gettime(clockid, &ts);
-		TIMESPEC_SUB(&ts2, abstime, &ts);
-		if (ts2.tv_sec < 0 || ts2.tv_nsec <= 0)
-			return (ETIMEDOUT);
-		tsp = &ts2;
+	if (abstime == NULL) {
+		tm_p = NULL;
+		tm_size = 0;
 	} else {
-		tsp = NULL;
+		timeout._clockid = CLOCK_REALTIME;
+		timeout._flags = UMTX_ABSTIME;
+		timeout._timeout = *abstime;
+		tm_p = &timeout;
+		tm_size = sizeof(timeout);
 	}
+
 	return _umtx_op_err(__DEVOLATILE(void *, mtx), 
-		shared ? UMTX_OP_WAIT_UINT : UMTX_OP_WAIT_UINT_PRIVATE, id, NULL,
-			tsp);
+		shared ? UMTX_OP_WAIT_UINT : UMTX_OP_WAIT_UINT_PRIVATE, id, 
+		(void *)tm_size, __DECONST(void *, tm_p));
 }
 
 int
@@ -260,15 +265,42 @@
 }
 
 int
-__thr_rwlock_rdlock(struct urwlock *rwlock, int flags, struct timespec *tsp)
+__thr_rwlock_rdlock(struct urwlock *rwlock, int flags,
+	const struct timespec *tsp)
 {
-	return _umtx_op_err(rwlock, UMTX_OP_RW_RDLOCK, flags, NULL, tsp);
+	struct _umtx_time timeout, *tm_p;
+	size_t tm_size;
+
+	if (tsp == NULL) {
+		tm_p = NULL;
+		tm_size = 0;
+	} else {
+		timeout._timeout = *tsp;
+		timeout._flags = UMTX_ABSTIME;
+		timeout._clockid = CLOCK_REALTIME;
+		tm_p = &timeout;
+		tm_size = sizeof(timeout);
+	}
+	return _umtx_op_err(rwlock, UMTX_OP_RW_RDLOCK, flags, (void *)tm_size, tm_p);
 }
 
 int
-__thr_rwlock_wrlock(struct urwlock *rwlock, struct timespec *tsp)
+__thr_rwlock_wrlock(struct urwlock *rwlock, const struct timespec *tsp)
 {
-	return _umtx_op_err(rwlock, UMTX_OP_RW_WRLOCK, 0, NULL, tsp);
+	struct _umtx_time timeout, *tm_p;
+	size_t tm_size;
+
+	if (tsp == NULL) {
+		tm_p = NULL;
+		tm_size = 0;
+	} else {
+		timeout._timeout = *tsp;
+		timeout._flags = UMTX_ABSTIME;
+		timeout._clockid = CLOCK_REALTIME;
+		tm_p = &timeout;
+		tm_size = sizeof(timeout);
+	}
+	return _umtx_op_err(rwlock, UMTX_OP_RW_WRLOCK, 0, (void *)tm_size, tm_p);
 }
 
 int
--- a/head/lib/libthr/thread/thr_umtx.h	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthr/thread/thr_umtx.h	Fri Mar 02 16:56:02 2012 +0200
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/lib/libthr/thread/thr_umtx.h 232209 2012-02-27 13:38:52Z davidxu $
  */
 
 #ifndef _THR_FBSD_UMTX_H_
@@ -60,8 +60,10 @@
 int _thr_ucond_signal(struct ucond *cv) __hidden;
 int _thr_ucond_broadcast(struct ucond *cv) __hidden;
 
-int __thr_rwlock_rdlock(struct urwlock *rwlock, int flags, struct timespec *tsp) __hidden;
-int __thr_rwlock_wrlock(struct urwlock *rwlock, struct timespec *tsp) __hidden;
+int __thr_rwlock_rdlock(struct urwlock *rwlock, int flags,
+	const struct timespec *tsp) __hidden;
+int __thr_rwlock_wrlock(struct urwlock *rwlock,
+	const struct timespec *tsp) __hidden;
 int __thr_rwlock_unlock(struct urwlock *rwlock) __hidden;
 
 /* Internal used only */
--- a/head/lib/libthread_db/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libthread_db/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,4 @@
-# $FreeBSD: head/lib/libthread_db/Makefile 228578 2011-12-16 15:00:56Z dim $
+# $FreeBSD: head/lib/libthread_db/Makefile 232263 2012-02-28 18:30:18Z dim $
 
 .PATH:	${.CURDIR}/arch/${MACHINE_CPUARCH}
 
@@ -16,10 +16,8 @@
 SYMBOL_MAPS=${SYM_MAPS}
 VERSION_DEF=${.CURDIR}/../libc/Versions.def
 
-.if ${CC:T:Mclang} == "clang"
 # Unfortunately, clang gives an incorrect warning about alignment in
 # arch/i386/libpthread_md.c, so turn that off for now.
-NO_WCAST_ALIGN=
-.endif
+NO_WCAST_ALIGN.clang=
 
 .include <bsd.lib.mk>
--- a/head/lib/libusb/libusb.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libusb/libusb.3	Fri Mar 02 16:56:02 2012 +0200
@@ -24,9 +24,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libusb/libusb.3 227404 2011-11-09 19:03:26Z hselasky $
+.\" $FreeBSD: head/lib/libusb/libusb.3 232157 2012-02-25 14:31:25Z gjb $
 .\"
-.Dd November 9, 2011
+.Dd February 25, 2012
 .Dt LIBUSB 3
 .Os
 .Sh NAME
@@ -483,7 +483,7 @@
 .Pp
 .Ft int
 .Fn libusb_handle_events_locked "libusb_context *ctx" "struct timeval *tv"
-Handle any pending events by polling file desciptors, without checking if
+Handle any pending events by polling file descriptors, without checking if
 another thread is already doing so.
 Must be called with the event lock held.
 .Pp
--- a/head/lib/libutil/kinfo_getproc.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libutil/kinfo_getproc.3	Fri Mar 02 16:56:02 2012 +0200
@@ -23,9 +23,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libutil/kinfo_getproc.3 221807 2011-05-12 10:11:39Z stas $
+.\" $FreeBSD: head/lib/libutil/kinfo_getproc.3 232157 2012-02-25 14:31:25Z gjb $
 .\"
-.Dd July 9, 2009
+.Dd February 25, 2012
 .Os
 .Dt KINFO_GETPROC 3
 .Sh NAME
@@ -44,7 +44,7 @@
 The
 .Ar pid
 field contains the process identifier.
-This should be the a process that you have privilige to access.
+This should be a process that you have privilege to access.
 This function is a wrapper around
 .Xr sysctl 3
 with the
--- a/head/lib/libutil/login_class.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libutil/login_class.c	Fri Mar 02 16:56:02 2012 +0200
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libutil/login_class.c 231306 2012-02-09 21:06:47Z eadler $");
 
 #include <sys/param.h>
 #include <sys/cpuset.h>
@@ -452,18 +452,21 @@
 	    p = (rtp.prio > RTP_PRIO_MAX) ? 31 : p;
 	    if (rtprio(RTP_SET, 0, &rtp))
 		syslog(LOG_WARNING, "rtprio '%s' (%s): %m",
-		    pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS);
+		    pwd ? pwd->pw_name : "-",
+		    lc ? lc->lc_class : LOGIN_DEFCLASS);
 	} else if (p < PRIO_MIN) {
 	    rtp.type = RTP_PRIO_REALTIME;
 	    rtp.prio = abs(p - PRIO_MIN + RTP_PRIO_MAX);
 	    p = (rtp.prio > RTP_PRIO_MAX) ? 1 : p;
 	    if (rtprio(RTP_SET, 0, &rtp))
 		syslog(LOG_WARNING, "rtprio '%s' (%s): %m",
-		    pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS);
+		    pwd ? pwd->pw_name : "-",
+		    lc ? lc->lc_class : LOGIN_DEFCLASS);
 	} else {
 	    if (setpriority(PRIO_PROCESS, 0, (int)p) != 0)
 		syslog(LOG_WARNING, "setpriority '%s' (%s): %m",
-		    pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS);
+		    pwd ? pwd->pw_name : "-",
+		    lc ? lc->lc_class : LOGIN_DEFCLASS);
 	}
     }
 
--- a/head/lib/libutil/pidfile.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libutil/pidfile.3	Fri Mar 02 16:56:02 2012 +0200
@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libutil/pidfile.3 230234 2012-01-16 21:25:41Z ghelmer $
+.\" $FreeBSD: head/lib/libutil/pidfile.3 231193 2012-02-08 08:49:30Z pjd $
 .\"
-.Dd October 16, 2011
+.Dd February 8, 2012
 .Dt PIDFILE 3
 .Os
 .Sh NAME
@@ -85,6 +85,9 @@
 The
 .Fn pidfile_write
 function writes process' PID into a previously opened file.
+The file is truncated before write, so calling the
+.Fn pidfile_write
+function multiple times is supported.
 .Pp
 The
 .Fn pidfile_close
@@ -147,6 +150,11 @@
 	}
 	/* If we cannot create pidfile from other reasons, only warn. */
 	warn("Cannot open or create pidfile");
+	/*
+	 * Eventhough pfh is NULL we can continue, as the other pidfile_*
+	 * function can handle such situation by doing nothing except setting
+	 * errno to EDOOFUS.
+	 */
 }
 
 if (daemon(0, 0) == -1) {
--- a/head/lib/libutil/pidfile.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libutil/pidfile.c	Fri Mar 02 16:56:02 2012 +0200
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/libutil/pidfile.c 230037 2012-01-12 22:49:36Z ghelmer $");
+__FBSDID("$FreeBSD: head/lib/libutil/pidfile.c 231938 2012-02-20 13:59:24Z ghelmer $");
 
 #include <sys/param.h>
 #include <sys/file.h>
--- a/head/lib/libutil/pw_util.c	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libutil/pw_util.c	Fri Mar 02 16:56:02 2012 +0200
@@ -39,7 +39,7 @@
 static const char sccsid[] = "@(#)pw_util.c	8.3 (Berkeley) 4/2/94";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: head/lib/libutil/pw_util.c 229572 2012-01-05 10:40:24Z bapt $";
+  "$FreeBSD: head/lib/libutil/pw_util.c 231383 2012-02-10 13:40:32Z ed $";
 #endif /* not lint */
 
 /*
@@ -347,7 +347,8 @@
 	sigprocmask(SIG_SETMASK, &oldsigset, NULL);
 	if (stat(tempname, &st2) == -1)
 		return (-1);
-	return (st1.st_mtime != st2.st_mtime);
+	return (st1.st_mtim.tv_sec != st2.st_mtim.tv_sec ||
+	    st1.st_mtim.tv_nsec != st2.st_mtim.tv_nsec);
 }
 
 /*
--- a/head/lib/libvgl/vgl.3	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libvgl/vgl.3	Fri Mar 02 16:56:02 2012 +0200
@@ -25,8 +25,8 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/lib/libvgl/vgl.3 229784 2012-01-07 16:13:56Z uqs $
-.Dd November 7, 1999
+.\" $FreeBSD: head/lib/libvgl/vgl.3 232157 2012-02-25 14:31:25Z gjb $
+.Dd February 25, 2012
 .Dt VGL 3
 .Os
 .Sh NAME
@@ -386,7 +386,7 @@
 The desired virtual screen width may not be achievable because
 of the video card hardware.
 In such case the video driver (and
-underlaying video BIOS) may choose the next largest values.
+underlying video BIOS) may choose the next largest values.
 Always examine
 .Va object->VXsize
 and
--- a/head/lib/libypclnt/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libypclnt/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,4 +1,4 @@
-# $FreeBSD$
+# $FreeBSD: head/lib/libypclnt/Makefile 231118 2012-02-07 09:27:07Z dim $
 
 LIB=	ypclnt
 SHLIB_MAJOR= 4
@@ -22,7 +22,7 @@
 	yppasswd_private_clnt.c \
 	yppasswd_private_xdr.c
 
-RPCGEN=	rpcgen -C
+RPCGEN=	RPCGEN_CPP=${CPP:Q} rpcgen -C
 RPCSRC=	${.CURDIR}/../../include/rpcsvc/yp.x
 RPCSRC_PW=	${.CURDIR}/../../include/rpcsvc/yppasswd.x
 RPCSRC_PRIV=	${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
--- a/head/lib/libz/Makefile	Fri Mar 02 16:55:36 2012 +0200
+++ b/head/lib/libz/Makefile	Fri Mar 02 16:56:02 2012 +0200
@@ -1,5 +1,5 @@
 #
-# $FreeBSD: head/lib/libz/Makefile 224196 2011-07-18 19:23:50Z delphij $
+# $FreeBSD: head/lib/libz/Makefile 232263 2012-02-28 18:30:18Z dim $
 #
 
 LIB=		z
@@ -47,10 +47,6 @@
 #SRCS+=		gvmat64.S
 #CFLAGS+=	-DASMV -DNO_UNDERLINE
 #ACFLAGS+=	-Wa,--noexecstack
-#.if ${CC:T:Mclang} == "clang"
-## XXX: clang integrated-as doesn't grok .intel_syntax directives yet
-#ACFLAGS+=	${.IMPSRC:T:Mgvmat64.S:C/^.+$/-no-integrated-as/}
-#.endif
 #.endif
 
 VERSION_DEF=	${.CURDIR}/Versions.def
@@ -71,3 +67,7 @@
 		echo hello world | ./minigzip | ./minigzip -d )
 
 .include <bsd.lib.mk>
+
+## XXX: clang integrated-as doesn't grok .intel_syntax directives yet
+#ACFLAGS.gvmat64.S=	${CLANG_NO_IAS}
+#ACFLAGS+=		${ACFLAGS.${.IMPSRC:T}}