CVS commit: src/distrib/sets/lists

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 20 02:44:51 UTC 2016

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/debug: shl.mi

Log Message:
bump for new elftoolchain


To generate a diff of this commit:
cvs rdiff -u -r1.761 -r1.762 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.123 -r1.124 src/distrib/sets/lists/debug/shl.mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.761 src/distrib/sets/lists/base/shl.mi:1.762
--- src/distrib/sets/lists/base/shl.mi:1.761	Sun Jan 31 13:41:35 2016
+++ src/distrib/sets/lists/base/shl.mi	Fri Feb 19 21:44:51 2016
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.761 2016/01/31 18:41:35 christos Exp $
+# $NetBSD: shl.mi,v 1.762 2016/02/20 02:44:51 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -254,14 +254,14 @@
 ./usr/lib/libdtrace.so.3			base-sys-shlib		compatfile,dtrace
 ./usr/lib/libdtrace.so.3.0			base-sys-shlib		compatfile,dtrace
 ./usr/lib/libdwarf.sobase-sys-shlib		compatfile
-./usr/lib/libdwarf.so.1base-sys-shlib		compatfile
-./usr/lib/libdwarf.so.1.0			base-sys-shlib		compatfile
+./usr/lib/libdwarf.so.2base-sys-shlib		compatfile
+./usr/lib/libdwarf.so.2.0			base-sys-shlib		compatfile
 ./usr/lib/libedit.sobase-sys-shlib		compatfile
 ./usr/lib/libedit.so.3base-sys-shlib		compatfile
 ./usr/lib/libedit.so.3.1			base-sys-shlib		compatfile
 ./usr/lib/libelf.sobase-sys-shlib		compatfile
-./usr/lib/libelf.so.1base-sys-shlib		compatfile
-./usr/lib/libelf.so.1.0base-sys-shlib		compatfile
+./usr/lib/libelf.so.2base-sys-shlib		compatfile
+./usr/lib/libelf.so.2.0base-sys-shlib		compatfile
 ./usr/lib/libevent.sobase-sys-shlib		compatfile
 ./usr/lib/libevent.so.4base-sys-shlib		compatfile
 ./usr/lib/libevent.so.4.0			base-sys-shlib		compatfile

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.123 src/distrib/sets/lists/debug/shl.mi:1.124
--- src/distrib/sets/lists/debug/shl.mi:1.123	Sun Jan 31 13:41:36 2016
+++ src/distrib/sets/lists/debug/shl.mi	Fri Feb 19 21:44:51 2016
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.123 2016/01/31 18:41:36 christos Exp $
+# $NetBSD: shl.mi,v 1.124 2016/02/20 02:44:51 christos Exp $
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libblacklist.so.0.0.debug		comp-sys-debug	debug,dynamicroot
 ./usr/libdata/debug/lib/libc.so.12.200.debug			comp-sys-debug	debug,dynamicroot
@@ -83,9 +83,9 @@
 ./usr/libdata/debug/usr/lib/libdns.so.8.4.debug 		comp-bind-debug debug,compatfile
 ./usr/libdata/debug/usr/lib/libdns_sd.so.0.0.debug		comp-mdns-debug	debug,compatfile,mdns
 ./usr/libdata/debug/usr/lib/libdtrace.so.3.0.debug		comp-sys-debug	debug,compatfile,dtrace
-./usr/libdata/debug/usr/lib/libdwarf.so.1.0.debug		comp-sys-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libdwarf.so.2.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libedit.so.3.1.debug		comp-sys-debug	debug,compatfile
-./usr/libdata/debug/usr/lib/libelf.so.1.0.debug			comp-sys-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libelf.so.2.0.debug			comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libevent.so.4.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libevent_openssl.so.4.0.debug	comp-sys-debug	debug,compatfile,crypto
 ./usr/libdata/debug/usr/lib/libevent_pthreads.so.4.0.debug	comp-sys-debug	debug,compatfile



CVS commit: src/external/bsd/elftoolchain/lib

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 20 02:44:02 UTC 2016

Modified Files:
src/external/bsd/elftoolchain/lib/libdwarf: Makefile
src/external/bsd/elftoolchain/lib/libelf: Makefile

Log Message:
bump version


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/lib/libdwarf/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/lib/libelf/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/lib/libdwarf/Makefile
diff -u src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.3 src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.4
--- src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.3	Tue Jan  5 08:07:46 2016
+++ src/external/bsd/elftoolchain/lib/libdwarf/Makefile	Fri Feb 19 21:44:02 2016
@@ -86,7 +86,7 @@ CPPFLAGS+=	-I. -I${SRCDIR} -I${TOP}/comm
 
 LIBDPLIBS+=	elf ${.CURDIR}/../libelf
 
-SHLIB_MAJOR=	1
+SHLIB_MAJOR=	2
 SHLIB_MINOR=	0
 
 MAN=	dwarf.3 \

Index: src/external/bsd/elftoolchain/lib/libelf/Makefile
diff -u src/external/bsd/elftoolchain/lib/libelf/Makefile:1.2 src/external/bsd/elftoolchain/lib/libelf/Makefile:1.3
--- src/external/bsd/elftoolchain/lib/libelf/Makefile:1.2	Sun Mar  9 14:11:37 2014
+++ src/external/bsd/elftoolchain/lib/libelf/Makefile	Fri Feb 19 21:44:02 2016
@@ -70,7 +70,7 @@ GENSRCS=	libelf_fsize.c libelf_msize.c l
 CLEANFILES+=	${GENSRCS}
 CPPFLAGS+=	-I. -I${SRCDIR} -I${TOP}/common
 
-SHLIB_MAJOR=	1
+SHLIB_MAJOR=	2
 SHLIB_MINOR=	0
 
 MAN=	elf.3			\



CVS commit: src/doc

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 20 02:50:33 UTC 2016

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
mention latest elftoolchain


To generate a diff of this commit:
cvs rdiff -u -r1.1305 -r1.1306 src/doc/3RDPARTY
cvs rdiff -u -r1.2135 -r1.2136 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1305 src/doc/3RDPARTY:1.1306
--- src/doc/3RDPARTY:1.1305	Thu Feb 11 08:36:00 2016
+++ src/doc/3RDPARTY	Fri Feb 19 21:50:33 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1305 2016/02/11 13:36:00 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1306 2016/02/20 02:50:33 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1574,7 +1574,7 @@ Notes:
 		Need to feed back local changes
 
 Package:	elftoolchain (libelf/libdwarf)
-Version:	FreeBSD-2014-03-08
+Version:	FreeBSD-2016-02-19-r295822
 Current Vers:	FreeBSD--YY-ZZ
 Maintainer:	Joseph Koshi <jko...@freebsd.org>
 Archive Site:	none

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2135 src/doc/CHANGES:1.2136
--- src/doc/CHANGES:1.2135	Sat Jan 30 12:01:47 2016
+++ src/doc/CHANGES	Fri Feb 19 21:50:33 2016
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2135 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2136 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -248,3 +248,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	bind: Import version 9.10.3-P3. [christos 20160119]
 	dhcpcd: Import dhcpcd 6.10.1. [roy 20160120]
 	openssl: Import openssl 1.0.1r [christos 20160130]
+	elftoolchain: Import FreeBSD-2016-02-19. [christos 20160219]



CVS import: src/external/bsd/elftoolchain/dist

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 20 02:42:02 UTC 2016

Update of /cvsroot/src/external/bsd/elftoolchain/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv3538

Log Message:
Import latest elftoolchain components needed for CTF from FreeBSD

Status:

Vendor Tag: FreeBSD
Release Tags:   FreeBSD-2015-02-19-r295822

C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_relocation_info.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_loclist.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_new_die.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attr.3
C src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_reloc.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_die.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_expr_current_offset.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_form_class.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_str.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_vars.m4
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_loclist_entry.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_typename.3
C src/external/bsd/elftoolchain/dist/libdwarf/_libdwarf.h
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_seterrarg.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_formexprloc.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_varname.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_cie_of_fde.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_pro_init.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_fde_at_pc.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_pro_reloc.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_lineno.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_arange.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_new_fde.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_all_regs3.3
C src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_init.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_AT_signed_const.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_AT_name.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_die_abbrev_code.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_expand_frame_instructions.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_aranges.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_AT_producer.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_errmsg.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_fde_list.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_loclist.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attr.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_funcs.m4
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_cu_die_offset.3
C src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_error.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_AT_location_expr.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_highpc.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_AT_dataref.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_macro_details.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_hasattr.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_srcfiles.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_cie_info.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_find_macro_value_start.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_ranges.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_pro_nametbl.m4
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_frame_fde.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_expr_addr.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_tag.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_relocation_info_count.3
C src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_ranges.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_end_macro_file.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_new_expr.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_pubnames.m4
C src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_nametbl.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_formstring.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_macinfo.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_formaddr.3
C src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_frame.c
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_set_reloc_application.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_add_AT_string.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_pro_types.m4
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_diename.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_get_types.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_init.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf_dealloc.3
C src/external/bsd/elftoolchain/dist/libdwarf/dwarf.h
C 

CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 20 02:39:47 UTC 2016

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: dwarf.c

Log Message:
- don't barf if the object does not have DWARF debug data.
- bump size of types to 1K to avoid string overflow
(both are needed for the new elftoolchain).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c
diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.15 src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.16
--- src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.15	Sun Dec 27 16:38:46 2015
+++ src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c	Fri Feb 19 21:39:47 2016
@@ -1325,7 +1325,7 @@ die_funcptr_create(dwarf_t *dw, Dwarf_Di
 static intr_t *
 die_base_name_parse(const char *name, char **newp)
 {
-	char buf[100];
+	char buf[1024];
 	char const *base;
 	char *c;
 	int nlong = 0, nshort = 0, nchar = 0, nint = 0;
@@ -2019,8 +2019,15 @@ dw_read(tdata_t *td, Elf *elf, char *fil
 	}
 
 	if ((rc = dwarf_next_cu_header_b(dw.dw_dw, , , ,
-	, , NULL, , _err)) != DW_DLV_OK)
+	, , NULL, , _err)) != DW_DLV_OK) {
+		if (dwarf_errno(dw.dw_err) == DW_DLE_NO_ENTRY) {
+			/*
+			 * There's no DWARF section...
+			 */
+			return (0);
+		}
 		terminate("rc = %d %s\n", rc, dwarf_errmsg(dw.dw_err));
+	}
 
 	if ((cu = die_sibling(, NULL)) == NULL)
 		goto out;



CVS commit: src/usr.bin/make

2016-02-19 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Feb 20 01:43:28 UTC 2016

Modified Files:
src/usr.bin/make: make.1

Log Message:
Spelling fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/usr.bin/make/make.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.253 src/usr.bin/make/make.1:1.254
--- src/usr.bin/make/make.1:1.253	Sat Feb 20 01:19:03 2016
+++ src/usr.bin/make/make.1	Sat Feb 20 01:43:28 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.253 2016/02/20 01:19:03 sjg Exp $
+.\"	$NetBSD: make.1,v 1.254 2016/02/20 01:43:28 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -293,7 +293,7 @@ then
 will search for the specified file or directory named in the remaining part
 of the argument string.
 The search starts with the current directory of
-the Makefile and then works upward towards the root of the filesystem.
+the Makefile and then works upward towards the root of the file system.
 If the search is successful, then the resulting directory replaces the
 .Qq \&.../
 specification in the
@@ -868,7 +868,7 @@ This can be overridden by setting
 .Va bf
 to a value which represents True.
 .It Pa env
-For debugging, it can be useful to inlcude the environment
+For debugging, it can be useful to include the environment
 in the .meta file.
 .It Pa verbose
 If in "meta" mode, print a clue about the target being built.
@@ -918,7 +918,7 @@ The default value is:
 This variable is used to record the names of variables assigned to
 on the command line, so that they may be exported as part of
 .Ql Ev MAKEFLAGS .
-This behaviour can be disabled by assigning an empty value to
+This behavior can be disabled by assigning an empty value to
 .Ql Va .MAKEOVERRIDES
 within a makefile.
 Extra variables can be exported from a makefile
@@ -942,12 +942,12 @@ The process-id of
 The parent process-id of
 .Nm .
 .It Va .MAKE.SAVE_DOLLARS
-value should be a boolen that controls wether
+value should be a boolean that controls whether
 .Ql $$
 are preserved when doing
 .Ql :=
 assignments.
-The default is true, for compatability with other makes.
+The default is true, for compatibility with other makes.
 If set to false,
 .Ql $$
 becomes
@@ -1056,7 +1056,7 @@ sets
 to the value of
 .Ql Ev PWD
 instead.
-This behaviour is disabled if
+This behavior is disabled if
 .Ql Ev MAKEOBJDIRPREFIX
 is set or
 .Ql Ev MAKEOBJDIR
@@ -1126,7 +1126,7 @@ The wildcard characters may be escaped w
 As a consequence of the way values are split into words, matched,
 and then joined, a construct like
 .Dl ${VAR:M*}
-will normalise the inter-word spacing, removing all leading and
+will normalize the inter-word spacing, removing all leading and
 trailing space, and converting multiple consecutive spaces
 to single spaces.
 .
@@ -1146,7 +1146,7 @@ Randomize words in variable.
 The results will be different each time you are referring to the
 modified variable; use the assignment with expansion
 .Pq Ql Cm \&:=
-to prevent such behaviour.
+to prevent such behavior.
 For example,
 .Bd -literal -offset indent
 LIST=			uno due tre quattro
@@ -1178,7 +1178,7 @@ The value is a format string for
 using the current
 .Xr gmtime 3 .
 .It Cm \&:hash
-Compute a 32bit hash of the value and encode it as hex digits.
+Compute a 32-bit hash of the value and encode it as hex digits.
 .It Cm \&:localtime
 The value is a format string for
 .Xr strftime 3 ,
@@ -1456,7 +1456,7 @@ value is divided into words.
 .Pp
 Ordinarily, a value is treated as a sequence of words
 delimited by white space.
-Some modifiers suppress this behaviour,
+Some modifiers suppress this behavior,
 causing a value to be treated as a single word
 (possibly containing embedded white space).
 An empty value, or a value that consists entirely of white-space,
@@ -2092,7 +2092,7 @@ The sources are a set of
 pairs.
 .Bl -tag -width hasErrCtls
 .It Ar name
-This is the minimal specification, used to select one of the builtin
+This is the minimal specification, used to select one of the built-in
 shell specs;
 .Ar sh ,
 .Ar ksh ,



CVS commit: src/usr.bin/make

2016-02-19 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sat Feb 20 01:19:03 UTC 2016

Modified Files:
src/usr.bin/make: make.1 var.c

Log Message:
Add a knob .MAKE.SAVE_DOLLARS to control the behavior of $$ during :=

If TRUE '$$' are not consumed (saved).
If FALSE '$$' becomes '$' just like normal expansion rules.

default is TRUE.

Reviewed by: christos


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.253 src/usr.bin/make/make.1
cvs rdiff -u -r1.204 -r1.205 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.252 src/usr.bin/make/make.1:1.253
--- src/usr.bin/make/make.1:1.252	Thu Feb 18 20:25:08 2016
+++ src/usr.bin/make/make.1	Sat Feb 20 01:19:03 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.252 2016/02/18 20:25:08 sjg Exp $
+.\"	$NetBSD: make.1,v 1.253 2016/02/20 01:19:03 sjg Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd February 18, 2016
+.Dd February 19, 2016
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -941,6 +941,18 @@ The process-id of
 .It Va .MAKE.PPID
 The parent process-id of
 .Nm .
+.It Va .MAKE.SAVE_DOLLARS
+value should be a boolen that controls wether
+.Ql $$
+are preserved when doing
+.Ql :=
+assignments.
+The default is true, for compatability with other makes.
+If set to false,
+.Ql $$
+becomes
+.Ql $
+per normal evaluation rules.
 .It Va MAKE_PRINT_VAR_ON_ERROR
 When
 .Nm

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.204 src/usr.bin/make/var.c:1.205
--- src/usr.bin/make/var.c:1.204	Thu Feb 18 23:33:25 2016
+++ src/usr.bin/make/var.c	Sat Feb 20 01:19:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.204 2016/02/18 23:33:25 sjg Exp $	*/
+/*	$NetBSD: var.c,v 1.205 2016/02/20 01:19:03 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.204 2016/02/18 23:33:25 sjg Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.205 2016/02/20 01:19:03 sjg Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.204 2016/02/18 23:33:25 sjg Exp $");
+__RCSID("$NetBSD: var.c,v 1.205 2016/02/20 01:19:03 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -162,6 +162,16 @@ char 	var_Error[] = "";
 static char	varNoError[] = "";
 
 /*
+ * Traditionally we consume $$ during := like any other expansion.
+ * Other make's do not.
+ * This knob allows controlling the behavior.
+ * FALSE for old behavior.
+ * TRUE for new compatible.
+ */
+#define SAVE_DOLLARS ".MAKE.SAVE_DOLLARS"
+static Boolean save_dollars = TRUE;
+
+/*
  * Internally, variables are contained in four different contexts.
  *	1) the environment. They may not be changed. If an environment
  *	variable is appended-to, the result is placed in the global
@@ -992,7 +1002,11 @@ Var_Set(const char *name, const char *va
 
 	Var_Append(MAKEOVERRIDES, name, VAR_GLOBAL);
 }
-	
+if (*name == '.') {
+	if (strcmp(name, SAVE_DOLLARS) == 0)
+	save_dollars = s2Boolean(val, save_dollars);
+}
+
  out:
 free(expanded_name);
 if (v != NULL)
@@ -3989,7 +4003,7 @@ Var_Subst(const char *var, const char *s
 	 * In such a case, we skip over the escape character and store the
 	 * dollar sign into the buffer directly.
 	 */
-	if (flags & VARF_ASSIGN)
+	if (save_dollars && (flags & VARF_ASSIGN))
 		Buf_AddByte(, *str);
 	str++;
 	Buf_AddByte(, *str);



CVS commit: src/libexec/ld.elf_so/arch/mips

2016-02-19 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Feb 19 22:09:09 UTC 2016

Modified Files:
src/libexec/ld.elf_so/arch/mips: mips_reloc.c

Log Message:
make debug code compile again
from christos


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/libexec/ld.elf_so/arch/mips/mips_reloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/arch/mips/mips_reloc.c
diff -u src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.63 src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.64
--- src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.63	Mon Aug 25 20:40:52 2014
+++ src/libexec/ld.elf_so/arch/mips/mips_reloc.c	Fri Feb 19 22:09:09 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_reloc.c,v 1.63 2014/08/25 20:40:52 joerg Exp $	*/
+/*	$NetBSD: mips_reloc.c,v 1.64 2016/02/19 22:09:09 macallan Exp $	*/
 
 /*
  * Copyright 1997 Michael L. Hitch 
@@ -30,7 +30,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: mips_reloc.c,v 1.63 2014/08/25 20:40:52 joerg Exp $");
+__RCSID("$NetBSD: mips_reloc.c,v 1.64 2016/02/19 22:09:09 macallan Exp $");
 #endif /* not lint */
 
 #include 
@@ -445,7 +445,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry 
 
 			rdbg(("TPREL %s in %s --> %p in %s",
 			obj->strtab + obj->symtab[r_symndx].st_name,
-			obj->path, (void *)*where, defobj->path));
+			obj->path, (void *)where, defobj->path));
 			break;
 		}
 



CVS commit: src/sys/dev/usb

2016-02-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 19 21:41:59 UTC 2016

Modified Files:
src/sys/dev/usb: usb_mem.c

Log Message:
Why KASSERT when you can KASSERTMSG


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/usb/usb_mem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/usb_mem.c
diff -u src/sys/dev/usb/usb_mem.c:1.65 src/sys/dev/usb/usb_mem.c:1.66
--- src/sys/dev/usb/usb_mem.c:1.65	Fri Sep 12 16:40:38 2014
+++ src/sys/dev/usb/usb_mem.c	Fri Feb 19 21:41:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_mem.c,v 1.65 2014/09/12 16:40:38 skrll Exp $	*/
+/*	$NetBSD: usb_mem.c,v 1.66 2016/02/19 21:41:59 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.65 2014/09/12 16:40:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.66 2016/02/19 21:41:59 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -400,7 +400,8 @@ usb_dmaaddr(usb_dma_t *dma, unsigned int
 
 	offset += dma->offs;
 
-	KASSERT(offset < dma->block->size);
+	KASSERTMSG(offset < dma->block->size, "offset %d vs %zu", offset,
+	dma->block->size);
 
 	if (dma->block->nsegs == 1) {
 		KASSERT(dma->block->map->dm_segs[0].ds_len > offset);



CVS commit: src/sys/external/bsd/dwc2

2016-02-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 19 21:10:18 UTC 2016

Modified Files:
src/sys/external/bsd/dwc2: dwc2.h

Log Message:
In msleep use udelay if cold or sleep is small enough.  This is mostly
copied from the drm2 version.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/dwc2/dwc2.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/dwc2/dwc2.h
diff -u src/sys/external/bsd/dwc2/dwc2.h:1.7 src/sys/external/bsd/dwc2/dwc2.h:1.8
--- src/sys/external/bsd/dwc2/dwc2.h:1.7	Sun Aug 30 13:02:42 2015
+++ src/sys/external/bsd/dwc2/dwc2.h	Fri Feb 19 21:10:18 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2.h,v 1.7 2015/08/30 13:02:42 skrll Exp $	*/
+/*	$NetBSD: dwc2.h,v 1.8 2016/02/19 21:10:18 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -260,10 +260,13 @@ ndelay(unsigned long nsecs)
 }
 
 static inline void
-msleep(unsigned int msecs)
+msleep(unsigned int msec)
 {
-
-	kpause("mdelay", false, mstohz(msecs), NULL);
+	if (cold ||
+	((hz < 1000) && (msec < (1000/hz
+		udelay(msec * 1000);
+	else
+		(void)kpause("mdelay", false, mstohz(msec), NULL);
 }
 
 #define	EREMOTEIO	EIO



CVS commit: src/sys/external/bsd/drm2/include/linux

2016-02-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 19 21:08:19 UTC 2016

Modified Files:
src/sys/external/bsd/drm2/include/linux: delay.h

Log Message:
In msleep use mdelay if cold


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/include/linux/delay.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/include/linux/delay.h
diff -u src/sys/external/bsd/drm2/include/linux/delay.h:1.3 src/sys/external/bsd/drm2/include/linux/delay.h:1.4
--- src/sys/external/bsd/drm2/include/linux/delay.h:1.3	Wed Jul 16 20:56:25 2014
+++ src/sys/external/bsd/drm2/include/linux/delay.h	Fri Feb 19 21:08:19 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: delay.h,v 1.3 2014/07/16 20:56:25 riastradh Exp $	*/
+/*	$NetBSD: delay.h,v 1.4 2016/02/19 21:08:19 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -66,7 +66,8 @@ mdelay(unsigned int msec)
 static inline void
 msleep(unsigned int msec)
 {
-	if ((hz < 1000) && (msec < (1000/hz)))
+	if (cold ||
+	((hz < 1000) && (msec < (1000/hz
 		mdelay(msec);
 	else
 		(void)kpause("lnxmslep", false, mstohz(msec), NULL);



CVS commit: src/sys/sys

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 20:45:21 UTC 2016

Modified Files:
src/sys/sys: exec_elf.h

Log Message:
Intel MCU.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/sys/exec_elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.152 src/sys/sys/exec_elf.h:1.153
--- src/sys/sys/exec_elf.h:1.152	Sat Feb  6 10:36:36 2016
+++ src/sys/sys/exec_elf.h	Fri Feb 19 15:45:21 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.152 2016/02/06 15:36:36 riastradh Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.153 2016/02/19 20:45:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -209,7 +209,8 @@ typedef struct {
 #define EM_386		3	/* Intel 80386 */
 #define EM_68K		4	/* Motorola 68000 */
 #define EM_88K		5	/* Motorola 88000 */
-#define EM_486		6	/* Intel 80486 */
+#define EM_486		6	/* Intel 80486 [old] */
+#define EM_IAMCU	6	/* Intel MCU. */
 #define EM_860		7	/* Intel 80860 */
 #define EM_MIPS		8	/* MIPS I Architecture */
 #define EM_S370		9	/* Amdahl UTS on System/370 */



CVS commit: src/sys/net

2016-02-19 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb 19 20:05:43 UTC 2016

Modified Files:
src/sys/net: if.c if.h

Log Message:
Implement a queue for if_link_state_change() calls to fix a race condition
introduced in the prior patch.

The queue has capacity to store 8 link state changes, if it overflows then
the oldest state change is lost, but the oldest DOWN state change is
preserved to ensure any subsequent UP state changes reflect properly.

Because there are only 3 states to queue, the queue itself is implemented
by storing 2-bit numbers in a bigger one.
To increase the size of the queue, just increase the size of the backing
store to a bigger number.


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.325 src/sys/net/if.c
cvs rdiff -u -r1.197 -r1.198 src/sys/net/if.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.324 src/sys/net/if.c:1.325
--- src/sys/net/if.c:1.324	Mon Feb 15 08:08:04 2016
+++ src/sys/net/if.c	Fri Feb 19 20:05:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.324 2016/02/15 08:08:04 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.325 2016/02/19 20:05:43 roy Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.324 2016/02/15 08:08:04 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.325 2016/02/19 20:05:43 roy Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -603,7 +603,7 @@ if_initialize(ifnet_t *ifp)
 	ifp->if_broadcastaddr = 0; /* reliably crash if used uninitialized */
 
 	ifp->if_link_state = LINK_STATE_UNKNOWN;
-	ifp->if_old_link_state = LINK_STATE_UNKNOWN;
+	ifp->if_link_queue = -1; /* all bits set, see link_state_change() */
 
 	ifp->if_capenable = 0;
 	ifp->if_csum_flags_tx = 0;
@@ -1563,48 +1563,128 @@ link_rtrequest(int cmd, struct rtentry *
 }
 
 /*
- * Handle a change in the interface link state.
- * XXX: We should listen to the routing socket in-kernel rather
- * than calling in6_if_link_* functions directly from here.
+ * bitmask macros to manage a densely packed link_state change queue.
+ * Because we need to store LINK_STATE_UNKNOWN(0), LINK_STATE_DOWN(1) and
+ * LINK_STATE_UP(2) we need 2 bits for each state change.
+ * As a state change to store is 0, treat all bits set as an unset item.
+ */
+#define LQ_ITEM_BITS		2
+#define LQ_ITEM_MASK		((1 << LQ_ITEM_BITS) - 1)
+#define LQ_MASK(i)		(LQ_ITEM_MASK << (i) * LQ_ITEM_BITS)
+#define LINK_STATE_UNSET	LQ_ITEM_MASK
+#define LQ_ITEM(q, i)		(((q) & LQ_MASK((i))) >> (i) * LQ_ITEM_BITS)
+#define LQ_STORE(q, i, v)		  \
+	do {  \
+		(q) &= ~LQ_MASK((i));	  \
+		(q) |= (v) << (i) * LQ_ITEM_BITS;			  \
+	} while (0 /* CONSTCOND */)
+#define LQ_MAX(q)		((sizeof((q)) * NBBY) / LQ_ITEM_BITS)
+#define LQ_POP(q, v)			  \
+	do {  \
+		(v) = LQ_ITEM((q), 0);	  \
+		(q) >>= LQ_ITEM_BITS;	  \
+		(q) |= LINK_STATE_UNSET << (LQ_MAX((q)) - 1) * LQ_ITEM_BITS;  \
+	} while (0 /* CONSTCOND */)
+#define LQ_PUSH(q, v)			  \
+	do {  \
+		(q) >>= LQ_ITEM_BITS;	  \
+		(q) |= (v) << (LQ_MAX((q)) - 1) * LQ_ITEM_BITS;		  \
+	} while (0 /* CONSTCOND */)
+#define LQ_FIND_UNSET(q, i)		  \
+	for ((i) = 0; i < LQ_MAX((q)); (i)++) {  \
+		if (LQ_ITEM((q), (i)) == LINK_STATE_UNSET)		  \
+			break;		  \
+	}
+/*
+ * Handle a change in the interface link state and
+ * queue notifications.
  */
 void
 if_link_state_change(struct ifnet *ifp, int link_state)
 {
-	int s;
+	int s, idx;
 
-	s = splnet();
-	if (ifp->if_link_state == link_state) {
-		splx(s);
+	/* Ensure change is to a valid state */
+	switch (link_state) {
+	case LINK_STATE_UNKNOWN:	/* FALLTHROUGH */
+	case LINK_STATE_DOWN:		/* FALLTHROUGH */
+	case LINK_STATE_UP:
+		break;
+	default:
+#ifdef DEBUG
+		printf("%s: invalid link state %d\n",
+		ifp->if_xname, link_state);
+#endif
 		return;
 	}
 
-	ifp->if_link_state = link_state;
+	s = splnet();
+
+	/* Find the last unset event in the queue. */
+	LQ_FIND_UNSET(ifp->if_link_queue, idx);
+
+	/*
+	 * Ensure link_state doesn't match the last event in the queue.
+	 * ifp->if_link_state is not checked and set here because
+	 * that would present an inconsistent picture to the system.
+	 */
+	if (idx != 0 &&
+	LQ_ITEM(ifp->if_link_queue, idx - 1) == (uint8_t)link_state)
+		goto out;
+
+	/* Handle queue overflow. */
+	if (idx == LQ_MAX(ifp->if_link_queue)) {
+		uint8_t lost;
+
+		/*
+		 * The DOWN state must be protected from being pushed off
+		 * the queue to ensure that userland will always be
+		 * in a sane state.
+		 * Because DOWN is protected, there is no need to protect
+		 * UNKNOWN.
+		 * It should be invalid to change from any other state to
+		 * UNKNOWN anyway ...
+		 */
+		lost = LQ_ITEM(ifp->if_link_queue, 0);
+		LQ_PUSH(ifp->if_link_queue, 

CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2016-02-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 19 19:25:59 UTC 2016

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: dbuf.c

Log Message:
Don't use #pragma weak to implicitly change argument types.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c:1.4 src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c:1.5
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c:1.4	Sat Feb 27 23:43:53 2010
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c	Fri Feb 19 19:25:59 2016
@@ -1267,7 +1267,13 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_
 	return (0);
 }
 
-#pragma weak dmu_buf_will_dirty = dbuf_will_dirty
+__attribute__((__weak__)) void
+dmu_buf_will_dirty(dmu_buf_t *db_fake, dmu_tx_t *tx)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	dbuf_will_dirty(db, tx);
+}
+
 void
 dbuf_will_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx)
 {
@@ -1309,7 +1315,13 @@ dmu_buf_will_fill(dmu_buf_t *db_fake, dm
 	(void) dbuf_dirty(db, tx);
 }
 
-#pragma weak dmu_buf_fill_done = dbuf_fill_done
+__attribute__((__weak__)) void
+dmu_buf_fill_done(dmu_buf_t *db_fake, dmu_tx_t *tx)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	dbuf_fill_done(db, tx);
+}
+
 /* ARGSUSED */
 void
 dbuf_fill_done(dmu_buf_impl_t *db, dmu_tx_t *tx)
@@ -1815,7 +1827,13 @@ dbuf_create_bonus(dnode_t *dn)
 	dn->dn_bonus = dbuf_create(dn, 0, DB_BONUS_BLKID, dn->dn_dbuf, NULL);
 }
 
-#pragma weak dmu_buf_add_ref = dbuf_add_ref
+__attribute__((__weak__)) void
+dmu_buf_add_ref(dmu_buf_t *db_fake, void *tag)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	dbuf_add_ref(db, tag);
+}
+
 void
 dbuf_add_ref(dmu_buf_impl_t *db, void *tag)
 {
@@ -1823,7 +1841,13 @@ dbuf_add_ref(dmu_buf_impl_t *db, void *t
 	ASSERT(holds > 1);
 }
 
-#pragma weak dmu_buf_rele = dbuf_rele
+__attribute__((__weak__)) void
+dmu_buf_rele(dmu_buf_t *db_fake, void *tag)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	dbuf_rele(db, tag);
+}
+
 void
 dbuf_rele(dmu_buf_impl_t *db, void *tag)
 {
@@ -1889,7 +1913,13 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db,
 	}
 }
 
-#pragma weak dmu_buf_refcount = dbuf_refcount
+__attribute__((__weak__)) uint64_t
+dmu_buf_refcount(dmu_buf_t *db_fake)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	return dbuf_refcount(db);
+}
+
 uint64_t
 dbuf_refcount(dmu_buf_impl_t *db)
 {



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2016-02-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 19 19:25:22 UTC 2016

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: dsl_dataset.c
src/external/cddl/osnet/dist/uts/common/fs/zfs/sys: dsl_dataset.h

Log Message:
dmu_objset_rename is an alias for dsl_dataset_rename, but differs in
constness of the first argument. Newer clang checks for this and
prohibits it, so just be consistent by constifying the latter.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/dsl_dataset.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/dsl_dataset.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/dsl_dataset.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/dsl_dataset.c:1.1.1.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/dsl_dataset.c:1.2
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/dsl_dataset.c:1.1.1.2	Sat Feb 27 22:30:55 2010
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/dsl_dataset.c	Fri Feb 19 19:25:22 2016
@@ -2304,7 +2304,7 @@ dsl_valid_rename(const char *oldname, vo
 
 #pragma weak dmu_objset_rename = dsl_dataset_rename
 int
-dsl_dataset_rename(char *oldname, const char *newname, boolean_t recursive)
+dsl_dataset_rename(const char *oldname, const char *newname, boolean_t recursive)
 {
 	dsl_dir_t *dd;
 	dsl_dataset_t *ds;

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/dsl_dataset.h
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/dsl_dataset.h:1.1.1.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/dsl_dataset.h:1.2
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/dsl_dataset.h:1.1.1.2	Sat Feb 27 22:31:40 2010
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/dsl_dataset.h	Fri Feb 19 19:25:22 2016
@@ -192,7 +192,7 @@ dsl_checkfunc_t dsl_dataset_destroy_chec
 dsl_syncfunc_t dsl_dataset_destroy_sync;
 dsl_checkfunc_t dsl_dataset_snapshot_check;
 dsl_syncfunc_t dsl_dataset_snapshot_sync;
-int dsl_dataset_rename(char *name, const char *newname, boolean_t recursive);
+int dsl_dataset_rename(const char *name, const char *newname, boolean_t recursive);
 int dsl_dataset_promote(const char *name, char *conflsnap);
 int dsl_dataset_clone_swap(dsl_dataset_t *clone, dsl_dataset_t *origin_head,
 boolean_t force);



CVS commit: src/share/mk

2016-02-19 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Feb 19 18:47:24 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
switch powerpc ports to new binutils


To generate a diff of this commit:
cvs rdiff -u -r1.900 -r1.901 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.900 src/share/mk/bsd.own.mk:1.901
--- src/share/mk/bsd.own.mk:1.900	Tue Feb  9 20:44:26 2016
+++ src/share/mk/bsd.own.mk	Fri Feb 19 18:47:24 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.900 2016/02/09 20:44:26 plunky Exp $
+#	$NetBSD: bsd.own.mk,v 1.901 2016/02/19 18:47:24 macallan Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -141,7 +141,8 @@ EXTERNAL_GDB_SUBDIR=		gdb
 .if ${MACHINE} == "amd64" || \
 ${MACHINE} == "evbarm" || \
 ${MACHINE} == "i386" || \
-${MACHINE} == "hppa"
+${MACHINE} == "hppa" || \
+${MACHINE_ARCH} == "powerpc"
 HAVE_BINUTILS?=	226
 .else
 HAVE_BINUTILS?=	223



CVS commit: src/sys/rump/librump/rumpkern

2016-02-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 19 18:38:37 UTC 2016

Modified Files:
src/sys/rump/librump/rumpkern: scheduler.c

Log Message:
add cpu_lock

from freqlabs on irc


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/rump/librump/rumpkern/scheduler.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.43 src/sys/rump/librump/rumpkern/scheduler.c:1.44
--- src/sys/rump/librump/rumpkern/scheduler.c:1.43	Mon Feb  8 18:18:19 2016
+++ src/sys/rump/librump/rumpkern/scheduler.c	Fri Feb 19 18:38:37 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: scheduler.c,v 1.43 2016/02/08 18:18:19 pooka Exp $	*/
+/*  $NetBSD: scheduler.c,v 1.44 2016/02/19 18:38:37 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.43 2016/02/08 18:18:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.44 2016/02/19 18:38:37 pooka Exp $");
 
 #include 
 #include 
@@ -80,6 +80,8 @@ kcpuset_t *kcpuset_attached = NULL;
 kcpuset_t *kcpuset_running = NULL;
 int ncpu, ncpuonline;
 
+kmutex_t cpu_lock;
+
 #define RCPULWP_BUSY	((void *)-1)
 #define RCPULWP_WANTED	((void *)-2)
 
@@ -141,6 +143,8 @@ rump_cpus_bootstrap(int *nump)
 		num = MAXCPUS;
 	}
 
+	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);
+
 	kcpuset_create(_attached, true);
 	kcpuset_create(_running, true);
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 17:05:40 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: mipsnbsd-nat.c

Log Message:
avoid re-def


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.10 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.11
--- src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.10	Wed Feb  3 14:03:50 2016
+++ src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c	Fri Feb 19 12:05:40 2016
@@ -16,8 +16,9 @@
 
You should have received a copy of the GNU General Public License
along with this program.  If not, see .  */
-
+#ifndef _KERNTYPES
 #define _KERNTYPES
+#endif
 #include "defs.h"
 #include "inferior.h"
 #include "regcache.h"



CVS commit: [nick-nhusb] src/sys/dev/usb

2016-02-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 19 16:23:15 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: ehci.c

Log Message:
Add a comment


To generate a diff of this commit:
cvs rdiff -u -r1.234.2.86 -r1.234.2.87 src/sys/dev/usb/ehci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.86 src/sys/dev/usb/ehci.c:1.234.2.87
--- src/sys/dev/usb/ehci.c:1.234.2.86	Sun Feb  7 13:58:19 2016
+++ src/sys/dev/usb/ehci.c	Fri Feb 19 16:23:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.86 2016/02/07 13:58:19 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.87 2016/02/19 16:23:15 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.86 2016/02/07 13:58:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.87 2016/02/19 16:23:15 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -832,6 +832,11 @@ ehci_softintr(void *v)
 
 	}
 
+	/*
+	 * We abuse ex_next for the interrupt and complete lists and
+	 * interrupt transfers will get re-added here so use
+	 * the _SAFE version of TAILQ_FOREACH.
+	 */
 	TAILQ_FOREACH_SAFE(ex, , ex_next, nextex) {
 		/*
 		 * XXX transfer_complete memcpys out transfer data (for in



CVS commit: src/bin/sh

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 13:50:37 UTC 2016

Modified Files:
src/bin/sh: parser.c

Log Message:
PR/50827: Richard Hansen: Fix default variable assignment with arithmetic,
from kre.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/bin/sh/parser.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.93 src/bin/sh/parser.c:1.94
--- src/bin/sh/parser.c:1.93	Fri Aug 29 05:35:19 2014
+++ src/bin/sh/parser.c	Fri Feb 19 08:50:37 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.93 2014/08/29 09:35:19 christos Exp $	*/
+/*	$NetBSD: parser.c,v 1.94 2016/02/19 13:50:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.93 2014/08/29 09:35:19 christos Exp $");
+__RCSID("$NetBSD: parser.c,v 1.94 2016/02/19 13:50:37 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -931,6 +931,15 @@ breakloop:
 else \
 	dblquotep[(varnest / 32) - 1] &= ~(1 << (varnest % 32))
 
+#define INCREASENEST() \
+	do { \
+		if (varnest++ >= maxnest) { \
+			dblquotep = ckrealloc(dblquotep, maxnest / 8); \
+			dblquotep[(maxnest / 32) - 1] = 0; \
+			maxnest += 32; \
+		} \
+	} while (/*CONSTCOND*/0)
+
 STATIC int
 readtoken1(int firstc, char const *syn, char *eofmark, int striptabs)
 {
@@ -1106,13 +1115,11 @@ readtoken1(int firstc, char const *syn, 
 	--parenlevel;
 } else {
 	if (pgetc() == ')') {
+		if (varnest > 0)  /* always */
+			varnest--;
 		if (--arinest == 0) {
 			USTPUTC(CTLENDARI, out);
 			syntax = prevsyntax;
-			if (syntax == DQSYNTAX)
-SETDBLQUOTE();
-			else
-CLRDBLQUOTE();
 		} else
 			USTPUTC(')', out);
 	} else {
@@ -1377,14 +1384,8 @@ badsub:			synerror("Bad substitution");
 		if (ISDBLQUOTE() || arinest)
 			flags |= VSQUOTE;
 		*(stackblock() + typeloc) = subtype | flags;
-		if (subtype != VSNORMAL) {
-			varnest++;
-			if (varnest >= maxnest) {
-dblquotep = ckrealloc(dblquotep, maxnest / 8);
-dblquotep[(maxnest / 32) - 1] = 0;
-maxnest += 32;
-			}
-		}
+		if (subtype != VSNORMAL)
+			INCREASENEST();
 	}
 	goto parsesub_return;
 }
@@ -1562,6 +1563,7 @@ parsearith: {
 		 */
 		USTPUTC('(', out);
 	}
+	INCREASENEST();
 	goto parsearith_return;
 }
 



CVS commit: src/tests/bin/sh

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 13:49:01 UTC 2016

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
undo accidental commit


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/bin/sh/t_expand.sh
diff -u src/tests/bin/sh/t_expand.sh:1.3 src/tests/bin/sh/t_expand.sh:1.4
--- src/tests/bin/sh/t_expand.sh:1.3	Fri Feb 19 08:48:28 2016
+++ src/tests/bin/sh/t_expand.sh	Fri Feb 19 08:49:01 2016
@@ -1,4 +1,4 @@
-# $NetBSD: t_expand.sh,v 1.3 2016/02/19 13:48:28 christos Exp $
+# $NetBSD: t_expand.sh,v 1.4 2016/02/19 13:49:01 christos Exp $
 #
 # Copyright (c) 2007, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -91,7 +91,7 @@ strip_head() {
 strip_body() {
 	line='#define bindir "/usr/bin" /* comment */'
 	stripped='#define bindir "/usr/bin" '
-#	atf_expect_fail "PR bin/43469"
+	atf_expect_fail "PR bin/43469"
 	atf_check_equal '$stripped' '${line%%/\**}'
 }
 



CVS commit: src/tests/bin/sh

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 13:48:28 UTC 2016

Modified Files:
src/tests/bin/sh: t_expand.sh t_varquote.sh

Log Message:
Add a test for PR/50827


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_expand.sh \
src/tests/bin/sh/t_varquote.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/bin/sh/t_expand.sh
diff -u src/tests/bin/sh/t_expand.sh:1.2 src/tests/bin/sh/t_expand.sh:1.3
--- src/tests/bin/sh/t_expand.sh:1.2	Sun Oct  6 17:05:50 2013
+++ src/tests/bin/sh/t_expand.sh	Fri Feb 19 08:48:28 2016
@@ -1,4 +1,4 @@
-# $NetBSD: t_expand.sh,v 1.2 2013/10/06 21:05:50 ast Exp $
+# $NetBSD: t_expand.sh,v 1.3 2016/02/19 13:48:28 christos Exp $
 #
 # Copyright (c) 2007, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -91,7 +91,7 @@ strip_head() {
 strip_body() {
 	line='#define bindir "/usr/bin" /* comment */'
 	stripped='#define bindir "/usr/bin" '
-	atf_expect_fail "PR bin/43469"
+#	atf_expect_fail "PR bin/43469"
 	atf_check_equal '$stripped' '${line%%/\**}'
 }
 
Index: src/tests/bin/sh/t_varquote.sh
diff -u src/tests/bin/sh/t_varquote.sh:1.2 src/tests/bin/sh/t_varquote.sh:1.3
--- src/tests/bin/sh/t_varquote.sh:1.2	Sun Mar 25 14:50:19 2012
+++ src/tests/bin/sh/t_varquote.sh	Fri Feb 19 08:48:28 2016
@@ -1,4 +1,4 @@
-# $NetBSD: t_varquote.sh,v 1.2 2012/03/25 18:50:19 christos Exp $
+# $NetBSD: t_varquote.sh,v 1.3 2016/02/19 13:48:28 christos Exp $
 #
 # Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -75,7 +75,18 @@ nested_quotes_multiword_body() {
 	/bin/sh -c 'echo "${foo:="first-word"} second-word"'
 }
 
+atf_test_case default_assignment_with_arith
+default_assignment_with_arith_head() {
+	atf_set "descr" "Tests default variable assignment with arithmetic" \
+	"string works (PR bin/50827)"
+}
+default_assignment_with_arith_body() {
+	atf_check -s eq:0 -o empty -e empty /bin/sh -c ': "${x=$((1))}"'
+
+}
+
 atf_init_test_cases() {
 	atf_add_test_case all
 	atf_add_test_case nested_quotes_multiword
+	atf_add_test_case default_assignment_with_arith
 }



CVS commit: [nick-nhusb] src/sys/dev/usb

2016-02-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 19 08:22:40 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: ohci.c

Log Message:
Fix typo in previous *sigh*


To generate a diff of this commit:
cvs rdiff -u -r1.254.2.45 -r1.254.2.46 src/sys/dev/usb/ohci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.45 src/sys/dev/usb/ohci.c:1.254.2.46
--- src/sys/dev/usb/ohci.c:1.254.2.45	Thu Feb 18 17:38:37 2016
+++ src/sys/dev/usb/ohci.c	Fri Feb 19 08:22:40 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.45 2016/02/18 17:38:37 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.46 2016/02/19 08:22:40 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.45 2016/02/18 17:38:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.46 2016/02/19 08:22:40 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1555,7 +1555,7 @@ ohci_softintr(void *v)
 			/* clear halt and TD chain */
 			sed->ed.ed_headp = HTOO32(p->physaddr);
 			usb_syncmem(>dma,
-			sed->offs + offsetof(ohci_ed_t, ed_ed_headp),
+			sed->offs + offsetof(ohci_ed_t, ed_headp),
 			sizeof(sed->ed.ed_headp),
 			BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);