CVS commit: src/external/bsd/dhcpcd/dist

2012-03-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Mar 28 10:19:34 UTC 2012

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

Log Message:
* Fixed a potential segfault with IPv6 option handling
* Add a suffix to all our config files so that RA never stamps on IPv4
* All valgrind errors fixed on FreeBSD (with ./configure --debug=YES)
* When started with an interface list, respect that with signal handling
* Fix a potential route table corruption if we failed to add a route

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-5-5-6

U src/external/bsd/dhcpcd/dist/arp.c
U src/external/bsd/dhcpcd/dist/bind.c
U src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/control.c
U src/external/bsd/dhcpcd/dist/dhcp.c
U src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/duid.c
U src/external/bsd/dhcpcd/dist/eloop.c
U src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/if-pref.c
U src/external/bsd/dhcpcd/dist/ipv4ll.c
U src/external/bsd/dhcpcd/dist/ipv6rs.c
U src/external/bsd/dhcpcd/dist/net.c
U src/external/bsd/dhcpcd/dist/signals.c
U src/external/bsd/dhcpcd/dist/configure.c
U src/external/bsd/dhcpcd/dist/bpf.c
U src/external/bsd/dhcpcd/dist/if-bsd.c
U src/external/bsd/dhcpcd/dist/platform-bsd.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
C src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
C src/external/bsd/dhcpcd/dist/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/arp.h
U src/external/bsd/dhcpcd/dist/bind.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
U src/external/bsd/dhcpcd/dist/common.h
U src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/configure.h
U src/external/bsd/dhcpcd/dist/control.h
U src/external/bsd/dhcpcd/dist/defs.h
U src/external/bsd/dhcpcd/dist/dhcp.h
U src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/duid.h
U src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/if-pref.h
U src/external/bsd/dhcpcd/dist/ipv4ll.h
U src/external/bsd/dhcpcd/dist/ipv6rs.h
U src/external/bsd/dhcpcd/dist/net.h
U src/external/bsd/dhcpcd/dist/platform.h
U src/external/bsd/dhcpcd/dist/signals.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind

2 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist



CVS commit: src/doc

2012-03-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Mar 28 10:22:46 UTC 2012

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Import dhcpcd-5.5.6


To generate a diff of this commit:
cvs rdiff -u -r1.927 -r1.928 src/doc/3RDPARTY
cvs rdiff -u -r1.1692 -r1.1693 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.927 src/doc/3RDPARTY:1.928
--- src/doc/3RDPARTY:1.927	Tue Mar 27 21:23:45 2012
+++ src/doc/3RDPARTY	Wed Mar 28 10:22:46 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.927 2012/03/27 21:23:45 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.928 2012/03/28 10:22:46 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -284,8 +284,8 @@ No changes for NetBSD integration - just
 top of the current tree.
 
 Package:	dhcpcd
-Version:	5.5.5
-Current Vers:	5.5.5
+Version:	5.5.6
+Current Vers:	5.5.6
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1692 src/doc/CHANGES:1.1693
--- src/doc/CHANGES:1.1692	Tue Mar 27 21:23:45 2012
+++ src/doc/CHANGES	Wed Mar 28 10:22:46 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1692 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1693 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -39,3 +39,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		[nonaka 20120325]
 	pcc: upgrade to 1.1.0.DEVEL 20120325 [plunky 20120325]
 	openresolv(8): Import openresolv-3.5.1 [roy 20120327]
+	dhcpcd(8): Import dhcpcd-5.5.6 [roy 20120328]



CVS commit: src

2012-03-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Mar 28 10:33:58 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/stdlib: Makefile
Added Files:
src/tests/lib/libc/stdlib: t_random.c

Log Message:
Add a small test that checks that random(3) does not always return zero when
the RNG is initialized with zero. Prompoted by the recent nasty bug in the
OpenBSD libc.


To generate a diff of this commit:
cvs rdiff -u -r1.458 -r1.459 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libc/stdlib/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdlib/t_random.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.458 src/distrib/sets/lists/tests/mi:1.459
--- src/distrib/sets/lists/tests/mi:1.458	Tue Mar 27 08:16:33 2012
+++ src/distrib/sets/lists/tests/mi	Wed Mar 28 10:33:57 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.458 2012/03/27 08:16:33 jruoho Exp $
+# $NetBSD: mi,v 1.459 2012/03/28 10:33:57 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -495,6 +495,7 @@
 ./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
+./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_random.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_strtod.debug		tests-lib-debug		debug,atf
 ./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
@@ -2387,6 +2388,7 @@
 ./usr/tests/lib/libc/stdlib/t_hsearch		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_mi_vector_hash	tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_posix_memalign	tests-lib-tests		atf
+./usr/tests/lib/libc/stdlib/t_random		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_strtod		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_strtol		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_strtox		tests-obsolete		obsolete

Index: src/tests/lib/libc/stdlib/Makefile
diff -u src/tests/lib/libc/stdlib/Makefile:1.19 src/tests/lib/libc/stdlib/Makefile:1.20
--- src/tests/lib/libc/stdlib/Makefile:1.19	Fri Feb 24 14:02:55 2012
+++ src/tests/lib/libc/stdlib/Makefile	Wed Mar 28 10:33:57 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2012/02/24 14:02:55 joerg Exp $
+# $NetBSD: Makefile,v 1.20 2012/03/28 10:33:57 jruoho Exp $
 
 .include bsd.own.mk
 
@@ -11,6 +11,7 @@ TESTS_C+=	t_exit
 TESTS_C+=	t_hsearch
 TESTS_C+=	t_mi_vector_hash
 TESTS_C+=	t_posix_memalign
+TESTS_C+=	t_random
 TESTS_C+=	t_strtod
 TESTS_C+=	t_strtol
 TESTS_C+=	t_system

Added files:

Index: src/tests/lib/libc/stdlib/t_random.c
diff -u /dev/null src/tests/lib/libc/stdlib/t_random.c:1.1
--- /dev/null	Wed Mar 28 10:33:58 2012
+++ src/tests/lib/libc/stdlib/t_random.c	Wed Mar 28 10:33:57 2012
@@ -0,0 +1,72 @@
+/* $NetBSD: t_random.c,v 1.1 2012/03/28 10:33:57 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jukka Ruohonen.
+ *
+ * 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) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include sys/cdefs.h
+__RCSID($NetBSD: t_random.c,v 1.1 2012/03/28 10:33:57 jruoho Exp $);
+
+#include atf-c.h
+#include stdlib.h
+
+/*
+ * TODO: Add some general RNG tests (cf. the famous 

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

2012-03-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Mar 28 10:38:00 UTC 2012

Modified Files:
src/tests/lib/libc/stdlib: t_random.c

Log Message:
Apparently there is a CVE coming for the bug, so append that to a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/t_random.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_random.c
diff -u src/tests/lib/libc/stdlib/t_random.c:1.1 src/tests/lib/libc/stdlib/t_random.c:1.2
--- src/tests/lib/libc/stdlib/t_random.c:1.1	Wed Mar 28 10:33:57 2012
+++ src/tests/lib/libc/stdlib/t_random.c	Wed Mar 28 10:38:00 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_random.c,v 1.1 2012/03/28 10:33:57 jruoho Exp $ */
+/* $NetBSD: t_random.c,v 1.2 2012/03/28 10:38:00 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_random.c,v 1.1 2012/03/28 10:33:57 jruoho Exp $);
+__RCSID($NetBSD: t_random.c,v 1.2 2012/03/28 10:38:00 jruoho Exp $);
 
 #include atf-c.h
 #include stdlib.h
@@ -52,6 +52,9 @@ ATF_TC_BODY(random_zero, tc)
 	size_t i, j;
 	long x;
 
+	/*
+	 * See CVE-2012-1577.
+	 */
 	srandom(0);
 
 	for (i = j = 0; i  n; i++) {



CVS commit: src/sys/dev/pci

2012-03-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Mar 28 14:54:15 UTC 2012

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add JMB 362 (as found on ASUS M5A99X motherboard)


To generate a diff of this commit:
cvs rdiff -u -r1.1107 -r1.1108 src/sys/dev/pci/pcidevs

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/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1107 src/sys/dev/pci/pcidevs:1.1108
--- src/sys/dev/pci/pcidevs:1.1107	Wed Mar 21 13:30:12 2012
+++ src/sys/dev/pci/pcidevs	Wed Mar 28 14:54:15 2012
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1107 2012/03/21 13:30:12 sborrill Exp $
+$NetBSD: pcidevs,v 1.1108 2012/03/28 14:54:15 pgoyette Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3130,6 +3130,7 @@ product ITT ITT3204	0x0002	ITT3204 MPEG 
 /* JMicron products */
 product JMICRON	JMB360		0x2360 JMB360 SATA Controller
 product JMICRON	JMB361		0x2361 JMB361 SATA/PATA Controller
+product JMICRON	JMB362		0x2362 JMB362 SATA Controller
 product JMICRON	JMB363		0x2363 JMB363 SATA/PATA Controller
 product JMICRON	JMB365		0x2365 JMB365 SATA/PATA Controller
 product JMICRON	JMB366		0x2366 JMB366 SATA/PATA Controller



CVS commit: src/lib/libc/stdio

2012-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 28 15:21:11 UTC 2012

Modified Files:
src/lib/libc/stdio: funopen.c

Log Message:
only provide compatibility i/o functions to the ones provided by the caller.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdio/funopen.c

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

Modified files:

Index: src/lib/libc/stdio/funopen.c
diff -u src/lib/libc/stdio/funopen.c:1.13 src/lib/libc/stdio/funopen.c:1.14
--- src/lib/libc/stdio/funopen.c:1.13	Tue Mar 27 11:05:42 2012
+++ src/lib/libc/stdio/funopen.c	Wed Mar 28 11:21:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: funopen.c,v 1.13 2012/03/27 15:05:42 christos Exp $	*/
+/*	$NetBSD: funopen.c,v 1.14 2012/03/28 15:21:11 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)funopen.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: funopen.c,v 1.13 2012/03/27 15:05:42 christos Exp $);
+__RCSID($NetBSD: funopen.c,v 1.14 2012/03/28 15:21:11 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -159,7 +159,12 @@ funopen(const void *cookie,
 	d-writefn = writefn;
 	d-seekfn = seekfn;
 	d-closefn = closefn;
-	fp = funopen2(d, creadfn, cwritefn, cseekfn, NULL, cclosefn);
+	fp = funopen2(d,
+	d-readfn ? creadfn : NULL,
+	d-writefn ? cwritefn : NULL,
+	d-seekfn ? cseekfn : NULL,
+	NULL,
+	d-closefn ? cclosefn : NULL);
 	if (fp != NULL)
 		return fp;
 	free(d);



CVS commit: src/sys/arch

2012-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 28 17:03:31 UTC 2012

Modified Files:
src/sys/arch/alpha/include: limits.h
src/sys/arch/amd64/include: limits.h
src/sys/arch/amiga/include: limits.h
src/sys/arch/arm/include: limits.h
src/sys/arch/atari/include: limits.h
src/sys/arch/dreamcast/include: limits.h
src/sys/arch/evbsh3/include: limits.h
src/sys/arch/hp300/include: limits.h
src/sys/arch/hpcsh/include: limits.h
src/sys/arch/hppa/include: limits.h
src/sys/arch/i386/include: limits.h
src/sys/arch/ia64/include: limits.h
src/sys/arch/landisk/include: limits.h
src/sys/arch/luna68k/include: limits.h
src/sys/arch/m68k/include: limits.h
src/sys/arch/mac68k/include: limits.h
src/sys/arch/mips/include: limits.h
src/sys/arch/mvme68k/include: limits.h
src/sys/arch/news68k/include: limits.h
src/sys/arch/powerpc/include: limits.h
src/sys/arch/sh3/include: limits.h
src/sys/arch/sparc/include: limits.h
src/sys/arch/vax/include: limits.h
src/sys/arch/x68k/include: limits.h

Log Message:
- Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/include/limits.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/include/limits.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amiga/include/limits.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/limits.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/arch/atari/include/limits.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/dreamcast/include/limits.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbsh3/include/limits.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp300/include/limits.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hpcsh/include/limits.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/include/limits.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/i386/include/limits.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/limits.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/landisk/include/limits.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/include/limits.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/m68k/include/limits.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mac68k/include/limits.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/mips/include/limits.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mvme68k/include/limits.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/news68k/include/limits.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/include/limits.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sh3/include/limits.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc/include/limits.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/vax/include/limits.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/include/limits.h

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

Modified files:

Index: src/sys/arch/alpha/include/limits.h
diff -u src/sys/arch/alpha/include/limits.h:1.13 src/sys/arch/alpha/include/limits.h:1.14
--- src/sys/arch/alpha/include/limits.h:1.13	Mon Jun  7 09:52:30 2010
+++ src/sys/arch/alpha/include/limits.h	Wed Mar 28 13:03:27 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.13 2010/06/07 13:52:30 tnozaki Exp $ */
+/* $NetBSD: limits.h,v 1.14 2012/03/28 17:03:27 christos Exp $ */
 
 /*
  * Copyright (c) 1988, 1993
@@ -48,13 +48,10 @@
  * These numbers work for pcc as well.  The UINT_MAX and ULONG_MAX values
  * are written as hex so that GCC will be quiet about large integer constants.
  */
+#define	UCHAR_MAX	0xff		/* max value for an unsigned char */
 #define	SCHAR_MAX	0x7f		/* max value for a signed char */
 #define	SCHAR_MIN	(-0x7f-1)	/* min value for a signed char */
 
-#define	UCHAR_MAX	0xff		/* max value for an unsigned char */
-#define	CHAR_MAX	0x7f		/* max value for a char */
-#define	CHAR_MIN	(-0x7f-1)	/* min value for a char */
-
 #define	USHRT_MAX	0x		/* max value for an unsigned short */
 #define	SHRT_MAX	0x7fff		/* max value for a short */
 #define	SHRT_MIN	(-0x7fff-1)	/* min value for a short */

Index: src/sys/arch/amd64/include/limits.h
diff -u src/sys/arch/amd64/include/limits.h:1.11 src/sys/arch/amd64/include/limits.h:1.12
--- src/sys/arch/amd64/include/limits.h:1.11	Mon Jun  7 09:52:30 2010
+++ src/sys/arch/amd64/include/limits.h	Wed Mar 28 13:03:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: limits.h,v 1.11 2010/06/07 13:52:30 tnozaki Exp $	*/
+/*	$NetBSD: limits.h,v 1.12 2012/03/28 17:03:28 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -40,13 +40,10 @@
 
 #define	CHAR_BIT	8		/* number of bits in a char */
 
+#define	UCHAR_MAX	0xff		/* max value for an unsigned char */
 #define	SCHAR_MAX	0x7f		/* max value for a signed char */
 #define SCHAR_MIN	(-0x7f-1)	/* min value for a signed char */
 
-#define	UCHAR_MAX	0xff		/* max value for an unsigned char */
-#define	CHAR_MAX	0x7f		/* max value for a 

CVS commit: src/include

2012-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 28 17:04:41 UTC 2012

Modified Files:
src/include: limits.h

Log Message:
make CHAR_{MIN,MAX} work for both -fsigned-char and -funsigned-char


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/include/limits.h

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

Modified files:

Index: src/include/limits.h
diff -u src/include/limits.h:1.31 src/include/limits.h:1.32
--- src/include/limits.h:1.31	Thu Oct  6 12:02:52 2011
+++ src/include/limits.h	Wed Mar 28 13:04:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: limits.h,v 1.31 2011/10/06 16:02:52 christos Exp $	*/
+/*	$NetBSD: limits.h,v 1.32 2012/03/28 17:04:41 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -162,6 +162,15 @@
 #endif
 
 #include machine/limits.h
+
+#ifdef __CHAR_UNSIGNED__
+# define CHAR_MIN 0
+# define CHAR_MAX UCHAR_MAX
+#else
+# define CHAR_MIN SCHAR_MIN
+# define CHAR_MAX SCHAR_MAX
+#endif
+
 #include sys/syslimits.h
 
 #endif /* !_LIMITS_H_ */



CVS commit: src/usr.sbin/syslogd

2012-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 28 17:39:33 UTC 2012

Modified Files:
src/usr.sbin/syslogd: syslogd.8 syslogd.c

Log Message:
add aliases for the protocol format


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/syslogd/syslogd.8
cvs rdiff -u -r1.105 -r1.106 src/usr.sbin/syslogd/syslogd.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.sbin/syslogd/syslogd.8
diff -u src/usr.sbin/syslogd/syslogd.8:1.49 src/usr.sbin/syslogd/syslogd.8:1.50
--- src/usr.sbin/syslogd/syslogd.8:1.49	Thu Oct 15 16:35:07 2009
+++ src/usr.sbin/syslogd/syslogd.8	Wed Mar 28 13:39:33 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: syslogd.8,v 1.49 2009/10/15 20:35:07 plunky Exp $
+.\	$NetBSD: syslogd.8,v 1.50 2012/03/28 17:39:33 christos Exp $
 .\
 .\ Copyright (c) 1983, 1986, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ from: @(#)syslogd.8	8.1 (Berkeley) 6/6/93
 .\
-.Dd October 15, 2009
+.Dd March 28, 2012
 .Dt SYSLOGD 8
 .Os
 .Sh NAME
@@ -97,9 +97,9 @@ Do not perform hostname lookups; report 
 .It Fl o Ar output_format
 Select output message format.
 .Bl -hang
-.It Em rfc3164
+.It Em bsd , rfc3164
 traditional BSD Syslog format (default)
-.It Em syslog
+.It Em syslog , rfc5424
 new syslog-protocol format
 .El
 .It Fl P

Index: src/usr.sbin/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.105 src/usr.sbin/syslogd/syslogd.c:1.106
--- src/usr.sbin/syslogd/syslogd.c:1.105	Wed Aug 31 12:25:00 2011
+++ src/usr.sbin/syslogd/syslogd.c	Wed Mar 28 13:39:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.105 2011/08/31 16:25:00 plunky Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.106 2012/03/28 17:39:33 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)syslogd.c	8.3 (Berkeley) 4/4/94;
 #else
-__RCSID($NetBSD: syslogd.c,v 1.105 2011/08/31 16:25:00 plunky Exp $);
+__RCSID($NetBSD: syslogd.c,v 1.106 2012/03/28 17:39:33 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -334,9 +334,10 @@ main(int argc, char *argv[])
 			UseNameService = 0;
 			break;
 		case 'o':		/* message format */
-			if (!strncmp(optarg, rfc3164, sizeof(rfc3164)-1))
+#define EQ(a)		(strncmp(optarg, # a, sizeof(# a) - 1) == 0)
+			if (EQ(bsd) || EQ(rfc3264))
 BSDOutputFormat = true;
-			else if (!strncmp(optarg, syslog, sizeof(syslog)-1))
+			else if (EQ(syslog) || EQ(rfc5424))
 BSDOutputFormat = false;
 			else
 usage();



CVS commit: src/bin/sh

2012-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 28 20:11:25 UTC 2012

Modified Files:
src/bin/sh: expand.c input.c parser.c syntax.c var.c

Log Message:
include limits.h for CHAR_MIN/CHAR_MAX


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/bin/sh/expand.c
cvs rdiff -u -r1.44 -r1.45 src/bin/sh/input.c
cvs rdiff -u -r1.81 -r1.82 src/bin/sh/parser.c
cvs rdiff -u -r1.2 -r1.3 src/bin/sh/syntax.c
cvs rdiff -u -r1.40 -r1.41 src/bin/sh/var.c

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

Modified files:

Index: src/bin/sh/expand.c
diff -u src/bin/sh/expand.c:1.86 src/bin/sh/expand.c:1.87
--- src/bin/sh/expand.c:1.86	Wed Aug 31 12:24:54 2011
+++ src/bin/sh/expand.c	Wed Mar 28 16:11:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.86 2011/08/31 16:24:54 plunky Exp $	*/
+/*	$NetBSD: expand.c,v 1.87 2012/03/28 20:11:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)expand.c	8.5 (Berkeley) 5/15/95;
 #else
-__RCSID($NetBSD: expand.c,v 1.86 2011/08/31 16:24:54 plunky Exp $);
+__RCSID($NetBSD: expand.c,v 1.87 2012/03/28 20:11:25 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -48,6 +48,7 @@ __RCSID($NetBSD: expand.c,v 1.86 2011/0
 #include dirent.h
 #include unistd.h
 #include pwd.h
+#include limits.h
 #include stdlib.h
 #include stdio.h
 

Index: src/bin/sh/input.c
diff -u src/bin/sh/input.c:1.44 src/bin/sh/input.c:1.45
--- src/bin/sh/input.c:1.44	Thu Feb 17 10:13:49 2011
+++ src/bin/sh/input.c	Wed Mar 28 16:11:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: input.c,v 1.44 2011/02/17 15:13:49 pooka Exp $	*/
+/*	$NetBSD: input.c,v 1.45 2012/03/28 20:11:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)input.c	8.3 (Berkeley) 6/9/95;
 #else
-__RCSID($NetBSD: input.c,v 1.44 2011/02/17 15:13:49 pooka Exp $);
+__RCSID($NetBSD: input.c,v 1.45 2012/03/28 20:11:25 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -45,6 +45,7 @@ __RCSID($NetBSD: input.c,v 1.44 2011/02
 #include fcntl.h
 #include errno.h
 #include unistd.h
+#include limits.h
 #include stdlib.h
 #include string.h
 

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.81 src/bin/sh/parser.c:1.82
--- src/bin/sh/parser.c:1.81	Sun Mar 25 14:49:13 2012
+++ src/bin/sh/parser.c	Wed Mar 28 16:11:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.81 2012/03/25 18:49:13 christos Exp $	*/
+/*	$NetBSD: parser.c,v 1.82 2012/03/28 20:11:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,11 +37,12 @@
 #if 0
 static char sccsid[] = @(#)parser.c	8.7 (Berkeley) 5/16/95;
 #else
-__RCSID($NetBSD: parser.c,v 1.81 2012/03/25 18:49:13 christos Exp $);
+__RCSID($NetBSD: parser.c,v 1.82 2012/03/28 20:11:25 christos Exp $);
 #endif
 #endif /* not lint */
 
 #include stdlib.h
+#include limits.h
 
 #include shell.h
 #include parser.h

Index: src/bin/sh/syntax.c
diff -u src/bin/sh/syntax.c:1.2 src/bin/sh/syntax.c:1.3
--- src/bin/sh/syntax.c:1.2	Wed Dec 12 17:55:43 2007
+++ src/bin/sh/syntax.c	Wed Mar 28 16:11:25 2012
@@ -1,8 +1,9 @@
-/*	$NetBSD: syntax.c,v 1.2 2007/12/12 22:55:43 lukem Exp $	*/
+/*	$NetBSD: syntax.c,v 1.3 2012/03/28 20:11:25 christos Exp $	*/
 
 #include sys/cdefs.h
-__RCSID($NetBSD: syntax.c,v 1.2 2007/12/12 22:55:43 lukem Exp $);
+__RCSID($NetBSD: syntax.c,v 1.3 2012/03/28 20:11:25 christos Exp $);
 
+#include limits.h
 #include shell.h
 #include syntax.h
 #include parser.h

Index: src/bin/sh/var.c
diff -u src/bin/sh/var.c:1.40 src/bin/sh/var.c:1.41
--- src/bin/sh/var.c:1.40	Sat Jun 18 17:18:46 2011
+++ src/bin/sh/var.c	Wed Mar 28 16:11:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.40 2011/06/18 21:18:46 christos Exp $	*/
+/*	$NetBSD: var.c,v 1.41 2012/03/28 20:11:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)var.c	8.3 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: var.c,v 1.40 2011/06/18 21:18:46 christos Exp $);
+__RCSID($NetBSD: var.c,v 1.41 2012/03/28 20:11:25 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -45,6 +45,7 @@ __RCSID($NetBSD: var.c,v 1.40 2011/06/1
 #include stdlib.h
 #include strings.h
 #include paths.h
+#include limits.h
 
 /*
  * Shell variables.



CVS commit: src/sys/dev/pci

2012-03-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar 29 00:02:41 UTC 2012

Modified Files:
src/sys/dev/pci: jmide.c

Log Message:
Add match for JMB362 (with two SATA ports).


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/jmide.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/pci/jmide.c
diff -u src/sys/dev/pci/jmide.c:1.12 src/sys/dev/pci/jmide.c:1.13
--- src/sys/dev/pci/jmide.c:1.12	Mon Jan 30 19:41:22 2012
+++ src/sys/dev/pci/jmide.c	Thu Mar 29 00:02:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: jmide.c,v 1.12 2012/01/30 19:41:22 drochner Exp $	*/
+/*	$NetBSD: jmide.c,v 1.13 2012/03/29 00:02:41 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: jmide.c,v 1.12 2012/01/30 19:41:22 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: jmide.c,v 1.13 2012/03/29 00:02:41 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -68,6 +68,10 @@ static const struct jmide_product jm_pro
 	  1,
 	  1
 	},
+	{ PCI_PRODUCT_JMICRON_JMB362,
+	  0,
+	  2
+	},
 	{ PCI_PRODUCT_JMICRON_JMB363,
 	  1,
 	  2



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

2012-03-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar 29 05:56:36 UTC 2012

Modified Files:
src/tests/lib/libc/stdlib: t_atoi.c

Log Message:
There was also atoll(3).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/t_atoi.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_atoi.c
diff -u src/tests/lib/libc/stdlib/t_atoi.c:1.1 src/tests/lib/libc/stdlib/t_atoi.c:1.2
--- src/tests/lib/libc/stdlib/t_atoi.c:1.1	Thu Mar 29 05:42:31 2012
+++ src/tests/lib/libc/stdlib/t_atoi.c	Thu Mar 29 05:56:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_atoi.c,v 1.1 2012/03/29 05:42:31 jruoho Exp $ */
+/* $NetBSD: t_atoi.c,v 1.2 2012/03/29 05:56:36 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_atoi.c,v 1.1 2012/03/29 05:42:31 jruoho Exp $);
+__RCSID($NetBSD: t_atoi.c,v 1.2 2012/03/29 05:56:36 jruoho Exp $);
 
 #include atf-c.h
 #include float.h
@@ -46,7 +46,7 @@ ATF_TC_HEAD(atof_strtod, tc)
 
 ATF_TC_BODY(atof_strtod, tc)
 {
-	char buf[64];
+	char buf[128];
 
 	(void)snprintf(buf, sizeof(buf), %f\n, DBL_MAX);
 
@@ -91,12 +91,31 @@ ATF_TC_BODY(atol_strtol, tc)
 	ATF_REQUIRE(atol(buf)  == strtol(buf, NULL, 10));
 }
 
+ATF_TC(atoll_strtoll);
+ATF_TC_HEAD(atoll_strtoll, tc)
+{
+	atf_tc_set_md_var(tc, descr,
+	Test that atoll(3) matches the corresponding strtoll(3) call);
+}
+
+ATF_TC_BODY(atoll_strtoll, tc)
+{
+	char buf[128];
+
+	(void)snprintf(buf, sizeof(buf), %lld\n, LLONG_MAX);
+
+	ATF_REQUIRE(atoll(0)  == strtoll(0, NULL, 10));
+	ATF_REQUIRE(atoll(-1) == strtoll(-1, NULL, 10));
+	ATF_REQUIRE(atoll(buf)  == strtoll(buf, NULL, 10));
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, atof_strtod);
 	ATF_TP_ADD_TC(tp, atoi_strtol);
 	ATF_TP_ADD_TC(tp, atol_strtol);
+	ATF_TP_ADD_TC(tp, atoll_strtoll);
 
 	return atf_no_error();
 }