CVS commit: src/lib/libc/arch/arm/hardfloat

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 07:14:41 UTC 2013

Added Files:
src/lib/libc/arch/arm/hardfloat: fabs.S

Log Message:
Add hardfloat version of fabs using the vabs.f64 instruction


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/hardfloat/fabs.S

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

Added files:

Index: src/lib/libc/arch/arm/hardfloat/fabs.S
diff -u /dev/null src/lib/libc/arch/arm/hardfloat/fabs.S:1.1
--- /dev/null	Sun Feb  3 07:14:41 2013
+++ src/lib/libc/arch/arm/hardfloat/fabs.S	Sun Feb  3 07:14:41 2013
@@ -0,0 +1,39 @@
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+
+RCSID("$NetBSD: fabs.S,v 1.1 2013/02/03 07:14:41 matt Exp $")
+
+	.fpu	vfp
+
+ENTRY(fabs)
+	vabs.f64	d0, d0
+	RET
+END(fabs)



CVS commit: src/lib/libm

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 07:13:07 UTC 2013

Modified Files:
src/lib/libm: Makefile
Added Files:
src/lib/libm/arch/arm: e_sqrt.S e_sqrtf.S s_fabsf.S

Log Message:
Add support for the ARM hardfloat instructions vsqrt and vabs.


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libm/arch/arm/e_sqrt.S \
src/lib/libm/arch/arm/e_sqrtf.S src/lib/libm/arch/arm/s_fabsf.S

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.125 src/lib/libm/Makefile:1.126
--- src/lib/libm/Makefile:1.125	Sat Aug  4 15:16:16 2012
+++ src/lib/libm/Makefile	Sun Feb  3 07:13:07 2013
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.125 2012/08/04 15:16:16 matt Exp $
+#  $NetBSD: Makefile,v 1.126 2013/02/03 07:13:07 matt Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -50,6 +50,9 @@ USE_SHLIBDIR=	yes
 .if (${MACHINE_ARCH} == "alpha")
 .PATH: ${.CURDIR}/arch/alpha
 ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
+.elif (${MACHINE_ARCH} == "earmhf" || ${MACHINE_ARCH} == "earmhfeb")
+.PATH: ${.CURDIR}/arch/arm
+ARCH_SRCS = e_sqrt.S e_sqrtf.S s_fabsf.S
 .elif (${MACHINE_ARCH} == "sparc")
 .PATH: ${.CURDIR}/arch/sparc
 COMMON_SRCS+= fenv.c

Added files:

Index: src/lib/libm/arch/arm/e_sqrt.S
diff -u /dev/null src/lib/libm/arch/arm/e_sqrt.S:1.1
--- /dev/null	Sun Feb  3 07:13:07 2013
+++ src/lib/libm/arch/arm/e_sqrt.S	Sun Feb  3 07:13:07 2013
@@ -0,0 +1,39 @@
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+
+RCSID("$NetBSD: e_sqrt.S,v 1.1 2013/02/03 07:13:07 matt Exp $")
+
+	.fpu	vfp
+
+ENTRY(__ieee754_sqrt)
+	vsqrt.f64	d0, d0
+	RET
+END(__ieee754_sqrt)
Index: src/lib/libm/arch/arm/e_sqrtf.S
diff -u /dev/null src/lib/libm/arch/arm/e_sqrtf.S:1.1
--- /dev/null	Sun Feb  3 07:13:07 2013
+++ src/lib/libm/arch/arm/e_sqrtf.S	Sun Feb  3 07:13:07 2013
@@ -0,0 +1,39 @@
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * 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

CVS commit: src/usr.sbin/makefs

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  3 06:16:53 UTC 2013

Modified Files:
src/usr.sbin/makefs: makefs.8 makefs.c makefs.h walk.c

Log Message:
add a replace flag so we can overlay exiting files when we merge directories.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/makefs/makefs.8
cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/makefs/makefs.c
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/makefs/makefs.h
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/makefs/walk.c

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

Modified files:

Index: src/usr.sbin/makefs/makefs.8
diff -u src/usr.sbin/makefs/makefs.8:1.44 src/usr.sbin/makefs/makefs.8:1.45
--- src/usr.sbin/makefs/makefs.8:1.44	Sat Feb  2 15:42:02 2013
+++ src/usr.sbin/makefs/makefs.8	Sun Feb  3 01:16:53 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: makefs.8,v 1.44 2013/02/02 20:42:02 christos Exp $
+.\"	$NetBSD: makefs.8,v 1.45 2013/02/03 06:16:53 christos Exp $
 .\"
 .\" Copyright (c) 2001-2003 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -41,7 +41,7 @@
 .Nd create a file system image from a directory tree
 .Sh SYNOPSIS
 .Nm
-.Op Fl xZ
+.Op Fl rxZ
 .Op Fl B Ar endian
 .Op Fl b Ar free-blocks
 .Op Fl d Ar debug-mask
@@ -194,6 +194,8 @@ Set the file system sector size to
 .Ar sector-size .
 .\" XXX: next line also true for cd9660?
 Defaults to 512.
+.It Fl r
+When merging multiple directories replace duplicate files with the last found.
 .It Fl s Ar image-size
 Set the size of the file system image to
 .Ar image-size .

Index: src/usr.sbin/makefs/makefs.c
diff -u src/usr.sbin/makefs/makefs.c:1.48 src/usr.sbin/makefs/makefs.c:1.49
--- src/usr.sbin/makefs/makefs.c:1.48	Sat Feb  2 15:42:02 2013
+++ src/usr.sbin/makefs/makefs.c	Sun Feb  3 01:16:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: makefs.c,v 1.48 2013/02/02 20:42:02 christos Exp $	*/
+/*	$NetBSD: makefs.c,v 1.49 2013/02/03 06:16:53 christos Exp $	*/
 
 /*
  * Copyright (c) 2001-2003 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: makefs.c,v 1.48 2013/02/02 20:42:02 christos Exp $");
+__RCSID("$NetBSD: makefs.c,v 1.49 2013/02/03 06:16:53 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -121,7 +121,7 @@ main(int argc, char *argv[])
 	start_time.tv_sec = start.tv_sec;
 	start_time.tv_nsec = start.tv_usec * 1000;
 
-	while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:O:o:s:S:t:xZ")) != -1) {
+	while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:O:o:rs:S:t:xZ")) != -1) {
 		switch (ch) {
 
 		case 'B':
@@ -214,6 +214,10 @@ main(int argc, char *argv[])
 			break;
 		}
 
+		case 'r':
+			fsoptions.replace = 1;
+			break;
+
 		case 's':
 			fsoptions.minsize = fsoptions.maxsize =
 			strsuftoll("size", optarg, 1LL, LLONG_MAX);
@@ -268,7 +272,7 @@ main(int argc, char *argv[])
 
 /* walk the tree */
 	TIMER_START(start);
-	root = walk_dir(argv[1], ".", NULL, NULL);
+	root = walk_dir(argv[1], ".", NULL, NULL, fsoptions.replace);
 	TIMER_RESULTS(start, "walk_dir");
 
 	/* append extra directory */
@@ -279,7 +283,7 @@ main(int argc, char *argv[])
 		if (!S_ISDIR(sb.st_mode))
 			errx(1, "%s: not a directory", argv[i]);
 		TIMER_START(start);
-		root = walk_dir(argv[i], ".", NULL, root);
+		root = walk_dir(argv[i], ".", NULL, root, fsoptions.replace);
 		TIMER_RESULTS(start, "walk_dir2");
 	}
 
@@ -411,7 +415,7 @@ usage(fstype_t *fstype, fsinfo_t *fsopti
 
 	prog = getprogname();
 	fprintf(stderr,
-"Usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n"
+"Usage: %s [-rxZ] [-B endian] [-b free-blocks] [-d debug-mask]\n"
 "\t[-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]\n"
 "\t[-N userdb-dir] [-O offset] [-o fs-options] [-S sector-size]\n"
 "\t[-s image-size] [-t fs-type] image-file directory [extra-directory ...]\n",

Index: src/usr.sbin/makefs/makefs.h
diff -u src/usr.sbin/makefs/makefs.h:1.33 src/usr.sbin/makefs/makefs.h:1.34
--- src/usr.sbin/makefs/makefs.h:1.33	Sat Feb  2 15:42:02 2013
+++ src/usr.sbin/makefs/makefs.h	Sun Feb  3 01:16:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: makefs.h,v 1.33 2013/02/02 20:42:02 christos Exp $	*/
+/*	$NetBSD: makefs.h,v 1.34 2013/02/03 06:16:53 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -164,6 +164,7 @@ typedef struct makefs_fsinfo {
 	int	needswap;	/* non-zero if byte swapping needed */
 	int	sectorsize;	/* sector size */
 	int	sparse;		/* sparse image, don't fill it with zeros */
+	int	replace;	/* replace files when merging */
 
 	void	*fs_specific;	/* File system specific additions. */
 	option_t *fs_options;	/* File system specific options */
@@ -178,7 +179,7 @@ const char *	inode_type(mode_t);
 int		set_option(const option_t *, const char *, char *, size_t);
 int		set_option_var(const option_t *, const char *, const char *,
 char *, size_t);
-fsnode *	walk_dir(const char *, const char *, fsnode *, fsnode *);
+fsnode *	walk_dir(const char *, co

CVS commit: src

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 05:37:44 UTC 2013

Modified Files:
src: build.sh

Log Message:
Add
MACHINE=evbarm  MACHINE_ARCH=earmhf ALIAS=evbearmhf-el
MACHINE=evbarm  MACHINE_ARCH=earmhfeb   ALIAS=evbearmhf-eb


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.262 src/build.sh:1.263
--- src/build.sh:1.262	Sat Feb  2 02:08:37 2013
+++ src/build.sh	Sun Feb  3 05:37:43 2013
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.262 2013/02/02 02:08:37 hubertf Exp $
+#	$NetBSD: build.sh,v 1.263 2013/02/03 05:37:43 matt Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -589,6 +589,8 @@ MACHINE=evbarm		MACHINE_ARCH=arm	ALIAS=e
 MACHINE=evbarm		MACHINE_ARCH=armeb	ALIAS=evbarm-eb
 MACHINE=evbarm		MACHINE_ARCH=earm	ALIAS=evbearm-el
 MACHINE=evbarm		MACHINE_ARCH=earmeb	ALIAS=evbearm-eb
+MACHINE=evbarm		MACHINE_ARCH=earmhf	ALIAS=evbearmhf-el
+MACHINE=evbarm		MACHINE_ARCH=earmhfeb	ALIAS=evbearmhf-eb
 MACHINE=evbmips		MACHINE_ARCH=		NO_DEFAULT
 MACHINE=evbmips		MACHINE_ARCH=mips64eb	ALIAS=evbmips64-eb
 MACHINE=evbmips		MACHINE_ARCH=mips64el	ALIAS=evbmips64-el
@@ -1717,7 +1719,7 @@ createmakewrapper()
 	eval cat <

CVS commit: src/share/mk

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 05:36:36 UTC 2013

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

Log Message:
Add support for MACHINE_ARCH earmhf and earmhfeb


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.721 src/share/mk/bsd.own.mk:1.722
--- src/share/mk/bsd.own.mk:1.721	Sun Jan 27 02:31:44 2013
+++ src/share/mk/bsd.own.mk	Sun Feb  3 05:36:36 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.721 2013/01/27 02:31:44 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.722 2013/02/03 05:36:36 matt Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -14,7 +14,7 @@ MAKECONF?=	/etc/mk.conf
 #
 # CPU model, derived from MACHINE_ARCH
 #
-MACHINE_CPU=	${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/:S/earm/arm/:S/earmeb/arm/:S/powerpc64/powerpc/}
+MACHINE_CPU=	${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/:C/earm.*/arm/:S/earm/arm/:S/powerpc64/powerpc/}
 
 #
 # Subdirectory used below ${RELEASEDIR} when building a release
@@ -684,6 +684,8 @@ SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_ve
 GNU_ARCH.coldfire=m68k
 GNU_ARCH.earm=arm
 GNU_ARCH.earmeb=armeb
+GNU_ARCH.earmhf=arm
+GNU_ARCH.earmhfeb=armeb
 GNU_ARCH.i386=i486
 GCC_CONFIG_ARCH.i386=i486
 GCC_CONFIG_TUNE.i386=nocona
@@ -698,8 +700,8 @@ MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_AR
 # In order to identify NetBSD to GNU packages, we sometimes need
 # an "elf" tag for historically a.out platforms.
 #
-.if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb"
-MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-eabi
+.if (${MACHINE_ARCH:Mearm*} != "")
+MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:S/earm/eabi/}
 .elif (${MACHINE_GNU_ARCH} == "arm" || \
  ${MACHINE_GNU_ARCH} == "armeb" || \
  ${MACHINE_ARCH} == "i386" || \
@@ -810,7 +812,8 @@ MKCOMPATMODULES:=	no
 # emips is always softfloat.
 #
 .if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" || \
-${MACHINE_CPU} == "arm" || ${MACHINE} == "emips"
+(${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \
+${MACHINE} == "emips"
 MKSOFTFLOAT?=	yes
 .endif
 



CVS commit: src/share/mk

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 05:35:26 UTC 2013

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

Log Message:
add earmhf


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/mk/bsd.endian.mk

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

Modified files:

Index: src/share/mk/bsd.endian.mk
diff -u src/share/mk/bsd.endian.mk:1.16 src/share/mk/bsd.endian.mk:1.17
--- src/share/mk/bsd.endian.mk:1.16	Sun Aug  5 04:11:35 2012
+++ src/share/mk/bsd.endian.mk	Sun Feb  3 05:35:25 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.endian.mk,v 1.16 2012/08/05 04:11:35 matt Exp $
+#	$NetBSD: bsd.endian.mk,v 1.17 2013/02/03 05:35:25 matt Exp $
 
 .if !defined(_BSD_ENDIAN_MK_)
 _BSD_ENDIAN_MK_=1
@@ -8,6 +8,7 @@ _BSD_ENDIAN_MK_=1
 .if ${MACHINE_ARCH} == "alpha" || \
 ${MACHINE_ARCH} == "arm" || \
 ${MACHINE_ARCH} == "earm" || \
+${MACHINE_ARCH} == "earmhf" || \
 ${MACHINE_ARCH} == "i386" || \
 ${MACHINE_ARCH} == "ia64" || \
 ${MACHINE_ARCH} == "vax" || \



CVS commit: src/external/gpl3/gcc/usr.bin/gcc/arch/earm

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 05:34:50 UTC 2013

Modified Files:
src/external/gpl3/gcc/usr.bin/gcc/arch/earm: insn-modes.h

Log Message:
mknative for earmhf


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/gcc/arch/earm/insn-modes.h

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/gcc/arch/earm/insn-modes.h
diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/earm/insn-modes.h:1.1 src/external/gpl3/gcc/usr.bin/gcc/arch/earm/insn-modes.h:1.2
--- src/external/gpl3/gcc/usr.bin/gcc/arch/earm/insn-modes.h:1.1	Sun Aug  5 17:03:32 2012
+++ src/external/gpl3/gcc/usr.bin/gcc/arch/earm/insn-modes.h	Sun Feb  3 05:34:50 2013
@@ -6,88 +6,88 @@
 
 enum machine_mode
 {
-  VOIDmode,/* machmode.def:169 */
-  BLKmode, /* machmode.def:173 */
-  CCmode,  /* machmode.def:201 */
-  CC_NOOVmode, /* config/arm/arm-modes.def:40 */
-  CC_Zmode,/* config/arm/arm-modes.def:41 */
-  CC_SWPmode,  /* config/arm/arm-modes.def:42 */
-  CCFPmode,/* config/arm/arm-modes.def:43 */
-  CCFPEmode,   /* config/arm/arm-modes.def:44 */
-  CC_DNEmode,  /* config/arm/arm-modes.def:45 */
-  CC_DEQmode,  /* config/arm/arm-modes.def:46 */
-  CC_DLEmode,  /* config/arm/arm-modes.def:47 */
-  CC_DLTmode,  /* config/arm/arm-modes.def:48 */
-  CC_DGEmode,  /* config/arm/arm-modes.def:49 */
-  CC_DGTmode,  /* config/arm/arm-modes.def:50 */
-  CC_DLEUmode, /* config/arm/arm-modes.def:51 */
-  CC_DLTUmode, /* config/arm/arm-modes.def:52 */
-  CC_DGEUmode, /* config/arm/arm-modes.def:53 */
-  CC_DGTUmode, /* config/arm/arm-modes.def:54 */
-  CC_Cmode,/* config/arm/arm-modes.def:55 */
-  CC_Nmode,/* config/arm/arm-modes.def:56 */
-  BImode,  /* machmode.def:176 */
-  QImode,  /* machmode.def:181 */
-  HImode,  /* machmode.def:182 */
-  SImode,  /* machmode.def:183 */
-  DImode,  /* machmode.def:184 */
-  TImode,  /* machmode.def:185 */
-  EImode,  /* config/arm/arm-modes.def:67 */
-  OImode,  /* config/arm/arm-modes.def:68 */
-  CImode,  /* config/arm/arm-modes.def:69 */
-  XImode,  /* config/arm/arm-modes.def:70 */
-  QQmode,  /* machmode.def:204 */
-  HQmode,  /* machmode.def:205 */
-  SQmode,  /* machmode.def:206 */
-  DQmode,  /* machmode.def:207 */
-  TQmode,  /* machmode.def:208 */
-  UQQmode, /* machmode.def:210 */
-  UHQmode, /* machmode.def:211 */
-  USQmode, /* machmode.def:212 */
-  UDQmode, /* machmode.def:213 */
-  UTQmode, /* machmode.def:214 */
-  HAmode,  /* machmode.def:216 */
-  SAmode,  /* machmode.def:217 */
-  DAmode,  /* machmode.def:218 */
-  TAmode,  /* machmode.def:219 */
-  UHAmode, /* machmode.def:221 */
-  USAmode, /* machmode.def:222 */
-  UDAmode, /* machmode.def:223 */
-  UTAmode, /* machmode.def:224 */
-  HFmode,  /* config/arm/arm-modes.def:29 */
-  SFmode,  /* machmode.def:196 */
-  DFmode,  /* machmode.def:197 */
-  XFmode,  /* config/arm/arm-modes.def:26 */
-  SDmode,  /* machmode.def:236 */
-  DDmode,  /* machmode.def:237 */
-  TDmode,  /* machmode.def:238 */
-  CQImode, /* machmode.def:232 */
-  CHImode, /* machmode.def:232 */
-  CSImode, /* machmode.def:232 */
-  CDImode, /* machmode.def:232 */
-  CTImode, /* machmode.def:232 */
-  CEImode, /* machmode.def:232 */
-  COImode, /* machmode.def:232 */
-  CCImode, /* machmode.def:232 */
-  CXImode, /* machmode.def:232 */
-  HCmode,  /* machmode.def:233 */
-  SCmode,  /* machmode.def:233 */
-  DCmode,  /* machmode.def:233 */
-  XCmode,  /* machmode.def:233 */
-  V4QImode,/* config/arm/arm-modes.def:59 */
-  V2HImode,/* config/arm/arm-modes.def:59 */
-  V8QImode,/* config/arm/arm-modes.def:60 */
-  V4HImode,/* config/arm/arm-modes.def:60 */
-  V2SImode,/* config/arm/arm-modes.def:60 */
-  V16QImode,   /* config/arm/arm-modes.def:61 */
-  V8HImode,/* confi

CVS commit: src/sbin/newfs_msdos

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  3 03:21:42 UTC 2013

Modified Files:
src/sbin/newfs_msdos: mkfs_msdos.c

Log Message:
don't truncate the file if an offset is given.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/newfs_msdos/mkfs_msdos.c

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

Modified files:

Index: src/sbin/newfs_msdos/mkfs_msdos.c
diff -u src/sbin/newfs_msdos/mkfs_msdos.c:1.6 src/sbin/newfs_msdos/mkfs_msdos.c:1.7
--- src/sbin/newfs_msdos/mkfs_msdos.c:1.6	Sun Jan 27 16:56:26 2013
+++ src/sbin/newfs_msdos/mkfs_msdos.c	Sat Feb  2 22:21:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkfs_msdos.c,v 1.6 2013/01/27 21:56:26 christos Exp $	*/
+/*	$NetBSD: mkfs_msdos.c,v 1.7 2013/02/03 03:21:42 christos Exp $	*/
 
 /*
  * Copyright (c) 1998 Robert Nordier
@@ -37,7 +37,7 @@
 static const char rcsid[] =
   "$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $";
 #else
-__RCSID("$NetBSD: mkfs_msdos.c,v 1.6 2013/01/27 21:56:26 christos Exp $");
+__RCSID("$NetBSD: mkfs_msdos.c,v 1.7 2013/02/03 03:21:42 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -263,6 +263,7 @@ mkfs_msdos(const char *fname, const char
 u_int bss, rds, cls, dir, lsn, x, x1, x2;
 int ch, fd, fd1;
 struct msdos_options o = *op;
+int oflags = O_RDWR | O_CREAT;
 
 if (o.block_size && o.sectors_per_cluster) {
 	warnx("Cannot specify both block size and sectors per cluster");
@@ -278,7 +279,9 @@ mkfs_msdos(const char *fname, const char
 	warnx("create (-C) is incompatible with -N");
 	return -1;
 	}
-	fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644);
+	if (o.offset == 0)
+		oflags |= O_TRUNC;
+	fd = open(fname, oflags, 0644);
 	if (fd == -1) {
 	warnx("failed to create %s", fname);
 	return -1;



CVS commit: src/usr.sbin/makefs

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  3 03:21:21 UTC 2013

Modified Files:
src/usr.sbin/makefs: ffs.c msdos.c
src/usr.sbin/makefs/ffs: buf.c mkfs.c

Log Message:
- more changes to make -O work
- fix err* calls.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/makefs/ffs.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/makefs/msdos.c
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/makefs/ffs/buf.c
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/makefs/ffs/mkfs.c

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

Modified files:

Index: src/usr.sbin/makefs/ffs.c
diff -u src/usr.sbin/makefs/ffs.c:1.59 src/usr.sbin/makefs/ffs.c:1.60
--- src/usr.sbin/makefs/ffs.c:1.59	Wed Jan 30 14:19:19 2013
+++ src/usr.sbin/makefs/ffs.c	Sat Feb  2 22:21:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs.c,v 1.59 2013/01/30 19:19:19 christos Exp $	*/
+/*	$NetBSD: ffs.c,v 1.60 2013/02/03 03:21:21 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -71,7 +71,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.59 2013/01/30 19:19:19 christos Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.60 2013/02/03 03:21:21 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -466,13 +466,15 @@ ffs_create_image(const char *image, fsin
 	char	*buf;
 	int	i, bufsize;
 	off_t	bufrem;
+	int	oflags = O_RDWR | O_CREAT;
 
 	assert (image != NULL);
 	assert (fsopts != NULL);
 
 		/* create image */
-	if ((fsopts->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0666))
-	== -1) {
+	if (fsopts->offset == 0)
+		oflags |= O_TRUNC;
+	if ((fsopts->fd = open(image, oflags, 0666)) == -1) {
 		warn("Can't open `%s' for writing", image);
 		return (-1);
 	}
@@ -500,6 +502,12 @@ ffs_create_image(const char *image, fsin
 		}
 	}
 
+	if (fsopts->offset != 0)
+		if (lseek(fsopts->fd, fsopts->offset, SEEK_SET) == -1) {
+			warn("can't seek");
+			return -1;
+		}
+
 	if ((debug & DEBUG_FS_CREATE_IMAGE) && fsopts->sparse == 0)
 		printf(
 		"zero-ing image `%s', %lld sectors, using %d byte chunks\n",

Index: src/usr.sbin/makefs/msdos.c
diff -u src/usr.sbin/makefs/msdos.c:1.13 src/usr.sbin/makefs/msdos.c:1.14
--- src/usr.sbin/makefs/msdos.c:1.13	Wed Jan 30 14:19:19 2013
+++ src/usr.sbin/makefs/msdos.c	Sat Feb  2 22:21:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdos.c,v 1.13 2013/01/30 19:19:19 christos Exp $	*/
+/*	$NetBSD: msdos.c,v 1.14 2013/02/03 03:21:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: msdos.c,v 1.13 2013/01/30 19:19:19 christos Exp $");
+__RCSID("$NetBSD: msdos.c,v 1.14 2013/02/03 03:21:21 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -149,6 +149,7 @@ msdos_makefs(const char *image, const ch
 	 * Is minsize right here?
 	 */
 	msdos_opt->create_size = MAX(msdos_opt->create_size, fsopts->minsize);
+	msdos_opt->offset = fsopts->offset;
 	if (msdos_opt->bytes_per_sector == 0) {
 		if (fsopts->sectorsize == -1)
 			fsopts->sectorsize = 512;

Index: src/usr.sbin/makefs/ffs/buf.c
diff -u src/usr.sbin/makefs/ffs/buf.c:1.20 src/usr.sbin/makefs/ffs/buf.c:1.21
--- src/usr.sbin/makefs/ffs/buf.c:1.20	Sat Feb  2 15:42:02 2013
+++ src/usr.sbin/makefs/ffs/buf.c	Sat Feb  2 22:21:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf.c,v 1.20 2013/02/02 20:42:02 christos Exp $	*/
+/*	$NetBSD: buf.c,v 1.21 2013/02/03 03:21:21 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: buf.c,v 1.20 2013/02/02 20:42:02 christos Exp $");
+__RCSID("$NetBSD: buf.c,v 1.21 2013/02/03 03:21:21 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -78,18 +78,18 @@ bread(struct vnode *vp, daddr_t blkno, i
 		(long long)(*bpp)->b_blkno, (long long) offset,
 		(*bpp)->b_bcount);
 	if (lseek((*bpp)->b_fs->fd, offset, SEEK_SET) == -1)
-		err(1, "bread: lseek %lld (%lld)",
+		err(1, "%s: lseek %lld (%lld)", __func__,
 		(long long)(*bpp)->b_blkno, (long long)offset);
 	rv = read((*bpp)->b_fs->fd, (*bpp)->b_data, (*bpp)->b_bcount);
 	if (debug & DEBUG_BUF_BREAD)
-		printf("bread: read %ld (%lld) returned %d\n",
-		(*bpp)->b_bcount, (long long)offset, (int)rv);
+		printf("bread: read %ld (%lld) returned %zd\n",
+		(*bpp)->b_bcount, (long long)offset, rv);
 	if (rv == -1)/* read error */
-		err(1, "bread: read %ld (%lld) returned %d",
-		(*bpp)->b_bcount, (long long)offset, (int)rv);
+		err(1, "%s: read %ld (%lld) returned %zd", __func__,
+		(*bpp)->b_bcount, (long long)offset, rv);
 	else if (rv != (*bpp)->b_bcount)	/* short read */
-		err(1, "bread: read %ld (%lld) returned %d",
-		(*bpp)->b_bcount, (long long)offset, (int)rv);
+		err(1, "%s: read %ld (%lld) returned %zd", __func__,
+		(*bpp)->b_bcount, (long long)offset, rv);
 	else
 		return (0);
 }

Index: src/usr.sbin/makef

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

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 02:01:19 UTC 2013

Added Files:
src/external/gpl3/gcc/lib/libgcc/arch: earmhf.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf: defs.mk
gcov-iov.h

Log Message:
earmhf mknative for libgcc


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libgcc/arch/earmhf.mk
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/defs.mk \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/gcov-iov.h

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

Added files:

Index: src/external/gpl3/gcc/lib/libgcc/arch/earmhf.mk
diff -u /dev/null src/external/gpl3/gcc/lib/libgcc/arch/earmhf.mk:1.1
--- /dev/null	Sun Feb  3 02:01:19 2013
+++ src/external/gpl3/gcc/lib/libgcc/arch/earmhf.mk	Sun Feb  3 02:01:19 2013
@@ -0,0 +1,24 @@
+# This file is automatically generated.  DO NOT EDIT!
+# Generated from: 	NetBSD: mknative-gcc,v 1.68 2012/09/25 06:55:10 skrll Exp 
+# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp 
+#
+G_INCLUDES=-I. -I. -I${GNUHOSTDIST}/gcc -I${GNUHOSTDIST}/gcc/. -I${GNUHOSTDIST}/gcc/../include -I${GNUHOSTDIST}/gcc/../libcpp/include -I/u1/netbsd-HEAD/tools/include -I/u1/netbsd-HEAD/tools/include -I/u1/netbsd-HEAD/tools/include  -I${GNUHOSTDIST}/gcc/../libdecnumber -I${GNUHOSTDIST}/gcc/../libdecnumber/dpd -I../libdecnumber   -I/usr/include/libelf
+G_LIB2ADD=${GNUHOSTDIST}/gcc/config/arm/bpabi-netbsd.c ${GNUHOSTDIST}/gcc/config/arm/unaligned-funcs.c
+G_LIB2ADDEH=${GNUHOSTDIST}/gcc/config/arm/unwind-arm.c ${GNUHOSTDIST}/gcc/config/arm/libunwind.S ${GNUHOSTDIST}/gcc/config/arm/pr-support.c ${GNUHOSTDIST}/gcc/unwind-c.c
+G_LIB2ADD_ST=
+G_LIB1ASMFUNCS=_thumb1_case_sqi _thumb1_case_uqi _thumb1_case_shi _thumb1_case_uhi _thumb1_case_si _aeabi_lcmp _aeabi_ulcmp _aeabi_ldivmod _aeabi_uldivmod
+G_LIB1ASMSRC=arm/lib1funcs.asm
+G_LIB2_DIVMOD_FUNCS=_divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
+G_LIB2FUNCS_ST=_eprintf __gcc_bcmp
+G_LIB2FUNCS_EXTRA=${GNUHOSTDIST}/gcc/config/arm/bpabi-netbsd.c ${GNUHOSTDIST}/gcc/config/arm/unaligned-funcs.c
+G_LIBGCC2_CFLAGS=-O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc
+G_SHLIB_MKMAP=${GNUHOSTDIST}/gcc/mkmap-symver.awk
+G_SHLIB_MKMAP_OPTS=
+G_SHLIB_MAPFILES=${GNUHOSTDIST}/gcc/libgcc-std.ver ${GNUHOSTDIST}/gcc/config/arm/libgcc-bpabi.ver
+G_SHLIB_NM_FLAGS=-pg
+G_EXTRA_HEADERS=${GNUHOSTDIST}/gcc/config/arm/mmintrin.h ${GNUHOSTDIST}/gcc/config/arm/arm_neon.h ${GNUHOSTDIST}/gcc/ginclude/tgmath.h
+G_xm_defines=
+G_tm_defines=NETBSD_ENABLE_PTHREADS TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD
+G_COLLECT2=collect2
+G_UNWIND_H=${GNUHOSTDIST}/gcc/config/arm/unwind-netbsd.h 
+G_xm_include_list=auto-host.h ansidecl.h

Index: src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/defs.mk
diff -u /dev/null src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/defs.mk:1.1
--- /dev/null	Sun Feb  3 02:01:19 2013
+++ src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/defs.mk	Sun Feb  3 02:01:19 2013
@@ -0,0 +1,5 @@
+# This file is automatically generated.  DO NOT EDIT!
+# Generated from: 	NetBSD: mknative-gcc,v 1.68 2012/09/25 06:55:10 skrll Exp 
+# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp 
+#
+G_LIBGCOV=_gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta _gcov_fork _gcov_execl _gcov_execlp _gcov_execle _gcov_execv _gcov_execvp _gcov_execve _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler _gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler _gcov_merge_ior
Index: src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/gcov-iov.h
diff -u /dev/null src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/gcov-iov.h:1.1
--- /dev/null	Sun Feb  3 02:01:19 2013
+++ src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/gcov-iov.h	Sun Feb  3 02:01:19 2013
@@ -0,0 +1,8 @@
+/* This file is automatically generated.  DO NOT EDIT! */
+/* Generated from: 	NetBSD: mknative-gcc,v 1.68 2012/09/25 06:55:10 skrll Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
+
+/* Generated automatically by the program `build/gcov-iov'
+   from `4.5.4 (4 5) and  (*)'.  */
+
+#define GCOV_VERSION ((gcov_unsigned_t)0x3430352a)  /* 405* */



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

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 01:59:55 UTC 2013

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

Log Message:
Use MACHINE_CPU for arm instead of MACHINE_ARCH


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

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

Modified files:

Index: src/external/gpl3/gcc/lib/libgcc/Makefile.inc
diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.17 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.18
--- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.17	Sun Dec 16 15:32:38 2012
+++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc	Sun Feb  3 01:59:55 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.17 2012/12/16 15:32:38 skrll Exp $
+#	$NetBSD: Makefile.inc,v 1.18 2013/02/03 01:59:55 matt Exp $
 
 .if ${MKGCC} != "no"
 .if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk)
@@ -158,7 +158,7 @@ DPSRCS+=	${FAKEHEADERS}
 CLEANFILES+=	${FAKEHEADERS}
 
 # XXX arm hack
-.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb"
+.if ${MACHINE_CPU} == "arm"
 ${SRCS}: insn-modes.h
 # XXX XXX
 ${__DPSRCS.d}: insn-modes.h



CVS commit: src/lib/libc/arch/arm

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 01:55:19 UTC 2013

Modified Files:
src/lib/libc/arch/arm: Makefile.inc

Log Message:
Add support for earmhf and earmhfeb and add SRCS.hardfloat.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/arch/arm/Makefile.inc

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

Modified files:

Index: src/lib/libc/arch/arm/Makefile.inc
diff -u src/lib/libc/arch/arm/Makefile.inc:1.19 src/lib/libc/arch/arm/Makefile.inc:1.20
--- src/lib/libc/arch/arm/Makefile.inc:1.19	Tue Jan 29 19:15:52 2013
+++ src/lib/libc/arch/arm/Makefile.inc	Sun Feb  3 01:55:19 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.19 2013/01/29 19:15:52 matt Exp $
+# $NetBSD: Makefile.inc,v 1.20 2013/02/03 01:55:19 matt Exp $
 
 .include 
 
@@ -6,7 +6,7 @@ SRCS+=	__aeabi_read_tp.S __sigaction14_s
 
 CPPFLAGS += -I.
 
-.if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb"
+.if ${MACHINE_ARCH:Mearm*} != ""
 SRCS+=	__aeabi_ldivmod.S __aeabi_uldivmod.S
 SRCS+=	__aeabi_lcmp.c __aeabi_ulcmp.c
 SRCS+=	fixunsgen_ieee754.c fixunssfsi_ieee754.c
@@ -23,4 +23,12 @@ SOFTFLOAT_BITS=32
 .endif
 
 .include 
+.else
+.PATH : ${ARCHDIR}/hardfloat
+SRCS.hardfloat+=	fpgetround.c fpgetsticky.S fpgetmask.S
+SRCS.hardfloat+=	fpsetround.c fpsetmask.S fpsetsticky.S
+.for f in ${SRCS.hardfloat}
+CPPFLAGS.${f} += -mfpu=vfp
+.endfor
+SRCS+=	${SRCS.hardfloat}
 .endif



CVS commit: src/lib/libc/arch/arm/hardfloat

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 01:50:54 UTC 2013

Modified Files:
src/lib/libc/arch/arm/hardfloat: fpsetround.c

Log Message:
include 


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/arm/hardfloat/fpsetround.c

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

Modified files:

Index: src/lib/libc/arch/arm/hardfloat/fpsetround.c
diff -u src/lib/libc/arch/arm/hardfloat/fpsetround.c:1.7 src/lib/libc/arch/arm/hardfloat/fpsetround.c:1.8
--- src/lib/libc/arch/arm/hardfloat/fpsetround.c:1.7	Fri Jan 11 13:55:26 2013
+++ src/lib/libc/arch/arm/hardfloat/fpsetround.c	Sun Feb  3 01:50:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpsetround.c,v 1.7 2013/01/11 13:55:26 matt Exp $	*/
+/*	$NetBSD: fpsetround.c,v 1.8 2013/02/03 01:50:54 matt Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpsetround.c,v 1.7 2013/01/11 13:55:26 matt Exp $");
+__RCSID("$NetBSD: fpsetround.c,v 1.8 2013/02/03 01:50:54 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -43,6 +43,8 @@ __RCSID("$NetBSD: fpsetround.c,v 1.7 201
 #include 
 #include 
 
+#include 
+
 #ifdef __weak_alias
 __weak_alias(fpsetround,_fpsetround)
 #endif



CVS commit: src/lib/libc/quad

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 01:48:53 UTC 2013

Modified Files:
src/lib/libc/quad: Makefile.inc fixdfdi.c fixsfdi.c fixunsdfdi.c
fixunssfdi.c floatdidf.c floatdisf.c floatundidf.c floatundisf.c

Log Message:
Adapt to earm hard float by including softfloat-for-gcc.h even if __ARM_EABI__
so we can get the __aeabi aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/quad/Makefile.inc
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/quad/fixdfdi.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/quad/fixsfdi.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/quad/fixunsdfdi.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/quad/fixunssfdi.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/quad/floatdidf.c \
src/lib/libc/quad/floatdisf.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/quad/floatundidf.c \
src/lib/libc/quad/floatundisf.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/quad/Makefile.inc
diff -u src/lib/libc/quad/Makefile.inc:1.14 src/lib/libc/quad/Makefile.inc:1.15
--- src/lib/libc/quad/Makefile.inc:1.14	Mon Aug  6 08:17:58 2012
+++ src/lib/libc/quad/Makefile.inc	Sun Feb  3 01:48:53 2013
@@ -1,17 +1,23 @@
-#	$NetBSD: Makefile.inc,v 1.14 2012/08/06 08:17:58 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.15 2013/02/03 01:48:53 matt Exp $
 #	@(#)Makefile.inc	8.1 (Berkeley) 6/4/93
 
 # Quad support
-SRCS.quad=	cmpdi2.c divdi3.c fixdfdi.c fixsfdi.c fixunsdfdi.c \
-	fixunssfdi.c floatdidf.c floatdisf.c floatundisf.c floatundidf.c \
-	moddi3.c muldi3.c negdi2.c qdivrem.c \
-	ucmpdi2.c udivdi3.c umoddi3.c 
+SRCS.quad=	cmpdi2.c ucmpdi2.c 
+SRCS.quad+=	divdi3.c moddi3.c 
+SRCS.quad+=	fixdfdi.c fixsfdi.c
+SRCS.quad+=	fixunsdfdi.c fixunssfdi.c
+SRCS.quad+=	floatdidf.c floatdisf.c
+SRCS.quad+=	floatundisf.c floatundidf.c
+SRCS.quad+=	muldi3.c
+SRCS.quad+=	negdi2.c
+SRCS.quad+=	qdivrem.c
+SRCS.quad+=	udivdi3.c umoddi3.c 
 
 .if   (${MACHINE_ARCH} == "m68k")
 SRCS.quad+=	ashldi3.S ashrdi3.S lshrdi3.S
 .elif (${MACHINE_ARCH} == "m68000")
 SRCS.quad+=	ashldi3.S lshrdi3.S
-.elif (${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb")
+.elif (${MACHINE_ARCH:Mearm*} != "")
 SRCS.quad+=	ashrdi3.c lshldi3.c lshrdi3.c
 .else
 SRCS.quad+=	ashldi3.c ashrdi3.c lshrdi3.c

Index: src/lib/libc/quad/fixdfdi.c
diff -u src/lib/libc/quad/fixdfdi.c:1.6 src/lib/libc/quad/fixdfdi.c:1.7
--- src/lib/libc/quad/fixdfdi.c:1.6	Sun Aug  5 04:28:58 2012
+++ src/lib/libc/quad/fixdfdi.c	Sun Feb  3 01:48:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixdfdi.c,v 1.6 2012/08/05 04:28:58 matt Exp $	*/
+/*	$NetBSD: fixdfdi.c,v 1.7 2013/02/03 01:48:53 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,11 +38,11 @@
 #if 0
 static char sccsid[] = "@(#)fixdfdi.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: fixdfdi.c,v 1.6 2012/08/05 04:28:58 matt Exp $");
+__RCSID("$NetBSD: fixdfdi.c,v 1.7 2013/02/03 01:48:53 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#ifdef SOFTFLOAT
+#if defined(SOFTFLOAT) || defined(__ARM_EABI__)
 #include "softfloat/softfloat-for-gcc.h"
 #endif
 

Index: src/lib/libc/quad/fixsfdi.c
diff -u src/lib/libc/quad/fixsfdi.c:1.5 src/lib/libc/quad/fixsfdi.c:1.6
--- src/lib/libc/quad/fixsfdi.c:1.5	Sun Aug  5 04:28:58 2012
+++ src/lib/libc/quad/fixsfdi.c	Sun Feb  3 01:48:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixsfdi.c,v 1.5 2012/08/05 04:28:58 matt Exp $	*/
+/*	$NetBSD: fixsfdi.c,v 1.6 2013/02/03 01:48:53 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992 The Regents of the University of California.
@@ -38,11 +38,11 @@
 #if 0
 static char sccsid[] = "@(#)fixsfdi.c	5.1 (Berkeley) 7/7/92";
 #else
-__RCSID("$NetBSD: fixsfdi.c,v 1.5 2012/08/05 04:28:58 matt Exp $");
+__RCSID("$NetBSD: fixsfdi.c,v 1.6 2013/02/03 01:48:53 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#ifdef SOFTFLOAT
+#if defined(SOFTFLOAT) || defined(__ARM_EABI__)
 #include "softfloat/softfloat-for-gcc.h"
 #endif
 

Index: src/lib/libc/quad/fixunsdfdi.c
diff -u src/lib/libc/quad/fixunsdfdi.c:1.10 src/lib/libc/quad/fixunsdfdi.c:1.11
--- src/lib/libc/quad/fixunsdfdi.c:1.10	Sun Aug  5 04:28:58 2012
+++ src/lib/libc/quad/fixunsdfdi.c	Sun Feb  3 01:48:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixunsdfdi.c,v 1.10 2012/08/05 04:28:58 matt Exp $	*/
+/*	$NetBSD: fixunsdfdi.c,v 1.11 2013/02/03 01:48:53 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,11 +38,11 @@
 #if 0
 static char sccsid[] = "@(#)fixunsdfdi.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: fixunsdfdi.c,v 1.10 2012/08/05 04:28:58 matt Exp $");
+__RCSID("$NetBSD: fixunsdfdi.c,v 1.11 2013/02/03 01:48:53 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#ifdef SOFTFLOAT
+#if defined(SOFTFLOAT) || defined(__ARM_EABI__)
 #include "softfloat/softfloat-for-gcc.h"
 #endif
 

Index: src/lib/libc/quad/fixunssfdi.c
diff -u src/lib/libc/quad/fixunssfdi.c:1.8 src/lib/libc/quad/fixunssfdi.c:1.9
--- src/lib/libc/quad/fixunssfdi.c:1.8	Sun Aug  5 04:28:58 20

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

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  3 00:43:15 UTC 2013

Modified Files:
src/sys/arch/arm/conf: Makefile.arm

Log Message:
Always compile the kernel with -mfloat=soft


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/conf/Makefile.arm

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/conf/Makefile.arm
diff -u src/sys/arch/arm/conf/Makefile.arm:1.35 src/sys/arch/arm/conf/Makefile.arm:1.36
--- src/sys/arch/arm/conf/Makefile.arm:1.35	Fri Oct  5 01:39:45 2012
+++ src/sys/arch/arm/conf/Makefile.arm	Sun Feb  3 00:43:14 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.arm,v 1.35 2012/10/05 01:39:45 matt Exp $
+#	$NetBSD: Makefile.arm,v 1.36 2013/02/03 00:43:14 matt Exp $
 
 # Makefile for NetBSD
 #
@@ -35,6 +35,7 @@ GENASSYM_CONF=	${ARM}/arm32/genassym.cf
 # CPPFLAGS set by platform-specific Makefile fragment.
 AFLAGS+=	-x assembler-with-cpp
 COPTS.arm32_kvminit.c+=		-fno-stack-protector
+CFLAGS+=	 -mfloat=soft
 
 ##
 ## (3) libkern and compat



CVS commit: src/share/man/man4/man4.sparc64

2013-02-02 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Feb  2 21:55:28 UTC 2013

Added Files:
src/share/man/man4/man4.sparc64: tda.4

Log Message:
Add a manual page for tda.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.sparc64/tda.4

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

Added files:

Index: src/share/man/man4/man4.sparc64/tda.4
diff -u /dev/null src/share/man/man4/man4.sparc64/tda.4:1.1
--- /dev/null	Sat Feb  2 21:55:28 2013
+++ src/share/man/man4/man4.sparc64/tda.4	Sat Feb  2 21:55:28 2013
@@ -0,0 +1,69 @@
+.\"	$NetBSD: tda.4,v 1.1 2013/02/02 21:55:28 jdc Exp $
+.\"
+.\" Copyright (c) 2013 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Julian Coleman
+.\"
+.\" 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.
+.\"
+.Dd February 2, 2013
+.Dt TDA 4 sparc64
+.Os
+.Sh NAME
+.Nm tda
+.Nd TDA8444 fan speed controller
+.Sh SYNOPSIS
+.Cd "tda0 at iic1 addr 0x24: fan-control"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the TDA8444 DAC used to control the fan speeds
+in Sun Blade 1000 and Blade 2000 systems.
+The speed of the CPU fan and of the system fan are automatically adjusted
+every 20 seconds, based on the currently reported CPU and system
+temperatures, respectively.
+.Pp
+The speed-related values are made available through the
+.Xr envstat 8
+interface.
+The range of the values are:
+.Bl -column -offset indent ".Sy System temperature" ".Sy Minimum" ".Sy Maximum"
+.It Sy  Ta Sy Minimum Sy Maximum
+.It Li CPU temperature Ta <=57 Ta >=67
+.It Li System temperature Ta <=20 Ta >=30
+.It Li Speed value Ta 12 Ta 63
+.El
+.Sh SEE ALSO
+.Xr admtemp 4 ,
+.Xr envstat 8
+.Sh BUGS
+The temperatures are reported as
+.Sq internal
+and
+.Sq external
+instead of
+.Sq system
+and
+.Sq CPU ,
+respectively.



CVS commit: src/sys/arch/sparc64/dev

2013-02-02 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Feb  2 21:54:51 UTC 2013

Modified Files:
src/sys/arch/sparc64/dev: tda.c

Log Message:
Add sysmon support to display the fan-speed related values for the CPU and
system fans.
Fix a bug where the system fan was always set to full speed (63), which was
noticed when viewing the values reported by `envstat`.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc64/dev/tda.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/sparc64/dev/tda.c
diff -u src/sys/arch/sparc64/dev/tda.c:1.6 src/sys/arch/sparc64/dev/tda.c:1.7
--- src/sys/arch/sparc64/dev/tda.c:1.6	Sat Oct 27 17:18:12 2012
+++ src/sys/arch/sparc64/dev/tda.c	Sat Feb  2 21:54:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tda.c,v 1.6 2012/10/27 17:18:12 chs Exp $	*/
+/*	$NetBSD: tda.c,v 1.7 2013/02/02 21:54:51 jdc Exp $	*/
 /*	$OpenBSD: tda.c,v 1.4 2008/02/27 17:25:00 robert Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tda.c,v 1.6 2012/10/27 17:18:12 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tda.c,v 1.7 2013/02/02 21:54:51 jdc Exp $");
 
 #include 
 #include 
@@ -44,10 +44,14 @@ __KERNEL_RCSID(0, "$NetBSD: tda.c,v 1.6 
 #define TDA_PSFAN_ON0x1f
 #define TDA_PSFAN_OFF   0x00
 
-/* Internal and External temperature senor numbers */
+/* Internal and External temperature sensor numbers */
 #define SENSOR_TEMP_EXT		0
 #define SENSOR_TEMP_INT		1
 
+/* Fan sensor numbers */
+#define SENSOR_FAN_CPU		0
+#define SENSOR_FAN_SYS		1
+
 #define CPU_TEMP_MAX		(67 * 100 + 27315)
 #define CPU_TEMP_MIN		(57 * 100 + 27315)
 #define SYS_TEMP_MAX		(30 * 100 + 27315)
@@ -61,11 +65,15 @@ struct tda_softc {
 	u_int16_t		sc_cfan_speed;	/* current CPU fan speed */
 	u_int16_t		sc_sfan_speed;	/* current SYS fan speed */
 
+	struct sysmon_envsys	*sc_sme;
+	envsys_data_t		sc_sensor[2];
+
 	callout_t		sc_timer;
 };
 
 int	tda_match(device_t, cfdata_t, void *);
 void	tda_attach(device_t, device_t, void *);
+void	tda_refresh(struct sysmon_envsys *, envsys_data_t *);
 
 void	tda_setspeed(struct tda_softc *);
 static void	tda_adjust(void *);
@@ -115,9 +123,45 @@ tda_attach(device_t parent, device_t sel
 	 */
 	sc->sc_cfan_speed = sc->sc_sfan_speed = (TDA_FANSPEED_MAX+TDA_FANSPEED_MIN)/2;
 	tda_setspeed(sc);
-
+	
 	callout_init(&sc->sc_timer, CALLOUT_MPSAFE);
 	callout_reset(&sc->sc_timer, hz*20, tda_timeout, sc);
+
+	/* Initialise sensor data */
+	sc->sc_sensor[SENSOR_FAN_CPU].state = ENVSYS_SINVALID;
+	sc->sc_sensor[SENSOR_FAN_CPU].units = ENVSYS_INTEGER;
+	sc->sc_sensor[SENSOR_FAN_CPU].flags = ENVSYS_FMONNOTSUPP;
+	strlcpy(sc->sc_sensor[SENSOR_FAN_CPU].desc,
+	"fan.cpu",sizeof("fan.cpu"));
+	sc->sc_sensor[SENSOR_FAN_SYS].state = ENVSYS_SINVALID;
+	sc->sc_sensor[SENSOR_FAN_SYS].units = ENVSYS_INTEGER;
+	sc->sc_sensor[SENSOR_FAN_SYS].flags = ENVSYS_FMONNOTSUPP;
+	strlcpy(sc->sc_sensor[SENSOR_FAN_SYS].desc,
+	"fan.sys",sizeof("fan.sys"));
+	sc->sc_sme = sysmon_envsys_create();
+	if (sysmon_envsys_sensor_attach(
+	sc->sc_sme, &sc->sc_sensor[SENSOR_FAN_CPU])) {
+		sysmon_envsys_destroy(sc->sc_sme);
+		aprint_error_dev(self,
+		"unable to attach cpu fan at sysmon\n");
+		return;
+	}
+	if (sysmon_envsys_sensor_attach(
+	sc->sc_sme, &sc->sc_sensor[SENSOR_FAN_SYS])) {
+		sysmon_envsys_destroy(sc->sc_sme);
+		aprint_error_dev(self,
+		"unable to attach sys fan at sysmon\n");
+		return;
+	}
+sc->sc_sme->sme_name = device_xname(self);
+sc->sc_sme->sme_cookie = sc;
+sc->sc_sme->sme_refresh = tda_refresh;
+	if (sysmon_envsys_register(sc->sc_sme)) {
+		aprint_error_dev(self,
+		"unable to register with sysmon\n");
+		sysmon_envsys_destroy(sc->sc_sme);
+		return;
+	}
 }
 
 static void
@@ -221,7 +265,7 @@ tda_adjust(void *v)
 	if (stemp < SYS_TEMP_MIN)
 		sspeed = TDA_FANSPEED_MIN;
 	else if (stemp < SYS_TEMP_MAX)
-		sc->sc_sfan_speed = TDA_FANSPEED_MIN +
+		sspeed = TDA_FANSPEED_MIN +
 			(stemp - SYS_TEMP_MIN) * 
 			(TDA_FANSPEED_MAX - TDA_FANSPEED_MIN) / 
 			(SYS_TEMP_MAX - SYS_TEMP_MIN);
@@ -233,3 +277,22 @@ tda_adjust(void *v)
 	sc->sc_cfan_speed = cspeed;
 	tda_setspeed(sc);
 }
+
+void
+tda_refresh(struct sysmon_envsys *sme, envsys_data_t *edata)
+{
+	struct tda_softc *sc = sme->sme_cookie;
+	u_int16_t speed;
+
+	if (edata->sensor == SENSOR_FAN_CPU)
+		speed = sc->sc_cfan_speed;
+	else
+		speed = sc->sc_sfan_speed;
+	if (!speed)
+		edata->state = ENVSYS_SINVALID;
+	else {
+		edata->value_cur = speed;
+		edata->state = ENVSYS_SVALID;
+	}
+}
+



CVS commit: src/sys/opencrypto

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  2 21:38:24 UTC 2013

Modified Files:
src/sys/opencrypto: cryptosoft.c

Log Message:
fix compilation


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/opencrypto/cryptosoft.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/opencrypto/cryptosoft.c
diff -u src/sys/opencrypto/cryptosoft.c:1.40 src/sys/opencrypto/cryptosoft.c:1.41
--- src/sys/opencrypto/cryptosoft.c:1.40	Thu Aug 30 08:16:49 2012
+++ src/sys/opencrypto/cryptosoft.c	Sat Feb  2 16:38:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptosoft.c,v 1.40 2012/08/30 12:16:49 drochner Exp $ */
+/*	$NetBSD: cryptosoft.c,v 1.41 2013/02/02 21:38:24 christos Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /*	$OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $	*/
 
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.40 2012/08/30 12:16:49 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.41 2013/02/02 21:38:24 christos Exp $");
 
 #include 
 #include 
@@ -32,6 +32,7 @@ __KERNEL_RCSID(0, "$NetBSD: cryptosoft.c
 #include 
 #include 
 #include 
+#include 
 
 #include "opt_ocf.h"
 #include 



CVS commit: src/sys/opencrypto

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  2 21:06:31 UTC 2013

Modified Files:
src/sys/opencrypto: cryptosoft_xform.c

Log Message:
fix compilation


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/opencrypto/cryptosoft_xform.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/opencrypto/cryptosoft_xform.c
diff -u src/sys/opencrypto/cryptosoft_xform.c:1.25 src/sys/opencrypto/cryptosoft_xform.c:1.26
--- src/sys/opencrypto/cryptosoft_xform.c:1.25	Mon Nov 28 03:05:06 2011
+++ src/sys/opencrypto/cryptosoft_xform.c	Sat Feb  2 16:06:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptosoft_xform.c,v 1.25 2011/11/28 08:05:06 tls Exp $ */
+/*	$NetBSD: cryptosoft_xform.c,v 1.26 2013/02/02 21:06:31 christos Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /*	$OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $	*/
 
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.25 2011/11/28 08:05:06 tls Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.26 2013/02/02 21:06:31 christos Exp $");
 
 #include 
 #include 
@@ -55,6 +55,7 @@ __KERNEL_RCSID(1, "$NetBSD: cryptosoft_x
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 



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

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  2 21:02:06 UTC 2013

Modified Files:
src/sys/arch/arm/omap: omapfb.c

Log Message:
fix compilation


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/omap/omapfb.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/omap/omapfb.c
diff -u src/sys/arch/arm/omap/omapfb.c:1.18 src/sys/arch/arm/omap/omapfb.c:1.19
--- src/sys/arch/arm/omap/omapfb.c:1.18	Thu Jan 31 21:53:47 2013
+++ src/sys/arch/arm/omap/omapfb.c	Sat Feb  2 16:02:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omapfb.c,v 1.18 2013/02/01 02:53:47 macallan Exp $	*/
+/*	$NetBSD: omapfb.c,v 1.19 2013/02/02 21:02:06 christos Exp $	*/
 
 /*
  * Copyright (c) 2010 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.18 2013/02/01 02:53:47 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.19 2013/02/02 21:02:06 christos Exp $");
 
 #include 
 #include 
@@ -557,7 +557,7 @@ omapfb_mmap(void *v, void *vs, off_t off
 	/* 'regular' framebuffer mmap()ing */
 	if (offset < sc->sc_vramsize) {
 		pa = bus_dmamem_mmap(sc->sc_dmat, sc->sc_dmamem, 1,
-		offset + 0x1000, prot, BUS_DMA_PREFETCHABLE);
+		offset + 0x1000, prot, BUS_DMA_COHERENT);
 		return pa;
 	}
 	return pa;



CVS commit: src/usr.sbin/makefs

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

Modified Files:
src/usr.sbin/makefs: makefs.8 makefs.c makefs.h
src/usr.sbin/makefs/ffs: buf.c

Log Message:
add and document offset.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/makefs/makefs.8
cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/makefs/makefs.c
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/makefs/makefs.h
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/makefs/ffs/buf.c

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

Modified files:

Index: src/usr.sbin/makefs/makefs.8
diff -u src/usr.sbin/makefs/makefs.8:1.43 src/usr.sbin/makefs/makefs.8:1.44
--- src/usr.sbin/makefs/makefs.8:1.43	Mon Jan 28 20:52:04 2013
+++ src/usr.sbin/makefs/makefs.8	Sat Feb  2 15:42:02 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: makefs.8,v 1.43 2013/01/29 01:52:04 christos Exp $
+.\"	$NetBSD: makefs.8,v 1.44 2013/02/02 20:42:02 christos Exp $
 .\"
 .\" Copyright (c) 2001-2003 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 27, 2013
+.Dd February 2, 2013
 .Dt MAKEFS 8
 .Os
 .Sh NAME
@@ -50,6 +50,7 @@
 .Op Fl M Ar minimum-size
 .Op Fl m Ar maximum-size
 .Op Fl N Ar userdb-dir
+.Op Fl O Ar offset
 .Op Fl o Ar fs-options
 .Op Fl S Ar sector-size
 .Op Fl s Ar image-size
@@ -176,6 +177,13 @@ rather than using the results from the s
 and
 .Xr getgrnam 3
 (and related) library calls.
+.It Fl O Ar offset
+Instead of creating the filesystem at the beginning of the file, start
+at offset.
+Valid only for
+.Sy ffs
+and
+.Sy msdos .
 .It Fl o Ar fs-options
 Set file system specific options.
 .Ar fs-options

Index: src/usr.sbin/makefs/makefs.c
diff -u src/usr.sbin/makefs/makefs.c:1.47 src/usr.sbin/makefs/makefs.c:1.48
--- src/usr.sbin/makefs/makefs.c:1.47	Fri Feb  1 09:02:17 2013
+++ src/usr.sbin/makefs/makefs.c	Sat Feb  2 15:42:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: makefs.c,v 1.47 2013/02/01 14:02:17 christos Exp $	*/
+/*	$NetBSD: makefs.c,v 1.48 2013/02/02 20:42:02 christos Exp $	*/
 
 /*
  * Copyright (c) 2001-2003 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: makefs.c,v 1.47 2013/02/01 14:02:17 christos Exp $");
+__RCSID("$NetBSD: makefs.c,v 1.48 2013/02/02 20:42:02 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -121,7 +121,7 @@ main(int argc, char *argv[])
 	start_time.tv_sec = start.tv_sec;
 	start_time.tv_nsec = start.tv_usec * 1000;
 
-	while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:o:s:S:t:xZ")) != -1) {
+	while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:O:o:s:S:t:xZ")) != -1) {
 		switch (ch) {
 
 		case 'B':
@@ -195,6 +195,11 @@ main(int argc, char *argv[])
 			fsoptions.maxsize =
 			strsuftoll("maximum size", optarg, 1LL, LLONG_MAX);
 			break;
+
+		case 'O':
+			fsoptions.offset = 
+			strsuftoll("offset", optarg, 0LL, LLONG_MAX);
+			break;
 			
 		case 'o':
 		{
@@ -407,8 +412,8 @@ usage(fstype_t *fstype, fsinfo_t *fsopti
 	prog = getprogname();
 	fprintf(stderr,
 "Usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n"
-"\t[-F mtree-specfile] [-f free-files] [-M minimum-size]\n"
-"\t[-m maximum-size] [-N userdb-dir] [-o fs-options] [-S sector-size]\n"
+"\t[-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]\n"
+"\t[-N userdb-dir] [-O offset] [-o fs-options] [-S sector-size]\n"
 "\t[-s image-size] [-t fs-type] image-file directory [extra-directory ...]\n",
 	prog);
 

Index: src/usr.sbin/makefs/makefs.h
diff -u src/usr.sbin/makefs/makefs.h:1.32 src/usr.sbin/makefs/makefs.h:1.33
--- src/usr.sbin/makefs/makefs.h:1.32	Wed Jan 30 14:19:19 2013
+++ src/usr.sbin/makefs/makefs.h	Sat Feb  2 15:42:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: makefs.h,v 1.32 2013/01/30 19:19:19 christos Exp $	*/
+/*	$NetBSD: makefs.h,v 1.33 2013/02/02 20:42:02 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -157,8 +157,9 @@ typedef struct makefs_fsinfo {
 	off_t	minsize;	/* minimum size image should be */
 	off_t	maxsize;	/* maximum size image can be */
 	off_t	freefiles;	/* free file entries to leave */
-	int	freefilepc;	/* free file % */
 	off_t	freeblocks;	/* free blocks to leave */
+	off_t	offset;		/* offset from start of file */
+	int	freefilepc;	/* free file % */
 	int	freeblockpc;	/* free block % */
 	int	needswap;	/* non-zero if byte swapping needed */
 	int	sectorsize;	/* sector size */

Index: src/usr.sbin/makefs/ffs/buf.c
diff -u src/usr.sbin/makefs/ffs/buf.c:1.19 src/usr.sbin/makefs/ffs/buf.c:1.20
--- src/usr.sbin/makefs/ffs/buf.c:1.19	Wed Jan 30 14:19:19 2013
+++ src/usr.sbin/makefs/ffs/buf.c	Sat Feb  2 15:42:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf.c,v 1.19 2013/01/30 19:19:19 christos Exp $	*/
+/*	$NetBSD: buf.c,v 1.20 2013/02/02 20:42:02 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Was

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

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  2 20:06:48 UTC 2013

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

Log Message:
static inline so that the kernel links.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/gumstix/gxpcic.c

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

Modified files:

Index: src/sys/arch/evbarm/gumstix/gxpcic.c
diff -u src/sys/arch/evbarm/gumstix/gxpcic.c:1.12 src/sys/arch/evbarm/gumstix/gxpcic.c:1.13
--- src/sys/arch/evbarm/gumstix/gxpcic.c:1.12	Fri Jul  1 16:39:34 2011
+++ src/sys/arch/evbarm/gumstix/gxpcic.c	Sat Feb  2 15:06:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: gxpcic.c,v 1.12 2011/07/01 20:39:34 dyoung Exp $ */
+/*	$NetBSD: gxpcic.c,v 1.13 2013/02/02 20:06:48 christos Exp $ */
 /*
  * Copyright (C) 2005, 2006 WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -106,8 +106,8 @@ static	void	gxpcic_clear_intr(struct pxa
 static	void	*gxpcic_intr_establish(struct pxapcic_socket *, int,
    int (*)(void *), void *);
 static	void	gxpcic_intr_disestablish(struct pxapcic_socket *, void *);
-__inline void gxpcic_cpld_clk(void);
-__inline u_char gxpcic_cpld_read_bits(int bits);
+static __inline void gxpcic_cpld_clk(void);
+static __inline u_char gxpcic_cpld_read_bits(int bits);
 static	int	gxpcic_count_slot(struct pxapcic_softc *);
 
 CFATTACH_DECL_NEW(gxpcic, sizeof(struct pxapcic_softc),
@@ -276,7 +276,7 @@ gxpcic_intr_disestablish(struct pxapcic_
 /*
  * X: slot count functions from Linux
  */
-__inline void
+static __inline void
 gxpcic_cpld_clk(void)
 {
 
@@ -284,7 +284,7 @@ gxpcic_cpld_clk(void)
 	pxa2x0_gpio_set_function(48, GPIO_OUT | GPIO_SET);
 }
 
-__inline u_char
+static inline u_char
 gxpcic_cpld_read_bits(int bits)
 {
 	u_int shift = 0, gpio;



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

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  2 18:19:38 UTC 2013

Modified Files:
src/distrib/sets/lists/debug: ad.arm ad.armeb

Log Message:
someone forgot the debuglibs


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/debug/ad.arm \
src/distrib/sets/lists/debug/ad.armeb

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

Modified files:

Index: src/distrib/sets/lists/debug/ad.arm
diff -u src/distrib/sets/lists/debug/ad.arm:1.2 src/distrib/sets/lists/debug/ad.arm:1.3
--- src/distrib/sets/lists/debug/ad.arm:1.2	Mon Jan 28 13:57:11 2013
+++ src/distrib/sets/lists/debug/ad.arm	Sat Feb  2 13:19:38 2013
@@ -1,8 +1,9 @@
-# $NetBSD: ad.arm,v 1.2 2013/01/28 18:57:11 matt Exp $
+# $NetBSD: ad.arm,v 1.3 2013/02/02 18:19:38 christos Exp $
 ./usr/libdata/debug/sbin/ldconfig.debug		comp-sysutil-debug	debug,pic
 ./usr/libdata/debug/usr/bin/fdformat.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/lib/libarm.so.0.0.debug	comp-sys-debug		debug,pic
 ./usr/libdata/debug/usr/lib/libc_vfp.so.0.0.debug	comp-sys-debug		debug,pic
 ./usr/libdata/debug/usr/lib/libpmc.so.1.0.debug	comp-sys-debug		debug,pic
 ./usr/lib/libarm_g.a-unknown-		debuglib
+./usr/lib/libc_vfp_g.a-unknown-		debuglib
 ./usr/lib/libpmc_g.a-unknown-		debuglib
Index: src/distrib/sets/lists/debug/ad.armeb
diff -u src/distrib/sets/lists/debug/ad.armeb:1.2 src/distrib/sets/lists/debug/ad.armeb:1.3
--- src/distrib/sets/lists/debug/ad.armeb:1.2	Mon Jan 28 13:57:11 2013
+++ src/distrib/sets/lists/debug/ad.armeb	Sat Feb  2 13:19:38 2013
@@ -1,7 +1,8 @@
-# $NetBSD: ad.armeb,v 1.2 2013/01/28 18:57:11 matt Exp $
+# $NetBSD: ad.armeb,v 1.3 2013/02/02 18:19:38 christos Exp $
 ./usr/libdata/debug/usr/bin/fdformat.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/lib/libarm.so.0.0.debug	comp-sys-debug		debug,pic
 ./usr/libdata/debug/usr/lib/libc_vfp.so.0.0.debug	comp-sys-debug		debug,pic
 ./usr/libdata/debug/usr/lib/libpmc.so.1.0.debug	comp-sys-debug		debug,pic
 ./usr/lib/libarm_g.a-unknown-		debuglib
+./usr/lib/libc_vfp_g.a-unknown-		debuglib
 ./usr/lib/libpmc_g.a-unknown-		debuglib



CVS commit: src/sys/sys

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  2 17:58:12 UTC 2013

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

Log Message:
Use const void *


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/sys/cdefs_elf.h

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

Modified files:

Index: src/sys/sys/cdefs_elf.h
diff -u src/sys/sys/cdefs_elf.h:1.41 src/sys/sys/cdefs_elf.h:1.42
--- src/sys/sys/cdefs_elf.h:1.41	Sat Feb  2 14:03:38 2013
+++ src/sys/sys/cdefs_elf.h	Sat Feb  2 17:58:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs_elf.h,v 1.41 2013/02/02 14:03:38 matt Exp $	*/
+/*	$NetBSD: cdefs_elf.h,v 1.42 2013/02/02 17:58:11 matt Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -132,10 +132,10 @@
 #ifndef __lint__
 #define	__link_set_make_entry(set, sym)	\
 	static void const * const __link_set_##set##_sym_##sym		\
-	__section("link_set_" #set) __used = (void *)&sym
+	__section("link_set_" #set) __used = (const void *)&sym
 #define	__link_set_make_entry2(set, sym, n)\
 	static void const * const __link_set_##set##_sym_##sym##_##n	\
-	__section("link_set_" #set) __used = (void *)&sym[n]
+	__section("link_set_" #set) __used = (const void *)&sym[n]
 #else
 #define	__link_set_make_entry(set, sym)	\
 	extern void const * const __link_set_##set##_sym_##sym



CVS commit: [netbsd-6] src/doc

2013-02-02 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Sat Feb  2 15:44:21 UTC 2013

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

Log Message:
Ticket 773


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.76 -r1.1.2.77 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.76 src/doc/CHANGES-6.1:1.1.2.77
--- src/doc/CHANGES-6.1:1.1.2.76	Sat Jan 26 21:36:05 2013
+++ src/doc/CHANGES-6.1	Sat Feb  2 15:44:21 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.76 2013/01/26 21:36:05 bouyer Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.77 2013/02/02 15:44:21 sborrill Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8055,3 +8055,10 @@ sys/kern/subr_cprng.c1.15
 	reseed with as little as sizeof(int) bytes of entropy.
 	[tls, ticket #800]
 
+bin/sh/expand.c	1.88
+bin/sh/expand.h	1.19
+
+	Fix the expansion of "$(foo-$bar}" so that IFS isn't applied when
+	expanding $bar. Should fix PR bin/47361
+	[dsl, ticket #773]
+



CVS commit: [netbsd-6] src/bin/sh

2013-02-02 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Sat Feb  2 15:43:27 UTC 2013

Modified Files:
src/bin/sh [netbsd-6]: expand.c expand.h

Log Message:
Pull up the following revisions(s) (requested by dsl in ticket #773):
bin/sh/expand.c:revision 1.88
bin/sh/expand.h:revision 1.19

Fix the expansion of "$(foo-$bar}" so that IFS isn't applied when
expanding $bar. Should fix PR bin/47361


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.86.4.1 src/bin/sh/expand.c
cvs rdiff -u -r1.18 -r1.18.4.1 src/bin/sh/expand.h

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

Modified files:

Index: src/bin/sh/expand.c
diff -u src/bin/sh/expand.c:1.86 src/bin/sh/expand.c:1.86.4.1
--- src/bin/sh/expand.c:1.86	Wed Aug 31 16:24:54 2011
+++ src/bin/sh/expand.c	Sat Feb  2 15:43:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.86 2011/08/31 16:24:54 plunky Exp $	*/
+/*	$NetBSD: expand.c,v 1.86.4.1 2013/02/02 15:43:27 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)expand.c	8.5 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: expand.c,v 1.86 2011/08/31 16:24:54 plunky Exp $");
+__RCSID("$NetBSD: expand.c,v 1.86.4.1 2013/02/02 15:43:27 sborrill Exp $");
 #endif
 #endif /* not lint */
 
@@ -247,7 +247,7 @@ argstr(char *p, int flag)
 			break;
 		default:
 			STPUTC(c, expdest);
-			if (flag & EXP_IFS_SPLIT & ifs_split && strchr(ifs, c) != NULL) {
+			if (flag & ifs_split && strchr(ifs, c) != NULL) {
 /* We need to get the output split here... */
 recordregion(expdest - stackblock() - 1,
 		expdest - stackblock(), 0);
@@ -702,8 +702,21 @@ again: /* jump here after setting a vari
 	}
 
 
-	apply_ifs = ((varflags & VSQUOTE) == 0 ||
-		(*var == '@' && shellparam.nparam != 1));
+	if (flag & EXP_IN_QUOTES)
+		apply_ifs = 0;
+	else if (varflags & VSQUOTE) {
+		if  (*var == '@' && shellparam.nparam != 1)
+		apply_ifs = 1;
+		else {
+		/*
+		 * Mark so that we don't apply IFS if we recurse through
+		 * here expanding $bar from "${foo-$bar}".
+		 */
+		flag |= EXP_IN_QUOTES;
+		apply_ifs = 0;
+		}
+	} else
+		apply_ifs = 1;
 
 	switch (subtype) {
 	case VSLENGTH:

Index: src/bin/sh/expand.h
diff -u src/bin/sh/expand.h:1.18 src/bin/sh/expand.h:1.18.4.1
--- src/bin/sh/expand.h:1.18	Sat Jun 18 21:18:46 2011
+++ src/bin/sh/expand.h	Sat Feb  2 15:43:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.h,v 1.18 2011/06/18 21:18:46 christos Exp $	*/
+/*	$NetBSD: expand.h,v 1.18.4.1 2013/02/02 15:43:27 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -56,6 +56,7 @@ struct arglist {
 #define	EXP_REDIR	0x8	/* file glob for a redirection (1 match only) */
 #define EXP_CASE	0x10	/* keeps quotes around for CASE pattern */
 #define EXP_IFS_SPLIT	0x20	/* need to record arguments for ifs breakup */
+#define EXP_IN_QUOTES	0x40	/* don't set EXP_IFS_SPLIT again */
 
 
 union node;



CVS commit: src/usr.bin/make

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  2 15:24:09 UTC 2013

Modified Files:
src/usr.bin/make: job.c

Log Message:
tools build is non-c-99


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.167 src/usr.bin/make/job.c:1.168
--- src/usr.bin/make/job.c:1.167	Sat Feb  2 10:12:25 2013
+++ src/usr.bin/make/job.c	Sat Feb  2 10:24:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.167 2013/02/02 15:12:25 christos Exp $	*/
+/*	$NetBSD: job.c,v 1.168 2013/02/02 15:24:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.167 2013/02/02 15:12:25 christos Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.168 2013/02/02 15:24:08 christos Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.167 2013/02/02 15:12:25 christos Exp $");
+__RCSID("$NetBSD: job.c,v 1.168 2013/02/02 15:24:08 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2040,7 +2040,7 @@ Job_CatchOutput(void)
 {
 int nready;
 Job *job;
-int i;
+int i, n;
 
 (void)fflush(stdout);
 
@@ -2050,7 +2050,7 @@ Job_CatchOutput(void)
 if (nready < 0 || readyfd(&childExitJob)) {
 	char token = 0;
 	nready -= 1;
-	for (size_t n = 0; n < 5 &&
+	for (n = 0; n < 5 &&
 	read(childExitJob.inPipe, &token, 1) == -1 && errno == EAGAIN; n++)
 		continue;
 	if (token == DO_JOB_RESUME[0])



CVS commit: src/usr.bin/make

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  2 15:12:25 UTC 2013

Modified Files:
src/usr.bin/make: job.c

Log Message:
avoid the long shadow of i


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.166 src/usr.bin/make/job.c:1.167
--- src/usr.bin/make/job.c:1.166	Sat Feb  2 10:11:48 2013
+++ src/usr.bin/make/job.c	Sat Feb  2 10:12:25 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.166 2013/02/02 15:11:48 christos Exp $	*/
+/*	$NetBSD: job.c,v 1.167 2013/02/02 15:12:25 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.166 2013/02/02 15:11:48 christos Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.167 2013/02/02 15:12:25 christos Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.166 2013/02/02 15:11:48 christos Exp $");
+__RCSID("$NetBSD: job.c,v 1.167 2013/02/02 15:12:25 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2050,8 +2050,8 @@ Job_CatchOutput(void)
 if (nready < 0 || readyfd(&childExitJob)) {
 	char token = 0;
 	nready -= 1;
-	for (size_t i = 0; i < 5 &&
-	read(childExitJob.inPipe, &token, 1) == -1 && errno == EAGAIN; i++)
+	for (size_t n = 0; n < 5 &&
+	read(childExitJob.inPipe, &token, 1) == -1 && errno == EAGAIN; n++)
 		continue;
 	if (token == DO_JOB_RESUME[0])
 	/* Complete relay requested from our SIGCONT handler */



CVS commit: src/usr.bin/make

2013-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  2 15:11:49 UTC 2013

Modified Files:
src/usr.bin/make: job.c

Log Message:
Don't wait forever for output from a child job.


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.165 src/usr.bin/make/job.c:1.166
--- src/usr.bin/make/job.c:1.165	Sat Jan 26 10:52:59 2013
+++ src/usr.bin/make/job.c	Sat Feb  2 10:11:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $	*/
+/*	$NetBSD: job.c,v 1.166 2013/02/02 15:11:48 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.166 2013/02/02 15:11:48 christos Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $");
+__RCSID("$NetBSD: job.c,v 1.166 2013/02/02 15:11:48 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2050,7 +2050,8 @@ Job_CatchOutput(void)
 if (nready < 0 || readyfd(&childExitJob)) {
 	char token = 0;
 	nready -= 1;
-	while (read(childExitJob.inPipe, &token, 1) == -1 && errno == EAGAIN)
+	for (size_t i = 0; i < 5 &&
+	read(childExitJob.inPipe, &token, 1) == -1 && errno == EAGAIN; i++)
 		continue;
 	if (token == DO_JOB_RESUME[0])
 	/* Complete relay requested from our SIGCONT handler */



CVS commit: src/sys/dev/usb

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  2 14:15:56 UTC 2013

Modified Files:
src/sys/dev/usb: ehcivar.h

Log Message:
Use CACHE_LINE_SIZE for EHCI_SQTD_ALIGN to make sure the sqtd fully consume
a cacheline.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/ehcivar.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/ehcivar.h
diff -u src/sys/dev/usb/ehcivar.h:1.41 src/sys/dev/usb/ehcivar.h:1.42
--- src/sys/dev/usb/ehcivar.h:1.41	Tue Jan 29 00:00:15 2013
+++ src/sys/dev/usb/ehcivar.h	Sat Feb  2 14:15:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehcivar.h,v 1.41 2013/01/29 00:00:15 christos Exp $ */
+/*	$NetBSD: ehcivar.h,v 1.42 2013/02/02 14:15:55 matt Exp $ */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -44,7 +44,8 @@ typedef struct ehci_soft_qtd {
 	LIST_ENTRY(ehci_soft_qtd) hnext;
 	u_int16_t len;
 } ehci_soft_qtd_t;
-#define EHCI_SQTD_SIZE ((sizeof (struct ehci_soft_qtd) + EHCI_QTD_ALIGN - 1) / EHCI_QTD_ALIGN * EHCI_QTD_ALIGN)
+#define EHCI_SQTD_ALIGN	MAX(EHCI_QTD_ALIGN, CACHE_LINE_SIZE)
+#define EHCI_SQTD_SIZE ((sizeof (struct ehci_soft_qtd) + EHCI_SQTD_ALIGN - 1) & -EHCI_SQTD_ALIGN)
 #define EHCI_SQTD_CHUNK (EHCI_PAGE_SIZE / EHCI_SQTD_SIZE)
 
 typedef struct ehci_soft_qh {



CVS commit: src/sys/dev/ic

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  2 14:11:38 UTC 2013

Modified Files:
src/sys/dev/ic: ahcisata_core.c

Log Message:
Use __SHIFTOUT to simplify an expression.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/ahcisata_core.c

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

Modified files:

Index: src/sys/dev/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.45 src/sys/dev/ic/ahcisata_core.c:1.46
--- src/sys/dev/ic/ahcisata_core.c:1.45	Fri Oct 26 09:59:11 2012
+++ src/sys/dev/ic/ahcisata_core.c	Sat Feb  2 14:11:37 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_core.c,v 1.45 2012/10/26 09:59:11 bouyer Exp $	*/
+/*	$NetBSD: ahcisata_core.c,v 1.46 2013/02/02 14:11:37 matt Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.45 2012/10/26 09:59:11 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.46 2013/02/02 14:11:37 matt Exp $");
 
 #include 
 #include 
@@ -716,10 +716,9 @@ again:
 	 * This should not be needed, but some controllers clear the
 	 * command slot before receiving the D2H FIS ...
 	 */
-	for (i = 0; i ch_channel));
-		if sig & AHCI_P_TFD_ST) >> AHCI_P_TFD_ST_SHIFT)
-		& WDCS_BSY) == 0)
+		if ((__SHIFTOUT(sig, AHCI_P_TFD_ST) & WDCS_BSY) == 0)
 			break;
 		if (flags & AT_WAIT)
 			tsleep(&sc, PRIBIO, "ahcid2h", mstohz(10));



CVS commit: src/sys/uvm

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  2 14:06:58 UTC 2013

Modified Files:
src/sys/uvm: uvm_pmap.h

Log Message:
Remove __BEGIN_DECLS/__END_DECLS
Allow pmap_kenter_pa to be a macro.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/uvm/uvm_pmap.h

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

Modified files:

Index: src/sys/uvm/uvm_pmap.h
diff -u src/sys/uvm/uvm_pmap.h:1.37 src/sys/uvm/uvm_pmap.h:1.38
--- src/sys/uvm/uvm_pmap.h:1.37	Thu Jun 30 00:49:14 2011
+++ src/sys/uvm/uvm_pmap.h	Sat Feb  2 14:06:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pmap.h,v 1.37 2011/06/30 00:49:14 matt Exp $	*/
+/*	$NetBSD: uvm_pmap.h,v 1.38 2013/02/02 14:06:58 matt Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -137,7 +137,6 @@ extern struct pmap	*const kernel_pmap_pt
 
 #ifndef PMAP_EXCLUDE_DECLS	/* Used in Sparc port to virtualize pmap mod */
 #ifdef _KERNEL
-__BEGIN_DECLS
 void		pmap_activate(struct lwp *);
 void		pmap_deactivate(struct lwp *);
 void		pmap_unwire(pmap_t, vaddr_t);
@@ -165,7 +164,9 @@ vaddr_t		pmap_growkernel(vaddr_t);
 
 void		pmap_init(void);
 
+#if !defined(pmap_kenter_pa)
 void		pmap_kenter_pa(vaddr_t, paddr_t, vm_prot_t, u_int);
+#endif
 void		pmap_kremove(vaddr_t, vsize_t);
 #if !defined(pmap_is_modified)
 bool		pmap_is_modified(struct vm_page *);
@@ -211,7 +212,6 @@ vaddr_t		pmap_steal_memory(vsize_t, vadd
 #if defined(PMAP_FORK)
 void		pmap_fork(pmap_t, pmap_t);
 #endif
-__END_DECLS
 #endif	/* kernel*/
 #endif  /* PMAP_EXCLUDE_DECLS */
 



CVS commit: src/sys/sys

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  2 14:03:38 UTC 2013

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

Log Message:
Add an explicit (void *) cast to __link_set_make_entry*
(these probably should have ptype added to them).


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/sys/cdefs_elf.h

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

Modified files:

Index: src/sys/sys/cdefs_elf.h
diff -u src/sys/sys/cdefs_elf.h:1.40 src/sys/sys/cdefs_elf.h:1.41
--- src/sys/sys/cdefs_elf.h:1.40	Sun Mar  4 16:14:48 2012
+++ src/sys/sys/cdefs_elf.h	Sat Feb  2 14:03:38 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs_elf.h,v 1.40 2012/03/04 16:14:48 tron Exp $	*/
+/*	$NetBSD: cdefs_elf.h,v 1.41 2013/02/02 14:03:38 matt Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -132,10 +132,10 @@
 #ifndef __lint__
 #define	__link_set_make_entry(set, sym)	\
 	static void const * const __link_set_##set##_sym_##sym		\
-	__section("link_set_" #set) __used = &sym
+	__section("link_set_" #set) __used = (void *)&sym
 #define	__link_set_make_entry2(set, sym, n)\
 	static void const * const __link_set_##set##_sym_##sym##_##n	\
-	__section("link_set_" #set) __used = &sym[n]
+	__section("link_set_" #set) __used = (void *)&sym[n]
 #else
 #define	__link_set_make_entry(set, sym)	\
 	extern void const * const __link_set_##set##_sym_##sym



CVS commit: src/sys

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  2 14:02:09 UTC 2013

Modified Files:
src/sys/kern: init_sysctl.c kern_sysctl.c
src/sys/sys: sysctl.h

Log Message:
Make the inclusion of  a private matter for sysctl.  No reason
to expose the rest of the kernel to it.


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/kern/init_sysctl.c
cvs rdiff -u -r1.238 -r1.239 src/sys/kern/kern_sysctl.c
cvs rdiff -u -r1.206 -r1.207 src/sys/sys/sysctl.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/kern/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.193 src/sys/kern/init_sysctl.c:1.194
--- src/sys/kern/init_sysctl.c:1.193	Sat Oct 27 17:18:39 2012
+++ src/sys/kern/init_sysctl.c	Sat Feb  2 14:02:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl.c,v 1.193 2012/10/27 17:18:39 chs Exp $ */
+/*	$NetBSD: init_sysctl.c,v 1.194 2013/02/02 14:02:09 matt Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,13 +30,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.193 2012/10/27 17:18:39 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.194 2013/02/02 14:02:09 matt Exp $");
 
 #include "opt_sysv.h"
 #include "opt_compat_netbsd.h"
 #include "opt_modular.h"
 #include "pty.h"
 
+#define SYSCTL_PRIVATE
+
 #include 
 #include 
 #include 

Index: src/sys/kern/kern_sysctl.c
diff -u src/sys/kern/kern_sysctl.c:1.238 src/sys/kern/kern_sysctl.c:1.239
--- src/sys/kern/kern_sysctl.c:1.238	Tue Jan 29 23:00:31 2013
+++ src/sys/kern/kern_sysctl.c	Sat Feb  2 14:02:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sysctl.c,v 1.238 2013/01/29 23:00:31 para Exp $	*/
+/*	$NetBSD: kern_sysctl.c,v 1.239 2013/02/02 14:02:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,11 +68,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.238 2013/01/29 23:00:31 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.239 2013/02/02 14:02:09 matt Exp $");
 
 #include "opt_defcorename.h"
 #include "ksyms.h"
 
+#define SYSCTL_PRIVATE
+
 #include 
 #define __COMPAT_SYSCTL
 #include 

Index: src/sys/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.206 src/sys/sys/sysctl.h:1.207
--- src/sys/sys/sysctl.h:1.206	Thu Jan  3 13:19:32 2013
+++ src/sys/sys/sysctl.h	Sat Feb  2 14:02:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.206 2013/01/03 13:19:32 dsl Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.207 2013/02/02 14:02:09 matt Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -61,7 +61,7 @@
 #include 
 #endif
 
-#ifdef _KERNEL
+#ifdef SYSCTL_PRIVATE
 #include 
 #endif
 
@@ -1251,7 +1251,9 @@ MALLOC_DECLARE(M_SYSCTLDATA);
 
 extern const u_int sysctl_lwpflagmap[];
 
+#ifdef SYSCTL_PRIVATE
 extern cprng_strong_t *sysctl_prng;
+#endif
 
 #else	/* !_KERNEL */
 #include 



CVS commit: src/sys/sys

2013-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  2 14:00:37 UTC 2013

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

Log Message:
Don't define bool/true/false in the kernel if __cplusplus is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/sys/types.h

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

Modified files:

Index: src/sys/sys/types.h
diff -u src/sys/sys/types.h:1.89 src/sys/sys/types.h:1.90
--- src/sys/sys/types.h:1.89	Sat Mar 17 21:30:29 2012
+++ src/sys/sys/types.h	Sat Feb  2 14:00:37 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.89 2012/03/17 21:30:29 christos Exp $	*/
+/*	$NetBSD: types.h,v 1.90 2013/02/02 14:00:37 matt Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1991, 1993, 1994
@@ -204,9 +204,11 @@ typedef	int		psetid_t;
  * Boolean type definitions for the kernel environment.  User-space
  * boolean definitions are found in .
  */
+#ifndef __cplusplus
 #define bool	_Bool
 #define true	1
 #define false	0
+#endif
 
 /*
  * Deprecated Mach-style boolean_t type.  Should not be used by new code.