CVS commit: src

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jul  8 06:38:04 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/stdio: Makefile
Added Files:
src/tests/lib/libc/stdio: t_printf.c t_scanf.c
Removed Files:
src/tests/lib/libc/stdio: t_format.c

Log Message:
Split out 't_printf' and 't_scanf' from 't_format' to gain the common
"functional scope" for the test files.


To generate a diff of this commit:
cvs rdiff -u -r1.372 -r1.373 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/stdio/Makefile
cvs rdiff -u -r1.5 -r0 src/tests/lib/libc/stdio/t_format.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdio/t_printf.c \
src/tests/lib/libc/stdio/t_scanf.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.372 src/distrib/sets/lists/tests/mi:1.373
--- src/distrib/sets/lists/tests/mi:1.372	Thu Jul  7 15:53:27 2011
+++ src/distrib/sets/lists/tests/mi	Fri Jul  8 06:38:03 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.372 2011/07/07 15:53:27 jruoho Exp $
+# $NetBSD: mi,v 1.373 2011/07/08 06:38:03 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -434,8 +434,10 @@
 ./usr/libdata/debug/usr/tests/lib/libc/stdiotests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_clearerr.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_fmemopen.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/stdio/t_format.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdio/t_format.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_popen.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdio/t_printf.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdio/t_scanf.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlibtests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/h_atexit.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/h_getopt.debug		tests-lib-debug		debug,atf
@@ -2010,8 +2012,10 @@
 ./usr/tests/lib/libc/stdio/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdio/t_clearerr		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdio/t_fmemopen		tests-lib-tests		atf
-./usr/tests/lib/libc/stdio/t_format		tests-lib-tests		atf
+./usr/tests/lib/libc/stdio/t_format		tests-obsolete		obsolete
 ./usr/tests/lib/libc/stdio/t_popen		tests-lib-tests		atf
+./usr/tests/lib/libc/stdio/t_printf		tests-lib-tests		atf
+./usr/tests/lib/libc/stdio/t_scanf		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib			tests-lib-tests
 ./usr/tests/lib/libc/stdlib/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/h_atexit		tests-lib-tests		atf

Index: src/tests/lib/libc/stdio/Makefile
diff -u src/tests/lib/libc/stdio/Makefile:1.4 src/tests/lib/libc/stdio/Makefile:1.5
--- src/tests/lib/libc/stdio/Makefile:1.4	Sun May  1 16:36:37 2011
+++ src/tests/lib/libc/stdio/Makefile	Fri Jul  8 06:38:04 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2011/05/01 16:36:37 jruoho Exp $
+# $NetBSD: Makefile,v 1.5 2011/07/08 06:38:04 jruoho Exp $
 
 .include 
 
@@ -6,7 +6,8 @@
 
 TESTS_C+=	t_clearerr
 TESTS_C+=	t_fmemopen
-TESTS_C+=	t_format
 TESTS_C+=	t_popen
+TESTS_C+=	t_printf
+TESTS_C+=	t_scanf
 
 .include 

Added files:

Index: src/tests/lib/libc/stdio/t_printf.c
diff -u /dev/null src/tests/lib/libc/stdio/t_printf.c:1.1
--- /dev/null	Fri Jul  8 06:38:05 2011
+++ src/tests/lib/libc/stdio/t_printf.c	Fri Jul  8 06:38:04 2011
@@ -0,0 +1,81 @@
+/* $NetBSD: t_printf.c,v 1.1 2011/07/08 06:38:04 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HO

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

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul  8 05:55:23 UTC 2011

Modified Files:
src/sys/arch/mips/include: ieee.h

Log Message:
Add extu_fraclm and extu_frachm


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/include/ieee.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/mips/include/ieee.h
diff -u src/sys/arch/mips/include/ieee.h:1.6 src/sys/arch/mips/include/ieee.h:1.7
--- src/sys/arch/mips/include/ieee.h:1.6	Mon Jan 17 23:53:03 2011
+++ src/sys/arch/mips/include/ieee.h	Fri Jul  8 05:55:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee.h,v 1.6 2011/01/17 23:53:03 matt Exp $	*/
+/*	$NetBSD: ieee.h,v 1.7 2011/07/08 05:55:23 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -126,6 +126,8 @@
 #define extu_exp	extu_ext.ext_exp
 #define extu_sign	extu_ext.ext_sign
 #define extu_fracl	extu_ext.ext_fracl
+#define extu_fraclm	extu_ext.ext_fraclm
+#define extu_frachm	extu_ext.ext_frachm
 #define extu_frach	extu_ext.ext_frach
 
 #define LDBL_NBIT	0x8000



CVS commit: src/tests/lib

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jul  8 05:10:05 UTC 2011

Modified Files:
src/tests/lib/libc/stdlib: t_strtod.c
src/tests/lib/libm: t_infinity.c

Log Message:
Remove the amd64-part from the Qemu checks. The following tests fail also on
i386/qemu: 'strtold_inf', 'strtold_nan', and 'infinity_long_double'. It seems
that more than anything else, these are dependent on the used Qemu version.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libc/stdlib/t_strtod.c
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libm/t_infinity.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/libc/stdlib/t_strtod.c
diff -u src/tests/lib/libc/stdlib/t_strtod.c:1.23 src/tests/lib/libc/stdlib/t_strtod.c:1.24
--- src/tests/lib/libc/stdlib/t_strtod.c:1.23	Thu Jul  7 11:04:30 2011
+++ src/tests/lib/libc/stdlib/t_strtod.c	Fri Jul  8 05:10:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_strtod.c,v 1.23 2011/07/07 11:04:30 jruoho Exp $ */
+/*	$NetBSD: t_strtod.c,v 1.24 2011/07/08 05:10:05 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 /* Public domain, Otto Moerbeek , 2006. */
 
 #include 
-__RCSID("$NetBSD: t_strtod.c,v 1.23 2011/07/07 11:04:30 jruoho Exp $");
+__RCSID("$NetBSD: t_strtod.c,v 1.24 2011/07/08 05:10:05 jruoho Exp $");
 
 #include 
 
@@ -164,17 +164,12 @@
 #ifndef __vax__
 #   ifdef __HAVE_LONG_DOUBLE
 
-	struct utsname utsname;
-
 	/*
 	 * See the closed PR lib/33262.
 	 *
 	 * This may also fail under QEMU; cf. PR misc/44767.
 	 */
-	ATF_REQUIRE(uname(&utsname) == 0);
-
-	if (strcmp(utsname.machine, "amd64") == 0 &&
-	system("cpuctl identify 0 | grep -q QEMU") == 0)
+	if (system("cpuctl identify 0 | grep -q QEMU") == 0)
 		atf_tc_expect_fail("PR misc/44767");
 
 	for (size_t i = 0; i < __arraycount(inf_strings); i++) {
@@ -238,7 +233,6 @@
 #ifndef __vax__
 #   ifdef __HAVE_LONG_DOUBLE
 
-	struct utsname utsname;
 	char *end;
 
 	/*
@@ -246,10 +240,7 @@
 	 *
 	 * This may also fail under QEMU; cf. PR misc/44767.
 	 */
-	ATF_REQUIRE(uname(&utsname) == 0);
-
-	if (strcmp(utsname.machine, "amd64") == 0 &&
-	system("cpuctl identify 0 | grep -q QEMU") == 0)
+	if (system("cpuctl identify 0 | grep -q QEMU") == 0)
 		atf_tc_expect_fail("PR misc/44767");
 
 	long double ld = strtold(nan_string, &end);

Index: src/tests/lib/libm/t_infinity.c
diff -u src/tests/lib/libm/t_infinity.c:1.4 src/tests/lib/libm/t_infinity.c:1.5
--- src/tests/lib/libm/t_infinity.c:1.4	Thu Jul  7 11:04:30 2011
+++ src/tests/lib/libm/t_infinity.c	Fri Jul  8 05:10:05 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_infinity.c,v 1.4 2011/07/07 11:04:30 jruoho Exp $ */
+/* $NetBSD: t_infinity.c,v 1.5 2011/07/08 05:10:05 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -29,15 +29,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_infinity.c,v 1.4 2011/07/07 11:04:30 jruoho Exp $");
-
-#include 
+__RCSID("$NetBSD: t_infinity.c,v 1.5 2011/07/08 05:10:05 jruoho Exp $");
 
 #include 
 #include 
 #include 
 #include 
-#include 
 
 ATF_TC(infinity_float);
 ATF_TC_HEAD(infinity_float, tc)
@@ -92,15 +89,10 @@
 
 ATF_TC_BODY(infinity_long_double, tc)
 {
-	struct utsname utsname;
-
 	/*
 	 * May fail under QEMU; cf. PR misc/44767.
 	 */
-	ATF_REQUIRE(uname(&utsname) == 0);
-
-	if (strcmp(utsname.machine, "amd64") == 0 &&
-	system("cpuctl identify 0 | grep -q QEMU") == 0)
+	if (system("cpuctl identify 0 | grep -q QEMU") == 0)
 		atf_tc_expect_fail("PR misc/44767");
 
 #ifndef LDBL_MAX



CVS commit: src/share/mk

2011-07-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jul  8 03:29:53 UTC 2011

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

Log Message:
# XXX GCC 4.5 for dreamcast is extra noisy for cases it should be better with
workaround via: CFLAGS+=  -Wno-uninitialized


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/share/mk/bsd.sys.mk

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

Modified files:

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.205 src/share/mk/bsd.sys.mk:1.206
--- src/share/mk/bsd.sys.mk:1.205	Wed Jun 29 08:10:05 2011
+++ src/share/mk/bsd.sys.mk	Fri Jul  8 03:29:52 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.205 2011/06/29 08:10:05 mrg Exp $
+#	$NetBSD: bsd.sys.mk,v 1.206 2011/07/08 03:29:52 mrg Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -63,6 +63,10 @@
 CFLAGS+=	-Wsign-compare
 CFLAGS+=	${${ACTIVE_CC} == "clang":? -Wpointer-sign :}
 .endif
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 45 && ${MACHINE} == "dreamcast"
+# XXX GCC 4.5 for dreamcast is extra noisy for cases it should be better with
+CFLAGS+=	-Wno-uninitialized
+.endif
 .endif
 
 CWARNFLAGS+=	${CWARNFLAGS.${ACTIVE_CC}}



CVS commit: src/sys/dev/spi

2011-07-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jul  8 03:29:15 UTC 2011

Modified Files:
src/sys/dev/spi: spi.c

Log Message:
initialise chuck_rptr as well, instead of chuck_read twice.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/spi/spi.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/spi/spi.c
diff -u src/sys/dev/spi/spi.c:1.5 src/sys/dev/spi/spi.c:1.6
--- src/sys/dev/spi/spi.c:1.5	Wed Jun  8 23:05:48 2011
+++ src/sys/dev/spi/spi.c	Fri Jul  8 03:29:15 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: spi.c,v 1.5 2011/06/08 23:05:48 rmind Exp $ */
+/* $NetBSD: spi.c,v 1.6 2011/07/08 03:29:15 mrg Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.5 2011/06/08 23:05:48 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.6 2011/07/08 03:29:15 mrg Exp $");
 
 #include "locators.h"
 
@@ -228,7 +228,7 @@
 {
 
 	chunk->chunk_write = chunk->chunk_wptr = wptr;
-	chunk->chunk_read = chunk->chunk_read = rptr;
+	chunk->chunk_read = chunk->chunk_rptr = rptr;
 	chunk->chunk_rresid = chunk->chunk_wresid = chunk->chunk_count = cnt;
 	chunk->chunk_next = NULL;
 }



CVS commit: src/sys/sys

2011-07-07 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  8 03:24:42 UTC 2011

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

Log Message:
Update bus_space_tag_create(9) declaration.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/bus.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/bus.h
diff -u src/sys/sys/bus.h:1.5 src/sys/sys/bus.h:1.6
--- src/sys/sys/bus.h:1.5	Wed Jul  6 20:24:21 2011
+++ src/sys/sys/bus.h	Fri Jul  8 03:24:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.5 2011/07/06 20:24:21 dyoung Exp $	*/
+/*	$NetBSD: bus.h,v 1.6 2011/07/08 03:24:42 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -121,7 +121,7 @@
 
 bool	bus_space_handle_is_equal(bus_space_tag_t, bus_space_handle_t,
 bus_space_handle_t);
-int	bus_space_tag_create(bus_space_tag_t, uint64_t,
+int	bus_space_tag_create(bus_space_tag_t, uint64_t, uint64_t,
 	 const struct bus_space_overrides *, void *,
 	 bus_space_tag_t *);
 void	bus_space_tag_destroy(bus_space_tag_t);



CVS commit: src/sys/arch/x86/x86

2011-07-07 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  8 03:23:14 UTC 2011

Modified Files:
src/sys/arch/x86/x86: bus_space.c

Log Message:
Bring bus_space_tag_create(9) up-to-date with doco.

Fix overrides of bus_space_unmap(9) et cetera.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/x86/bus_space.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/x86/x86/bus_space.c
diff -u src/sys/arch/x86/x86/bus_space.c:1.34 src/sys/arch/x86/x86/bus_space.c:1.35
--- src/sys/arch/x86/x86/bus_space.c:1.34	Wed Jul  6 18:46:04 2011
+++ src/sys/arch/x86/x86/bus_space.c	Fri Jul  8 03:23:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.34 2011/07/06 18:46:04 dyoung Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.35 2011/07/08 03:23:14 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.34 2011/07/06 18:46:04 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.35 2011/07/08 03:23:14 dyoung Exp $");
 
 #include 
 #include 
@@ -158,14 +158,15 @@
 		int flags, bus_space_handle_t *bshp)
 {
 	bus_space_reservation_t bsr;
+	bus_space_tag_t it;
 	int error;
 
-	if ((t->bst_present & BUS_SPACE_OVERRIDE_MAP) != 0) {
-		return (*t->bst_ov->ov_space_map)(t->bst_ctx, t, bpa, size,
+	for (it = t; it != NULL; it = it->bst_super) {
+		if ((it->bst_present & BUS_SPACE_OVERRIDE_MAP) == 0)
+			continue;
+		return (*it->bst_ov->ov_space_map)(it->bst_ctx, t, bpa, size,
 		flags, bshp);
 	}
-	if (t->bst_super != NULL)
-		return bus_space_map(t->bst_super, bpa, size, flags, bshp);
 
 	error = bus_space_reserve(t, bpa, size, flags, &bsr);
 	if (error != 0)
@@ -184,13 +185,12 @@
 {
 	bus_addr_t bpa;
 	bus_size_t size;
+	bus_space_tag_t it;
 
-	if ((t->bst_present & BUS_SPACE_OVERRIDE_RESERVATION_MAP) != 0) {
-		return (*t->bst_ov->ov_space_reservation_map)(t->bst_ctx, t,
-		bsr, flags, bshp);
-	}
-	if (t->bst_super != NULL) {
-		return bus_space_reservation_map(t->bst_super,
+	for (it = t; it != NULL; it = it->bst_super) {
+		if ((it->bst_present & BUS_SPACE_OVERRIDE_RESERVATION_MAP) == 0)
+			continue;
+		return (*it->bst_ov->ov_space_reservation_map)(it->bst_ctx, t,
 		bsr, flags, bshp);
 	}
 
@@ -249,13 +249,14 @@
 {
 	struct extent *ex;
 	int error;
+	bus_space_tag_t it;
 
-	if ((t->bst_present & BUS_SPACE_OVERRIDE_RESERVE) != 0) {
-		return (*t->bst_ov->ov_space_reserve)(t->bst_ctx, t,
+	for (it = t; it != NULL; it = it->bst_super) {
+		if ((it->bst_present & BUS_SPACE_OVERRIDE_RESERVE) == 0)
+			continue;
+		return (*it->bst_ov->ov_space_reserve)(it->bst_ctx, t,
 		bpa, size, flags, bsrp);
 	}
-	if (t->bst_super != NULL)
-		return bus_space_reserve(t->bst_super, bpa, size, flags, bsrp);
 
 	/*
 	 * Pick the appropriate extent map.
@@ -294,13 +295,15 @@
 	struct extent *ex;
 	u_long bpa;
 	int error;
+	bus_space_tag_t it;
 
-	if ((t->bst_present & BUS_SPACE_OVERRIDE_RESERVE_SUBREGION) != 0) {
-		return (*t->bst_ov->ov_space_reserve_subregion)(t->bst_ctx, t,
+	for (it = t; it != NULL; it = it->bst_super) {
+		if ((it->bst_present & BUS_SPACE_OVERRIDE_RESERVE_SUBREGION) ==
+		0)
+			continue;
+		return (*it->bst_ov->ov_space_reserve_subregion)(it->bst_ctx, t,
 		rstart, rend, size, alignment, boundary, flags, bsrp);
 	}
-	if (t->bst_super != NULL)
-		return bus_space_reserve(t->bst_super, bpa, size, flags, bsrp);
 
 	/*
 	 * Pick the appropriate extent map.
@@ -344,15 +347,15 @@
 bus_space_release(bus_space_tag_t t, bus_space_reservation_t *bsr)
 {
 	struct extent *ex;
+	bus_space_tag_t it;
 
-	if ((t->bst_present & BUS_SPACE_OVERRIDE_RELEASE) != 0) {
-		(*t->bst_ov->ov_space_release)(t->bst_ctx, t, bsr);
-		return;
-	}
-	if (t->bst_super != NULL) {
-		bus_space_release(t->bst_super, bsr);
+	for (it = t; it != NULL; it = it->bst_super) {
+		if ((it->bst_present & BUS_SPACE_OVERRIDE_RELEASE) == 0)
+			continue;
+		(*it->bst_ov->ov_space_release)(it->bst_ctx, t, bsr);
 		return;
 	}
+
 	/*
 	 * Pick the appropriate extent map.
 	 */
@@ -379,15 +382,14 @@
 		int flags, bus_addr_t *bpap, bus_space_handle_t *bshp)
 {
 	bus_space_reservation_t bsr;
+	bus_space_tag_t it;
 	int error;
 
-	if ((t->bst_present & BUS_SPACE_OVERRIDE_ALLOC) != 0) {
-		return (*t->bst_ov->ov_space_alloc)(t->bst_ctx, t, rstart, rend,
-		size, alignment, boundary, flags, bpap, bshp);
-	}
-	if (t->bst_super != NULL) {
-		return bus_space_alloc(t->bst_super, rstart, rend, size,
-		alignment, boundary, flags, bpap, bshp);
+	for (it = t; it != NULL; it = it->bst_super) {
+		if ((it->bst_present & BUS_SPACE_OVERRIDE_ALLOC) == 0)
+			continue;
+		return (*it->bst_ov->ov_space_alloc)(it->bst_ctx, t,
+		rstart, rend, size, alignment, boundary, flags, bpap, bshp);
 	}
 
 	/*
@@ -567,15 +569,16 @@
 bus_space_reservation_unmap(bus_space_tag_t t, const bus_space_handle_t bsh,
 cons

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

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 22:52:48 UTC 2011

Modified Files:
src/sys/arch/mips/include: float.h

Log Message:
Include  to get __GNUC_PREREQ__


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/include/float.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/mips/include/float.h
diff -u src/sys/arch/mips/include/float.h:1.15 src/sys/arch/mips/include/float.h:1.16
--- src/sys/arch/mips/include/float.h:1.15	Thu Jul  7 17:29:31 2011
+++ src/sys/arch/mips/include/float.h	Thu Jul  7 22:52:48 2011
@@ -1,8 +1,10 @@
-/*	$NetBSD: float.h,v 1.15 2011/07/07 17:29:31 matt Exp $ */
+/*	$NetBSD: float.h,v 1.16 2011/07/07 22:52:48 matt Exp $ */
 
 #ifndef _MIPS_FLOAT_H_
 #define _MIPS_FLOAT_H_
 
+#include 
+
 #if defined(__mips_n32) || defined(__mips_n64)
 
 #if __GNUC_PREREQ__(4,1)



CVS commit: src

2011-07-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Jul  7 21:59:15 UTC 2011

Modified Files:
src/external/bsd/llvm: Makefile.inc
src/external/bsd/llvm/bin/clang: Makefile
src/external/bsd/llvm/bin/llc: Makefile
src/external/bsd/llvm/bin/llvm-mc: Makefile
src/external/bsd/llvm/lib: Makefile
src/external/bsd/llvm/lib/libLLVMMipsCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMTransformsUtils: Makefile
src/external/bsd/llvm/lib/libLLVMX86MCTargetDesc: Makefile
Added Files:
src/external/bsd/llvm/lib/libLLVMARMMCTargetDesc: Makefile
src/tools/llvm-lib/libLLVMARMMCTargetDesc: Makefile

Log Message:
Update LLVM/Clang snapshot to r134635. This reduces the memory usage in
preprocessor heavy code and recognizes mipseb as alias for mips.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/llvm/Makefile.inc
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/llvm/bin/clang/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/llvm/bin/llc/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/llvm/bin/llvm-mc/Makefile
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/llvm/lib/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/llvm/lib/libLLVMARMMCTargetDesc/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/llvm/lib/libLLVMX86MCTargetDesc/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/llvm-lib/libLLVMARMMCTargetDesc/Makefile

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

Modified files:

Index: src/external/bsd/llvm/Makefile.inc
diff -u src/external/bsd/llvm/Makefile.inc:1.14 src/external/bsd/llvm/Makefile.inc:1.15
--- src/external/bsd/llvm/Makefile.inc:1.14	Tue Jul  5 23:02:31 2011
+++ src/external/bsd/llvm/Makefile.inc	Thu Jul  7 21:59:14 2011
@@ -1,12 +1,12 @@
-#	$NetBSD: Makefile.inc,v 1.14 2011/07/05 23:02:31 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.15 2011/07/07 21:59:14 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
 
 .include 
 
-LLVM_REVISION=	134438
-CLANG_REVISION=	134438
+LLVM_REVISION=	134635
+CLANG_REVISION=	134635
 
 LLVM_SRCDIR:=	${.PARSEDIR}/dist/llvm
 CLANG_SRCDIR:=	${.PARSEDIR}/dist/clang

Index: src/external/bsd/llvm/bin/clang/Makefile
diff -u src/external/bsd/llvm/bin/clang/Makefile:1.10 src/external/bsd/llvm/bin/clang/Makefile:1.11
--- src/external/bsd/llvm/bin/clang/Makefile:1.10	Tue Jul  5 19:37:10 2011
+++ src/external/bsd/llvm/bin/clang/Makefile	Thu Jul  7 21:59:14 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2011/07/05 19:37:10 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2011/07/07 21:59:14 joerg Exp $
 
 PROG_CXX=	clang
 NOMAN=		yes
@@ -40,6 +40,7 @@
 	BitWriter \
 	ARMCodeGen \
 	ARMTargetInfo \
+	ARMMCTargetDesc \
 	ARMAsmParser \
 	ARMAsmPrinter \
 	MipsCodeGen \

Index: src/external/bsd/llvm/bin/llc/Makefile
diff -u src/external/bsd/llvm/bin/llc/Makefile:1.6 src/external/bsd/llvm/bin/llc/Makefile:1.7
--- src/external/bsd/llvm/bin/llc/Makefile:1.6	Tue Jul  5 19:37:10 2011
+++ src/external/bsd/llvm/bin/llc/Makefile	Thu Jul  7 21:59:14 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2011/07/05 19:37:10 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2011/07/07 21:59:14 joerg Exp $
 
 PROG_CXX=	llc
 NOMAN=		yes
@@ -15,6 +15,7 @@
 	BitReader \
 	ARMCodeGen \
 	ARMTargetInfo \
+	ARMMCTargetDesc \
 	ARMAsmParser \
 	ARMAsmPrinter \
 	MipsCodeGen \

Index: src/external/bsd/llvm/bin/llvm-mc/Makefile
diff -u src/external/bsd/llvm/bin/llvm-mc/Makefile:1.6 src/external/bsd/llvm/bin/llvm-mc/Makefile:1.7
--- src/external/bsd/llvm/bin/llvm-mc/Makefile:1.6	Tue Jul  5 19:37:10 2011
+++ src/external/bsd/llvm/bin/llvm-mc/Makefile	Thu Jul  7 21:59:15 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2011/07/05 19:37:10 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2011/07/07 21:59:15 joerg Exp $
 
 PROG_CXX=	llvm-mc
 NOMAN=		yes
@@ -14,6 +14,7 @@
 	MCDisassembler \
 	ARMCodeGen \
 	ARMTargetInfo \
+	ARMMCTargetDesc \
 	ARMAsmParser \
 	ARMAsmPrinter \
 	ARMDisassembler \

Index: src/external/bsd/llvm/lib/Makefile
diff -u src/external/bsd/llvm/lib/Makefile:1.12 src/external/bsd/llvm/lib/Makefile:1.13
--- src/external/bsd/llvm/lib/Makefile:1.12	Thu Jul  7 21:46:50 2011
+++ src/external/bsd/llvm/lib/Makefile	Thu Jul  7 21:59:15 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2011/07/07 21:46:50 joerg Exp $
+# $NetBSD: Makefile,v 1.13 2011/07/07 21:59:15 joerg Exp $
 
 .include 
 
@@ -36,6 +36,7 @@
 	libLLVMARMAsmParser \
 	libLLVMARMAsmPrinter \
 	libLLVMARMDisassembler \
+	libLLVMARMMCTargetDesc \
 	libLLVMARMTargetInfo
 
 SUBDIR+= \

Index: src/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile
diff -u src/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile:1.1 src/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile:1.2
--- src/external/bsd/llvm/lib/libLLVMMipsCodeGen/Ma

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

2011-07-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Jul  7 21:46:50 UTC 2011

Modified Files:
src/external/bsd/llvm/lib: Makefile

Log Message:
Invert def/undef condition to make LLVM_DEVELOPER=yes work as expected.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/llvm/lib/Makefile

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

Modified files:

Index: src/external/bsd/llvm/lib/Makefile
diff -u src/external/bsd/llvm/lib/Makefile:1.11 src/external/bsd/llvm/lib/Makefile:1.12
--- src/external/bsd/llvm/lib/Makefile:1.11	Tue Jul  5 19:37:11 2011
+++ src/external/bsd/llvm/lib/Makefile	Thu Jul  7 21:46:50 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2011/07/05 19:37:11 joerg Exp $
+# $NetBSD: Makefile,v 1.12 2011/07/07 21:46:50 joerg Exp $
 
 .include 
 
@@ -55,7 +55,7 @@
 	libLLVMX86TargetInfo \
 	libLLVMX86Utils
 
-.if ${NO_LLVM_DEVELOPER:Dno} == "yes" && ${LLVM_DEVELOPER:U} == "yes"
+.if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes"
 SUBDIR+= \
 	libLLVMArchive \
 	libLLVMCBackend \



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

2011-07-07 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Jul  7 20:35:27 UTC 2011

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

Log Message:
Ticket #1647


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.43 -r1.1.2.44 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.43 src/doc/CHANGES-5.0.3:1.1.2.44
--- src/doc/CHANGES-5.0.3:1.1.2.43	Sat Jun 18 16:44:07 2011
+++ src/doc/CHANGES-5.0.3	Thu Jul  7 20:35:27 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.43 2011/06/18 16:44:07 bouyer Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.44 2011/07/07 20:35:27 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2779,3 +2779,23 @@
 	external phy.
 	[jdc, ticket #1632]
 
+dist/bind/CHANGESpatch
+dist/bind/versionpatch
+dist/bind/lib/dns/apipatch
+dist/bind/lib/dns/masterdump.c			patch
+dist/bind/lib/dns/message.c			patch
+dist/bind/lib/dns/ncache.c			patch
+dist/bind/lib/dns/nsec3.c			patch
+dist/bind/lib/dns/rbtdb.c			patch
+dist/bind/lib/dns/rdataset.c			patch
+dist/bind/lib/dns/resolver.c			patch
+dist/bind/lib/dns/validator.c			patch
+dist/bind/lib/dns/include/dns/rdataset.h	patch
+distrib/sets/lists/base/md.amd64		patch
+distrib/sets/lists/base/md.sparc64		patch
+distrib/sets/lists/base/shl.mi			patch
+lib/libdns/shlib_version			patch
+
+	Update bind to 9.7.3-P3 fixing CVE-2011-2464
+	[spz, ticket #1647]
+



CVS commit: [netbsd-5-0] src

2011-07-07 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Jul  7 20:27:43 UTC 2011

Modified Files:
src/dist/bind [netbsd-5-0]: CHANGES version
src/dist/bind/lib/dns [netbsd-5-0]: api masterdump.c message.c ncache.c
nsec3.c rbtdb.c rdataset.c resolver.c validator.c
src/dist/bind/lib/dns/include/dns [netbsd-5-0]: rdataset.h
src/distrib/sets/lists/base [netbsd-5-0]: md.amd64 md.sparc64 shl.mi
src/lib/libdns [netbsd-5-0]: shlib_version

Log Message:
Pull up the following revisions(s) (requested by spz in ticket #1647):
dist/bind/CHANGES:  patch
dist/bind/version:  patch
dist/bind/lib/dns/api:  patch
dist/bind/lib/dns/masterdump.c: patch
dist/bind/lib/dns/message.c:patch
dist/bind/lib/dns/ncache.c: patch
dist/bind/lib/dns/nsec3.c:  patch
dist/bind/lib/dns/rbtdb.c:  patch
dist/bind/lib/dns/rdataset.c:   patch
dist/bind/lib/dns/resolver.c:   patch
dist/bind/lib/dns/validator.c:  patch
dist/bind/lib/dns/include/dns/rdataset.h:   patch
distrib/sets/lists/base/md.amd64:   patch
distrib/sets/lists/base/md.sparc64: patch
distrib/sets/lists/base/shl.mi: patch
lib/libdns/shlib_version:   patch

Update bind to 9.7.3-P3 fixing CVE-2011-2464


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.11.8.4 -r1.1.1.11.8.5 src/dist/bind/CHANGES \
src/dist/bind/version
cvs rdiff -u -r1.1.1.9.8.3 -r1.1.1.9.8.4 src/dist/bind/lib/dns/api
cvs rdiff -u -r1.1.1.6.8.3 -r1.1.1.6.8.4 src/dist/bind/lib/dns/masterdump.c
cvs rdiff -u -r1.5.8.3 -r1.5.8.4 src/dist/bind/lib/dns/message.c
cvs rdiff -u -r1.1.1.5.8.2 -r1.1.1.5.8.3 src/dist/bind/lib/dns/ncache.c
cvs rdiff -u -r1.1.6.3 -r1.1.6.4 src/dist/bind/lib/dns/nsec3.c
cvs rdiff -u -r1.1.1.6.8.4 -r1.1.1.6.8.5 src/dist/bind/lib/dns/rbtdb.c
cvs rdiff -u -r1.1.1.5.8.3 -r1.1.1.5.8.4 src/dist/bind/lib/dns/rdataset.c
cvs rdiff -u -r1.8.8.4 -r1.8.8.5 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.6.8.4 -r1.6.8.5 src/dist/bind/lib/dns/validator.c
cvs rdiff -u -r1.1.1.5.8.3 -r1.1.1.5.8.4 \
src/dist/bind/lib/dns/include/dns/rdataset.h
cvs rdiff -u -r1.25.2.2.2.4 -r1.25.2.2.2.5 \
src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.23.2.2.2.4 -r1.23.2.2.2.5 \
src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.450.2.1.2.4 -r1.450.2.1.2.5 \
src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.3.6.2 -r1.3.6.3 src/lib/libdns/shlib_version

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/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.11.8.4 src/dist/bind/CHANGES:1.1.1.11.8.5
--- src/dist/bind/CHANGES:1.1.1.11.8.4	Sat Jun 18 11:34:49 2011
+++ src/dist/bind/CHANGES	Thu Jul  7 20:27:41 2011
@@ -1,3 +1,16 @@
+	--- 9.7.3-P3 released ---
+
+3124.	[bug]		Use an rdataset attribute flag to indicate
+			negative-cache records rather than using rrtype 0;
+			this will prevent problems when that rrtype is
+			used in actual DNS packets.  [RT #24777]
+
+	--- 9.7.3-P2 released (withdrawn) ---
+
+3123.	[security]	Change #2912 exposed a latent flaw in
+			dns_rdataset_totext() that could cause named to
+			crash with an assertion failure. [RT #24777]
+
 	--- 9.7.3-P1 released ---
 
 3121.   [security]  An authoritative name server sending a negative
Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.11.8.4 src/dist/bind/version:1.1.1.11.8.5
--- src/dist/bind/version:1.1.1.11.8.4	Sat Jun 18 11:34:55 2011
+++ src/dist/bind/version	Thu Jul  7 20:27:41 2011
@@ -1,4 +1,4 @@
-# Id: version,v 1.51.2.11.12.1 2011-05-27 00:43:04 each Exp
+# Id: version,v 1.51.2.11.12.3 2011-06-21 20:36:58 each Exp 
 # 
 # This file must follow /bin/sh rules.  It is imported directly via
 # configure.
@@ -7,4 +7,4 @@
 MINORVER=7
 PATCHVER=3
 RELEASETYPE=-P
-RELEASEVER=1
+RELEASEVER=3

Index: src/dist/bind/lib/dns/api
diff -u src/dist/bind/lib/dns/api:1.1.1.9.8.3 src/dist/bind/lib/dns/api:1.1.1.9.8.4
--- src/dist/bind/lib/dns/api:1.1.1.9.8.3	Sat Jun 18 11:36:49 2011
+++ src/dist/bind/lib/dns/api	Thu Jul  7 20:27:41 2011
@@ -1,3 +1,3 @@
 LIBINTERFACE = 70
-LIBREVISION = 3
+LIBREVISION = 4
 LIBAGE = 1

Index: src/dist/bind/lib/dns/masterdump.c
diff -u src/dist/bind/lib/dns/masterdump.c:1.1.1.6.8.3 src/dist/bind/lib/dns/masterdump.c:1.1.1.6.8.4
--- src/dist/bind/lib/dns/masterdump.c:1.1.1.6.8.3	Sat Jun 18 11:36:53 2011
+++ src/dist/bind/lib/dns/masterdump.c	Thu Jul  7 20:27:41 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: masterdump.c,v 1.1.1.6.8.3 2011/06/18 11:36:53 bouyer Exp $	*/
+/*	$NetBSD: masterdump.c,v 1.1.1.6.8.4 2011/07/07 20:27:41 sborrill Exp

CVS commit: src/tests/lib/libc/sys

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 19:29:58 UTC 2011

Modified Files:
src/tests/lib/libc/sys: Makefile

Log Message:
Fix previous.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/sys/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/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.5 src/tests/lib/libc/sys/Makefile:1.6
--- src/tests/lib/libc/sys/Makefile:1.5	Thu Jul  7 07:06:21 2011
+++ src/tests/lib/libc/sys/Makefile	Thu Jul  7 19:29:58 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2011/07/07 07:06:21 jruoho Exp $
+# $NetBSD: Makefile,v 1.6 2011/07/07 19:29:58 jruoho Exp $
 
 MKMAN=	no
 
@@ -42,7 +42,7 @@
 TESTS_C+=		t_unlink
 
 LDADD.t_getpid+=-lpthread
-LDADD.t_timer+= -lpthread
+LDADD.t_timer_create+=  -lpthread
 
 WARNS=			4
 



CVS commit: src/sys/sys

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 18:23:18 UTC 2011

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

Log Message:
Use a builtin __FOO__ for FOO if >= GCC 3.3
If C99, use hex floating point.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/float_ieee754.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/float_ieee754.h
diff -u src/sys/sys/float_ieee754.h:1.8 src/sys/sys/float_ieee754.h:1.9
--- src/sys/sys/float_ieee754.h:1.8	Sun Dec 11 12:25:20 2005
+++ src/sys/sys/float_ieee754.h	Thu Jul  7 18:23:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: float_ieee754.h,v 1.8 2005/12/11 12:25:20 christos Exp $	*/
+/*	$NetBSD: float_ieee754.h,v 1.9 2011/07/07 18:23:18 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,33 +57,72 @@
 defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
 #ifndef FLT_EVAL_METHOD
 #if __GNUC_PREREQ__(3, 3)
-#define	FLT_EVAL_METHOD	__FLT_EVAL_METHOD__
+#define FLT_EVAL_METHOD	__FLT_EVAL_METHOD__
 #endif /* GCC >= 3.3 */
 #endif /* defined(FLT_EVAL_METHOD) */
 #endif /* !defined(_ANSI_SOURCE) && ... */
 
+#if __GNUC_PREREQ__(3, 3)
+/*
+ * GCC 3,3 and later provide builtins for the FLT, DBL, and LDBL constants.
+ */
+#define FLT_RADIX	__FLT_RADIX__
+
+#define FLT_MANT_DIG	__FLT_MANT_DIG__
+#define FLT_EPSILON	__FLT_EPSILON__
+#define FLT_DIG		__FLT_DIG__
+#define FLT_MIN_EXP	__FLT_MIN_EXP__
+#define FLT_MIN		__FLT_MIN__
+#define FLT_MIN_10_EXP	__FLT_MIN_10_EXP__
+#define FLT_MAX_EXP	__FLT_MAX_EXP__
+#define FLT_MAX		__FLT_MAX__
+#define FLT_MAX_10_EXP	__FLT_MAX_10_EXP__
+
+#define DBL_MANT_DIG	__DBL_MANT_DIG__
+#define DBL_EPSILON	__DBL_EPSILON__
+#define DBL_DIG		__DBL_DIG__
+#define DBL_MIN_EXP	__DBL_MIN_EXP__
+#define DBL_MIN		__DBL_MIN__
+#define DBL_MIN_10_EXP	__DBL_MIN_10_EXP__
+#define DBL_MAX_EXP	__DBL_MAX_EXP__
+#define DBL_MAX		__DBL_MAX__
+#define DBL_MAX_10_EXP	__DBL_MAX_10_EXP__
+#else /* GCC < 3.3 */
 #define FLT_RADIX	2		/* b */
 
 #define FLT_MANT_DIG	24		/* p */
-#define FLT_EPSILON	1.19209290E-7F	/* b**(1-p) */
 #define FLT_DIG		6		/* floor((p-1)*log10(b))+(b == 10) */
 #define FLT_MIN_EXP	(-125)		/* emin */
-#define FLT_MIN		1.17549435E-38F	/* b**(emin-1) */
 #define FLT_MIN_10_EXP	(-37)		/* ceil(log10(b**(emin-1))) */
 #define FLT_MAX_EXP	128		/* emax */
-#define FLT_MAX		3.40282347E+38F	/* (1-b**(-p))*b**emax */
 #define FLT_MAX_10_EXP	38		/* floor(log10((1-b**(-p))*b**emax)) */
+#if __STDC_VERSION__ >= 199901L
+#define FLT_EPSILON	0x1.0p-23F
+#define FLT_MIN		0x1.0p-126F
+#define FLT_MAX		0x1.fep+127F
+#else
+#define FLT_EPSILON	1.19209290E-7F	/* b**(1-p) */
+#define FLT_MIN		1.17549435E-38F	/* b**(emin-1) */
+#define FLT_MAX		3.40282347E+38F	/* (1-b**(-p))*b**emax */
+#endif
 
 #define DBL_MANT_DIG	53
-#define DBL_EPSILON	2.2204460492503131E-16
 #define DBL_DIG		15
 #define DBL_MIN_EXP	(-1021)
-#define DBL_MIN		2.2250738585072014E-308
 #define DBL_MIN_10_EXP	(-307)
 #define DBL_MAX_EXP	1024
-#define DBL_MAX		1.7976931348623157E+308
 #define DBL_MAX_10_EXP	308
 
+#if __STDC_VERSION__ >= 199901L
+#define DBL_EPSILON	0x1.0p-52
+#define DBL_MIN		0x1.0p-1022
+#define DBL_MAX		0x1.fp+1023
+#else
+#define DBL_EPSILON	2.2204460492503131E-16
+#define DBL_MIN		2.2250738585072014E-308
+#define DBL_MAX		1.7976931348623157E+308
+#endif
+#endif /* GCC < 3.3 */
 /*
  * If no extended-precision type is defined by the machine-dependent
  * header including this, default to `long double' being double-precision.
@@ -104,7 +143,11 @@
 ((_POSIX_C_SOURCE - 0) >= 200112L) || \
 ((_XOPEN_SOURCE  - 0) >= 600) || \
 defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
-#define	DECIMAL_DIG	17		/* ceil((1+p*log10(b))-(b==10) */
+#if __GNUC_PREREQ__(3, 3)
+#define DECIMAL_DIG	__DECIMAL_DIG__
+#else
+#define DECIMAL_DIG	17		/* ceil((1+p*log10(b))-(b==10) */
+#endif
 #endif /* !defined(_ANSI_SOURCE) && ... */
 #endif /* LDBL_MANT_DIG */
 



CVS commit: src/crypto/external/bsd/openssl/dist/ssl

2011-07-07 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Jul  7 18:11:19 UTC 2011

Modified Files:
src/crypto/external/bsd/openssl/dist/ssl: s3_lib.c s3_pkt.c s3_srvr.c
ssl_locl.h

Log Message:
remove SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION -- openssl uses
another mechanism now, and these remainders break renogotiation with
(at least) tor and postgres


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssl/dist/ssl/ssl_locl.h

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c
diff -u src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c:1.5 src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c:1.6
--- src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c:1.5	Sun Jun  5 23:09:48 2011
+++ src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c	Thu Jul  7 18:11:18 2011
@@ -3727,9 +3727,6 @@
 	if (s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)
 		return(0);
 
-	if (!(s->s3->flags & SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION))
-		return(0);
-
 	s->s3->renegotiate=1;
 	return(1);
 	}

Index: src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c
diff -u src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c:1.8 src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c:1.9
--- src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c:1.8	Sun Jun  5 23:09:48 2011
+++ src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c	Thu Jul  7 18:11:19 2011
@@ -1108,7 +1108,6 @@
 
 		if (SSL_is_init_finished(s) &&
 			!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) &&
-			(s->s3->flags & SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION) &&
 			!s->s3->renegotiate)
 			{
 			ssl3_renegotiate(s);
@@ -1278,8 +1277,7 @@
 	if ((s->s3->handshake_fragment_len >= 4) &&	!s->in_handshake)
 		{
 		if (((s->state&SSL_ST_MASK) == SSL_ST_OK) &&
-			!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) &&
-			(s->s3->flags & SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION))
+			!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS))
 			{
 #if 0 /* worked only because C operator preferences are not as expected (and
* because this is not really needed for clients except for detecting

Index: src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c
diff -u src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c:1.7 src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c:1.8
--- src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c:1.7	Sun Jun  5 23:09:49 2011
+++ src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c	Thu Jul  7 18:11:19 2011
@@ -877,14 +877,6 @@
 #endif
 	STACK_OF(SSL_CIPHER) *ciphers=NULL;
 
-	if (s->new_session
-	&& !(s->s3->flags&SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION))
-		{
-		al=SSL_AD_HANDSHAKE_FAILURE;
-		SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, ERR_R_INTERNAL_ERROR);
-		goto f_err;
-		}
-
 	/* We do this so that we will respond with our native type.
 	 * If we are TLSv1 and we get SSLv3, we will respond with TLSv1,
 	 * This down switching should be handled by a different method.

Index: src/crypto/external/bsd/openssl/dist/ssl/ssl_locl.h
diff -u src/crypto/external/bsd/openssl/dist/ssl/ssl_locl.h:1.3 src/crypto/external/bsd/openssl/dist/ssl/ssl_locl.h:1.4
--- src/crypto/external/bsd/openssl/dist/ssl/ssl_locl.h:1.3	Sun Jun  5 23:09:49 2011
+++ src/crypto/external/bsd/openssl/dist/ssl/ssl_locl.h	Thu Jul  7 18:11:19 2011
@@ -459,8 +459,6 @@
 #define NAMED_CURVE_TYPE   3
 #endif  /* OPENSSL_NO_EC */
 
-#define SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION	0x0010
-
 typedef struct cert_pkey_st
 	{
 	X509 *x509;



CVS commit: src/external/lgpl3/gmp/lib/libgmp/arch/i386

2011-07-07 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Jul  7 17:55:26 UTC 2011

Modified Files:
src/external/lgpl3/gmp/lib/libgmp/arch/i386: Makefile.inc

Log Message:
ignore error of "rmdir", to let "make clean" succeed in an already
clean directory


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/lgpl3/gmp/lib/libgmp/arch/i386/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/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc
diff -u src/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc:1.4 src/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc:1.5
--- src/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc:1.4	Wed Jul  6 19:52:06 2011
+++ src/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc	Thu Jul  7 17:55:26 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.4 2011/07/06 19:52:06 drochner Exp $
+#	$NetBSD: Makefile.inc,v 1.5 2011/07/07 17:55:26 drochner Exp $
 
 SRCS+= \
 	random.c \
@@ -185,7 +185,7 @@
 CLEANFILES+=	config.m4
 clean: cleandummy
 cleandummy: .PHONY
-	rmdir dummy
+	-rmdir dummy
 
 .for _build _src in ${ASM_SRCS_LIST}
 ${_build:R}.s: Makefile dummy ${.OBJDIR}/config.m4



CVS commit: src/sys/fs/udf

2011-07-07 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Jul  7 17:45:38 UTC 2011

Modified Files:
src/sys/fs/udf: ecma167-udf.h

Log Message:
English checked and corrected, courtisy of
Igor Sobrado  as noted in OpenBSD that has a
copy of this file.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/fs/udf/ecma167-udf.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/fs/udf/ecma167-udf.h
diff -u src/sys/fs/udf/ecma167-udf.h:1.13 src/sys/fs/udf/ecma167-udf.h:1.14
--- src/sys/fs/udf/ecma167-udf.h:1.13	Wed Dec 23 09:17:41 2009
+++ src/sys/fs/udf/ecma167-udf.h	Thu Jul  7 17:45:38 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ecma167-udf.h,v 1.13 2009/12/23 09:17:41 mbalmer Exp $ */
+/* $NetBSD: ecma167-udf.h,v 1.14 2011/07/07 17:45:38 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2003, 2004, 2005, 2006, 2008, 2009
@@ -29,9 +29,9 @@
  *
  * 
  * Extended and adapted for UDFv2.50+ bij Reinoud Zandijk based on the
- * origional by Scott Long.
+ * original by Scott Long.
  * 
- * 20030508 Made some small typo and explainatory comments
+ * 20030508 Made some small typo and explanatory comments
  * 20030510 Added UDF 2.01 structures
  * 20030519 Added/correct comments on multi-partitioned logical volume space
  * 20050616 Added pseudo overwrite
@@ -108,7 +108,7 @@
 	TAGID_EXTATTR_HDR =	262,
 	TAGID_UNALL_SP_ENTRY =	263,
 	TAGID_SPACE_BITMAP = 	264,
-	TAGID_PART_INTEGRETY = 	265,
+	TAGID_PART_INTEGRITY = 	265,
 	TAGID_EXTFENTRY =	266,
 	TAGID_MAX =		266
 };
@@ -122,11 +122,11 @@
 
 enum {
 	UDF_ACCESSTYPE_NOT_SPECIFIED   = 0,	/* unknown*/
-	UDF_ACCESSTYPE_PSEUDO_OVERWITE = 0,	/* Pseudo overwritable, f.e. BD-R's LOW */
+	UDF_ACCESSTYPE_PSEUDO_OVERWITE = 0,	/* pseudo overwritable, e.g. BD-R's LOW */
 	UDF_ACCESSTYPE_READ_ONLY   = 1,	/* really only readable			*/
 	UDF_ACCESSTYPE_WRITE_ONCE  = 2,	/* write once and you're done		*/
 	UDF_ACCESSTYPE_REWRITEABLE = 3,	/* may need extra work to rewrite	*/
-	UDF_ACCESSTYPE_OVERWRITABLE= 4	/* no limits on rewriting; harddisc f.e.*/
+	UDF_ACCESSTYPE_OVERWRITABLE= 4	/* no limits on rewriting; e.g. harddisc*/
 };
 
 
@@ -327,7 +327,7 @@
 struct pri_vol_desc {
 	struct desc_tag		tag;
 	uint32_t		seq_num;		/* MAX prevail */
-	uint32_t		pvd_num;		/* assigned by author; 0 is special as in it may only occure once */
+	uint32_t		pvd_num;		/* assigned by author; 0 is special as in it may only occur once */
 	char			vol_id[32];		/* KEY ; main identifier of this disc */
 	uint16_t		vds_num;		/* volume descriptor number; i.e. what volume number is it */
 	uint16_t		max_vol_seq;		/* maximum volume descriptor number known */
@@ -345,7 +345,7 @@
 	struct regid		imp_id;
 	uint8_t			imp_use[64];
 	uint32_t		prev_vds_loc;		/* location of predecessor _lov ? */
-	uint16_t		flags;			/* bit 0 : if set indicates volume set name is meaningfull */
+	uint16_t		flags;			/* bit 0 : if set indicates volume set name is meaningful */
 	uint8_t			reserved[22];
 } __packed;
 
@@ -464,7 +464,7 @@
 	uint32_t		meta_mirror_file_lbn;
 	uint32_t		meta_bitmap_file_lbn;
 	uint32_t		alloc_unit_size;	/* allocation unit size in blocks */
-	uint16_t		alignment_unit_size;	/* alignment nessisary in blocks  */
+	uint16_t		alignment_unit_size;	/* alignment necessary in blocks  */
 	uint8_t			flags;
 	uint8_t			reserved1[5];
 } __packed;
@@ -545,7 +545,7 @@
 struct part_hdr_desc {
 	struct short_ad		unalloc_space_table;
 	struct short_ad		unalloc_space_bitmap;
-	struct short_ad		part_integrety_table;	/* has to be ZERO for UDF */
+	struct short_ad		part_integrity_table;	/* has to be ZERO for UDF */
 	struct short_ad		freed_space_table;
 	struct short_ad		freed_space_bitmap;
 	uint8_t			reserved[88];
@@ -700,7 +700,7 @@
 	struct extattr_entryhdr;
 	uint32_t		d_l;		/* length of times[] data following */
 	uint32_t		existence;	/* bitmask */
-	struct timestamp	times[1];	/* in order of assending bits */
+	struct timestamp	times[1];	/* in order of ascending bits */
 } __packed;
 #define UDF_FILETIMES_ATTR_NO	5
 #define UDF_FILETIMES_FILE_CREATION	1



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

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 17:29:31 UTC 2011

Modified Files:
src/sys/arch/mips/include: float.h

Log Message:
If GCC 4.1 or newer (or clang), use __LDBL__*__ builtins otherwise if C99
use hex floating point.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/include/float.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/mips/include/float.h
diff -u src/sys/arch/mips/include/float.h:1.14 src/sys/arch/mips/include/float.h:1.15
--- src/sys/arch/mips/include/float.h:1.14	Mon Jan 17 23:53:03 2011
+++ src/sys/arch/mips/include/float.h	Thu Jul  7 17:29:31 2011
@@ -1,19 +1,41 @@
-/*	$NetBSD: float.h,v 1.14 2011/01/17 23:53:03 matt Exp $ */
+/*	$NetBSD: float.h,v 1.15 2011/07/07 17:29:31 matt Exp $ */
 
 #ifndef _MIPS_FLOAT_H_
 #define _MIPS_FLOAT_H_
 
 #if defined(__mips_n32) || defined(__mips_n64)
 
+#if __GNUC_PREREQ__(4,1)
+
+#define LDBL_MANT_DIG	__LDBL_MANT_DIG__
+#define	LDBL_DIG	__LDBL_DIG__
+#define	LDBL_MIN_EXP	__LDBL_MIN_EXP__
+#define	LDBL_MIN_10_EXP	__LDBL_MIN_10_EXP__
+#define	LDBL_MAX_EXP	__LDBL_MAX_EXP__
+#define	LDBL_MAX_10_EXP	__LDBL_MAX_10_EXP__
+#define	LDBL_EPSILON	__LDBL_EPSILON__
+#define	LDBL_MIN	__LDBL_MIN__
+#define	LDBL_MAX	__LDBL_MAX__
+
+#else
+
 #define LDBL_MANT_DIG	113
-#define	LDBL_EPSILON	1.925929944387235853055977942584927319E-34L
 #define	LDBL_DIG	33
 #define	LDBL_MIN_EXP	(-16381)
-#define	LDBL_MIN	3.3621031431120935062626778173217526026E-4932L
 #define	LDBL_MIN_10_EXP	(-4931)
 #define	LDBL_MAX_EXP	16384
-#define	LDBL_MAX	1.1897314953572317650857593266280070162E4932L
 #define	LDBL_MAX_10_EXP	4932
+#if __STDC_VERSION__ >= 199901L
+#define	LDBL_EPSILON	0x1p-112L
+#define	LDBL_MIN	0x1p-16382L
+#define	LDBL_MAX	0x1.p+16383L,
+#else
+#define	LDBL_EPSILON	1.9259299443872358530559779425849273E-34L
+#define	LDBL_MIN	3.3621031431120935062626778173217526E-4932L
+#define	LDBL_MAX	1.1897314953572317650857593266280070E+4932L
+#endif
+
+#endif /* !__GNUC_PREREQ__(4,1) */
 
 #endif	/* __mips_n32 || __mips_n64 */
 
@@ -27,7 +49,11 @@
 ((_POSIX_C_SOURCE - 0) >= 200112L) || \
 ((_XOPEN_SOURCE  - 0) >= 600) || \
 defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
+#if __GNUC_PREREQ__(4,1)
+#define	DECIMAL_DIG	__DECIMAL_DIG__
+#else
 #define	DECIMAL_DIG	36
+#endif
 #endif /* !defined(_ANSI_SOURCE) && ... */
 
 #endif	/* __mips_n32 || __mips_n64 */



CVS commit: src/external/gpl3/gcc/dist/gcc/config/mips

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 17:27:47 UTC 2011

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/mips: netbsd64.h

Log Message:
Get rid of the hack that limited long double to 64 bits.  We support 128 bit
long doubles now.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.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/dist/gcc/config/mips/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.2 src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.3
--- src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.2	Sun Jul  3 13:06:36 2011
+++ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h	Thu Jul  7 17:27:46 2011
@@ -52,9 +52,3 @@
%{mips32} %{mips32r2} %{mips64} %{mips64r2} \
%{bestGnum} %{call_shared} %{no_archive} %{exact_version} \
%(netbsd_link_spec)"
-
-#undef LONG_DOUBLE_TYPE_SIZE
-#define LONG_DOUBLE_TYPE_SIZE 64
-
-#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
-#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64



CVS commit: src/tests/lib/libc/sys

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 16:31:11 UTC 2011

Modified Files:
src/tests/lib/libc/sys: t_clone.c t_sigqueue.c

Log Message:
Rename test case names.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_clone.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_sigqueue.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/libc/sys/t_clone.c
diff -u src/tests/lib/libc/sys/t_clone.c:1.1 src/tests/lib/libc/sys/t_clone.c:1.2
--- src/tests/lib/libc/sys/t_clone.c:1.1	Thu Jan 13 02:40:44 2011
+++ src/tests/lib/libc/sys/t_clone.c	Thu Jul  7 16:31:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_clone.c,v 1.1 2011/01/13 02:40:44 pgoyette Exp $ */
+/* $NetBSD: t_clone.c,v 1.2 2011/07/07 16:31:11 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_clone.c,v 1.1 2011/01/13 02:40:44 pgoyette Exp $");
+__RCSID("$NetBSD: t_clone.c,v 1.2 2011/07/07 16:31:11 jruoho Exp $");
 
 #include 
 #include 
@@ -72,14 +72,6 @@
 	return 0;
 }
 
-ATF_TC(clone);
-
-ATF_TC_HEAD(clone, tc)
-{
-
-	atf_tc_set_md_var(tc, "descr", "Checks clone(2)");
-}
-
 static int
 clone_func(void *arg)
 {
@@ -104,7 +96,14 @@
 	return (CHILDEXIT);
 }
 
-ATF_TC_BODY(clone, tc)
+ATF_TC(clone_basic);
+ATF_TC_HEAD(clone_basic, tc)
+{
+
+	atf_tc_set_md_var(tc, "descr", "Checks clone(2)");
+}
+
+ATF_TC_BODY(clone_basic, tc)
 {
 	sigset_t mask;
 	void *allocstack, *stack;
@@ -171,16 +170,15 @@
 	ATF_REQUIRE_ERRNO(errno, munmap(allocstack, STACKSIZE) != -1);
 }
 
-ATF_TC(null_stack);
-
-ATF_TC_HEAD(null_stack, tc)
+ATF_TC(clone_null_stack);
+ATF_TC_HEAD(clone_null_stack, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr",
 	"Checks that clone(2) fails when stack pointer is NULL");
 }
 
-ATF_TC_BODY(null_stack, tc)
+ATF_TC_BODY(clone_null_stack, tc)
 {
 	int rv;
 
@@ -191,16 +189,15 @@
 	ATF_REQUIRE_EQ(errno, EINVAL);
 }
 
-ATF_TC(null_func);
-
-ATF_TC_HEAD(null_func, tc)
+ATF_TC(clone_null_func);
+ATF_TC_HEAD(clone_null_func, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr",
 	"Checks that clone(2) fails when function pointer is NULL");
 }
 
-ATF_TC_BODY(null_func, tc)
+ATF_TC_BODY(clone_null_func, tc)
 {
 	void *allocstack, *stack;
 	int rv, stat;
@@ -220,9 +217,8 @@
 	ATF_REQUIRE_ERRNO(errno, munmap(allocstack, STACKSIZE) != -1);
 }
 
-ATF_TC(out_of_proc);
-
-ATF_TC_HEAD(out_of_proc, tc)
+ATF_TC(clone_out_of_proc);
+ATF_TC_HEAD(clone_out_of_proc, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr",
@@ -230,7 +226,7 @@
 	atf_tc_set_md_var(tc, "require.user", "unprivileged");
 }
 
-ATF_TC_BODY(out_of_proc, tc)
+ATF_TC_BODY(clone_out_of_proc, tc)
 {
 	struct rlimit rl;
 	int rv;
@@ -253,10 +249,10 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, clone);
-	ATF_TP_ADD_TC(tp, null_stack);
-	ATF_TP_ADD_TC(tp, null_func);
-	ATF_TP_ADD_TC(tp, out_of_proc);
+	ATF_TP_ADD_TC(tp, clone_basic);
+	ATF_TP_ADD_TC(tp, clone_null_stack);
+	ATF_TP_ADD_TC(tp, clone_null_func);
+	ATF_TP_ADD_TC(tp, clone_out_of_proc);
 
 	return atf_no_error();
 }

Index: src/tests/lib/libc/sys/t_sigqueue.c
diff -u src/tests/lib/libc/sys/t_sigqueue.c:1.3 src/tests/lib/libc/sys/t_sigqueue.c:1.4
--- src/tests/lib/libc/sys/t_sigqueue.c:1.3	Mon Jan 10 16:42:37 2011
+++ src/tests/lib/libc/sys/t_sigqueue.c	Thu Jul  7 16:31:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sigqueue.c,v 1.3 2011/01/10 16:42:37 christos Exp $ */
+/* $NetBSD: t_sigqueue.c,v 1.4 2011/07/07 16:31:11 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,34 +30,35 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_sigqueue.c,v 1.3 2011/01/10 16:42:37 christos Exp $");
+__RCSID("$NetBSD: t_sigqueue.c,v 1.4 2011/07/07 16:31:11 jruoho Exp $");
 
+
+#include 
+#include 
 #include 
-#include 
 #include 
 #include 
-#include 
+#include 
 
-#include 
-
-ATF_TC(sigqueue);
-ATF_TC_HEAD(sigqueue, tc)
-{
-	atf_tc_set_md_var(tc, "descr", "Checks sigqueue sigval delivery");
-}
+static void	handler(int, siginfo_t *, void *);
 
 #define VALUE (int)0xc001dad1
 static int value;
 
 static void
-/*ARGSUSED*/
 handler(int signo, siginfo_t *info, void *data)
 {
 	value = info->si_value.sival_int;
 	kill(0, SIGINFO);
 }
 
-ATF_TC_BODY(sigqueue, tc)
+ATF_TC(sigqueue_basic);
+ATF_TC_HEAD(sigqueue_basic, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Checks sigqueue(3) sigval delivery");
+}
+
+ATF_TC_BODY(sigqueue_basic, tc)
 {
 	struct sigaction sa;
 	union sigval sv;
@@ -66,20 +67,37 @@
 	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = SA_SIGINFO;
 
-	if (sigaction(SIGUSR1, &sa, NULL) == -1)
-		err(1, "sigaction");
+	if (sigaction(SIGUSR1, &sa, NULL) != 0)
+		atf_tc_fail("sigaction failed");
 
 	sv.sival_int = VALUE;
-	if (sigqueue(0, SIGUSR1, sv) == -1)
-		err(1, "sigqueue");
+
+	if (sigqueue(0, SIGUSR1, sv) != 0)
+		atf_tc_fail("sigqueue failed");

CVS commit: src

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 15:53:27 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/gen: Makefile
Added Files:
src/tests/lib/libc/gen: t_glob.c
Removed Files:
src/tests/lib/libc/gen: t_glob_star.c

Log Message:
Move 't_glob_star' to 't_glob' for glob(3).


To generate a diff of this commit:
cvs rdiff -u -r1.371 -r1.372 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.27 -r1.28 src/tests/lib/libc/gen/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/t_glob.c
cvs rdiff -u -r1.7 -r0 src/tests/lib/libc/gen/t_glob_star.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.371 src/distrib/sets/lists/tests/mi:1.372
--- src/distrib/sets/lists/tests/mi:1.371	Thu Jul  7 15:50:23 2011
+++ src/distrib/sets/lists/tests/mi	Thu Jul  7 15:53:27 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.371 2011/07/07 15:50:23 jruoho Exp $
+# $NetBSD: mi,v 1.372 2011/07/07 15:53:27 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -361,7 +361,8 @@
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_fmtcheck.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_getcwd.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_getgrent.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/gen/t_glob_star.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/gen/t_glob.debug			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/gen/t_glob_star.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_humanize_number.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_ldexp.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_nice.debug			tests-lib-debug		debug,atf
@@ -1863,7 +1864,8 @@
 ./usr/tests/lib/libc/gen/t_fmtcheck		tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/t_getcwd		tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/t_getgrent		tests-lib-tests		atf
-./usr/tests/lib/libc/gen/t_glob_star		tests-lib-tests		atf
+./usr/tests/lib/libc/gen/t_glob			tests-lib-tests		atf
+./usr/tests/lib/libc/gen/t_glob_star		tests-obsolete		obsolete
 ./usr/tests/lib/libc/gen/t_humanize_number	tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/t_ldexp		tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/t_nice			tests-lib-tests		atf

Index: src/tests/lib/libc/gen/Makefile
diff -u src/tests/lib/libc/gen/Makefile:1.27 src/tests/lib/libc/gen/Makefile:1.28
--- src/tests/lib/libc/gen/Makefile:1.27	Thu Jul  7 10:02:53 2011
+++ src/tests/lib/libc/gen/Makefile	Thu Jul  7 15:53:27 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2011/07/07 10:02:53 jruoho Exp $
+# $NetBSD: Makefile,v 1.28 2011/07/07 15:53:27 jruoho Exp $
 
 .include 
 
@@ -12,7 +12,7 @@
 TESTS_C+=	t_fmtcheck
 TESTS_C+=	t_getcwd
 TESTS_C+=	t_getgrent
-TESTS_C+=	t_glob_star
+TESTS_C+=	t_glob
 TESTS_C+=	t_humanize_number
 TESTS_C+=	t_ldexp
 TESTS_C+=	t_nice

Added files:

Index: src/tests/lib/libc/gen/t_glob.c
diff -u /dev/null src/tests/lib/libc/gen/t_glob.c:1.1
--- /dev/null	Thu Jul  7 15:53:27 2011
+++ src/tests/lib/libc/gen/t_glob.c	Thu Jul  7 15:53:27 2011
@@ -0,0 +1,224 @@
+/*	$NetBSD: t_glob.c,v 1.1 2011/07/07 15:53:27 jruoho Exp $	*/
+/*-
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE

CVS commit: src

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 15:50:23 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/stdlib: Makefile
Added Files:
src/tests/lib/libc/stdlib: t_getenv.c
Removed Files:
src/tests/lib/libc/stdlib: t_environment.c t_environment_pth.c

Log Message:
Merge 't_environment' and 't_environment_pth'.


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/stdlib/Makefile
cvs rdiff -u -r1.12 -r0 src/tests/lib/libc/stdlib/t_environment.c
cvs rdiff -u -r1.2 -r0 src/tests/lib/libc/stdlib/t_environment_pth.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdlib/t_getenv.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.370 src/distrib/sets/lists/tests/mi:1.371
--- src/distrib/sets/lists/tests/mi:1.370	Thu Jul  7 14:29:59 2011
+++ src/distrib/sets/lists/tests/mi	Thu Jul  7 15:50:23 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.370 2011/07/07 14:29:59 pgoyette Exp $
+# $NetBSD: mi,v 1.371 2011/07/07 15:50:23 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -440,9 +440,10 @@
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/h_getopt.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/h_getopt_long.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_div.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_environment.debug	tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_environment_pth.debug	tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_environment.debug	tests-obsolete		obsolete
+./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_environment_pth.debug	tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_exit.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_getenv.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_hsearch.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mi_vector_hash.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_posix_memalign.debug	tests-lib-debug		debug,atf
@@ -2016,9 +2017,10 @@
 ./usr/tests/lib/libc/stdlib/h_getopt_long	tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_atexit		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_div		tests-lib-tests		atf
-./usr/tests/lib/libc/stdlib/t_environment	tests-lib-tests		atf
-./usr/tests/lib/libc/stdlib/t_environment_pth	tests-lib-tests		atf
+./usr/tests/lib/libc/stdlib/t_environment	tests-obsolete		obsolete
+./usr/tests/lib/libc/stdlib/t_environment_pth	tests-obsolete		obsolete
 ./usr/tests/lib/libc/stdlib/t_exit		tests-lib-tests		atf
+./usr/tests/lib/libc/stdlib/t_getenv		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_getopt		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_hsearch		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_mi_vector_hash	tests-lib-tests		atf

Index: src/tests/lib/libc/stdlib/Makefile
diff -u src/tests/lib/libc/stdlib/Makefile:1.14 src/tests/lib/libc/stdlib/Makefile:1.15
--- src/tests/lib/libc/stdlib/Makefile:1.14	Sat Jun  4 14:56:58 2011
+++ src/tests/lib/libc/stdlib/Makefile	Thu Jul  7 15:50:23 2011
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile,v 1.14 2011/06/04 14:56:58 jruoho Exp $
+# $NetBSD: Makefile,v 1.15 2011/07/07 15:50:23 jruoho Exp $
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/lib/libc/stdlib
 
 TESTS_C+=	t_div
-TESTS_C+=	t_environment
-TESTS_C+=	t_environment_pth
+TESTS_C+=	t_getenv
 TESTS_C+=	t_exit
 TESTS_C+=	t_hsearch
 TESTS_C+=	t_mi_vector_hash
@@ -25,7 +24,7 @@
 PROGS+=		h_getopt h_getopt_long
 
 LDADD.t_strtod=			-lm
-LDADD.t_environment_pth=	-pthread
+LDADD.t_getenv=			-pthread
 
 COPTS+=-ffloat-store
 

Added files:

Index: src/tests/lib/libc/stdlib/t_getenv.c
diff -u /dev/null src/tests/lib/libc/stdlib/t_getenv.c:1.1
--- /dev/null	Thu Jul  7 15:50:23 2011
+++ src/tests/lib/libc/stdlib/t_getenv.c	Thu Jul  7 15:50:23 2011
@@ -0,0 +1,450 @@
+/*	$NetBSD: t_getenv.c,v 1.1 2011/07/07 15:50:23 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the d

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

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 15:07:53 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: ad.powerpc

Log Message:
Back out last change (restore tgmath.h)


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/distrib/sets/lists/comp/ad.powerpc

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/ad.powerpc
diff -u src/distrib/sets/lists/comp/ad.powerpc:1.54 src/distrib/sets/lists/comp/ad.powerpc:1.55
--- src/distrib/sets/lists/comp/ad.powerpc:1.54	Thu Jul  7 15:05:00 2011
+++ src/distrib/sets/lists/comp/ad.powerpc	Thu Jul  7 15:07:53 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc,v 1.54 2011/07/07 15:05:00 matt Exp $
+# $NetBSD: ad.powerpc,v 1.55 2011/07/07 15:07:53 matt Exp $
 ./usr/bin/elf2aoutcomp-sysutil-bin
 ./usr/bin/psim	comp-debug-bin		gdb,gdb=6
 ./usr/include/altivec.hcomp-obsolete		obsolete
@@ -11,6 +11,7 @@
 ./usr/include/gcc-4.5/si2vmx.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/spe.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/spu2vmx.h			comp-c-include		gcccmds,gcc=45
+./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/vec_types.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/powerpccomp-c-include
 ./usr/include/powerpc/ansi.h			comp-c-include



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

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 15:05:42 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: mi shl.mi

Log Message:
fix lists for gcc-4.5 and MKDEBUG=yes


To generate a diff of this commit:
cvs rdiff -u -r1.1640 -r1.1641 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.179 -r1.180 src/distrib/sets/lists/comp/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1640 src/distrib/sets/lists/comp/mi:1.1641
--- src/distrib/sets/lists/comp/mi:1.1640	Thu Jul  7 08:46:21 2011
+++ src/distrib/sets/lists/comp/mi	Thu Jul  7 15:05:41 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1640 2011/07/07 08:46:21 mrg Exp $
+#	$NetBSD: mi,v 1.1641 2011/07/07 15:05:41 matt Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3687,7 +3687,7 @@
 ./usr/libdata/debug/usr/bin/printenv.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/printf.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/progress.debug	comp-util-debug		debug
-./usr/libdata/debug/usr/bin/protoize.debug	comp-c-debug		gcccmds,debug
+./usr/libdata/debug/usr/bin/protoize.debug	comp-c-debug		gcc=4,gcccmds,debug
 ./usr/libdata/debug/usr/bin/pwhash.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/qsafe.debug		comp-util-debug		crypto,debug
 ./usr/libdata/debug/usr/bin/qsieve.debug	comp-util-debug		crypto,debug
@@ -3782,7 +3782,7 @@
 ./usr/libdata/debug/usr/bin/unifdef.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/uniq.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/units.debug		comp-util-debug		debug
-./usr/libdata/debug/usr/bin/unprotoize.debug	comp-c-debug		gcccmds,debug
+./usr/libdata/debug/usr/bin/unprotoize.debug	comp-c-debug		gcc=4,gcccmds,debug
 ./usr/libdata/debug/usr/bin/unvis.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/unzip.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/usbhidaction.debug	comp-util-debug		debug

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.179 src/distrib/sets/lists/comp/shl.mi:1.180
--- src/distrib/sets/lists/comp/shl.mi:1.179	Tue Jul  5 10:01:15 2011
+++ src/distrib/sets/lists/comp/shl.mi	Thu Jul  7 15:05:41 2011
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.179 2011/07/05 10:01:15 spz Exp $
+# $NetBSD: shl.mi,v 1.180 2011/07/07 15:05:41 matt Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -251,7 +251,7 @@
 ./usr/libdata/debug/usr/lib/libdes.so.8.1.debug		comp-crypto-debug	crypto,debug
 ./usr/libdata/debug/usr/lib/libdevmapper.so.1.0.debug	comp-lvm-debug	lvm,debug
 ./usr/libdata/debug/usr/lib/libdm.so.0.0.debug 		comp-sys-debug	debug
-./usr/libdata/debug/usr/lib/libdns.so.5.4.debug 	comp-bind-debug debug
+./usr/libdata/debug/usr/lib/libdns.so.5.5.debug 	comp-bind-debug debug
 ./usr/libdata/debug/usr/lib/libdns_sd.so.0.0.debug	comp-mdns-debug	mdns,debug
 ./usr/libdata/debug/usr/lib/libdtrace.so.2.0.debug	comp-sys-debug	dtrace,debug
 ./usr/libdata/debug/usr/lib/libdwarf.so.0.0.debug	comp-sys-debug	debug
@@ -262,7 +262,7 @@
 ./usr/libdata/debug/usr/lib/libform.so.6.0.debug	comp-sys-debug	debug
 ./usr/libdata/debug/usr/lib/libg2c.so.2.0.debug		comp-sys-debug	gcc=3,debug
 ./usr/libdata/debug/usr/lib/libgcc_s.so.1.0.debug	comp-sys-debug	gcc,debug
-./usr/libdata/debug/usr/lib/libgmp.so.10.2		comp-c-shlib	gcc=45,debug
+./usr/libdata/debug/usr/lib/libgmp.so.10.2.debug	comp-c-shlib	gcc=45,debug
 ./usr/libdata/debug/usr/lib/libgnumalloc.so.1.0.debug	comp-sys-debug	debug
 ./usr/libdata/debug/usr/lib/libgssapi.so.10.0.debug	comp-krb5-debug	kerberos,debug
 ./usr/libdata/debug/usr/lib/libhdb.so.14.0.debug	comp-krb5-debug	kerberos,debug
@@ -293,8 +293,8 @@
 ./usr/libdata/debug/usr/lib/libmagic.so.3.1.debug	comp-sys-debug	debug
 ./usr/libdata/debug/usr/lib/libmenu.so.6.0.debug	comp-sys-debug	debug
 ./usr/libdata/debug/usr/lib/libmj.so.1.0.debug		comp-crypto-debug	debug
-./usr/libdata/debug/usr/lib/libmpc.so.2.0		comp-c-shlib	gcc=45,debug
-./usr/libdata/debug/usr/lib/libmpfr.so.4.1		comp-c-shlib	gcc=45,debug
+./usr/libdata/debug/usr/lib/libmpc.so.2.0.debug		comp-c-shlib	gcc=45,debug
+./usr/libdata/debug/usr/lib/libmpfr.so.4.1.debug	comp-c-shlib	gcc=45,debug
 ./usr/libdata/debug/usr/lib/libnetpgp.so.3.0.debug	comp-crypto-debug	crypto,debug
 ./usr/libdata/debug/usr/lib/libnpf.so.0.0.debug		comp-npf-debug	npf,debug
 ./usr/libdata/debug/usr/lib/libnvpair.so.0.0.debug	comp-zfs-debug	zfs,dynamicroot,debug



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

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 15:05:00 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: ad.powerpc

Log Message:
Fix gcc-4.5 includes


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/distrib/sets/lists/comp/ad.powerpc

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/ad.powerpc
diff -u src/distrib/sets/lists/comp/ad.powerpc:1.53 src/distrib/sets/lists/comp/ad.powerpc:1.54
--- src/distrib/sets/lists/comp/ad.powerpc:1.53	Thu Jul  7 08:46:21 2011
+++ src/distrib/sets/lists/comp/ad.powerpc	Thu Jul  7 15:05:00 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc,v 1.53 2011/07/07 08:46:21 mrg Exp $
+# $NetBSD: ad.powerpc,v 1.54 2011/07/07 15:05:00 matt Exp $
 ./usr/bin/elf2aoutcomp-sysutil-bin
 ./usr/bin/psim	comp-debug-bin		gdb,gdb=6
 ./usr/include/altivec.hcomp-obsolete		obsolete
@@ -11,7 +11,6 @@
 ./usr/include/gcc-4.5/si2vmx.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/spe.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/spu2vmx.h			comp-c-include		gcccmds,gcc=45
-./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/vec_types.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/powerpccomp-c-include
 ./usr/include/powerpc/ansi.h			comp-c-include



CVS commit: src/sys/ufs/ufs

2011-07-07 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Jul  7 14:56:45 UTC 2011

Modified Files:
src/sys/ufs/ufs: ufs_extattr.c

Log Message:
Fix locking protocol to avoid a panic on extattrctl stop and on umount.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/ufs/ufs/ufs_extattr.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/ufs/ufs_extattr.c
diff -u src/sys/ufs/ufs/ufs_extattr.c:1.34 src/sys/ufs/ufs/ufs_extattr.c:1.35
--- src/sys/ufs/ufs/ufs_extattr.c:1.34	Mon Jul  4 08:07:32 2011
+++ src/sys/ufs/ufs/ufs_extattr.c	Thu Jul  7 14:56:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_extattr.c,v 1.34 2011/07/04 08:07:32 manu Exp $	*/
+/*	$NetBSD: ufs_extattr.c,v 1.35 2011/07/07 14:56:45 manu Exp $	*/
 
 /*-
  * Copyright (c) 1999-2002 Robert N. M. Watson
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ufs_extattr.c,v 1.34 2011/07/04 08:07:32 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_extattr.c,v 1.35 2011/07/07 14:56:45 manu Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ffs.h"
@@ -133,6 +133,7 @@
 	if (ump->um_extattr.uepm_lockcnt != 0) {
 		KASSERT(mutex_owned(&ump->um_extattr.uepm_lock));
 		ump->um_extattr.uepm_lockcnt--;
+		return;
 	}
 	mutex_exit(&ump->um_extattr.uepm_lock);
 }



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

2011-07-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul  7 14:30:00 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Mark the /syscall/ test directories obsolete as well as their contents


To generate a diff of this commit:
cvs rdiff -u -r1.369 -r1.370 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.369 src/distrib/sets/lists/tests/mi:1.370
--- src/distrib/sets/lists/tests/mi:1.369	Thu Jul  7 10:02:52 2011
+++ src/distrib/sets/lists/tests/mi	Thu Jul  7 14:29:59 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.369 2011/07/07 10:02:52 jruoho Exp $
+# $NetBSD: mi,v 1.370 2011/07/07 14:29:59 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -660,7 +660,7 @@
 ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_p2kifs.debug		tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/sbin	tests-sbin-tests
 ./usr/libdata/debug/usr/tests/sbin/resize_ffstests-sbin-tests
-./usr/libdata/debug/usr/tests/syscall	tests-obsolete
+./usr/libdata/debug/usr/tests/syscall	tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/syscall/t_access.debug			tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/syscall/t_chroot.debug			tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/syscall/t_cmsg.debug			tests-obsolete		obsolete
@@ -2453,7 +2453,7 @@
 ./usr/tests/sys/rc/h_args			tests-sys-tests	atf
 ./usr/tests/sys/rc/h_simple			tests-sys-tests	atf
 ./usr/tests/sys/rc/t_rc_d_cli			tests-sys-tests	atf
-./usr/tests/syscalltests-obsolete
+./usr/tests/syscalltests-obsolete		obsolete
 ./usr/tests/syscall/Atffile			tests-obsolete		obsolete
 ./usr/tests/syscall/t_access			tests-obsolete		obsolete
 ./usr/tests/syscall/t_chroot			tests-obsolete		obsolete



CVS commit: [netbsd-5] src/doc

2011-07-07 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Jul  7 12:46:06 UTC 2011

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

Log Message:
Ticket #1647


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.89 -r1.1.2.90 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.89 src/doc/CHANGES-5.2:1.1.2.90
--- src/doc/CHANGES-5.2:1.1.2.89	Thu Jun 30 09:32:07 2011
+++ src/doc/CHANGES-5.2	Thu Jul  7 12:46:06 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.89 2011/06/30 09:32:07 sborrill Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.90 2011/07/07 12:46:06 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5329,3 +5329,23 @@
 	to ddp_init(). Should fix PR kern/44734
 	[bouyer, ticket #1622]
 
+dist/bind/CHANGESpatch
+dist/bind/versionpatch
+dist/bind/lib/dns/apipatch
+dist/bind/lib/dns/masterdump.c			patch
+dist/bind/lib/dns/message.c			patch
+dist/bind/lib/dns/ncache.c			patch
+dist/bind/lib/dns/nsec3.c			patch
+dist/bind/lib/dns/rbtdb.c			patch
+dist/bind/lib/dns/rdataset.c			patch
+dist/bind/lib/dns/resolver.c			patch
+dist/bind/lib/dns/validator.c			patch
+dist/bind/lib/dns/include/dns/rdataset.h	patch
+distrib/sets/lists/base/md.amd64		patch
+distrib/sets/lists/base/md.sparc64		patch
+distrib/sets/lists/base/shl.mi			patch
+lib/libdns/shlib_version			patch
+
+	Update bind to 9.7.3-P3 fixing CVE-2011-2464
+	[spz, ticket #1647]
+



CVS commit: [netbsd-5] src

2011-07-07 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Jul  7 12:44:27 UTC 2011

Modified Files:
src/dist/bind [netbsd-5]: CHANGES version
src/dist/bind/lib/dns [netbsd-5]: api masterdump.c message.c ncache.c
nsec3.c rbtdb.c rdataset.c resolver.c validator.c
src/dist/bind/lib/dns/include/dns [netbsd-5]: rdataset.h
src/distrib/sets/lists/base [netbsd-5]: md.amd64 md.sparc64 shl.mi
src/lib/libdns [netbsd-5]: shlib_version

Log Message:
Pull up the following revisions(s) (requested by spz in ticket #1647):
dist/bind/CHANGES:  patch
dist/bind/version:  patch
dist/bind/lib/dns/api:  patch
dist/bind/lib/dns/masterdump.c: patch
dist/bind/lib/dns/message.c:patch
dist/bind/lib/dns/ncache.c: patch
dist/bind/lib/dns/nsec3.c:  patch
dist/bind/lib/dns/rbtdb.c:  patch
dist/bind/lib/dns/rdataset.c:   patch
dist/bind/lib/dns/resolver.c:   patch
dist/bind/lib/dns/validator.c:  patch
dist/bind/lib/dns/include/dns/rdataset.h:   patch
distrib/sets/lists/base/md.amd64:   patch
distrib/sets/lists/base/md.sparc64: patch
distrib/sets/lists/base/shl.mi: patch
lib/libdns/shlib_version:   patch

Update bind to 9.7.3-P3 fixing CVE-2011-2464


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.11.4.4 -r1.1.1.11.4.5 src/dist/bind/CHANGES \
src/dist/bind/version
cvs rdiff -u -r1.1.1.9.4.3 -r1.1.1.9.4.4 src/dist/bind/lib/dns/api
cvs rdiff -u -r1.1.1.6.4.3 -r1.1.1.6.4.4 src/dist/bind/lib/dns/masterdump.c
cvs rdiff -u -r1.5.4.3 -r1.5.4.4 src/dist/bind/lib/dns/message.c
cvs rdiff -u -r1.1.1.5.4.2 -r1.1.1.5.4.3 src/dist/bind/lib/dns/ncache.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/dist/bind/lib/dns/nsec3.c
cvs rdiff -u -r1.1.1.6.4.4 -r1.1.1.6.4.5 src/dist/bind/lib/dns/rbtdb.c
cvs rdiff -u -r1.1.1.5.4.3 -r1.1.1.5.4.4 src/dist/bind/lib/dns/rdataset.c
cvs rdiff -u -r1.8.4.4 -r1.8.4.5 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.6.4.4 -r1.6.4.5 src/dist/bind/lib/dns/validator.c
cvs rdiff -u -r1.1.1.5.4.3 -r1.1.1.5.4.4 \
src/dist/bind/lib/dns/include/dns/rdataset.h
cvs rdiff -u -r1.25.2.11 -r1.25.2.12 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.23.2.10 -r1.23.2.11 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.450.2.8 -r1.450.2.9 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.3.4.2 -r1.3.4.3 src/lib/libdns/shlib_version

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/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.11.4.4 src/dist/bind/CHANGES:1.1.1.11.4.5
--- src/dist/bind/CHANGES:1.1.1.11.4.4	Sat Jun 18 11:19:39 2011
+++ src/dist/bind/CHANGES	Thu Jul  7 12:44:24 2011
@@ -1,3 +1,16 @@
+	--- 9.7.3-P3 released ---
+
+3124.	[bug]		Use an rdataset attribute flag to indicate
+			negative-cache records rather than using rrtype 0;
+			this will prevent problems when that rrtype is
+			used in actual DNS packets.  [RT #24777]
+
+	--- 9.7.3-P2 released (withdrawn) ---
+
+3123.	[security]	Change #2912 exposed a latent flaw in
+			dns_rdataset_totext() that could cause named to
+			crash with an assertion failure. [RT #24777]
+
 	--- 9.7.3-P1 released ---
 
 3121.   [security]  An authoritative name server sending a negative
Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.11.4.4 src/dist/bind/version:1.1.1.11.4.5
--- src/dist/bind/version:1.1.1.11.4.4	Sat Jun 18 11:19:44 2011
+++ src/dist/bind/version	Thu Jul  7 12:44:24 2011
@@ -1,4 +1,4 @@
-# Id: version,v 1.51.2.11.12.1 2011-05-27 00:43:04 each Exp
+# Id: version,v 1.51.2.11.12.3 2011-06-21 20:36:58 each Exp 
 # 
 # This file must follow /bin/sh rules.  It is imported directly via
 # configure.
@@ -7,4 +7,4 @@
 MINORVER=7
 PATCHVER=3
 RELEASETYPE=-P
-RELEASEVER=1
+RELEASEVER=3

Index: src/dist/bind/lib/dns/api
diff -u src/dist/bind/lib/dns/api:1.1.1.9.4.3 src/dist/bind/lib/dns/api:1.1.1.9.4.4
--- src/dist/bind/lib/dns/api:1.1.1.9.4.3	Sat Jun 18 11:20:26 2011
+++ src/dist/bind/lib/dns/api	Thu Jul  7 12:44:24 2011
@@ -1,3 +1,3 @@
 LIBINTERFACE = 70
-LIBREVISION = 3
+LIBREVISION = 4
 LIBAGE = 1

Index: src/dist/bind/lib/dns/masterdump.c
diff -u src/dist/bind/lib/dns/masterdump.c:1.1.1.6.4.3 src/dist/bind/lib/dns/masterdump.c:1.1.1.6.4.4
--- src/dist/bind/lib/dns/masterdump.c:1.1.1.6.4.3	Sat Jun 18 11:20:28 2011
+++ src/dist/bind/lib/dns/masterdump.c	Thu Jul  7 12:44:24 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: masterdump.c,v 1.1.1.6.4.3 2011/06/18 11:20:28 bouyer Exp $	*/
+/*	$NetBSD: masterdump.c,v 1.1.1.6.4.4 2011/07/07 12:44:24 sborrill Exp $	*/
 
 /*
- * Copyright (C) 2004-2009  Interne

CVS commit: src/tests/lib/libc/stdlib

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 11:12:18 UTC 2011

Modified Files:
src/tests/lib/libc/stdlib: t_div.c t_hsearch.c t_mi_vector_hash.c
t_posix_memalign.c

Log Message:
Rename some test case names. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/t_div.c \
src/tests/lib/libc/stdlib/t_hsearch.c \
src/tests/lib/libc/stdlib/t_posix_memalign.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/t_mi_vector_hash.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/libc/stdlib/t_div.c
diff -u src/tests/lib/libc/stdlib/t_div.c:1.1 src/tests/lib/libc/stdlib/t_div.c:1.2
--- src/tests/lib/libc/stdlib/t_div.c:1.1	Thu Dec 23 15:27:44 2010
+++ src/tests/lib/libc/stdlib/t_div.c	Thu Jul  7 11:12:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_div.c,v 1.1 2010/12/23 15:27:44 pgoyette Exp $ */
+/*	$NetBSD: t_div.c,v 1.2 2011/07/07 11:12:18 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -36,15 +36,14 @@
 #define	QUOT	1
 #define	REM	999236
 
-ATF_TC(div);
-
-ATF_TC_HEAD(div, tc)
+ATF_TC(div_basic);
+ATF_TC_HEAD(div_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Test div(3) for correctness");
 }
 
-ATF_TC_BODY(div, tc)
+ATF_TC_BODY(div_basic, tc)
 {
 	div_t d;
 
@@ -54,15 +53,14 @@
 	ATF_CHECK(d.rem  == REM);
 }
 
-ATF_TC(ldiv);
-
-ATF_TC_HEAD(ldiv, tc)
+ATF_TC(ldiv_basic);
+ATF_TC_HEAD(ldiv_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Test ldiv(3) for correctness");
 }
 
-ATF_TC_BODY(ldiv, tc)
+ATF_TC_BODY(ldiv_basic, tc)
 {
 	ldiv_t ld;
 
@@ -72,15 +70,14 @@
 	ATF_CHECK(ld.rem  == REM);
 }
 
-ATF_TC(lldiv);
-
-ATF_TC_HEAD(lldiv, tc)
+ATF_TC(lldiv_basic);
+ATF_TC_HEAD(lldiv_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Test div(3) for correctness");
 }
 
-ATF_TC_BODY(lldiv, tc)
+ATF_TC_BODY(lldiv_basic, tc)
 {
 	lldiv_t lld;
 
@@ -93,9 +90,9 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, div);
-	ATF_TP_ADD_TC(tp, ldiv);
-	ATF_TP_ADD_TC(tp, lldiv);
+	ATF_TP_ADD_TC(tp, div_basic);
+	ATF_TP_ADD_TC(tp, ldiv_basic);
+	ATF_TP_ADD_TC(tp, lldiv_basic);
 
 	return atf_no_error();
 }
Index: src/tests/lib/libc/stdlib/t_hsearch.c
diff -u src/tests/lib/libc/stdlib/t_hsearch.c:1.1 src/tests/lib/libc/stdlib/t_hsearch.c:1.2
--- src/tests/lib/libc/stdlib/t_hsearch.c:1.1	Thu Jan 13 14:32:35 2011
+++ src/tests/lib/libc/stdlib/t_hsearch.c	Thu Jul  7 11:12:18 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_hsearch.c,v 1.1 2011/01/13 14:32:35 pgoyette Exp $ */
+/* $NetBSD: t_hsearch.c,v 1.2 2011/07/07 11:12:18 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 /*
  * Copyright (c) 2001 Christopher G. Demetriou
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -45,7 +45,7 @@
  *  information about NetBSD.
  * 4. The name of the author may not be used to endorse or promote products
  *derived from this software without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@@ -56,14 +56,14 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
+ *
  * <>
  */
 
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_hsearch.c,v 1.1 2011/01/13 14:32:35 pgoyette Exp $");
+__RCSID("$NetBSD: t_hsearch.c,v 1.2 2011/07/07 11:12:18 jruoho Exp $");
 
 #include 
 #include 
@@ -74,15 +74,14 @@
 
 #define REQUIRE_ERRNO(x) ATF_REQUIRE_MSG(x, "%s", strerror(errno))
 
-ATF_TC(basic);
-
-ATF_TC_HEAD(basic, tc)
+ATF_TC(hsearch_basic);
+ATF_TC_HEAD(hsearch_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Checks basic insertions and searching");
 }
 
-ATF_TC_BODY(basic, tc)
+ATF_TC_BODY(hsearch_basic, tc)
 {
 	ENTRY e, *ep;
 	char ch[2];
@@ -124,16 +123,15 @@
 	hdestroy();
 }
 
-ATF_TC(duplicate);
-
-ATF_TC_HEAD(duplicate, tc)
+ATF_TC(hsearch_duplicate);
+ATF_TC_HEAD(hsearch_duplicate, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Checks that inserting duplicate "
 	"doesn't overwrite existing data");
 }
 
-ATF_TC_BODY(duplicate, tc)
+ATF_TC_BODY(hsearch_duplicate, tc)
 {
 	ENTRY e, *ep;
 
@@ -161,16 +159,15 @@
 	hdestroy();
 }
 
-ATF_TC(nonexistent);
-
-ATF_TC_HEAD(nonexistent, tc)
+ATF_TC(hsearch_nonexistent);
+ATF_TC_HEAD(hsearch_nonexistent, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr",
 	"Checks searching for non-existent entry");
 }
 
-ATF_TC_BODY(nonexistent, tc)
+ATF_TC_B

CVS commit: src/tests

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 11:04:30 UTC 2011

Modified Files:
src/tests/include/sys: t_bitops.c
src/tests/lib/libc/stdlib: t_strtod.c
src/tests/lib/libm: t_floor.c t_infinity.c

Log Message:
Improve the QEMU/amd64 detection.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/include/sys/t_bitops.c
cvs rdiff -u -r1.22 -r1.23 src/tests/lib/libc/stdlib/t_strtod.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libm/t_floor.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libm/t_infinity.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/include/sys/t_bitops.c
diff -u src/tests/include/sys/t_bitops.c:1.7 src/tests/include/sys/t_bitops.c:1.8
--- src/tests/include/sys/t_bitops.c:1.7	Wed Mar 30 08:34:20 2011
+++ src/tests/include/sys/t_bitops.c	Thu Jul  7 11:04:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_bitops.c,v 1.7 2011/03/30 08:34:20 jruoho Exp $ */
+/*	$NetBSD: t_bitops.c,v 1.8 2011/07/07 11:04:30 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,15 +29,17 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_bitops.c,v 1.7 2011/03/30 08:34:20 jruoho Exp $");
+__RCSID("$NetBSD: t_bitops.c,v 1.8 2011/07/07 11:04:30 jruoho Exp $");
 
 #include 
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
+#include 
 
 static const struct {
 	uint32_t	val;
@@ -137,13 +139,13 @@
 	}
 }
 
-ATF_TC(ilog2_1);
-ATF_TC_HEAD(ilog2_1, tc)
+ATF_TC(ilog2_basic);
+ATF_TC_HEAD(ilog2_basic, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "Test ilog2(3) for correctness");
 }
 
-ATF_TC_BODY(ilog2_1, tc)
+ATF_TC_BODY(ilog2_basic, tc)
 {
 	uint64_t i, x;
 
@@ -155,21 +157,25 @@
 	}
 }
 
-ATF_TC(ilog2_2);
-ATF_TC_HEAD(ilog2_2, tc)
+ATF_TC(ilog2_log2);
+ATF_TC_HEAD(ilog2_log2, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "Test log2(3) vs. ilog2(3)");
 }
 
-ATF_TC_BODY(ilog2_2, tc)
+ATF_TC_BODY(ilog2_log2, tc)
 {
+	struct utsname utsname;
 	double  x, y;
 	uint64_t i;
 
 	/*
 	 * This may fail under QEMU; see PR misc/44767.
 	 */
-	if (system("cpuctl identify 0 | grep -q QEMU") == 0)
+	ATF_REQUIRE(uname(&utsname) == 0);
+
+	if (strcmp(utsname.machine, "amd64") == 0 &&
+	system("cpuctl identify 0 | grep -q QEMU") == 0)
 		atf_tc_expect_fail("PR misc/44767");
 
 	for (i = 1; i < UINT32_MAX; i += UINT16_MAX) {
@@ -187,8 +193,8 @@
 
 	ATF_TP_ADD_TC(tp, fast_divide32);
 	ATF_TP_ADD_TC(tp, ffsfls);
-	ATF_TP_ADD_TC(tp, ilog2_1);
-	ATF_TP_ADD_TC(tp, ilog2_2);
+	ATF_TP_ADD_TC(tp, ilog2_basic);
+	ATF_TP_ADD_TC(tp, ilog2_log2);
 
 	return atf_no_error();
 }

Index: src/tests/lib/libc/stdlib/t_strtod.c
diff -u src/tests/lib/libc/stdlib/t_strtod.c:1.22 src/tests/lib/libc/stdlib/t_strtod.c:1.23
--- src/tests/lib/libc/stdlib/t_strtod.c:1.22	Mon Jul  4 22:33:29 2011
+++ src/tests/lib/libc/stdlib/t_strtod.c	Thu Jul  7 11:04:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_strtod.c,v 1.22 2011/07/04 22:33:29 mrg Exp $ */
+/*	$NetBSD: t_strtod.c,v 1.23 2011/07/07 11:04:30 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,9 @@
 /* Public domain, Otto Moerbeek , 2006. */
 
 #include 
-__RCSID("$NetBSD: t_strtod.c,v 1.22 2011/07/04 22:33:29 mrg Exp $");
+__RCSID("$NetBSD: t_strtod.c,v 1.23 2011/07/07 11:04:30 jruoho Exp $");
+
+#include 
 
 #include 
 #include 
@@ -161,12 +163,18 @@
 {
 #ifndef __vax__
 #   ifdef __HAVE_LONG_DOUBLE
+
+	struct utsname utsname;
+
 	/*
 	 * See the closed PR lib/33262.
 	 *
 	 * This may also fail under QEMU; cf. PR misc/44767.
 	 */
-	if (system("cpuctl identify 0 | grep -q QEMU") == 0)
+	ATF_REQUIRE(uname(&utsname) == 0);
+
+	if (strcmp(utsname.machine, "amd64") == 0 &&
+	system("cpuctl identify 0 | grep -q QEMU") == 0)
 		atf_tc_expect_fail("PR misc/44767");
 
 	for (size_t i = 0; i < __arraycount(inf_strings); i++) {
@@ -229,6 +237,8 @@
 {
 #ifndef __vax__
 #   ifdef __HAVE_LONG_DOUBLE
+
+	struct utsname utsname;
 	char *end;
 
 	/*
@@ -236,7 +246,10 @@
 	 *
 	 * This may also fail under QEMU; cf. PR misc/44767.
 	 */
-	if (system("cpuctl identify 0 | grep -q QEMU") == 0)
+	ATF_REQUIRE(uname(&utsname) == 0);
+
+	if (strcmp(utsname.machine, "amd64") == 0 &&
+	system("cpuctl identify 0 | grep -q QEMU") == 0)
 		atf_tc_expect_fail("PR misc/44767");
 
 	long double ld = strtold(nan_string, &end);
@@ -260,13 +273,19 @@
 ATF_TC_BODY(strtod_round, tc)
 {
 #if defined(__i386__) || defined(__amd64__) || defined(__sparc__)
+
+	struct utsname utsname;
+
 	/*
 	 * Test that strtod(3) honors the current rounding mode.
 	 * The used value is somewhere near 1 + DBL_EPSILON + FLT_EPSILON.
 	 *
 	 * May fail under QEMU; cf. PR misc/44767.
 	 */
-	if (system("cpuctl identify 0 | grep -q QEMU") == 0)
+	ATF_REQUIRE(uname(&utsname) == 0);
+
+	if (strcmp(utsname.machine, "amd64") == 0 &&
+	system("cpuctl identify 0 | grep -q QEMU") == 0)
 		atf_tc_expect_fail("PR misc/44767");
 
 	const char *val =

Ind

CVS commit: src/usr.bin/sdpquery

2011-07-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Jul  7 10:49:39 UTC 2011

Modified Files:
src/usr.bin/sdpquery: print.c

Log Message:
ensure string buffer is null terminated, for zero length strings..


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/sdpquery/print.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/sdpquery/print.c
diff -u src/usr.bin/sdpquery/print.c:1.15 src/usr.bin/sdpquery/print.c:1.16
--- src/usr.bin/sdpquery/print.c:1.15	Thu Jul  7 10:26:00 2011
+++ src/usr.bin/sdpquery/print.c	Thu Jul  7 10:49:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: print.c,v 1.15 2011/07/07 10:26:00 plunky Exp $	*/
+/*	$NetBSD: print.c,v 1.16 2011/07/07 10:49:38 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: print.c,v 1.15 2011/07/07 10:26:00 plunky Exp $");
+__RCSID("$NetBSD: print.c,v 1.16 2011/07/07 10:49:38 plunky Exp $");
 
 #include 
 #include 
@@ -556,6 +556,7 @@
 	static char buf[50];
 	char *dst = buf;
 
+	buf[0] = '\0';
 	style |= VIS_NL;
 	while (len > 0 && (dst + 5) < (buf + sizeof(buf))) {
 		dst = vis(dst, src[0], style, (len > 1 ? src[1] : 0));



CVS commit: src/lib/libbluetooth

2011-07-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Jul  7 10:44:51 UTC 2011

Modified Files:
src/lib/libbluetooth: sdp_data.c

Log Message:
ensure that the buffer is nul-terminated, otherwise printing an
empty string will show junk..


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libbluetooth/sdp_data.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/libbluetooth/sdp_data.c
diff -u src/lib/libbluetooth/sdp_data.c:1.1 src/lib/libbluetooth/sdp_data.c:1.2
--- src/lib/libbluetooth/sdp_data.c:1.1	Tue May 12 10:05:06 2009
+++ src/lib/libbluetooth/sdp_data.c	Thu Jul  7 10:44:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdp_data.c,v 1.1 2009/05/12 10:05:06 plunky Exp $	*/
+/*	$NetBSD: sdp_data.c,v 1.2 2011/07/07 10:44:50 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: sdp_data.c,v 1.1 2009/05/12 10:05:06 plunky Exp $");
+__RCSID("$NetBSD: sdp_data.c,v 1.2 2011/07/07 10:44:50 plunky Exp $");
 
 #include 
 #include 
@@ -358,6 +358,7 @@
 	printf("%*s", indent, "");
 
 	style |= VIS_NL;
+	buf[0] = '\0';
 
 	while (len > 0 && (dst + 5) < (buf + sizeof(buf))) {
 		dst = vis(dst, str[0], style, (len > 0 ? str[1] : 0));



CVS commit: src/tests/lib/libc/sys

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 10:27:31 UTC 2011

Modified Files:
src/tests/lib/libc/sys: t_dup.c

Log Message:
Rewrite the limit-test.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_dup.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/libc/sys/t_dup.c
diff -u src/tests/lib/libc/sys/t_dup.c:1.1 src/tests/lib/libc/sys/t_dup.c:1.2
--- src/tests/lib/libc/sys/t_dup.c:1.1	Thu Jul  7 06:57:53 2011
+++ src/tests/lib/libc/sys/t_dup.c	Thu Jul  7 10:27:31 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dup.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
+/* $NetBSD: t_dup.c,v 1.2 2011/07/07 10:27:31 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,18 +29,20 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_dup.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
+__RCSID("$NetBSD: t_dup.c,v 1.2 2011/07/07 10:27:31 jruoho Exp $");
 
 #include 
 #include 
+#include 
 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-
-#include 
+#include 
 
 static char	 path[] = "dup";
 
@@ -63,58 +65,69 @@
 
 ATF_TC_BODY(dup_max, tc)
 {
-	int current, fd, *buf, serrno;
 	struct rlimit res;
-	long i, maxfd;
+	int *buf, fd, sta;
+	size_t i, n;
+	pid_t pid;
 
-	/*
-	 * Open a temporary file until the
-	 * maximum number of open files is
-	 * reached. Ater that dup(2) should
-	 * fail with EMFILE.
-	 */
-	(void)memset(&res, 0, sizeof(struct rlimit));
+	pid = fork();
+	ATF_REQUIRE(pid >= 0);
+
+	if (pid == 0) {
 
-	ATF_REQUIRE(getrlimit(RLIMIT_NOFILE, &res) == 0);
+		/*
+		 * Open a temporary file until the
+		 * maximum number of open files is
+		 * reached. Ater that dup(2) should
+		 * fail with EMFILE.
+		 */
+		(void)closefrom(0);
+		(void)memset(&res, 0, sizeof(struct rlimit));
 
-	ATF_REQUIRE(res.rlim_cur > 0);
-	ATF_REQUIRE(res.rlim_max > 0);
+		if (getrlimit(RLIMIT_NOFILE, &res) != 0)
+			_exit(EX_OSERR);
 
-	maxfd = res.rlim_cur;
-	buf = calloc(maxfd, sizeof(int));
+		if (res.rlim_cur == 0 || res.rlim_max == 0)
+			_exit(EX_OSERR);
 
-	if (buf == NULL)
-		return;
+		n = res.rlim_cur;
+		buf = calloc(n, sizeof(int));
 
-	buf[0] = mkstemp(path);
-	ATF_REQUIRE(buf[0] != -1);
+		if (buf == NULL)
+			_exit(EX_OSERR);
 
-	current = fcntl(0, F_MAXFD);
-	ATF_REQUIRE(current != -1);
+		buf[0] = mkstemp(path);
 
-	fd = -1;
-	serrno = EMFILE;
+		if (buf[0] < 0)
+			_exit(EX_OSERR);
 
-	for (i = current; i <= maxfd; i++) {
+		for (i = 1; i < n; i++) {
 
-		buf[i] = open(path, O_RDONLY);
+			buf[i] = open(path, O_RDONLY);
 
-		if (buf[i] < 0)
-			goto out;
+			if (buf[i] < 0)
+_exit(EX_OSERR);
+		}
+
+		errno = 0;
+		fd = dup(buf[0]);
+
+		if (fd != -1 || errno != EMFILE)
+			_exit(EX_DATAERR);
+
+		_exit(EXIT_SUCCESS);
 	}
 
-	errno = 0;
-	fd = dup(buf[0]);
-	serrno = errno;
-
-out:
-	for (i = 0; i <= maxfd; i++)
-		(void)close(buf[i]);
+	(void)wait(&sta);
+
+	if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS) {
 
-	free(buf);
+		if (WEXITSTATUS(sta) == EX_OSERR)
+			atf_tc_fail("unknown error");
 
-	if (fd != -1 || serrno != EMFILE)
-		atf_tc_fail("dup(2) dupped more than RLIMIT_NOFILE");
+		if (WEXITSTATUS(sta) == EX_DATAERR)
+			atf_tc_fail("dup(2) dupped more than RLIMIT_NOFILE");
+	}
 }
 
 ATF_TC_CLEANUP(dup_max, tc)



CVS commit: src/usr.bin/sdpquery

2011-07-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Jul  7 10:26:01 UTC 2011

Modified Files:
src/usr.bin/sdpquery: print.c

Log Message:
parse IEEE 1284 Device ID, since it is not strictly a
string, and may run longer than a line


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/sdpquery/print.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/sdpquery/print.c
diff -u src/usr.bin/sdpquery/print.c:1.14 src/usr.bin/sdpquery/print.c:1.15
--- src/usr.bin/sdpquery/print.c:1.14	Sat Jun 25 09:16:52 2011
+++ src/usr.bin/sdpquery/print.c	Thu Jul  7 10:26:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: print.c,v 1.14 2011/06/25 09:16:52 plunky Exp $	*/
+/*	$NetBSD: print.c,v 1.15 2011/07/07 10:26:00 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: print.c,v 1.14 2011/06/25 09:16:52 plunky Exp $");
+__RCSID("$NetBSD: print.c,v 1.15 2011/07/07 10:26:00 plunky Exp $");
 
 #include 
 #include 
@@ -117,6 +117,7 @@
 static void print_bip_features(sdp_data_t *);
 static void print_bip_functions(sdp_data_t *);
 static void print_bip_capacity(sdp_data_t *);
+static void print_1284id(sdp_data_t *);
 
 static void print_rfcomm(sdp_data_t *);
 static void print_bnep(sdp_data_t *);
@@ -249,7 +250,7 @@
 	{ 0x0352, "CharacterRepertoiresSupported",	print_character_repertoires },
 	{ 0x0354, "XHTML-PrintImageFormatsSupported",	print_string_list },
 	{ 0x0356, "ColorSupported",			print_bool },
-	{ 0x0358, "1284ID",print_string },
+	{ 0x0358, "1284ID",print_1284id },
 	{ 0x035a, "PrinterName",			print_string },
 	{ 0x035c, "PrinterLocation",			print_string },
 	{ 0x035e, "DuplexSupported",			print_bool },
@@ -305,7 +306,7 @@
 };
 
 attr_t hcr_attrs[] = {	/* Hardcopy Cable Replacement */
-	{ 0x0300, "1284ID",print_string },
+	{ 0x0300, "1284ID",print_1284id },
 	{ 0x0302, "DeviceName",print_string },
 	{ 0x0304, "FriendlyName",			print_string },
 	{ 0x0306, "DeviceLocation",			print_string },
@@ -1560,6 +1561,38 @@
 }
 
 static void
+print_1284id(sdp_data_t *data)
+{
+	char *str, *ep;
+	size_t len, l;
+
+	if (!sdp_get_str(data, &str, &len))
+		return;
+
+	if (len < 2 || len != be16dec(str)) {
+		printf("[invalid IEEE 1284 Device ID]\n");
+		return;
+	}
+
+	str += 2;
+	len -= 2;
+
+	printf("\n");
+	while (len > 0) {
+		ep = memchr(str, (int)';', len);
+		if (ep == NULL) {
+			printf("[invalid IEEE 1284 Device ID]\n");
+			return;
+		}
+
+		l = (size_t)(ep - str + 1);
+		printf("%s\n", string_vis(VIS_CSTYLE, str, l));
+		str += l;
+		len -= l;
+	}
+}
+
+static void
 print_rfcomm(sdp_data_t *data)
 {
 	uint8_t v;



CVS commit: src

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 10:02:53 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/gen: Makefile t_vis.c
Added Files:
src/tests/lib/libc/gen: t_syslog.c
Removed Files:
src/tests/lib/libc/gen: t_syslog_pthread.c

Log Message:
Move 't_syslog_pthread' to 't_syslog' for consistency with libc.


To generate a diff of this commit:
cvs rdiff -u -r1.368 -r1.369 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.26 -r1.27 src/tests/lib/libc/gen/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/t_syslog.c
cvs rdiff -u -r1.3 -r0 src/tests/lib/libc/gen/t_syslog_pthread.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_vis.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.368 src/distrib/sets/lists/tests/mi:1.369
--- src/distrib/sets/lists/tests/mi:1.368	Thu Jul  7 08:59:30 2011
+++ src/distrib/sets/lists/tests/mi	Thu Jul  7 10:02:52 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.368 2011/07/07 08:59:30 jruoho Exp $
+# $NetBSD: mi,v 1.369 2011/07/07 10:02:52 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -372,7 +372,8 @@
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_setdomainname.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_sethostname.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_siginfo.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/gen/t_syslog_pthread.debug	tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/gen/t_syslog.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/gen/t_syslog_pthread.debug	tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_ttyname.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_vis.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/getaddrinfo			tests-obsolete		obsolete
@@ -1872,7 +1873,8 @@
 ./usr/tests/lib/libc/gen/t_setdomainname	tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/t_sethostname		tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/t_siginfo		tests-lib-tests		atf
-./usr/tests/lib/libc/gen/t_syslog_pthread	tests-lib-tests		atf
+./usr/tests/lib/libc/gen/t_syslog		tests-lib-tests		atf
+./usr/tests/lib/libc/gen/t_syslog_pthread	tests-obsolete		obsolete
 ./usr/tests/lib/libc/gen/t_ttyname		tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/t_vis			tests-lib-tests		atf
 ./usr/tests/lib/libc/getaddrinfo		tests-obsolete		obsolete

Index: src/tests/lib/libc/gen/Makefile
diff -u src/tests/lib/libc/gen/Makefile:1.26 src/tests/lib/libc/gen/Makefile:1.27
--- src/tests/lib/libc/gen/Makefile:1.26	Tue Jun 14 05:25:21 2011
+++ src/tests/lib/libc/gen/Makefile	Thu Jul  7 10:02:53 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2011/06/14 05:25:21 jruoho Exp $
+# $NetBSD: Makefile,v 1.27 2011/07/07 10:02:53 jruoho Exp $
 
 .include 
 
@@ -22,12 +22,12 @@
 TESTS_C+=	t_setdomainname
 TESTS_C+=	t_sethostname
 TESTS_C+=	t_siginfo
-TESTS_C+=	t_syslog_pthread
+TESTS_C+=	t_syslog
 TESTS_C+=	t_ttyname
 TESTS_C+=	t_vis
 
 LDADD.t_ldexp+=		-lm
 LDADD.t_nice+=		-lpthread
-LDADD.t_syslog_pthread+=-lpthread
+LDADD.t_syslog+=	-lpthread
 
 .include 

Index: src/tests/lib/libc/gen/t_vis.c
diff -u src/tests/lib/libc/gen/t_vis.c:1.2 src/tests/lib/libc/gen/t_vis.c:1.3
--- src/tests/lib/libc/gen/t_vis.c:1.2	Sat Mar 12 19:52:48 2011
+++ src/tests/lib/libc/gen/t_vis.c	Thu Jul  7 10:02:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vis.c,v 1.2 2011/03/12 19:52:48 christos Exp $	*/
+/*	$NetBSD: t_vis.c,v 1.3 2011/07/07 10:02:53 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -53,15 +53,14 @@
 
 #define SIZE	256
 
-ATF_TC(vis);
-
-ATF_TC_HEAD(vis, tc)
+ATF_TC(strvis_basic);
+ATF_TC_HEAD(strvis_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Test strvis(3)");
 }
 
-ATF_TC_BODY(vis, tc)
+ATF_TC_BODY(strvis_basic, tc)
 {
 	char *srcbuf, *dstbuf, *visbuf;
 	unsigned int i, j;
@@ -86,7 +85,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, vis);
+	ATF_TP_ADD_TC(tp, strvis_basic);
 
 	return atf_no_error();
 }

Added files:

Index: src/tests/lib/libc/gen/t_syslog.c
diff -u /dev/null src/tests/lib/libc/gen/t_syslog.c:1.1
--- /dev/null	Thu Jul  7 10:02:53 2011
+++ src/tests/lib/libc/gen/t_syslog.c	Thu Jul  7 10:02:53 2011
@@ -0,0 +1,59 @@
+/*	$NetBSD: t_syslog.c,v 1.1 2011/07/07 10:02:53 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions 

CVS commit: src/tests/lib/libc/gen

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 09:49:59 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_basedirname.c t_dir.c t_fmtcheck.c
t_glob_star.c t_humanize_number.c t_randomid.c t_syslog_pthread.c

Log Message:
Rename some test case names for consistency. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_basedirname.c \
src/tests/lib/libc/gen/t_fmtcheck.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/gen/t_dir.c
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/gen/t_glob_star.c
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_humanize_number.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_randomid.c \
src/tests/lib/libc/gen/t_syslog_pthread.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/libc/gen/t_basedirname.c
diff -u src/tests/lib/libc/gen/t_basedirname.c:1.1 src/tests/lib/libc/gen/t_basedirname.c:1.2
--- src/tests/lib/libc/gen/t_basedirname.c:1.1	Wed Dec 22 23:45:44 2010
+++ src/tests/lib/libc/gen/t_basedirname.c	Thu Jul  7 09:49:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_basedirname.c,v 1.1 2010/12/22 23:45:44 pgoyette Exp $	*/
+/*	$NetBSD: t_basedirname.c,v 1.2 2011/07/07 09:49:59 jruoho Exp $	*/
 
 /*
  * Regression test for basename(3).
@@ -90,14 +90,13 @@
 	{ NULL,			NULL }
 };
 
-ATF_TC(t_basename);
-
-ATF_TC_HEAD(t_basename, tc)
+ATF_TC(basename_posix);
+ATF_TC_HEAD(basename_posix, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "Test basename(3) with POSIX examples");
 }
 
-ATF_TC_BODY(t_basename, tc)
+ATF_TC_BODY(basename_posix, tc)
 {
 	char testbuf[32], *base;
 	int i;
@@ -142,14 +141,13 @@
 }
 
 
-ATF_TC(t_dirname);
-
-ATF_TC_HEAD(t_dirname, tc)
+ATF_TC(dirname_posix);
+ATF_TC_HEAD(dirname_posix, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "Test dirname(3) with POSIX examples");
 }
 
-ATF_TC_BODY(t_dirname, tc)
+ATF_TC_BODY(dirname_posix, tc)
 {
 	char testbuf[32], *base;
 	int i;
@@ -195,8 +193,8 @@
 
 ATF_TP_ADD_TCS(tp)
 {
-	ATF_TP_ADD_TC(tp, t_basename);
-	ATF_TP_ADD_TC(tp, t_dirname);
+	ATF_TP_ADD_TC(tp, basename_posix);
+	ATF_TP_ADD_TC(tp, dirname_posix);
 
 	return atf_no_error();
 }
Index: src/tests/lib/libc/gen/t_fmtcheck.c
diff -u src/tests/lib/libc/gen/t_fmtcheck.c:1.1 src/tests/lib/libc/gen/t_fmtcheck.c:1.2
--- src/tests/lib/libc/gen/t_fmtcheck.c:1.1	Tue Dec 28 12:46:15 2010
+++ src/tests/lib/libc/gen/t_fmtcheck.c	Thu Jul  7 09:49:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fmtcheck.c,v 1.1 2010/12/28 12:46:15 pgoyette Exp $	*/
+/*	$NetBSD: t_fmtcheck.c,v 1.2 2011/07/07 09:49:59 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -75,15 +75,14 @@
 	{ "%p %30s %#llx %-10.*e", "This number %lu%% and string %s has %qd numbers and %.*g floats", 1 },
 };
 
-ATF_TC(tc_fmtcheck);
-
-ATF_TC_HEAD(tc_fmtcheck, tc)
+ATF_TC(fmtcheck_basic);
+ATF_TC_HEAD(fmtcheck_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Test fmtcheck(3)");
 }
 
-ATF_TC_BODY(tc_fmtcheck, tc)
+ATF_TC_BODY(fmtcheck_basic, tc)
 {
 	unsigned int	i, r;
 	const char	*f, *cf, *f1, *f2;
@@ -110,7 +109,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, tc_fmtcheck);
+	ATF_TP_ADD_TC(tp, fmtcheck_basic);
 
 	return atf_no_error();
 }

Index: src/tests/lib/libc/gen/t_dir.c
diff -u src/tests/lib/libc/gen/t_dir.c:1.3 src/tests/lib/libc/gen/t_dir.c:1.4
--- src/tests/lib/libc/gen/t_dir.c:1.3	Sat Jun 11 18:03:18 2011
+++ src/tests/lib/libc/gen/t_dir.c	Thu Jul  7 09:49:59 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dir.c,v 1.3 2011/06/11 18:03:18 christos Exp $ */
+/* $NetBSD: t_dir.c,v 1.4 2011/07/07 09:49:59 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -39,16 +39,15 @@
 
 #include 
 
-ATF_TC(seekdir);
-
-ATF_TC_HEAD(seekdir, tc)
+ATF_TC(seekdir_basic);
+ATF_TC_HEAD(seekdir_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr",
 	"Check telldir(3) and seekdir(3) for correct behavior (PR/24324)");
 }
 
-ATF_TC_BODY(seekdir, tc)
+ATF_TC_BODY(seekdir_basic, tc)
 {
 	DIR *dp;
 	char *wasname;
@@ -113,7 +112,6 @@
 }
 
 ATF_TC(telldir_leak);
-
 ATF_TC_HEAD(telldir_leak, tc)
 {
 
@@ -161,7 +159,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, seekdir);
+	ATF_TP_ADD_TC(tp, seekdir_basic);
 	ATF_TP_ADD_TC(tp, telldir_leak);
 
 	return atf_no_error();

Index: src/tests/lib/libc/gen/t_glob_star.c
diff -u src/tests/lib/libc/gen/t_glob_star.c:1.6 src/tests/lib/libc/gen/t_glob_star.c:1.7
--- src/tests/lib/libc/gen/t_glob_star.c:1.6	Wed Nov  3 16:10:21 2010
+++ src/tests/lib/libc/gen/t_glob_star.c	Thu Jul  7 09:49:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_glob_star.c,v 1.6 2010/11/03 16:10:21 christos Exp $	*/
+/*	$NetBSD: t_glob_star.c,v 1.7 2011/07/07 09:49:59 jruoho Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_glob_star.c,v 1.6 2010/11/03 16:10:21 christos Exp $");
+__RCSID("$NetBSD: t_glob_star.c,v 1.7

CVS commit: src/tests/lib/libc/string

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 09:31:27 UTC 2011

Modified Files:
src/tests/lib/libc/string: t_strcmp.c t_strlen.c

Log Message:
Few basic checks, including a case for strnlen(3).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/string/t_strcmp.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/string/t_strlen.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/libc/string/t_strcmp.c
diff -u src/tests/lib/libc/string/t_strcmp.c:1.1 src/tests/lib/libc/string/t_strcmp.c:1.2
--- src/tests/lib/libc/string/t_strcmp.c:1.1	Thu Jul  7 08:59:33 2011
+++ src/tests/lib/libc/string/t_strcmp.c	Thu Jul  7 09:31:27 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strcmp.c,v 1.1 2011/07/07 08:59:33 jruoho Exp $ */
+/* $NetBSD: t_strcmp.c,v 1.2 2011/07/07 09:31:27 jruoho Exp $ */
 
 /*
  * Written by J.T. Conklin 
@@ -14,7 +14,7 @@
 ATF_TC(strcmp_basic);
 ATF_TC_HEAD(strcmp_basic, tc)
 {
-atf_tc_set_md_var(tc, "descr", "Test strcmp(3) results");
+atf_tc_set_md_var(tc, "descr", "Test strcmp(3) results, #1");
 }
 
 ATF_TC_BODY(strcmp_basic, tc)
@@ -97,10 +97,40 @@
 	}
 }
 
+ATF_TC(strcmp_simple);
+ATF_TC_HEAD(strcmp_simple, tc)
+{
+atf_tc_set_md_var(tc, "descr", "Test strcmp(3) results, #2");
+}
+
+ATF_TC_BODY(strcmp_simple, tc)
+{
+	char buf1[10] = "xxx";
+	char buf2[10] = "xxy";
+
+	ATF_REQUIRE(strcmp(buf1, buf1) == 0);
+	ATF_REQUIRE(strcmp(buf2, buf2) == 0);
+
+	ATF_REQUIRE(strcmp("xöx", "xox") > 0);
+	ATF_REQUIRE(strcmp("xxx", "xxxyyy") < 0);
+	ATF_REQUIRE(strcmp("xxxyyy", "xxx") > 0);
+
+	ATF_REQUIRE(strcmp(buf1 + 0, buf2 + 0) < 0);
+	ATF_REQUIRE(strcmp(buf1 + 1, buf2 + 1) < 0);
+	ATF_REQUIRE(strcmp(buf1 + 2, buf2 + 2) < 0);
+	ATF_REQUIRE(strcmp(buf1 + 3, buf2 + 3) == 0);
+
+	ATF_REQUIRE(strcmp(buf2 + 0, buf1 + 0) > 0);
+	ATF_REQUIRE(strcmp(buf2 + 1, buf1 + 1) > 0);
+	ATF_REQUIRE(strcmp(buf2 + 2, buf1 + 2) > 0);
+	ATF_REQUIRE(strcmp(buf2 + 3, buf1 + 3) == 0);
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, strcmp_basic);
+	ATF_TP_ADD_TC(tp, strcmp_simple);
 
 	return atf_no_error();
 }

Index: src/tests/lib/libc/string/t_strlen.c
diff -u src/tests/lib/libc/string/t_strlen.c:1.2 src/tests/lib/libc/string/t_strlen.c:1.3
--- src/tests/lib/libc/string/t_strlen.c:1.2	Thu Jul  7 09:16:06 2011
+++ src/tests/lib/libc/string/t_strlen.c	Thu Jul  7 09:31:27 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strlen.c,v 1.2 2011/07/07 09:16:06 jruoho Exp $ */
+/* $NetBSD: t_strlen.c,v 1.3 2011/07/07 09:31:27 jruoho Exp $ */
 
 /*
  * Written by J.T. Conklin 
@@ -166,11 +166,34 @@
 	}
 }
 
+ATF_TC(strnlen_basic);
+ATF_TC_HEAD(strnlen_basic, tc)
+{
+atf_tc_set_md_var(tc, "descr", "A naive test of strnlen(3)");
+}
+
+ATF_TC_BODY(strnlen_basic, tc)
+{
+	char buf[1];
+
+	buf[0] = '\0';
+
+	ATF_REQUIRE(strnlen(buf, 000) == 0);
+	ATF_REQUIRE(strnlen(buf, 111) == 0);
+
+	ATF_REQUIRE(strnlen("xxx", 0) == 0);
+	ATF_REQUIRE(strnlen("xxx", 1) == 1);
+	ATF_REQUIRE(strnlen("xxx", 2) == 2);
+	ATF_REQUIRE(strnlen("xxx", 3) == 3);
+	ATF_REQUIRE(strnlen("xxx", 9) == 3);
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, strlen_basic);
 	ATF_TP_ADD_TC(tp, strlen_huge);
+	ATF_TP_ADD_TC(tp, strnlen_basic);
 
 	return atf_no_error();
 }



CVS commit: src/tests/lib/libc/string

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 09:16:06 UTC 2011

Modified Files:
src/tests/lib/libc/string: t_strlen.c

Log Message:
Add one simple test case.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/string/t_strlen.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/libc/string/t_strlen.c
diff -u src/tests/lib/libc/string/t_strlen.c:1.1 src/tests/lib/libc/string/t_strlen.c:1.2
--- src/tests/lib/libc/string/t_strlen.c:1.1	Thu Jul  7 08:59:33 2011
+++ src/tests/lib/libc/string/t_strlen.c	Thu Jul  7 09:16:06 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strlen.c,v 1.1 2011/07/07 08:59:33 jruoho Exp $ */
+/* $NetBSD: t_strlen.c,v 1.2 2011/07/07 09:16:06 jruoho Exp $ */
 
 /*
  * Written by J.T. Conklin 
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static void	write_num(int);
 
@@ -135,10 +136,41 @@
 	}
 }
 
+ATF_TC(strlen_huge);
+ATF_TC_HEAD(strlen_huge, tc)
+{
+atf_tc_set_md_var(tc, "descr", "Test strlen(3) with huge strings");
+}
+
+ATF_TC_BODY(strlen_huge, tc)
+{
+	long page;
+	char *str;
+	size_t i;
+
+	page = sysconf(_SC_PAGESIZE);
+	ATF_REQUIRE(page >= 0);
+
+	for (i = 1; i < 1000; i = i + 100) {
+
+		str = malloc(i * page + 1);
+
+		if (str == NULL)
+			continue;
+
+		(void)memset(str, 'x', i * page);
+		str[i * page + 1] = '\0';
+
+		ATF_REQUIRE(strlen(str) == i * page);
+		free(str);
+	}
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, strlen_basic);
+	ATF_TP_ADD_TC(tp, strlen_huge);
 
 	return atf_no_error();
 }



CVS commit: src

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 08:59:33 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/string: Makefile
Added Files:
src/tests/lib/libc/string: t_memchr.c t_strcat.c t_strchr.c t_strcmp.c
t_strcpy.c t_strlen.c t_strrchr.c
Removed Files:
src/tests/lib/libc/string: t_string.c

Log Message:
Split out the string tests from t_string.c for consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.367 -r1.368 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/string/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/string/t_memchr.c \
src/tests/lib/libc/string/t_strcat.c src/tests/lib/libc/string/t_strchr.c \
src/tests/lib/libc/string/t_strcmp.c src/tests/lib/libc/string/t_strcpy.c \
src/tests/lib/libc/string/t_strlen.c \
src/tests/lib/libc/string/t_strrchr.c
cvs rdiff -u -r1.1 -r0 src/tests/lib/libc/string/t_string.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.367 src/distrib/sets/lists/tests/mi:1.368
--- src/distrib/sets/lists/tests/mi:1.367	Thu Jul  7 07:06:21 2011
+++ src/distrib/sets/lists/tests/mi	Thu Jul  7 08:59:30 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.367 2011/07/07 07:06:21 jruoho Exp $
+# $NetBSD: mi,v 1.368 2011/07/07 08:59:30 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -449,13 +449,20 @@
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_strtol.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_strtox.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/stringtests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libc/string/t_memchr.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/string/t_memcpy.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/string/t_memmem.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/string/t_memset.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/string/t_popcount.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/string/t_strcat.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/string/t_strchr.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/string/t_strcmp.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/string/t_strcpy.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/string/t_strerror.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/string/t_stresep.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/string/t_string.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/string/t_string.debug		tests-obsolete		obsolete
+./usr/libdata/debug/usr/tests/lib/libc/string/t_strlen.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/string/t_strrchr.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/string/t_swab.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/systests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_access.debug		tests-lib-debug		debug,atf
@@ -2019,13 +2026,20 @@
 ./usr/tests/lib/libc/stdlib/t_strtox		tests-obsolete		obsolete
 ./usr/tests/lib/libc/string			tests-lib-tests
 ./usr/tests/lib/libc/string/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libc/string/t_memchr		tests-lib-tests		atf
 ./usr/tests/lib/libc/string/t_memcpy		tests-lib-tests		atf
 ./usr/tests/lib/libc/string/t_memmem		tests-lib-tests		atf
 ./usr/tests/lib/libc/string/t_memset		tests-lib-tests		atf
 ./usr/tests/lib/libc/string/t_popcount		tests-lib-tests		atf
+./usr/tests/lib/libc/string/t_strcat		tests-lib-tests		atf
+./usr/tests/lib/libc/string/t_strchr		tests-lib-tests		atf
+./usr/tests/lib/libc/string/t_strcmp		tests-lib-tests		atf
+./usr/tests/lib/libc/string/t_strcpy		tests-lib-tests		atf
 ./usr/tests/lib/libc/string/t_strerror		tests-lib-tests		atf
 ./usr/tests/lib/libc/string/t_stresep		tests-lib-tests		atf
-./usr/tests/lib/libc/string/t_string		tests-lib-tests		atf
+./usr/tests/lib/libc/string/t_string		tests-obsolete		obsolete
+./usr/tests/lib/libc/string/t_strlen		tests-lib-tests		atf
+./usr/tests/lib/libc/string/t_strrchr		tests-lib-tests		atf
 ./usr/tests/lib/libc/string/t_swab		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys			tests-lib-tests
 ./usr/tests/lib/libc/sys/Atffile		tests-lib-tests		atf

Index: src/tests/lib/libc/string/Makefile
diff -u src/tests/lib/libc/string/Makefile:1.6 src/tests/lib/libc/string/Makefile:1.7
--- src/tests/lib/libc/string/Makefile:1.6	Fri Jun  3 06:39:52 2011
+++ src/tests/lib/libc/string/Makefile	Thu Jul  7 08:59:33 2011
@@ -1,16 +1,24 @@
-# $NetBSD: Makefile,v

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

2011-07-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul  7 08:48:34 UTC 2011

Modified Files:
src/sys/arch/evbarm/gumstix: gumstix_machdep.c

Log Message:
fix an off by one array bounds issue, and also fix a potentially non
nul-terminated string.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/evbarm/gumstix/gumstix_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/evbarm/gumstix/gumstix_machdep.c
diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.37 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.38
--- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.37	Fri Jul  1 20:39:34 2011
+++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c	Thu Jul  7 08:48:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: gumstix_machdep.c,v 1.37 2011/07/01 20:39:34 dyoung Exp $ */
+/*	$NetBSD: gumstix_machdep.c,v 1.38 2011/07/07 08:48:34 mrg Exp $ */
 /*
  * Copyright (C) 2005, 2006, 2007  WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -222,6 +222,7 @@
 
 BootConfig bootconfig;		/* Boot config storage */
 static char bootargs[MAX_BOOT_STRING];
+const size_t bootargs_len = sizeof(bootargs) - 1;	/* without nul */
 char *boot_args = NULL;
 
 uint32_t system_serial_high;
@@ -1092,13 +1093,14 @@
 			consinit();
 		}
 #endif
-		if (j == MAX_BOOT_STRING) {
+		if (j == bootargs_len) {
 			*(bootargs + j) = '\0';
 			continue;
 		}
 		if (j != 0)
 			*(bootargs + j++) = ' ';
-		strncpy(bootargs + j, argv[i], MAX_BOOT_STRING - j);
+		strncpy(bootargs + j, argv[i], bootargs_len - j);
+		bootargs[bootargs_len] = '\0';
 		j += strlen(argv[i]);
 	}
 	boot_args = bootargs;



CVS commit: src/sys/conf

2011-07-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul  7 08:47:22 UTC 2011

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
adb_kbd.c and adb_ms.c need -Wno-cast-qual due to sysctl const issue.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.141 src/sys/conf/Makefile.kern.inc:1.142
--- src/sys/conf/Makefile.kern.inc:1.141	Mon Jul  4 13:00:19 2011
+++ src/sys/conf/Makefile.kern.inc	Thu Jul  7 08:47:22 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.141 2011/07/04 13:00:19 mrg Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.142 2011/07/07 08:47:22 mrg Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -521,6 +521,8 @@
 CWARNFLAGS.tulip.c+=	-Wno-array-bounds
 CWARNFLAGS.radeonfb.c+=	-Wno-cast-qual
 CWARNFLAGS.dbcool.c+=	-Wno-cast-qual
+CWARNFLAGS.adb_kbd.c+=	-Wno-cast-qual
+CWARNFLAGS.adb_ms.c+=	-Wno-cast-qual
 .endif
 
 AFLAGS+=	${AOPTS.${.IMPSRC:T}}



CVS commit: src

2011-07-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul  7 08:46:22 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: ad.arm ad.armeb ad.m68k ad.mips
ad.mips64eb ad.mips64el ad.powerpc ad.sh3 md.amd64 md.i386 mi
src/external/gpl3/gcc/usr.bin/include: Makefile

Log Message:
- un-obsolete a pair of files we want to remain installed (XXX i wonder
  if a way to have "clean builds" not run "postinstall fix obsolete" in
  the $DESTDIR so that these sorts of errors will appear as set list
  errors instead of being skipped
- fix the list of headers to install for GCC 4.5, based upon the mknative
  ${G_EXTRA_HEADERS}.  XXX move the location of G_EXTRA_HEADERS.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/distrib/sets/lists/comp/ad.arm
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/comp/ad.armeb
cvs rdiff -u -r1.42 -r1.43 src/distrib/sets/lists/comp/ad.m68k
cvs rdiff -u -r1.36 -r1.37 src/distrib/sets/lists/comp/ad.mips
cvs rdiff -u -r1.41 -r1.42 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.52 -r1.53 src/distrib/sets/lists/comp/ad.powerpc
cvs rdiff -u -r1.24 -r1.25 src/distrib/sets/lists/comp/ad.sh3
cvs rdiff -u -r1.121 -r1.122 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.119 -r1.120 src/distrib/sets/lists/comp/md.i386
cvs rdiff -u -r1.1639 -r1.1640 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/usr.bin/include/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/sets/lists/comp/ad.arm
diff -u src/distrib/sets/lists/comp/ad.arm:1.35 src/distrib/sets/lists/comp/ad.arm:1.36
--- src/distrib/sets/lists/comp/ad.arm:1.35	Wed May 12 13:15:00 2010
+++ src/distrib/sets/lists/comp/ad.arm	Thu Jul  7 08:46:21 2011
@@ -1,4 +1,7 @@
-# $NetBSD: ad.arm,v 1.35 2010/05/12 13:15:00 lukem Exp $
+# $NetBSD: ad.arm,v 1.36 2011/07/07 08:46:21 mrg Exp $
+./usr/include/gcc-4.5/arm_neon.h		comp-c-include		gcccmds,gcc=45
+./usr/include/gcc-4.5/mmintrin.h		comp-c-include		gcccmds,gcc=45
+./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/armcomp-c-include
 ./usr/include/arm/ansi.h			comp-c-include
 ./usr/include/arm/aout_machdep.h		comp-c-include

Index: src/distrib/sets/lists/comp/ad.armeb
diff -u src/distrib/sets/lists/comp/ad.armeb:1.2 src/distrib/sets/lists/comp/ad.armeb:1.3
--- src/distrib/sets/lists/comp/ad.armeb:1.2	Mon Jan 31 09:19:52 2011
+++ src/distrib/sets/lists/comp/ad.armeb	Thu Jul  7 08:46:21 2011
@@ -1,8 +1,11 @@
-# $NetBSD: ad.armeb,v 1.2 2011/01/31 09:19:52 matt Exp $
+# $NetBSD: ad.armeb,v 1.3 2011/07/07 08:46:21 mrg Exp $
 #
 # The armeb MACHINE_ARCH never existed in NetBSD as a.out, so we
 #	skip the old a.out compatibility tools.
 #
+./usr/include/gcc-4.5/arm_neon.h		comp-c-include		gcccmds,gcc=45
+./usr/include/gcc-4.5/mmintrin.h		comp-c-include		gcccmds,gcc=45
+./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/armcomp-c-include
 ./usr/include/arm/ansi.h			comp-c-include
 ./usr/include/arm/aout_machdep.h		comp-c-include

Index: src/distrib/sets/lists/comp/ad.m68k
diff -u src/distrib/sets/lists/comp/ad.m68k:1.42 src/distrib/sets/lists/comp/ad.m68k:1.43
--- src/distrib/sets/lists/comp/ad.m68k:1.42	Mon May 30 15:38:07 2011
+++ src/distrib/sets/lists/comp/ad.m68k	Thu Jul  7 08:46:21 2011
@@ -1,5 +1,6 @@
-# $NetBSD: ad.m68k,v 1.42 2011/05/30 15:38:07 christos Exp $
+# $NetBSD: ad.m68k,v 1.43 2011/07/07 08:46:21 mrg Exp $
 ./usr/bin/elf2aoutcomp-sysutil-bin
+./usr/include/gcc-4.5/math-68881.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/m68kcomp-c-include
 ./usr/include/m68k/ansi.h			comp-c-include
 ./usr/include/m68k/aout_machdep.h		comp-c-include

Index: src/distrib/sets/lists/comp/ad.mips
diff -u src/distrib/sets/lists/comp/ad.mips:1.36 src/distrib/sets/lists/comp/ad.mips:1.37
--- src/distrib/sets/lists/comp/ad.mips:1.36	Wed Aug 19 08:24:43 2009
+++ src/distrib/sets/lists/comp/ad.mips	Thu Jul  7 08:46:21 2011
@@ -1,6 +1,8 @@
-# $NetBSD: ad.mips,v 1.36 2009/08/19 08:24:43 he Exp $
+# $NetBSD: ad.mips,v 1.37 2011/07/07 08:46:21 mrg Exp $
 ./usr/bin/elf2aoutcomp-obsolete		obsolete
 ./usr/bin/elf2ecoffcomp-sysutil-bin
+./usr/include/gcc-4.5/loongson.h		comp-c-include		gcccmds,gcc=45
+./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/mipscomp-c-include
 ./usr/include/mips/ansi.h			comp-c-include
 ./usr/include/mips/aout_machdep.h		comp-obsolete		obsolete

Index: src/distrib/sets/lists/comp/ad.mips64eb
diff -u src/distrib/sets/lists/comp/ad.mips64eb:1.41 src/distrib/sets/lists/comp/ad.mips64eb:1.42
--- src/distrib/sets/lists/comp/ad.mips64eb:1.41	Tue Jul  5 10:01:15 2011
+++ src/distrib/sets/lists/comp/ad.mips64eb	Thu Jul  7 08:46:21 2011
@@ -1,6 +1,8 @@
-# $NetBSD: ad.mips64eb,v 1.41 2011/07/05 10:01:15 spz Exp $
+# $NetBSD: ad.mips64eb,v 1.42 2011/07/0

CVS commit: src/tests/lib/libc/string

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 08:27:36 UTC 2011

Modified Files:
src/tests/lib/libc/string: t_memcpy.c t_memmem.c t_popcount.c
t_stresep.c t_swab.c

Log Message:
Rename some test case names for consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/string/t_memcpy.c
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/string/t_memmem.c \
src/tests/lib/libc/string/t_stresep.c src/tests/lib/libc/string/t_swab.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/string/t_popcount.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/libc/string/t_memcpy.c
diff -u src/tests/lib/libc/string/t_memcpy.c:1.2 src/tests/lib/libc/string/t_memcpy.c:1.3
--- src/tests/lib/libc/string/t_memcpy.c:1.2	Thu Apr  7 18:14:09 2011
+++ src/tests/lib/libc/string/t_memcpy.c	Thu Jul  7 08:27:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_memcpy.c,v 1.2 2011/04/07 18:14:09 jruoho Exp $ */
+/* $NetBSD: t_memcpy.c,v 1.3 2011/07/07 08:27:36 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -75,15 +75,13 @@
 	}
 }
 
-ATF_TC(check_memcpy);
-
-ATF_TC_HEAD(check_memcpy, tc)
+ATF_TC(memcpy_basic);
+ATF_TC_HEAD(memcpy_basic, tc)
 {
-  
 	atf_tc_set_md_var(tc, "descr", "Test memcpy results");
 }
- 
-ATF_TC_BODY(check_memcpy, tc)
+
+ATF_TC_BODY(memcpy_basic, tc)
 {
 	int i, j;
 	testBlock_t auto1, auto2;
@@ -104,7 +102,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, check_memcpy);
+	ATF_TP_ADD_TC(tp, memcpy_basic);
 
 	return atf_no_error();
 }

Index: src/tests/lib/libc/string/t_memmem.c
diff -u src/tests/lib/libc/string/t_memmem.c:1.1 src/tests/lib/libc/string/t_memmem.c:1.2
--- src/tests/lib/libc/string/t_memmem.c:1.1	Sun Dec 26 13:35:54 2010
+++ src/tests/lib/libc/string/t_memmem.c	Thu Jul  7 08:27:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_memmem.c,v 1.1 2010/12/26 13:35:54 pgoyette Exp $ */
+/*	$NetBSD: t_memmem.c,v 1.2 2011/07/07 08:27:36 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -65,15 +65,14 @@
 		atf_tc_fail("Check stderr for test id/line");		\
 	}
 
-ATF_TC(check_memmem);
-
-ATF_TC_HEAD(check_memmem, tc)
+ATF_TC(memmem_basic);
+ATF_TC_HEAD(memmem_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Test memmem results");
 }
 
-ATF_TC_BODY(check_memmem, tc)
+ATF_TC_BODY(memmem_basic, tc)
 {
 
 	expect(memmem(b2, lb2, p0, lp0) == b2);
@@ -95,7 +94,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, check_memmem);
+	ATF_TP_ADD_TC(tp, memmem_basic);
 
 	return atf_no_error();
 }
Index: src/tests/lib/libc/string/t_stresep.c
diff -u src/tests/lib/libc/string/t_stresep.c:1.1 src/tests/lib/libc/string/t_stresep.c:1.2
--- src/tests/lib/libc/string/t_stresep.c:1.1	Sun Dec 26 13:35:54 2010
+++ src/tests/lib/libc/string/t_stresep.c	Thu Jul  7 08:27:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_stresep.c,v 1.1 2010/12/26 13:35:54 pgoyette Exp $ */
+/*	$NetBSD: t_stresep.c,v 1.2 2011/07/07 08:27:36 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -42,15 +42,14 @@
 		atf_tc_fail("Check stderr for test id/line");		\
 	}
 
-ATF_TC(check_stresep);  
- 
-ATF_TC_HEAD(check_stresep, tc)
+ATF_TC(stresep_basic);
+ATF_TC_HEAD(stresep_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Test stresep results");
 }
 
-ATF_TC_BODY(check_stresep, tc)
+ATF_TC_BODY(stresep_basic, tc)
 {
 	char brk[] = "foo\\ \\ bar baz bar\\ foo\\  bar\\ \\ foo \\ \\ \\ "
 		 "baz bar\\ \\ ";
@@ -67,7 +66,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, check_stresep);
+	ATF_TP_ADD_TC(tp, stresep_basic);
 
 	return atf_no_error();
 }
Index: src/tests/lib/libc/string/t_swab.c
diff -u src/tests/lib/libc/string/t_swab.c:1.1 src/tests/lib/libc/string/t_swab.c:1.2
--- src/tests/lib/libc/string/t_swab.c:1.1	Sun Dec 26 13:35:54 2010
+++ src/tests/lib/libc/string/t_swab.c	Thu Jul  7 08:27:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_swab.c,v 1.1 2010/12/26 13:35:54 pgoyette Exp $ */
+/*	$NetBSD: t_swab.c,v 1.2 2011/07/07 08:27:36 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -61,15 +61,14 @@
 	printf("\n");
 }
 
-ATF_TC(check_swab);
-
-ATF_TC_HEAD(check_swab, tc)
+ATF_TC(swab_basic);
+ATF_TC_HEAD(swab_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "Test swab results");
 }
 
-ATF_TC_BODY(check_swab, tc)
+ATF_TC_BODY(swab_basic, tc)
 {
 	char a[MAXCHK], b[MAXCHK], r[MAXCHK];
 	size_t i;
@@ -90,7 +89,7 @@
 
 ATF_TP_ADD_TCS(tp)
 {
-	ATF_TP_ADD_TC(tp, check_swab);
+	ATF_TP_ADD_TC(tp, swab_basic);
 
 	return atf_no_error();
 }

Index: src/tests/lib/libc/string/t_popcount.c
diff -u src/tests/lib/libc/string/t_popcount.c:1.3 src/tests/lib/libc/string/t_popcount.c:1.4
--- src/tests/lib/libc/string/t_popcount.c:1.3	Sun Dec 26 13:29:47 2010
+++ src/tests/lib/libc/string/t_popcount.c	Thu Jul  7 08:27:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_popcount.c,v 1.3 2010/12/26 13:29:47 pgoyette Exp $	*/
+/*	$NetBSD: t_popcou

CVS commit: src/external/lgpl3/gmp/lib/libgmp/arch/powerpc

2011-07-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul  7 08:02:52 UTC 2011

Modified Files:
src/external/lgpl3/gmp/lib/libgmp/arch/powerpc: Makefile.inc

Log Message:
for now, compile all the powerpc asm files -DPIC.  fix this properly by
either compiling the dynamic version in a other dir separately, or call
gcc on the fly with the right arguments without generating .S file at all.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/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/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc
diff -u src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc:1.2 src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc:1.3
--- src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc:1.2	Sun Jul  3 06:43:16 2011
+++ src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc	Thu Jul  7 08:02:52 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.2 2011/07/03 06:43:16 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.3 2011/07/07 08:02:52 mrg Exp $
 
 SRCS+= \
 	random.c \
@@ -175,11 +175,11 @@
 
 BUILD_S_INCS=	-I${.CURDIR} -I${.OBJDIR}/dummy -I${DIST}/ -I${DIST}/mpn
 
-M4FLAGS.mode1s.o= -DPIC
+M4FLAGS= -DPIC
 .for _build _src in ${ASM_SRCS_LIST}
 ${_build:R}.s: Makefile dummy ${.OBJDIR}/config.m4
 	${TOOL_M4} -DCONFIG_TOP_SRCDIR=${DIST} ${BUILD_S_INCS} \
-		${M4FLAGS.${.TARGET:R}} \
+		${M4FLAGS} ${M4FLAGS.${.TARGET:R}} \
 		-DOPERATION_${.TARGET:R} ${DIST}/${_src} > ${.TARGET}
 
 SRCS+=		${_build:R}.s



CVS commit: src

2011-07-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul  7 07:47:11 UTC 2011

Modified Files:
src/external/gpl3/binutils/dist/bfd: elf32-ppc.c
src/gnu/dist/gdb6/bfd: elf32-ppc.c

Log Message:
apply a couple of (int) before r_type switch usage.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/dist/bfd/elf32-ppc.c
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/bfd/elf32-ppc.c

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

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/elf32-ppc.c
diff -u src/external/gpl3/binutils/dist/bfd/elf32-ppc.c:1.3 src/external/gpl3/binutils/dist/bfd/elf32-ppc.c:1.4
--- src/external/gpl3/binutils/dist/bfd/elf32-ppc.c:1.3	Wed Jul  6 09:01:35 2011
+++ src/external/gpl3/binutils/dist/bfd/elf32-ppc.c	Thu Jul  7 07:47:11 2011
@@ -6480,7 +6480,7 @@
   howto = NULL;
   if (r_type < R_PPC_max)
 	howto = ppc_elf_howto_table[r_type];
-  switch (r_type)
+  switch ((int)r_type)
 	{
 	default:
 	  (*_bfd_error_handler)

Index: src/gnu/dist/gdb6/bfd/elf32-ppc.c
diff -u src/gnu/dist/gdb6/bfd/elf32-ppc.c:1.2 src/gnu/dist/gdb6/bfd/elf32-ppc.c:1.3
--- src/gnu/dist/gdb6/bfd/elf32-ppc.c:1.2	Wed Jul  6 09:01:36 2011
+++ src/gnu/dist/gdb6/bfd/elf32-ppc.c	Thu Jul  7 07:47:11 2011
@@ -3028,7 +3028,7 @@
 	}
 
   r_type = ELF32_R_TYPE (rel->r_info);
-  switch (r_type)
+  switch ((int)r_type)
 	{
 	case R_PPC_GOT_TLSLD16:
 	case R_PPC_GOT_TLSLD16_LO:



CVS commit: src/etc/mtree

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 07:40:46 UTC 2011

Modified Files:
src/etc/mtree: NetBSD.dist.tests

Log Message:
Remove ../tests/syscall.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/etc/mtree/NetBSD.dist.tests

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.50 src/etc/mtree/NetBSD.dist.tests:1.51
--- src/etc/mtree/NetBSD.dist.tests:1.50	Sat Jun 25 05:45:12 2011
+++ src/etc/mtree/NetBSD.dist.tests	Thu Jul  7 07:40:46 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.50 2011/06/25 05:45:12 nonaka Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.51 2011/07/07 07:40:46 jruoho Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -108,7 +108,6 @@
 ./usr/libdata/debug/usr/tests/rump/rumpvfs
 ./usr/libdata/debug/usr/tests/sbin
 ./usr/libdata/debug/usr/tests/sbin/resize_ffs
-./usr/libdata/debug/usr/tests/syscall
 ./usr/libdata/debug/usr/tests/usr.bin
 ./usr/libdata/debug/usr/tests/usr.sbin
 ./usr/libdata/debug/usr/tests/util
@@ -244,7 +243,6 @@
 ./usr/tests/sbin/sysctl
 ./usr/tests/sys
 ./usr/tests/sys/rc
-./usr/tests/syscall
 ./usr/tests/toolchain
 ./usr/tests/toolchain/cc
 ./usr/tests/usr.bin



CVS commit: src/lib

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 07:37:17 UTC 2011

Modified Files:
src/lib: Makefile

Log Message:
Distribute libmpfr and libmpc across the dependency barriers so that
additional .WAITs are not needed.


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/lib/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/Makefile
diff -u src/lib/Makefile:1.171 src/lib/Makefile:1.172
--- src/lib/Makefile:1.171	Thu Jul  7 07:33:40 2011
+++ src/lib/Makefile	Thu Jul  7 07:37:17 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.171 2011/07/07 07:33:40 mrg Exp $
+#	$NetBSD: Makefile,v 1.172 2011/07/07 07:37:17 matt Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -78,10 +78,8 @@
 . endif
 .endif
 
-. if ${HAVE_GCC} >= 45
-SUBDIR+=	../external/lgpl3/gmp/lib/libgmp .WAIT
-SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr .WAIT
-SUBDIR+=	../external/lgpl2/mpc/lib/libmpc
+.if ${HAVE_GCC} >= 45
+SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
 .endif
 
 #
@@ -133,6 +131,10 @@
 . endif
 .endif
 
+.if ${HAVE_GCC} >= 45
+SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
+.endif
+
 # 2nd library dependency barrier 
 SUBDIR+=	.WAIT
 
@@ -161,6 +163,10 @@
 
 SUBDIR+=	librumphijack
 
+.if ${HAVE_GCC} >= 45
+SUBDIR+=	../external/lgpl2/mpc/lib/libmpc
+.endif
+
 # 3rd library dependency barrier 
 SUBDIR+=	.WAIT
 



CVS commit: src/lib

2011-07-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul  7 07:33:40 UTC 2011

Modified Files:
src/lib: Makefile

Log Message:
add .WAIT's between libgmp and libmpfr, and between libmpfr and libmpc.


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/lib/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/Makefile
diff -u src/lib/Makefile:1.170 src/lib/Makefile:1.171
--- src/lib/Makefile:1.170	Wed Jun 29 02:05:25 2011
+++ src/lib/Makefile	Thu Jul  7 07:33:40 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.170 2011/06/29 02:05:25 mrg Exp $
+#	$NetBSD: Makefile,v 1.171 2011/07/07 07:33:40 mrg Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -79,8 +79,8 @@
 .endif
 
 . if ${HAVE_GCC} >= 45
-SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
-SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
+SUBDIR+=	../external/lgpl3/gmp/lib/libgmp .WAIT
+SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr .WAIT
 SUBDIR+=	../external/lgpl2/mpc/lib/libmpc
 .endif
 



CVS commit: src/tests

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 07:31:30 UTC 2011

Modified Files:
src/tests: Makefile

Log Message:
Remove syscall SUBDIR.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/tests/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/Makefile
diff -u src/tests/Makefile:1.31 src/tests/Makefile:1.32
--- src/tests/Makefile:1.31	Wed Jun 15 23:45:45 2011
+++ src/tests/Makefile	Thu Jul  7 07:31:29 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2011/06/15 23:45:45 mrg Exp $
+# $NetBSD: Makefile,v 1.32 2011/07/07 07:31:29 jruoho Exp $
 
 .include 
 
@@ -8,7 +8,7 @@
 ATFFILE=	yes
 
 SUBDIR=		crypto dev fs games include ipf kernel lib libexec net
-SUBDIR+=	rump sbin sys syscall toolchain usr.bin usr.sbin util
+SUBDIR+=	rump sbin sys toolchain usr.bin usr.sbin util
 
 . if ${MKKMOD} != "no"
 SUBDIR+= modules



CVS commit: src/tests/lib/libc/sys

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 07:27:49 UTC 2011

Modified Files:
src/tests/lib/libc/sys: t_getcontext.c

Log Message:
Add some errno-checks.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_getcontext.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/libc/sys/t_getcontext.c
diff -u src/tests/lib/libc/sys/t_getcontext.c:1.1 src/tests/lib/libc/sys/t_getcontext.c:1.2
--- src/tests/lib/libc/sys/t_getcontext.c:1.1	Thu Jul  7 07:06:21 2011
+++ src/tests/lib/libc/sys/t_getcontext.c	Thu Jul  7 07:27:49 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_getcontext.c,v 1.1 2011/07/07 07:06:21 jruoho Exp $ */
+/* $NetBSD: t_getcontext.c,v 1.2 2011/07/07 07:27:49 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,13 +29,13 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_getcontext.c,v 1.1 2011/07/07 07:06:21 jruoho Exp $");
+__RCSID("$NetBSD: t_getcontext.c,v 1.2 2011/07/07 07:27:49 jruoho Exp $");
 
-#include 
+#include 
+#include 
 #include 
 #include 
-
-#include 
+#include 
 
 #define STACKSZ (10*1024)
 #define DEPTH 3
@@ -60,8 +60,41 @@
 	calls++;
 }
 
-ATF_TC(getcontext_link);
-ATF_TC_HEAD(getcontext_link, tc)
+ATF_TC(getcontext_err);
+ATF_TC_HEAD(getcontext_err, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test errors from getcontext(2)");
+}
+
+ATF_TC_BODY(getcontext_err, tc)
+{
+
+	errno = 0;
+	ATF_REQUIRE_ERRNO(EFAULT, getcontext((void *)-1) == -1);
+}
+
+ATF_TC(setcontext_err);
+ATF_TC_HEAD(setcontext_err, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test errors from setcontext(2)");
+}
+
+ATF_TC_BODY(setcontext_err, tc)
+{
+	ucontext_t uc;
+
+	uc.uc_link = NULL;
+	uc.uc_flags = -1;
+
+	errno = 0;
+	ATF_REQUIRE_ERRNO(EINVAL, setcontext(&uc) == -1);
+
+	errno = 0;
+	ATF_REQUIRE_ERRNO(EFAULT, setcontext((void *)-1) == -1);
+}
+
+ATF_TC(setcontext_link);
+ATF_TC_HEAD(setcontext_link, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr",
@@ -69,7 +102,7 @@
 	"and argument passing to the new context");
 }
 
-ATF_TC_BODY(getcontext_link, tc)
+ATF_TC_BODY(setcontext_link, tc)
 {
 	ucontext_t uc[DEPTH];
 	ucontext_t save;
@@ -95,7 +128,9 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, getcontext_link);
+	ATF_TP_ADD_TC(tp, getcontext_err);
+	ATF_TP_ADD_TC(tp, setcontext_err);
+	ATF_TP_ADD_TC(tp, setcontext_link);
 
 	return atf_no_error();
 }



CVS commit: src/lib/libc/arch

2011-07-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul  7 07:14:58 UTC 2011

Modified Files:
src/lib/libc/arch/arm/softfloat: softfloat.h
src/lib/libc/arch/m68k/softfloat: softfloat.h
src/lib/libc/arch/mips/softfloat: softfloat.h
src/lib/libc/arch/powerpc/softfloat: softfloat.h
src/lib/libc/arch/sh3/softfloat: softfloat.h
src/lib/libc/arch/sparc64/softfloat: softfloat.h

Log Message:
Don't define a new enum.  Just #define round_* to their FP_Rx instead.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/softfloat/softfloat.h
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/m68k/softfloat/softfloat.h
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/mips/softfloat/softfloat.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/powerpc/softfloat/softfloat.h
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/sh3/softfloat/softfloat.h
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/sparc64/softfloat/softfloat.h

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/softfloat/softfloat.h
diff -u src/lib/libc/arch/arm/softfloat/softfloat.h:1.8 src/lib/libc/arch/arm/softfloat/softfloat.h:1.9
--- src/lib/libc/arch/arm/softfloat/softfloat.h:1.8	Mon Jul  4 08:02:34 2011
+++ src/lib/libc/arch/arm/softfloat/softfloat.h	Thu Jul  7 07:14:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: softfloat.h,v 1.8 2011/07/04 08:02:34 matt Exp $	*/
+/*	$NetBSD: softfloat.h,v 1.9 2011/07/07 07:14:57 matt Exp $	*/
 
 /* This is a derivative work. */
 
@@ -84,12 +84,10 @@
 ---
 */
 extern fp_rnd float_rounding_mode;
-enum {
-float_round_nearest_even = FP_RN,
-float_round_to_zero  = FP_RZ,
-float_round_down = FP_RM,
-float_round_up   = FP_RP
-};
+#define float_round_nearest_even FP_RN
+#define float_round_to_zero  FP_RZ
+#define float_round_down FP_RM
+#define float_round_up   FP_RP
 
 /*
 ---

Index: src/lib/libc/arch/m68k/softfloat/softfloat.h
diff -u src/lib/libc/arch/m68k/softfloat/softfloat.h:1.3 src/lib/libc/arch/m68k/softfloat/softfloat.h:1.4
--- src/lib/libc/arch/m68k/softfloat/softfloat.h:1.3	Mon Jul  4 08:02:34 2011
+++ src/lib/libc/arch/m68k/softfloat/softfloat.h	Thu Jul  7 07:14:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: softfloat.h,v 1.3 2011/07/04 08:02:34 matt Exp $	*/
+/*	$NetBSD: softfloat.h,v 1.4 2011/07/07 07:14:57 matt Exp $	*/
 
 /* This is a derivative work. */
 
@@ -84,12 +84,10 @@
 ---
 */
 extern fp_rnd float_rounding_mode;
-enum {
-float_round_nearest_even = FP_RN,
-float_round_to_zero  = FP_RZ,
-float_round_down = FP_RM,
-float_round_up   = FP_RP
-};
+#define float_round_nearest_even FP_RN
+#define float_round_to_zero  FP_RZ
+#define float_round_down FP_RM
+#define float_round_up   FP_RP
 
 /*
 ---

Index: src/lib/libc/arch/mips/softfloat/softfloat.h
diff -u src/lib/libc/arch/mips/softfloat/softfloat.h:1.4 src/lib/libc/arch/mips/softfloat/softfloat.h:1.5
--- src/lib/libc/arch/mips/softfloat/softfloat.h:1.4	Mon Jul  4 08:02:34 2011
+++ src/lib/libc/arch/mips/softfloat/softfloat.h	Thu Jul  7 07:14:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: softfloat.h,v 1.4 2011/07/04 08:02:34 matt Exp $	*/
+/*	$NetBSD: softfloat.h,v 1.5 2011/07/07 07:14:57 matt Exp $	*/
 
 /* This is a derivative work. */
 
@@ -86,12 +86,10 @@
 ---
 */
 extern fp_rnd float_rounding_mode;
-enum {
-float_round_nearest_even = FP_RN,
-float_round_to_zero  = FP_RZ,
-float_round_down = FP_RM,
-float_round_up   = FP_RP
-};
+#define float_round_nearest_even	FP_RN
+#define float_round_to_zero		FP_RZ
+#define float_round_down		FP_RM
+#define float_round_up			FP_RP
 
 /*
 ---

Index: src/lib/libc/arch/powerpc/softfloat/softfloat.h
diff -u src/lib/libc/arch/powerpc/softfloat/softfloat.h:1.6 src/lib/libc/arch/powerpc/softfloat/softfloat.h:1.7
--- src/lib/libc/arch/powerpc/softfloat/softfloat.h:1.6	Mon Jul  4 08:02:34 2011
+++ src/lib/libc/arch/powerpc/softfloat/softfloat.h	Thu Jul  7 07:14:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: softfloat.h,v 1.6 2011/07/04 08:02:34 matt Exp $	*/
+/*	$NetBSD: softfloat.h,v 1.7 2011/07/07 07:14:57 matt Exp $	*/
 
 /* This is a derivative work. */
 
@@ -84,12 +84,10 @@
 ---
 */
 extern fp_rnd float_rounding_mode;
-enum {
-float_round_nearest_even = FP_RN,
-float_round_to_zero  = FP_RZ,
-float_round_down   

CVS commit: src

2011-07-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jul  7 07:06:21 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/sys: Makefile
Added Files:
src/tests/lib/libc/sys: t_getcontext.c
Removed Files:
src/tests/lib/libc/sys: t_cerror.c t_context.c

Log Message:
Remove 't_cerror' (this is tested by numerous individual tests).
Rename 't_context' to 't_getcontext' for consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.366 -r1.367 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.1 -r0 src/tests/lib/libc/sys/t_cerror.c \
src/tests/lib/libc/sys/t_context.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_getcontext.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.366 src/distrib/sets/lists/tests/mi:1.367
--- src/distrib/sets/lists/tests/mi:1.366	Thu Jul  7 06:58:53 2011
+++ src/distrib/sets/lists/tests/mi	Thu Jul  7 07:06:21 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.366 2011/07/07 06:58:53 jruoho Exp $
+# $NetBSD: mi,v 1.367 2011/07/07 07:06:21 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -459,12 +459,13 @@
 ./usr/libdata/debug/usr/tests/lib/libc/string/t_swab.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/systests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_access.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/sys/t_cerror.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_cerror.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_chroot.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_clone.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/sys/t_context.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_context.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_dup.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_fsync.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_getcontext.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getgroups.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getitimer.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getlogin.debug		tests-lib-debug		debug,atf
@@ -2029,12 +2030,13 @@
 ./usr/tests/lib/libc/sys			tests-lib-tests
 ./usr/tests/lib/libc/sys/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_access		tests-lib-tests		atf
-./usr/tests/lib/libc/sys/t_cerror		tests-lib-tests		atf
+./usr/tests/lib/libc/sys/t_cerror		tests-obsolete		obsolete
 ./usr/tests/lib/libc/sys/t_chroot		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_clone		tests-lib-tests		atf
-./usr/tests/lib/libc/sys/t_context		tests-lib-tests		atf
+./usr/tests/lib/libc/sys/t_context		tests-obsolete		obsolete
 ./usr/tests/lib/libc/sys/t_dup			tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_fsync		tests-lib-tests		atf
+./usr/tests/lib/libc/sys/t_getcontext		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_getgroups		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_getitimer		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_getlogin		tests-lib-tests		atf

Index: src/tests/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.4 src/tests/lib/libc/sys/Makefile:1.5
--- src/tests/lib/libc/sys/Makefile:1.4	Thu Jul  7 06:57:53 2011
+++ src/tests/lib/libc/sys/Makefile	Thu Jul  7 07:06:21 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2011/07/07 06:57:53 jruoho Exp $
+# $NetBSD: Makefile,v 1.5 2011/07/07 07:06:21 jruoho Exp $
 
 MKMAN=	no
 
@@ -7,12 +7,11 @@
 TESTSDIR=		${TESTSBASE}/lib/libc/sys
 
 TESTS_C+=		t_access
-TESTS_C+=		t_cerror
 TESTS_C+=		t_chroot
 TESTS_C+=		t_clone
-TESTS_C+=		t_context
 TESTS_C+=		t_dup
 TESTS_C+=		t_fsync
+TESTS_C+=		t_getcontext
 TESTS_C+=		t_getgroups
 TESTS_C+=		t_getitimer
 TESTS_C+=		t_getlogin

Added files:

Index: src/tests/lib/libc/sys/t_getcontext.c
diff -u /dev/null src/tests/lib/libc/sys/t_getcontext.c:1.1
--- /dev/null	Thu Jul  7 07:06:21 2011
+++ src/tests/lib/libc/sys/t_getcontext.c	Thu Jul  7 07:06:21 2011
@@ -0,0 +1,101 @@
+/* $NetBSD: t_getcontext.c,v 1.1 2011/07/07 07:06:21 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above