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

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 08:07:35 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: bus_dma.c

Log Message:
Rework counters.
Get rid of a badly done goto.
Properly deal with boundary in bus_dmamem_alloc_range.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/arm/arm32/bus_dma.c

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

Modified files:

Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.75 src/sys/arch/arm/arm32/bus_dma.c:1.76
--- src/sys/arch/arm/arm32/bus_dma.c:1.75	Thu Feb 14 01:12:39 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Thu Feb 14 08:07:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.75 2013/02/14 01:12:39 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.76 2013/02/14 08:07:35 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.75 2013/02/14 01:12:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.76 2013/02/14 08:07:35 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -55,6 +55,7 @@ __KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 
 
 #include arm/cpufunc.h
 
+#ifdef BUSDMA_COUNTERS
 static struct evcnt bus_dma_creates =
 	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, creates);
 static struct evcnt bus_dma_bounced_creates =
@@ -75,6 +76,22 @@ static struct evcnt bus_dma_bounced_dest
 	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, bounced destroys);
 static struct evcnt bus_dma_destroys =
 	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, destroys);
+static struct evcnt bus_dma_sync_prereadwrite = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync prereadwrite);
+static struct evcnt bus_dma_sync_preread_begin =
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync preread begin);
+static struct evcnt bus_dma_sync_preread =
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync preread);
+static struct evcnt bus_dma_sync_preread_tail =
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync preread tail);
+static struct evcnt bus_dma_sync_prewrite = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync prewrite);
+static struct evcnt bus_dma_sync_postread = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync postread);
+static struct evcnt bus_dma_sync_postreadwrite = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync postreadwrite);
+static struct evcnt bus_dma_sync_postwrite = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync postwrite);
 
 EVCNT_ATTACH_STATIC(bus_dma_creates);
 EVCNT_ATTACH_STATIC(bus_dma_bounced_creates);
@@ -86,8 +103,19 @@ EVCNT_ATTACH_STATIC(bus_dma_unloads);
 EVCNT_ATTACH_STATIC(bus_dma_bounced_unloads);
 EVCNT_ATTACH_STATIC(bus_dma_destroys);
 EVCNT_ATTACH_STATIC(bus_dma_bounced_destroys);
+EVCNT_ATTACH_STATIC(bus_dma_sync_prereadwrite);
+EVCNT_ATTACH_STATIC(bus_dma_sync_preread_begin);
+EVCNT_ATTACH_STATIC(bus_dma_sync_preread);
+EVCNT_ATTACH_STATIC(bus_dma_sync_preread_tail);
+EVCNT_ATTACH_STATIC(bus_dma_sync_prewrite);
+EVCNT_ATTACH_STATIC(bus_dma_sync_postread);
+EVCNT_ATTACH_STATIC(bus_dma_sync_postreadwrite);
+EVCNT_ATTACH_STATIC(bus_dma_sync_postwrite);
 
 #define	STAT_INCR(x)	(bus_dma_ ## x.ev_count++)
+#else
+#define	STAT_INCR(x)	/*(bus_dma_ ## x.ev_count++)*/
+#endif
 
 int	_bus_dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *,
 	bus_size_t, struct vmspace *, int);
@@ -724,6 +752,7 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 	switch (ops) {
 	case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE:
 		if (!readonly_p) {
+			STAT_INCR(sync_prereadwrite);
 			cpu_dcache_wbinv_range(va, len);
 			cpu_sdcache_wbinv_range(va, pa, len);
 			break;
@@ -734,6 +763,7 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 		const size_t line_size = arm_dcache_align;
 		const size_t line_mask = arm_dcache_align_mask;
 		vsize_t misalignment = va  line_mask;
+		STAT_INCR(sync_preread);
 		if (misalignment) {
 			va -= misalignment;
 			pa -= misalignment;
@@ -762,6 +792,7 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 	}
 
 	case BUS_DMASYNC_PREWRITE:
+		STAT_INCR(sync_prewrite);
 		cpu_dcache_wb_range(va, len);
 		cpu_sdcache_wb_range(va, pa, len);
 		break;
@@ -774,7 +805,12 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 	 * have to worry about having to write back their contents.
 	 */
 	case BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE:
+		STAT_INCR(sync_postreadwrite);
+		cpu_dcache_inv_range(va, len);
+		cpu_sdcache_inv_range(va, pa, len);
+		break;
 	case BUS_DMASYNC_POSTREAD:
+		STAT_INCR(sync_postread);
 		cpu_dcache_inv_range(va, len);
 		cpu_sdcache_inv_range(va, pa, len);
 		break;
@@ -975,6 +1011,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 	const int post_ops = 0;
 #endif
 	if (!bouncing  pre_ops == 0  post_ops == BUS_DMASYNC_POSTWRITE) {
+		STAT_INCR(sync_postwrite);
 		return;
 	}
 	KASSERTMSG(bouncing || 

CVS commit: [matt-nb6-plus] src/sys/arch/arm/arm32

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 08:08:18 UTC 2013

Modified Files:
src/sys/arch/arm/arm32 [matt-nb6-plus]: bus_dma.c

Log Message:
Sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.54.10.3 -r1.54.10.4 src/sys/arch/arm/arm32/bus_dma.c

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

Modified files:

Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.54.10.3 src/sys/arch/arm/arm32/bus_dma.c:1.54.10.4
--- src/sys/arch/arm/arm32/bus_dma.c:1.54.10.3	Thu Feb 14 01:12:53 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Thu Feb 14 08:08:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.54.10.3 2013/02/14 01:12:53 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.54.10.4 2013/02/14 08:08:18 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.54.10.3 2013/02/14 01:12:53 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.54.10.4 2013/02/14 08:08:18 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -55,6 +55,7 @@ __KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 
 
 #include arm/cpufunc.h
 
+#ifdef BUSDMA_COUNTERS
 static struct evcnt bus_dma_creates =
 	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, creates);
 static struct evcnt bus_dma_bounced_creates =
@@ -75,6 +76,22 @@ static struct evcnt bus_dma_bounced_dest
 	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, bounced destroys);
 static struct evcnt bus_dma_destroys =
 	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, destroys);
+static struct evcnt bus_dma_sync_prereadwrite = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync prereadwrite);
+static struct evcnt bus_dma_sync_preread_begin =
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync preread begin);
+static struct evcnt bus_dma_sync_preread =
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync preread);
+static struct evcnt bus_dma_sync_preread_tail =
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync preread tail);
+static struct evcnt bus_dma_sync_prewrite = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync prewrite);
+static struct evcnt bus_dma_sync_postread = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync postread);
+static struct evcnt bus_dma_sync_postreadwrite = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync postreadwrite);
+static struct evcnt bus_dma_sync_postwrite = 
+	EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, sync postwrite);
 
 EVCNT_ATTACH_STATIC(bus_dma_creates);
 EVCNT_ATTACH_STATIC(bus_dma_bounced_creates);
@@ -86,8 +103,19 @@ EVCNT_ATTACH_STATIC(bus_dma_unloads);
 EVCNT_ATTACH_STATIC(bus_dma_bounced_unloads);
 EVCNT_ATTACH_STATIC(bus_dma_destroys);
 EVCNT_ATTACH_STATIC(bus_dma_bounced_destroys);
+EVCNT_ATTACH_STATIC(bus_dma_sync_prereadwrite);
+EVCNT_ATTACH_STATIC(bus_dma_sync_preread_begin);
+EVCNT_ATTACH_STATIC(bus_dma_sync_preread);
+EVCNT_ATTACH_STATIC(bus_dma_sync_preread_tail);
+EVCNT_ATTACH_STATIC(bus_dma_sync_prewrite);
+EVCNT_ATTACH_STATIC(bus_dma_sync_postread);
+EVCNT_ATTACH_STATIC(bus_dma_sync_postreadwrite);
+EVCNT_ATTACH_STATIC(bus_dma_sync_postwrite);
 
 #define	STAT_INCR(x)	(bus_dma_ ## x.ev_count++)
+#else
+#define	STAT_INCR(x)	/*(bus_dma_ ## x.ev_count++)*/
+#endif
 
 int	_bus_dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *,
 	bus_size_t, struct vmspace *, int);
@@ -724,6 +752,7 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 	switch (ops) {
 	case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE:
 		if (!readonly_p) {
+			STAT_INCR(sync_prereadwrite);
 			cpu_dcache_wbinv_range(va, len);
 			cpu_sdcache_wbinv_range(va, pa, len);
 			break;
@@ -734,6 +763,7 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 		const size_t line_size = arm_dcache_align;
 		const size_t line_mask = arm_dcache_align_mask;
 		vsize_t misalignment = va  line_mask;
+		STAT_INCR(sync_preread);
 		if (misalignment) {
 			va -= misalignment;
 			pa -= misalignment;
@@ -762,6 +792,7 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 	}
 
 	case BUS_DMASYNC_PREWRITE:
+		STAT_INCR(sync_prewrite);
 		cpu_dcache_wb_range(va, len);
 		cpu_sdcache_wb_range(va, pa, len);
 		break;
@@ -774,7 +805,12 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 	 * have to worry about having to write back their contents.
 	 */
 	case BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE:
+		STAT_INCR(sync_postreadwrite);
+		cpu_dcache_inv_range(va, len);
+		cpu_sdcache_inv_range(va, pa, len);
+		break;
 	case BUS_DMASYNC_POSTREAD:
+		STAT_INCR(sync_postread);
 		cpu_dcache_inv_range(va, len);
 		cpu_sdcache_inv_range(va, pa, len);
 		break;
@@ -975,6 +1011,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 	const int post_ops = 0;
 #endif
 	if (!bouncing  pre_ops == 0  post_ops == BUS_DMASYNC_POSTWRITE) {
+		STAT_INCR(sync_postwrite);
 		return;
 	}
 	KASSERTMSG(bouncing || pre_ops != 0 || (post_ops  

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

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 08:24:39 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: bus_dma.c

Log Message:
Make sync counters only count when caches ops are performed.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/arm/arm32/bus_dma.c

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

Modified files:

Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.76 src/sys/arch/arm/arm32/bus_dma.c:1.77
--- src/sys/arch/arm/arm32/bus_dma.c:1.76	Thu Feb 14 08:07:35 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Thu Feb 14 08:24:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.76 2013/02/14 08:07:35 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.77 2013/02/14 08:24:39 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.76 2013/02/14 08:07:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.77 2013/02/14 08:24:39 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -763,11 +763,11 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 		const size_t line_size = arm_dcache_align;
 		const size_t line_mask = arm_dcache_align_mask;
 		vsize_t misalignment = va  line_mask;
-		STAT_INCR(sync_preread);
 		if (misalignment) {
 			va -= misalignment;
 			pa -= misalignment;
 			len += misalignment;
+			STAT_INCR(sync_preread_begin);
 			cpu_dcache_wbinv_range(va, line_size);
 			cpu_sdcache_wbinv_range(va, pa, line_size);
 			if (len = line_size)
@@ -779,12 +779,14 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 		misalignment = len  line_mask;
 		len -= misalignment;
 		if (len  0) {
+			STAT_INCR(sync_preread);
 			cpu_dcache_inv_range(va, len);
 			cpu_sdcache_inv_range(va, pa, len);
 		}
 		if (misalignment) {
 			va += len;
 			pa += len;
+			STAT_INCR(sync_preread_tail);
 			cpu_dcache_wbinv_range(va, line_size);
 			cpu_sdcache_wbinv_range(va, pa, line_size);
 		}



CVS commit: [matt-nb6-plus] src/sys/arch/arm/arm32

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 08:24:59 UTC 2013

Modified Files:
src/sys/arch/arm/arm32 [matt-nb6-plus]: bus_dma.c

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.54.10.4 -r1.54.10.5 src/sys/arch/arm/arm32/bus_dma.c

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

Modified files:

Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.54.10.4 src/sys/arch/arm/arm32/bus_dma.c:1.54.10.5
--- src/sys/arch/arm/arm32/bus_dma.c:1.54.10.4	Thu Feb 14 08:08:18 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Thu Feb 14 08:24:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.54.10.4 2013/02/14 08:08:18 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.54.10.5 2013/02/14 08:24:58 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.54.10.4 2013/02/14 08:08:18 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.54.10.5 2013/02/14 08:24:58 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -763,11 +763,11 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 		const size_t line_size = arm_dcache_align;
 		const size_t line_mask = arm_dcache_align_mask;
 		vsize_t misalignment = va  line_mask;
-		STAT_INCR(sync_preread);
 		if (misalignment) {
 			va -= misalignment;
 			pa -= misalignment;
 			len += misalignment;
+			STAT_INCR(sync_preread_begin);
 			cpu_dcache_wbinv_range(va, line_size);
 			cpu_sdcache_wbinv_range(va, pa, line_size);
 			if (len = line_size)
@@ -779,12 +779,14 @@ _bus_dmamap_sync_segment(vaddr_t va, pad
 		misalignment = len  line_mask;
 		len -= misalignment;
 		if (len  0) {
+			STAT_INCR(sync_preread);
 			cpu_dcache_inv_range(va, len);
 			cpu_sdcache_inv_range(va, pa, len);
 		}
 		if (misalignment) {
 			va += len;
 			pa += len;
+			STAT_INCR(sync_preread_tail);
 			cpu_dcache_wbinv_range(va, line_size);
 			cpu_sdcache_wbinv_range(va, pa, line_size);
 		}



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

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 08:56:21 UTC 2013

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

Log Message:
Define LDBL_IMPLICIT_NBIT


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 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.8 src/sys/arch/mips/include/ieee.h:1.9
--- src/sys/arch/mips/include/ieee.h:1.8	Thu Feb 14 00:55:25 2013
+++ src/sys/arch/mips/include/ieee.h	Thu Feb 14 08:56:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee.h,v 1.8 2013/02/14 00:55:25 matt Exp $	*/
+/*	$NetBSD: ieee.h,v 1.9 2013/02/14 08:56:21 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -130,8 +130,7 @@ union ieee_ext_u {
 #define extu_frachm	extu_ext.ext_frachm
 #define extu_frach	extu_ext.ext_frach
 
-#define LDBL_NBIT	0x
-#define mask_nbit_l(u)	((void) 0)
+#define LDBL_IMPLICIT_NBIT	1	/* our NBIT is implicit */
 
 #endif /* __mips_n32 || __mips_n64 */
 



CVS commit: src/lib/libm/src

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 08:56:56 UTC 2013

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

Log Message:
Deal with an implicit NBIT


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

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

Modified files:

Index: src/lib/libm/src/s_nextafterl.c
diff -u src/lib/libm/src/s_nextafterl.c:1.2 src/lib/libm/src/s_nextafterl.c:1.3
--- src/lib/libm/src/s_nextafterl.c:1.2	Fri Sep 17 20:39:39 2010
+++ src/lib/libm/src/s_nextafterl.c	Thu Feb 14 08:56:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_nextafterl.c,v 1.2 2010/09/17 20:39:39 christos Exp $	*/
+/*	$NetBSD: s_nextafterl.c,v 1.3 2013/02/14 08:56:56 matt Exp $	*/
 
 /* @(#)s_nextafter.c 5.1 93/09/24 */
 /*
@@ -13,7 +13,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: s_nextafterl.c,v 1.2 2010/09/17 20:39:39 christos Exp $);
+__RCSID($NetBSD: s_nextafterl.c,v 1.3 2013/02/14 08:56:56 matt Exp $);
 
 #include float.h
 #include math.h
@@ -24,6 +24,10 @@ __RCSID($NetBSD: s_nextafterl.c,v 1.2 2
 #error Unsupported long double format
 #endif
 
+#ifdef LDBL_IMPLICIT_NBIT
+#define	LDBL_NBIT	0
+#endif
+
 /*
  * IEEE functions
  *  nextafterl(x,y)
@@ -83,7 +87,9 @@ nextafterl(long double x, long double y)
 		return x+x;			/* overflow  */
 
 	if (ux.extu_exp == 0) {			/* underflow */
+#ifndef LDBL_IMPLICIT_NBIT
 		mask_nbit_l(ux);
+#endif
 		t = ux.extu_ld * ux.extu_ld;
 		if (t != ux.extu_ld)		/* raise underflow flag */
 			return ux.extu_ld;



CVS commit: src/usr.bin/vis

2013-02-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Feb 14 08:56:59 UTC 2013

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

Log Message:
Mark up LC_CTYPE with Ev (didn't I just do this? :) ).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/vis/vis.1

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

Modified files:

Index: src/usr.bin/vis/vis.1
diff -u src/usr.bin/vis/vis.1:1.15 src/usr.bin/vis/vis.1:1.16
--- src/usr.bin/vis/vis.1:1.15	Wed Feb 13 22:24:48 2013
+++ src/usr.bin/vis/vis.1	Thu Feb 14 08:56:59 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: vis.1,v 1.15 2013/02/13 22:24:48 christos Exp $
+.\	$NetBSD: vis.1,v 1.16 2013/02/14 08:56:59 wiz Exp $
 .\
 .\ Copyright (c) 1989, 1991, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -138,12 +138,14 @@ White space (space-tab-newline) is also 
 .Sh MULTIBYTE CHARACTER SUPPORT
 .Nm
 supports multibyte character input.
-The encoding conversion is influenced by the setting of the LC_CTYPE
+The encoding conversion is influenced by the setting of the
+.Ev LC_CTYPE
 environment variable which defines the set of characters that can be
 copied without encoding.
 .Pp
-When 8-bit data is present in the input, LC_CTYPE must be set to
-the correct locale or to the C locale.
+When 8-bit data is present in the input,
+.Ev LC_CTYPE
+must be set to the correct locale or to the C locale.
 If the locales of the data and the conversion are mismatched, multibyte
 character recognition may fail and encoding will be performed byte-by-byte
 instead.



CVS commit: src/external/gpl3/gcc/lib/libgcc

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 09:19:28 UTC 2013

Modified Files:
src/external/gpl3/gcc/lib/libgcc: Makefile.inc
src/external/gpl3/gcc/lib/libgcc/libgcc: Makefile

Log Message:
For compat, use LIBGCC_MACHINE_ARCH (which defaults to MACHINE_ARCH).
When generating .hidden stub, use ${COPTS}


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile

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

Modified files:

Index: src/external/gpl3/gcc/lib/libgcc/Makefile.inc
diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.18 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.19
--- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.18	Sun Feb  3 01:59:55 2013
+++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc	Thu Feb 14 09:19:28 2013
@@ -1,8 +1,10 @@
-#	$NetBSD: Makefile.inc,v 1.18 2013/02/03 01:59:55 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.19 2013/02/14 09:19:28 matt Exp $
 
 .if ${MKGCC} != no
-.if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk)
-.include ${.CURDIR}/../arch/${MACHINE_ARCH}.mk
+LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH}
+#.info LIBGCC_MACHINE_ARCH=${LIBGCC_MACHINE_ARCH}
+.if exists(${.CURDIR}/../arch/${LIBGCC_MACHINE_ARCH}.mk)
+.include ${.CURDIR}/../arch/${LIBGCC_MACHINE_ARCH}.mk
 .endif
 .endif
 
@@ -10,9 +12,9 @@ UNSUPPORTED_COMPILER.clang=	# defined
 
 DIST=		${NETBSDSRCDIR}/external/gpl3/gcc/dist
 GNUHOSTDIST=	${DIST}
-GCCARCH=	${NETBSDSRCDIR}/external/gpl3/gcc/usr.bin/gcc/arch/${MACHINE_ARCH}
-GCCARCHLIBGCC=	${NETBSDSRCDIR}/external/gpl3/gcc/lib/libgcc/arch/${MACHINE_ARCH}
-GCCARCHXX=	${NETBSDSRCDIR}/external/gpl3/gcc/lib/libstdc++-v3/arch/${MACHINE_ARCH}
+GCCARCH=	${NETBSDSRCDIR}/external/gpl3/gcc/usr.bin/gcc/arch/${LIBGCC_MACHINE_ARCH}
+GCCARCHLIBGCC=	${NETBSDSRCDIR}/external/gpl3/gcc/lib/libgcc/arch/${LIBGCC_MACHINE_ARCH}
+GCCARCHXX=	${NETBSDSRCDIR}/external/gpl3/gcc/lib/libstdc++-v3/arch/${LIBGCC_MACHINE_ARCH}
 
 GCPPFLAGS=	${G_LIBGCC2_CFLAGS} ${G_USE_COLLECT2} ${G_INCLUDES}
 CPPFLAGS+=	-I${.CURDIR} -I${GCCARCHLIBGCC}
@@ -21,10 +23,10 @@ CPPFLAGS+=	${GCPPFLAGS:M-m*} ${GCPPFLAGS
 CPPFLAGS+=	${G_EXTRA_HEADERS:M/*:H:u:S/^/-I/g}
 CPPFLAGS+=	-I${DIST} -I${DIST}/gcc/cp -I${DIST}/gcc/config -I${GCCARCHXX} -I.
 
-.if ${MACHINE_ARCH} == powerpc || \
-${MACHINE_ARCH} == sh3el || \
-${MACHINE_ARCH} == sh3eb || \
-${MACHINE_ARCH} == m68000
+.if ${LIBGCC_MACHINE_ARCH} == powerpc || \
+${LIBGCC_MACHINE_ARCH} == sh3el || \
+${LIBGCC_MACHINE_ARCH} == sh3eb || \
+${LIBGCC_MACHINE_ARCH} == m68000
 _TRADITIONAL_CPP=
 COMPILE.S=	${CC} ${AFLAGS} ${CPPFLAGS} -c
 .endif
@@ -77,7 +79,7 @@ LIB2_EHASM=	${G_LIB2ADDEH:M*.S:T}
 LIB1ASMFUNCS=	${G_LIB1ASMFUNCS:=.S}
 .endif
 
-DPSRCS+=	${.CURDIR}/../arch/${MACHINE_ARCH}.mk
+DPSRCS+=	${.CURDIR}/../arch/${LIBGCC_MACHINE_ARCH}.mk
 CLEANFILES+=	${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} cs-tconfig.h
 .if !empty(G_LIB1ASMFUNCS)
 CLEANFILES+=	${LIB1ASMFUNCS}
@@ -88,14 +90,14 @@ BUILDSYMLINKS+=	${file} ${file:T:S/.asm$
 .endfor
 
 # XXX
-.if (${MACHINE_ARCH} == m68000 || ${MACHINE_ARCH} == m68k)
+.if (${LIBGCC_MACHINE_ARCH} == m68000 || ${LIBGCC_MACHINE_ARCH} == m68k)
 CPICFLAGS:=
 BUILDSYMLINKS+=	${DIST}/gcc/config/m68k/fpgnulib.c fpgnulib.c
 BUILDSYMLINKS+=	${DIST}/gcc/config/m68k/fpgnulib.c xfgnulib.c
 CPPFLAGS.xfgnulib.c+=-DEXTFLOAT=1
 .endif
 
-.if ${MACHINE_ARCH} == powerpc64
+.if ${LIBGCC_MACHINE_ARCH} == powerpc64
 COPTS+=	-mlong-double-128
 .endif
 
@@ -170,6 +172,6 @@ CLEANFILES+=	insn-modes.h
 .endif
 
 # XXX
-.if defined(HAVE_GCC)  ${HAVE_GCC} == 45  ${MACHINE_ARCH} == m68k
+.if defined(HAVE_GCC)  ${HAVE_GCC} == 45  ${LIBGCC_MACHINE_ARCH} == m68k
 COPTS._fixunsxfdi.c+=	-O0
 .endif

Index: src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile
diff -u src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.10 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.11
--- src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.10	Mon Aug  6 02:34:28 2012
+++ src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile	Thu Feb 14 09:19:28 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2012/08/06 02:34:28 matt Exp $
+#	$NetBSD: Makefile,v 1.11 2013/02/14 09:19:28 matt Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -23,7 +23,7 @@ SRCS+=		${LIB2FUNCS} ${LIB2FUNCS_ST} ${L
 		${G_LIB2ADD_HACK:T:S/.asm/.S/} ${G_LIB2ADD:T:S/.asm/.S/} \
 		${G_LIB2ADD_ST} ${LIB1ASMFUNCS}
 .if ${MKPIC} == no
-.if ${MACHINE_ARCH} != earm  ${MACHINE_ARCH} != earmeb
+.if ${LIBGCC_MACHINE_ARCH:Mearm*} == 
 SRCS+=		${LIB2_EH} ${LIB2_EHASM}
 .endif
 .else
@@ -34,7 +34,7 @@ CPPFLAGS+=	-DPIC
 # gcc/config/$PLATFORM/foo.asm to it.  So far, only rs6000 uses it,
 # so we hack it for now.
 #.for file in ${G_LIB2ADD_ST}
-.   if ${MACHINE_ARCH} == powerpc  # XXX XXX why does the above work?*
+.   if ${LIBGCC_MACHINE_ARCH} == powerpc  # XXX XXX why does the above work?*
 .for file 

CVS commit: src/sys/rump/librump

2013-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 14 10:54:55 UTC 2013

Modified Files:
src/sys/rump/librump: makerumpif.sh

Log Message:
Make it possible to manually specify the top level directory; for cases
where the target hierarchy is outside of the main tree.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/librump/makerumpif.sh

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

Modified files:

Index: src/sys/rump/librump/makerumpif.sh
diff -u src/sys/rump/librump/makerumpif.sh:1.5 src/sys/rump/librump/makerumpif.sh:1.6
--- src/sys/rump/librump/makerumpif.sh:1.5	Wed Sep  1 19:32:11 2010
+++ src/sys/rump/librump/makerumpif.sh	Thu Feb 14 10:54:54 2013
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp $
+#	$NetBSD: makerumpif.sh,v 1.6 2013/02/14 10:54:54 pooka Exp $
 #
 # Copyright (c) 2009 Antti Kantee.  All rights reserved.
 #
@@ -47,14 +47,25 @@ boom ()
 	exit 1
 }
 
-[ $# != 1 ]  usage
+unset TOPDIR
+if [ $# -eq 3 ]; then
+	if [ $1 = '-R' ]; then
+		TOPDIR=$2
+	else
+		usage
+	fi
+	shift; shift
+fi
+[ $# -ne 1 ]  usage
 
 MYDIR=`pwd`
-while [ ! -f Makefile.rump  ]; do
-	[ `pwd` = '/' ]  boom Could not find rump topdir.
-	cd ..
-done
-RUMPTOP=`pwd`
+if [ -z ${TOPDIR} ]; then
+	while [ ! -f Makefile.rump  ]; do
+		[ `pwd` = '/' ]  boom Could not find rump topdir.
+		cd ..
+	done
+	TOPDIR=`pwd`
+fi
 cd ${MYDIR}
 
 sed -e '
@@ -64,12 +75,12 @@ sed -e '
 		s/[ 	]*\\\n[ 	]*/ /
 		b again
 	}
-' ${1} | awk -F\| -v rumptop=${RUMPTOP} '
+' ${1} | awk -F\| -v topdir=${TOPDIR} '
 function fileheaders(file, srcstr)
 {
-	printf(/*\t$NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp $\t*/\n\n)  file
+	printf(/*\t$NetBSD: makerumpif.sh,v 1.6 2013/02/14 10:54:54 pooka Exp $\t*/\n\n)  file
 	printf(/*\n * Automatically generated.  DO NOT EDIT.\n)  file
-	genstr = $NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp $
+	genstr = $NetBSD: makerumpif.sh,v 1.6 2013/02/14 10:54:54 pooka Exp $
 	gsub(\\$, , genstr)
 	printf( * from: %s\n, srcstr)  file
 	printf( * by:   %s\n, genstr)  file
@@ -91,9 +102,9 @@ NR == 1 {
 }
 
 $1 == NAME{myname = $2;next}
-$1 == PUBHDR{pubhdr = rumptop / $2;print pubhdr;next}
-$1 == PRIVHDR{privhdr = rumptop / $2;print privhdr;next}
-$1 == WRAPPERS{gencalls = rumptop / $2;print gencalls;next}
+$1 == PUBHDR{pubhdr = topdir / $2;print pubhdr;next}
+$1 == PRIVHDR{privhdr = topdir / $2;print privhdr;next}
+$1 == WRAPPERS{gencalls = topdir / $2;print gencalls;next}
 
 /^;/{next}
 /\\$/{sub(\\\n, );getline nextline;$0 = $0 nextline}



CVS commit: src/sys/arch/sparc/sparc

2013-02-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb 14 12:14:14 UTC 2013

Modified Files:
src/sys/arch/sparc/sparc: autoconf.c

Log Message:
Rearrange the special mainbus device list to allow for optional entries.
Fixes a panic on all SUN4M machines w/o an sx graphics adapter.
XXX the ignore devices at mainbus list seems to be ignored - or am I
missing something?


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 src/sys/arch/sparc/sparc/autoconf.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/sparc/sparc/autoconf.c
diff -u src/sys/arch/sparc/sparc/autoconf.c:1.248 src/sys/arch/sparc/sparc/autoconf.c:1.249
--- src/sys/arch/sparc/sparc/autoconf.c:1.248	Tue Feb  5 22:03:16 2013
+++ src/sys/arch/sparc/sparc/autoconf.c	Thu Feb 14 12:14:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.248 2013/02/05 22:03:16 macallan Exp $ */
+/*	$NetBSD: autoconf.c,v 1.249 2013/02/14 12:14:13 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.248 2013/02/05 22:03:16 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.249 2013/02/14 12:14:13 martin Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -1091,84 +1091,90 @@ mainbus_attach(device_t parent, device_t
 extern struct sparc_bus_dma_tag mainbus_dma_tag;
 extern struct sparc_bus_space_tag mainbus_space_tag;
 
+	struct boot_special {
+		const char *const dev;
+#define BS_EARLY	1	/* attach device early */
+#define	BS_IGNORE	2	/* ignore root device */
+#define	BS_OPTIONAL	4	/* device not alwas present */
+		unsigned int flags;
+	};
+
 	struct mainbus_attach_args ma;
 	char namebuf[32];
 #if defined(SUN4C) || defined(SUN4M) || defined(SUN4D)
-	const char *const *ssp, *sp = NULL;
+	const char *sp = NULL;
 	int node0, node;
-	const char *const *openboot_special;
+	const struct boot_special *openboot_special, *ssp;
 #endif
 
 #if defined(SUN4C)
-	static const char *const openboot_special4c[] = {
-		/* find these first (end with empty string) */
-		memory-error,	/* as early as convenient, in case of error */
-		eeprom,
-		counter-timer,
-		auxiliary-io,
-		,
-
-		/* ignore these (end with NULL) */
-		aliases,
-		interrupt-enable,
-		memory,
-		openprom,
-		options,
-		packages,
-		virtual-memory,
-		NULL
+	static const struct boot_special openboot_special4c[] = {
+		/* find these first */
+		{ memory-error, BS_EARLY },
+			/* as early as convenient, in case of error */
+		{ eeprom, BS_EARLY },
+		{ counter-timer, BS_EARLY },
+		{ auxiliary-io, BS_EARLY },
+
+		/* ignore these */
+		{ aliases, BS_IGNORE },
+		{ interrupt-enable, BS_IGNORE },
+		{ memory, BS_IGNORE },
+		{ openprom, BS_IGNORE },
+		{ options, BS_IGNORE },
+		{ packages, BS_IGNORE },
+		{ virtual-memory, BS_IGNORE },
+
+		/* sentinel */
+		{ NULL, 0 }
 	};
 #else
 #define openboot_special4c	((void *)0)
 #endif
 #if defined(SUN4M)
-	static const char *const openboot_special4m[] = {
+	static const struct boot_special openboot_special4m[] = {
 		/* find these first */
-#if !defined(MSIIEP)
-		SUNW,sx,
-		obio,		/* smart enough to get eeprom/etc mapped */
-#else
-		pci,		/* ms-IIep */
-#endif
-		,
+		{ SUNW,sx, BS_EARLY|BS_OPTIONAL },
+		{ obio, BS_EARLY|BS_OPTIONAL },
+/* smart enough to get eeprom/etc mapped */
+		{ pci, BS_EARLY|BS_OPTIONAL },	/* ms-IIep */
 
-		/* ignore these (end with NULL) */
 		/*
 		 * These are _root_ devices to ignore. Others must be handled
 		 * elsewhere.
 		 */
-		virtual-memory,
-		aliases,
-		chosen,		/* OpenFirmware */
-		memory,
-		openprom,
-		options,
-		packages,
-		udp,			/* OFW in Krups */
+		{ virtual-memory, BS_IGNORE },
+		{ aliases, BS_IGNORE },
+		{ chosen, BS_IGNORE },	/* OpenFirmware */
+		{ memory, BS_IGNORE },
+		{ openprom, BS_IGNORE },
+		{ options, BS_IGNORE },
+		{ packages, BS_IGNORE },
+		{ udp, BS_IGNORE },		/* OFW in Krups */
 		/* we also skip any nodes with device_type == cpu */
-		NULL
+
+		{ NULL, 0 }
 	};
 #else
 #define openboot_special4m	((void *)0)
 #endif
 #if defined(SUN4D)
-	static const char *const openboot_special4d[] = {
-		,
-
-		/* ignore these (end with NULL) */
+	static const struct boot_special openboot_special4d[] = {
 		/*
 		 * These are _root_ devices to ignore. Others must be handled
 		 * elsewhere.
 		 */
-		mem-unit,	/* XXX might need this for memory errors */
-		boards,
-		openprom,
-		virtual-memory,
-		memory,
-		aliases,
-		options,
-		packages,
-		NULL
+		{ mem-unit, BS_IGNORE },
+			/* XXX might need this for memory errors */
+		{ boards, BS_IGNORE },
+		{ openprom, BS_IGNORE },
+		{ virtual-memory, BS_IGNORE },
+		{ memory, BS_IGNORE },
+		{ aliases, BS_IGNORE },
+		{ options, BS_IGNORE },
+		{ packages, BS_IGNORE },
+
+		{ NULL, 0 }
 	};
 #else
 #define	openboot_special4d	((void *)0)
@@ -1282,10 +1288,12 @@ extern struct sparc_bus_space_tag mainbu
 		config_found(dev, (void *)ma, mbprint);
 

CVS commit: src/sys/arch/sparc/sparc

2013-02-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb 14 12:44:16 UTC 2013

Modified Files:
src/sys/arch/sparc/sparc: autoconf.c

Log Message:
Fix thinko in previous (and misleading comment): stop ignoring table
entries for to be ignored devices.


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 src/sys/arch/sparc/sparc/autoconf.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/sparc/sparc/autoconf.c
diff -u src/sys/arch/sparc/sparc/autoconf.c:1.249 src/sys/arch/sparc/sparc/autoconf.c:1.250
--- src/sys/arch/sparc/sparc/autoconf.c:1.249	Thu Feb 14 12:14:13 2013
+++ src/sys/arch/sparc/sparc/autoconf.c	Thu Feb 14 12:44:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.249 2013/02/14 12:14:13 martin Exp $ */
+/*	$NetBSD: autoconf.c,v 1.250 2013/02/14 12:44:16 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.249 2013/02/14 12:14:13 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.250 2013/02/14 12:44:16 martin Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -1340,12 +1340,14 @@ extern struct sparc_bus_space_tag mainbu
 		cp = prom_getpropstringA(node, name, namebuf, sizeof namebuf);
 		DPRINTF(ACDB_PROBE, ( name %s\n, namebuf));
 		for (ssp = openboot_special; (sp = ssp-dev) != NULL; ssp++) {
-			if (!(ssp-flags  BS_EARLY)) continue;
+			if (!(ssp-flags  (BS_EARLY|BS_IGNORE))) continue;
 			if (strcmp(cp, sp) == 0)
 break;
 		}
 		if (sp != NULL)
-			continue; /* an early device already configured */
+			continue;
+			/* an early device already configured, or an
+			   ignored device */
 
 		memset(ma, 0, sizeof ma);
 		ma.ma_bustag = mainbus_space_tag;



CVS commit: src/lib/libc/gen

2013-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 14 13:57:53 UTC 2013

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

Log Message:
off by one.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/lib/libc/gen/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/lib/libc/gen/vis.c
diff -u src/lib/libc/gen/vis.c:1.51 src/lib/libc/gen/vis.c:1.52
--- src/lib/libc/gen/vis.c:1.51	Wed Feb 13 17:19:18 2013
+++ src/lib/libc/gen/vis.c	Thu Feb 14 08:57:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vis.c,v 1.51 2013/02/13 22:19:18 christos Exp $	*/
+/*	$NetBSD: vis.c,v 1.52 2013/02/14 13:57:53 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: vis.c,v 1.51 2013/02/13 22:19:18 christos Exp $);
+__RCSID($NetBSD: vis.c,v 1.52 2013/02/14 13:57:53 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 #ifdef __FBSDID
 __FBSDID($FreeBSD$);
@@ -313,7 +313,7 @@ istrsnvisx(char *mbdst, size_t *dlen, co
 	src = psrc;
 
 	mbslength = (ssize_t)mblength;
-	while (mbslength  0) {
+	while (mbslength = 0) {
 		clen = mbtowc(src, mbsrc, MB_LEN_MAX);
 		if (clen  0) {
 			*src = (wint_t)(u_char)*mbsrc;



CVS commit: src/usr.bin/vis

2013-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 14 14:00:01 UTC 2013

Modified Files:
src/usr.bin/vis: vis.1 vis.c

Log Message:
do the encoding character by character instead of failing on encoding mismatch


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/vis/vis.1
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/vis/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/usr.bin/vis/vis.1
diff -u src/usr.bin/vis/vis.1:1.16 src/usr.bin/vis/vis.1:1.17
--- src/usr.bin/vis/vis.1:1.16	Thu Feb 14 03:56:59 2013
+++ src/usr.bin/vis/vis.1	Thu Feb 14 09:00:00 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: vis.1,v 1.16 2013/02/14 08:56:59 wiz Exp $
+.\	$NetBSD: vis.1,v 1.17 2013/02/14 14:00:00 christos Exp $
 .\
 .\ Copyright (c) 1989, 1991, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -149,11 +149,6 @@ must be set to the correct locale or to 
 If the locales of the data and the conversion are mismatched, multibyte
 character recognition may fail and encoding will be performed byte-by-byte
 instead.
-The result of encoding using
-.Nm
-followed by decoding using
-.Xr unvis 3
-is unlikely to return the same input data in this case.
 .Sh ENVIRONMENT
 .Bl -tag -width .Ev LC_CTYPE
 .It Ev LC_CTYPE

Index: src/usr.bin/vis/vis.c
diff -u src/usr.bin/vis/vis.c:1.19 src/usr.bin/vis/vis.c:1.20
--- src/usr.bin/vis/vis.c:1.19	Wed Feb 13 17:28:41 2013
+++ src/usr.bin/vis/vis.c	Thu Feb 14 09:00:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vis.c,v 1.19 2013/02/13 22:28:41 christos Exp $	*/
+/*	$NetBSD: vis.c,v 1.20 2013/02/14 14:00:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)vis.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: vis.c,v 1.19 2013/02/13 22:28:41 christos Exp $);
+__RCSID($NetBSD: vis.c,v 1.20 2013/02/14 14:00:01 christos Exp $);
 #endif /* not lint */
 
 #include stdio.h
@@ -161,17 +161,21 @@ process(FILE *fp)
 	static char nul[] = \0;
 	char *cp = nul + 1;	/* so *(cp-1) starts out != '\n' */
 	wint_t c, c1, rachar; 
-	wchar_t ibuff[3]; /* room for c + rachar + NUL */
 	char mbibuff[13]; /* ((sizeof(ibuff) - 1) * MB_LEN_MAX) + NUL */
 	char buff[5]; /* max vis-encoding length for one char + NUL */
+	int mbilen, cerr = 0, raerr = 0;
 	
 	c = getwc(fp);
-	if (c == WEOF  errno == EILSEQ)
+	if (c == WEOF  errno == EILSEQ) {
 		c = (wint_t)getc(fp);
+		cerr = 1;
+	}
 	while (c != WEOF) {
 		rachar = getwc(fp);
-		if (rachar == WEOF  errno == EILSEQ)
+		if (rachar == WEOF  errno == EILSEQ) {
 			rachar = (wint_t)getc(fp);
+			raerr = 1;
+		}
 		if (none) {
 			cp = buff;
 			*cp++ = c;
@@ -189,10 +193,16 @@ process(FILE *fp)
 			c1 = rachar;
 			if (c1 == WEOF)
 c1 = L'\0';
-			swprintf(ibuff, 3, L%lc%lc, c, c1);
-			wcstombs(mbibuff, ibuff,
-			(wcslen(ibuff) * MB_LEN_MAX) + 1);
-			(void) strsvisx(buff, mbibuff, 1, eflags, extra);
+			if (cerr) {
+*mbibuff = c;
+mbilen = 1;
+			} else
+mbilen = wctomb(mbibuff, c);
+			if (raerr)
+mbibuff[mbilen] = c1;
+			else
+wctomb(mbibuff + mbilen, c1);
+			(void)strsvisx(buff, mbibuff, mbilen, eflags, extra);
 		}
 
 		cp = buff;
@@ -211,6 +221,8 @@ process(FILE *fp)
 			(void)putchar(*cp);
 		} while (*++cp);
 		c = rachar;
+		cerr = raerr;
+		raerr = 0;
 	}
 	/*
 	 * terminate partial line with a hidden newline



CVS commit: src/external/gpl3/gcc/lib/libgcc/libgcc

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 15:42:31 UTC 2013

Modified Files:
src/external/gpl3/gcc/lib/libgcc/libgcc: Makefile

Log Message:
Make sure LIBGCC_MACHINE_ARCH is always defined.


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

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

Modified files:

Index: src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile
diff -u src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.11 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.12
--- src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.11	Thu Feb 14 09:19:28 2013
+++ src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile	Thu Feb 14 15:42:31 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2013/02/14 09:19:28 matt Exp $
+#	$NetBSD: Makefile,v 1.12 2013/02/14 15:42:31 matt Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -23,6 +23,7 @@ SRCS+=		${LIB2FUNCS} ${LIB2FUNCS_ST} ${L
 		${G_LIB2ADD_HACK:T:S/.asm/.S/} ${G_LIB2ADD:T:S/.asm/.S/} \
 		${G_LIB2ADD_ST} ${LIB1ASMFUNCS}
 .if ${MKPIC} == no
+LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH}
 .if ${LIBGCC_MACHINE_ARCH:Mearm*} == 
 SRCS+=		${LIB2_EH} ${LIB2_EHASM}
 .endif



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2013-02-14 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Thu Feb 14 16:13:38 UTC 2013

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
call ioctl(WSDISPLAYIO_SMODE, ...) in EnterTV/LeaveVT so kernel graphics
drivers get notified when we switch in and out of X


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.15 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.16
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.15	Thu Jan 31 11:18:01 2013
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Thu Feb 14 16:13:38 2013
@@ -1147,9 +1147,19 @@ static Bool
 WsfbEnterVT(int scrnIndex, int flags)
 {
 	ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+	WsfbPtr fPtr = WSFBPTR(pScrn);
+	int mode;
 
 	TRACE_ENTER(EnterVT);
 	pScrn-vtSema = TRUE;
+
+	/* Restore the graphics mode. */
+	mode = WSDISPLAYIO_MODE_DUMBFB;
+	if (ioctl(fPtr-fd, WSDISPLAYIO_SMODE, mode) == -1) {
+		xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
+			   error setting graphics mode %s\n, strerror(errno));
+	}
+
 	TRACE_EXIT(EnterVT);
 	return TRUE;
 }
@@ -1157,11 +1167,39 @@ WsfbEnterVT(int scrnIndex, int flags)
 static void
 WsfbLeaveVT(int scrnIndex, int flags)
 {
-#if DEBUG
 	ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
-#endif
+	WsfbPtr fPtr = WSFBPTR(pScrn);
+	int mode;
 
 	TRACE_ENTER(LeaveVT);
+
+	/*
+	 * stuff to do:
+	 * - turn off hw cursor
+	 * - restore colour map if WSFB_CI
+	 * - ioctl(WSDISPLAYIO_MODE_EMUL) to notify the kernel driver that
+	 *   we're backing off
+	 */
+
+	if (fPtr-fbi.fbi_pixeltype == WSFB_CI) {
+		/* reset colormap for text mode */
+		if (ioctl(fPtr-fd, WSDISPLAYIO_PUTCMAP,
+			  (fPtr-saved_cmap)) == -1) {
+			xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
+   error restoring colormap %s\n,
+   strerror(errno));
+		}
+	}
+
+	/* Restore the text mode. */
+	mode = WSDISPLAYIO_MODE_EMUL;
+	if (ioctl(fPtr-fd, WSDISPLAYIO_SMODE, mode) == -1) {
+		xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
+			   error setting text mode %s\n, strerror(errno));
+	}
+
+	pScrn-vtSema = FALSE;
+	TRACE_EXIT(LeaveVT);
 }
 
 static Bool



CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos

2013-02-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb 14 16:16:25 UTC 2013

Modified Files:
src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile

Log Message:
set -DPCVT_SUPPORT on most hardware


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/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/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile
diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.33 src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.34
--- src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.33	Mon May 14 08:42:04 2012
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile	Thu Feb 14 16:16:25 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.33 2012/05/14 08:42:04 abs Exp $
+#	$NetBSD: Makefile,v 1.34 2013/02/14 16:16:25 macallan Exp $
 
 .include ../../../Makefile.serverlib
 .include ../../../Makefile.servermod
@@ -35,11 +35,8 @@ CPPFLAGS.${_FN}+=	-DUSE_I386_IOPL -DPCVT
 .if ${MACHINE} == macppc || ${MACHINE} == prep || ${MACHINE} == bebox || ${MACHINE} == ofppc
 SRCS.bsd+=	ppc_video.c pm_noop.c lnx_agp.c
 .for _FN in ${SRCS.bsd}
-CPPFLAGS.${_FN}=	-DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
+CPPFLAGS.${_FN}=	-DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
 .endfor
-.if ${MACHINE} == ofppc
-CPPFLAGS.${_FN}+=	-DPCVT_SUPPORT
-.endif
 .endif
 
 .if ${MACHINE_ARCH} == alpha
@@ -53,7 +50,7 @@ CPPFLAGS.${_FN}=	-DWSCONS_SUPPORT -DUSES
 SRCS.bsd+=	ppc_video.c pm_noop.c agp_noop.c
 SRCS.bus+=	netbsdSbus.c
 .for _FN in ${SRCS.bsd}
-CPPFLAGS.${_FN}=	-DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
+CPPFLAGS.${_FN}=	-DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
 .endfor
 .endif
 
@@ -76,10 +73,7 @@ CPPFLAGS.${_FN}=	-DWSCONS_SUPPORT -DUSES
 ${MACHINE} == zaurus
 SRCS.bsd+=  ppc_video.c pm_noop.c agp_noop.c
 .for _FN in ${SRCS.bsd}
-CPPFLAGS.${_FN}=-DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
-.if ${MACHINE} == cats
-CPPFLAGS.${_FN}+=	-DPCVT_SUPPORT
-.endif
+CPPFLAGS.${_FN}=-DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
 .endfor
 .endif
 



CVS commit: src/external/public-domain/sqlite

2013-02-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb 14 17:12:24 UTC 2013

Modified Files:
src/external/public-domain/sqlite/bin: Makefile
src/external/public-domain/sqlite/dist: sqlite3.c

Log Message:
When converting long double values to decimal, convert to int via a call
to floor(), so the conversion does not depend on current rounding mode.
Fixes PR port-sparc64/47535.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/sqlite/bin/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/public-domain/sqlite/dist/sqlite3.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/public-domain/sqlite/bin/Makefile
diff -u src/external/public-domain/sqlite/bin/Makefile:1.3 src/external/public-domain/sqlite/bin/Makefile:1.4
--- src/external/public-domain/sqlite/bin/Makefile:1.3	Sun Dec 16 20:31:07 2012
+++ src/external/public-domain/sqlite/bin/Makefile	Thu Feb 14 17:12:23 2013
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.3 2012/12/16 20:31:07 christos Exp $
+# $NetBSD: Makefile,v 1.4 2013/02/14 17:12:23 martin Exp $
 
 PROG=		sqlite3
 
 SRCS=		shell.c
 
 DPADD+=		${LIBSQLITE3} ${LIBEDIT} ${LIBTERIMINFO}
-LDADD+=		-lsqlite3 -ledit -lterminfo
+LDADD+=		-lsqlite3 -ledit -lterminfo -lm
 
 BINDIR=		/usr/bin
 

Index: src/external/public-domain/sqlite/dist/sqlite3.c
diff -u src/external/public-domain/sqlite/dist/sqlite3.c:1.6 src/external/public-domain/sqlite/dist/sqlite3.c:1.7
--- src/external/public-domain/sqlite/dist/sqlite3.c:1.6	Mon Feb  6 17:24:49 2012
+++ src/external/public-domain/sqlite/dist/sqlite3.c	Thu Feb 14 17:12:23 2013
@@ -19422,11 +19422,14 @@ static const et_info fmtinfo[] = {
 ** 16 (the number of significant digits in a 64-bit float) '0' is
 ** always returned.
 */
+#ifdef SQLITE_HAVE_ISNAN
+# include math.h
+#endif
 static char et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){
   int digit;
   LONGDOUBLE_TYPE d;
   if( (*cnt)++ = 16 ) return '0';
-  digit = (int)*val;
+  digit = (int)floor(*val);
   d = digit;
   digit += '0';
   *val = (*val - d)*10.0;
@@ -20998,9 +21001,6 @@ SQLITE_PRIVATE void sqlite3UtfSelfTest(v
 **
 */
 /* #include stdarg.h */
-#ifdef SQLITE_HAVE_ISNAN
-# include math.h
-#endif
 
 /*
 ** Routine needed to support the testcase() macro.
@@ -132872,7 +132872,7 @@ SQLITE_API int sqlite3_extension_init(
 **May you share freely, never taking more than you give.
 **
 *
-** $Id: sqlite3.c,v 1.6 2012/02/06 17:24:49 matt Exp $
+** $Id: sqlite3.c,v 1.7 2013/02/14 17:12:23 martin Exp $
 **
 ** This file implements an integration between the ICU library 
 ** (International Components for Unicode, an open-source library 



CVS commit: src/usr.bin/mail

2013-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 14 18:23:46 UTC 2013

Modified Files:
src/usr.bin/mail: mime_codecs.c mime_codecs.h mime_header.c

Log Message:
PR/47657: Steffen Daode Nurpmeso: quoted printable CTE exceeds RFC limit.
- Encapsulated all the content-transfer-encoding stuff in mime_codecs.c
- Replaced calls of strtol(3) with a handcrafted version that allows simple
  error checking by testing the return value. This allows to easily add
  special code to handle illegal QP sequences.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/mail/mime_codecs.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/mail/mime_codecs.h
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/mail/mime_header.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/mail/mime_codecs.c
diff -u src/usr.bin/mail/mime_codecs.c:1.10 src/usr.bin/mail/mime_codecs.c:1.11
--- src/usr.bin/mail/mime_codecs.c:1.10	Sat Nov 24 16:40:02 2012
+++ src/usr.bin/mail/mime_codecs.c	Thu Feb 14 13:23:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mime_codecs.c,v 1.10 2012/11/24 21:40:02 christos Exp $	*/
+/*	$NetBSD: mime_codecs.c,v 1.11 2013/02/14 18:23:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
 
 #include sys/cdefs.h
 #ifndef __lint__
-__RCSID($NetBSD: mime_codecs.c,v 1.10 2012/11/24 21:40:02 christos Exp $);
+__RCSID($NetBSD: mime_codecs.c,v 1.11 2013/02/14 18:23:45 christos Exp $);
 #endif /* not __lint__ */
 
 #include assert.h
@@ -389,10 +389,84 @@ mime_fB64_decode(FILE *fi, FILE *fo, voi
 /
  * Core quoted-printable routines.
  *
- * Note: the header QP routines are slightly different and burried
- * inside mime_header.c
+ * Defined in sec 6.7 of RFC 2045.
  */
 
+/*
+ * strtol(3), but inline and with easy error indication.
+ */
+static inline int
+_qp_cfromhex(char const *hex)
+{
+	/* Be robust, allow lowercase hexadecimal letters, too */
+	static unsigned char const atoi16[] = {
+		0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x30-0x37 */
+		0x08, 0x09, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0x38-0x3F */
+		0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0xFF, /* 0x40-0x47 */
+		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0x48-0x4f */
+		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0x50-0x57 */
+		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0x58-0x5f */
+		0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0xFF  /* 0x60-0x67 */
+	};
+	unsigned char i1, i2;
+	int r;
+
+	if ((i1 = (unsigned char)hex[0] - '0') = __arraycount(atoi16) ||
+	(i2 = (unsigned char)hex[1] - '0') = __arraycount(atoi16))
+		goto jerr;
+	i1 = atoi16[i1];
+	i2 = atoi16[i2];
+	if ((i1 | i2)  0xF0)
+		goto jerr;
+	r = i1;
+	r = 4;
+	r += i2;
+jleave:
+	return r;
+jerr:
+	r = -1;
+	goto jleave;
+}
+
+/*
+ * Header specific quoted-printable decode!
+ * Differences with body QP decoding (see rfc 2047, sec 4.2):
+ * 1) '=' occurs _only_ when followed by two hex digits (FWS is not allowed).
+ * 2) Spaces can be encoded as '_' in headers for readability.
+ */
+static ssize_t
+mime_QPh_decode(char *outbuf, size_t outlen, const char *inbuf, size_t inlen)
+{
+	const char *p, *inend;
+	char *outend;
+	char *q;
+
+	outend = outbuf + outlen;
+	inend = inbuf + inlen;
+	q = outbuf;
+	for (p = inbuf; p  inend; p++) {
+		if (q = outend)
+			return -1;
+		if (*p == '=') {
+			p++;
+			if (p + 1  inend) {
+int c = _qp_cfromhex(p++);
+if (c  0)
+	return -1;
+*q++ = (char)c;
+			}
+			else
+return -1;
+		}
+		else if (*p == '_')  /* header's may encode ' ' as '_' */
+			*q++ = ' ';
+		else
+			*q++ = *p;
+	}
+	return q - outbuf;
+}
+
+
 static int
 mustquote(unsigned char *p, unsigned char *end, size_t l)
 {
@@ -479,8 +553,11 @@ fput_quoted_line(FILE *fo, char *line, s
 		}
 		else {
 			if (*p == '\n') {
-if (p  beg  p[-1] == '\r')
+if (p  beg  p[-1] == '\r') {
+	if (l + 4  limit)
+		(void)fputs(=\n, fo);
 	(void)fputs(=0A=, fo);
+}
 l = (size_t)-1;
 			}
 			else if (l + 2  limit) {
@@ -541,14 +618,11 @@ mime_fQP_decode(FILE *fi, FILE *fo, void
 while (p  end  is_WSP(*p))
 	p++;
 if (*p != '\n'  p + 1  end) {
-	int c;
-	char buf[3];
-
-	buf[0] = *p++;
-	buf[1] = *p;
-	buf[2] = '\0';
-	c = (int)strtol(buf, NULL, 16);
-	(void)fputc(c, fo);
+	int c = _qp_cfromhex(p++);
+	if (c = 0)
+		(void)fputc(c, fo);
+	else
+		(void)fputs([?], fo);
 }
 			}
 			else
@@ -631,6 +705,24 @@ mime_fio_decoder(const char *ename)
 }
 
 /*
+ * Decode a RFC 2047 extended message header *encoded-word*.
+ * *encoding* is the corresponding character of the *encoded-word*.
+ */
+PUBLIC ssize_t
+mime_rfc2047_decode(char encoding, char *outbuf, size_t outlen,
+	const char *inbuf, size_t inlen)
+{
+	ssize_t declen = -1;
+
+	if (encoding == 'B' || encoding 

CVS commit: src/external/public-domain/sqlite/lib

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 14 19:18:38 UTC 2013

Modified Files:
src/external/public-domain/sqlite/lib: Makefile

Log Message:
Link against libm


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/public-domain/sqlite/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/public-domain/sqlite/lib/Makefile
diff -u src/external/public-domain/sqlite/lib/Makefile:1.1 src/external/public-domain/sqlite/lib/Makefile:1.2
--- src/external/public-domain/sqlite/lib/Makefile:1.1	Thu Oct 13 21:40:28 2011
+++ src/external/public-domain/sqlite/lib/Makefile	Thu Feb 14 19:18:38 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2011/10/13 21:40:28 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2013/02/14 19:18:38 matt Exp $
 
 LIB=		sqlite3
 INCS=		sqlite3.h sqlite3ext.h
@@ -8,6 +8,8 @@ SRCS=		sqlite3.c
 
 CFLAGS+=	-DNDEBUG
 
+LIBDPLIBS+=	m	${NETBSDSRCDIR}/lib/libm
+
 FILES+=			sqlite3.pc
 FILESOWN_sqlite3.pc=	${BINOWN}
 FILESGRP_sqlite3.pc=	${BINGRP}



CVS commit: xsrc/external/mit/xf86-input-keyboard/dist/src

2013-02-14 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Thu Feb 14 20:53:27 UTC 2013

Modified Files:
xsrc/external/mit/xf86-input-keyboard/dist/src: bsd_kbd.c xf86OSKbd.h

Log Message:
when using /dev/wskbd* we need to close the device when VT switching out of
X, and open it again when switching back


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/xf86-input-keyboard/dist/src/xf86OSKbd.h

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

Modified files:

Index: xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c
diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.16 xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.17
--- xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.16	Sat Jul 21 10:19:40 2012
+++ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c	Thu Feb 14 20:53:26 2013
@@ -204,6 +204,24 @@ KbdOn(InputInfoPtr pInfo, int what)
 #endif
 }
 #endif
+} else {
+switch (pKbd-consType) {
+#ifdef WSCONS_SUPPORT
+case WSCONS:
+	 if ((pKbd-wsKbdDev[0] != 0)  (pInfo-fd == -1)) {
+	 	xf86Msg(X_INFO, opening %s\n, pKbd-wsKbdDev);
+	 	pInfo-fd = open(pKbd-wsKbdDev, O_RDONLY | O_NONBLOCK | O_EXCL);
+#ifdef WSKBDIO_SETVERSION
+		   int version = WSKBDIO_EVENT_VERSION;
+		   if (ioctl(pInfo-fd, WSKBDIO_SETVERSION, version) == -1) {
+		   xf86Msg(X_WARNING, %s: cannot set version\n, pInfo-name);
+		   return FALSE;
+		   }
+#endif 
+	 }
+	 break;
+#endif
+	}
 }
 return Success;
 }
@@ -238,7 +256,20 @@ KbdOff(InputInfoPtr pInfo, int what)
 	 break;
 #endif
 }
-}
+} else {
+ switch (pKbd-consType) {
+#ifdef WSCONS_SUPPORT
+case WSCONS:
+ if ((pKbd-wsKbdDev[0] != 0)  (pInfo-fd != -1)) {
+ 	xf86Msg(X_INFO, closing %s\n, pKbd-wsKbdDev);
+ 	/* need to close the fd while we're gone */
+ 	close(pInfo-fd);
+ 	pInfo-fd = -1;
+ }
+	 break;
+#endif
+}
+}   	
 return Success;
 }
 
@@ -368,6 +399,7 @@ OpenKeyboard(InputInfoPtr pInfo)
 	pInfo-fd = xf86Info.consoleFd;
 	pKbd-isConsole = TRUE;
 	pKbd-consType = xf86Info.consType;
+	pKbd-wsKbdDev[0] = 0;
 } else {
 	pInfo-fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
 	if (pInfo-fd == -1) {
@@ -376,6 +408,7 @@ OpenKeyboard(InputInfoPtr pInfo)
return FALSE;
}
pKbd-isConsole = FALSE;
+   strncpy(pKbd-wsKbdDev, s, 256);
pKbd-consType = xf86Info.consType;
free(s);
 }

Index: xsrc/external/mit/xf86-input-keyboard/dist/src/xf86OSKbd.h
diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/xf86OSKbd.h:1.1.1.3 xsrc/external/mit/xf86-input-keyboard/dist/src/xf86OSKbd.h:1.2
--- xsrc/external/mit/xf86-input-keyboard/dist/src/xf86OSKbd.h:1.1.1.3	Sun Jul 24 00:04:34 2011
+++ xsrc/external/mit/xf86-input-keyboard/dist/src/xf86OSKbd.h	Thu Feb 14 20:53:26 2013
@@ -78,6 +78,7 @@ typedef struct {
 pointer		private;
 int			consType;
 int			wsKbdType;
+char		wsKbdDev[256];
 
 } KbdDevRec, *KbdDevPtr;
 



CVS commit: src/external/gpl3/binutils

2013-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 14 21:29:36 UTC 2013

Modified Files:
src/external/gpl3/binutils/usr.bin: Makefile.inc
src/external/gpl3/binutils/usr.bin/common: Makefile.prog
src/external/gpl3/binutils/usr.bin/gas: Makefile
src/external/gpl3/binutils/usr.bin/gprof: Makefile
src/external/gpl3/binutils/usr.bin/ld: Makefile
src/external/gpl3/binutils/usr.bin/readelf: Makefile
src/external/gpl3/binutils/usr.sbin/dbsym: Makefile
src/external/gpl3/binutils/usr.sbin/mdsetimage: Makefile

Log Message:
re-order library dependencies to make sure that -lintl and -lz are after
the rest of the libraries so that static linking works.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/usr.bin/Makefile.inc
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/Makefile.prog
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/binutils/usr.bin/gas/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/binutils/usr.bin/gprof/Makefile
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/binutils/usr.bin/ld/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/binutils/usr.bin/readelf/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/binutils/usr.sbin/dbsym/Makefile
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile

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

Modified files:

Index: src/external/gpl3/binutils/usr.bin/Makefile.inc
diff -u src/external/gpl3/binutils/usr.bin/Makefile.inc:1.3 src/external/gpl3/binutils/usr.bin/Makefile.inc:1.4
--- src/external/gpl3/binutils/usr.bin/Makefile.inc:1.3	Mon May 30 10:41:26 2011
+++ src/external/gpl3/binutils/usr.bin/Makefile.inc	Thu Feb 14 16:29:35 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.3 2011/05/30 14:41:26 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2013/02/14 21:29:35 christos Exp $
 
 BINDIR?=	/usr/bin
 
@@ -13,9 +13,6 @@ CPPFLAGS+=	${GNUCPPFLAGS:M-D*:N-DLOCALED
 		-I${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH} \
 		-I${DIST}/include -I${DIST}/bfd -I${DIST}/binutils \
 		-DLOCALEDIR=\${LOCALEDIR}\
-LDADD+=-lz
-DPADD+=${LIBZ}
-
 NOGCCERROR=	# defined
 
 .endif # __MAKEFILE_INC_INCLUDED__

Index: src/external/gpl3/binutils/usr.bin/common/Makefile.prog
diff -u src/external/gpl3/binutils/usr.bin/common/Makefile.prog:1.5 src/external/gpl3/binutils/usr.bin/common/Makefile.prog:1.6
--- src/external/gpl3/binutils/usr.bin/common/Makefile.prog:1.5	Wed Feb 13 22:36:44 2013
+++ src/external/gpl3/binutils/usr.bin/common/Makefile.prog	Thu Feb 14 16:29:35 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.prog,v 1.5 2013/02/14 03:36:44 christos Exp $
+#	$NetBSD: Makefile.prog,v 1.6 2013/02/14 21:29:35 christos Exp $
 #
 # Common Makefile fragment for a binutils program.
 #
@@ -20,24 +20,24 @@ MAN=		${G_man_MANS:M${PROG}.1}
 
 CPPFLAGS+=	-I${.CURDIR}/../common/arch/${MACHINE_ARCH}
 
-LDADD+=		-lintl
-DPADD+=		${LIBINTL}
-
 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libopcodes*)
-PROGDPLIBS+=	opcodes ${TOP}/${BFDSUBDIR}/libopcodes
+PROGDPLIBS+=	opcodes	${TOP}/${BFDSUBDIR}/libopcodes
 .endif
 
 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libbfd*)
-PROGDPLIBS+=	bfd ${TOP}/${BFDSUBDIR}/libbfd
+PROGDPLIBS+=	bfd	${TOP}/${BFDSUBDIR}/libbfd
 .endif
 
 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libiberty*)
-PROGDPLIBS+=	iberty ${TOP}/${BFDSUBDIR}/libiberty
+PROGDPLIBS+=	iberty	${TOP}/${BFDSUBDIR}/libiberty
 .endif
 
 .PATH: ${DIST}/binutils ${DIST}/binutils/doc
 
 .include bsd.prog.mk
 
+LDADD+=		-lintl -lz
+DPADD+=		${LIBINTL} ${LIBZ}
+
 # Override the .y.c and .y.l rules *after* bsd.prog.mk
 .y.c .l.c:

Index: src/external/gpl3/binutils/usr.bin/gas/Makefile
diff -u src/external/gpl3/binutils/usr.bin/gas/Makefile:1.8 src/external/gpl3/binutils/usr.bin/gas/Makefile:1.9
--- src/external/gpl3/binutils/usr.bin/gas/Makefile:1.8	Wed Feb 13 22:36:44 2013
+++ src/external/gpl3/binutils/usr.bin/gas/Makefile	Thu Feb 14 16:29:35 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2013/02/14 03:36:44 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2013/02/14 21:29:35 christos Exp $
 
 .include bsd.own.mk
 
@@ -24,12 +24,9 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${MACHINE_A
 CPPFLAGS+=	-I${DIST}/gas -I${DIST}/gas/config
 CPPFLAGS+=	-I${DIST}
 
-PROGDPLIBS+=	opcodes ${TOP}/${BFDSUBDIR}/libopcodes
-PROGDPLIBS+=	bfd ${TOP}/${BFDSUBDIR}/libbfd
-PROGDPLIBS+=	iberty ${TOP}/${BFDSUBDIR}/libiberty
-
-LDADD=		-lintl
-DPADD=		${LIBINTL}
+PROGDPLIBS+=	opcodes	${TOP}/${BFDSUBDIR}/libopcodes
+PROGDPLIBS+=	bfd	${TOP}/${BFDSUBDIR}/libbfd
+PROGDPLIBS+=	iberty	${TOP}/${BFDSUBDIR}/libiberty
 
 TEXINFO=	as.texinfo
 COMMONOBJDIR!=	cd ${TOP}/usr.bin/common  ${PRINTOBJDIR}
@@ -41,3 +38,6 @@ as.info:	bfdver.texi
 
 .include bsd.prog.mk
 .include bsd.info.mk
+
+LDADD+=		-lintl -lz
+DPADD+=		${LIBINTL} ${LIBZ}

Index: src/external/gpl3/binutils/usr.bin/gprof/Makefile
diff -u src/external/gpl3/binutils/usr.bin/gprof/Makefile:1.6 

CVS commit: [netbsd-6] src/sys/arch/evbarm/rpi

2013-02-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Feb 14 21:38:01 UTC 2013

Modified Files:
src/sys/arch/evbarm/rpi [netbsd-6]: rpi_machdep.c

Log Message:
Pull up revision 1.6 of rpi_machdep.c to fix ticket #813.


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.4 -r1.3.2.5 src/sys/arch/evbarm/rpi/rpi_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/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.3.2.4 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.3.2.5
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.3.2.4	Wed Feb 13 01:36:14 2013
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Thu Feb 14 21:38:00 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.3.2.4 2013/02/13 01:36:14 riz Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.3.2.5 2013/02/14 21:38:00 riz Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -122,10 +122,9 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.3.2.4 2013/02/13 01:36:14 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.3.2.5 2013/02/14 21:38:00 riz Exp $);
 
 #include opt_evbarm_boardtype.h
-#include opt_broadcom.h
 
 #include sdhc.h
 #include dotg.h



CVS commit: [netbsd-6] src/doc

2013-02-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Feb 14 21:38:50 UTC 2013

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

Log Message:
Fix the revision list for ticket 813.


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

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

Modified files:

Index: src/doc/CHANGES-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.93 src/doc/CHANGES-6.1:1.1.2.94
--- src/doc/CHANGES-6.1:1.1.2.93	Wed Feb 13 03:29:46 2013
+++ src/doc/CHANGES-6.1	Thu Feb 14 21:38:50 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.93 2013/02/13 03:29:46 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.94 2013/02/14 21:38:50 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8437,7 +8437,7 @@ sys/arch/evbarm/conf/RPI1.23 via pat
 sys/arch/evbarm/conf/files.rpi1.3 via patch
 sys/arch/evbarm/conf/mk.rpi1.2 via patch
 sys/arch/evbarm/conf/std.rpi1.4 via patch
-sys/arch/evbarm/rpi/rpi_machdep.c			1.34 via patch
+sys/arch/evbarm/rpi/rpi_machdep.c			1.6,1.34 via patch
 sys/arch/evbarm/rpi/rpi_start.S1.7 via patch
 sys/arch/evbarm/rpi/rpi_vcmbox.c			1.2 via patch
 sys/arch/evbarm/rpi/vcio.h1.1 via patch
@@ -8465,3 +8465,19 @@ sys/dev/videomode/edid.c1.12 via pat
 	Ethernet should work.
 	[skrll, ticket #813]
 
+distrib/sets/lists/xserver/md.evbarm		1.1
+external/mit/xorg/server/drivers/Makefile	1.61
+external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile 1.15
+external/mit/xorg/server/xorg-server/Makefile.common 1.24
+external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile 1.32
+sys/dev/wscons/wsdisplay_vconsvar.h		1.22
+sys/dev/wsfb/genfb.c1.49
+sys/dev/wsfb/genfb.c1.50
+xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb.h	1.4
+xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c 1.14
+xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c 1.15
+
+	Enable and fix Xserver build for evbarm.  X should now work
+	on Raspberry Pi.
+	[skrll, ticket #818]
+



CVS commit: [netbsd-6] src/external/mit/xorg/server/drivers/xf86-input-keyboard

2013-02-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Feb 14 21:43:10 UTC 2013

Modified Files:
src/external/mit/xorg/server/drivers/xf86-input-keyboard [netbsd-6]:
Makefile

Log Message:
Apply revision 1.15 via patch as part of a fix for ticket 818.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.4.1 \
src/external/mit/xorg/server/drivers/xf86-input-keyboard/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/mit/xorg/server/drivers/xf86-input-keyboard/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.13 src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.13.4.1
--- src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.13	Tue Jun 21 11:42:20 2011
+++ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile	Thu Feb 14 21:43:10 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2011/06/21 11:42:20 nonaka Exp $
+#	$NetBSD: Makefile,v 1.13.4.1 2013/02/14 21:43:10 riz Exp $
 
 DRIVER=		xf86-input-keyboard
 DRIVER_NAME=	kbd_drv
@@ -15,7 +15,7 @@ CPPFLAGS+=	-DPCVT_SUPPORT
 
 .if ${MACHINE_ARCH} == powerpc || ${MACHINE} == sparc || \
 ${MACHINE} == sparc64 || ${MACHINE} == sgimips || \
-${MACHINE} == shark
+${MACHINE} == shark || ${MACHINE} == evbarm
 CPPFLAGS+=	-DDEFAULT_TO_WSKBD
 .endif
 



CVS commit: [netbsd-6] xsrc/external/mit/xf86-video-wsfb/dist/src

2013-02-14 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Thu Feb 14 21:44:11 UTC 2013

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src [netbsd-6]: wsfb_driver.c

Log Message:
Pull up revision 1.15 as the second part of a fix for ticket 818.


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.1 -r1.13.2.2 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.13.2.1 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.13.2.2
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.13.2.1	Wed Feb 13 20:52:41 2013
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Thu Feb 14 21:44:11 2013
@@ -438,48 +438,96 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags
 		return FALSE;
 	}
 
-	if (ioctl(fPtr-fd, WSDISPLAYIO_GINFO, fPtr-info) == -1) {
-		xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
-			   ioctl WSDISPLAY_GINFO: %s\n,
-			   strerror(errno));
-		return FALSE;
-	}
-	if (ioctl(fPtr-fd, WSDISPLAYIO_GTYPE, wstype) == -1) {
-		xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
-			   ioctl WSDISPLAY_GTYPE: %s\n,
-			   strerror(errno));
-		return FALSE;
-	}
-	if (ioctl(fPtr-fd, WSDISPLAYIO_LINEBYTES, fPtr-linebytes) == -1) {
-		xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
-			   ioctl WSDISPLAYIO_LINEBYTES: %s\n,
-			   strerror(errno));
-		return FALSE;
+	if (ioctl(fPtr-fd, WSDISPLAYIO_GET_FBINFO, fPtr-fbi) != 0) {
+		struct wsdisplay_fbinfo info;
+		struct wsdisplayio_fbinfo *fbi = fPtr-fbi;
+		int lb;
+
+		xf86Msg(X_WARNING, ioctl(WSDISPLAYIO_GET_FBINFO) failed,  \
+			falling back to old method\n);
+		if (ioctl(fPtr-fd, WSDISPLAYIO_GINFO, info) == -1) {
+			xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
+   ioctl WSDISPLAY_GINFO: %s\n,
+   strerror(errno));
+			return FALSE;
+		}
+		if (ioctl(fPtr-fd, WSDISPLAYIO_GTYPE, wstype) == -1) {
+			xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
+   ioctl WSDISPLAY_GTYPE: %s\n,
+   strerror(errno));
+			return FALSE;
+		}
+		if (ioctl(fPtr-fd, WSDISPLAYIO_LINEBYTES, lb) == -1) {
+			xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
+   ioctl WSDISPLAYIO_LINEBYTES: %s\n,
+   strerror(errno));
+			return FALSE;
+		}
+		/* ok, fake up a new style fbinfo */
+		fbi-fbi_width = info.width;
+		fbi-fbi_height = info.height;
+		fbi-fbi_stride = lb;
+		fbi-fbi_bitsperpixel = info.depth;
+		if (info.depth  16) {
+			fbi-fbi_pixeltype = WSFB_RGB;
+			if (wstype == WSDISPLAY_TYPE_SUN24 ||
+			wstype == WSDISPLAY_TYPE_SUNCG12 ||
+			wstype == WSDISPLAY_TYPE_SUNCG14 ||
+			wstype == WSDISPLAY_TYPE_SUNTCX ||
+			wstype == WSDISPLAY_TYPE_SUNFFB ||
+			wstype == WSDISPLAY_TYPE_XVR1000 ||
+			wstype == WSDISPLAY_TYPE_VC4) {
+fbi-fbi_subtype.fbi_rgbmasks.red_offset = 0;
+fbi-fbi_subtype.fbi_rgbmasks.red_size = 8;
+fbi-fbi_subtype.fbi_rgbmasks.green_offset = 8;
+fbi-fbi_subtype.fbi_rgbmasks.green_size = 8;
+fbi-fbi_subtype.fbi_rgbmasks.blue_offset = 16;
+fbi-fbi_subtype.fbi_rgbmasks.blue_size = 8;
+			} else {
+fbi-fbi_subtype.fbi_rgbmasks.red_offset = 16;
+fbi-fbi_subtype.fbi_rgbmasks.red_size = 8;
+fbi-fbi_subtype.fbi_rgbmasks.green_offset = 8;
+fbi-fbi_subtype.fbi_rgbmasks.green_size = 8;
+fbi-fbi_subtype.fbi_rgbmasks.blue_offset = 0;
+fbi-fbi_subtype.fbi_rgbmasks.blue_size = 8;
+			}
+			fbi-fbi_subtype.fbi_rgbmasks.alpha_offset = 0;
+			fbi-fbi_subtype.fbi_rgbmasks.alpha_size = 0;
+		} else if (info.depth = 8) {
+			fbi-fbi_pixeltype = WSFB_CI;
+			fbi-fbi_subtype.fbi_cmapinfo.cmap_entries = info.cmsize;
+		}
+		fbi-fbi_flags = 0;
+		fbi-fbi_fbsize = info.width * lb;
+
 	}
 	/*
 	 * Allocate room for saving the colormap.
 	 */
-	if (fPtr-info.cmsize != 0) {
+	if (fPtr-fbi.fbi_pixeltype == WSFB_CI) {
 		fPtr-saved_cmap.red =
-		(unsigned char *)xalloc(fPtr-info.cmsize);
+		(unsigned char *)xalloc(fPtr-fbi.fbi_subtype.fbi_cmapinfo.cmap_entries);
 		if (fPtr-saved_cmap.red == NULL) {
 			xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
-			Cannot malloc %d bytes\n, fPtr-info.cmsize);
+			Cannot malloc %d bytes\n,
+			fPtr-fbi.fbi_subtype.fbi_cmapinfo.cmap_entries);
 			return FALSE;
 		}
 		fPtr-saved_cmap.green =
-		(unsigned char *)xalloc(fPtr-info.cmsize);
+		(unsigned char *)xalloc(fPtr-fbi.fbi_subtype.fbi_cmapinfo.cmap_entries);
 		if (fPtr-saved_cmap.green == NULL) {
 			xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
-			Cannot malloc %d bytes\n, fPtr-info.cmsize);
+			Cannot malloc %d bytes\n,
+			fPtr-fbi.fbi_subtype.fbi_cmapinfo.cmap_entries);
 			xfree(fPtr-saved_cmap.red);
 			return FALSE;
 		}
 		fPtr-saved_cmap.blue =
-		(unsigned char *)xalloc(fPtr-info.cmsize);
+		(unsigned char *)xalloc(fPtr-fbi.fbi_subtype.fbi_cmapinfo.cmap_entries);
 		if (fPtr-saved_cmap.blue == NULL) {
 			xf86DrvMsg(pScrn-scrnIndex, 

CVS commit: [netbsd-6] src/sys/dev/usb

2013-02-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Feb 14 21:50:41 UTC 2013

Modified Files:
src/sys/dev/usb [netbsd-6]: dwc_otgvar.h

Log Message:
Clean up trailing CRs accidentally introduced during the ticket 813
pullup.


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.2 -r1.11.2.3 src/sys/dev/usb/dwc_otgvar.h

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

Modified files:

Index: src/sys/dev/usb/dwc_otgvar.h
diff -u src/sys/dev/usb/dwc_otgvar.h:1.11.2.2 src/sys/dev/usb/dwc_otgvar.h:1.11.2.3
--- src/sys/dev/usb/dwc_otgvar.h:1.11.2.2	Wed Feb 13 01:36:16 2013
+++ src/sys/dev/usb/dwc_otgvar.h	Thu Feb 14 21:50:41 2013
@@ -1,267 +1,267 @@
-/*	$NetBSD: dwc_otgvar.h,v 1.11.2.2 2013/02/13 01:36:16 riz Exp $ */
-
-/* $FreeBSD: src/sys/dev/usb/controller/dwc_otg.h,v 1.12 2012/09/27 15:23:38 hselasky Exp $ */
-/*-
- * Copyright (c) 2012 Hans Petter Selasky. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef	_DWC_OTGVAR_H_
-#define	_DWC_OTGVAR_H_
-
-#include sys/pool.h
-#include sys/workqueue.h
-
-#define	DWC_OTG_MAX_DEVICES MIN(USB_MAX_DEVICES, 32)
-#define	DWC_OTG_FRAME_MASK 0x7FF
-#define	DWC_OTG_MAX_TXP 4
-#define	DWC_OTG_MAX_TXN (0x200 * DWC_OTG_MAX_TXP)
-#define	DWC_OTG_MAX_CHANNELS 16
-#define	DWC_OTG_MAX_ENDPOINTS 16
-#define	DWC_OTG_HOST_TIMER_RATE 10 /* ms */
-
-#ifdef DOTG_COUNTERS
-/*
- * curmode (bit 0) is a mode indication bit 0 = device, 1 = host
- */
-#define	DWC_OTG_INTRBITF	1
-#define	DWC_OTG_INTRBITL	31
-#define	DWC_OTG_NINTRBITS	32
-#endif
-
-struct dwc_otg_td;
-struct dwc_otg_softc;
-
-typedef uint8_t (dwc_otg_cmd_t)(struct dwc_otg_td *td);
-
-typedef struct dwc_otg_td {
-	struct dwc_otg_td *obj_next;
-	dwc_otg_cmd_t *func;
-	usbd_xfer_handle xfer;
- 	void *buf;
-	uint32_t actlen;
-	uint32_t tx_bytes;
-	uint32_t offset;
-	uint32_t remainder;
-	uint32_t hcchar;		/* HOST CFG */
-	uint32_t hcsplt;		/* HOST CFG */
-	uint16_t max_packet_size;	/* packet_size */
-	uint16_t npkt;
-	uint8_t errcnt;
-	uint8_t retrycnt;
-	uint8_t tmr_res;
-	uint8_t tmr_val;
-	uint8_t curr_frame;
-	uint8_t	ep_no;
-	uint8_t channel;
-	uint8_t state;
-#define	DWC_CHAN_ST_START 0
-#define	DWC_CHAN_ST_WAIT_ANE 1
-#define	DWC_CHAN_ST_WAIT_S_ANE 2
-#define	DWC_CHAN_ST_WAIT_C_ANE 3
-#define	DWC_CHAN_ST_RX_PKT 4
-#define	DWC_CHAN_ST_RX_SPKT 5
-#define	DWC_CHAN_ST_RX_SPKT_SYNC 6
-#define	DWC_CHAN_ST_TX_PKT 4
-#define	DWC_CHAN_ST_TX_CPKT 5
-#define	DWC_CHAN_ST_TX_PKT_SYNC 6
-	uint8_t	error:1;
-	uint8_t	error_any:1;
-	uint8_t	error_stall:1;
-	uint8_t	alt_next:1;
-	uint8_t	short_pkt:1;
-	uint8_t	did_stall:1;
-	uint8_t toggle:1;
-	uint8_t set_toggle:1;
-	uint8_t got_short:1;
-	uint8_t did_nak:1;
-} dwc_otg_td_t;
-
-
-struct dwc_otg_std_temp {
-	dwc_otg_cmd_t *func;
-	usbd_xfer_handle xfer;
- 	void *buf;
-	struct dwc_otg_td *td;
-	struct dwc_otg_td *td_next;
-	uint32_t len;
-	uint32_t offset;
-	uint16_t max_frame_size;
-	uint8_t	short_pkt;
-
-	/*
-	 * short_pkt = 0: transfer should be short terminated
-	 * short_pkt = 1: transfer should not be short terminated
-	 */
-	uint8_t	setup_alt_next;
-	uint8_t did_stall;
-	uint8_t bulk_or_control;
-};
-
-struct dwc_otg_flags {
-	uint8_t	change_connect:1;
-	uint8_t	change_suspend:1;
-	uint8_t change_reset:1;
-	uint8_t change_enabled:1;
-	uint8_t change_over_current:1;
-	uint8_t	status_suspend:1;	/* set if suspended */
-	uint8_t	status_vbus:1;		/* set if present */
-	uint8_t	status_bus_reset:1;	/* set if reset complete */
-	uint8_t	status_high_speed:1;	/* set if High Speed is selected */
-	uint8_t	status_low_speed:1;	/* set if Low Speed is selected */
-	uint8_t status_device_mode:1;	/* set if device mode */
-	uint8_t	self_powered:1;
-	

CVS commit: [netbsd-6] src/sys/dev/pci

2013-02-14 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Thu Feb 14 22:08:28 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_wm.c if_wmvar.h

Log Message:
Pull up revisions:
  src/sys/dev/pci/if_wm.c revision 1.243
  src/sys/dev/pci/if_wmvar.h revision 1.14
(requested by msaitoh in ticket #820).

Use 82580(and I350) specific PHY read/write functions.
Fixes PR#47542.


To generate a diff of this commit:
cvs rdiff -u -r1.227.2.5 -r1.227.2.6 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.12.10.1 -r1.12.10.2 src/sys/dev/pci/if_wmvar.h

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.227.2.5 src/sys/dev/pci/if_wm.c:1.227.2.6
--- src/sys/dev/pci/if_wm.c:1.227.2.5	Mon Dec 17 00:30:05 2012
+++ src/sys/dev/pci/if_wm.c	Thu Feb 14 22:08:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.227.2.5 2012/12/17 00:30:05 riz Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.227.2.6 2013/02/14 22:08:28 jdc Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.227.2.5 2012/12/17 00:30:05 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.227.2.6 2013/02/14 22:08:28 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -542,6 +542,8 @@ static int	wm_gmii_bm_readreg(device_t, 
 static void	wm_gmii_bm_writereg(device_t, int, int, int);
 static int	wm_gmii_hv_readreg(device_t, int, int);
 static void	wm_gmii_hv_writereg(device_t, int, int, int);
+static int	wm_gmii_82580_readreg(device_t, int, int);
+static void	wm_gmii_82580_writereg(device_t, int, int, int);
 static int	wm_sgmii_readreg(device_t, int, int);
 static void	wm_sgmii_writereg(device_t, int, int, int);
 
@@ -6277,6 +6279,10 @@ wm_gmii_mediainit(struct wm_softc *sc, p
 		} else if (sc-sc_type = WM_T_80003) {
 			sc-sc_mii.mii_readreg = wm_gmii_i80003_readreg;
 			sc-sc_mii.mii_writereg = wm_gmii_i80003_writereg;
+		} else if (sc-sc_type = WM_T_82580) {
+			sc-sc_phytype = WMPHY_82580;
+			sc-sc_mii.mii_readreg = wm_gmii_82580_readreg;
+			sc-sc_mii.mii_writereg = wm_gmii_82580_writereg;
 		} else if (sc-sc_type = WM_T_82544) {
 			sc-sc_mii.mii_readreg = wm_gmii_i82544_readreg;
 			sc-sc_mii.mii_writereg = wm_gmii_i82544_writereg;
@@ -6980,6 +6986,58 @@ wm_sgmii_writereg(device_t self, int phy
 }
 
 /*
+ * wm_gmii_82580_readreg:	[mii interface function]
+ *
+ *	Read a PHY register on the 82580 and I350.
+ * This could be handled by the PHY layer if we didn't have to lock the
+ * ressource ...
+ */
+static int
+wm_gmii_82580_readreg(device_t self, int phy, int reg)
+{
+	struct wm_softc *sc = device_private(self);
+	int sem;
+	int rv;
+
+	sem = swfwphysem[sc-sc_funcid];
+	if (wm_get_swfw_semaphore(sc, sem)) {
+		aprint_error_dev(sc-sc_dev, %s: failed to get semaphore\n,
+		__func__);
+		return 0;
+	}
+
+	rv = wm_gmii_i82544_readreg(self, phy, reg);
+
+	wm_put_swfw_semaphore(sc, sem);
+	return rv;
+}
+
+/*
+ * wm_gmii_82580_writereg:	[mii interface function]
+ *
+ *	Write a PHY register on the 82580 and I350.
+ * This could be handled by the PHY layer if we didn't have to lock the
+ * ressource ...
+ */
+static void
+wm_gmii_82580_writereg(device_t self, int phy, int reg, int val)
+{
+	struct wm_softc *sc = device_private(self);
+	int sem;
+
+	sem = swfwphysem[sc-sc_funcid];
+	if (wm_get_swfw_semaphore(sc, sem)) {
+		aprint_error_dev(sc-sc_dev, %s: failed to get semaphore\n,
+		__func__);
+		return;
+	}
+
+	wm_gmii_i82544_writereg(self, phy, reg, val);
+
+	wm_put_swfw_semaphore(sc, sem);
+}
+
+/*
  * wm_gmii_statchg:	[mii interface function]
  *
  *	Callback from MII layer when media changes.

Index: src/sys/dev/pci/if_wmvar.h
diff -u src/sys/dev/pci/if_wmvar.h:1.12.10.1 src/sys/dev/pci/if_wmvar.h:1.12.10.2
--- src/sys/dev/pci/if_wmvar.h:1.12.10.1	Thu Jun 28 16:06:36 2012
+++ src/sys/dev/pci/if_wmvar.h	Thu Feb 14 22:08:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmvar.h,v 1.12.10.1 2012/06/28 16:06:36 riz Exp $	*/
+/*	$NetBSD: if_wmvar.h,v 1.12.10.2 2013/02/14 22:08:28 jdc Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -140,7 +140,8 @@ typedef enum {
 	WMPHY_BM,
 	WMPHY_82577,
 	WMPHY_82578,
-	WMPHY_82579
+	WMPHY_82579,
+	WMPHY_82580
 } wm_phy_type;
 
 



CVS commit: [netbsd-6] src/sys/arch/sparc/include

2013-02-14 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Thu Feb 14 22:12:10 UTC 2013

Modified Files:
src/sys/arch/sparc/include [netbsd-6]: ieee.h

Log Message:
Pull up revision 1.15 (requested by martin in ticket #821).

 We have an implicit 1 MSB bit in the mantissa. Pointed out by Matt Thomas.
 Fixes PR port-sparc64/47536.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.8.1 src/sys/arch/sparc/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/sparc/include/ieee.h
diff -u src/sys/arch/sparc/include/ieee.h:1.14 src/sys/arch/sparc/include/ieee.h:1.14.8.1
--- src/sys/arch/sparc/include/ieee.h:1.14	Sun Jul 10 04:49:37 2011
+++ src/sys/arch/sparc/include/ieee.h	Thu Feb 14 22:12:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee.h,v 1.14 2011/07/10 04:49:37 matt Exp $	*/
+/*	$NetBSD: ieee.h,v 1.14.8.1 2013/02/14 22:12:10 jdc Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -118,6 +118,6 @@ union ieee_ext_u {
 #define extu_frachm	extu_ext.ext_frachm
 #define extu_frach	extu_ext.ext_frach
 
-#define LDBL_NBIT	0x8000
-#define mask_nbit_l(u)	((u).extu_frach = ~LDBL_NBIT)
+#define	LDBL_IMPLICIT_NBIT	1
+
 #endif /* __arch64__ || _KERNEL */



CVS commit: [netbsd-6] src/sys/kern

2013-02-14 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Thu Feb 14 22:13:59 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: uipc_socket.c uipc_syscalls.c

Log Message:
Pull up revisions:
  src/sys/kern/uipc_socket.c revision 1.213
  src/sys/kern/uipc_syscalls.c revision 1.160
(requested by christos in ticket #822).

PR/47569: Valery Ushakov: SOCK_NONBLOCK does not work because it does not
set SS_NBIO.
XXX: there are too many flags that mean the same thing in too many places=
,
and too many flags that mean the same thing and are different.


To generate a diff of this commit:
cvs rdiff -u -r1.209.2.1 -r1.209.2.2 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.154.2.2 -r1.154.2.3 src/sys/kern/uipc_syscalls.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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.209.2.1 src/sys/kern/uipc_socket.c:1.209.2.2
--- src/sys/kern/uipc_socket.c:1.209.2.1	Thu Jul 12 17:11:17 2012
+++ src/sys/kern/uipc_socket.c	Thu Feb 14 22:13:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.209.2.1 2012/07/12 17:11:17 riz Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.209.2.2 2013/02/14 22:13:59 jdc Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.209.2.1 2012/07/12 17:11:17 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.209.2.2 2013/02/14 22:13:59 jdc Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_sock_counters.h
@@ -585,6 +585,8 @@ fsocreate(int domain, struct socket **so
 		fp-f_data = so;
 		fd_affix(curproc, fp, fd);
 		*fdout = fd;
+		if (flags  SOCK_NONBLOCK)
+			so-so_state |= SS_NBIO;
 	}
 	return error;
 }

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.154.2.2 src/sys/kern/uipc_syscalls.c:1.154.2.3
--- src/sys/kern/uipc_syscalls.c:1.154.2.2	Mon Jan  7 16:53:18 2013
+++ src/sys/kern/uipc_syscalls.c	Thu Feb 14 22:13:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.154.2.2 2013/01/07 16:53:18 riz Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.154.2.3 2013/02/14 22:13:59 jdc Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.154.2.2 2013/01/07 16:53:18 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.154.2.3 2013/02/14 22:13:59 jdc Exp $);
 
 #include opt_pipe.h
 
@@ -234,6 +234,8 @@ do_sys_accept(struct lwp *l, int sock, s
 	((flags  SOCK_NOSIGPIPE) ? FNOSIGPIPE : 0);
 	fp2-f_ops = socketops;
 	fp2-f_data = so2;
+	if (flags  SOCK_NONBLOCK)
+		so2-so_state |= SS_NBIO;
 	error = soaccept(so2, nam);
 	so2-so_cred = kauth_cred_dup(so-so_cred);
 	sounlock(so);
@@ -424,6 +426,8 @@ makesocket(struct lwp *l, file_t **fp, i
 	(*fp)-f_type = DTYPE_SOCKET;
 	(*fp)-f_ops = socketops;
 	(*fp)-f_data = so;
+	if (flags  SOCK_NONBLOCK)
+		so-so_state |= SS_NBIO;
 	return 0;
 }
 



CVS commit: src/distrib/utils/embedded

2013-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 15 00:13:07 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
don't use [ -f $i ]  cat $i, since we are using -e


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.34 src/distrib/utils/embedded/mkimage:1.35
--- src/distrib/utils/embedded/mkimage:1.34	Tue Feb 12 07:45:12 2013
+++ src/distrib/utils/embedded/mkimage	Thu Feb 14 19:13:06 2013
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.34 2013/02/12 12:45:12 jmcneill Exp $
+# $NetBSD: mkimage,v 1.35 2013/02/15 00:13:06 christos Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -130,7 +130,9 @@ echo ${bar} configuring sets ${bar}
 (echo '/set type=dir uname=root gname=wheel mode=0755'
 for i in $selected_sets; do
 	s=${release}/etc/mtree/set.$i
-	[ -f $s ]  cat $s
+	if [ -f $s ]; then
+		cat $s
+	fi
 done)  $tmp/selected_sets
 
 make_fstab



CVS commit: src/lib/libc/gen

2013-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 15 00:28:10 UTC 2013

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

Log Message:
More fixes from: J.R. Oldroyd
- The input loop control that I changed yesterday to:
while (mbslength = 0) {
  There are circumstances where this causes an extra \000 to
  be added at the end of some tests.  This error was showing
  in my own tests here, but I did not notice it yesterday.
  (I really need to add my tests to the test suite, catching
  every error by eye is hard.)  To fix, I've now changed the
  code to increment mbslength only if mbslength == 1 to start
  with.  (Note that this check for == 1 is why the arg to
  strvisx() in vis(1) must be 1, not mbilen.)

- The cast sequence when manually inserting bytes after a
  multibyte conversion error:
*src = (wint_t)(u_char)*mbsrc;
  is wrong.  This is causing problems in the case when an
  8859-1 input string is processed in the UTF-8 locale.
  It needs to be:
*src = (wint_t)*mbsrc;
  Without the (u_char) all the locale mismatch combinations
  then work.

- The code:
if (mblength  len)
len = mblength;
  needs to be there.  It resets len for the single character
  input case after we've actually processed two input
  characters (c and nextc) because we incremented mbslength
  at the start of the loop.  Without this code, single
  character conversions end up with a \000 or other byte
  appended.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/lib/libc/gen/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/lib/libc/gen/vis.c
diff -u src/lib/libc/gen/vis.c:1.52 src/lib/libc/gen/vis.c:1.53
--- src/lib/libc/gen/vis.c:1.52	Thu Feb 14 08:57:53 2013
+++ src/lib/libc/gen/vis.c	Thu Feb 14 19:28:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vis.c,v 1.52 2013/02/14 13:57:53 christos Exp $	*/
+/*	$NetBSD: vis.c,v 1.53 2013/02/15 00:28:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: vis.c,v 1.52 2013/02/14 13:57:53 christos Exp $);
+__RCSID($NetBSD: vis.c,v 1.53 2013/02/15 00:28:10 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 #ifdef __FBSDID
 __FBSDID($FreeBSD$);
@@ -298,6 +298,20 @@ istrsnvisx(char *mbdst, size_t *dlen, co
 	_DIAGASSERT(mbsrc != NULL);
 	_DIAGASSERT(mbextra != NULL);
 
+	/*
+	 * Input (mbsrc) is a char string considered to be multibyte
+	 * characters.  The input loop will read this string pulling
+	 * one character, possibly multiple bytes, from mbsrc and
+	 * converting each to wchar_t in src.
+	 *
+	 * The vis conversion will be done using the wide char
+	 * wchar_t string.
+	 *
+	 * This will then be converted back to a multibyte string to
+	 * return to the caller.
+	 */
+
+	/* Allocate space for the wide char strings */
 	psrc = pdst = extra = nextra = NULL;
 	if (!mblength)
 		mblength = strlen(mbsrc);
@@ -312,22 +326,53 @@ istrsnvisx(char *mbdst, size_t *dlen, co
 	dst = pdst;
 	src = psrc;
 
+	/*
+	 * Input loop.
+	 * Handle up to mblength characters (not bytes).  We do not
+	 * stop at NULs because we may be processing a block of data
+	 * that includes NULs.  We process one more than the character
+	 * count so that we also get the next character of input which
+	 * is needed under some circumstances as a look-ahead character.
+	 */
 	mbslength = (ssize_t)mblength;
-	while (mbslength = 0) {
+	/*
+	 * When inputing a single character, must also read in the
+	 * next character for nextc, the look-ahead character.
+	 */
+	if (mbslength == 1)
+		mbslength++;
+	while (mbslength  0) {
+		/* Convert one multibyte character to wchar_t. */
 		clen = mbtowc(src, mbsrc, MB_LEN_MAX);
 		if (clen  0) {
-			*src = (wint_t)(u_char)*mbsrc;
+			/* Conversion error, process as a byte instead. */
+			*src = (wint_t)*mbsrc;
 			clen = 1;
 		}
 		if (clen == 0)
+			/*
+			 * NUL in input gives 0 return value. process
+			 * as single NUL byte.
+			 */
 			clen = 1;
+		/* Advance output pointer if we still have input left. */
 		src++;
+		/* Advance input pointer by number of bytes read. */
 		mbsrc += clen;
+		/* Decrement input count */
 		mbslength -= clen;
 	}
 	len = src - psrc;	
 	src = psrc;
+	/*
+	 * In the single character input case, we will have actually
+	 * processed two characters, c and nextc.  Reset len back to
+	 * just a single character.
+	 */
+	if (mblength  len)
+		len = mblength;
 
+	/* Convert extra argument to list of characters for this mode. */
 	mbstowcs(extra, mbextra, strlen(mbextra));
 	MAKEEXTRALIST(flag, nextra, extra);
 	if (!nextra) {
@@ -340,8 +385,14 @@ istrsnvisx(char *mbdst, size_t *dlen, co
 		goto out;
 	}
 
+	/* Look up which processing function to call. */
 	f = getvisfun(flag);
 
+	/*
+	 * Main processing loop.
+	 * Call do_Xvis processing function one character at a time
+	 * with next 

CVS commit: src/usr.bin/vis

2013-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 15 00:29:45 UTC 2013

Modified Files:
src/usr.bin/vis: vis.c

Log Message:
More fixes from J.R. Oldroyd:

- I have added a call to memset() to clear the mbibuff on
  each loop.  Since we're dealing with possibly broken
  multibyte sequences, clearing it will avoid problems with
  a new input sequence possibly being confused by extra
  bytes still there from the last iteration.  wctomb(),
  which is used to fill that buffer, does not append a NUL.

- I have added a (char) cast when copying single bytes into
  the input buffer after a multibyte conversion error.

- In the call to strvisx() the count must be 1, not mbilen
  which can be 2 or 3 etc for a multibyte character.  This
  value is a count of characters - not bytes - to process.
  It even says characters in the man page.  In vis(3) I
  am interpreting this value to mean multibyte characters.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/vis/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/usr.bin/vis/vis.c
diff -u src/usr.bin/vis/vis.c:1.20 src/usr.bin/vis/vis.c:1.21
--- src/usr.bin/vis/vis.c:1.20	Thu Feb 14 09:00:01 2013
+++ src/usr.bin/vis/vis.c	Thu Feb 14 19:29:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vis.c,v 1.20 2013/02/14 14:00:01 christos Exp $	*/
+/*	$NetBSD: vis.c,v 1.21 2013/02/15 00:29:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -39,12 +39,13 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)vis.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: vis.c,v 1.20 2013/02/14 14:00:01 christos Exp $);
+__RCSID($NetBSD: vis.c,v 1.21 2013/02/15 00:29:44 christos Exp $);
 #endif /* not lint */
 
 #include stdio.h
 #include string.h
 #include stdlib.h
+#include string.h
 #include errno.h
 #include wchar.h
 #include limits.h
@@ -160,29 +161,49 @@ process(FILE *fp)
 	static int col = 0;
 	static char nul[] = \0;
 	char *cp = nul + 1;	/* so *(cp-1) starts out != '\n' */
-	wint_t c, c1, rachar; 
-	char mbibuff[13]; /* ((sizeof(ibuff) - 1) * MB_LEN_MAX) + NUL */
+	wint_t c, c1, rachar;
+	char mbibuff[13]; /* (2 wchars (i.e., c + c1)) * MB_LEN_MAX) */
 	char buff[5]; /* max vis-encoding length for one char + NUL */
 	int mbilen, cerr = 0, raerr = 0;
 	
+/*
+ * The input stream is considered to be multibyte characters.
+ * The input loop will read this data inputing one character,
+	 * possibly multiple bytes, at a time and converting each to
+	 * a wide character wchar_t.
+ *
+	 * The vis(3) functions, however, require single either bytes
+	 * or a multibyte string as their arguments.  So we convert
+	 * our input wchar_t and the following look-ahead wchar_t to
+	 * a multibyte string for processing by vis(3).
+ */
+
+	/* Read one multibyte character, store as wchar_t */
 	c = getwc(fp);
 	if (c == WEOF  errno == EILSEQ) {
+		/* Error in multibyte data.  Read one byte. */
 		c = (wint_t)getc(fp);
 		cerr = 1;
 	}
 	while (c != WEOF) {
+		/* Clear multibyte input buffer. */
+		memset(mbibuff, 0, sizeof(mbibuff));
+		/* Read-ahead next multibyte character. */
 		rachar = getwc(fp);
 		if (rachar == WEOF  errno == EILSEQ) {
+			/* Error in multibyte data.  Read one byte. */
 			rachar = (wint_t)getc(fp);
 			raerr = 1;
 		}
 		if (none) {
+			/* Handle -n flag. */
 			cp = buff;
 			*cp++ = c;
 			if (c == '\\')
 *cp++ = '\\';
 			*cp = '\0';
 		} else if (markeol  c == '\n') {
+			/* Handle -l flag. */
 			cp = buff;
 			if ((eflags  VIS_NOSLASH) == 0)
 *cp++ = '\\';
@@ -190,19 +211,41 @@ process(FILE *fp)
 			*cp++ = '\n';
 			*cp = '\0';
 		} else {
+			/*
+			 * Convert character using vis(3) library.
+			 * At this point we will process one character.
+			 * But we must pass the vis(3) library this
+			 * character plus the next one because the next
+			 * one is used as a look-ahead to decide how to
+			 * encode this one under certain circumstances.
+			 *
+			 * Since our characters may be multibyte, e.g.,
+			 * in the UTF-8 locale, we cannot use vis() and
+			 * svis() which require byte input, so we must
+			 * create a multibyte string and use strvisx().
+			 */
+			/* Treat EOF as a NUL char. */
 			c1 = rachar;
 			if (c1 == WEOF)
 c1 = L'\0';
+			/*
+			 * If we hit a multibyte conversion error above,
+			 * insert byte directly into string buff because
+			 * wctomb() will fail.  Else convert wchar_t to
+			 * multibyte using wctomb().
+			 */
 			if (cerr) {
-*mbibuff = c;
+*mbibuff = (char)c;
 mbilen = 1;
 			} else
 mbilen = wctomb(mbibuff, c);
+			/* Same for look-ahead character. */
 			if (raerr)
-mbibuff[mbilen] = c1;
+mbibuff[mbilen] = (char)c1;
 			else
 wctomb(mbibuff + mbilen, c1);
-			(void)strsvisx(buff, mbibuff, mbilen, eflags, extra);
+			/* Perform encoding on just first character. */
+			

CVS commit: [matt-nb6-plus] src/sys/arch/arm/arm32

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 15 01:02:59 UTC 2013

Modified Files:
src/sys/arch/arm/arm32 [matt-nb6-plus]: bus_dma.c

Log Message:
Actually use the calculated uboundary


To generate a diff of this commit:
cvs rdiff -u -r1.54.10.5 -r1.54.10.6 src/sys/arch/arm/arm32/bus_dma.c

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

Modified files:

Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.54.10.5 src/sys/arch/arm/arm32/bus_dma.c:1.54.10.6
--- src/sys/arch/arm/arm32/bus_dma.c:1.54.10.5	Thu Feb 14 08:24:58 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Fri Feb 15 01:02:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.54.10.5 2013/02/14 08:24:58 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.54.10.6 2013/02/15 01:02:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.54.10.5 2013/02/14 08:24:58 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.54.10.6 2013/02/15 01:02:59 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1562,7 +1562,7 @@ _bus_dmamem_alloc_range(bus_dma_tag_t t,
 	/*
 	 * Allocate pages from the VM system.
 	 */
-	error = uvm_pglistalloc(size, low, high, alignment, boundary,
+	error = uvm_pglistalloc(size, low, high, alignment, uboundary,
 	mlist, nsegs, (flags  BUS_DMA_NOWAIT) == 0);
 	if (error)
 		return (error);



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

2013-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 15 01:03:43 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: bus_dma.c

Log Message:
Actually use the calculated uboundary.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/arm/arm32/bus_dma.c

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

Modified files:

Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.77 src/sys/arch/arm/arm32/bus_dma.c:1.78
--- src/sys/arch/arm/arm32/bus_dma.c:1.77	Thu Feb 14 08:24:39 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Fri Feb 15 01:03:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.77 2013/02/14 08:24:39 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.78 2013/02/15 01:03:43 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.77 2013/02/14 08:24:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.78 2013/02/15 01:03:43 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1562,7 +1562,7 @@ _bus_dmamem_alloc_range(bus_dma_tag_t t,
 	/*
 	 * Allocate pages from the VM system.
 	 */
-	error = uvm_pglistalloc(size, low, high, alignment, boundary,
+	error = uvm_pglistalloc(size, low, high, alignment, uboundary,
 	mlist, nsegs, (flags  BUS_DMA_NOWAIT) == 0);
 	if (error)
 		return (error);



CVS commit: [netbsd-6] src/sys/arch/evbarm/rpi

2013-02-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 15 03:35:52 UTC 2013

Added Files:
src/sys/arch/evbarm/rpi [netbsd-6]: vcpm.h

Log Message:
Commit another file missed from ticket 813. (Raspberry Pi support)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.4.2 src/sys/arch/evbarm/rpi/vcpm.h

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

Added files:

Index: src/sys/arch/evbarm/rpi/vcpm.h
diff -u /dev/null src/sys/arch/evbarm/rpi/vcpm.h:1.1.4.2
--- /dev/null	Fri Feb 15 03:35:52 2013
+++ src/sys/arch/evbarm/rpi/vcpm.h	Fri Feb 15 03:35:52 2013
@@ -0,0 +1,49 @@
+/*	$NetBSD: vcpm.h,v 1.1.4.2 2013/02/15 03:35:52 riz Exp $	*/
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson
+ *
+ * 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.
+ */
+
+/*
+ * Power Manager Mailbox interface
+ */
+
+#ifndef	_EVBARM_RPI_VCPM_H_
+#define	_EVBARM_RPI_VCPM_H_
+
+#define	VCPM_POWER_SDCARD	0
+#define	VCPM_POWER_UART0	1
+#define	VCPM_POWER_UART1	2
+#define	VCPM_POWER_USB		3
+#define	VCPM_POWER_I2C0		4
+#define	VCPM_POWER_I2C1		5
+#define	VCPM_POWER_I2C2		6
+#define	VCPM_POWER_SPI		7
+#define	VCPM_POWER_CCP2TX	8
+
+#endif	/* _EVBARM_RPI_VCPM_H_ */



CVS commit: [netbsd-6] src/doc

2013-02-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 15 03:36:32 UTC 2013

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

Log Message:
Adjust the ticket 813 entry.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.96 -r1.1.2.97 src/doc/CHANGES-6.1

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

Modified files:

Index: src/doc/CHANGES-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.96 src/doc/CHANGES-6.1:1.1.2.97
--- src/doc/CHANGES-6.1:1.1.2.96	Thu Feb 14 22:21:09 2013
+++ src/doc/CHANGES-6.1	Fri Feb 15 03:36:32 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.96 2013/02/14 22:21:09 jdc Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.97 2013/02/15 03:36:32 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8442,6 +8442,7 @@ sys/arch/evbarm/rpi/rpi_start.S1.7 v
 sys/arch/evbarm/rpi/rpi_vcmbox.c			1.2 via patch
 sys/arch/evbarm/rpi/vcio.h1.1 via patch
 sys/arch/evbarm/rpi/vcprop.h1.7 via patch
+sys/arch/evbarm/rpi/vcpm.h1.1 via patch
 sys/conf/files		patch
 sys/dev/sdmmc/sdhc.c	1.43
 sys/dev/sdmmc/sdhcvar.h	1.13



CVS commit: src/doc

2013-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 15 03:56:11 UTC 2013

Modified Files:
src/doc: 3RDPARTY

Log Message:
newer openssl


To generate a diff of this commit:
cvs rdiff -u -r1.1000 -r1.1001 src/doc/3RDPARTY

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.1000 src/doc/3RDPARTY:1.1001
--- src/doc/3RDPARTY:1.1000	Tue Feb  5 16:35:18 2013
+++ src/doc/3RDPARTY	Thu Feb 14 22:56:11 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1000 2013/02/05 21:35:18 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1001 2013/02/15 03:56:11 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -888,8 +888,8 @@ markus is very cooperative about it):
 - make compile with gcc-4.5; const fixes, fileno() checks, shadow fixes.
 
 Package:	OpenSSL
-Version:	1.0.1d
-Current Vers:	1.0.1d with AES-NI patch
+Version:	1.0.1e
+Current Vers:	1.0.1e with AES-NI patch
 Maintainer:	The OpenSSL Project
 Archive Site:	ftp://ftp.openssl.org/source/
 Home Page:	http://www.openssl.org/



CVS commit: src/external/public-domain/sqlite/lib

2013-02-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb 15 07:59:37 UTC 2013

Modified Files:
src/external/public-domain/sqlite/lib: Makefile

Log Message:
Backout libm dependency here as well (assuming it was meant for the
backed-out use of floor() I added/removed yesterday)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/public-domain/sqlite/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/public-domain/sqlite/lib/Makefile
diff -u src/external/public-domain/sqlite/lib/Makefile:1.2 src/external/public-domain/sqlite/lib/Makefile:1.3
--- src/external/public-domain/sqlite/lib/Makefile:1.2	Thu Feb 14 19:18:38 2013
+++ src/external/public-domain/sqlite/lib/Makefile	Fri Feb 15 07:59:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2013/02/14 19:18:38 matt Exp $
+# $NetBSD: Makefile,v 1.3 2013/02/15 07:59:36 martin Exp $
 
 LIB=		sqlite3
 INCS=		sqlite3.h sqlite3ext.h
@@ -8,8 +8,6 @@ SRCS=		sqlite3.c
 
 CFLAGS+=	-DNDEBUG
 
-LIBDPLIBS+=	m	${NETBSDSRCDIR}/lib/libm
-
 FILES+=			sqlite3.pc
 FILESOWN_sqlite3.pc=	${BINOWN}
 FILESGRP_sqlite3.pc=	${BINGRP}