CVS commit: src/sys/arch/arm/include/arm32

2020-10-08 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Oct  8 12:49:06 UTC 2020

Modified Files:
src/sys/arch/arm/include/arm32: vmparam.h

Log Message:
Bump MAXDSIZ from 1536 to 1836.
1836 is 2048-128(MAXTSIZ)-64(MAXSSIZ).
Gives us a fighting chance to build rust natively.
OK'ed by skrll@


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/arm/include/arm32/vmparam.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/arch/arm/include/arm32/vmparam.h
diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.55 src/sys/arch/arm/include/arm32/vmparam.h:1.56
--- src/sys/arch/arm/include/arm32/vmparam.h:1.55	Sat Aug 29 06:49:53 2020
+++ src/sys/arch/arm/include/arm32/vmparam.h	Thu Oct  8 12:49:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.55 2020/08/29 06:49:53 skrll Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.56 2020/10/08 12:49:06 he Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -70,7 +70,7 @@
 #define	DFLDSIZ		(384*1024*1024)		/* initial data size limit */
 #endif
 #ifndef	MAXDSIZ
-#define	MAXDSIZ		(1536*1024*1024)	/* max data size */
+#define	MAXDSIZ		(1856*1024*1024)	/* max data size */
 #endif
 #ifndef	DFLSSIZ
 #define	DFLSSIZ		(4*1024*1024)		/* initial stack size limit */



CVS commit: src/external/bsd/unbound/dist/util

2019-12-03 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Dec  3 11:25:20 UTC 2019

Modified Files:
src/external/bsd/unbound/dist/util: netevent.c

Log Message:
Apply a fix from upstream:
  https://github.com/NLnetLabs/unbound/pull/122
This should enable proper functioning of tcp-idle-timeout.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/unbound/dist/util/netevent.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/bsd/unbound/dist/util/netevent.c
diff -u src/external/bsd/unbound/dist/util/netevent.c:1.1.1.4 src/external/bsd/unbound/dist/util/netevent.c:1.2
--- src/external/bsd/unbound/dist/util/netevent.c:1.1.1.4	Sat May 25 21:18:03 2019
+++ src/external/bsd/unbound/dist/util/netevent.c	Tue Dec  3 11:25:19 2019
@@ -993,7 +993,7 @@ tcp_callback_writer(struct comm_point* c
 		tcp_req_info_handle_writedone(c->tcp_req_info);
 	} else {
 		comm_point_stop_listening(c);
-		comm_point_start_listening(c, -1, -1);
+		comm_point_start_listening(c, -1, c->tcp_timeout_msec);
 	}
 }
 



CVS commit: src/external/bsd/bind/dist/lib/isc/unix

2018-10-18 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Oct 18 14:30:54 UTC 2018

Modified Files:
src/external/bsd/bind/dist/lib/isc/unix: socket.c

Log Message:
Apply suggested fix from https://gitlab.isc.org/isc-projects/bind9/issues/589.
This would on NetBSD prevent UDP replies > 1432 bytes in size
transported over IPv4, because an IPv6 control message is applied
on an IPv4 socket, which will subsequently be refused.  Therefore,
apply that control mssage only on IPv6 sockets.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/bind/dist/lib/isc/unix/socket.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/bsd/bind/dist/lib/isc/unix/socket.c
diff -u src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.23 src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.24
--- src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.23	Mon Aug 13 08:46:53 2018
+++ src/external/bsd/bind/dist/lib/isc/unix/socket.c	Thu Oct 18 14:30:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: socket.c,v 1.23 2018/08/13 08:46:53 christos Exp $	*/
+/*	$NetBSD: socket.c,v 1.24 2018/10/18 14:30:54 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2018  Internet Systems Consortium, Inc. ("ISC")
@@ -1548,7 +1548,8 @@ build_msghdr_send(isc__socket_t *sock, i
 
 #if defined(IPV6_USE_MIN_MTU)
 	if ((sock->type == isc_sockettype_udp) &&
-	((dev->attributes & ISC_SOCKEVENTATTR_USEMINMTU) != 0))
+	((dev->attributes & ISC_SOCKEVENTATTR_USEMINMTU) != 0) &&
+	(sock->pf == AF_INET6))
 	{
 		int use_min_mtu = 1;	/* -1, 0, 1 */
 



CVS commit: src/external/gpl3/gcc/usr.bin/backend

2017-09-12 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Sep 12 09:25:24 UTC 2017

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile

Log Message:
Replicate fix from the old gcc.old: alpha.d needs pass-instances.def.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/external/gpl3/gcc/usr.bin/backend/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/gpl3/gcc/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.37 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.38
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.37	Mon Jun 26 17:38:10 2017
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Tue Sep 12 09:25:24 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37 2017/06/26 17:38:10 joerg Exp $
+#	$NetBSD: Makefile,v 1.38 2017/09/12 09:25:24 he Exp $
 
 LIBISPRIVATE=	yes
 
@@ -445,6 +445,7 @@ final.o: target-hooks-def.h c-family/c-t
 
 .if ${GCC_MACHINE_ARCH} == "alpha"
 alpha.d alpha.o: tm-constrs.h tm_p.h insn-opinit.h target-hooks-def.h
+alpha.d: pass-instances.def
 .endif
 
 .if ${MACHINE_CPU} == "arm"



CVS commit: src/lib/libm

2017-08-17 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Aug 17 13:58:40 UTC 2017

Modified Files:
src/lib/libm: Makefile

Log Message:
Actually... s_nexttowardf.c appears to be usable on soft-float as well;
it was for arm earlier and briefly for all mips, so just move it into
COMMON_SRCS.


To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.200 src/lib/libm/Makefile:1.201
--- src/lib/libm/Makefile:1.200	Thu Aug 17 09:06:21 2017
+++ src/lib/libm/Makefile	Thu Aug 17 13:58:39 2017
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.200 2017/08/17 09:06:21 he Exp $
+#  $NetBSD: Makefile,v 1.201 2017/08/17 13:58:39 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -242,10 +242,6 @@ COMMON_SRCS += \
 	feupdateenv.c
 .endif
 
-.if (${MKSOFTFLOAT} == "no")
-COMMON_SRCS+= s_nexttowardf.c
-.endif
-
 LIB=	m
 COMMON_SRCS+= b_exp.c b_log.c b_tgamma.c \
 	e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \
@@ -273,7 +269,7 @@ COMMON_SRCS+= b_exp.c b_log.c b_tgamma.c
 	s_lround.c s_lroundf.c s_lroundl.c \
 	s_log1pf.c s_logb.c s_logbf.c s_logbl.c \
 	s_matherr.c s_modff.c s_modfl.c s_nearbyint.c s_nextafter.c s_nextafterl.c \
-	s_nextafterf.c s_remquo.c s_remquof.c s_rint.c s_rintf.c \
+	s_nextafterf.c s_nexttowardf.c s_remquo.c s_remquof.c s_rint.c s_rintf.c \
 	s_round.c s_roundf.c s_roundl.c s_scalbn.c \
 	s_scalbnf.c s_scalbnl.c s_signgam.c s_significand.c s_significandf.c s_sin.c \
 	s_sinf.c s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c \



CVS commit: src/tests/lib/libm

2017-08-17 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Aug 17 09:14:28 UTC 2017

Modified Files:
src/tests/lib/libm: t_fe_round.c

Log Message:
Add test cases for nextafter() and nexttoward().  At the moment no
corner cases are tested, and the test cases are little more than a
verification that the functions are present in the implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libm/t_fe_round.c

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

Modified files:

Index: src/tests/lib/libm/t_fe_round.c
diff -u src/tests/lib/libm/t_fe_round.c:1.6 src/tests/lib/libm/t_fe_round.c:1.7
--- src/tests/lib/libm/t_fe_round.c:1.6	Fri Aug 11 20:31:58 2017
+++ src/tests/lib/libm/t_fe_round.c	Thu Aug 17 09:14:28 2017
@@ -122,11 +122,74 @@ ATF_TC_BODY(fe_nearbyint, tc)
 	}
 }
 
+static const struct {
+	double input;
+	double toward;
+	double expected;
+} values2[] = {
+	{ 10.0, 11.0, 10.0 },
+	{ -5.0, -6.0, -5.0 },
+};
+
+ATF_TC(fe_nextafter);
+ATF_TC_HEAD(fe_nextafter, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Checking IEEE 754 rounding using nextafter()");
+}
+
+ATF_TC_BODY(fe_nextafter, tc)
+{
+	double received;
+	int res;
+
+	for (unsigned int i = 0; i < __arraycount(values2); i++) {
+		received = nextafter(values2[i].input, values2[i].toward);
+		if (values2[i].input < values2[i].toward) {
+			res = (received > values2[i].input);
+		} else {
+			res = (received < values2[i].input);
+		}
+		ATF_CHECK_MSG(
+			res && (fabs(received - values2[i].expected) < EPSILON),
+			"nextafter() rounding wrong, difference too large\n"
+			"input: %f (index %d): got %f, expected %f, res %d\n",
+			values2[i].input, i, received, values2[i].expected, res);
+	}
+}
+
+ATF_TC(fe_nexttoward);
+ATF_TC_HEAD(fe_nexttoward, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Checking IEEE 754 rounding using nexttoward()");
+}
+
+ATF_TC_BODY(fe_nexttoward, tc)
+{
+	double received;
+	int res;
+
+	for (unsigned int i = 0; i < __arraycount(values2); i++) {
+		received = nexttoward(values2[i].input, values2[i].toward);
+		if (values2[i].input < values2[i].toward) {
+			res = (received > values2[i].input);
+		} else {
+			res = (received < values2[i].input);
+		}
+		ATF_CHECK_MSG(
+			res && (fabs(received - values2[i].expected) < EPSILON),
+			"nexttoward() rounding wrong, difference too large\n"
+			"input: %f (index %d): got %f, expected %f, res %d\n",
+			values2[i].input, i, received, values2[i].expected, res);
+	}
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, fe_round);
 	ATF_TP_ADD_TC(tp, fe_nearbyint);
+	ATF_TP_ADD_TC(tp, fe_nextafter);
+	ATF_TP_ADD_TC(tp, fe_nexttoward);
 
 	return atf_no_error();
 }
@@ -139,7 +202,6 @@ ATF_TC_HEAD(t_nofe_round, tc)
 	"dummy test case - no fenv.h support");
 }
 
-
 ATF_TC_BODY(t_nofe_round, tc)
 {
 	atf_tc_skip("no fenv.h support on this architecture");
@@ -158,11 +220,38 @@ ATF_TC_BODY(t_nofe_nearbyint, tc)
 	atf_tc_skip("no fenv.h support on this architecture");
 }
 
+ATF_TC(t_nofe_nextafter);
+
+ATF_TC_HEAD(t_nofe_nextafter, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"dummy test case - no fenv.h support");
+}
+
+ATF_TC_BODY(t_nofe_nextafter, tc)
+{
+	atf_tc_skip("no fenv.h support on this architecture");
+}
+
+ATF_TC(t_nofe_nexttoward);
+
+ATF_TC_HEAD(t_nofe_nexttoward, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"dummy test case - no fenv.h support");
+}
+
+ATF_TC_BODY(t_nofe_nexttoward, tc)
+{
+	atf_tc_skip("no fenv.h support on this architecture");
+}
 
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, t_nofe_round);
 	ATF_TP_ADD_TC(tp, t_nofe_nearbyint);
+	ATF_TP_ADD_TC(tp, t_nofe_nextafter);
+	ATF_TP_ADD_TC(tp, t_nofe_nexttoward);
 	return atf_no_error();
 }
 



CVS commit: src/lib/libm

2017-08-17 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Aug 17 09:06:21 UTC 2017

Modified Files:
src/lib/libm: Makefile

Log Message:
Move the inclusion of s_nexttowardf.c into a common test for
MKSOFTFLOAT=="no".  This brings us nexttowardf() for sparc, at least.


To generate a diff of this commit:
cvs rdiff -u -r1.199 -r1.200 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.199 src/lib/libm/Makefile:1.200
--- src/lib/libm/Makefile:1.199	Wed Aug 16 13:34:59 2017
+++ src/lib/libm/Makefile	Thu Aug 17 09:06:21 2017
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.199 2017/08/16 13:34:59 nisimura Exp $
+#  $NetBSD: Makefile,v 1.200 2017/08/17 09:06:21 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -75,7 +75,7 @@ COPTS+=	-mfloat-ieee -mieee-with-inexact
 .if ${MKSOFTFLOAT} == "no"
 COMMON_SRCS+= fenv.c
 .endif
-COMMON_SRCS+= s_nexttowardf.c s_rintl.c
+COMMON_SRCS+= s_rintl.c
 .for f in fenv.c lrint.S lrintf.S s_fabsf.S s_fma.S s_fmaf.S
 COPTS.$f +=	-mfpu=vfp
 .endfor
@@ -91,7 +91,7 @@ COMMON_SRCS += fenv.c
 
 .elif (${LIBC_MACHINE_ARCH} == "hppa")
 .PATH.c: ${.CURDIR}/arch/hppa
-COMMON_SRCS+= fenv.c s_nexttowardf.c s_rintl.c
+COMMON_SRCS+= fenv.c s_rintl.c
 
 .elif (${LIBC_MACHINE_ARCH} == "sparc")
 .PATH: ${.CURDIR}/arch/sparc
@@ -101,7 +101,7 @@ COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 .elif (${LIBC_MACHINE_ARCH} == "sparc64")
 .PATH: ${.CURDIR}/arch/sparc64
 COMMON_SRCS+= fenv.c
-COMMON_SRCS+= s_nexttowardf.c s_rintl.c
+COMMON_SRCS+= s_rintl.c
 .ifndef _COMPAT_M32_MK_
 COMMON_SRCS+= s_nexttoward.c
 .endif
@@ -115,7 +115,7 @@ COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 .endif
 .PATH:	${.CURDIR}/arch/i387
 
-COMMON_SRCS+= fenv.c s_nexttoward.c s_nexttowardf.c s_rintl.c
+COMMON_SRCS+= fenv.c s_nexttoward.c s_rintl.c
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 
 ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \
@@ -154,7 +154,7 @@ ARCH_SRCS = e_acos.S e_asin.S e_atanh.S 
 	e_log10.S e_remainder.S e_scalb.S e_sinh.S e_sqrt.S s_atan.S \
 	s_ceil.S s_copysign.S s_cos.S s_expm1.S s_finite.S s_floor.S \
 	s_log1p.S s_logb.S s_rint.S s_scalbn.S s_sin.S s_tan.S s_tanh.S
-COMMON_SRCS += fenv.c s_nexttoward.c s_nexttowardf.c s_rintl.c
+COMMON_SRCS += fenv.c s_nexttoward.c s_rintl.c
 .endif
 .endif
 # end of m68k
@@ -194,7 +194,7 @@ COMMON_SRCS += fenv.c
 .if ${MKSOFTFLOAT} == "no"
 COMMON_SRCS += fenv.c
 .endif
-COMMON_SRCS+= s_nexttowardf.c s_rintl.c
+COMMON_SRCS+= s_rintl.c
 
 .elif (${LIBC_MACHINE_CPU} == "sh3")
 .PATH:	${.CURDIR}/arch/sh3
@@ -242,6 +242,10 @@ COMMON_SRCS += \
 	feupdateenv.c
 .endif
 
+.if (${MKSOFTFLOAT} == "no")
+COMMON_SRCS+= s_nexttowardf.c
+.endif
+
 LIB=	m
 COMMON_SRCS+= b_exp.c b_log.c b_tgamma.c \
 	e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \



CVS commit: src/lib/libm/src

2017-08-16 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Aug 16 11:22:52 UTC 2017

Modified Files:
src/lib/libm/src: s_nextafter.c

Log Message:
On second thought, don't introduce nexttowardl() since we don't have that
yet elsewhere.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/libm/src/s_nextafter.c

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

Modified files:

Index: src/lib/libm/src/s_nextafter.c
diff -u src/lib/libm/src/s_nextafter.c:1.15 src/lib/libm/src/s_nextafter.c:1.16
--- src/lib/libm/src/s_nextafter.c:1.15	Wed Aug 16 09:15:48 2017
+++ src/lib/libm/src/s_nextafter.c	Wed Aug 16 11:22:52 2017
@@ -12,7 +12,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_nextafter.c,v 1.15 2017/08/16 09:15:48 he Exp $");
+__RCSID("$NetBSD: s_nextafter.c,v 1.16 2017/08/16 11:22:52 he Exp $");
 #endif
 
 /* IEEE functions
@@ -28,7 +28,6 @@ __RCSID("$NetBSD: s_nextafter.c,v 1.15 2
 #ifndef __HAVE_LONG_DOUBLE
 __strong_alias(nextafterl, nextafter)
 __strong_alias(nexttoward, nextafter)
-__strong_alias(nexttowardl, nextafter)
 #endif
 
 double



CVS commit: src/lib/libm

2017-08-16 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Aug 16 09:18:24 UTC 2017

Modified Files:
src/lib/libm: Makefile

Log Message:
In the non-softfloat m68k part, add s_nexttoward.c and s_nexttowardf.c,
so that we get nexttoward() and nexttowardf() implemented here as well.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.197 src/lib/libm/Makefile:1.198
--- src/lib/libm/Makefile:1.197	Tue Aug 15 10:40:28 2017
+++ src/lib/libm/Makefile	Wed Aug 16 09:18:24 2017
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.197 2017/08/15 10:40:28 mlelstv Exp $
+#  $NetBSD: Makefile,v 1.198 2017/08/16 09:18:24 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -153,7 +153,7 @@ ARCH_SRCS = e_acos.S e_asin.S e_atanh.S 
 	e_log10.S e_remainder.S e_scalb.S e_sinh.S e_sqrt.S s_atan.S \
 	s_ceil.S s_copysign.S s_cos.S s_expm1.S s_finite.S s_floor.S \
 	s_log1p.S s_logb.S s_rint.S s_scalbn.S s_sin.S s_tan.S s_tanh.S
-COMMON_SRCS += fenv.c s_rintl.c
+COMMON_SRCS += fenv.c s_nexttoward.c s_nexttowardf.c s_rintl.c
 .endif
 .endif
 # end of m68k



CVS commit: src/lib/libm/src

2017-08-16 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Aug 16 09:15:49 UTC 2017

Modified Files:
src/lib/libm/src: s_nextafter.c

Log Message:
On systems without __HAVE_LONG_DOUBLE, also alias nexttoward() and
nexttowardl() to nextafter().


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/s_nextafter.c

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

Modified files:

Index: src/lib/libm/src/s_nextafter.c
diff -u src/lib/libm/src/s_nextafter.c:1.14 src/lib/libm/src/s_nextafter.c:1.15
--- src/lib/libm/src/s_nextafter.c:1.14	Tue Mar 18 18:20:37 2014
+++ src/lib/libm/src/s_nextafter.c	Wed Aug 16 09:15:48 2017
@@ -12,7 +12,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_nextafter.c,v 1.14 2014/03/18 18:20:37 riastradh Exp $");
+__RCSID("$NetBSD: s_nextafter.c,v 1.15 2017/08/16 09:15:48 he Exp $");
 #endif
 
 /* IEEE functions
@@ -27,6 +27,8 @@ __RCSID("$NetBSD: s_nextafter.c,v 1.14 2
 
 #ifndef __HAVE_LONG_DOUBLE
 __strong_alias(nextafterl, nextafter)
+__strong_alias(nexttoward, nextafter)
+__strong_alias(nexttowardl, nextafter)
 #endif
 
 double



CVS commit: src/tests/lib/libm

2017-08-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Aug 11 20:31:58 UTC 2017

Modified Files:
src/tests/lib/libm: t_fe_round.c

Log Message:
Re-enable the test for nearbyint(), now that all ports (save vax,
which has a separate #if section here) should have nearbyint().


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libm/t_fe_round.c

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

Modified files:

Index: src/tests/lib/libm/t_fe_round.c
diff -u src/tests/lib/libm/t_fe_round.c:1.5 src/tests/lib/libm/t_fe_round.c:1.6
--- src/tests/lib/libm/t_fe_round.c:1.5	Tue Jul 25 21:26:56 2017
+++ src/tests/lib/libm/t_fe_round.c	Fri Aug 11 20:31:58 2017
@@ -93,10 +93,40 @@ ATF_TC_BODY(fe_round, tc)
 	}
 }
 
+ATF_TC(fe_nearbyint);
+ATF_TC_HEAD(fe_nearbyint, tc)
+{
+	atf_tc_set_md_var(tc, "descr","Checking IEEE 754 rounding modes using nearbyint");
+}
+
+ATF_TC_BODY(fe_nearbyint, tc)
+{
+	double received;
+
+	for (unsigned int i = 0; i < __arraycount(values); i++) {
+		fesetround(values[i].round_mode);
+
+		received = nearbyint(values[i].input);
+		ATF_CHECK_MSG(
+		(fabs(received - values[i].expected) < EPSILON),
+		"nearbyint rounding wrong, difference too large\n"
+		"input: %f (index %d): got %f, expected %ld\n",
+		values[i].input, i, received, values[i].expected);
+
+		/* Do we get the same rounding mode out? */
+		ATF_CHECK_MSG(
+		(fegetround() == values[i].round_mode),
+		"Didn't get the same rounding mode out!\n"
+		"(index %d) fed in %d rounding mode, got %d out\n",
+		i, values[i].round_mode, fegetround());
+	}
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, fe_round);
+	ATF_TP_ADD_TC(tp, fe_nearbyint);
 
 	return atf_no_error();
 }
@@ -115,9 +145,24 @@ ATF_TC_BODY(t_nofe_round, tc)
 	atf_tc_skip("no fenv.h support on this architecture");
 }
 
+ATF_TC(t_nofe_nearbyint);
+
+ATF_TC_HEAD(t_nofe_nearbyint, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"dummy test case - no fenv.h support");
+}
+
+ATF_TC_BODY(t_nofe_nearbyint, tc)
+{
+	atf_tc_skip("no fenv.h support on this architecture");
+}
+
+
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, t_nofe_round);
+	ATF_TP_ADD_TC(tp, t_nofe_nearbyint);
 	return atf_no_error();
 }
 



CVS commit: src/lib/libm

2017-08-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Aug 11 20:24:56 UTC 2017

Modified Files:
src/lib/libm: Makefile

Log Message:
Move s_nearbyint.c out of the cpu ifdefs and into COMMON_SRCS,
which is used everywhere except on vax.  This is to simplify and
to ensure the function is included in the build, allowing us to
re-add the nearbyint() test.


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.195 src/lib/libm/Makefile:1.196
--- src/lib/libm/Makefile:1.195	Thu Jul 27 10:03:10 2017
+++ src/lib/libm/Makefile	Fri Aug 11 20:24:56 2017
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.195 2017/07/27 10:03:10 he Exp $
+#  $NetBSD: Makefile,v 1.196 2017/08/11 20:24:56 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -66,7 +66,7 @@ COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 .elif (${LIBC_MACHINE_ARCH} == "alpha")
 .PATH: ${.CURDIR}/arch/alpha
 ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
-COMMON_SRCS+= fenv.c s_nearbyint.c
+COMMON_SRCS+= fenv.c
 COPTS+=	-mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
 
 .elif (${LIBC_MACHINE_CPU} == "arm")
@@ -74,7 +74,7 @@ COPTS+=	-mfloat-ieee -mieee-with-inexact
 .if ${MKSOFTFLOAT} == "no"
 COMMON_SRCS+= fenv.c
 .endif
-COMMON_SRCS+= s_nexttowardf.c s_nearbyint.c s_rintl.c
+COMMON_SRCS+= s_nexttowardf.c s_rintl.c
 .for f in fenv.c lrint.S lrintf.S s_fabsf.S s_fma.S s_fmaf.S
 COPTS.$f +=	-mfpu=vfp
 .endfor
@@ -86,21 +86,21 @@ ARCH_SRCS = e_sqrt.S e_sqrtf.S lrint.S l
 
 .elif (${LIBC_MACHINE_ARCH} == "ia64")
 .PATH: ${.CURDIR}/arch/ia64
-COMMON_SRCS += fenv.c s_nearbyint.c
+COMMON_SRCS += fenv.c
 
 .elif (${LIBC_MACHINE_ARCH} == "hppa")
 .PATH.c: ${.CURDIR}/arch/hppa
-COMMON_SRCS+= fenv.c s_nexttowardf.c s_nearbyint.c s_rintl.c
+COMMON_SRCS+= fenv.c s_nexttowardf.c s_rintl.c
 
 .elif (${LIBC_MACHINE_ARCH} == "sparc")
 .PATH: ${.CURDIR}/arch/sparc
-COMMON_SRCS+= fenv.c s_nearbyint.c
+COMMON_SRCS+= fenv.c
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 
 .elif (${LIBC_MACHINE_ARCH} == "sparc64")
 .PATH: ${.CURDIR}/arch/sparc64
 COMMON_SRCS+= fenv.c
-COMMON_SRCS+= s_nexttowardf.c s_nearbyint.c s_rintl.c
+COMMON_SRCS+= s_nexttowardf.c s_rintl.c
 .ifndef _COMPAT_M32_MK_
 COMMON_SRCS+= s_nexttoward.c
 .endif
@@ -114,8 +114,7 @@ COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 .endif
 .PATH:	${.CURDIR}/arch/i387
 
-COMMON_SRCS+= fenv.c s_nexttoward.c s_nexttowardf.c \
-	s_nearbyint.c s_rintl.c
+COMMON_SRCS+= fenv.c s_nexttoward.c s_nexttowardf.c s_rintl.c
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 
 ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \
@@ -154,7 +153,7 @@ ARCH_SRCS = e_acos.S e_asin.S e_atanh.S 
 	e_log10.S e_remainder.S e_scalb.S e_sinh.S e_sqrt.S s_atan.S \
 	s_ceil.S s_copysign.S s_cos.S s_expm1.S s_finite.S s_floor.S \
 	s_log1p.S s_logb.S s_rint.S s_scalbn.S s_sin.S s_tan.S s_tanh.S
-COMMON_SRCS += fenv.c s_nearbyint.c s_rintl.c
+COMMON_SRCS += fenv.c s_rintl.c
 .endif
 .endif
 # end of m68k
@@ -174,7 +173,7 @@ WARNS?=5
 .PATH:	${.CURDIR}/arch/riscv
 
 .if ${MKSOFTFLOAT} == "no"
-COMMON_SRCS += fenv.c s_nearbyint.c
+COMMON_SRCS += fenv.c
 ARCH_SRCS = e_sqrt.S e_sqrtf.S
 ARCH_SRCS += s_copysign.S s_copysignf.S
 ARCH_SRCS += s_fabs.S s_fabsf.S
@@ -186,19 +185,19 @@ ARCH_SRCS += s_fmin.S s_fminf.S
 .elif (${LIBC_MACHINE_ARCH} == "powerpc")
 .PATH:	${.CURDIR}/arch/powerpc
 .if ${MKSOFTFLOAT} == "no"
-COMMON_SRCS += fenv.c s_nearbyint.c
+COMMON_SRCS += fenv.c
 .endif
 
 .elif (${LIBC_MACHINE_CPU} == "mips")
 .PATH:	${.CURDIR}/arch/mips
 .if ${MKSOFTFLOAT} == "no"
-COMMON_SRCS += fenv.c s_nearbyint.c
+COMMON_SRCS += fenv.c
 .endif
 
 .elif (${LIBC_MACHINE_CPU} == "sh3")
 .PATH:	${.CURDIR}/arch/sh3
 .if ${MKSOFTFLOAT} == "no"
-COMMON_SRCS += fenv.c s_nearbyint.c
+COMMON_SRCS += fenv.c
 .endif
 .endif
 # End of list of CPU tests
@@ -267,7 +266,7 @@ COMMON_SRCS+= b_exp.c b_log.c b_tgamma.c
 	s_lrint.c s_lrintf.c s_lrintl.c \
 	s_lround.c s_lroundf.c s_lroundl.c \
 	s_log1pf.c s_logb.c s_logbf.c s_logbl.c \
-	s_matherr.c s_modff.c s_modfl.c s_nextafter.c s_nextafterl.c \
+	s_matherr.c s_modff.c s_modfl.c s_nearbyint.c s_nextafter.c s_nextafterl.c \
 	s_nextafterf.c s_remquo.c s_remquof.c s_rint.c s_rintf.c \
 	s_round.c s_roundf.c s_roundl.c s_scalbn.c \
 	s_scalbnf.c s_scalbnl.c s_signgam.c s_significand.c s_significandf.c s_sin.c \



CVS commit: src/sys/arch/emips/emips

2017-07-30 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Jul 30 11:38:57 UTC 2017

Modified Files:
src/sys/arch/emips/emips: machdep.c

Log Message:
Initialize iospace_size instead of iospace (will be overwritten) to 64k.
Brings boot of emips on giano a bit closer, but now it's stuck (hangs).


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/emips/emips/machdep.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/arch/emips/emips/machdep.c
diff -u src/sys/arch/emips/emips/machdep.c:1.12 src/sys/arch/emips/emips/machdep.c:1.13
--- src/sys/arch/emips/emips/machdep.c:1.12	Thu Dec 22 14:47:54 2016
+++ src/sys/arch/emips/emips/machdep.c	Sun Jul 30 11:38:57 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.12 2016/12/22 14:47:54 cherry Exp $	*/
+/*	$NetBSD: machdep.c,v 1.13 2017/07/30 11:38:57 he Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 2016/12/22 14:47:54 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.13 2017/07/30 11:38:57 he Exp $");
 
 #include "opt_ddb.h"
 
@@ -82,8 +82,8 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include 
 #endif
 
-vaddr_t iospace = 64 * 1024; /* BUGBUG make it an option? */
-vsize_t iospace_size;
+vaddr_t iospace;
+vsize_t iospace_size = 64 * 1024; /* BUGBUG make it an option? */
 
 #include "ksyms.h"
 



CVS commit: src/external/gpl3/gcc.old/usr.bin/backend

2017-07-27 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Jul 27 16:05:16 UTC 2017

Modified Files:
src/external/gpl3/gcc.old/usr.bin/backend: Makefile

Log Message:
For alpha, generating alpha.d first needs pass-instances.def re-generated.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc.old/usr.bin/backend/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/gpl3/gcc.old/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc.old/usr.bin/backend/Makefile:1.6 src/external/gpl3/gcc.old/usr.bin/backend/Makefile:1.7
--- src/external/gpl3/gcc.old/usr.bin/backend/Makefile:1.6	Sun Jul 23 01:12:17 2017
+++ src/external/gpl3/gcc.old/usr.bin/backend/Makefile	Thu Jul 27 16:05:15 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/07/23 01:12:17 mrg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/07/27 16:05:15 he Exp $
 
 LIBISPRIVATE=	yes
 
@@ -445,6 +445,7 @@ final.o: target-hooks-def.h c-family/c-t
 
 .if ${GCC_MACHINE_ARCH} == "alpha"
 alpha.d alpha.o: tm-constrs.h tm_p.h insn-opinit.h target-hooks-def.h
+alpha.d: pass-instances.def
 .endif
 
 .if ${MACHINE_CPU} == "arm"



CVS commit: src/lib/libm

2017-07-27 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Jul 27 10:03:10 UTC 2017

Modified Files:
src/lib/libm: Makefile

Log Message:
The sparc port needs s_nearbyint.c as well.


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.194 src/lib/libm/Makefile:1.195
--- src/lib/libm/Makefile:1.194	Thu Jul 27 07:01:58 2017
+++ src/lib/libm/Makefile	Thu Jul 27 10:03:10 2017
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.194 2017/07/27 07:01:58 he Exp $
+#  $NetBSD: Makefile,v 1.195 2017/07/27 10:03:10 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -94,7 +94,7 @@ COMMON_SRCS+= fenv.c s_nexttowardf.c s_n
 
 .elif (${LIBC_MACHINE_ARCH} == "sparc")
 .PATH: ${.CURDIR}/arch/sparc
-COMMON_SRCS+= fenv.c
+COMMON_SRCS+= fenv.c s_nearbyint.c
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 
 .elif (${LIBC_MACHINE_ARCH} == "sparc64")



CVS commit: src/lib/libm

2017-07-27 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Jul 27 07:01:58 UTC 2017

Modified Files:
src/lib/libm: Makefile

Log Message:
Non-softfloat m68k needs s_rintl.c.


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.193 src/lib/libm/Makefile:1.194
--- src/lib/libm/Makefile:1.193	Wed Jul 26 09:53:09 2017
+++ src/lib/libm/Makefile	Thu Jul 27 07:01:58 2017
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.193 2017/07/26 09:53:09 he Exp $
+#  $NetBSD: Makefile,v 1.194 2017/07/27 07:01:58 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -154,7 +154,7 @@ ARCH_SRCS = e_acos.S e_asin.S e_atanh.S 
 	e_log10.S e_remainder.S e_scalb.S e_sinh.S e_sqrt.S s_atan.S \
 	s_ceil.S s_copysign.S s_cos.S s_expm1.S s_finite.S s_floor.S \
 	s_log1p.S s_logb.S s_rint.S s_scalbn.S s_sin.S s_tan.S s_tanh.S
-COMMON_SRCS += fenv.c s_nearbyint.c
+COMMON_SRCS += fenv.c s_nearbyint.c s_rintl.c
 .endif
 .endif
 # end of m68k



CVS commit: src/lib/libm

2017-07-26 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jul 26 09:53:09 UTC 2017

Modified Files:
src/lib/libm: Makefile

Log Message:
Add s_nearbyint.c to alpha, ia64, riscv, mips, powerpc, and sh3 ports.


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.192 src/lib/libm/Makefile:1.193
--- src/lib/libm/Makefile:1.192	Wed Jul 26 09:42:12 2017
+++ src/lib/libm/Makefile	Wed Jul 26 09:53:09 2017
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.192 2017/07/26 09:42:12 he Exp $
+#  $NetBSD: Makefile,v 1.193 2017/07/26 09:53:09 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -62,11 +62,11 @@ COMMON_SRCS+= fenv.c
 .endif
 COMMON_SRCS+= e_sqrtl.c
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
-.elif (${LIBC_MACHINE_ARCH} == "alpha")
 
+.elif (${LIBC_MACHINE_ARCH} == "alpha")
 .PATH: ${.CURDIR}/arch/alpha
 ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
-COMMON_SRCS+= fenv.c
+COMMON_SRCS+= fenv.c s_nearbyint.c
 COPTS+=	-mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
 
 .elif (${LIBC_MACHINE_CPU} == "arm")
@@ -82,11 +82,11 @@ COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 .if (${MKSOFTFLOAT} == "no")
 .PATH.S: ${.CURDIR}/arch/arm
 ARCH_SRCS = e_sqrt.S e_sqrtf.S lrint.S lrintf.S s_fabsf.S s_fma.S s_fmaf.S
-
 .endif
+
 .elif (${LIBC_MACHINE_ARCH} == "ia64")
 .PATH: ${.CURDIR}/arch/ia64
-COMMON_SRCS += fenv.c
+COMMON_SRCS += fenv.c s_nearbyint.c
 
 .elif (${LIBC_MACHINE_ARCH} == "hppa")
 .PATH.c: ${.CURDIR}/arch/hppa
@@ -154,7 +154,7 @@ ARCH_SRCS = e_acos.S e_asin.S e_atanh.S 
 	e_log10.S e_remainder.S e_scalb.S e_sinh.S e_sqrt.S s_atan.S \
 	s_ceil.S s_copysign.S s_cos.S s_expm1.S s_finite.S s_floor.S \
 	s_log1p.S s_logb.S s_rint.S s_scalbn.S s_sin.S s_tan.S s_tanh.S
-COMMON_SRCS += fenv.c
+COMMON_SRCS += fenv.c s_nearbyint.c
 .endif
 .endif
 # end of m68k
@@ -174,7 +174,7 @@ WARNS?=5
 .PATH:	${.CURDIR}/arch/riscv
 
 .if ${MKSOFTFLOAT} == "no"
-COMMON_SRCS += fenv.c
+COMMON_SRCS += fenv.c s_nearbyint.c
 ARCH_SRCS = e_sqrt.S e_sqrtf.S
 ARCH_SRCS += s_copysign.S s_copysignf.S
 ARCH_SRCS += s_fabs.S s_fabsf.S
@@ -186,22 +186,22 @@ ARCH_SRCS += s_fmin.S s_fminf.S
 .elif (${LIBC_MACHINE_ARCH} == "powerpc")
 .PATH:	${.CURDIR}/arch/powerpc
 .if ${MKSOFTFLOAT} == "no"
-COMMON_SRCS += fenv.c
+COMMON_SRCS += fenv.c s_nearbyint.c
 .endif
 
 .elif (${LIBC_MACHINE_CPU} == "mips")
 .PATH:	${.CURDIR}/arch/mips
 .if ${MKSOFTFLOAT} == "no"
-COMMON_SRCS += fenv.c
+COMMON_SRCS += fenv.c s_nearbyint.c
 .endif
 
 .elif (${LIBC_MACHINE_CPU} == "sh3")
 .PATH:	${.CURDIR}/arch/sh3
 .if ${MKSOFTFLOAT} == "no"
-COMMON_SRCS += fenv.c
+COMMON_SRCS += fenv.c s_nearbyint.c
 .endif
 .endif
-# End of long list of CPU tests
+# End of list of CPU tests
 
 WARNS?=5
 



CVS commit: src/lib/libm

2017-07-26 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jul 26 09:42:12 UTC 2017

Modified Files:
src/lib/libm: Makefile

Log Message:
Add some blank lines to separate the different CPU archs,
for a minimal readability improvement.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.191 src/lib/libm/Makefile:1.192
--- src/lib/libm/Makefile:1.191	Sat May  6 18:03:24 2017
+++ src/lib/libm/Makefile	Wed Jul 26 09:42:12 2017
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.191 2017/05/06 18:03:24 christos Exp $
+#  $NetBSD: Makefile,v 1.192 2017/07/26 09:42:12 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -63,10 +63,12 @@ COMMON_SRCS+= fenv.c
 COMMON_SRCS+= e_sqrtl.c
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 .elif (${LIBC_MACHINE_ARCH} == "alpha")
+
 .PATH: ${.CURDIR}/arch/alpha
 ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
 COMMON_SRCS+= fenv.c
 COPTS+=	-mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
+
 .elif (${LIBC_MACHINE_CPU} == "arm")
 .PATH.c: ${.CURDIR}/arch/arm
 .if ${MKSOFTFLOAT} == "no"
@@ -80,17 +82,21 @@ COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 .if (${MKSOFTFLOAT} == "no")
 .PATH.S: ${.CURDIR}/arch/arm
 ARCH_SRCS = e_sqrt.S e_sqrtf.S lrint.S lrintf.S s_fabsf.S s_fma.S s_fmaf.S
+
 .endif
 .elif (${LIBC_MACHINE_ARCH} == "ia64")
 .PATH: ${.CURDIR}/arch/ia64
 COMMON_SRCS += fenv.c
+
 .elif (${LIBC_MACHINE_ARCH} == "hppa")
 .PATH.c: ${.CURDIR}/arch/hppa
 COMMON_SRCS+= fenv.c s_nexttowardf.c s_nearbyint.c s_rintl.c
+
 .elif (${LIBC_MACHINE_ARCH} == "sparc")
 .PATH: ${.CURDIR}/arch/sparc
 COMMON_SRCS+= fenv.c
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
+
 .elif (${LIBC_MACHINE_ARCH} == "sparc64")
 .PATH: ${.CURDIR}/arch/sparc64
 COMMON_SRCS+= fenv.c
@@ -99,6 +105,7 @@ COMMON_SRCS+= s_nexttowardf.c s_nearbyin
 COMMON_SRCS+= s_nexttoward.c
 .endif
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
+
 .elif ((${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64"))
 
 # XXX consider making this LIBC_MACHINE_ARCH?
@@ -128,6 +135,7 @@ s_${f}.o s_${f}.pico s_${f}.po s_${f}.go
 .if (${MACHINE_ARCH} == "i386")
 SUBDIR=arch/i387
 .endif
+
 .elif (${LIBC_MACHINE_ARCH} == "m68k")
 .if defined(M68060)
 .PATH:	${.CURDIR}/arch/m68060
@@ -150,6 +158,7 @@ COMMON_SRCS += fenv.c
 .endif
 .endif
 # end of m68k
+
 .elif (${LIBC_MACHINE_ARCH} == "vax")
 .PATH:	${.CURDIR}/arch/vax
 
@@ -160,6 +169,7 @@ COMMON_SRCS += fenv.c
 # and emulation code isn't written yet.
 ARCH_SRCS = n_scalbn.S
 WARNS?=5
+
 .elif (${LIBC_MACHINE_CPU} == "riscv")
 .PATH:	${.CURDIR}/arch/riscv
 
@@ -172,22 +182,26 @@ ARCH_SRCS += s_fma.S s_fmaf.S
 ARCH_SRCS += s_fmax.S s_fmaxf.S
 ARCH_SRCS += s_fmin.S s_fminf.S
 .endif
+
 .elif (${LIBC_MACHINE_ARCH} == "powerpc")
 .PATH:	${.CURDIR}/arch/powerpc
 .if ${MKSOFTFLOAT} == "no"
 COMMON_SRCS += fenv.c
 .endif
+
 .elif (${LIBC_MACHINE_CPU} == "mips")
 .PATH:	${.CURDIR}/arch/mips
 .if ${MKSOFTFLOAT} == "no"
 COMMON_SRCS += fenv.c
 .endif
+
 .elif (${LIBC_MACHINE_CPU} == "sh3")
 .PATH:	${.CURDIR}/arch/sh3
 .if ${MKSOFTFLOAT} == "no"
 COMMON_SRCS += fenv.c
 .endif
 .endif
+# End of long list of CPU tests
 
 WARNS?=5
 



CVS commit: src/tests/lib/libm

2017-07-24 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Jul 24 18:14:46 UTC 2017

Modified Files:
src/tests/lib/libm: t_fe_round.c

Log Message:
Add a test checking nearbyint(), using the same table as used by
the existing lrint() test.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libm/t_fe_round.c

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

Modified files:

Index: src/tests/lib/libm/t_fe_round.c
diff -u src/tests/lib/libm/t_fe_round.c:1.3 src/tests/lib/libm/t_fe_round.c:1.4
--- src/tests/lib/libm/t_fe_round.c:1.3	Mon Jul 24 18:13:36 2017
+++ src/tests/lib/libm/t_fe_round.c	Mon Jul 24 18:14:46 2017
@@ -93,10 +93,40 @@ ATF_TC_BODY(fe_round, tc)
 	}
 }
 
+ATF_TC(fe_nearbyint);
+ATF_TC_HEAD(fe_nearbyint, tc)
+{
+	atf_tc_set_md_var(tc, "descr","Checking IEEE 754 rounding modes using nearbyint");
+}
+
+ATF_TC_BODY(fe_nearbyint, tc)
+{
+	double received;
+
+	for (unsigned int i = 0; i < __arraycount(values); i++) {
+		fesetround(values[i].round_mode);
+
+		received = nearbyint(values[i].input);
+		ATF_CHECK_MSG(
+		(fabs(received - values[i].expected) < EPSILON),
+		"nearbyint rounding wrong, difference too large\n"
+		"input: %f (index %d): got %f, expected %ld\n",
+		values[i].input, i, received, values[i].expected);
+
+		/* Do we get the same rounding mode out? */
+		ATF_CHECK_MSG(
+		(fegetround() == values[i].round_mode),
+		"Didn't get the same rounding mode out!\n"
+		"(index %d) fed in %d rounding mode, got %d out\n",
+		i, values[i].round_mode, fegetround());
+	}
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, fe_round);
+	ATF_TP_ADD_TC(tp, fe_nearbyint);
 
 	return atf_no_error();
 }
@@ -109,15 +139,27 @@ ATF_TC_HEAD(t_nofe_round, tc)
 	"dummy test case - no fenv.h support");
 }
 
-
 ATF_TC_BODY(t_nofe_round, tc)
 {
 	atf_tc_skip("no fenv.h support on this architecture");
 }
 
+ATF_TC_HEAD(t_nofe_nearbyint, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"dummy test case - no fenv.h support");
+}
+
+ATF_TC_BODY(t_nofe_nearbyint, tc)
+{
+	atf_tc_skip("no fenv.h support on this architecture");
+}
+
+
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, t_nofe_round);
+	ATF_TP_ADD_TC(tp, t_nofe_nearbyint);
 	return atf_no_error();
 }
 



CVS commit: src/tests/lib/libm

2017-07-24 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Jul 24 18:13:36 UTC 2017

Modified Files:
src/tests/lib/libm: t_fe_round.c

Log Message:
Swap around the two last args to the check for expected fegetround(),
so the error message makes sense.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libm/t_fe_round.c

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

Modified files:

Index: src/tests/lib/libm/t_fe_round.c
diff -u src/tests/lib/libm/t_fe_round.c:1.2 src/tests/lib/libm/t_fe_round.c:1.3
--- src/tests/lib/libm/t_fe_round.c:1.2	Tue Dec 20 06:07:38 2016
+++ src/tests/lib/libm/t_fe_round.c	Mon Jul 24 18:13:36 2017
@@ -89,7 +89,7 @@ ATF_TC_BODY(fe_round, tc)
 		(fegetround() == values[i].round_mode),
 		"Didn't get the same rounding mode out!\n"
 		"(index %d) fed in %d rounding mode, got %d out\n",
-		i, fegetround(), values[i].round_mode);
+		i, values[i].round_mode, fegetround());
 	}
 }
 



CVS commit: src/distrib/notes/macppc

2017-06-07 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jun  7 09:14:32 UTC 2017

Modified Files:
src/distrib/notes/macppc: prep.OPENFIRMWARE

Log Message:
Change the deprecation notice about ofwboot.elf to say that it may
still be required in some cases, as observed by some MacMini users.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/distrib/notes/macppc/prep.OPENFIRMWARE

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

Modified files:

Index: src/distrib/notes/macppc/prep.OPENFIRMWARE
diff -u src/distrib/notes/macppc/prep.OPENFIRMWARE:1.18 src/distrib/notes/macppc/prep.OPENFIRMWARE:1.19
--- src/distrib/notes/macppc/prep.OPENFIRMWARE:1.18	Sat May  9 08:13:35 2015
+++ src/distrib/notes/macppc/prep.OPENFIRMWARE	Wed Jun  7 09:14:32 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: prep.OPENFIRMWARE,v 1.18 2015/05/09 08:13:35 snj Exp $
+.\"	$NetBSD: prep.OPENFIRMWARE,v 1.19 2017/06/07 09:14:32 he Exp $
 .if \*[OF_VERSION_3] \{\
 .
 .Ss2 Updating your BootROM
@@ -746,12 +746,20 @@ from a disk which then loads the seconda
 which then loads the kernel.
 .\}
 .(Note
+Despite a note to the contrary in earlier releases that
 .Pa ofwboot.elf
-is obsoleted.  All users should be using
+is obsoleted, that is no longer the case.
+It has been observed that on some newish machines (notably at least
+some Mac Minis), use of
 .Pa ofwboot.xcf
-instead of
+will result in an early kernel panic when loading the GENERIC kernel
+from disk.
+For these machines it appears to be a workaround to use
 .Pa ofwboot.elf
-now.
+instead of
+.Pa ofwboot.xcf
+as the boot loader.
+The root cause for this problem has unfortunately yet to be found.
 .Note)
 .Pp
 The following bootable media are available for loading the bootloader:



CVS commit: src/doc

2016-10-20 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Oct 20 07:33:28 UTC 2016

Modified Files:
src/doc: HACKS

Log Message:
Per the discussion in PR#20924, remove the HACK entry for intvec.S on vax.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/doc/HACKS

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.174 src/doc/HACKS:1.175
--- src/doc/HACKS:1.174	Wed Jun 15 14:11:15 2016
+++ src/doc/HACKS	Thu Oct 20 07:33:28 2016
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.174 2016/06/15 14:11:15 riastradh Exp $
+# $NetBSD: HACKS,v 1.175 2016/10/20 07:33:28 he Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -441,17 +441,6 @@ port	vax
 		GCC4 on vax crashes.  -O0 stops it happening so far...
 	kcah
 
-	hack	vax Toolchain bug
-	cdate	28 Mar 2003
-	who	he
-	file	sys/arch/vax/vax/intvec.S : 1.5
-	descr
-		Workaround for PR toolchain/20924.  The assembler apparently
-		tries to range-check byte offsets when it doesn't have
-		sufficient information to make that decision.
-		Workaround uses `brw' instead of `brb' instruction.
-	kcah
-
 	hack	declare boolean_t in two IPF user-mode programs
 	cdate	Tue Mar  7 19:19:20 CET 2006
 	who	he



CVS commit: [netbsd-7] src/external/bsd/ntp/dist/sntp/libopts

2015-11-30 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Nov 30 10:31:04 UTC 2015

Modified Files:
src/external/bsd/ntp/dist/sntp/libopts [netbsd-7]: enum.c

Log Message:
As far as I (and my compiler) can tell, there's no need to cast
the arg to strncmp().


To generate a diff of this commit:
cvs rdiff -u -r1.2.6.2 -r1.2.6.3 \
src/external/bsd/ntp/dist/sntp/libopts/enum.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/bsd/ntp/dist/sntp/libopts/enum.c
diff -u src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.2.6.2 src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.2.6.3
--- src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.2.6.2	Sun Nov  8 01:51:12 2015
+++ src/external/bsd/ntp/dist/sntp/libopts/enum.c	Mon Nov 30 10:31:04 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: enum.c,v 1.2.6.2 2015/11/08 01:51:12 riz Exp $	*/
+/*	$NetBSD: enum.c,v 1.2.6.3 2015/11/30 10:31:04 he Exp $	*/
 
 
 /**
@@ -217,7 +217,7 @@ find_name(char const * name, tOptions * 
  *  Multiple partial matches means we have an ambiguous match.
  */
 for (idx = 0; idx < name_ct; idx++) {
-if (strncmp(paz_names[idx], (const char *)name, len) == 0) {
+if (strncmp(paz_names[idx], name, len) == 0) {
 if (paz_names[idx][len] == NUL)
 return idx;  /* full match */
 



CVS commit: [netbsd-7] src/external/bsd/ntp/dist/sntp/libopts

2015-11-30 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Nov 30 10:32:06 UTC 2015

Modified Files:
src/external/bsd/ntp/dist/sntp/libopts [netbsd-7]: enum.c

Log Message:
Wrong branch, backing out.


To generate a diff of this commit:
cvs rdiff -u -r1.2.6.3 -r1.2.6.4 \
src/external/bsd/ntp/dist/sntp/libopts/enum.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/bsd/ntp/dist/sntp/libopts/enum.c
diff -u src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.2.6.3 src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.2.6.4
--- src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.2.6.3	Mon Nov 30 10:31:04 2015
+++ src/external/bsd/ntp/dist/sntp/libopts/enum.c	Mon Nov 30 10:32:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: enum.c,v 1.2.6.3 2015/11/30 10:31:04 he Exp $	*/
+/*	$NetBSD: enum.c,v 1.2.6.4 2015/11/30 10:32:06 he Exp $	*/
 
 
 /**
@@ -217,7 +217,7 @@ find_name(char const * name, tOptions * 
  *  Multiple partial matches means we have an ambiguous match.
  */
 for (idx = 0; idx < name_ct; idx++) {
-if (strncmp(paz_names[idx], name, len) == 0) {
+if (strncmp(paz_names[idx], (const char *)name, len) == 0) {
 if (paz_names[idx][len] == NUL)
 return idx;  /* full match */
 



CVS commit: src/external/bsd/ntp/dist/sntp/libopts

2015-11-30 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Nov 30 10:37:25 UTC 2015

Modified Files:
src/external/bsd/ntp/dist/sntp/libopts: enum.c

Log Message:
As far as I (and my compiler) can tell, there's no need to cast
the arg to strncmp().


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/libopts/enum.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/bsd/ntp/dist/sntp/libopts/enum.c
diff -u src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.5 src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.6
--- src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.5	Fri Jul 10 14:20:35 2015
+++ src/external/bsd/ntp/dist/sntp/libopts/enum.c	Mon Nov 30 10:37:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: enum.c,v 1.5 2015/07/10 14:20:35 christos Exp $	*/
+/*	$NetBSD: enum.c,v 1.6 2015/11/30 10:37:25 he Exp $	*/
 
 
 /**
@@ -217,7 +217,7 @@ find_name(char const * name, tOptions * 
  *  Multiple partial matches means we have an ambiguous match.
  */
 for (idx = 0; idx < name_ct; idx++) {
-if (strncmp(paz_names[idx], (const char *)name, len) == 0) {
+if (strncmp(paz_names[idx], name, len) == 0) {
 if (paz_names[idx][len] == NUL)
 return idx;  /* full match */
 



CVS commit: src

2015-09-13 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Sep 13 09:46:30 UTC 2015

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libm: Makefile
src/lib/libm/man: rint.3

Log Message:
Add entries for rintl(3) and the nearbyint functions, and
make manual page links to the new functions.
Bump manual page date.


To generate a diff of this commit:
cvs rdiff -u -r1.1985 -r1.1986 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.168 -r1.169 src/lib/libm/Makefile
cvs rdiff -u -r1.13 -r1.14 src/lib/libm/man/rint.3

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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1985 src/distrib/sets/lists/comp/mi:1.1986
--- src/distrib/sets/lists/comp/mi:1.1985	Sun Aug 23 18:28:40 2015
+++ src/distrib/sets/lists/comp/mi	Sun Sep 13 09:46:30 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1985 2015/08/23 18:28:40 mrg Exp $
+#	$NetBSD: mi,v 1.1986 2015/09/13 09:46:30 he Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -7702,6 +7702,9 @@
 ./usr/share/man/cat3/nc_perror.0		comp-c-catman		.cat
 ./usr/share/man/cat3/nc_sperror.0		comp-c-catman		.cat
 ./usr/share/man/cat3/ndbm.0			comp-c-catman		.cat
+./usr/share/man/cat3/nearbyint.0		comp-c-catman		.cat
+./usr/share/man/cat3/nearbyintf.0		comp-c-catman		.cat
+./usr/share/man/cat3/nearbyintl.0		comp-c-catman		.cat
 ./usr/share/man/cat3/network.0			comp-c-catman		.cat
 ./usr/share/man/cat3/new_field.0		comp-c-catman		.cat
 ./usr/share/man/cat3/new_fieldtype.0		comp-c-catman		.cat
@@ -8435,6 +8438,7 @@
 ./usr/share/man/cat3/rindex.0			comp-c-catman		.cat
 ./usr/share/man/cat3/rint.0			comp-c-catman		.cat
 ./usr/share/man/cat3/rintf.0			comp-c-catman		.cat
+./usr/share/man/cat3/rintl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/ripemd.0			comp-obsolete		obsolete
 ./usr/share/man/cat3/rmd160.0			comp-c-catman		.cat
 ./usr/share/man/cat3/rmtops.0			comp-c-catman		.cat
@@ -14604,6 +14608,9 @@
 ./usr/share/man/html3/nc_perror.html		comp-c-htmlman		html
 ./usr/share/man/html3/nc_sperror.html		comp-c-htmlman		html
 ./usr/share/man/html3/ndbm.html			comp-c-htmlman		html
+./usr/share/man/html3/nearbyint.html		comp-c-htmlman		html
+./usr/share/man/html3/nearbyintf.html		comp-c-htmlman		html
+./usr/share/man/html3/nearbyintl.html		comp-c-htmlman		html
 ./usr/share/man/html3/network.html		comp-c-htmlman		html
 ./usr/share/man/html3/new_field.html		comp-c-htmlman		html
 ./usr/share/man/html3/new_fieldtype.html	comp-c-htmlman		html
@@ -15329,6 +15336,7 @@
 ./usr/share/man/html3/rindex.html		comp-c-htmlman		html
 ./usr/share/man/html3/rint.html			comp-c-htmlman		html
 ./usr/share/man/html3/rintf.html		comp-c-htmlman		html
+./usr/share/man/html3/rintl.html		comp-c-htmlman		html
 ./usr/share/man/html3/rmd160.html		comp-c-htmlman		html
 ./usr/share/man/html3/rmtops.html		comp-c-htmlman		html
 ./usr/share/man/html3/round.html		comp-c-htmlman		html
@@ -21489,6 +21497,9 @@
 ./usr/share/man/man3/nc_perror.3		comp-c-man		.man
 ./usr/share/man/man3/nc_sperror.3		comp-c-man		.man
 ./usr/share/man/man3/ndbm.3			comp-c-man		.man
+./usr/share/man/man3/nearbyint.3		comp-c-man		.man
+./usr/share/man/man3/nearbyintf.3		comp-c-man		.man
+./usr/share/man/man3/nearbyintl.3		comp-c-man		.man
 ./usr/share/man/man3/network.3			comp-c-man		.man
 ./usr/share/man/man3/new_field.3		comp-c-man		.man
 ./usr/share/man/man3/new_fieldtype.3		comp-c-man		.man
@@ -2,6 +22233,7 @@
 ./usr/share/man/man3/rindex.3			comp-c-man		.man
 ./usr/share/man/man3/rint.3			comp-c-man		.man
 ./usr/share/man/man3/rintf.3			comp-c-man		.man
+./usr/share/man/man3/rintl.3			comp-c-man		.man
 ./usr/share/man/man3/ripemd.3			comp-obsolete		obsolete
 ./usr/share/man/man3/rmd160.3			comp-c-man		.man
 ./usr/share/man/man3/rmtops.3			comp-c-man		.man

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.168 src/lib/libm/Makefile:1.169
--- src/lib/libm/Makefile:1.168	Sat Dec 27 16:54:02 2014
+++ src/lib/libm/Makefile	Sun Sep 13 09:46:30 2015
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.168 2014/12/27 16:54:02 martin Exp $
+#  $NetBSD: Makefile,v 1.169 2015/09/13 09:46:30 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -146,7 +146,8 @@ ARCH_SRCS = e_acos.S e_asin.S e_atanh.S 
 .elif (${LIBC_MACHINE_ARCH} == "vax")
 .PATH:	${.CURDIR}/arch/vax
 
-#NOIEEE_ARCH= n_infnan.S n_argred.S n_sqrt.S
+#NOIEEE_ARCH+= s_fmax.c s_fmaxf.c s_fmaxl.c
+#NOIEEE_ARCH+= n_infnan.S n_argred.S n_sqrt.S
 #ARCH_SRCS = n_atan2.S n_cabs.S n_cbrt.S n_support.S n_sincos.S n_tan.S
 # XXX - ripped out due to lack of the insn polyd in the Mariah chip,
 # and emulation code isn't written yet.
@@ -352,7 +353,11 @@ MLINKS+=lrint.3 lrintf.3 lrint.3 llrint.
 MLINKS+=remainder.3 remainderf.3 \
 	remainder.3 remquo.3 \
 	remainder.3 remquof.3
-MLINKS+=rint.3 rintf.3
+MLINKS+=rint.3 rintf.3 \
+	rint.3 rintl.3 \
+	rint.3 nearbyint.3 \
+	rint.3 nearbyintf.3 \
+	rint.3 

CVS commit: src/lib/libm/man

2015-09-10 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Sep 10 08:28:54 UTC 2015

Modified Files:
src/lib/libm/man: frexp.3

Log Message:
Document frexpl() now that we have it as well.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/man/frexp.3

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

Modified files:

Index: src/lib/libm/man/frexp.3
diff -u src/lib/libm/man/frexp.3:1.2 src/lib/libm/man/frexp.3:1.3
--- src/lib/libm/man/frexp.3:1.2	Thu Apr 29 08:35:03 2010
+++ src/lib/libm/man/frexp.3	Thu Sep 10 08:28:54 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: frexp.3,v 1.2 2010/04/29 08:35:03 joerg Exp $
+.\"	$NetBSD: frexp.3,v 1.3 2015/09/10 08:28:54 he Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -47,6 +47,8 @@
 .Fn frexp "double value" "int *exp"
 .Ft float
 .Fn frexpf "float value" "int *exp"
+.Ft long double
+.Fn frexpl "long double value" "int *exp"
 .Sh DESCRIPTION
 The
 .Fn frexp



CVS commit: src

2015-02-14 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sat Feb 14 12:57:53 UTC 2015

Modified Files:
src/share/man/man4: tcp.4
src/sys/netinet: tcp.h tcp_input.c tcp_output.c tcp_subr.c tcp_usrreq.c
tcp_var.h

Log Message:
Port over the TCP_INFO socket option from FreeBSD, originally from
the Linux 2.6 TCP API.  This permits the caller to query certain information
about a TCP connection, and is used by pkgsrc's net/iperf3 test program
if available.

This extends struct tcbcb with three fields to count retransmits,
out-of-sequence receives and zero window announcements, and will
therefore warrant a kernel revision bump (done separately).


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man4/tcp.4
cvs rdiff -u -r1.30 -r1.31 src/sys/netinet/tcp.h
cvs rdiff -u -r1.335 -r1.336 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.179 -r1.180 src/sys/netinet/tcp_output.c
cvs rdiff -u -r1.257 -r1.258 src/sys/netinet/tcp_subr.c
cvs rdiff -u -r1.202 -r1.203 src/sys/netinet/tcp_usrreq.c
cvs rdiff -u -r1.175 -r1.176 src/sys/netinet/tcp_var.h

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

Modified files:

Index: src/share/man/man4/tcp.4
diff -u src/share/man/man4/tcp.4:1.29 src/share/man/man4/tcp.4:1.30
--- src/share/man/man4/tcp.4:1.29	Thu Oct 10 12:28:10 2013
+++ src/share/man/man4/tcp.4	Sat Feb 14 12:57:52 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: tcp.4,v 1.29 2013/10/10 12:28:10 christos Exp $
+.\	$NetBSD: tcp.4,v 1.30 2015/02/14 12:57:52 he Exp $
 .\	$FreeBSD: tcp.4,v 1.11.2.16 2004/02/16 22:21:47 bms Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
@@ -243,6 +243,23 @@ option value is inherited from the liste
 This option takes an
 .Vt unsigned int
 value, with a value greater than 0.
+.It Dv TCP_INFO
+Information about a socket's underlying TCP session may be retreived
+by passing the read-only option
+.Dv TPC_INFO
+to 
+.Xr getsockopt 2 .
+It accepts a single argument: a pointer to an instance of
+.Vt struct tcp_info .
+.Pp
+This API is subject to change; consult the source to determine
+which fields are currently filled out by this option.
+.Nx
+specific additions include
+send window size,
+receive window size,
+and
+bandwidth-controlled window space.
 .\ range of 0 to N (where N is the
 .\ .Xr sysctl 8
 .\ variable

Index: src/sys/netinet/tcp.h
diff -u src/sys/netinet/tcp.h:1.30 src/sys/netinet/tcp.h:1.31
--- src/sys/netinet/tcp.h:1.30	Sat Jan  7 20:20:22 2012
+++ src/sys/netinet/tcp.h	Sat Feb 14 12:57:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp.h,v 1.30 2012/01/07 20:20:22 christos Exp $	*/
+/*	$NetBSD: tcp.h,v 1.31 2015/02/14 12:57:53 he Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -127,7 +127,80 @@ struct tcphdr {
 #ifdef notyet
 #define	TCP_NOOPT	8	/* reserved for FreeBSD compat */
 #endif
+#define	TCP_INFO	9	/* retrieve tcp_info structure */
 #define	TCP_MD5SIG	0x10	/* use MD5 digests (RFC2385) */
 #define	TCP_CONGCTL	0x20	/* selected congestion control */
 
+#define	TCPI_OPT_TIMESTAMPS	0x01
+#define	TCPI_OPT_SACK		0x02
+#define	TCPI_OPT_WSCALE		0x04
+#define	TCPI_OPT_ECN		0x08
+#define	TCPI_OPT_TOE		0x10
+
+/*
+ * The TCP_INFO socket option comes from the Linux 2.6 TCP API, and permits
+ * the caller to query certain information about the state of a TCP
+ * connection.  We provide an overlapping set of fields with the Linux
+ * implementation, but since this is a fixed size structure, room has been
+ * left for growth.  In order to maximize potential future compatibility with
+ * the Linux API, the same variable names and order have been adopted, and
+ * padding left to make room for omitted fields in case they are added later.
+ *
+ * XXX: This is currently an unstable ABI/API, in that it is expected to
+ * change.
+ */
+struct tcp_info {
+	uint8_t		tcpi_state; /* TCP FSM state. */
+	uint8_t		__tcpi_ca_state;
+	uint8_t		__tcpi_retransmits;
+	uint8_t		__tcpi_probes;
+	uint8_t		__tcpi_backoff;
+	uint8_t		tcpi_options;	   /* Options enabled on conn. */
+	uint8_t		tcpi_snd_wscale:4,	/* RFC1323 send shift value. */
+			tcpi_rcv_wscale:4; /* RFC1323 recv shift value. */
+
+	uint32_t	tcpi_rto;		/* Retransmission timeout (usec). */
+	uint32_t	__tcpi_ato;
+	uint32_t	tcpi_snd_mss;		/* Max segment size for send. */
+	uint32_t	tcpi_rcv_mss;		/* Max segment size for receive. */
+
+	uint32_t	__tcpi_unacked;
+	uint32_t	__tcpi_sacked;
+	uint32_t	__tcpi_lost;
+	uint32_t	__tcpi_retrans;
+	uint32_t	__tcpi_fackets;
+
+	/* Times; measurements in usecs. */
+	uint32_t	__tcpi_last_data_sent;
+	uint32_t	__tcpi_last_ack_sent;	/* Also unimpl. on Linux? */
+	uint32_t	tcpi_last_data_recv;	/* Time since last recv data. */
+	uint32_t	__tcpi_last_ack_recv;
+
+	/* Metrics; variable units. */
+	uint32_t	__tcpi_pmtu;
+	uint32_t	__tcpi_rcv_ssthresh;
+	uint32_t	tcpi_rtt;		/* Smoothed RTT in usecs. */
+	uint32_t	tcpi_rttvar;		/* RTT variance in usecs. */
+	uint32_t	tcpi_snd_ssthresh;	/* Slow start threshold. */
+	uint32_t	

CVS commit: src/sys/sys

2015-02-14 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sat Feb 14 12:59:02 UTC 2015

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

Log Message:
Struct tcpcb was extended with three new fields, therefore
welcome to NetBSD 7.99.5.


To generate a diff of this commit:
cvs rdiff -u -r1.464 -r1.465 src/sys/sys/param.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/param.h
diff -u src/sys/sys/param.h:1.464 src/sys/sys/param.h:1.465
--- src/sys/sys/param.h:1.464	Wed Dec 31 19:52:06 2014
+++ src/sys/sys/param.h	Sat Feb 14 12:59:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.464 2014/12/31 19:52:06 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.465 2015/02/14 12:59:02 he Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	799000400	/* NetBSD 7.99.4 */
+#define	__NetBSD_Version__	799000500	/* NetBSD 7.99.5 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)



CVS commit: src/sys/netinet

2015-02-14 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sat Feb 14 22:09:53 UTC 2015

Modified Files:
src/sys/netinet: tcp_var.h

Log Message:
Change the new counter variables in struct tcpcb to uint32_t, as
per christos' comments.


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/sys/netinet/tcp_var.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/netinet/tcp_var.h
diff -u src/sys/netinet/tcp_var.h:1.176 src/sys/netinet/tcp_var.h:1.177
--- src/sys/netinet/tcp_var.h:1.176	Sat Feb 14 12:57:53 2015
+++ src/sys/netinet/tcp_var.h	Sat Feb 14 22:09:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_var.h,v 1.176 2015/02/14 12:57:53 he Exp $	*/
+/*	$NetBSD: tcp_var.h,v 1.177 2015/02/14 22:09:53 he Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -366,9 +366,9 @@ struct tcpcb {
 	u_int	t_msl;			/* MSL to use for this connexion */
 
 	/* maintain a few stats per connection: */
-	int	t_rcvoopack;	 	/* out-of-order packets received */
-	int	t_sndrexmitpack; 	/* retransmit packets sent */
-	int	t_sndzerowin;		/* zero-window updates sent */
+	uint32_t t_rcvoopack;	 	/* out-of-order packets received */
+	uint32_t t_sndrexmitpack; 	/* retransmit packets sent */
+	uint32_t t_sndzerowin;		/* zero-window updates sent */
 };
 
 /*



CVS commit: src/external/bsd/bind/include/isc

2015-01-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Jan  1 15:28:30 UTC 2015

Modified Files:
src/external/bsd/bind/include/isc: platform.h

Log Message:
What ISC wraps under ISC_PLATFORM_HAVEXADD appears to be 32-bit
atomic adds, and I beleive all our platforms can do that.  Therefore,
no need to conditionalize that definition under __HAVE_ATOMIC64_OPS.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/bind/include/isc/platform.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/bsd/bind/include/isc/platform.h
diff -u src/external/bsd/bind/include/isc/platform.h:1.17 src/external/bsd/bind/include/isc/platform.h:1.18
--- src/external/bsd/bind/include/isc/platform.h:1.17	Wed Dec 10 04:38:04 2014
+++ src/external/bsd/bind/include/isc/platform.h	Thu Jan  1 15:28:30 2015
@@ -270,9 +270,7 @@
  * If the xadd operation is available on this architecture,
  * ISC_PLATFORM_HAVEXADD will be defined.
  */
-#ifdef __HAVE_ATOMIC64_OPS
 #define ISC_PLATFORM_HAVEXADD 1
-#endif
 
 /*
  * If the xaddq operation (64bit xadd) is available on this architecture,



CVS commit: [netbsd-6] src/etc/rc.d

2014-12-28 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Dec 28 17:03:16 UTC 2014

Modified Files:
src/etc/rc.d [netbsd-6]: ntpd

Log Message:
The new ntpd wants to translate ntp into a port number after chroot,
so give it its own small copy of /etc/services in the chroot.
[mlelstv, ticket 1223]


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.52.1 src/etc/rc.d/ntpd

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

Modified files:

Index: src/etc/rc.d/ntpd
diff -u src/etc/rc.d/ntpd:1.13 src/etc/rc.d/ntpd:1.13.52.1
--- src/etc/rc.d/ntpd:1.13	Fri Aug 13 18:08:03 2004
+++ src/etc/rc.d/ntpd	Sun Dec 28 17:03:16 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ntpd,v 1.13 2004/08/13 18:08:03 mycroft Exp $
+# $NetBSD: ntpd,v 1.13.52.1 2014/12/28 17:03:16 he Exp $
 #
 
 # PROVIDE: ntpd
@@ -49,6 +49,21 @@ ntpd_precmd()
 	fi
 	ln -fs ${ntpd_chrootdir}/var/db/ntp.drift /var/db/ntp.drift
 
+	if [ ! -d ${ntpd_chrootdir}/etc ]; then
+		mkdir ${ntpd_chrootdir}/etc
+	fi
+	if [ ! -f ${ntpd_chrootdir}/etc/services ]; then
+		getent services ntp/udp ntp/tcp \
+			 ${ntpd_chrootdir}/etc/services
+	fi
+	if [ ! -d ${ntpd_chrootdir}/var/db ]; then
+		mkdir -p ${ntpd_chrootdir}/var/db
+	fi
+	if [ ! -f ${ntpd_chrootdir}/var/db/services.cdb ]; then
+		services_mkdb -o ${ntpd_chrootdir}/var/db/services.cdb \
+			${ntpd_chrootdir}/etc/services
+	fi
+
 	#	Change run_rc_commands()'s internal copy of $ntpd_flags
 	#
 	rc_flags=-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags



CVS commit: [netbsd-6] src/doc

2014-12-28 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Dec 28 17:03:53 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 1223.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.178 -r1.1.2.179 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.178 src/doc/CHANGES-6.2:1.1.2.179
--- src/doc/CHANGES-6.2:1.1.2.178	Fri Dec 26 07:31:42 2014
+++ src/doc/CHANGES-6.2	Sun Dec 28 17:03:52 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.178 2014/12/26 07:31:42 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.179 2014/12/28 17:03:52 he Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -8861,3 +8861,9 @@ external/mit/xorg/server/xorg-server/Mak
 	Fix conversion of SDK_REQUIRED_MODULES which was reported by John
 	D. Baker in PR#49500.
 	[mrg, ticket 1222]
+
+etc/rc.d/ntpd			1.15
+
+	The new ntpd wants to translate ntp into a port number after chroot,
+	so give it its own small copy of /etc/services in the chroot.
+	[mlelstv, ticket 1223]



CVS commit: [netbsd-6-1] src/etc/rc.d

2014-12-28 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Dec 28 17:06:14 UTC 2014

Modified Files:
src/etc/rc.d [netbsd-6-1]: ntpd

Log Message:
The new ntpd wants to translate ntp into a port number after chroot,
so give it its own small copy of /etc/services in the chroot.
[mlelstv, ticket 1223]


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.62.1 src/etc/rc.d/ntpd

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

Modified files:

Index: src/etc/rc.d/ntpd
diff -u src/etc/rc.d/ntpd:1.13 src/etc/rc.d/ntpd:1.13.62.1
--- src/etc/rc.d/ntpd:1.13	Fri Aug 13 18:08:03 2004
+++ src/etc/rc.d/ntpd	Sun Dec 28 17:06:14 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ntpd,v 1.13 2004/08/13 18:08:03 mycroft Exp $
+# $NetBSD: ntpd,v 1.13.62.1 2014/12/28 17:06:14 he Exp $
 #
 
 # PROVIDE: ntpd
@@ -49,6 +49,21 @@ ntpd_precmd()
 	fi
 	ln -fs ${ntpd_chrootdir}/var/db/ntp.drift /var/db/ntp.drift
 
+	if [ ! -d ${ntpd_chrootdir}/etc ]; then
+		mkdir ${ntpd_chrootdir}/etc
+	fi
+	if [ ! -f ${ntpd_chrootdir}/etc/services ]; then
+		getent services ntp/udp ntp/tcp \
+			 ${ntpd_chrootdir}/etc/services
+	fi
+	if [ ! -d ${ntpd_chrootdir}/var/db ]; then
+		mkdir -p ${ntpd_chrootdir}/var/db
+	fi
+	if [ ! -f ${ntpd_chrootdir}/var/db/services.cdb ]; then
+		services_mkdb -o ${ntpd_chrootdir}/var/db/services.cdb \
+			${ntpd_chrootdir}/etc/services
+	fi
+
 	#	Change run_rc_commands()'s internal copy of $ntpd_flags
 	#
 	rc_flags=-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags



CVS commit: [netbsd-6-1] src/doc

2014-12-28 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Dec 28 17:06:36 UTC 2014

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
Ticket 1223.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-6.1.6

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

Modified files:

Index: src/doc/CHANGES-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.21 src/doc/CHANGES-6.1.6:1.1.2.22
--- src/doc/CHANGES-6.1.6:1.1.2.21	Fri Dec 26 05:36:15 2014
+++ src/doc/CHANGES-6.1.6	Sun Dec 28 17:06:36 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.21 2014/12/26 05:36:15 msaitoh Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.22 2014/12/28 17:06:36 he Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -3549,3 +3549,9 @@ lib/Makefile			1.204 via patch
 
 	Update bind to 9.9.6-P1. CVE-2014-8500.
 	[spz, ticket 1217]
+
+etc/rc.d/ntpd			1.15
+
+	The new ntpd wants to translate ntp into a port number after chroot,
+	so give it its own small copy of /etc/services in the chroot.
+	[mlelstv, ticket 1223]



CVS commit: [netbsd-6-0] src/etc/rc.d

2014-12-28 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Dec 28 17:07:26 UTC 2014

Modified Files:
src/etc/rc.d [netbsd-6-0]: ntpd

Log Message:
The new ntpd wants to translate ntp into a port number after chroot,
so give it its own small copy of /etc/services in the chroot.
[mlelstv, ticket 1223]


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.58.1 src/etc/rc.d/ntpd

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

Modified files:

Index: src/etc/rc.d/ntpd
diff -u src/etc/rc.d/ntpd:1.13 src/etc/rc.d/ntpd:1.13.58.1
--- src/etc/rc.d/ntpd:1.13	Fri Aug 13 18:08:03 2004
+++ src/etc/rc.d/ntpd	Sun Dec 28 17:07:26 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ntpd,v 1.13 2004/08/13 18:08:03 mycroft Exp $
+# $NetBSD: ntpd,v 1.13.58.1 2014/12/28 17:07:26 he Exp $
 #
 
 # PROVIDE: ntpd
@@ -49,6 +49,21 @@ ntpd_precmd()
 	fi
 	ln -fs ${ntpd_chrootdir}/var/db/ntp.drift /var/db/ntp.drift
 
+	if [ ! -d ${ntpd_chrootdir}/etc ]; then
+		mkdir ${ntpd_chrootdir}/etc
+	fi
+	if [ ! -f ${ntpd_chrootdir}/etc/services ]; then
+		getent services ntp/udp ntp/tcp \
+			 ${ntpd_chrootdir}/etc/services
+	fi
+	if [ ! -d ${ntpd_chrootdir}/var/db ]; then
+		mkdir -p ${ntpd_chrootdir}/var/db
+	fi
+	if [ ! -f ${ntpd_chrootdir}/var/db/services.cdb ]; then
+		services_mkdb -o ${ntpd_chrootdir}/var/db/services.cdb \
+			${ntpd_chrootdir}/etc/services
+	fi
+
 	#	Change run_rc_commands()'s internal copy of $ntpd_flags
 	#
 	rc_flags=-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags



CVS commit: [netbsd-6-0] src/doc

2014-12-28 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Dec 28 17:07:43 UTC 2014

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
Ticket 1223.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-6.0.7

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

Modified files:

Index: src/doc/CHANGES-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.20 src/doc/CHANGES-6.0.7:1.1.2.21
--- src/doc/CHANGES-6.0.7:1.1.2.20	Thu Dec 25 02:56:18 2014
+++ src/doc/CHANGES-6.0.7	Sun Dec 28 17:07:43 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.20 2014/12/25 02:56:18 snj Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.21 2014/12/28 17:07:43 he Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -1955,3 +1955,8 @@ external/bsd/ntp/scripts/mkver			patch
 	Update ntp to 4.2.8.
 	[christos, ticket #1221]
 
+etc/rc.d/ntpd   1.15
+
+	The new ntpd wants to translate ntp into a port number after chroot,
+	so give it its own small copy of /etc/services in the chroot.
+	[mlelstv, ticket 1223]



CVS commit: [netbsd-5] src

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:19:10 UTC 2014

Modified Files:
src/dist/bind/bin/named [netbsd-5]: config.c query.c server.c
src/dist/bind/lib/dns [netbsd-5]: adb.c resolver.c
src/dist/bind/lib/dns/include/dns [netbsd-5]: adb.h resolver.h
src/dist/bind/lib/export/isc [netbsd-5]: Makefile.in
src/dist/bind/lib/isc [netbsd-5]: Makefile.in
src/dist/bind/lib/isc/include/isc [netbsd-5]: Makefile.in types.h
src/dist/bind/lib/isccfg [netbsd-5]: namedconf.c
src/lib/libisc [netbsd-5]: Makefile
src/usr.sbin/bind [netbsd-5]: Makefile.inc
Added Files:
src/dist/bind/lib/isc [netbsd-5]: counter.c
src/dist/bind/lib/isc/include/isc [netbsd-5]: counter.h

Log Message:
Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
This is a fix for CVE-2014-8500, where a maliciously constructed
setup can cause BIND to issue an unlimited sequence of queries to
follow a delegation.
[spz, ticket #1937]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8.4.4 -r1.1.1.8.4.5 src/dist/bind/bin/named/config.c
cvs rdiff -u -r1.8.4.8 -r1.8.4.9 src/dist/bind/bin/named/query.c
cvs rdiff -u -r1.1.1.9.4.4 -r1.1.1.9.4.5 src/dist/bind/bin/named/server.c
cvs rdiff -u -r1.6.4.4 -r1.6.4.5 src/dist/bind/lib/dns/adb.c
cvs rdiff -u -r1.8.4.6 -r1.8.4.7 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.1.1.5.4.3 -r1.1.1.5.4.4 \
src/dist/bind/lib/dns/include/dns/adb.h
cvs rdiff -u -r1.1.1.5.4.4 -r1.1.1.5.4.5 \
src/dist/bind/lib/dns/include/dns/resolver.h
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/dist/bind/lib/export/isc/Makefile.in
cvs rdiff -u -r1.1.1.6.4.4 -r1.1.1.6.4.5 src/dist/bind/lib/isc/Makefile.in
cvs rdiff -u -r0 -r1.1.2.1 src/dist/bind/lib/isc/counter.c
cvs rdiff -u -r1.1.1.5.4.4 -r1.1.1.5.4.5 \
src/dist/bind/lib/isc/include/isc/Makefile.in \
src/dist/bind/lib/isc/include/isc/types.h
cvs rdiff -u -r0 -r1.1.2.1 src/dist/bind/lib/isc/include/isc/counter.h
cvs rdiff -u -r1.1.1.7.4.4 -r1.1.1.7.4.5 src/dist/bind/lib/isccfg/namedconf.c
cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/lib/libisc/Makefile
cvs rdiff -u -r1.32.4.1 -r1.32.4.2 src/usr.sbin/bind/Makefile.inc

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

Modified files:

Index: src/dist/bind/bin/named/config.c
diff -u src/dist/bind/bin/named/config.c:1.1.1.8.4.4 src/dist/bind/bin/named/config.c:1.1.1.8.4.5
--- src/dist/bind/bin/named/config.c:1.1.1.8.4.4	Wed Jul 25 11:57:23 2012
+++ src/dist/bind/bin/named/config.c	Thu Dec 25 23:19:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.c,v 1.1.1.8.4.4 2012/07/25 11:57:23 jdc Exp $	*/
+/*	$NetBSD: config.c,v 1.1.1.8.4.5 2014/12/25 23:19:09 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. (ISC)
@@ -75,6 +75,8 @@ options {\n\
 	listen-on {any;};\n\
 	listen-on-v6 {none;};\n\
 	match-mapped-addresses no;\n\
+	max-recursion-depth 7;\n\
+	max-recursion-queries 50;\n\
 	memstatistics-file \named.memstats\;\n\
 	multiple-cnames no;\n\
 #	named-xfer obsolete;\n\

Index: src/dist/bind/bin/named/query.c
diff -u src/dist/bind/bin/named/query.c:1.8.4.8 src/dist/bind/bin/named/query.c:1.8.4.9
--- src/dist/bind/bin/named/query.c:1.8.4.8	Wed Jan 15 10:11:20 2014
+++ src/dist/bind/bin/named/query.c	Thu Dec 25 23:19:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.8.4.8 2014/01/15 10:11:20 bouyer Exp $	*/
+/*	$NetBSD: query.c,v 1.8.4.9 2014/12/25 23:19:09 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -3338,11 +3338,11 @@ query_recurse(ns_client_t *client, dns_r
 		peeraddr = client-peeraddr;
 	else
 		peeraddr = NULL;
-	result = dns_resolver_createfetch2(client-view-resolver,
+	result = dns_resolver_createfetch3(client-view-resolver,
 	   client-query.qname,
 	   qtype, qdomain, nameservers,
 	   NULL, peeraddr, client-message-id,
-	   client-query.fetchoptions,
+	   client-query.fetchoptions, 0, NULL,
 	   client-task,
 	   query_resume, client,
 	   rdataset, sigrdataset,

Index: src/dist/bind/bin/named/server.c
diff -u src/dist/bind/bin/named/server.c:1.1.1.9.4.4 src/dist/bind/bin/named/server.c:1.1.1.9.4.5
--- src/dist/bind/bin/named/server.c:1.1.1.9.4.4	Wed Jul 25 11:57:25 2012
+++ src/dist/bind/bin/named/server.c	Thu Dec 25 23:19:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.1.1.9.4.4 2012/07/25 11:57:25 jdc Exp $	*/
+/*	$NetBSD: server.c,v 1.1.1.9.4.5 2014/12/25 23:19:10 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -1837,6 +1837,16 @@ configure_view(dns_view_t *view, cfg_obj
 		udpsize = 4096;
 	dns_resolver_setudpsize(view-resolver, (isc_uint16_t)udpsize);
 
+	obj = NULL;
+	result = ns_config_get(maps, max-recursion-depth, obj);
+	INSIST(result == ISC_R_SUCCESS);
+	dns_resolver_setmaxdepth(view-resolver, cfg_obj_asuint32(obj));
+
+	obj = NULL;
+	result = ns_config_get(maps, max-recursion-queries, obj);
+	

CVS commit: [netbsd-5] src/doc

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:20:19 UTC 2014

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
Ticket 1937.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.88 -r1.1.2.89 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.88 src/doc/CHANGES-5.3:1.1.2.89
--- src/doc/CHANGES-5.3:1.1.2.88	Mon Dec 22 12:57:54 2014
+++ src/doc/CHANGES-5.3	Thu Dec 25 23:20:19 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.88 2014/12/22 12:57:54 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.89 2014/12/25 23:20:19 he Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1278,3 +1278,26 @@ sys/dev/ic/rtl8169.c1.142
 	Force software recalculation of UDP checksum if bad checksum is
 	reported by the hardware.
 	[uwe, ticket #1936]
+
+dist/bind/lib/isc/counter.c			new, via patch
+dist/bind/lib/isc/include/isc/counter.h		new, via patch
+dist/bind/bin/named/config.c			patch
+dist/bind/bin/named/query.c			patch
+dist/bind/bin/named/server.c			patch
+dist/bind/lib/dns/adb.cpatch
+dist/bind/lib/dns/resolver.c			patch
+dist/bind/lib/dns/include/dns/adb.h		patch
+dist/bind/lib/dns/include/dns/resolver.h	patch
+dist/bind/lib/export/isc/Makefile.in		patch
+dist/bind/lib/isc/Makefile.in			patch
+dist/bind/lib/isc/include/isc/Makefile.in	patch
+dist/bind/lib/isc/include/isc/types.h		patch
+dist/bind/lib/isccfg/namedconf.c		patch
+lib/libisc/Makefilepatch
+usr.sbin/bind/Makefile.inc			patch
+
+	Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
+	This is a fix for CVE-2014-8500, where a maliciously constructed
+	setup can cause BIND to issue an unlimited sequence of queries to
+	follow a delegation.
+	[spz, ticket #1937]



CVS commit: [netbsd-5-2] src

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:30:59 UTC 2014

Modified Files:
src/dist/bind/bin/named [netbsd-5-2]: config.c query.c server.c
src/dist/bind/lib/dns [netbsd-5-2]: adb.c resolver.c
src/dist/bind/lib/dns/include/dns [netbsd-5-2]: adb.h resolver.h
src/dist/bind/lib/export/isc [netbsd-5-2]: Makefile.in
src/dist/bind/lib/isc [netbsd-5-2]: Makefile.in
src/dist/bind/lib/isc/include/isc [netbsd-5-2]: Makefile.in types.h
src/dist/bind/lib/isccfg [netbsd-5-2]: namedconf.c
src/lib/libisc [netbsd-5-2]: Makefile
src/usr.sbin/bind [netbsd-5-2]: Makefile.inc
Added Files:
src/dist/bind/lib/isc [netbsd-5-2]: counter.c
src/dist/bind/lib/isc/include/isc [netbsd-5-2]: counter.h

Log Message:
Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
This is a fix for CVE-2014-8500, where a maliciously constructed
setup can cause BIND to issue an unlimited sequence of queries to
follow a delegation.
[spz, ticket #1937]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8.4.4 -r1.1.1.8.4.4.2.1 src/dist/bind/bin/named/config.c
cvs rdiff -u -r1.8.4.7.2.1 -r1.8.4.7.2.2 src/dist/bind/bin/named/query.c
cvs rdiff -u -r1.1.1.9.4.4 -r1.1.1.9.4.4.2.1 src/dist/bind/bin/named/server.c
cvs rdiff -u -r1.6.4.4 -r1.6.4.4.2.1 src/dist/bind/lib/dns/adb.c
cvs rdiff -u -r1.8.4.6 -r1.8.4.6.2.1 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.1.1.5.4.3 -r1.1.1.5.4.3.2.1 \
src/dist/bind/lib/dns/include/dns/adb.h
cvs rdiff -u -r1.1.1.5.4.4 -r1.1.1.5.4.4.2.1 \
src/dist/bind/lib/dns/include/dns/resolver.h
cvs rdiff -u -r1.1.2.3 -r1.1.2.3.2.1 src/dist/bind/lib/export/isc/Makefile.in
cvs rdiff -u -r1.1.1.6.4.4 -r1.1.1.6.4.4.2.1 \
src/dist/bind/lib/isc/Makefile.in
cvs rdiff -u -r0 -r1.1.4.2 src/dist/bind/lib/isc/counter.c
cvs rdiff -u -r1.1.1.5.4.4 -r1.1.1.5.4.4.2.1 \
src/dist/bind/lib/isc/include/isc/Makefile.in \
src/dist/bind/lib/isc/include/isc/types.h
cvs rdiff -u -r0 -r1.1.4.2 src/dist/bind/lib/isc/include/isc/counter.h
cvs rdiff -u -r1.1.1.7.4.4 -r1.1.1.7.4.4.2.1 \
src/dist/bind/lib/isccfg/namedconf.c
cvs rdiff -u -r1.2.4.2 -r1.2.4.2.2.1 src/lib/libisc/Makefile
cvs rdiff -u -r1.32.4.1 -r1.32.4.1.2.1 src/usr.sbin/bind/Makefile.inc

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

Modified files:

Index: src/dist/bind/bin/named/config.c
diff -u src/dist/bind/bin/named/config.c:1.1.1.8.4.4 src/dist/bind/bin/named/config.c:1.1.1.8.4.4.2.1
--- src/dist/bind/bin/named/config.c:1.1.1.8.4.4	Wed Jul 25 11:57:23 2012
+++ src/dist/bind/bin/named/config.c	Thu Dec 25 23:30:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.c,v 1.1.1.8.4.4 2012/07/25 11:57:23 jdc Exp $	*/
+/*	$NetBSD: config.c,v 1.1.1.8.4.4.2.1 2014/12/25 23:30:58 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. (ISC)
@@ -75,6 +75,8 @@ options {\n\
 	listen-on {any;};\n\
 	listen-on-v6 {none;};\n\
 	match-mapped-addresses no;\n\
+	max-recursion-depth 7;\n\
+	max-recursion-queries 50;\n\
 	memstatistics-file \named.memstats\;\n\
 	multiple-cnames no;\n\
 #	named-xfer obsolete;\n\

Index: src/dist/bind/bin/named/query.c
diff -u src/dist/bind/bin/named/query.c:1.8.4.7.2.1 src/dist/bind/bin/named/query.c:1.8.4.7.2.2
--- src/dist/bind/bin/named/query.c:1.8.4.7.2.1	Wed Jan 15 10:11:43 2014
+++ src/dist/bind/bin/named/query.c	Thu Dec 25 23:30:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.8.4.7.2.1 2014/01/15 10:11:43 bouyer Exp $	*/
+/*	$NetBSD: query.c,v 1.8.4.7.2.2 2014/12/25 23:30:58 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -3338,11 +3338,11 @@ query_recurse(ns_client_t *client, dns_r
 		peeraddr = client-peeraddr;
 	else
 		peeraddr = NULL;
-	result = dns_resolver_createfetch2(client-view-resolver,
+	result = dns_resolver_createfetch3(client-view-resolver,
 	   client-query.qname,
 	   qtype, qdomain, nameservers,
 	   NULL, peeraddr, client-message-id,
-	   client-query.fetchoptions,
+	   client-query.fetchoptions, 0, NULL,
 	   client-task,
 	   query_resume, client,
 	   rdataset, sigrdataset,

Index: src/dist/bind/bin/named/server.c
diff -u src/dist/bind/bin/named/server.c:1.1.1.9.4.4 src/dist/bind/bin/named/server.c:1.1.1.9.4.4.2.1
--- src/dist/bind/bin/named/server.c:1.1.1.9.4.4	Wed Jul 25 11:57:25 2012
+++ src/dist/bind/bin/named/server.c	Thu Dec 25 23:30:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.1.1.9.4.4 2012/07/25 11:57:25 jdc Exp $	*/
+/*	$NetBSD: server.c,v 1.1.1.9.4.4.2.1 2014/12/25 23:30:58 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -1837,6 +1837,16 @@ configure_view(dns_view_t *view, cfg_obj
 		udpsize = 4096;
 	dns_resolver_setudpsize(view-resolver, (isc_uint16_t)udpsize);
 
+	obj = NULL;
+	result = ns_config_get(maps, max-recursion-depth, obj);
+	INSIST(result == ISC_R_SUCCESS);
+	

CVS commit: [netbsd-5-2] src/doc

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:31:43 UTC 2014

Modified Files:
src/doc [netbsd-5-2]: CHANGES-5.2.4

Log Message:
Ticket 1937.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-5.2.4

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

Modified files:

Index: src/doc/CHANGES-5.2.4
diff -u src/doc/CHANGES-5.2.4:1.1.2.9 src/doc/CHANGES-5.2.4:1.1.2.10
--- src/doc/CHANGES-5.2.4:1.1.2.9	Mon Dec 22 12:58:13 2014
+++ src/doc/CHANGES-5.2.4	Thu Dec 25 23:31:43 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2.4,v 1.1.2.9 2014/12/22 12:58:13 msaitoh Exp $
+# $NetBSD: CHANGES-5.2.4,v 1.1.2.10 2014/12/25 23:31:43 he Exp $
 
 A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4
 release:
@@ -128,3 +128,25 @@ xsrc/xfree/xc/programs/Xserver/render/re
 	CVE-2013-6424
 	[mrg, ticket #1935]
 
+dist/bind/lib/isc/counter.c new, via patch
+dist/bind/lib/isc/include/isc/counter.h new, via patch
+dist/bind/bin/named/config.cpatch
+dist/bind/bin/named/query.c patch
+dist/bind/bin/named/server.cpatch
+dist/bind/lib/dns/adb.c patch
+dist/bind/lib/dns/resolver.cpatch
+dist/bind/lib/dns/include/dns/adb.h patch
+dist/bind/lib/dns/include/dns/resolver.hpatch
+dist/bind/lib/export/isc/Makefile.inpatch
+dist/bind/lib/isc/Makefile.in   patch
+dist/bind/lib/isc/include/isc/Makefile.in   patch
+dist/bind/lib/isc/include/isc/types.h   patch
+dist/bind/lib/isccfg/namedconf.cpatch
+lib/libisc/Makefile patch
+usr.sbin/bind/Makefile.inc  patch
+
+	Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
+	This is a fix for CVE-2014-8500, where a maliciously constructed
+	setup can cause BIND to issue an unlimited sequence of queries to
+	follow a delegation.
+	[spz, ticket #1937]



CVS commit: [netbsd-5-1] src

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:43:29 UTC 2014

Modified Files:
src/dist/bind/bin/named [netbsd-5-1]: config.c query.c server.c
src/dist/bind/lib/dns [netbsd-5-1]: adb.c resolver.c
src/dist/bind/lib/dns/include/dns [netbsd-5-1]: adb.h resolver.h
src/dist/bind/lib/export/isc [netbsd-5-1]: Makefile.in
src/dist/bind/lib/isc [netbsd-5-1]: Makefile.in
src/dist/bind/lib/isc/include/isc [netbsd-5-1]: Makefile.in types.h
src/dist/bind/lib/isccfg [netbsd-5-1]: namedconf.c
src/lib/libisc [netbsd-5-1]: Makefile
Added Files:
src/dist/bind/lib/isc [netbsd-5-1]: counter.c
src/dist/bind/lib/isc/include/isc [netbsd-5-1]: counter.h

Log Message:
Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
This is a fix for CVE-2014-8500, where a maliciously constructed
setup can cause BIND to issue an unlimited sequence of queries to
follow a delegation.
[spz, ticket #1937]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8.4.1.2.3 -r1.1.1.8.4.1.2.4 \
src/dist/bind/bin/named/config.c
cvs rdiff -u -r1.8.4.2.2.6 -r1.8.4.2.2.7 src/dist/bind/bin/named/query.c
cvs rdiff -u -r1.1.1.9.4.1.2.3 -r1.1.1.9.4.1.2.4 \
src/dist/bind/bin/named/server.c
cvs rdiff -u -r1.6.4.1.2.3 -r1.6.4.1.2.4 src/dist/bind/lib/dns/adb.c
cvs rdiff -u -r1.8.4.2.2.4 -r1.8.4.2.2.5 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.1.1.5.12.3 -r1.1.1.5.12.4 \
src/dist/bind/lib/dns/include/dns/adb.h
cvs rdiff -u -r1.1.1.5.4.1.2.3 -r1.1.1.5.4.1.2.4 \
src/dist/bind/lib/dns/include/dns/resolver.h
cvs rdiff -u -r1.1.4.4 -r1.1.4.5 src/dist/bind/lib/export/isc/Makefile.in
cvs rdiff -u -r1.1.1.6.4.1.2.3 -r1.1.1.6.4.1.2.4 \
src/dist/bind/lib/isc/Makefile.in
cvs rdiff -u -r0 -r1.1.6.2 src/dist/bind/lib/isc/counter.c
cvs rdiff -u -r1.1.1.5.4.1.2.3 -r1.1.1.5.4.1.2.4 \
src/dist/bind/lib/isc/include/isc/Makefile.in \
src/dist/bind/lib/isc/include/isc/types.h
cvs rdiff -u -r0 -r1.1.6.2 src/dist/bind/lib/isc/include/isc/counter.h
cvs rdiff -u -r1.1.1.7.4.1.2.3 -r1.1.1.7.4.1.2.4 \
src/dist/bind/lib/isccfg/namedconf.c
cvs rdiff -u -r1.2.4.1.2.1 -r1.2.4.1.2.2 src/lib/libisc/Makefile

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

Modified files:

Index: src/dist/bind/bin/named/config.c
diff -u src/dist/bind/bin/named/config.c:1.1.1.8.4.1.2.3 src/dist/bind/bin/named/config.c:1.1.1.8.4.1.2.4
--- src/dist/bind/bin/named/config.c:1.1.1.8.4.1.2.3	Wed Jul 25 12:09:57 2012
+++ src/dist/bind/bin/named/config.c	Thu Dec 25 23:43:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.c,v 1.1.1.8.4.1.2.3 2012/07/25 12:09:57 jdc Exp $	*/
+/*	$NetBSD: config.c,v 1.1.1.8.4.1.2.4 2014/12/25 23:43:29 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. (ISC)
@@ -75,6 +75,8 @@ options {\n\
 	listen-on {any;};\n\
 	listen-on-v6 {none;};\n\
 	match-mapped-addresses no;\n\
+	max-recursion-depth 7;\n\
+	max-recursion-queries 50;\n\
 	memstatistics-file \named.memstats\;\n\
 	multiple-cnames no;\n\
 #	named-xfer obsolete;\n\

Index: src/dist/bind/bin/named/query.c
diff -u src/dist/bind/bin/named/query.c:1.8.4.2.2.6 src/dist/bind/bin/named/query.c:1.8.4.2.2.7
--- src/dist/bind/bin/named/query.c:1.8.4.2.2.6	Wed Jan 15 10:11:37 2014
+++ src/dist/bind/bin/named/query.c	Thu Dec 25 23:43:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.8.4.2.2.6 2014/01/15 10:11:37 bouyer Exp $	*/
+/*	$NetBSD: query.c,v 1.8.4.2.2.7 2014/12/25 23:43:29 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -3338,11 +3338,11 @@ query_recurse(ns_client_t *client, dns_r
 		peeraddr = client-peeraddr;
 	else
 		peeraddr = NULL;
-	result = dns_resolver_createfetch2(client-view-resolver,
+	result = dns_resolver_createfetch3(client-view-resolver,
 	   client-query.qname,
 	   qtype, qdomain, nameservers,
 	   NULL, peeraddr, client-message-id,
-	   client-query.fetchoptions,
+	   client-query.fetchoptions, 0, NULL,
 	   client-task,
 	   query_resume, client,
 	   rdataset, sigrdataset,

Index: src/dist/bind/bin/named/server.c
diff -u src/dist/bind/bin/named/server.c:1.1.1.9.4.1.2.3 src/dist/bind/bin/named/server.c:1.1.1.9.4.1.2.4
--- src/dist/bind/bin/named/server.c:1.1.1.9.4.1.2.3	Wed Jul 25 12:10:02 2012
+++ src/dist/bind/bin/named/server.c	Thu Dec 25 23:43:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.1.1.9.4.1.2.3 2012/07/25 12:10:02 jdc Exp $	*/
+/*	$NetBSD: server.c,v 1.1.1.9.4.1.2.4 2014/12/25 23:43:29 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -1837,6 +1837,16 @@ configure_view(dns_view_t *view, cfg_obj
 		udpsize = 4096;
 	dns_resolver_setudpsize(view-resolver, (isc_uint16_t)udpsize);
 
+	obj = NULL;
+	result = ns_config_get(maps, max-recursion-depth, obj);
+	INSIST(result == ISC_R_SUCCESS);
+	dns_resolver_setmaxdepth(view-resolver, cfg_obj_asuint32(obj));
+
+	obj 

CVS commit: [netbsd-5-1] src/doc

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:46:18 UTC 2014

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.6

Log Message:
Ticket 1937.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-5.1.6

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

Modified files:

Index: src/doc/CHANGES-5.1.6
diff -u src/doc/CHANGES-5.1.6:1.1.2.9 src/doc/CHANGES-5.1.6:1.1.2.10
--- src/doc/CHANGES-5.1.6:1.1.2.9	Mon Dec 22 12:58:36 2014
+++ src/doc/CHANGES-5.1.6	Thu Dec 25 23:46:18 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.6,v 1.1.2.9 2014/12/22 12:58:36 msaitoh Exp $
+# $NetBSD: CHANGES-5.1.6,v 1.1.2.10 2014/12/25 23:46:18 he Exp $
 
 A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6
 release:
@@ -127,3 +127,26 @@ xsrc/xfree/xc/programs/Xserver/render/re
 	the check properly.
 	CVE-2013-6424
 	[mrg, ticket #1935]
+
+dist/bind/lib/isc/counter.c			new, via patch
+dist/bind/lib/isc/include/isc/counter.h		new, via patch
+dist/bind/bin/named/config.c			patch
+dist/bind/bin/named/query.c			patch
+dist/bind/bin/named/server.c			patch
+dist/bind/lib/dns/adb.cpatch
+dist/bind/lib/dns/resolver.c			patch
+dist/bind/lib/dns/include/dns/adb.h		patch
+dist/bind/lib/dns/include/dns/resolver.h	patch
+dist/bind/lib/export/isc/Makefile.in		patch
+dist/bind/lib/isc/Makefile.in			patch
+dist/bind/lib/isc/include/isc/Makefile.in	patch
+dist/bind/lib/isc/include/isc/types.h		patch
+dist/bind/lib/isccfg/namedconf.c		patch
+lib/libisc/Makefilepatch
+usr.sbin/bind/Makefile.inc			patch
+
+	Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
+	This is a fix for CVE-2014-8500, where a maliciously constructed
+	setup can cause BIND to issue an unlimited sequence of queries to
+	follow a delegation.
+	[spz, ticket #1937]



CVS commit: [netbsd-5-0] src

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:52:00 UTC 2014

Modified Files:
src/dist/bind/bin/named [netbsd-5-0]: config.c query.c server.c
src/dist/bind/lib/dns [netbsd-5-0]: adb.c resolver.c
src/dist/bind/lib/dns/include/dns [netbsd-5-0]: adb.h resolver.h
src/dist/bind/lib/export/isc [netbsd-5-0]: Makefile.in
src/dist/bind/lib/isc [netbsd-5-0]: Makefile.in
src/dist/bind/lib/isc/include/isc [netbsd-5-0]: Makefile.in types.h
src/dist/bind/lib/isccfg [netbsd-5-0]: namedconf.c
src/lib/libisc [netbsd-5-0]: Makefile
src/usr.sbin/bind [netbsd-5-0]: Makefile.inc
Added Files:
src/dist/bind/lib/isc [netbsd-5-0]: counter.c
src/dist/bind/lib/isc/include/isc [netbsd-5-0]: counter.h

Log Message:
Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
This is a fix for CVE-2014-8500, where a maliciously constructed
setup can cause BIND to issue an unlimited sequence of queries to
follow a delegation.
[spz, ticket #1937]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8.8.4 -r1.1.1.8.8.5 src/dist/bind/bin/named/config.c
cvs rdiff -u -r1.8.8.7 -r1.8.8.8 src/dist/bind/bin/named/query.c
cvs rdiff -u -r1.1.1.9.8.4 -r1.1.1.9.8.5 src/dist/bind/bin/named/server.c
cvs rdiff -u -r1.6.8.4 -r1.6.8.5 src/dist/bind/lib/dns/adb.c
cvs rdiff -u -r1.8.8.6 -r1.8.8.7 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.1.1.5.8.3 -r1.1.1.5.8.4 \
src/dist/bind/lib/dns/include/dns/adb.h
cvs rdiff -u -r1.1.1.5.8.4 -r1.1.1.5.8.5 \
src/dist/bind/lib/dns/include/dns/resolver.h
cvs rdiff -u -r1.1.6.4 -r1.1.6.5 src/dist/bind/lib/export/isc/Makefile.in
cvs rdiff -u -r1.1.1.6.8.4 -r1.1.1.6.8.5 src/dist/bind/lib/isc/Makefile.in
cvs rdiff -u -r0 -r1.1.8.2 src/dist/bind/lib/isc/counter.c
cvs rdiff -u -r1.1.1.5.8.4 -r1.1.1.5.8.5 \
src/dist/bind/lib/isc/include/isc/Makefile.in \
src/dist/bind/lib/isc/include/isc/types.h
cvs rdiff -u -r0 -r1.1.8.2 src/dist/bind/lib/isc/include/isc/counter.h
cvs rdiff -u -r1.1.1.7.8.4 -r1.1.1.7.8.5 src/dist/bind/lib/isccfg/namedconf.c
cvs rdiff -u -r1.2.8.2 -r1.2.8.3 src/lib/libisc/Makefile
cvs rdiff -u -r1.32.8.1 -r1.32.8.2 src/usr.sbin/bind/Makefile.inc

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

Modified files:

Index: src/dist/bind/bin/named/config.c
diff -u src/dist/bind/bin/named/config.c:1.1.1.8.8.4 src/dist/bind/bin/named/config.c:1.1.1.8.8.5
--- src/dist/bind/bin/named/config.c:1.1.1.8.8.4	Wed Jul 25 12:02:49 2012
+++ src/dist/bind/bin/named/config.c	Thu Dec 25 23:51:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.c,v 1.1.1.8.8.4 2012/07/25 12:02:49 jdc Exp $	*/
+/*	$NetBSD: config.c,v 1.1.1.8.8.5 2014/12/25 23:51:59 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. (ISC)
@@ -75,6 +75,8 @@ options {\n\
 	listen-on {any;};\n\
 	listen-on-v6 {none;};\n\
 	match-mapped-addresses no;\n\
+	max-recursion-depth 7;\n\
+	max-recursion-queries 50;\n\
 	memstatistics-file \named.memstats\;\n\
 	multiple-cnames no;\n\
 #	named-xfer obsolete;\n\

Index: src/dist/bind/bin/named/query.c
diff -u src/dist/bind/bin/named/query.c:1.8.8.7 src/dist/bind/bin/named/query.c:1.8.8.8
--- src/dist/bind/bin/named/query.c:1.8.8.7	Wed Oct 17 20:50:14 2012
+++ src/dist/bind/bin/named/query.c	Thu Dec 25 23:51:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.8.8.7 2012/10/17 20:50:14 bouyer Exp $	*/
+/*	$NetBSD: query.c,v 1.8.8.8 2014/12/25 23:51:59 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -3338,11 +3338,11 @@ query_recurse(ns_client_t *client, dns_r
 		peeraddr = client-peeraddr;
 	else
 		peeraddr = NULL;
-	result = dns_resolver_createfetch2(client-view-resolver,
+	result = dns_resolver_createfetch3(client-view-resolver,
 	   client-query.qname,
 	   qtype, qdomain, nameservers,
 	   NULL, peeraddr, client-message-id,
-	   client-query.fetchoptions,
+	   client-query.fetchoptions, 0, NULL,
 	   client-task,
 	   query_resume, client,
 	   rdataset, sigrdataset,

Index: src/dist/bind/bin/named/server.c
diff -u src/dist/bind/bin/named/server.c:1.1.1.9.8.4 src/dist/bind/bin/named/server.c:1.1.1.9.8.5
--- src/dist/bind/bin/named/server.c:1.1.1.9.8.4	Wed Jul 25 12:02:52 2012
+++ src/dist/bind/bin/named/server.c	Thu Dec 25 23:51:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.1.1.9.8.4 2012/07/25 12:02:52 jdc Exp $	*/
+/*	$NetBSD: server.c,v 1.1.1.9.8.5 2014/12/25 23:51:59 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -1837,6 +1837,16 @@ configure_view(dns_view_t *view, cfg_obj
 		udpsize = 4096;
 	dns_resolver_setudpsize(view-resolver, (isc_uint16_t)udpsize);
 
+	obj = NULL;
+	result = ns_config_get(maps, max-recursion-depth, obj);
+	INSIST(result == ISC_R_SUCCESS);
+	dns_resolver_setmaxdepth(view-resolver, cfg_obj_asuint32(obj));
+
+	obj = NULL;
+	result = ns_config_get(maps, 

CVS commit: [netbsd-5-0] src/doc

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:54:07 UTC 2014

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.3

Log Message:
Ticket 1937.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.93 -r1.1.2.94 src/doc/CHANGES-5.0.3

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

Modified files:

Index: src/doc/CHANGES-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.93 src/doc/CHANGES-5.0.3:1.1.2.94
--- src/doc/CHANGES-5.0.3:1.1.2.93	Mon Jan 21 20:22:18 2013
+++ src/doc/CHANGES-5.0.3	Thu Dec 25 23:54:07 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.93 2013/01/21 20:22:18 bouyer Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.94 2014/12/25 23:54:07 he Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -5252,3 +5252,25 @@ sys/external/bsd/ipf/netinet/ip_fil_netb
 	Fix off-by-one read error.
 	[msaitoh, ticket #1840]
 
+dist/bind/lib/isc/counter.c			new, via patch
+dist/bind/lib/isc/include/isc/counter.h		new, via patch
+dist/bind/bin/named/config.c			patch
+dist/bind/bin/named/query.c			patch
+dist/bind/bin/named/server.c			patch
+dist/bind/lib/dns/adb.cpatch
+dist/bind/lib/dns/resolver.c			patch
+dist/bind/lib/dns/include/dns/adb.h		patch
+dist/bind/lib/dns/include/dns/resolver.h	patch
+dist/bind/lib/export/isc/Makefile.in		patch
+dist/bind/lib/isc/Makefile.in			patch
+dist/bind/lib/isc/include/isc/Makefile.in	patch
+dist/bind/lib/isc/include/isc/types.h		patch
+dist/bind/lib/isccfg/namedconf.c		patch
+lib/libisc/Makefilepatch
+usr.sbin/bind/Makefile.inc			patch
+
+	Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
+	This is a fix for CVE-2014-8500, where a maliciously constructed
+	setup can cause BIND to issue an unlimited sequence of queries to
+	follow a delegation.
+	[spz, ticket #1937]



CVS commit: [netbsd-5-1] src/usr.sbin/bind

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:57:50 UTC 2014

Modified Files:
src/usr.sbin/bind [netbsd-5-1]: Makefile.inc

Log Message:
Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
This is a fix for CVE-2014-8500, where a maliciously constructed
setup can cause BIND to issue an unlimited sequence of queries to
follow a delegation.
[spz, ticket #1937]


To generate a diff of this commit:
cvs rdiff -u -r1.32.12.1 -r1.32.12.2 src/usr.sbin/bind/Makefile.inc

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

Modified files:

Index: src/usr.sbin/bind/Makefile.inc
diff -u src/usr.sbin/bind/Makefile.inc:1.32.12.1 src/usr.sbin/bind/Makefile.inc:1.32.12.2
--- src/usr.sbin/bind/Makefile.inc:1.32.12.1	Sun Jan  9 20:43:30 2011
+++ src/usr.sbin/bind/Makefile.inc	Thu Dec 25 23:57:50 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.32.12.1 2011/01/09 20:43:30 riz Exp $
+#	$NetBSD: Makefile.inc,v 1.32.12.2 2014/12/25 23:57:50 he Exp $
 
 .if !defined(BIND9_MAKEFILE_INC)
 BIND9_MAKEFILE_INC=yes
@@ -23,7 +23,10 @@ BIND_HTMLDIR=	/usr/share/doc/html/bind9
 
 .include ${IDIST}/version
 
-VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
+# Packager suffix, for local patches past end of support from ISC
+PSUFFIX=nb5
+
+VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}${PSUFFIX}
 SYSCONFDIR=/etc
 LOCALSTATEDIR=/var
 



CVS commit: src/sys/fs/puffs

2014-10-07 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Oct  7 11:37:07 UTC 2014

Modified Files:
src/sys/fs/puffs: puffs_vnops.c

Log Message:
As is evidenced by several of our 32-bit MIPS ports, it's wrong to
print vsize_t with PRIx64 -- instead use our own PRIxVSIZE macro.


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/fs/puffs/puffs_vnops.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/fs/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.192 src/sys/fs/puffs/puffs_vnops.c:1.193
--- src/sys/fs/puffs/puffs_vnops.c:1.192	Mon Oct  6 14:26:44 2014
+++ src/sys/fs/puffs/puffs_vnops.c	Tue Oct  7 11:37:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.192 2014/10/06 14:26:44 he Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.193 2014/10/07 11:37:06 he Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.192 2014/10/06 14:26:44 he Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.193 2014/10/07 11:37:06 he Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -1160,8 +1160,8 @@ zerofill_lastpage(struct vnode *vp, voff
 	error = ubc_uiomove(vp-v_uobj, uio, len,
 			UVM_ADV_SEQUENTIAL, UBC_WRITE|UBC_UNMAP_FLAG(vp));
 	if (error) {
-		DPRINTF((zero-fill 0x%lx@0x% PRIx64  failed: error = %d\n,
-			 len, off, error));
+		DPRINTF((zero-fill 0x%lx@0x% PRIxVSIZE 
+			  failed: error = %d\n, len, off, error));
 	}
 
 	return;



CVS commit: src/sys/fs/puffs

2014-10-07 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Oct  7 12:58:10 UTC 2014

Modified Files:
src/sys/fs/puffs: puffs_vnops.c

Log Message:
Do the previous correctly...


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/fs/puffs/puffs_vnops.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/fs/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.193 src/sys/fs/puffs/puffs_vnops.c:1.194
--- src/sys/fs/puffs/puffs_vnops.c:1.193	Tue Oct  7 11:37:06 2014
+++ src/sys/fs/puffs/puffs_vnops.c	Tue Oct  7 12:58:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.193 2014/10/07 11:37:06 he Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.194 2014/10/07 12:58:09 he Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.193 2014/10/07 11:37:06 he Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.194 2014/10/07 12:58:09 he Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -1160,7 +1160,7 @@ zerofill_lastpage(struct vnode *vp, voff
 	error = ubc_uiomove(vp-v_uobj, uio, len,
 			UVM_ADV_SEQUENTIAL, UBC_WRITE|UBC_UNMAP_FLAG(vp));
 	if (error) {
-		DPRINTF((zero-fill 0x%lx@0x% PRIxVSIZE 
+		DPRINTF((zero-fill 0x% PRIxVSIZE @0x% PRIx64 
 			  failed: error = %d\n, len, off, error));
 	}
 



CVS commit: src/sys/fs/puffs

2014-10-06 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Oct  6 14:26:44 UTC 2014

Modified Files:
src/sys/fs/puffs: puffs_vnops.c

Log Message:
Make this build again without debugging enabled; DPRINTF() can end up
as empty, and in an if conditional, you then need braces if that's the
only potential body.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/fs/puffs/puffs_vnops.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/fs/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.191 src/sys/fs/puffs/puffs_vnops.c:1.192
--- src/sys/fs/puffs/puffs_vnops.c:1.191	Mon Oct  6 09:05:55 2014
+++ src/sys/fs/puffs/puffs_vnops.c	Mon Oct  6 14:26:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.191 2014/10/06 09:05:55 manu Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.192 2014/10/06 14:26:44 he Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.191 2014/10/06 09:05:55 manu Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.192 2014/10/06 14:26:44 he Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -1159,9 +1159,10 @@ zerofill_lastpage(struct vnode *vp, voff
 
 	error = ubc_uiomove(vp-v_uobj, uio, len,
 			UVM_ADV_SEQUENTIAL, UBC_WRITE|UBC_UNMAP_FLAG(vp));
-	if (error)
+	if (error) {
 		DPRINTF((zero-fill 0x%lx@0x% PRIx64  failed: error = %d\n,
 			 len, off, error));
+	}
 
 	return;
 }



CVS commit: src/lib/libc

2014-09-24 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Sep 24 07:53:07 UTC 2014

Modified Files:
src/lib/libc/gen: getcap.c
src/lib/libc/hash: hashhl.c
src/lib/libc/md: mdXhl.c

Log Message:
Provide a backward-compatible conditional define of O_CLOEXEC
for those systems which lack it, since these files are used in
tools builds.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/lib/libc/gen/getcap.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/hash/hashhl.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/md/mdXhl.c

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

Modified files:

Index: src/lib/libc/gen/getcap.c
diff -u src/lib/libc/gen/getcap.c:1.54 src/lib/libc/gen/getcap.c:1.55
--- src/lib/libc/gen/getcap.c:1.54	Thu Sep 18 13:58:20 2014
+++ src/lib/libc/gen/getcap.c	Wed Sep 24 07:53:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: getcap.c,v 1.54 2014/09/18 13:58:20 christos Exp $	*/
+/*	$NetBSD: getcap.c,v 1.55 2014/09/24 07:53:06 he Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = @(#)getcap.c	8.3 (Berkeley) 3/25/94;
 #else
-__RCSID($NetBSD: getcap.c,v 1.54 2014/09/18 13:58:20 christos Exp $);
+__RCSID($NetBSD: getcap.c,v 1.55 2014/09/24 07:53:06 he Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -65,6 +65,10 @@ __RCSID($NetBSD: getcap.c,v 1.54 2014/0
 #include string.h
 #include unistd.h
 
+#ifndef O_CLOEXEC /* For tools, as in NetBSD 5.2 or earlier... */
+#define O_CLOEXEC 0
+#endif
+
 #if defined(__weak_alias)  !defined(SMALL)
 __weak_alias(cgetcap,_cgetcap)
 __weak_alias(cgetclose,_cgetclose)

Index: src/lib/libc/hash/hashhl.c
diff -u src/lib/libc/hash/hashhl.c:1.5 src/lib/libc/hash/hashhl.c:1.6
--- src/lib/libc/hash/hashhl.c:1.5	Thu Sep 18 13:58:20 2014
+++ src/lib/libc/hash/hashhl.c	Wed Sep 24 07:53:06 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: hashhl.c,v 1.5 2014/09/18 13:58:20 christos Exp $ */
+/* $NetBSD: hashhl.c,v 1.6 2014/09/24 07:53:06 he Exp $ */
 
 /*
  * 
@@ -60,6 +60,9 @@ WA(FNPREFIX(Data),CONCAT(_,FNPREFIX(Data
 #define	MIN(x,y)	((x)(y)?(x):(y))
 #endif /* !MIN */
 
+#ifndef O_CLOEXEC /* For tools, as in NetBSD 5.2 or earlier... */
+#define O_CLOEXEC 0 
+#endif
 
 char *
 FNPREFIX(End)(HASH_CTX *ctx, char *buf)

Index: src/lib/libc/md/mdXhl.c
diff -u src/lib/libc/md/mdXhl.c:1.11 src/lib/libc/md/mdXhl.c:1.12
--- src/lib/libc/md/mdXhl.c:1.11	Thu Sep 18 13:58:20 2014
+++ src/lib/libc/md/mdXhl.c	Wed Sep 24 07:53:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mdXhl.c,v 1.11 2014/09/18 13:58:20 christos Exp $	*/
+/*	$NetBSD: mdXhl.c,v 1.12 2014/09/24 07:53:07 he Exp $	*/
 
 /*
  * 
@@ -42,6 +42,9 @@ WA(MDNAME(Data),CONCAT(_,MDNAME(Data)))
 #include stdlib.h
 #include unistd.h
 
+#ifndef O_CLOEXEC /* For tools, as in NetBSD 5.2 or earlier... */
+#define O_CLOEXEC 0
+#endif
 
 
 char *



CVS commit: src/sys/ufs/chfs

2014-09-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Sep  1 16:27:38 UTC 2014

Modified Files:
src/sys/ufs/chfs: chfs_scan.c

Log Message:
Plug leak in chfs_scan_eraseblock() of the allocated buffer.
Make sure to release it both on success and failure returns.
OK'ed by ttoth@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/ufs/chfs/chfs_scan.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/ufs/chfs/chfs_scan.c
diff -u src/sys/ufs/chfs/chfs_scan.c:1.4 src/sys/ufs/chfs/chfs_scan.c:1.5
--- src/sys/ufs/chfs/chfs_scan.c:1.4	Fri Oct 19 12:44:39 2012
+++ src/sys/ufs/chfs/chfs_scan.c	Mon Sep  1 16:27:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_scan.c,v 1.4 2012/10/19 12:44:39 ttoth Exp $	*/
+/*	$NetBSD: chfs_scan.c,v 1.5 2014/09/01 16:27:38 he Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -443,15 +443,15 @@ chfs_scan_eraseblock(struct chfs_mount *
 		memset(buf, 0 , CHFS_MAX_NODE_SIZE);
 		err = chfs_read_leb(chmp,
 		lnr, buf, ofs, CHFS_NODE_HDR_SIZE, retlen);
-		if (err) {
-			return err;
-		}
+		if (err)
+			goto err_return;
 
 		if (retlen != CHFS_NODE_HDR_SIZE) {
 			chfs_err(Error reading node header: 
 			read: %zu instead of: %zu\n,
 			CHFS_NODE_HDR_SIZE, retlen);
-			return EIO;
+			err = EIO;
+			goto err_return;
 		}
 
 		/* first we check if the buffer we read is full with 0xff, if yes maybe
@@ -476,9 +476,8 @@ chfs_scan_eraseblock(struct chfs_mount *
 		if (err) {
 			dbg(node hdr error\n);
 			err = chfs_update_eb_dirty(chmp, cheb, 4);
-			if (err) {
-return err;
-			}
+			if (err)
+goto err_return;
 
 			ofs += 4;
 			continue;
@@ -486,7 +485,8 @@ chfs_scan_eraseblock(struct chfs_mount *
 		ofs += CHFS_NODE_HDR_SIZE;
 		if (ofs  chmp-chm_ebh-eb_size) {
 			chfs_err(Second part of node is on the next eraseblock.\n);
-			return EIO;
+			err = EIO;
+			goto err_return;
 		}
 		switch (le16toh(nhdr-type)) {
 		case CHFS_NODETYPE_VNODE:
@@ -496,21 +496,20 @@ chfs_scan_eraseblock(struct chfs_mount *
 			err = chfs_read_leb(chmp,
 			lnr, buf + CHFS_NODE_HDR_SIZE,
 			ofs, len,  retlen);
-			if (err) {
-return err;
-			}
+			if (err)
+goto err_return;
 
 			if (retlen != len) {
 chfs_err(Error reading vnode: read: %zu instead of: %zu\n,
 len, retlen);
-return EIO;
+err = EIO;
+goto err_return;
 			}
 			KASSERT(lnr == cheb-lnr);
 			err = chfs_scan_check_vnode(chmp,
 			cheb, buf, ofs - CHFS_NODE_HDR_SIZE);
-			if (err) {
-return err;
-			}
+			if (err)
+goto err_return;
 
 			break;
 		case CHFS_NODETYPE_DIRENT:
@@ -521,23 +520,22 @@ chfs_scan_eraseblock(struct chfs_mount *
 			err = chfs_read_leb(chmp,
 			lnr, buf + CHFS_NODE_HDR_SIZE,
 			ofs, len, retlen);
-			if (err) {
-return err;
-			}
+			if (err)
+goto err_return;
 
 			if (retlen != len) {
 chfs_err(Error reading dirent node: read: %zu 
 instead of: %zu\n, len, retlen);
-return EIO;
+err = EIO;
+goto err_return;
 			}
 
 			KASSERT(lnr == cheb-lnr);
 
 			err = chfs_scan_check_dirent_node(chmp,
 			cheb, buf, ofs - CHFS_NODE_HDR_SIZE);
-			if (err) {
-return err;
-			}
+			if (err)
+goto err_return;
 
 			break;
 		case CHFS_NODETYPE_DATA:
@@ -547,20 +545,20 @@ chfs_scan_eraseblock(struct chfs_mount *
 			err = chfs_read_leb(chmp,
 			lnr, buf + CHFS_NODE_HDR_SIZE,
 			ofs, len, retlen);
-			if (err) {
-return err;
-			}
+			if (err)
+goto err_return;
 
 			if (retlen != len) {
 chfs_err(Error reading data node: read: %zu 
 instead of: %zu\n, len, retlen);
-return EIO;
+err = EIO;
+goto err_return;
 			}
 			KASSERT(lnr == cheb-lnr);
 			err = chfs_scan_check_data_node(chmp,
 			cheb, buf, ofs - CHFS_NODE_HDR_SIZE);
 			if (err)
-return err;
+goto err_return;
 
 			break;
 		case CHFS_NODETYPE_PADDING:
@@ -573,7 +571,7 @@ chfs_scan_eraseblock(struct chfs_mount *
 			err = chfs_update_eb_dirty(chmp, cheb,
 			le32toh(nhdr-length));
 			if (err)
-return err;
+goto err_return;
 
 			break;
 		default:
@@ -581,7 +579,7 @@ chfs_scan_eraseblock(struct chfs_mount *
 			err = chfs_update_eb_dirty(chmp, cheb,
 			le32toh(nhdr-length));
 			if (err)
-return err;
+goto err_return;
 
 			break;
 		}
@@ -591,5 +589,9 @@ chfs_scan_eraseblock(struct chfs_mount *
 	KASSERT(cheb-used_size + cheb-free_size + cheb-dirty_size +
 	cheb-unchecked_size + cheb-wasted_size == chmp-chm_ebh-eb_size);
 
-	return chfs_scan_classify_cheb(chmp, cheb);
+	err = chfs_scan_classify_cheb(chmp, cheb);
+	/* FALLTHROUGH */
+err_return:
+	kmem_free(buf, CHFS_MAX_NODE_SIZE);
+	return err;
 }



CVS commit: src/sys/ufs/chfs

2014-09-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Sep  1 16:31:17 UTC 2014

Modified Files:
src/sys/ufs/chfs: chfs_readinode.c

Log Message:
Plug memory leak in a corner case in chfs_get_data_nodes().


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/ufs/chfs/chfs_readinode.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/ufs/chfs/chfs_readinode.c
diff -u src/sys/ufs/chfs/chfs_readinode.c:1.8 src/sys/ufs/chfs/chfs_readinode.c:1.9
--- src/sys/ufs/chfs/chfs_readinode.c:1.8	Sun Oct 20 17:18:38 2013
+++ src/sys/ufs/chfs/chfs_readinode.c	Mon Sep  1 16:31:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_readinode.c,v 1.8 2013/10/20 17:18:38 christos Exp $	*/
+/*	$NetBSD: chfs_readinode.c,v 1.9 2014/09/01 16:31:17 he Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -801,8 +801,10 @@ chfs_get_data_nodes(struct chfs_mount *c
 	buf = kmem_alloc(len, KM_SLEEP);
 
 	dnode = kmem_alloc(len, KM_SLEEP);
-	if (!dnode)
+	if (!dnode) {
+		kmem_free(buf, len);
 		return ENOMEM;
+	}
 
 	nref = chfs_first_valid_data_ref(ip-chvc-dnode);
 



CVS commit: src/sys/ufs/chfs

2014-09-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Sep  1 16:33:20 UTC 2014

Modified Files:
src/sys/ufs/chfs: chfs_vnode.c

Log Message:
Plug memory leaks in error returns in chfs_readvnode().


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/ufs/chfs/chfs_vnode.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/ufs/chfs/chfs_vnode.c
diff -u src/sys/ufs/chfs/chfs_vnode.c:1.10 src/sys/ufs/chfs/chfs_vnode.c:1.11
--- src/sys/ufs/chfs/chfs_vnode.c:1.10	Thu Jan 23 10:13:57 2014
+++ src/sys/ufs/chfs/chfs_vnode.c	Mon Sep  1 16:33:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_vnode.c,v 1.10 2014/01/23 10:13:57 hannken Exp $	*/
+/*	$NetBSD: chfs_vnode.c,v 1.11 2014/09/01 16:33:20 he Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -94,11 +94,14 @@ chfs_readvnode(struct mount *mp, ino_t i
 		buf = kmem_alloc(len, KM_SLEEP);
 		err = chfs_read_leb(chmp, chvc-v-nref_lnr, buf,
 		CHFS_GET_OFS(chvc-v-nref_offset), len, retlen);
-		if (err)
+		if (err) {
+			kmem_free(buf, len);
 			return err;
+		}
 		if (retlen != len) {
 			chfs_err(Error reading vnode: read: %zu insted of: %zu\n,
 			len, retlen);
+			kmem_free(buf, len);
 			return EIO;
 		}
 		chfvn = (struct chfs_flash_vnode*)buf;



CVS commit: src/sys/ufs/chfs

2014-09-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Sep  1 16:46:56 UTC 2014

Modified Files:
src/sys/ufs/chfs: chfs_gc.c

Log Message:
Plug memory leak in error returns and normal operation in
chfs_gcollect_pristine().


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/chfs/chfs_gc.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/ufs/chfs/chfs_gc.c
diff -u src/sys/ufs/chfs/chfs_gc.c:1.5 src/sys/ufs/chfs/chfs_gc.c:1.6
--- src/sys/ufs/chfs/chfs_gc.c:1.5	Sun Oct 20 17:18:38 2013
+++ src/sys/ufs/chfs/chfs_gc.c	Mon Sep  1 16:46:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_gc.c,v 1.5 2013/10/20 17:18:38 christos Exp $	*/
+/*	$NetBSD: chfs_gc.c,v 1.6 2014/09/01 16:46:56 he Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -726,23 +726,26 @@ chfs_gcollect_pristine(struct chfs_mount
 	ret = chfs_read_leb(chmp, nref-nref_lnr, data, ofs, totlen, retlen);
 	if (ret) {
 		dbg_gc(reading error\n);
-		return ret;
+		goto err_out;
 	}
 	if (retlen != totlen) {
 		dbg_gc(read size error\n);
-		return EIO;
+		ret = EIO;
+		goto err_out;
 	}
 	nhdr = (struct chfs_flash_node_hdr *)data;
 
 	/* Check the header. */
 	if (le16toh(nhdr-magic) != CHFS_FS_MAGIC_BITMASK) {
 		dbg_gc(node header magic number error\n);
-		return EBADF;
+		ret = EBADF;
+		goto err_out;
 	}
 	crc = crc32(0, (uint8_t *)nhdr, CHFS_NODE_HDR_SIZE - 4);
 	if (crc != le32toh(nhdr-hdr_crc)) {
 		dbg_gc(node header crc error\n);
-		return EBADF;
+		ret = EBADF;
+		goto err_out;
 	}
 
 	/* Read the remaining parts. */
@@ -753,7 +756,8 @@ chfs_gcollect_pristine(struct chfs_mount
 	crc = crc32(0, (uint8_t *)fvnode, sizeof(struct chfs_flash_vnode) - 4);
 	if (crc != le32toh(fvnode-node_crc)) {
 dbg_gc(vnode crc error\n);
-return EBADF;
+ret = EBADF;
+goto err_out;
 			}
 			break;
 case CHFS_NODETYPE_DIRENT:
@@ -762,12 +766,14 @@ chfs_gcollect_pristine(struct chfs_mount
 	crc = crc32(0, (uint8_t *)fdirent, sizeof(struct chfs_flash_dirent_node) - 4);
 	if (crc != le32toh(fdirent-node_crc)) {
 dbg_gc(dirent crc error\n);
-return EBADF;
+ret = EBADF;
+goto err_out;
 			}
 	crc = crc32(0, fdirent-name, fdirent-nsize);
 	if (crc != le32toh(fdirent-name_crc)) {
 dbg_gc(dirent name crc error\n);
-return EBADF;
+ret = EBADF;
+goto err_out;
 			}
 			break;
 case CHFS_NODETYPE_DATA:
@@ -776,25 +782,29 @@ chfs_gcollect_pristine(struct chfs_mount
 	crc = crc32(0, (uint8_t *)fdata, sizeof(struct chfs_flash_data_node) - 4);
 	if (crc != le32toh(fdata-node_crc)) {
 dbg_gc(data node crc error\n);
-return EBADF;
+ret = EBADF;
+goto err_out;
 			}
 			break;
 default:
 		/* unknown node */
 			if (chvc) {
 dbg_gc(unknown node have vnode cache\n);
-return EBADF;
+ret = EBADF;
+goto err_out;
 			}
 	}
 	/* CRC's OK, write node to its new place */
 retry:
 	ret = chfs_reserve_space_gc(chmp, totlen);
 	if (ret)
-		return ret;
+		goto err_out;
 
 	newnref = chfs_alloc_node_ref(chmp-chm_nextblock);
-	if (!newnref)
-		return ENOMEM;
+	if (!newnref) {
+		ret = ENOMEM;
+		goto err_out;
+	}
 
 	ofs = chmp-chm_ebh-eb_size - chmp-chm_nextblock-free_size;
 	newnref-nref_offset = ofs;
@@ -814,7 +824,8 @@ retry:
 		chfs_change_size_dirty(chmp, chmp-chm_nextblock, totlen);
 		if (retries) {
 			mutex_exit(chmp-chm_lock_sizes);
-			return EIO;
+			ret = EIO;
+			goto err_out;
 		}
 
 		/* try again */
@@ -829,7 +840,11 @@ retry:
 	mutex_enter(chmp-chm_lock_vnocache);
 	chfs_add_vnode_ref_to_vc(chmp, chvc, newnref);
 	mutex_exit(chmp-chm_lock_vnocache);
-	return 0;
+	ret = 0;
+	/* FALLTHROUGH */
+err_out:
+	kmem_free(data, totlen);
+	return ret;
 }
 
 



CVS commit: src/sys/ufs/chfs

2014-09-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Sep  1 16:48:42 UTC 2014

Modified Files:
src/sys/ufs/chfs: ebh.c

Log Message:
Plug memory leak in add_peb_to_free() and add_peb_to_in_use()
in case there's a duplicate in the tree.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/chfs/ebh.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/ufs/chfs/ebh.c
diff -u src/sys/ufs/chfs/ebh.c:1.3 src/sys/ufs/chfs/ebh.c:1.4
--- src/sys/ufs/chfs/ebh.c:1.3	Fri Aug 10 09:26:58 2012
+++ src/sys/ufs/chfs/ebh.c	Mon Sep  1 16:48:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ebh.c,v 1.3 2012/08/10 09:26:58 ttoth Exp $	*/
+/*	$NetBSD: ebh.c,v 1.4 2014/09/01 16:48:42 he Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -828,8 +828,10 @@ add_peb_to_free(struct chfs_ebh *ebh, in
 	peb-erase_cnt = ec;
 	peb-pebnr = pebnr;
 	result = RB_INSERT(peb_free_rbtree, ebh-free, peb);
-	if (result)
+	if (result) {
+		kmem_free(peb, sizeof(struct chfs_peb));
 		return 1;
+	}
 
 	return 0;
 }
@@ -856,8 +858,10 @@ add_peb_to_in_use(struct chfs_ebh *ebh, 
 	peb-erase_cnt = ec;
 	peb-pebnr = pebnr;
 	result = RB_INSERT(peb_in_use_rbtree, ebh-in_use, peb);
-	if (result)
+	if (result) {
+		kmem_free(peb, sizeof(struct chfs_peb));
 		return 1;
+	}
 
 	return 0;
 }



CVS commit: src/sys/dev/if_ndis

2014-09-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Sep  1 19:46:55 UTC 2014

Modified Files:
src/sys/dev/if_ndis: if_ndis_pci.c

Log Message:
Remove redundant test for rl == NULL, that's already established
right after its allocation, and rl isn't re-assigned later.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/if_ndis/if_ndis_pci.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/if_ndis/if_ndis_pci.c
diff -u src/sys/dev/if_ndis/if_ndis_pci.c:1.19 src/sys/dev/if_ndis/if_ndis_pci.c:1.20
--- src/sys/dev/if_ndis/if_ndis_pci.c:1.19	Sat Oct 27 17:18:23 2012
+++ src/sys/dev/if_ndis/if_ndis_pci.c	Mon Sep  1 19:46:55 2014
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ndis_pci.c,v 1.19 2012/10/27 17:18:23 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ndis_pci.c,v 1.20 2014/09/01 19:46:55 he Exp $);
 #ifdef __FreeBSD__
 __FBSDID($FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.8.2.3 2005/03/31 04:24:36 wpaul Exp $);
 #endif
@@ -358,11 +358,6 @@ void ndis_attach_pci(device_t parent, de
 	
 	printf(pci interrupt: %s\n, pci_intr_string(pa-pa_pc, ih));
 	
-	if(rl == NULL) {
-		sc-error = ENOMEM;
-		return;
-	}
-	
 	/* save resource list in the softc */
 	sc-ndis_rl = rl;
 	sc-ndis_rescnt = rl-cprl_count;



CVS commit: src/tests/dev/md

2014-06-09 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Jun  9 18:22:05 UTC 2014

Modified Files:
src/tests/dev/md: Makefile

Log Message:
When linking statically (as for sun2), need to list -lrump also
after -lrumpuser, because rump_pub_lwproc_switch is used in the
latter and defined in the former.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/dev/md/Makefile

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

Modified files:

Index: src/tests/dev/md/Makefile
diff -u src/tests/dev/md/Makefile:1.3 src/tests/dev/md/Makefile:1.4
--- src/tests/dev/md/Makefile:1.3	Sun Dec  2 18:39:53 2012
+++ src/tests/dev/md/Makefile	Mon Jun  9 18:22:05 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2012/12/02 18:39:53 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.4 2014/06/09 18:22:05 he Exp $
 #
 
 .include bsd.own.mk
@@ -16,6 +16,7 @@ PROGS=		h_mdserv
 LDADD+=	-lrumpdev_md -lrumpdev_disk -lrumpdev -lrumpvfs
 LDADD+=	-lrump
 LDADD+=	-lrumpuser
+LDADD+=	-lrump
 LDADD+=	-lpthread
 
 WARNS=	4



CVS commit: src/tests

2014-06-09 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Jun 10 04:28:40 UTC 2014

Modified Files:
src/tests/dev/scsipi: Makefile
src/tests/dev/sysmon: Makefile
src/tests/fs/kernfs: Makefile
src/tests/fs/nfs: Makefile
src/tests/fs/nullfs: Makefile
src/tests/fs/ptyfs: Makefile
src/tests/fs/puffs: Makefile
src/tests/fs/umapfs: Makefile
src/tests/fs/union: Makefile
src/tests/kernel: Makefile
src/tests/kernel/tty: Makefile
src/tests/lib/libc/sys: Makefile
src/tests/lib/semaphore/pthread: Makefile
src/tests/libexec: Makefile
src/tests/modules: Makefile
src/tests/net/bpf: Makefile
src/tests/net/bpfilter: Makefile
src/tests/net/carp: Makefile
src/tests/net/icmp: Makefile
src/tests/net/if: Makefile
src/tests/net/if_loop: Makefile
src/tests/net/net: Makefile
src/tests/rump/rumpkern: Makefile
src/tests/rump/rumpkern/h_server: Makefile
src/tests/rump/rumpvfs: Makefile

Log Message:
Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser.  Fixes build for sun2.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/dev/scsipi/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tests/dev/sysmon/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/kernfs/Makefile
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/nfs/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/nullfs/Makefile
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/ptyfs/Makefile
cvs rdiff -u -r1.13 -r1.14 src/tests/fs/puffs/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/umapfs/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/union/Makefile
cvs rdiff -u -r1.33 -r1.34 src/tests/kernel/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/kernel/tty/Makefile
cvs rdiff -u -r1.34 -r1.35 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/semaphore/pthread/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/libexec/Makefile
cvs rdiff -u -r1.10 -r1.11 src/tests/modules/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/net/bpf/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/net/bpfilter/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/net/carp/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/net/icmp/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/net/if/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/net/if_loop/Makefile
cvs rdiff -u -r1.7 -r1.8 src/tests/net/net/Makefile
cvs rdiff -u -r1.14 -r1.15 src/tests/rump/rumpkern/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/rump/rumpkern/h_server/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/rump/rumpvfs/Makefile

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

Modified files:

Index: src/tests/dev/scsipi/Makefile
diff -u src/tests/dev/scsipi/Makefile:1.5 src/tests/dev/scsipi/Makefile:1.6
--- src/tests/dev/scsipi/Makefile:1.5	Fri Apr 25 00:24:39 2014
+++ src/tests/dev/scsipi/Makefile	Tue Jun 10 04:28:39 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2014/04/25 00:24:39 pooka Exp $
+#	$NetBSD: Makefile,v 1.6 2014/06/10 04:28:39 he Exp $
 #
 
 .include bsd.own.mk
@@ -18,6 +18,7 @@ LDADD+=	-Wl,--whole-archive -lrumpdev_sc
 LDADD+= -lrumpdev_scsipi -lrumpdev_disk -lrumpdev -lrumpvfs
 LDADD+=	-lrump -lutil
 LDADD+=	-lrumpuser -lpthread
+LDADD+= -lrump
 
 WARNS=	4
 

Index: src/tests/dev/sysmon/Makefile
diff -u src/tests/dev/sysmon/Makefile:1.2 src/tests/dev/sysmon/Makefile:1.3
--- src/tests/dev/sysmon/Makefile:1.2	Mon Dec 20 04:56:18 2010
+++ src/tests/dev/sysmon/Makefile	Tue Jun 10 04:28:39 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2010/12/20 04:56:18 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.3 2014/06/10 04:28:39 he Exp $
 #
 
 .include bsd.own.mk
@@ -9,7 +9,9 @@ TESTS_C=	t_swwdog
 
 LDADD+=	-lrumpdev_sysmon -lrumpdev -lrumpvfs
 LDADD+=	-lrump
-LDADD+=	-lrumpuser -lpthread
+LDADD+=	-lrumpuser
+LDADD+=	-lrump
+LDADD+=	-lpthread
 
 WARNS=	4
 

Index: src/tests/fs/kernfs/Makefile
diff -u src/tests/fs/kernfs/Makefile:1.3 src/tests/fs/kernfs/Makefile:1.4
--- src/tests/fs/kernfs/Makefile:1.3	Tue Jun  8 10:43:40 2010
+++ src/tests/fs/kernfs/Makefile	Tue Jun 10 04:28:39 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2010/06/08 10:43:40 pooka Exp $
+#	$NetBSD: Makefile,v 1.4 2014/06/10 04:28:39 he Exp $
 #
 
 TESTSDIR=	${TESTSBASE}/fs/kernfs
@@ -9,6 +9,6 @@ TESTS_C=	t_basic
 .include bsd.own.mk
 
 LDADD+=	-lrumpfs_kernfs		# fs driver
-LDADD+=	-lrumpvfs -lrump -lrumpuser -lpthread			# base
+LDADD+=	-lrumpvfs -lrump -lrumpuser -lrump -lpthread		# base
 
 .include bsd.test.mk

Index: src/tests/fs/nfs/Makefile
diff -u src/tests/fs/nfs/Makefile:1.8 src/tests/fs/nfs/Makefile:1.9
--- src/tests/fs/nfs/Makefile:1.8	Fri Feb 24 13:53:46 2012
+++ src/tests/fs/nfs/Makefile	Tue Jun 10 04:28:39 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2012/02/24 13:53:46 joerg Exp $
+#	$NetBSD: Makefile,v 1.9 2014/06/10 04:28:39 he Exp $
 #
 
 .include bsd.own.mk
@@ -22,7 +22,7 @@ 

CVS commit: src/sys/arch/mipsco/mipsco

2014-06-08 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Jun  8 07:01:30 UTC 2014

Modified Files:
src/sys/arch/mipsco/mipsco: machdep.c

Log Message:
Kill a pair of set-but-not-used local variables.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/mipsco/mipsco/machdep.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/arch/mipsco/mipsco/machdep.c
diff -u src/sys/arch/mipsco/mipsco/machdep.c:1.77 src/sys/arch/mipsco/mipsco/machdep.c:1.78
--- src/sys/arch/mipsco/mipsco/machdep.c:1.77	Mon Mar 24 20:06:32 2014
+++ src/sys/arch/mipsco/mipsco/machdep.c	Sun Jun  8 07:01:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.77 2014/03/24 20:06:32 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.78 2014/06/08 07:01:30 he Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.77 2014/03/24 20:06:32 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.78 2014/06/08 07:01:30 he Exp $);
 
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 
@@ -183,7 +183,6 @@ mach_init(int argc, char *argv[], char *
 	extern char edata[], end[];
 	const char *bi_msg;
 #if NKSYMS || defined(DDB) || defined(MODULAR)
-	int nsym = 0;
 	char *ssym = 0;
 	char *esym = 0;
 	struct btinfo_symtab *bi_syms;
@@ -218,7 +217,6 @@ mach_init(int argc, char *argv[], char *
 
 	/* Load sysmbol table if present */
 	if (bi_syms != NULL) {
-		nsym = bi_syms-nsym;
 		ssym = (void *)bi_syms-ssym;
 		esym = (void *)bi_syms-esym;
 		kernend = (void *)mips_round_page(esym);
@@ -591,9 +589,7 @@ null_cnpollc(dev_t dev, int on)
 void
 consinit(void)
 {
-	int zs_unit;
 
-	zs_unit = 0;
 	cn_tab = consdev_zs;
 
 	(*cn_tab-cn_init)(cn_tab);



CVS commit: src/sys/arch/mipsco/obio

2014-06-08 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Jun  8 10:40:52 UTC 2014

Modified Files:
src/sys/arch/mipsco/obio: zs.c

Log Message:
Move the rest of real_bps handling in under #if 0, so
that we don't get set-but-not-used warnings from the compiler.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/mipsco/obio/zs.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/arch/mipsco/obio/zs.c
diff -u src/sys/arch/mipsco/obio/zs.c:1.24 src/sys/arch/mipsco/obio/zs.c:1.25
--- src/sys/arch/mipsco/obio/zs.c:1.24	Fri Jun 13 12:25:37 2008
+++ src/sys/arch/mipsco/obio/zs.c	Sun Jun  8 10:40:52 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.24 2008/06/13 12:25:37 cegger Exp $	*/
+/*	$NetBSD: zs.c,v 1.25 2014/06/08 10:40:52 he Exp $	*/
 
 /*-
  * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.24 2008/06/13 12:25:37 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.25 2014/06/08 10:40:52 he Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -393,7 +393,10 @@ zs_get_speed(struct zs_chanstate *cs)
 int
 zs_set_speed(struct zs_chanstate *cs, int bps)
 {
-	int tconst, real_bps;
+	int tconst;
+#if 0
+	int real_bps;
+#endif
 
 #if 0
 	while (!(zs_read_csr(cs)  ZSRR0_TX_READY))
@@ -413,11 +416,11 @@ zs_set_speed(struct zs_chanstate *cs, in
 	if (tconst  0)
 		return (EINVAL);
 
+#if 0
 	/* Convert back to make sure we can do it. */
 	real_bps = TCONST_TO_BPS(cs-cs_brg_clk, tconst);
 
 	/* XXX - Allow some tolerance here? */
-#if 0
 	if (real_bps != bps)
 		return (EINVAL);
 #endif



CVS commit: src/sys/net

2014-06-07 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sat Jun  7 13:25:33 UTC 2014

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

Log Message:
Include netinet/in.h before netinet/in_var.h to avoid build failure
for the COMPUTEX7750 kernel of evbsh3-eb.
Also, don't reference ip_pktq if INET isn't defined (found by the same
kernel).


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.277 src/sys/net/if.c:1.278
--- src/sys/net/if.c:1.277	Fri Jun  6 01:02:47 2014
+++ src/sys/net/if.c	Sat Jun  7 13:25:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.277 2014/06/06 01:02:47 rmind Exp $	*/
+/*	$NetBSD: if.c,v 1.278 2014/06/07 13:25:33 he Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.277 2014/06/06 01:02:47 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.278 2014/06/07 13:25:33 he Exp $);
 
 #include opt_inet.h
 
@@ -130,10 +130,10 @@ __KERNEL_RCSID(0, $NetBSD: if.c,v 1.277
 #include netatalk/at.h
 #endif
 #include net/pfil.h
+#include netinet/in.h
 #include netinet/in_var.h
 
 #ifdef INET6
-#include netinet/in.h
 #include netinet6/in6_var.h
 #include netinet6/nd6.h
 #endif
@@ -872,7 +872,9 @@ again:
 	 * ensures that the packets are dequeued while a cross-call will
 	 * ensure that the interrupts have completed. FIXME: not quite..
 	 */
+#ifdef INET
 	pktq_barrier(ip_pktq);
+#endif
 	xc = xc_broadcast(0, (xcfunc_t)nullop, NULL, NULL);
 	xc_wait(xc);
 



CVS commit: src/sys/arch/hpcmips/tx

2014-06-07 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sat Jun  7 18:59:16 UTC 2014

Modified Files:
src/sys/arch/hpcmips/tx: tx3912video.c

Log Message:
Remove set-but-not-used variable bit8.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hpcmips/tx/tx3912video.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/arch/hpcmips/tx/tx3912video.c
diff -u src/sys/arch/hpcmips/tx/tx3912video.c:1.42 src/sys/arch/hpcmips/tx/tx3912video.c:1.43
--- src/sys/arch/hpcmips/tx/tx3912video.c:1.42	Sat Oct 27 17:17:54 2012
+++ src/sys/arch/hpcmips/tx/tx3912video.c	Sat Jun  7 18:59:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx3912video.c,v 1.42 2012/10/27 17:17:54 chs Exp $ */
+/*	$NetBSD: tx3912video.c,v 1.43 2014/06/07 18:59:16 he Exp $ */
 
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tx3912video.c,v 1.42 2012/10/27 17:17:54 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: tx3912video.c,v 1.43 2014/06/07 18:59:16 he Exp $);
 
 #define TX3912VIDEO_DEBUG
 
@@ -434,7 +434,7 @@ tx3912video_framebuffer_init(struct vide
 void
 tx3912video_resolution_init(struct video_chip *chip)
 {
-	int h, v, split, bit8, horzval, lineval;
+	int h, v, split, horzval, lineval;
 	tx_chipset_tag_t tc = chip-vc_v;
 	txreg_t reg;
 	u_int32_t val;
@@ -443,8 +443,6 @@ tx3912video_resolution_init(struct video
 	v = chip-vc_fbheight;
 	reg = tx_conf_read(tc, TX3912_VIDEOCTRL1_REG);
 	split = reg  TX3912_VIDEOCTRL1_DISPSPLIT;
-	bit8  = (TX3912_VIDEOCTRL1_BITSEL(reg) == 
-	TX3912_VIDEOCTRL1_BITSEL_8BITCOLOR);
 	val = TX3912_VIDEOCTRL1_BITSEL(reg);
 
 	if ((val == TX3912_VIDEOCTRL1_BITSEL_8BITCOLOR)  !split) {



CVS commit: src/libexec/httpd

2013-10-16 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Oct 16 10:04:26 UTC 2013

Modified Files:
src/libexec/httpd: Makefile

Log Message:
Also depend on LIBLUA, and add -lm to allow static linking.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/libexec/httpd/Makefile

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

Modified files:

Index: src/libexec/httpd/Makefile
diff -u src/libexec/httpd/Makefile:1.16 src/libexec/httpd/Makefile:1.17
--- src/libexec/httpd/Makefile:1.16	Sat Oct 12 17:24:06 2013
+++ src/libexec/httpd/Makefile	Wed Oct 16 10:04:26 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2013/10/12 17:24:06 mbalmer Exp $
+#	$NetBSD: Makefile,v 1.17 2013/10/16 10:04:26 he Exp $
 #
 #	$eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
 #
@@ -27,8 +27,8 @@ SRCS=	bozohttpd.c ssl-bozo.c auth-bozo.c
 	tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c
 SRCS+=	main.c
 
-LDADD=	-lcrypt -llua
-DPADD=	${LIBCRYPT}
+LDADD=	-lcrypt -llua -lm
+DPADD=	${LIBCRYPT} ${LIBLUA} ${LIBM}
 
 WARNS?=	4
 



CVS commit: src/distrib/sgimips/instkernel

2013-08-31 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sat Aug 31 10:42:18 UTC 2013

Modified Files:
src/distrib/sgimips/instkernel: Makefile

Log Message:
Bump the image size so that the contents fits again.  Kernel (at
least INSTALL32_IP3x) has big enough area already.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/sgimips/instkernel/Makefile

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

Modified files:

Index: src/distrib/sgimips/instkernel/Makefile
diff -u src/distrib/sgimips/instkernel/Makefile:1.10 src/distrib/sgimips/instkernel/Makefile:1.11
--- src/distrib/sgimips/instkernel/Makefile:1.10	Sat Feb  4 22:27:25 2012
+++ src/distrib/sgimips/instkernel/Makefile	Sat Aug 31 10:42:18 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2012/02/04 22:27:25 he Exp $
+#	$NetBSD: Makefile,v 1.11 2013/08/31 10:42:18 he Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -16,7 +16,7 @@ LISTS=		${.CURDIR}/list64
 .endif
 
 IMAGE=		diskimage
-IMAGESIZE=	3800k
+IMAGESIZE=	4000k
 MTREECONF=	${DISTRIBDIR}/common/mtree.dot
 IMAGEENDIAN=	be
 



CVS commit: src

2013-08-26 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Aug 26 07:14:59 UTC 2013

Modified Files:
src/distrib/acorn26/instkernel: Makefile
src/sys/arch/acorn26/conf: INSTALL

Log Message:
Bump the ramdisk image size so that the contents fits again.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/acorn26/instkernel/Makefile
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/acorn26/conf/INSTALL

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

Modified files:

Index: src/distrib/acorn26/instkernel/Makefile
diff -u src/distrib/acorn26/instkernel/Makefile:1.15 src/distrib/acorn26/instkernel/Makefile:1.16
--- src/distrib/acorn26/instkernel/Makefile:1.15	Thu Feb 11 09:06:47 2010
+++ src/distrib/acorn26/instkernel/Makefile	Mon Aug 26 07:14:59 2013
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.15 2010/02/11 09:06:47 roy Exp $
+#	$NetBSD: Makefile,v 1.16 2013/08/26 07:14:59 he Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	1924k
+IMAGESIZE=	2112k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1

Index: src/sys/arch/acorn26/conf/INSTALL
diff -u src/sys/arch/acorn26/conf/INSTALL:1.42 src/sys/arch/acorn26/conf/INSTALL:1.43
--- src/sys/arch/acorn26/conf/INSTALL:1.42	Sun Jun 30 21:38:55 2013
+++ src/sys/arch/acorn26/conf/INSTALL	Mon Aug 26 07:14:59 2013
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.42 2013/06/30 21:38:55 rmind Exp $
+# $NetBSD: INSTALL,v 1.43 2013/08/26 07:14:59 he Exp $
 
 # INSTALL configuration, used to generate installation media
 
@@ -106,7 +106,7 @@ options		PIPE_SOCKETPAIR	# smaller, but 
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# force root on memory disk
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
-options 	MEMORY_DISK_ROOT_SIZE=4096 # size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=4224 # size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 # WS console uses DUMB, SUN or VT100 terminal emulation



CVS commit: src

2013-08-08 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Aug  8 13:21:38 UTC 2013

Modified Files:
src/distrib/arc/ramdisk: Makefile
src/sys/arch/arc/conf: RAMDISK

Log Message:
Bump RAMDISK size so that the contents fits again.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/arc/ramdisk/Makefile
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/arc/conf/RAMDISK

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

Modified files:

Index: src/distrib/arc/ramdisk/Makefile
diff -u src/distrib/arc/ramdisk/Makefile:1.21 src/distrib/arc/ramdisk/Makefile:1.22
--- src/distrib/arc/ramdisk/Makefile:1.21	Thu Feb 11 09:06:47 2010
+++ src/distrib/arc/ramdisk/Makefile	Thu Aug  8 13:21:38 2013
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.21 2010/02/11 09:06:47 roy Exp $
+#	$NetBSD: Makefile,v 1.22 2013/08/08 13:21:38 he Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2560k
+IMAGESIZE=	2660k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1

Index: src/sys/arch/arc/conf/RAMDISK
diff -u src/sys/arch/arc/conf/RAMDISK:1.80 src/sys/arch/arc/conf/RAMDISK:1.81
--- src/sys/arch/arc/conf/RAMDISK:1.80	Sat Mar 10 21:51:49 2012
+++ src/sys/arch/arc/conf/RAMDISK	Thu Aug  8 13:21:38 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: RAMDISK,v 1.80 2012/03/10 21:51:49 joerg Exp $
+#	$NetBSD: RAMDISK,v 1.81 2013/08/08 13:21:38 he Exp $
 #
 #	memory disk based configuration file for MIPS R4x00 ARC Systems
 #
@@ -9,7 +9,7 @@ include		arch/arc/conf/GENERIC
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT		# force root on memory disk
 options 	MEMORY_DISK_SERVER=0		# no userspace md(4) support
-options 	MEMORY_DISK_ROOT_SIZE=5120	# size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=5420	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 makeoptions	COPTS=-Os -mmemcpy	# generates smaller code than -O2, -O1



CVS commit: src/sys/arch/i386/stand

2013-07-28 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Jul 28 08:50:09 UTC 2013

Modified Files:
src/sys/arch/i386/stand/boot: boot2.c
src/sys/arch/i386/stand/lib: bootmenu.c bootmenu.h

Log Message:
Two changes for the i386 boot loader related to the boot menu which
can be defined in boot.cfg:

 * Add a menu command which re-displays the menu and initiates
   the timed countdown
 * Use any default command defined in boot.cfg as default args
   if the user runs boot with no arguments

This is useful in circumstances where you e.g. need to interrupt
the normal boot process to switch to serial console, and where
simply boot netbsd is no longer sufficient (e.g. as with install
media which needs the miniroot kernel module loaded).


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/i386/stand/boot/boot2.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/stand/lib/bootmenu.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/lib/bootmenu.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/arch/i386/stand/boot/boot2.c
diff -u src/sys/arch/i386/stand/boot/boot2.c:1.58 src/sys/arch/i386/stand/boot/boot2.c:1.59
--- src/sys/arch/i386/stand/boot/boot2.c:1.58	Sat Aug  4 03:51:27 2012
+++ src/sys/arch/i386/stand/boot/boot2.c	Sun Jul 28 08:50:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot2.c,v 1.58 2012/08/04 03:51:27 riastradh Exp $	*/
+/*	$NetBSD: boot2.c,v 1.59 2013/07/28 08:50:09 he Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -120,6 +120,9 @@ void	command_quit(char *);
 void	command_boot(char *);
 void	command_dev(char *);
 void	command_consdev(char *);
+#ifndef SMALL
+void	command_menu(char *);
+#endif
 void	command_modules(char *);
 void	command_multiboot(char *);
 
@@ -131,6 +134,9 @@ const struct bootblk_command commands[] 
 	{ boot,	command_boot },
 	{ dev,	command_dev },
 	{ consdev,	command_consdev },
+#ifndef SMALL
+	{ menu,	command_menu },
+#endif
 	{ modules,	command_modules },
 	{ load,	module_add },
 	{ multiboot,	command_multiboot },
@@ -394,6 +400,9 @@ command_help(char *arg)
 	   dev xd[N[x]]:\n
 	   consdev {pc|com[0123]|com[0123]kbd|auto}\n
 	   vesa {modenum|on|off|enabled|disabled|list}\n
+#ifndef SMALL
+	   menu (reenters boot menu, if defined in boot.cfg)\n
+#endif
 	   modules {on|off|enabled|disabled}\n
 	   load {path_to_module}\n
 	   multiboot [xdNx:][filename] [args]\n
@@ -439,6 +448,10 @@ command_boot(char *arg)
 		bootit(filename, howto, tell);
 	} else {
 		int i;
+
+#ifndef SMALL
+		bootdefault();
+#endif
 		for (i = 0; i  NUMNAMES; i++) {
 			bootit(names[i][0], howto, tell);
 			bootit(names[i][1], howto, tell);
@@ -504,6 +517,21 @@ command_consdev(char *arg)
 	printf(invalid console device.\n);
 }
 
+#ifndef SMALL
+/* ARGSUSED */
+void
+command_menu(char *arg)
+{
+
+	if (bootconf.nummenu  0) {
+		/* Does not return */
+		doboottypemenu();
+	} else {
+		printf(No menu defined in boot.cfg\n);
+	}
+}
+#endif /* !SMALL */
+
 void
 command_modules(char *arg)
 {

Index: src/sys/arch/i386/stand/lib/bootmenu.c
diff -u src/sys/arch/i386/stand/lib/bootmenu.c:1.10 src/sys/arch/i386/stand/lib/bootmenu.c:1.11
--- src/sys/arch/i386/stand/lib/bootmenu.c:1.10	Thu Aug 18 13:20:04 2011
+++ src/sys/arch/i386/stand/lib/bootmenu.c	Sun Jul 28 08:50:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootmenu.c,v 1.10 2011/08/18 13:20:04 christos Exp $	*/
+/*	$NetBSD: bootmenu.c,v 1.11 2013/07/28 08:50:09 he Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -41,6 +41,8 @@
 
 #define isnum(c) ((c) = '0'  (c) = '9')
 
+static void docommandchoice(int);
+
 extern struct x86_boot_params boot_params;
 extern	const char bootprog_name[], bootprog_rev[], bootprog_kernrev[];
 
@@ -297,11 +299,57 @@ getchoicefrominput(char *input, int def)
 	return choice;
 }
 
+static void
+docommandchoice(int choice)
+{
+	char input[80], *ic, *oc;
+
+	ic = bootconf.command[choice];
+	/* Split command string at ; into separate commands */
+	do {
+		oc = input;
+		/* Look for ; separator */
+		for (; *ic  *ic != COMMAND_SEPARATOR; ic++)
+			*oc++ = *ic;
+		if (*input == '\0')
+			continue;
+		/* Strip out any trailing spaces */
+		oc--;
+		for (; *oc == ' '  oc  input; oc--);
+		*++oc = '\0';
+		if (*ic == COMMAND_SEPARATOR)
+			ic++;
+		/* Stop silly command strings like ;;; */
+		if (*input != '\0')
+			docommand(input);
+		/* Skip leading spaces */
+		for (; *ic == ' '; ic++);
+	} while (*ic);
+}
+
+void
+bootdefault(void)
+{
+	int choice;
+	static int entered;
+
+	if (bootconf.nummenu  0) {
+		if (entered) {
+			printf(default boot twice, skipping...\n);
+			return;
+		}
+		entered = 1;
+		choice = bootconf.def;
+		printf(command(s): %s\n, bootconf.command[choice]);
+		docommandchoice(choice);
+	}
+}
+
 void
 doboottypemenu(void)
 {
 	int choice;
-	char input[80], *ic, *oc;
+	char input[80];
 
 	printf(\n);
 	/* Display menu */
@@ 

CVS commit: src

2013-06-28 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Jun 28 19:24:29 UTC 2013

Modified Files:
src/distrib/zaurus/ramdisk: Makefile
src/sys/arch/zaurus/conf: INSTALL

Log Message:
Bump the INSTALL ramdisk by 100k so that the contents fits again.
Approved by nonaka@


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/zaurus/ramdisk/Makefile
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/zaurus/conf/INSTALL

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

Modified files:

Index: src/distrib/zaurus/ramdisk/Makefile
diff -u src/distrib/zaurus/ramdisk/Makefile:1.15 src/distrib/zaurus/ramdisk/Makefile:1.16
--- src/distrib/zaurus/ramdisk/Makefile:1.15	Sat Apr  7 09:10:47 2012
+++ src/distrib/zaurus/ramdisk/Makefile	Fri Jun 28 19:24:29 2013
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.15 2012/04/07 09:10:47 nonaka Exp $
+#	$NetBSD: Makefile,v 1.16 2013/06/28 19:24:29 he Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2112k
+IMAGESIZE=	2212k
 MAKEFS_FLAGS=	-f 14
 
 WARNS=		1

Index: src/sys/arch/zaurus/conf/INSTALL
diff -u src/sys/arch/zaurus/conf/INSTALL:1.18 src/sys/arch/zaurus/conf/INSTALL:1.19
--- src/sys/arch/zaurus/conf/INSTALL:1.18	Wed Oct 17 14:49:02 2012
+++ src/sys/arch/zaurus/conf/INSTALL	Fri Jun 28 19:24:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.18 2012/10/17 14:49:02 apb Exp $
+# $NetBSD: INSTALL,v 1.19 2013/06/28 19:24:28 he Exp $
 #
 # INSTALL config file (GENERIC with memory disk root)
 #
@@ -9,7 +9,7 @@ include 	arch/zaurus/conf/GENERIC
 options 	MEMORY_DISK_HOOKS	# enable root ramdisk
 options 	MEMORY_DISK_IS_ROOT	# force root on memory disk
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
-options 	MEMORY_DISK_ROOT_SIZE=4224	# size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=4424	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 # for reduce kernel size.



CVS commit: src/distrib/utils/sysinst

2013-03-23 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sat Mar 23 11:50:03 UTC 2013

Modified Files:
src/distrib/utils/sysinst: util.c
src/distrib/utils/sysinst/arch/evbarm: md.h msg.md.de msg.md.en
msg.md.es msg.md.fr msg.md.pl

Log Message:
Add the ability to install the KUROBOX_PRO kernel.
Adds the ability to handle 9 different kernel sets (was 8).


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/distrib/utils/sysinst/util.c
cvs rdiff -u -r1.20 -r1.21 src/distrib/utils/sysinst/arch/evbarm/md.h
cvs rdiff -u -r1.12 -r1.13 src/distrib/utils/sysinst/arch/evbarm/msg.md.de
cvs rdiff -u -r1.14 -r1.15 src/distrib/utils/sysinst/arch/evbarm/msg.md.en
cvs rdiff -u -r1.11 -r1.12 src/distrib/utils/sysinst/arch/evbarm/msg.md.es \
src/distrib/utils/sysinst/arch/evbarm/msg.md.pl
cvs rdiff -u -r1.13 -r1.14 src/distrib/utils/sysinst/arch/evbarm/msg.md.fr

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

Modified files:

Index: src/distrib/utils/sysinst/util.c
diff -u src/distrib/utils/sysinst/util.c:1.182 src/distrib/utils/sysinst/util.c:1.183
--- src/distrib/utils/sysinst/util.c:1.182	Sat Mar 16 22:16:02 2013
+++ src/distrib/utils/sysinst/util.c	Sat Mar 23 11:50:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.182 2013/03/16 22:16:02 christos Exp $	*/
+/*	$NetBSD: util.c,v 1.183 2013/03/23 11:50:02 he Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -118,6 +118,9 @@ distinfo dist_list[] = {
 #ifdef SET_KERNEL_8_NAME
 	{SET_KERNEL_8_NAME,	SET_KERNEL_8,		MSG_set_kernel_8, NULL},
 #endif
+#ifdef SET_KERNEL_9_NAME
+	{SET_KERNEL_9_NAME,	SET_KERNEL_9,		MSG_set_kernel_9, NULL},
+#endif
 
 	{modules,		SET_MODULES,		MSG_set_modules, NULL},
 	{base,		SET_BASE,		MSG_set_base, NULL},

Index: src/distrib/utils/sysinst/arch/evbarm/md.h
diff -u src/distrib/utils/sysinst/arch/evbarm/md.h:1.20 src/distrib/utils/sysinst/arch/evbarm/md.h:1.21
--- src/distrib/utils/sysinst/arch/evbarm/md.h:1.20	Tue Mar 19 22:16:54 2013
+++ src/distrib/utils/sysinst/arch/evbarm/md.h	Sat Mar 23 11:50:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.20 2013/03/19 22:16:54 garbled Exp $	*/
+/*	$NetBSD: md.h,v 1.21 2013/03/23 11:50:03 he Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -61,6 +61,7 @@
 #define SET_KERNEL_6_NAME	kern-TEAMASA_NPWR
 #define SET_KERNEL_7_NAME	kern-TS7200
 #define SET_KERNEL_8_NAME	kern-RPI
+#define SET_KERNEL_9_NAME	kern-KUROBOX_PRO
 #define SET_KERNEL_RPI		SET_KERNEL_8
 
 #define MD_SETS_SELECTED SET_SYSTEM

Index: src/distrib/utils/sysinst/arch/evbarm/msg.md.de
diff -u src/distrib/utils/sysinst/arch/evbarm/msg.md.de:1.12 src/distrib/utils/sysinst/arch/evbarm/msg.md.de:1.13
--- src/distrib/utils/sysinst/arch/evbarm/msg.md.de:1.12	Tue Mar 19 22:16:54 2013
+++ src/distrib/utils/sysinst/arch/evbarm/msg.md.de	Sat Mar 23 11:50:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.de,v 1.12 2013/03/19 22:16:54 garbled Exp $	*/
+/*	$NetBSD: msg.md.de,v 1.13 2013/03/23 11:50:03 he Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -88,6 +88,8 @@ message set_kernel_7
 {Kernel (TS7200)}
 message set_kernel_8
 {Kernel (RPI)}
+message set_kernel_9
+{Kernel (KUROBOX_PRO)}
 
 message nomsdospart
 {There is no MSDOS boot partition in the MBR partition table.}

Index: src/distrib/utils/sysinst/arch/evbarm/msg.md.en
diff -u src/distrib/utils/sysinst/arch/evbarm/msg.md.en:1.14 src/distrib/utils/sysinst/arch/evbarm/msg.md.en:1.15
--- src/distrib/utils/sysinst/arch/evbarm/msg.md.en:1.14	Tue Mar 19 22:16:54 2013
+++ src/distrib/utils/sysinst/arch/evbarm/msg.md.en	Sat Mar 23 11:50:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.en,v 1.14 2013/03/19 22:16:54 garbled Exp $	*/
+/*	$NetBSD: msg.md.en,v 1.15 2013/03/23 11:50:03 he Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -84,6 +84,8 @@ message set_kernel_7
 {Kernel (TS7200)}
 message set_kernel_8
 {Kernel (RPI)}
+message set_kernel_9
+{Kernel (KUROBOX_PRO)}
 
 message nomsdospart
 {There is no MSDOS boot partition in the MBR partition table.}

Index: src/distrib/utils/sysinst/arch/evbarm/msg.md.es
diff -u src/distrib/utils/sysinst/arch/evbarm/msg.md.es:1.11 src/distrib/utils/sysinst/arch/evbarm/msg.md.es:1.12
--- src/distrib/utils/sysinst/arch/evbarm/msg.md.es:1.11	Tue Mar 19 22:16:54 2013
+++ src/distrib/utils/sysinst/arch/evbarm/msg.md.es	Sat Mar 23 11:50:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.es,v 1.11 2013/03/19 22:16:54 garbled Exp $	*/
+/*	$NetBSD: msg.md.es,v 1.12 2013/03/23 11:50:03 he Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -87,6 +87,8 @@ message set_kernel_7
 {Núcleo (TS7200)}
 message set_kernel_8
 {N\xfacleo (RPI)}
+message set_kernel_9
+{Núcleo (KUROBOX_PRO)}
 
 message nomsdospart
 {There is no MSDOS boot partition in the MBR partition table.}
Index: src/distrib/utils/sysinst/arch/evbarm/msg.md.pl
diff -u src/distrib/utils/sysinst/arch/evbarm/msg.md.pl:1.11 

CVS commit: src/etc/etc.evbarm

2013-03-23 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sat Mar 23 11:51:48 UTC 2013

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Add KUROBOX_PRO as an EVBARM_BOARDS member.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.50 src/etc/etc.evbarm/Makefile.inc:1.51
--- src/etc/etc.evbarm/Makefile.inc:1.50	Thu Mar 21 15:16:43 2013
+++ src/etc/etc.evbarm/Makefile.inc	Sat Mar 23 11:51:47 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.50 2013/03/21 15:16:43 mlelstv Exp $
+#	$NetBSD: Makefile.inc,v 1.51 2013/03/23 11:51:47 he Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -13,7 +13,7 @@ EVBARM_BOARDS=
 # Little endian platforms (armv4 or pre-armv5t)
 EVBARM_BOARDS+=		ADI_BRH CP3100 GEMINI GUMSTIX INTEGRATOR \
 			IQ80310 IQ80321 MINI2440 MV2120 SMDK2410 \
-			SMDK2800 TEAMASA_NPWR TS7200 TWINTAIL
+			SMDK2800 TEAMASA_NPWR TS7200 TWINTAIL KUROBOX_PRO
 .endif
 
 



CVS commit: src/distrib

2013-01-30 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jan 30 13:47:36 UTC 2013

Modified Files:
src/distrib/common: Makefile.mdset
src/distrib/evbarm/gzboot/gzimg: Makefile

Log Message:
Fix the ALL_KERNELS default value assignment, so that the double
quotes don't become a part of the value, causing all the targets
to be skipped by default.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/distrib/common/Makefile.mdset
cvs rdiff -u -r1.23 -r1.24 src/distrib/evbarm/gzboot/gzimg/Makefile

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

Modified files:

Index: src/distrib/common/Makefile.mdset
diff -u src/distrib/common/Makefile.mdset:1.36 src/distrib/common/Makefile.mdset:1.37
--- src/distrib/common/Makefile.mdset:1.36	Sun Jan 13 14:43:23 2013
+++ src/distrib/common/Makefile.mdset	Wed Jan 30 13:47:36 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.36 2013/01/13 14:43:23 mlelstv Exp $
+#	$NetBSD: Makefile.mdset,v 1.37 2013/01/30 13:47:36 he Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -69,7 +69,9 @@ _MAKEFILE_MDSET_=1
 
 .include bsd.kernobj.mk
 
-ALL_KERNELS?= +
+# The default is to build for all MDSETTARGETS
+ALL_KERNELS?= +
+
 .for _K _I _F in ${MDSETTARGETS}			# {
 .for currentsel in ${ALL_KERNELS}			# {
 .if ${currentsel} == + || ${_K} == ${currentsel}

Index: src/distrib/evbarm/gzboot/gzimg/Makefile
diff -u src/distrib/evbarm/gzboot/gzimg/Makefile:1.23 src/distrib/evbarm/gzboot/gzimg/Makefile:1.24
--- src/distrib/evbarm/gzboot/gzimg/Makefile:1.23	Sun Jan 13 14:43:23 2013
+++ src/distrib/evbarm/gzboot/gzimg/Makefile	Wed Jan 30 13:47:36 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.23 2013/01/13 14:43:23 mlelstv Exp $
+#	$NetBSD: Makefile,v 1.24 2013/01/30 13:47:36 he Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -62,7 +62,9 @@ TARGETS=	ADI_BRH		ADI_BRH		ADI_BRH_sd0	\
 		0x0014	netbsd-wd0
 .endif
 
-ALL_KERNELS?= +
+# Default is to build for all TARGETS
+ALL_KERNELS?= +
+
 .for K G I R W in ${TARGETS}# {
 .for configsel in ${ALL_KERNELS}			# {
 .if ${configsel} == + || ${configsel} == ${K}



CVS commit: src/sys/arch/evbarm/conf

2013-01-30 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jan 30 13:52:45 UTC 2013

Added Files:
src/sys/arch/evbarm/conf: KUROBOX_PRO_INSTALL

Log Message:
Add an install kernel for KUROBOX_PRO.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL

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

Added files:

Index: src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL
diff -u /dev/null src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL:1.1
--- /dev/null	Wed Jan 30 13:52:45 2013
+++ src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL	Wed Jan 30 13:52:45 2013
@@ -0,0 +1,8 @@
+#	$NetBSD: KUROBOX_PRO_INSTALL,v 1.1 2013/01/30 13:52:45 he Exp $
+#
+#	KUROBOX_PRO_INSTALL -- KUROBOX_PRO kernel with installation-sized
+#	ramdisk
+#
+
+include arch/evbarm/conf/KUROBOX_PRO
+include arch/evbarm/conf/INSTALL



CVS commit: src/distrib/evbarm/instkernel/ramdisk

2013-01-30 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jan 30 14:12:33 UTC 2013

Modified Files:
src/distrib/evbarm/instkernel/ramdisk: list

Log Message:
Add newfs_ext2fs and mount_ext2fs, useful for installing on a hard
disk on KUROBOX_PRO.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/distrib/evbarm/instkernel/ramdisk/list

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

Modified files:

Index: src/distrib/evbarm/instkernel/ramdisk/list
diff -u src/distrib/evbarm/instkernel/ramdisk/list:1.23 src/distrib/evbarm/instkernel/ramdisk/list:1.24
--- src/distrib/evbarm/instkernel/ramdisk/list:1.23	Fri Aug 10 20:17:09 2012
+++ src/distrib/evbarm/instkernel/ramdisk/list	Wed Jan 30 14:12:33 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.23 2012/08/10 20:17:09 matt Exp $
+#	$NetBSD: list,v 1.24 2013/01/30 14:12:33 he Exp $
 
 SRCDIRS	bin sbin external/bsd/less/bin usr.bin usr.sbin
 
@@ -32,12 +32,14 @@ PROG	sbin/init
 PROG	sbin/mknod
 PROG	sbin/mount
 PROG	sbin/mount_cd9660
+PROG	sbin/mount_ext2fs
 PROG	sbin/mount_ffs
 PROG	sbin/mount_kernfs
 PROG	sbin/mount_msdos
 PROG	sbin/mount_nfs
 PROG	sbin/mount_tmpfs
 PROG	sbin/newfs	sbin/mount_mfs
+PROG	sbin/newfs_ext2fs
 PROG	sbin/ping
 PROG	sbin/reboot	sbin/halt
 PROG	sbin/restore	sbin/rrestore



CVS commit: src/distrib/common

2013-01-29 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Jan 29 18:17:29 UTC 2013

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
The rockridge option of makefs now requires a =1, follow suit.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/common/Makefile.bootcd

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

Modified files:

Index: src/distrib/common/Makefile.bootcd
diff -u src/distrib/common/Makefile.bootcd:1.20 src/distrib/common/Makefile.bootcd:1.21
--- src/distrib/common/Makefile.bootcd:1.20	Fri Aug 17 16:57:59 2012
+++ src/distrib/common/Makefile.bootcd	Tue Jan 29 18:17:29 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.20 2012/08/17 16:57:59 riz Exp $
+#	$NetBSD: Makefile.bootcd,v 1.21 2013/01/29 18:17:29 he Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -64,9 +64,9 @@ DISTRIBREV!=	${HOST_SH} ${KERNSRCDIR}/co
 ISO_VOLID!=	echo NETBSD_${DISTRIBREV} | tr a-z A-Z
 PUBLISHER?= The_NetBSD_Project
 .if defined(CDMAKEFSOPTIONS)
-_CDMAKEFSOPTIONS=	rockridge,label=${ISO_VOLID},publisher=${PUBLISHER},${CDMAKEFSOPTIONS}
+_CDMAKEFSOPTIONS=	rockridge=1,label=${ISO_VOLID},publisher=${PUBLISHER},${CDMAKEFSOPTIONS}
 .else
-_CDMAKEFSOPTIONS=	rockridge,label=${ISO_VOLID},publisher=${PUBLISHER}
+_CDMAKEFSOPTIONS=	rockridge=1,label=${ISO_VOLID},publisher=${PUBLISHER}
 .endif
 
 # Stuff that should come from elsewhere - XXX where? - HF



CVS commit: src/bin/csh

2013-01-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Jan 25 19:07:15 UTC 2013

Modified Files:
src/bin/csh: Makefile

Log Message:
When using -ledit, also use -lterminfo, to allow static linking.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/bin/csh/Makefile

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

Modified files:

Index: src/bin/csh/Makefile
diff -u src/bin/csh/Makefile:1.37 src/bin/csh/Makefile:1.38
--- src/bin/csh/Makefile:1.37	Fri Jan 25 14:20:57 2013
+++ src/bin/csh/Makefile	Fri Jan 25 19:07:14 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37 2013/01/25 14:20:57 christos Exp $
+#	$NetBSD: Makefile,v 1.38 2013/01/25 19:07:14 he Exp $
 #	@(#)Makefile	8.1 (Berkeley) 5/31/93
 #
 # C Shell with process control; VM/UNIX VAX Makefile
@@ -64,7 +64,7 @@ COPTS.printf.c = -Wno-format-nonliteral
 COPTS.proc.c = -Wno-format-nonliteral
 
 .if !empty(DFLAGS:M*EDIT)
-LDADD+=-ledit -lutil
+LDADD+=-ledit -lterminfo -lutil
 DPADD+=${LIBEDIT} ${LIBUTIL}
 .else
 LDADD+=-lutil



CVS commit: src/sys/arch/alpha/include

2013-01-14 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Jan 14 10:46:14 UTC 2013

Modified Files:
src/sys/arch/alpha/include: param.h

Log Message:
Copy the ALPHA_PGSHIFT value into the non-_KERNEL branch.
Fixes the build.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/include/param.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/arch/alpha/include/param.h
diff -u src/sys/arch/alpha/include/param.h:1.42 src/sys/arch/alpha/include/param.h:1.43
--- src/sys/arch/alpha/include/param.h:1.42	Mon Jan  7 23:40:52 2013
+++ src/sys/arch/alpha/include/param.h	Mon Jan 14 10:46:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.42 2013/01/07 23:40:52 dsl Exp $ */
+/* $NetBSD: param.h,v 1.43 2013/01/14 10:46:14 he Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -49,6 +49,8 @@
 
 #ifdef _KERNEL
 #include machine/cpu.h
+#else
+#define ALPHA_PGSHIFT	13
 #endif
 
 #define	NBPG		(1  ALPHA_PGSHIFT)		/* bytes/page */



CVS commit: src/sys/arch/evbarm/conf

2013-01-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Jan 11 09:45:53 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: BEAGLEBOARD

Log Message:
With the recent enhancement of omapfb, wsdisplay* devices appear
to now be required, so follow suit to fix the build.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbarm/conf/BEAGLEBOARD

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

Modified files:

Index: src/sys/arch/evbarm/conf/BEAGLEBOARD
diff -u src/sys/arch/evbarm/conf/BEAGLEBOARD:1.40 src/sys/arch/evbarm/conf/BEAGLEBOARD:1.41
--- src/sys/arch/evbarm/conf/BEAGLEBOARD:1.40	Wed Jan  9 04:44:54 2013
+++ src/sys/arch/evbarm/conf/BEAGLEBOARD	Fri Jan 11 09:45:53 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBOARD,v 1.40 2013/01/09 04:44:54 macallan Exp $
+#	$NetBSD: BEAGLEBOARD,v 1.41 2013/01/11 09:45:53 he Exp $
 #
 #	BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel
 #
@@ -258,8 +258,8 @@ omapdma0	at obio0 addr 0x48056000 size 0
 omapfb* 	at obio0 addr 0x4805 size 0x1
 
 # make sure the console display is always wsdisplay0
-#wsdisplay0	at wsemuldisplaydev? console 1
-#wsdisplay*	at wsemuldisplaydev?
+wsdisplay0	at wsemuldisplaydev? console 1
+wsdisplay*	at wsemuldisplaydev?
 
 # various options for wscons - we try to look as much like a standard
 # sun console as possible



CVS commit: src/sys/arch/amiga/conf

2013-01-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Jan 11 11:00:33 UTC 2013

Modified Files:
src/sys/arch/amiga/conf: files.amiga

Log Message:
We appear to need files.usb included to get opt_usb.h generated,
to make hid.c build.  The inclusion of hid.c in the build is probably
triggered by some configs including bluetooth support, and hid.c
is apparently both for bluetooth and usb.  I'm not sure what changed
to make the build fail in the first place, though.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/amiga/conf/files.amiga

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

Modified files:

Index: src/sys/arch/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.166 src/sys/arch/amiga/conf/files.amiga:1.167
--- src/sys/arch/amiga/conf/files.amiga:1.166	Sun Nov 25 23:33:56 2012
+++ src/sys/arch/amiga/conf/files.amiga	Fri Jan 11 11:00:33 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.166 2012/11/25 23:33:56 rkujawa Exp $
+#	$NetBSD: files.amiga,v 1.167 2013/01/11 11:00:33 he Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -506,6 +506,9 @@ include compat/ossaudio/files.ossaudio
 # Bluetooth stack
 include dev/bluetooth/files.bluetooth
 
+# USB stack
+include dev/usb/files.usb
+
 # Phase5 BPPC/CSPPC internal bus
 device	p5bus {}
 attach	p5bus at zbus



CVS commit: src/sys/arch/alpha/stand/netboot

2013-01-10 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Jan 10 10:36:41 UTC 2013

Modified Files:
src/sys/arch/alpha/stand/netboot: getsecs.c

Log Message:
Include machine/cpu.h for alpha_rpcc declaration.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/stand/netboot/getsecs.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/arch/alpha/stand/netboot/getsecs.c
diff -u src/sys/arch/alpha/stand/netboot/getsecs.c:1.9 src/sys/arch/alpha/stand/netboot/getsecs.c:1.10
--- src/sys/arch/alpha/stand/netboot/getsecs.c:1.9	Mon Jan 12 11:32:43 2009
+++ src/sys/arch/alpha/stand/netboot/getsecs.c	Thu Jan 10 10:36:41 2013
@@ -1,7 +1,8 @@
-/*	$NetBSD: getsecs.c,v 1.9 2009/01/12 11:32:43 tsutsui Exp $	*/
+/*	$NetBSD: getsecs.c,v 1.10 2013/01/10 10:36:41 he Exp $	*/
 
 #include sys/param.h
 
+#include machine/cpu.h
 #include netinet/in.h
 #include netinet/in_systm.h
   



CVS commit: src/sys/arch/sun2/include

2013-01-09 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jan  9 08:11:09 UTC 2013

Modified Files:
src/sys/arch/sun2/include: pmap.h

Log Message:
The pmap_prefer() function grew an additional argument with the introduction
of top-down VM; fix the prototype accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sun2/include/pmap.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/arch/sun2/include/pmap.h
diff -u src/sys/arch/sun2/include/pmap.h:1.25 src/sys/arch/sun2/include/pmap.h:1.26
--- src/sys/arch/sun2/include/pmap.h:1.25	Mon Jan  7 16:58:08 2013
+++ src/sys/arch/sun2/include/pmap.h	Wed Jan  9 08:11:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.25 2013/01/07 16:58:08 chs Exp $	*/
+/*	$NetBSD: pmap.h,v 1.26 2013/01/09 08:11:09 he Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@ struct pmap {
 int _pmap_fault(struct vm_map *, vaddr_t, vm_prot_t);
 
 /* This lets us have some say in choosing VA locations. */
-extern void pmap_prefer(vaddr_t, vaddr_t *);
+extern void pmap_prefer(vaddr_t, vaddr_t *, int);
 #define PMAP_PREFER(fo, ap, sz, td) pmap_prefer((fo), (ap), (td))
 
 /* This needs to be a macro for kern_sysctl.c */



CVS commit: src/lib/libarch/alpha

2013-01-09 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jan  9 08:49:45 UTC 2013

Modified Files:
src/lib/libarch/alpha: alpha_pci_io.c

Log Message:
Include machine/alpha_cpu.h for alpha_mb() definition.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libarch/alpha/alpha_pci_io.c

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

Modified files:

Index: src/lib/libarch/alpha/alpha_pci_io.c
diff -u src/lib/libarch/alpha/alpha_pci_io.c:1.6 src/lib/libarch/alpha/alpha_pci_io.c:1.7
--- src/lib/libarch/alpha/alpha_pci_io.c:1.6	Thu Mar 22 08:54:48 2012
+++ src/lib/libarch/alpha/alpha_pci_io.c	Wed Jan  9 08:49:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: alpha_pci_io.c,v 1.6 2012/03/22 08:54:48 he Exp $	*/
+/*	$NetBSD: alpha_pci_io.c,v 1.7 2013/01/09 08:49:44 he Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -37,6 +37,7 @@
 
 #include sys/param.h
 
+#include machine/alpha_cpu.h
 #include machine/bwx.h
 #include machine/sysarch.h
 #include machine/pio.h



CVS commit: src/lib/libc/softfloat

2012-11-16 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Nov 16 12:38:10 UTC 2012

Modified Files:
src/lib/libc/softfloat: Makefile.inc

Log Message:
Fix make syntax problem by putting the condition on the same line as .elif.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/softfloat/Makefile.inc

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

Modified files:

Index: src/lib/libc/softfloat/Makefile.inc
diff -u src/lib/libc/softfloat/Makefile.inc:1.11 src/lib/libc/softfloat/Makefile.inc:1.12
--- src/lib/libc/softfloat/Makefile.inc:1.11	Wed Nov 14 03:47:30 2012
+++ src/lib/libc/softfloat/Makefile.inc	Fri Nov 16 12:38:09 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11 2012/11/14 03:47:30 msaitoh Exp $
+#	$NetBSD: Makefile.inc,v 1.12 2012/11/16 12:38:09 he Exp $
 
 SOFTFLOAT_BITS?=64
 .PATH:		${ARCHDIR}/softfloat \
@@ -24,8 +24,7 @@ SRCS+=		${SRCS.softfloat}
 .if (${MACHINE_CPU} == arm)
 # See doc/HACKS for more information.
 COPTS.softfloat.c+=	-Wno-enum-compare -fno-tree-vrp
-.elif
-(${MACHINE_CPU} == mips || \
+.elif (${MACHINE_CPU} == mips || \
  ${MACHINE_CPU} == sh3)
 COPTS.softfloat.c+=	-Wno-enum-compare
 .endif



CVS commit: src/sys/arch/arm/broadcom

2012-09-16 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Sep 16 12:10:57 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_pax.c

Log Message:
Be consistent with applying __HAVE_PCI_CONF_HOOK around bcmpax_conf_hook
implementation as well.  Fixes build for BCM5301X evbarm kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm53xx_pax.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/arch/arm/broadcom/bcm53xx_pax.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.2 src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.3
--- src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.2	Fri Sep 14 04:53:58 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_pax.c	Sun Sep 16 12:10:57 2012
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_pax.c,v 1.2 2012/09/14 04:53:58 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_pax.c,v 1.3 2012/09/16 12:10:57 he Exp $);
 
 #include sys/bus.h
 #include sys/device.h
@@ -367,6 +367,7 @@ bcmpax_conf_interrupt(void *v, int bus, 
 	*ilinep = 5; /* (ipin + swiz)  3; */
 }
 
+#ifdef __HAVE_PCI_CONF_HOOK
 static int
 bcmpax_conf_hook(void *v, int bus, int dev, int func, pcireg_t id)
 {
@@ -375,6 +376,7 @@ bcmpax_conf_hook(void *v, int bus, int d
 
 	return PCI_CONF_ENABLE_MEM | PCI_CONF_MAP_MEM;
 }
+#endif
 
 static int
 bcmpax_intr_map(const struct pci_attach_args *pa, pci_intr_handle_t *pihp)



CVS commit: src/sys/dev/adb

2012-09-02 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Sep  2 21:06:54 UTC 2012

Modified Files:
src/sys/dev/adb: adb_kbd.c

Log Message:
Move adbkbd_setup_sysctl() declaration to outside NWSMOUSE  0, to
match the rest of the code.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/adb/adb_kbd.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/adb/adb_kbd.c
diff -u src/sys/dev/adb/adb_kbd.c:1.19 src/sys/dev/adb/adb_kbd.c:1.20
--- src/sys/dev/adb/adb_kbd.c:1.19	Thu Aug 30 01:27:44 2012
+++ src/sys/dev/adb/adb_kbd.c	Sun Sep  2 21:06:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: adb_kbd.c,v 1.19 2012/08/30 01:27:44 macallan Exp $	*/
+/*	$NetBSD: adb_kbd.c,v 1.20 2012/09/02 21:06:54 he Exp $	*/
 
 /*
  * Copyright (C) 1998	Colin Wood
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: adb_kbd.c,v 1.19 2012/08/30 01:27:44 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: adb_kbd.c,v 1.20 2012/09/02 21:06:54 he Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -155,10 +155,11 @@ const struct wsmouse_accessops adbkms_ac
 static int  adbkbd_sysctl_mid(SYSCTLFN_ARGS);
 static int  adbkbd_sysctl_right(SYSCTLFN_ARGS);
 static int  adbkbd_sysctl_usb(SYSCTLFN_ARGS);
-static void adbkbd_setup_sysctl(struct adbkbd_softc *);
 
 #endif /* NWSMOUSE  0 */
 
+static void adbkbd_setup_sysctl(struct adbkbd_softc *);
+
 #ifdef ADBKBD_DEBUG
 #define DPRINTF printf
 #else



CVS commit: src/sys/dev/wscons

2012-09-02 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Sep  2 21:14:56 UTC 2012

Modified Files:
src/sys/dev/wscons: wskbdvar.h

Log Message:
Now that we use keysym_t, make sure dev/wscons/wsksymvar.h is included.
Fixes the kernel build for next68k's nextcons.c and mac68k's maccons.c.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/wscons/wskbdvar.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/dev/wscons/wskbdvar.h
diff -u src/sys/dev/wscons/wskbdvar.h:1.18 src/sys/dev/wscons/wskbdvar.h:1.19
--- src/sys/dev/wscons/wskbdvar.h:1.18	Wed Aug 29 02:38:31 2012
+++ src/sys/dev/wscons/wskbdvar.h	Sun Sep  2 21:14:56 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: wskbdvar.h,v 1.18 2012/08/29 02:38:31 macallan Exp $ */
+/* $NetBSD: wskbdvar.h,v 1.19 2012/09/02 21:14:56 he Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -33,6 +33,7 @@
 /*
  * WSKBD interfaces.
  */
+#include dev/wscons/wsksymvar.h
 
 /*
  * Keyboard access functions (must be provided by all keyboards).



CVS commit: src/sys/arch/powerpc/booke/pci

2012-08-14 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Aug 14 13:02:19 UTC 2012

Modified Files:
src/sys/arch/powerpc/booke/pci: pq3pci.c

Log Message:
Make this build again by adding a couple of right-parens.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/booke/pci/pq3pci.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/arch/powerpc/booke/pci/pq3pci.c
diff -u src/sys/arch/powerpc/booke/pci/pq3pci.c:1.14 src/sys/arch/powerpc/booke/pci/pq3pci.c:1.15
--- src/sys/arch/powerpc/booke/pci/pq3pci.c:1.14	Mon Aug 13 00:52:45 2012
+++ src/sys/arch/powerpc/booke/pci/pq3pci.c	Tue Aug 14 13:02:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3pci.c,v 1.14 2012/08/13 00:52:45 matt Exp $	*/
+/*	$NetBSD: pq3pci.c,v 1.15 2012/08/14 13:02:19 he Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -44,7 +44,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pq3pci.c,v 1.14 2012/08/13 00:52:45 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pq3pci.c,v 1.15 2012/08/14 13:02:19 he Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -882,7 +882,7 @@ pq3pci_cpunode_attach(device_t parent, d
 		bus_space_write_4(sc-sc_bst, sc-sc_bsh, PEXOWBAR1, owin1.powbar);
 		bus_space_write_4(sc-sc_bst, sc-sc_bsh, PEXOWAR1, owin1.powar);
 		pq3pci_owin_record(sc, 1, owin1);
-		if (!pq3pci_owin_init(sc, sc-sc_pci_mem_bst, false) {
+		if (!pq3pci_owin_init(sc, sc-sc_pci_mem_bst, false)) {
 			return;
 		}
 
@@ -907,7 +907,7 @@ pq3pci_cpunode_attach(device_t parent, d
 		bus_space_write_4(sc-sc_bst, sc-sc_bsh, PEXOWBAR2, owin2.powbar);
 		bus_space_write_4(sc-sc_bst, sc-sc_bsh, PEXOWAR2, owin2.powar);
 		pq3pci_owin_record(sc, 2, owin1);
-		if (!pq3pci_owin_init(sc, sc-sc_pci_io_bst, true) {
+		if (!pq3pci_owin_init(sc, sc-sc_pci_io_bst, true)) {
 			return;
 		}
 



CVS commit: src/usr.bin/tftp

2012-07-16 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Jul 16 09:20:26 UTC 2012

Modified Files:
src/usr.bin/tftp: main.c tftp.c

Log Message:
Undo the non-sharing of the toplevel jmp_buf between main.c and tftp.c,
so that we don't get a core dump if a transfer time-out is experienced.
Also, get rid of an extranous newline printed in the case of time-out.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/tftp/main.c
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/tftp/tftp.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/tftp/main.c
diff -u src/usr.bin/tftp/main.c:1.31 src/usr.bin/tftp/main.c:1.32
--- src/usr.bin/tftp/main.c:1.31	Tue Mar 20 20:34:59 2012
+++ src/usr.bin/tftp/main.c	Mon Jul 16 09:20:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.31 2012/03/20 20:34:59 matt Exp $	*/
+/*	$NetBSD: main.c,v 1.32 2012/07/16 09:20:26 he Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -36,7 +36,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)main.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: main.c,v 1.31 2012/03/20 20:34:59 matt Exp $);
+__RCSID($NetBSD: main.c,v 1.32 2012/07/16 09:20:26 he Exp $);
 #endif
 #endif /* not lint */
 
@@ -87,6 +87,8 @@ u_int	rexmtval = TIMEOUT;
 ushort	mcmasterslave;
 int	maxtimeout = 5 * TIMEOUT;
 
+jmp_buf	toplevel;
+
 static int	connected;
 static char	mode[32];
 static char	line[LBUFLEN];
@@ -94,7 +96,6 @@ static int	margc;
 static char	*margv[20];
 static const	char *prompt = tftp;
 static charhostname[MAXHOSTNAMELEN];
-static jmp_buf	toplevel;
 
 static void	get(int, char **);
 static void	help(int, char **);

Index: src/usr.bin/tftp/tftp.c
diff -u src/usr.bin/tftp/tftp.c:1.33 src/usr.bin/tftp/tftp.c:1.34
--- src/usr.bin/tftp/tftp.c:1.33	Tue Mar 20 20:34:59 2012
+++ src/usr.bin/tftp/tftp.c	Mon Jul 16 09:20:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tftp.c,v 1.33 2012/03/20 20:34:59 matt Exp $	*/
+/*	$NetBSD: tftp.c,v 1.34 2012/07/16 09:20:26 he Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)tftp.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: tftp.c,v 1.33 2012/03/20 20:34:59 matt Exp $);
+__RCSID($NetBSD: tftp.c,v 1.34 2012/07/16 09:20:26 he Exp $);
 #endif
 #endif /* not lint */
 
@@ -67,9 +67,10 @@ __RCSID($NetBSD: tftp.c,v 1.33 2012/03/
 #include extern.h
 #include tftpsubs.h
 
+extern jmp_buf	toplevel;
+
 charackbuf[PKTSIZE];
 int	timeout;
-jmp_buf	toplevel;
 jmp_buf	timeoutbuf;
 
 static void nak __P((int, struct sockaddr *));
@@ -749,7 +750,7 @@ timer(int sig)
 
 	timeout += rexmtval;
 	if (timeout = maxtimeout) {
-		(void)printf(Transfer timed out.\n);
+		(void)printf(Transfer timed out.);
 		longjmp(toplevel, -1);
 	}
 	longjmp(timeoutbuf, 1);



CVS commit: src/distrib/sets/lists/modules

2012-04-26 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Apr 26 22:09:53 UTC 2012

Modified Files:
src/distrib/sets/lists/modules: md.evbppc

Log Message:
Add the sdtemp and dbcool modules for the non-default powerpc variants.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/modules/md.evbppc

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/modules/md.evbppc
diff -u src/distrib/sets/lists/modules/md.evbppc:1.20 src/distrib/sets/lists/modules/md.evbppc:1.21
--- src/distrib/sets/lists/modules/md.evbppc:1.20	Thu Apr 26 03:00:21 2012
+++ src/distrib/sets/lists/modules/md.evbppc	Thu Apr 26 22:09:53 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc,v 1.20 2012/04/26 03:00:21 christos Exp $
+# $NetBSD: md.evbppc,v 1.21 2012/04/26 22:09:53 he Exp $
 ./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
@@ -26,6 +26,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/compat_ossaudio/compat_ossaudio.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/coredump			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/coredump/coredump.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/dbcoolbase-kernel-modules kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/dbcool/dbcool.kmod		base-kernel-modules kmod
 ./stand/powerpc-4xx/@OSRELEASE@/modules/dirhashbase-obsolete		obsolete
 ./stand/powerpc-4xx/@OSRELEASE@/modules/dirhash/dirhash.kmod		base-obsolete		obsolete
 ./stand/powerpc-4xx/@OSRELEASE@/modules/dmbase-kernel-modules	kmod,compatmodules,lvm
@@ -134,6 +136,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/scsiverbose/scsiverbose.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/sdtbase-kernel-modules	kmod,compatmodules,dtrace
 ./stand/powerpc-4xx/@OSRELEASE@/modules/sdt/sdt.kmod			base-kernel-modules	kmod,compatmodules,dtrace
+./stand/powerpc-4xx/@OSRELEASE@/modules/sdtemp			base-kernel-modules kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/sdtemp/sdtemp.kmod		base-kernel-modules kmod
 ./stand/powerpc-4xx/@OSRELEASE@/modules/secmodel_bsd44			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/secmodel_bsd44/secmodel_bsd44.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/secmodel_extensions		base-kernel-modules	kmod,compatmodules
@@ -199,6 +203,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/compat_ossaudio/compat_ossaudio.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/coredumpbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/coredump/coredump.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/dbcool			base-kernel-modules kmod
+./stand/powerpc-booke/@OSRELEASE@/modules/dbcool/dbcool.kmod		base-kernel-modules kmod
 ./stand/powerpc-booke/@OSRELEASE@/modules/dirhashbase-obsolete	obsolete
 ./stand/powerpc-booke/@OSRELEASE@/modules/dirhash/dirhash.kmod		base-obsolete	obsolete
 ./stand/powerpc-booke/@OSRELEASE@/modules/dmbase-kernel-modules	kmod,compatmodules,lvm
@@ -307,6 +313,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/scsiverbose/scsiverbose.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/sdtbase-kernel-modules	kmod,compatmodules,dtrace
 ./stand/powerpc-booke/@OSRELEASE@/modules/sdt/sdt.kmod			base-kernel-modules	kmod,compatmodules,dtrace
+./stand/powerpc-booke/@OSRELEASE@/modules/sdtemp			base-kernel-modules kmod
+./stand/powerpc-booke/@OSRELEASE@/modules/sdtemp/sdtemp.kmod		base-kernel-modules kmod
 ./stand/powerpc-booke/@OSRELEASE@/modules/secmodel_bsd44		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/secmodel_bsd44/secmodel_bsd44.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/secmodel_extensions		base-kernel-modules	kmod,compatmodules



CVS commit: src/external/gpl3/gcc/lib/libgomp/arch/m68k

2012-04-06 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Apr  6 20:10:28 UTC 2012

Modified Files:
src/external/gpl3/gcc/lib/libgomp/arch/m68k: config.h

Log Message:
Disable HAVE_TLS for now for gcc's libgomp, since it otherwise
causes gcc indigestion (internal compiler error) for all m68k ports.
mrg@ says this will do for now, and committing to this generated-
by-mknative file is ok.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/lib/libgomp/arch/m68k/config.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/gpl3/gcc/lib/libgomp/arch/m68k/config.h
diff -u src/external/gpl3/gcc/lib/libgomp/arch/m68k/config.h:1.2 src/external/gpl3/gcc/lib/libgomp/arch/m68k/config.h:1.3
--- src/external/gpl3/gcc/lib/libgomp/arch/m68k/config.h:1.2	Thu Apr  5 21:09:20 2012
+++ src/external/gpl3/gcc/lib/libgomp/arch/m68k/config.h	Fri Apr  6 20:10:28 2012
@@ -75,7 +75,7 @@
 #define HAVE_SYS_TYPES_H 1
 
 /* Define to 1 if the target supports thread-local storage. */
-#define HAVE_TLS 1
+/* #define HAVE_TLS 1 */
 
 /* Define to 1 if you have the unistd.h header file. */
 #define HAVE_UNISTD_H 1



CVS commit: src/dist/pdisk

2012-03-23 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Mar 23 14:49:55 UTC 2012

Modified Files:
src/dist/pdisk: errors.c io.c pdisk.c

Log Message:
More c89 prototypes, mostly just filling in void where needed.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/pdisk/errors.c src/dist/pdisk/io.c
cvs rdiff -u -r1.18 -r1.19 src/dist/pdisk/pdisk.c

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

Modified files:

Index: src/dist/pdisk/errors.c
diff -u src/dist/pdisk/errors.c:1.4 src/dist/pdisk/errors.c:1.5
--- src/dist/pdisk/errors.c:1.4	Wed Jul 13 15:25:29 2005
+++ src/dist/pdisk/errors.c	Fri Mar 23 14:49:55 2012
@@ -92,7 +92,7 @@ init_program_name(char **argv)
 
 
 void
-do_help()
+do_help(void)
 {
 printf(\t%s [-h|--help]\n, program_name);
 printf(\t%s [-v|--version]\n, program_name);
Index: src/dist/pdisk/io.c
diff -u src/dist/pdisk/io.c:1.4 src/dist/pdisk/io.c:1.5
--- src/dist/pdisk/io.c:1.4	Thu Aug 25 16:51:48 2011
+++ src/dist/pdisk/io.c	Fri Mar 23 14:49:55 2012
@@ -96,7 +96,7 @@ void my_ungetch(int c);
 // Routines
 //
 int
-my_getch()
+my_getch(void)
 {
 if (unget_count  0) {
 	return (unget_buf[--unget_count]);

Index: src/dist/pdisk/pdisk.c
diff -u src/dist/pdisk/pdisk.c:1.18 src/dist/pdisk/pdisk.c:1.19
--- src/dist/pdisk/pdisk.c:1.18	Wed Dec 23 09:13:21 2009
+++ src/dist/pdisk/pdisk.c	Fri Mar 23 14:49:55 2012
@@ -226,7 +226,7 @@ main(int argc, char **argv)
 
 
 void
-print_top_notes()
+print_top_notes(void)
 {
 printf(Notes:\n);
 printf(  Disks have fake names of the form /dev/scsibus.id\n);
@@ -239,7 +239,7 @@ print_top_notes()
 
 
 void
-interact()
+interact(void)
 {
 char *name;
 int command;
@@ -504,7 +504,7 @@ get_options(int argc, char **argv)
 
 
 void
-print_edit_notes()
+print_edit_notes(void)
 {
 printf(Notes:\n);
 printf(  Base and length fields are blocks, which vary in size between media.\n);
@@ -958,7 +958,7 @@ do_write_partition_map(partition_map_hea
 
 
 void
-print_expert_notes()
+print_expert_notes(void)
 {
 printf(Notes:\n);
 printf(  The expert commands are for low level and experimental features.\n);



CVS commit: src

2012-03-23 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Mar 23 18:37:42 UTC 2012

Modified Files:
src/distrib/macppc/floppies/ramdisk: Makefile
src/sys/arch/macppc/conf: GENERIC_MD INSTALL

Log Message:
Bump the ramdisk size with 100KB so that the contents fits again.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/distrib/macppc/floppies/ramdisk/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/macppc/conf/GENERIC_MD
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/macppc/conf/INSTALL

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

Modified files:

Index: src/distrib/macppc/floppies/ramdisk/Makefile
diff -u src/distrib/macppc/floppies/ramdisk/Makefile:1.39 src/distrib/macppc/floppies/ramdisk/Makefile:1.40
--- src/distrib/macppc/floppies/ramdisk/Makefile:1.39	Fri Dec 24 10:11:39 2010
+++ src/distrib/macppc/floppies/ramdisk/Makefile	Fri Mar 23 18:37:42 2012
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.39 2010/12/24 10:11:39 aymeric Exp $
+#	$NetBSD: Makefile,v 1.40 2012/03/23 18:37:42 he Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2112k
+IMAGESIZE=	2212k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1

Index: src/sys/arch/macppc/conf/GENERIC_MD
diff -u src/sys/arch/macppc/conf/GENERIC_MD:1.11 src/sys/arch/macppc/conf/GENERIC_MD:1.12
--- src/sys/arch/macppc/conf/GENERIC_MD:1.11	Fri Dec 24 10:11:39 2010
+++ src/sys/arch/macppc/conf/GENERIC_MD	Fri Mar 23 18:37:42 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC_MD,v 1.11 2010/12/24 10:11:39 aymeric Exp $
+#	$NetBSD: GENERIC_MD,v 1.12 2012/03/23 18:37:42 he Exp $
 #
 # GENERIC_MD config file
 #
@@ -8,5 +8,5 @@ include arch/macppc/conf/GENERIC
 # Enable the hooks used for initializing the ram-disk.
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk
-options 	MEMORY_DISK_ROOT_SIZE=4224	# 2112 KiB
+options 	MEMORY_DISK_ROOT_SIZE=4424	# 2212 KiB
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode

Index: src/sys/arch/macppc/conf/INSTALL
diff -u src/sys/arch/macppc/conf/INSTALL:1.114 src/sys/arch/macppc/conf/INSTALL:1.115
--- src/sys/arch/macppc/conf/INSTALL:1.114	Wed Jan 11 16:29:32 2012
+++ src/sys/arch/macppc/conf/INSTALL	Fri Mar 23 18:37:42 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: INSTALL,v 1.114 2012/01/11 16:29:32 macallan Exp $
+#	$NetBSD: INSTALL,v 1.115 2012/03/23 18:37:42 he Exp $
 #
 # config file for INSTALL FLOPPY
 #
@@ -17,7 +17,7 @@ options 	RTC_OFFSET=0	# hardware clock i
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
-options 	MEMORY_DISK_ROOT_SIZE=4224	# 2112 KiB
+options 	MEMORY_DISK_ROOT_SIZE=4424	# 2212 KiB
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 options 	USERCONF	# userconf(4) support



CVS commit: src/sys/arch/arm/include

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 08:39:44 UTC 2012

Modified Files:
src/sys/arch/arm/include: limits.h

Log Message:
Make sure that the UQUAD_MAX constant is marked as unsigned, to avoid
ANSI C treats constant as unsigned warning from lint.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/include/limits.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/arch/arm/include/limits.h
diff -u src/sys/arch/arm/include/limits.h:1.10 src/sys/arch/arm/include/limits.h:1.11
--- src/sys/arch/arm/include/limits.h:1.10	Mon Jun  7 13:52:30 2010
+++ src/sys/arch/arm/include/limits.h	Thu Mar 22 08:39:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: limits.h,v 1.10 2010/06/07 13:52:30 tnozaki Exp $	*/
+/*	$NetBSD: limits.h,v 1.11 2012/03/22 08:39:43 he Exp $	*/
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -71,7 +71,7 @@
 #if defined(_NETBSD_SOURCE)
 #define	SIZE_T_MAX	LONG_MAX	/* max value for a size_t */
 
-#define	UQUAD_MAX	0xLL		/* max unsigned quad */
+#define	UQUAD_MAX	0xULL		/* max unsigned quad */
 #define	QUAD_MAX	0x7fffLL		/* max signed quad */
 #define	QUAD_MIN	(-0x7fffLL-1)	/* min signed quad */
 



CVS commit: src/lib/libarch/alpha

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 08:52:22 UTC 2012

Modified Files:
src/lib/libarch/alpha: alpha_bus_window.c

Log Message:
Make 'i' unsigned to avoid signed/unsigned comparison warnings from lint.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libarch/alpha/alpha_bus_window.c

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

Modified files:

Index: src/lib/libarch/alpha/alpha_bus_window.c
diff -u src/lib/libarch/alpha/alpha_bus_window.c:1.3 src/lib/libarch/alpha/alpha_bus_window.c:1.4
--- src/lib/libarch/alpha/alpha_bus_window.c:1.3	Mon Apr 28 20:22:55 2008
+++ src/lib/libarch/alpha/alpha_bus_window.c	Thu Mar 22 08:52:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: alpha_bus_window.c,v 1.3 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: alpha_bus_window.c,v 1.4 2012/03/22 08:52:22 he Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@ alpha_bus_getwindows(int type, struct al
 	struct alpha_bus_get_window_count_args count_args;
 	struct alpha_bus_get_window_args window_args;
 	struct alpha_bus_window *abw;
-	int i;
+	unsigned int i;
 
 	count_args.type = type;
 	if (sysarch(ALPHA_BUS_GET_WINDOW_COUNT, count_args) != 0)



CVS commit: src/dist/pdisk

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 08:56:52 UTC 2012

Modified Files:
src/dist/pdisk: dump.c

Log Message:
Add a void to make function declaration c89.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/dist/pdisk/dump.c

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

Modified files:

Index: src/dist/pdisk/dump.c
diff -u src/dist/pdisk/dump.c:1.10 src/dist/pdisk/dump.c:1.11
--- src/dist/pdisk/dump.c:1.10	Sun May 10 22:03:22 2009
+++ src/dist/pdisk/dump.c	Thu Mar 22 08:56:52 2012
@@ -390,7 +390,7 @@ dump_partition_entry(partition_map *entr
 
 
 void
-list_all_disks()
+list_all_disks(void)
 {
 MEDIA_ITERATOR iter;
 MEDIA m;



CVS commit: src/lib/libc/arch/sh3/gen

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 08:58:39 UTC 2012

Modified Files:
src/lib/libc/arch/sh3/gen: flt_rounds.c

Log Message:
Add a void to make function declaration c89.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/sh3/gen/flt_rounds.c

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

Modified files:

Index: src/lib/libc/arch/sh3/gen/flt_rounds.c
diff -u src/lib/libc/arch/sh3/gen/flt_rounds.c:1.4 src/lib/libc/arch/sh3/gen/flt_rounds.c:1.5
--- src/lib/libc/arch/sh3/gen/flt_rounds.c:1.4	Wed Jan 17 23:24:22 2007
+++ src/lib/libc/arch/sh3/gen/flt_rounds.c	Thu Mar 22 08:58:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: flt_rounds.c,v 1.4 2007/01/17 23:24:22 hubertf Exp $	*/
+/*	$NetBSD: flt_rounds.c,v 1.5 2012/03/22 08:58:39 he Exp $	*/
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: flt_rounds.c,v 1.4 2007/01/17 23:24:22 hubertf Exp $);
+__RCSID($NetBSD: flt_rounds.c,v 1.5 2012/03/22 08:58:39 he Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/types.h
@@ -75,7 +75,7 @@ static const int map[] = {
 extern int __flt_rounds __P((void));
 
 int
-__flt_rounds()
+__flt_rounds(void)
 {
 	return(map[fpgetround()]);
 }



CVS commit: src/lib/libc/arch

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 09:32:04 UTC 2012

Modified Files:
src/lib/libc/arch/arm/gen: _lwp.c
src/lib/libc/arch/sh3/gen: _lwp.c

Log Message:
Follow the pattern from powerpc, make lint happy.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/arm/gen/_lwp.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/sh3/gen/_lwp.c

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

Modified files:

Index: src/lib/libc/arch/arm/gen/_lwp.c
diff -u src/lib/libc/arch/arm/gen/_lwp.c:1.7 src/lib/libc/arch/arm/gen/_lwp.c:1.8
--- src/lib/libc/arch/arm/gen/_lwp.c:1.7	Wed Mar 21 14:03:06 2012
+++ src/lib/libc/arch/arm/gen/_lwp.c	Thu Mar 22 09:32:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $	*/
+/*	$NetBSD: _lwp.c,v 1.8 2012/03/22 09:32:04 he Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $);
+__RCSID($NetBSD: _lwp.c,v 1.8 2012/03/22 09:32:04 he Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -50,7 +50,7 @@ void
 _lwp_makecontext(ucontext_t *u, void (*start)(void *),
 void *arg, void *private, caddr_t stack_base, size_t stack_size)
 {
-	void **sp;
+	uintptr_t sp;
 
 	getcontext(u);
 	u-uc_link = NULL;
@@ -58,13 +58,13 @@ _lwp_makecontext(ucontext_t *u, void (*s
 	u-uc_stack.ss_sp = stack_base;
 	u-uc_stack.ss_size = stack_size;
 
-	sp = (void *) (stack_base + stack_size);
+	sp = (uintptr_t)stack_base + stack_size;
 	/*
 	 * Note: We make sure the stack is 8-byte aligned, here.
 	 */
 
 	u-uc_mcontext.__gregs[_REG_R0] = (__greg_t)(uintptr_t)arg;
-	u-uc_mcontext.__gregs[_REG_SP] = ((__greg_t)(uintptr_t)sp)  ~7;
+	u-uc_mcontext.__gregs[_REG_SP] = ((__greg_t)sp)  ~7;
 	u-uc_mcontext.__gregs[_REG_LR] = (__greg_t)(uintptr_t)_lwp_exit;
 	u-uc_mcontext.__gregs[_REG_PC] = (__greg_t)(uintptr_t)start;
 	u-uc_mcontext._mc_tlsbase = (__greg_t)(uintptr_t)private;

Index: src/lib/libc/arch/sh3/gen/_lwp.c
diff -u src/lib/libc/arch/sh3/gen/_lwp.c:1.5 src/lib/libc/arch/sh3/gen/_lwp.c:1.6
--- src/lib/libc/arch/sh3/gen/_lwp.c:1.5	Thu Feb 24 04:28:42 2011
+++ src/lib/libc/arch/sh3/gen/_lwp.c	Thu Mar 22 09:32:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:42 joerg Exp $	*/
+/*	$NetBSD: _lwp.c,v 1.6 2012/03/22 09:32:04 he Exp $	*/
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:42 joerg Exp $);
+__RCSID($NetBSD: _lwp.c,v 1.6 2012/03/22 09:32:04 he Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -50,7 +50,7 @@ void
 _lwp_makecontext(ucontext_t *u, void (*start)(void *),
 void *arg, void *private, caddr_t stack_base, size_t stack_size)
 {
-	void **sp;
+	uintptr_t sp;
 
 	getcontext(u);
 	u-uc_link = NULL;
@@ -58,7 +58,7 @@ _lwp_makecontext(ucontext_t *u, void (*s
 	u-uc_stack.ss_sp = stack_base;
 	u-uc_stack.ss_size = stack_size;
 
-	sp = (void **) (stack_base + stack_size);
+	sp = (uintptr_t)stack_base + stack_size;
 
 	u-uc_mcontext.__gregs[_REG_R4] = (__greg_t) arg;
 	u-uc_mcontext.__gregs[_REG_SP] = ((__greg_t) sp)  ~3;



CVS commit: src/lib/csu/alpha

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 13:02:16 UTC 2012

Modified Files:
src/lib/csu/alpha: crt0.c

Log Message:
Convert to use c89 function declaration.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/csu/alpha/crt0.c

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

Modified files:

Index: src/lib/csu/alpha/crt0.c
diff -u src/lib/csu/alpha/crt0.c:1.26 src/lib/csu/alpha/crt0.c:1.27
--- src/lib/csu/alpha/crt0.c:1.26	Mon Mar  7 05:09:09 2011
+++ src/lib/csu/alpha/crt0.c	Thu Mar 22 13:02:15 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.26 2011/03/07 05:09:09 joerg Exp $ */
+/* $NetBSD: crt0.c,v 1.27 2012/03/22 13:02:15 he Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -40,11 +40,8 @@ void __start __P((char **, void (*cleanu
 		struct ps_strings *));
 
 void
-__start(sp, cleanup, obj, ps_strings)
-	char **sp;
-	void (*cleanup) __P((void));		/* from shared loader */
-	const Obj_Entry *obj;			/* from shared loader */
-	struct ps_strings *ps_strings;
+__start(char **sp, void (*cleanup)(void), 
+	const Obj_Entry *obj, struct ps_strings *ps_strings)
 {
 	long argc;
 	char **argv, *namep;
@@ -86,7 +83,7 @@ __start(sp, cleanup, obj, ps_strings)
  * NOTE: Leave the RCS ID _after_ __start(), in case it gets placed in .text.
  */
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: crt0.c,v 1.26 2011/03/07 05:09:09 joerg Exp $);
+__RCSID($NetBSD: crt0.c,v 1.27 2012/03/22 13:02:15 he Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include common.c



CVS commit: src/lib/libc/gdtoa

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 13:09:13 UTC 2012

Modified Files:
src/lib/libc/gdtoa: strtodg.c

Log Message:
A few fixes to make this build for vax:
 * The fivesbits[] variable is not used for vax
 * The decpt variable is only used if INFNAN_CHECK, which isn't
   defined for vax


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/gdtoa/strtodg.c

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

Modified files:

Index: src/lib/libc/gdtoa/strtodg.c
diff -u src/lib/libc/gdtoa/strtodg.c:1.9 src/lib/libc/gdtoa/strtodg.c:1.10
--- src/lib/libc/gdtoa/strtodg.c:1.9	Tue Mar 13 21:13:34 2012
+++ src/lib/libc/gdtoa/strtodg.c	Thu Mar 22 13:09:12 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: strtodg.c,v 1.9 2012/03/13 21:13:34 christos Exp $ */
+/* $NetBSD: strtodg.c,v 1.10 2012/03/22 13:09:12 he Exp $ */
 
 /
 
@@ -37,14 +37,13 @@ THIS SOFTWARE.
 #include locale.h
 #endif
 
+#ifndef VAX
  static CONST int
 fivesbits[] = {	 0,  3,  5,  7, 10, 12, 14, 17, 19, 21,
 		24, 26, 28, 31, 33, 35, 38, 40, 42, 45,
 		47, 49, 52
-#ifdef VAX
-		, 54, 56
-#endif
 		};
+#endif
 
  Bigint *
 #ifdef KR_headers
@@ -329,7 +328,10 @@ strtodg
 #endif
 {
 	int abe, abits, asub;
-	int bb0, bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, denorm;
+#ifdef INFNAN_CHECK
+	int decpt;
+#endif
+	int bb0, bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, denorm;
 	int dsign, e, e1, e2, emin, esign, finished, i, inex, irv;
 	int j, k, nbits, nd, nd0, nf, nz, nz0, rd, rvbits, rve, rve1, sign;
 	int sudden_underflow = 0; /* pacify gcc */
@@ -413,7 +415,10 @@ strtodg
 	sudden_underflow = fpi-sudden_underflow;
 	s0 = s;
 	y = z = 0;
-	for(decpt = nd = nf = 0; (c = *s) = '0'  c = '9'; nd++, s++)
+#ifdef INFNAN_CHECK
+	decpt = 0;
+#endif
+	for(nd = nf = 0; (c = *s) = '0'  c = '9'; nd++, s++)
 		if (nd  9)
 			y = 10*y + c - '0';
 		else if (nd  16)
@@ -430,7 +435,9 @@ strtodg
 	if (c == '.') {
 		c = *++s;
 #endif
+#ifdef INFNAN_CHECK
 		decpt = 1;
+#endif
 		if (!nd) {
 			for(; c == '0'; c = *++s)
 nz++;



CVS commit: src/lib/libc/gdtoa

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 13:15:48 UTC 2012

Modified Files:
src/lib/libc/gdtoa: strtod.c

Log Message:
A few modifications to make this build for vax:
 * The decpt variable is only used if INFNAN_CHECK, which isn't defined
   for vax.
 * Use a cast to avoid warning about shift of a signed variable.
 * Mark a condition as (potentially) a constant condition.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/gdtoa/strtod.c

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

Modified files:

Index: src/lib/libc/gdtoa/strtod.c
diff -u src/lib/libc/gdtoa/strtod.c:1.9 src/lib/libc/gdtoa/strtod.c:1.10
--- src/lib/libc/gdtoa/strtod.c:1.9	Tue Mar 13 21:13:34 2012
+++ src/lib/libc/gdtoa/strtod.c	Thu Mar 22 13:15:48 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: strtod.c,v 1.9 2012/03/13 21:13:34 christos Exp $ */
+/* $NetBSD: strtod.c,v 1.10 2012/03/22 13:15:48 he Exp $ */
 
 /
 
@@ -97,7 +97,10 @@ strtod
 #ifdef Avoid_Underflow
 	int scale;
 #endif
-	int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, dsign,
+#ifdef INFNAN_CHECK
+	int decpt;
+#endif
+	int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
 		 e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
 	CONST char *s, *s0, *s1;
 	double aadj;
@@ -148,7 +151,10 @@ strtod
 #endif /*}}*/
 #endif /*}*/
 
-	sign = nz0 = nz = decpt = 0;
+#ifdef INFNAN_CHECK
+	decpt = 0;
+#endif
+	sign = nz0 = nz = 0;
 	dval(rv) = 0.;
 	for(s = s00;;s++) switch(*s) {
 		case '-':
@@ -229,7 +235,9 @@ strtod
 	if (c == '.') {
 		c = *++s;
 #endif
+#ifdef INFNAN_CHECK
 		decpt = 1;
+#endif
 		if (!nd) {
 			for(; c == '0'; c = *++s)
 nz++;
@@ -552,7 +560,7 @@ strtod
 	word1(rv) = 0x  j;
 }
 #else
-			for(j = 0; e1  1; j++, e1 = 1)
+			for(j = 0; e1  1; j++, e1 = (unsigned int)e1  1)
 if (e1  1)
 	dval(rv) *= tinytens[j];
 			/* The last multiplication could underflow. */
@@ -957,6 +965,7 @@ strtod
 	dval(aadj1) += 0.5;
 }
 #else
+			/* CONSTCOND */
 			if (Flt_Rounds == 0)
 dval(aadj1) += 0.5;
 #endif /*Check_FLT_ROUNDS*/



CVS commit: src/lib/libc/gen

2012-03-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Mar 22 13:25:45 UTC 2012

Modified Files:
src/lib/libc/gen: modf_ieee754.c

Log Message:
Add a pair of casts to silence lint about conversion possibly losing bits.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/gen/modf_ieee754.c

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

Modified files:

Index: src/lib/libc/gen/modf_ieee754.c
diff -u src/lib/libc/gen/modf_ieee754.c:1.3 src/lib/libc/gen/modf_ieee754.c:1.4
--- src/lib/libc/gen/modf_ieee754.c:1.3	Wed Jan 27 14:10:41 2010
+++ src/lib/libc/gen/modf_ieee754.c	Thu Mar 22 13:25:45 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: modf_ieee754.c,v 1.3 2010/01/27 14:10:41 drochner Exp $ */
+/* $NetBSD: modf_ieee754.c,v 1.4 2012/03/22 13:25:45 he Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -92,8 +92,8 @@ modf(double val, double *iptr)
 	frac = ((u_int64_t)v.dblu_dbl.dbl_frach  32) + v.dblu_dbl.dbl_fracl;
 	frac = DBL_FRACBITS - (u.dblu_dbl.dbl_exp - DBL_EXP_BIAS);
 	frac = DBL_FRACBITS - (u.dblu_dbl.dbl_exp - DBL_EXP_BIAS);
-	v.dblu_dbl.dbl_fracl = frac  0x;
-	v.dblu_dbl.dbl_frach = frac  32;
+	v.dblu_dbl.dbl_fracl = (u_int) (frac  0xULL);
+	v.dblu_dbl.dbl_frach = (u_int) (frac  32);
 	*iptr = v.dblu_d;
 
 	u.dblu_d -= v.dblu_d;



  1   2   3   >