CVS commit: src/external/apache2/mDNSResponder/nss

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 08:02:36 UTC 2009

Modified Files:
src/external/apache2/mDNSResponder/nss: Makefile

Log Message:
remove an unused reference to LD32DIR.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/mDNSResponder/nss/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/apache2/mDNSResponder/nss/Makefile
diff -u src/external/apache2/mDNSResponder/nss/Makefile:1.2 src/external/apache2/mDNSResponder/nss/Makefile:1.3
--- src/external/apache2/mDNSResponder/nss/Makefile:1.2	Sun Oct 25 00:17:06 2009
+++ src/external/apache2/mDNSResponder/nss/Makefile	Sun Dec 13 08:02:36 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2009/10/25 00:17:06 tsarna Exp $
+#	$NetBSD: Makefile,v 1.3 2009/12/13 08:02:36 mrg Exp $
 
 LIB=		nss_mdnsd
 SHLIB_MAJOR=	0
@@ -30,9 +30,3 @@
 	${_MKTARGET_INSTALL}
 	${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	${.ALLSRC} ${.TARGET}
-
-#.if defined(LD32DIR)
-#LIBDIR=/usr/lib/${LD32DIR}
-#.else
-#LIBDIR=/usr/lib
-#.endif



CVS commit: src/lib/csu

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 08:03:44 UTC 2009

Modified Files:
src/lib/csu: Makefile

Log Message:
look for ${CSU_MACHINE_ARCH}_elf directory first.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/csu/Makefile

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

Modified files:

Index: src/lib/csu/Makefile
diff -u src/lib/csu/Makefile:1.24 src/lib/csu/Makefile:1.25
--- src/lib/csu/Makefile:1.24	Thu May  2 16:42:53 2002
+++ src/lib/csu/Makefile	Sun Dec 13 08:03:44 2009
@@ -1,8 +1,10 @@
-#	$NetBSD: Makefile,v 1.24 2002/05/02 16:42:53 wiz Exp $
+#	$NetBSD: Makefile,v 1.25 2009/12/13 08:03:44 mrg Exp $
 
 .include bsd.own.mk
 
-.if ${OBJECT_FMT} == ELF  exists(${MACHINE_ARCH}_elf)
+.if ${OBJECT_FMT} == ELF  exists(${CSU_MACHINE_ARCH}_elf)
+SUBDIR=	${CSU_MACHINE_ARCH}_elf
+.elif ${OBJECT_FMT} == ELF  exists(${MACHINE_ARCH}_elf)
 SUBDIR=	${MACHINE_ARCH}_elf
 .elif ${OBJECT_FMT} == ELF  exists(${MACHINE_CPU}_elf)
 SUBDIR=	${MACHINE_CPU}_elf



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

2009-12-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 13 08:32:57 UTC 2009

Modified Files:
src/sys/arch/mvmeppc/stand: Makefile.booters

Log Message:
Pull a fix from mvme68k:
 Create machine and ${MACHINE_CPU} symlinks properly and
 remove unnecessary dependencies so that parallel build works.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mvmeppc/stand/Makefile.booters

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/mvmeppc/stand/Makefile.booters
diff -u src/sys/arch/mvmeppc/stand/Makefile.booters:1.8 src/sys/arch/mvmeppc/stand/Makefile.booters:1.9
--- src/sys/arch/mvmeppc/stand/Makefile.booters:1.8	Fri Apr  3 10:38:13 2009
+++ src/sys/arch/mvmeppc/stand/Makefile.booters	Sun Dec 13 08:32:57 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.booters,v 1.8 2009/04/03 10:38:13 tsutsui Exp $
+#	$NetBSD: Makefile.booters,v 1.9 2009/12/13 08:32:57 tsutsui Exp $
 
 S?=		${.CURDIR}/../../../..
 MDEC_DIR?=	/usr/mdec
@@ -38,22 +38,16 @@
 CLEANFILES+= machine powerpc
 
 .if !make(obj)  !make(clean)  !make(cleandir)
-.NOPATH: machine powerpc
-.BEGIN: machine powerpc
-
-machine :
-	-rm -f ${.TARGET}
-	ln -s $S/arch/mvmeppc/include machine
-
-powerpc :
-	-rm -f ${.TARGET}
-	ln -s $S/arch/powerpc/include powerpc
+.BEGIN:
+	@rm -f machine  \
+	ln -s $S/arch/${MACHINE}/include machine
+	@rm -f ${MACHINE_CPU}  \
+	ln -s $S/arch/${MACHINE_CPU}/include ${MACHINE_CPU}
 .endif
 
 .if defined(LIB)
 
-lib${LIB}.a:: machine powerpc ${OBJS}
-beforedepend:	machine powerpc
+lib${LIB}.a:: ${OBJS}
 
 .else
 



CVS commit: src/sys/arch/mvmeppc/stand/libsa

2009-12-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 13 08:36:01 UTC 2009

Modified Files:
src/sys/arch/mvmeppc/stand/libsa: Makefile

Log Message:
Put srt0.S to SRCS, not in dependencies for target all.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mvmeppc/stand/libsa/Makefile

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/mvmeppc/stand/libsa/Makefile
diff -u src/sys/arch/mvmeppc/stand/libsa/Makefile:1.7 src/sys/arch/mvmeppc/stand/libsa/Makefile:1.8
--- src/sys/arch/mvmeppc/stand/libsa/Makefile:1.7	Thu Mar 19 10:19:33 2009
+++ src/sys/arch/mvmeppc/stand/libsa/Makefile	Sun Dec 13 08:36:01 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2009/03/19 10:19:33 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.8 2009/12/13 08:36:01 tsutsui Exp $
 
 LIB=sa
 
@@ -18,7 +18,7 @@
 
 SRC_kern= ashldi3.c ashrdi3.c strcmp.c strlen.c strncpy.c inet_addr.c
 
-SRC_here= bugsyscalls.S exec_mvme.c parse_args.c getchar.c putchar.c
+SRC_here= srt0.S bugsyscalls.S exec_mvme.c parse_args.c getchar.c putchar.c
 SRC_here+= if_bug.c clock.c
 
 SRCS= ${SRC_net} ${SRC_sa} ${SRC_kern} ${SRC_here}
@@ -33,8 +33,6 @@
 #CPPFLAGS+= -DSUPPORT_RARP -DSUPPORT_BOOTPARAM
 CPPFLAGS+= -DSUPPORT_NFS -DNFS_NOSYMLINK
 
-CLEANFILES+= srt0.o
-
 .include ../Makefile.booters
 .include ${S}/../common/lib/libc/Makefile.inc
 
@@ -43,7 +41,7 @@
 # only needed during build
 libinstall::
 
-all realall: lib${LIB}.a srt0.o
+all realall: lib${LIB}.a
 
 .include bsd.own.mk
 .undef DESTDIR



CVS commit: src/distrib/cdrom

2009-12-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 13 08:37:40 UTC 2009

Modified Files:
src/distrib/cdrom: 5.0.conf
Added Files:
src/distrib/cdrom: 5.0.1.conf NetBSD-5.0.1.mk

Log Message:
Add 5.0.1 configuration files for reference.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/cdrom/5.0.1.conf \
src/distrib/cdrom/NetBSD-5.0.1.mk
cvs rdiff -u -r1.2 -r1.3 src/distrib/cdrom/5.0.conf

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

Modified files:

Index: src/distrib/cdrom/5.0.conf
diff -u src/distrib/cdrom/5.0.conf:1.2 src/distrib/cdrom/5.0.conf:1.3
--- src/distrib/cdrom/5.0.conf:1.2	Sun Mar 22 07:40:58 2009
+++ src/distrib/cdrom/5.0.conf	Sun Dec 13 08:37:40 2009
@@ -1,4 +1,4 @@
-# $NetBSD: 5.0.conf,v 1.2 2009/03/22 07:40:58 tsutsui Exp $
+# $NetBSD: 5.0.conf,v 1.3 2009/12/13 08:37:40 tsutsui Exp $
 #
 # Makefile fragment for CD sets; includes config information.
 
@@ -7,7 +7,7 @@
 # inclusion of a config file for that release, named NetBSD-${CD_RELEASE}.mk.
 # That file defines the various per-port specifics for that release.
 
-CD_RELEASE=	5.0
+CD_RELEASE?=	5.0	# conf files for patch releases will include this
 
 ##
 # The NetBSD release to be used in the .iso image filenames.  Defaults to

Added files:

Index: src/distrib/cdrom/5.0.1.conf
diff -u /dev/null src/distrib/cdrom/5.0.1.conf:1.1
--- /dev/null	Sun Dec 13 08:37:40 2009
+++ src/distrib/cdrom/5.0.1.conf	Sun Dec 13 08:37:40 2009
@@ -0,0 +1,7 @@
+# $NetBSD: 5.0.1.conf,v 1.1 2009/12/13 08:37:40 tsutsui Exp $
+#
+# Makefile fragment for CD sets; includes config information.
+
+CD_RELEASE=	5.0.1
+
+.include 5.0.conf
Index: src/distrib/cdrom/NetBSD-5.0.1.mk
diff -u /dev/null src/distrib/cdrom/NetBSD-5.0.1.mk:1.1
--- /dev/null	Sun Dec 13 08:37:40 2009
+++ src/distrib/cdrom/NetBSD-5.0.1.mk	Sun Dec 13 08:37:40 2009
@@ -0,0 +1,5 @@
+# $NetBSD: NetBSD-5.0.1.mk,v 1.1 2009/12/13 08:37:40 tsutsui Exp $
+#
+# Configuration file for the NetBSD-5.0.1 binary release.
+
+.include NetBSD-5.0.mk



CVS commit: src/lib/csu/common_elf

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 08:52:38 UTC 2009

Modified Files:
src/lib/csu/common_elf: Makefile.inc

Log Message:
move the include for bsd.own.mk down a little.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/csu/common_elf/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/csu/common_elf/Makefile.inc
diff -u src/lib/csu/common_elf/Makefile.inc:1.31 src/lib/csu/common_elf/Makefile.inc:1.32
--- src/lib/csu/common_elf/Makefile.inc:1.31	Wed Feb 18 15:21:52 2009
+++ src/lib/csu/common_elf/Makefile.inc	Sun Dec 13 08:52:38 2009
@@ -1,6 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.31 2009/02/18 15:21:52 christos Exp $
-
-.include bsd.own.mk
+#	$NetBSD: Makefile.inc,v 1.32 2009/12/13 08:52:38 mrg Exp $
 
 .if !defined(ELFSIZE)
 ELFSIZE=32
@@ -20,6 +18,8 @@
 CFLAGS+=	-fno-unit-at-a-time
 .endif
 
+.include bsd.own.mk
+
 .PATH:		${.CURDIR}/../common_elf
 
 SRCS+=		crt0.c crti.c crtn.c



CVS commit: src

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:01:46 UTC 2009

Modified Files:
src/lib/libpam: Makefile.inc
src/libexec/ld.elf_so: Makefile
src/share/mk: bsd.own.mk

Log Message:
if BSD_MK_COMPAT_FILE is defined, .include it.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libpam/Makefile.inc
cvs rdiff -u -r1.91 -r1.92 src/libexec/ld.elf_so/Makefile
cvs rdiff -u -r1.610 -r1.611 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/lib/libpam/Makefile.inc
diff -u src/lib/libpam/Makefile.inc:1.11 src/lib/libpam/Makefile.inc:1.12
--- src/lib/libpam/Makefile.inc:1.11	Sun Dec 13 08:25:20 2009
+++ src/lib/libpam/Makefile.inc	Sun Dec 13 09:01:45 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2009/12/13 08:25:20 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.12 2009/12/13 09:01:45 mrg Exp $
 # Copyright 1998 Juniper Networks, Inc.
 # All rights reserved.
 #
@@ -25,6 +25,11 @@
 #
 # $FreeBSD: src/lib/libpam/Makefile.inc,v 1.15 2004/03/15 13:23:20 des Exp $
 
+# This needs to be before bsd.init.mk
+.if defined(BSD_MK_COMPAT_FILE)
+.include ${BSD_MK_COMPAT_FILE}
+.endif
+
 USE_FORT?= yes	# network client software *and* authentication software
 
 .if defined(MLIBDIR)

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.91 src/libexec/ld.elf_so/Makefile:1.92
--- src/libexec/ld.elf_so/Makefile:1.91	Sun Dec 13 08:25:20 2009
+++ src/libexec/ld.elf_so/Makefile	Sun Dec 13 09:01:45 2009
@@ -1,10 +1,15 @@
-#	$NetBSD: Makefile,v 1.91 2009/12/13 08:25:20 mrg Exp $
+#	$NetBSD: Makefile,v 1.92 2009/12/13 09:01:45 mrg Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
 
 WARNS?=4
 
+# This needs to be before bsd.init.mk
+.if defined(BSD_MK_COMPAT_FILE)
+.include ${BSD_MK_COMPAT_FILE}
+.endif
+
 # We are not building this with PIE
 PIE_CFLAGS=
 PIE_LDFLAGS=

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.610 src/share/mk/bsd.own.mk:1.611
--- src/share/mk/bsd.own.mk:1.610	Sun Dec 13 03:06:22 2009
+++ src/share/mk/bsd.own.mk	Sun Dec 13 09:01:46 2009
@@ -1,4 +1,9 @@
-#	$NetBSD: bsd.own.mk,v 1.610 2009/12/13 03:06:22 nakayama Exp $
+#	$NetBSD: bsd.own.mk,v 1.611 2009/12/13 09:01:46 mrg Exp $
+
+# This needs to be before bsd.init.mk
+.if defined(BSD_MK_COMPAT_FILE)
+.include ${BSD_MK_COMPAT_FILE}
+.endif
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1



CVS commit: src/compat

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:07:33 UTC 2009

Added Files:
src/compat/amd64/i386: Makefile bsd.i386.mk
src/compat/mips64/64: Makefile bsd.64.mk
src/compat/mips64/o32: Makefile bsd.o32.mk
src/compat/sparc64/sparc: Makefile bsd.sparc.mk

Log Message:
for each $MACHINE_ARCH we have compat libraries to build for, give a list
of ABIs to target.  for amd64 and sparc64, we use the old i386 and sparc
subdirectories.  for mips64, we build both o32 and n64 libraries.

these files are not yet used, but will be shortly.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/compat/amd64/i386/Makefile \
src/compat/amd64/i386/bsd.i386.mk
cvs rdiff -u -r0 -r1.1 src/compat/mips64/64/Makefile \
src/compat/mips64/64/bsd.64.mk
cvs rdiff -u -r0 -r1.1 src/compat/mips64/o32/Makefile \
src/compat/mips64/o32/bsd.o32.mk
cvs rdiff -u -r0 -r1.1 src/compat/sparc64/sparc/Makefile \
src/compat/sparc64/sparc/bsd.sparc.mk

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

Added files:

Index: src/compat/amd64/i386/Makefile
diff -u /dev/null src/compat/amd64/i386/Makefile:1.1
--- /dev/null	Sun Dec 13 09:07:33 2009
+++ src/compat/amd64/i386/Makefile	Sun Dec 13 09:07:32 2009
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/13 09:07:32 mrg Exp $
+
+BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.i386.mk
+
+.include ../../compatsubdir.mk
Index: src/compat/amd64/i386/bsd.i386.mk
diff -u /dev/null src/compat/amd64/i386/bsd.i386.mk:1.1
--- /dev/null	Sun Dec 13 09:07:33 2009
+++ src/compat/amd64/i386/bsd.i386.mk	Sun Dec 13 09:07:32 2009
@@ -0,0 +1,14 @@
+#	$NetBSD: bsd.i386.mk,v 1.1 2009/12/13 09:07:32 mrg Exp $
+
+LD+=			-m elf_i386
+MLIBDIR=		i386
+LIBC_MACHINE_ARCH=	${MLIBDIR}
+COMMON_MACHINE_ARCH=	${MLIBDIR}
+KVM_MACHINE_ARCH=	${MLIBDIR}
+PTHREAD_MACHINE_ARCH=	${MLIBDIR}
+BFD_MACHINE_ARCH=	${MLIBDIR}
+CSU_MACHINE_ARCH=	${MLIBDIR}
+CRYPTO_MACHINE_CPU=	${MLIBDIR}
+LDELFSO_MACHINE_CPU=	${MLIBDIR}
+
+.include ${NETBSDSRCDIR}/compat/m32.mk

Index: src/compat/mips64/64/Makefile
diff -u /dev/null src/compat/mips64/64/Makefile:1.1
--- /dev/null	Sun Dec 13 09:07:33 2009
+++ src/compat/mips64/64/Makefile	Sun Dec 13 09:07:32 2009
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/13 09:07:32 mrg Exp $
+
+BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.64.mk
+
+.include ../../compatsubdir.mk
Index: src/compat/mips64/64/bsd.64.mk
diff -u /dev/null src/compat/mips64/64/bsd.64.mk:1.1
--- /dev/null	Sun Dec 13 09:07:33 2009
+++ src/compat/mips64/64/bsd.64.mk	Sun Dec 13 09:07:32 2009
@@ -0,0 +1,12 @@
+#	$NetBSD: bsd.64.mk,v 1.1 2009/12/13 09:07:32 mrg Exp $
+
+LD+=		-m elf64_mipsn64
+MLIBDIR=	64
+
+COPTS+=		-mabi=64
+CPUFLAGS+=	-mabi=64
+LDADD+=		-mabi=64
+LDFLAGS+=	-mabi=64
+MKDEPFLAGS+=	-mabi=64
+
+.include ${NETBSDSRCDIR}/compat/Makefile.compat

Index: src/compat/mips64/o32/Makefile
diff -u /dev/null src/compat/mips64/o32/Makefile:1.1
--- /dev/null	Sun Dec 13 09:07:33 2009
+++ src/compat/mips64/o32/Makefile	Sun Dec 13 09:07:32 2009
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/13 09:07:32 mrg Exp $
+
+BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.o32.mk
+
+.include ../../compatsubdir.mk
Index: src/compat/mips64/o32/bsd.o32.mk
diff -u /dev/null src/compat/mips64/o32/bsd.o32.mk:1.1
--- /dev/null	Sun Dec 13 09:07:33 2009
+++ src/compat/mips64/o32/bsd.o32.mk	Sun Dec 13 09:07:32 2009
@@ -0,0 +1,12 @@
+#	$NetBSD: bsd.o32.mk,v 1.1 2009/12/13 09:07:32 mrg Exp $
+
+LD+=		-m elf32_mipso32
+MLIBDIR=	o32
+
+COPTS+=		-mabi=32 -march=mips3
+CPUFLAGS+=	-mabi=32 -march=mips3
+LDADD+=		-mabi=32 -march=mips3
+LDFLAGS+=	-mabi=32 -march=mips3
+MKDEPFLAGS+=	-mabi=32 -march=mips3
+
+.include ${NETBSDSRCDIR}/compat/Makefile.compat

Index: src/compat/sparc64/sparc/Makefile
diff -u /dev/null src/compat/sparc64/sparc/Makefile:1.1
--- /dev/null	Sun Dec 13 09:07:33 2009
+++ src/compat/sparc64/sparc/Makefile	Sun Dec 13 09:07:32 2009
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/13 09:07:32 mrg Exp $
+
+BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.sparc.mk
+
+.include ../../compatsubdir.mk
Index: src/compat/sparc64/sparc/bsd.sparc.mk
diff -u /dev/null src/compat/sparc64/sparc/bsd.sparc.mk:1.1
--- /dev/null	Sun Dec 13 09:07:33 2009
+++ src/compat/sparc64/sparc/bsd.sparc.mk	Sun Dec 13 09:07:32 2009
@@ -0,0 +1,14 @@
+#	$NetBSD: bsd.sparc.mk,v 1.1 2009/12/13 09:07:32 mrg Exp $
+
+LD+=			-m elf32_sparc
+MLIBDIR=		sparc
+LIBC_MACHINE_ARCH=	${MLIBDIR}
+COMMON_MACHINE_ARCH=	${MLIBDIR}
+KVM_MACHINE_ARCH=	${MLIBDIR}
+PTHREAD_MACHINE_ARCH=	${MLIBDIR}
+BFD_MACHINE_ARCH=	${MLIBDIR}
+CSU_MACHINE_ARCH=	${MLIBDIR}
+CRYPTO_MACHINE_CPU=	${MLIBDIR}
+LDELFSO_MACHINE_CPU=	${MLIBDIR}
+
+.include ${NETBSDSRCDIR}/compat/m32.mk



CVS commit: src/share/mk

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:10:16 UTC 2009

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

Log Message:
enable MAKEDIRTARGET to be called with a separate environment,
called $MAKEDIRTARGETENV, defaulting to nothing.


To generate a diff of this commit:
cvs rdiff -u -r1.611 -r1.612 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.611 src/share/mk/bsd.own.mk:1.612
--- src/share/mk/bsd.own.mk:1.611	Sun Dec 13 09:01:46 2009
+++ src/share/mk/bsd.own.mk	Sun Dec 13 09:10:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.611 2009/12/13 09:01:46 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.612 2009/12/13 09:10:16 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -966,8 +966,9 @@
 
 #
 # MAKEDIRTARGET dir target [extra make(1) params]
-#	run cd $${dir}  ${MAKE} [params] $${target}, with a pretty message
+#	run cd $${dir}  ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}, with a pretty message
 #
+MAKEDIRTARGETENV?=
 MAKEDIRTARGET=\
 	@_makedirtarget() { \
 		dir=$$1; shift; \
@@ -983,7 +984,7 @@
 		show=$${this:-.}; \
 		echo $${target} === $${show%/}$${1:+	(with: $$@)}; \
 		cd $${real} \
-		 ${MAKE} _THISDIR_=$${this} $$@ $${target}; \
+		 ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_=$${this} $$@ $${target}; \
 	}; \
 	_makedirtarget
 



CVS commit: src/compat/dirshack

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:25:57 UTC 2009

Added Files:
src/compat/dirshack: Makefile

Log Message:
a hack to force the top-level compat objdir to be created before the
library ones are.  the Makefile has a long description of what's
really going on here.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/compat/dirshack/Makefile

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

Added files:

Index: src/compat/dirshack/Makefile
diff -u /dev/null src/compat/dirshack/Makefile:1.1
--- /dev/null	Sun Dec 13 09:25:57 2009
+++ src/compat/dirshack/Makefile	Sun Dec 13 09:25:57 2009
@@ -0,0 +1,30 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/13 09:25:57 mrg Exp $
+
+# hacky method to get compat multilib base objdirs created before
+# make tries to go create the subdirs used for builds.
+
+# the problem is that make handles objdir creation for subdirs before it
+# handles this current directory, so when make cd's into $arch/$libtype
+# and from there into the ../../lib dirs, it ends up setting the forced
+# MAKEOBJDIRPREFIX to something based upon ${.CURDIR}, since the objdir
+# doesn't exist yet.
+# 
+# our solution is simple - from this Makefile we traverse the same list
+# of $arch/$libtype's with BOOTSTRAP_SUBDIR=.  then the compat/Makefile
+# handles these subdirs as normal, with the base objdir created.
+
+.include bsd.own.mk
+
+.if ${MKCOMPAT} != no
+.if make(obj)
+
+.include ../archdirs.mk
+
+MAKEDIRTARGETENV=	BOOTSTRAP_SUBDIRS=
+
+SUBDIR=	${ARCHDIR_SUBDIR:C/^/..\//}
+
+.endif	# make(obj)
+.endif	# MKCOMPAT != no
+
+.include bsd.subdir.mk



CVS commit: src/compat

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:27:13 UTC 2009

Modified Files:
src/compat: Makefile
Added Files:
src/compat: archdirs.mk compatsubdir.mk

Log Message:
- move the per-platform subdir list into archdirs.mk
- move the per-ABI subdir list into compatsubdir.mk.  use the new
MAKEDIRTARGETENV support to force a new objdir for compat library builds,
and simply traverse over the normal src path once for each ABI to be
built.  this eliminates all the shadow Makefile's for every library, and
allows multiple compat ABIs to be built for a single platform, such as
both o32 and n64 for mips64's default n32.
- compat/Makefile is merely a subdir provider now, and takes the real
information from archdirs.mk


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/compat/Makefile
cvs rdiff -u -r0 -r1.1 src/compat/archdirs.mk src/compat/compatsubdir.mk

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

Modified files:

Index: src/compat/Makefile
diff -u src/compat/Makefile:1.4 src/compat/Makefile:1.5
--- src/compat/Makefile:1.4	Sun Jun  7 22:59:22 2009
+++ src/compat/Makefile	Sun Dec 13 09:27:13 2009
@@ -1,29 +1,17 @@
-#	$NetBSD: Makefile,v 1.4 2009/06/07 22:59:22 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2009/12/13 09:27:13 mrg Exp $
 
-# Build 32-bit compat versions of:
-#	src/gnu/lib/libgcc4 into ${DESTDIR}/usr/lib/32arch
-#	src/lib/libc into ${DESTDIR}/usr/lib/32arch
-#	src/gnu/lib/ into ${DESTDIR}/usr/lib/32arch
-#	src/lib/ into ${DESTDIR}/usr/lib/32arch
-#	src/libexec/ld.elf_so into ${DESTDIR}/usr/libexec/ld.elf_so-32arch
+# Build multi-abi libaries
 
 .include bsd.own.mk
 
-.if ${MKCOMPAT} != no  \
-(${MACHINE_ARCH} == sparc64 || ${MACHINE_ARCH} == x86_64)
-
+.if ${MKCOMPAT} != no
 .if !make(includes)
-SUBDIR=	gnu/lib/crtstuff4 .WAIT \
-	lib/csu .WAIT \
-	gnu/lib/libgcc4 .WAIT \
-	lib/libc .WAIT \
-	lib/libutil .WAIT \
-	lib gnu/lib .WAIT \
-	external/lib .WAIT \
-	crypto/external/lib .WAIT \
-	libexec/ld.elf_so
-.endif
 
+.include archdirs.mk
+
+SUBDIR=	dirshack .WAIT ${ARCHDIR_SUBDIR}
+
+.endif
 .endif
 
 .include bsd.subdir.mk

Added files:

Index: src/compat/archdirs.mk
diff -u /dev/null src/compat/archdirs.mk:1.1
--- /dev/null	Sun Dec 13 09:27:13 2009
+++ src/compat/archdirs.mk	Sun Dec 13 09:27:13 2009
@@ -0,0 +1,15 @@
+#	$NetBSD: archdirs.mk,v 1.1 2009/12/13 09:27:13 mrg Exp $
+
+# list of subdirs used per-platform
+
+.if ${MACHINE} == sparc64
+ARCHDIR_SUBDIR=	sparc64/sparc
+.endif
+
+.if ${MACHINE} == amd64
+ARCHDIR_SUBDIR=	amd64/i386
+.endif
+
+.if (${MACHINE_ARCH} == mips64eb || ${MACHINE_ARCH} == mips64el)
+ARCHDIR_SUBDIR=	mips64/64 mips64/o32
+.endif
Index: src/compat/compatsubdir.mk
diff -u /dev/null src/compat/compatsubdir.mk:1.1
--- /dev/null	Sun Dec 13 09:27:13 2009
+++ src/compat/compatsubdir.mk	Sun Dec 13 09:27:13 2009
@@ -0,0 +1,39 @@
+#	$NetBSD: compatsubdir.mk,v 1.1 2009/12/13 09:27:13 mrg Exp $
+
+# Build netbsd libraries.
+
+.include bsd.own.mk
+
+.if ${MKCOMPAT} != no
+.if !make(includes)
+
+# make sure we get an objdir built early enough
+.include bsd.prog.mk
+
+# XXX make this use MAKEOBJDIR
+MAKEDIRTARGETENV=	MAKEOBJDIRPREFIX=${.OBJDIR} MKOBJDIRS=yes MKSHARE=no BSD_MK_COMPAT_FILE=${BSD_MK_COMPAT_FILE}
+
+# XXX fix the library list to include all 'external' libs?
+.if defined(BOOTSTRAP_SUBDIRS)
+SUBDIR=	${BOOTSTRAP_SUBDIRS}
+.else
+SUBDIR= ../../../gnu/lib/crtstuff4 .WAIT \
+	../../../lib/csu .WAIT \
+	../../../gnu/lib/libgcc4 .WAIT \
+	../../../lib/libc .WAIT \
+	../../../lib/libutil .WAIT \
+	../../../lib .WAIT \
+	../../../gnu/lib \
+	../../../external/bsd/atf/lib \
+	../../../external/bsd/bind/lib \
+	../../../external/bsd/libevent/lib \
+	../../../external/bsd/file/lib \
+	../../../external/bsd/openldap/lib \
+	../../../external/gpl3/binutils/lib \
+	../../../libexec/ld.elf_so
+.endif
+
+.include bsd.subdir.mk
+
+.endif
+.endif



CVS commit: src/compat

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:27:34 UTC 2009

Modified Files:
src/compat: Makefile.compat
Added Files:
src/compat: m32.mk

Log Message:
- move -m32 style compat into m32.mk
- new Makefile.compat has mostly only the basics now


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/compat/Makefile.compat
cvs rdiff -u -r0 -r1.1 src/compat/m32.mk

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

Modified files:

Index: src/compat/Makefile.compat
diff -u src/compat/Makefile.compat:1.6 src/compat/Makefile.compat:1.7
--- src/compat/Makefile.compat:1.6	Sun Dec 13 08:25:20 2009
+++ src/compat/Makefile.compat	Sun Dec 13 09:27:34 2009
@@ -1,58 +1,33 @@
-#	$NetBSD: Makefile.compat,v 1.6 2009/12/13 08:25:20 mrg Exp $
+#	$NetBSD: Makefile.compat,v 1.7 2009/12/13 09:27:34 mrg Exp $
 
-COPTS+=			-m32
-CPUFLAGS+=		-m32
-LDADD+=			-m32
-MKDEPFLAGS+=		-m32
-
-# XXX ugly
-.if ${MACHINE_ARCH} == sparc64
-LD+=			-m elf32_sparc
-MLIBDIR=		sparc
-.elif ${MACHINE_ARCH} == x86_64
-LD+=			-m elf_i386
-MLIBDIR=		i386
-.endif
+#
+# Makefile fragment to help implement a multilib set of libraries
+#
+# expects MLIBDIR to be set to the extra path component
+#
+
+.ifndef _COMPAT_OPTIONS_MK_ # {
+_COMPAT_OPTIONS_MK_=1
 
 LIBDIR=			/usr/lib/${MLIBDIR}
 SHLIBDIR=		/usr/lib/${MLIBDIR}
 SHLIBINSTALLDIR=	/usr/lib/${MLIBDIR}
 
-COMMON_MACHINE_ARCH=	${MLIBDIR}
-LIBC_MACHINE_ARCH=	${MLIBDIR}
-BFD_MACHINE_ARCH=	${MLIBDIR}
-CRYPTO_MACHINE_CPU=	${MLIBDIR}
-KVM_MACHINE_ARCH=	${MLIBDIR}
-PTHREAD_MACHINE_ARCH=	${MLIBDIR}
-LDELFSO_MACHINE_CPU=	${MLIBDIR}
-
-_GCC_CRTBEGIN?=		${DESTDIR}/usr/lib/${MLIBDIR}/crtbegin.o
-_GCC_CRTBEGINS?=	${DESTDIR}/usr/lib/${MLIBDIR}/crtbeginS.o
-_GCC_CRTEND?=		${DESTDIR}/usr/lib/${MLIBDIR}/crtend.o
-_GCC_CRTENDS?=		${DESTDIR}/usr/lib/${MLIBDIR}/crtendS.o
-_GCC_CRTDIR?=		${DESTDIR}/usr/lib/${MLIBDIR}
-_GCC_LIBGCCDIR?=	${DESTDIR}/usr/lib/${MLIBDIR}
+_GCC_CRTBEGIN=		${DESTDIR}/usr/lib/${MLIBDIR}/crtbegin.o
+_GCC_CRTBEGINS=		${DESTDIR}/usr/lib/${MLIBDIR}/crtbeginS.o
+_GCC_CRTEND=		${DESTDIR}/usr/lib/${MLIBDIR}/crtend.o
+_GCC_CRTENDS=		${DESTDIR}/usr/lib/${MLIBDIR}/crtendS.o
+_GCC_CRTDIR=		${DESTDIR}/usr/lib/${MLIBDIR}
+_GCC_LIBGCCDIR=		${DESTDIR}/usr/lib/${MLIBDIR}
 
 NOSHARE=	# defined
-NONLS=	# defined
+NOLINT=		# defined
+NONLS=		# defined
+NOMAN=		# defined
+NOINFO=		# defined
 NOCHECKVER=	# defined
 
-LIBC_DIR=	${NETBSDSRCDIR}/compat/lib/libc
-
 # ld.elf_so
 SHLINKINSTALLDIR=	/libexec
 
-# XXX
-EXTRALIBDIRS=	${DESTDIR}${LIBDIR} ${DESTDIR}${LIBDIR}/i18n ${DESTDIR}${LIBDIR}/security
-.PRECIOUS:  ${EXTRALIBDIRS}
-install:	${EXTRALIBDIRS} .WAIT
-${EXTRALIBDIRS}: .EXEC
-	@if [ ! -d ${.TARGET} ] ; then \
-		${_MKSHMSG_CREATE} ${.TARGET}; \
-		${_MKSHECHO} ${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} -m 755 \
-		${.TARGET}; \
-		${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} -m 755 \
-		${.TARGET}; \
-	fi
-# Make sure the base dir is created first.
-${DESTDIR}${LIBDIR}/i18n ${DESTDIR}${LIBDIR}/security: ${DESTDIR}${LIBDIR}
+.endif # _COMPAT_OPTIONS_MK_ }

Added files:

Index: src/compat/m32.mk
diff -u /dev/null src/compat/m32.mk:1.1
--- /dev/null	Sun Dec 13 09:27:34 2009
+++ src/compat/m32.mk	Sun Dec 13 09:27:34 2009
@@ -0,0 +1,13 @@
+#	$NetBSD: m32.mk,v 1.1 2009/12/13 09:27:34 mrg Exp $
+
+#
+# Makefile fragment to help implement a set of 'cc -m32' libraries.
+#
+
+COPTS+=			-m32
+CPUFLAGS+=		-m32
+LDADD+=			-m32
+LDFLAGS+=		-m32
+MKDEPFLAGS+=		-m32
+
+.include Makefile.compat



CVS commit: src/compat

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:27:57 UTC 2009

Modified Files:
src/compat: README

Log Message:
update this to reflect all the changes in src/compat version 2.0


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/compat/README

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

Modified files:

Index: src/compat/README
diff -u src/compat/README:1.3 src/compat/README:1.4
--- src/compat/README:1.3	Tue Jan 13 17:52:32 2009
+++ src/compat/README	Sun Dec 13 09:27:57 2009
@@ -1,43 +1,72 @@
-$NetBSD: README,v 1.3 2009/01/13 17:52:32 jmmv Exp $
+$NetBSD: README,v 1.4 2009/12/13 09:27:57 mrg Exp $
 
-This directory contains Makefile fragments that will build all of the
-NetBSD libraries in 32-bit mode and install them into /usr/lib/arch
-and also install a /usr/libexec/ld.elf_so-arch.
 
-This is current only supported for the amd64 and sparc64 platforms,
-where arch is i386 or sparc respectively.  (It could be used to
-build MIPS o32 libraries on n32 system, but not both n32 and o32 on
-a n64 system.  It only supports one extra target.)
+Building multi- ABI libraries for NetBSD platforms.
 
 
-Most of the makefiles here were built with the build-makefiles script.
-The exceptions are lib/csu/Makefile and ld.elf_so/Makefile.
+src/compat has a framework to (re)build the libraries shipped with
+NetBSD for a different ABI than the default for that platform.  This
+allow 32-bit libraries for the amd64 and sparc64 ports, and enables
+the mips64 port to support all three of old-style 32-bit (o32), the
+new 32-bit (default, n32, 64-bit CPU required) or the 64-bit ABI.
 
 
-The method used is the:
-	- evaluate some local variables
-	- switch .CURDIR
-	- include original Makefile,
-	- evaluate some variables
-	- switch .CURDIR back
-that is used by crunchgen to build eg, installer media or /rescue.
+The basic premise is to re-set $MAKEOBJDIRPREFIX to fresh subdirectory
+underneath src/compat and rebuild the libraries with a different set
+of options.  Each platform wanting support should create their port
+subdirectory directly in src/compat, and then one subdirectory in here
+for each ABI required.  e.g., src/compat/amd64/i386 is where we build
+the 32-bit compat libraries for the amd64port.  In each of these
+subdirs, a small Makefile and makefile fragment should exist.  The
+Makefile should set BSD_MK_COMPAT_FILE to equal the fragment, and then
+include ../../Makefile.common.  Eg, amd64/i386/Makefile has:
 
+	BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.i386.mk
 
+	.include ../../Makefile.common
 
-TODO:
-	- some yacc issue -- libc, libipsec and libpcap need make run
-	  to generate headers properly, otherwise it complains about
-	  no way to get to foo.h.  this is currently hacked by putting
-	  a rule foo.h: foo.c in the (generated) makefiles
-	- there's an ugly hack to make libpam build correctly again the
-	  right libc.  ld.elf_so has a similar (but less ugly hack)
-	- not sure that /usr/lib/{i386,sparc}{,/i18n} are created 
-	  properly yet
+In the makefile fragment any changes to ABI flags are passed here
+and the MLIBDIR variable must be set to the subdirectory in /usr/lib
+where libraries for the ABI will be installed.  There are a couple of
+helper Makefile's around.  amd64/i386/bsd.i386.mk looks like:
 
-Future work
+	LD+=			-m elf_i386
+	MLIBDIR=		i386
+	LIBC_MACHINE_ARCH=	${MLIBDIR}
+	COMMON_MACHINE_ARCH=	${MLIBDIR}
+	KVM_MACHINE_ARCH=	${MLIBDIR}
+	PTHREAD_MACHINE_ARCH=	${MLIBDIR}
+	BFD_MACHINE_ARCH=	${MLIBDIR}
+	CSU_MACHINE_ARCH=	${MLIBDIR}
+	CRYPTO_MACHINE_CPU=	${MLIBDIR}
+	LDELFSO_MACHINE_CPU=	${MLIBDIR}
 
-Ideally this should be able to handle any number of compat targets.
-Perhaps using a force MAKEOBJDIR, and run-run make solution will
-work, but my initial attempts got me no where.  If not, perhaps
-build-makefiles could be expanded to be used at run-time in such
-a per-compat target obj-dir.
+	.include ${NETBSDSRCDIR}/compat/Makefile.m32
+
+and the referenced Makefile.m32 looks like:
+
+	COPTS+=			-m32
+	CPUFLAGS+=		-m32
+	LDADD+=			-m32
+	LDFLAGS+=		-m32
+	MKDEPFLAGS+=		-m32
+
+	.include Makefile.compat
+
+
+Makefile.common holds the list of subdirectories (the libraries and
+ld.elf_so) to build with this ABI.
+
+Makefile.md_subdir holds the list of subdirectories for each port.
+
+Makefile.compat has the basic framework to force the right paths for
+library and ld.elf_so linkage.  It contains a hack to create subdirs
+in the build that should be fixed.
+
+dirshack/Makefile is a hack to get objdirs created timely, and should
+be fixed in a better way.
+
+
+
+...@eterna.com.au
+december 2009



CVS commit: src/distrib/sets/lists

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:28:41 UTC 2009

Modified Files:
src/distrib/sets/lists/base: md.amd64 md.sparc64
src/distrib/sets/lists/comp: md.amd64 md.sparc64

Log Message:
obsolete a bunch of files that should never have been installed, found
by the new src/compat framework that builds libraries more like they
are normally built.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.68 -r1.69 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.56 -r1.57 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.49 -r1.50 src/distrib/sets/lists/comp/md.sparc64

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/base/md.amd64
diff -u src/distrib/sets/lists/base/md.amd64:1.75 src/distrib/sets/lists/base/md.amd64:1.76
--- src/distrib/sets/lists/base/md.amd64:1.75	Sun Nov  8 15:30:21 2009
+++ src/distrib/sets/lists/base/md.amd64	Sun Dec 13 09:28:41 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.75 2009/11/08 15:30:21 skrll Exp $
+# $NetBSD: md.amd64,v 1.76 2009/12/13 09:28:41 mrg Exp $
 ./dev/lms0	base-obsolete		obsolete
 ./dev/mms0	base-obsolete		obsolete
 ./libexec/ld.elf_so-i386			base-sys-shlib		compat,pic
@@ -194,8 +194,8 @@
 ./usr/lib/i386/libssl.so.8.0			base-compat-shlib	compat,pic
 ./usr/lib/i386/libstdc++.so.7			base-compat-shlib	compat,pic
 ./usr/lib/i386/libstdc++.so.7.0			base-compat-shlib	compat,pic
-./usr/lib/i386/libsupc++.so.1			base-compat-shlib	compat,pic
-./usr/lib/i386/libsupc++.so.1.0			base-compat-shlib	compat,pic
+./usr/lib/i386/libsupc++.so.1			base-compat-shlib	obsolete
+./usr/lib/i386/libsupc++.so.1.0			base-compat-shlib	obsolete
 ./usr/lib/i386/libtermcap.so.0			base-compat-shlib	compat,pic
 ./usr/lib/i386/libtermcap.so.0.6		base-compat-shlib	compat,pic
 ./usr/lib/i386/libtermlib.so.0			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/md.sparc64
diff -u src/distrib/sets/lists/base/md.sparc64:1.68 src/distrib/sets/lists/base/md.sparc64:1.69
--- src/distrib/sets/lists/base/md.sparc64:1.68	Sun Nov  8 15:30:21 2009
+++ src/distrib/sets/lists/base/md.sparc64	Sun Dec 13 09:28:41 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.sparc64,v 1.68 2009/11/08 15:30:21 skrll Exp $
+# $NetBSD: md.sparc64,v 1.69 2009/12/13 09:28:41 mrg Exp $
 ./libexec/ld.elf_so-sparc			base-sysutil-bin	compat,pic
 ./sbin/edlabel	base-sysutil-root
 ./usr/bin/fdformatbase-util-bin
@@ -190,8 +190,8 @@
 ./usr/lib/sparc/libssl.so.8.0			base-compat-shlib	compat,pic
 ./usr/lib/sparc/libstdc++.so.7			base-compat-shlib	compat,pic
 ./usr/lib/sparc/libstdc++.so.7.0		base-compat-shlib	compat,pic
-./usr/lib/sparc/libsupc++.so.1			base-compat-shlib	compat,pic
-./usr/lib/sparc/libsupc++.so.1.0		base-compat-shlib	compat,pic
+./usr/lib/sparc/libsupc++.so.1			base-compat-shlib	obsolete
+./usr/lib/sparc/libsupc++.so.1.0		base-compat-shlib	obsolete
 ./usr/lib/sparc/libtermcap.so.0			base-compat-shlib	compat,pic
 ./usr/lib/sparc/libtermcap.so.0.6		base-compat-shlib	compat,pic
 ./usr/lib/sparc/libtermlib.so.0			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.56 src/distrib/sets/lists/comp/md.amd64:1.57
--- src/distrib/sets/lists/comp/md.amd64:1.56	Mon Nov  9 15:55:47 2009
+++ src/distrib/sets/lists/comp/md.amd64	Sun Dec 13 09:28:41 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.56 2009/11/09 15:55:47 njoly Exp $
+# $NetBSD: md.amd64,v 1.57 2009/12/13 09:28:41 mrg Exp $
 ./usr/include/amd64comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -240,96 +240,96 @@
 ./usr/lib/i386/gcrt0.ocomp-c-lib		compat
 ./usr/lib/i386/i18n/libBIG5.a			comp-c-lib		compat
 ./usr/lib/i386/i18n/libBIG5.so			comp-sys-shlib		compat,pic
-./usr/lib/i386/i18n/libBIG5_p.a			comp-c-proflib		compat,profile
-./usr/lib/i386/i18n/libBIG5_pic.a		comp-c-piclib		compat,pic
+./usr/lib/i386/i18n/libBIG5_p.a			comp-c-proflib		obsolete
+./usr/lib/i386/i18n/libBIG5_pic.a		comp-c-piclib		obsolete
 ./usr/lib/i386/i18n/libDECHanyu.a		comp-c-lib		compat
 ./usr/lib/i386/i18n/libDECHanyu.so		comp-sys-shlib		compat,pic
-./usr/lib/i386/i18n/libDECHanyu_p.a		comp-c-proflib		compat,profile
-./usr/lib/i386/i18n/libDECHanyu_pic.a		comp-c-piclib		compat,pic
+./usr/lib/i386/i18n/libDECHanyu_p.a		comp-c-proflib		obsolete
+./usr/lib/i386/i18n/libDECHanyu_pic.a		comp-c-piclib		obsolete
 ./usr/lib/i386/i18n/libEUC.a			comp-c-lib		compat
 ./usr/lib/i386/i18n/libEUC.so			comp-sys-shlib		compat,pic
 ./usr/lib/i386/i18n/libEUCTW.a			comp-c-lib		compat
 ./usr/lib/i386/i18n/libEUCTW.so			comp-sys-shlib		compat,pic
-./usr/lib/i386/i18n/libEUCTW_p.a		comp-c-proflib		compat,profile
-./usr/lib/i386/i18n/libEUCTW_pic.a		comp-c-piclib		compat,pic
-./usr/lib/i386/i18n/libEUC_p.a			comp-c-proflib		compat,profile

CVS commit: src

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:29:27 UTC 2009

Modified Files:
src: Makefile

Log Message:
adjust the do-compat-* rules now that src/compat/lib and friends no longer exist


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/Makefile

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

Modified files:

Index: src/Makefile
diff -u src/Makefile:1.275 src/Makefile:1.276
--- src/Makefile:1.275	Mon Nov 30 16:13:22 2009
+++ src/Makefile	Sun Dec 13 09:29:27 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.275 2009/11/30 16:13:22 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.276 2009/12/13 09:29:27 mrg Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -414,19 +414,23 @@
 BUILD_CC_LIB+= external/bsd/pcc/libpcc
 .endif
 
-.if ${MKCOMPAT} != no
-BUILD_COMPAT_LIBS=	compat/lib/csu ${BUILD_CC_LIB:S/^/compat\//} compat/lib/libc
-.else
-BUILD_COMPAT_LIBS=
-.endif
-
-.for dir in tools tools/compat lib/csu ${BUILD_CC_LIB} lib/libc lib/libdes lib gnu/lib external/lib crypto/external/lib sys/rump/dev/lib sys/rump/fs/lib sys/rump/net/lib sys/modules ${BUILD_COMPAT_LIBS}
+.for dir in tools tools/compat lib/csu ${BUILD_CC_LIB} lib/libc lib/libdes lib gnu/lib external/lib crypto/external/lib sys/rump/dev/lib sys/rump/fs/lib sys/rump/net/lib sys/modules
 do-${dir:S/\//-/g}: .PHONY .MAKE
 .for targ in dependall install
 	${MAKEDIRTARGET} ${dir} ${targ}
 .endfor
 .endfor
 
+.if ${MKCOMPAT} != no
+COMPAT_SUBDIR_LIST=lib/csu ${BUILD_CC_LIB} lib/libc
+.for dir in ${COMPAT_SUBDIR_LIST}
+do-compat-${dir:S/\//-/g}: .PHONY .MAKE
+.for targ in obj dependall install
+	${MAKEDIRTARGET} compat ${targ} BOOTSTRAP_SUBDIRS=../../../${dir}
+.endfor
+.endfor
+.endif
+
 do-top-obj: .PHONY .MAKE
 	${MAKEDIRTARGET} . obj NOSUBDIR=
 



CVS commit: src/libexec/ld.elf_so

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:31:47 UTC 2009

Modified Files:
src/libexec/ld.elf_so: Makefile
src/libexec/ld.elf_so/arch/i386: Makefile.inc
src/libexec/ld.elf_so/arch/sparc: Makefile.inc
Removed Files:
src/libexec/ld.elf_so/arch/i386: Makefile.ld32
src/libexec/ld.elf_so/arch/sparc: Makefile.ld32

Log Message:
simplify the logic for compat ld.elf_so and move it here.  we now can
find the libc objdir for multiple compat ld.elf_so's, too.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/libexec/ld.elf_so/Makefile
cvs rdiff -u -r1.13 -r1.14 src/libexec/ld.elf_so/arch/i386/Makefile.inc
cvs rdiff -u -r1.1 -r0 src/libexec/ld.elf_so/arch/i386/Makefile.ld32
cvs rdiff -u -r1.13 -r1.14 src/libexec/ld.elf_so/arch/sparc/Makefile.inc
cvs rdiff -u -r1.1 -r0 src/libexec/ld.elf_so/arch/sparc/Makefile.ld32

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

Modified files:

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.92 src/libexec/ld.elf_so/Makefile:1.93
--- src/libexec/ld.elf_so/Makefile:1.92	Sun Dec 13 09:01:45 2009
+++ src/libexec/ld.elf_so/Makefile	Sun Dec 13 09:31:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.92 2009/12/13 09:01:45 mrg Exp $
+#	$NetBSD: Makefile,v 1.93 2009/12/13 09:31:47 mrg Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
@@ -38,8 +38,6 @@
  (${MACHINE_ARCH} == vax)) 	\
 ${OBJECT_FMT} == ELF  ${MKPIC} != no
 
-PROG?=		ld.elf_so
-
 LDFLAGS+=	-shared -symbolic -nostartfiles
 LDFLAGS+=	-Wl,-static
 
@@ -49,13 +47,16 @@
 .include $M/Makefile.inc
 .endif
 
-# Support src/compat/libexec/ld.elf_so.
+# Support compat ld.elf_so.
 .if defined(MLIBDIR)
-CLIBOBJ!=	cd ${NETBSDSRCDIR}/compat/lib/libc  ${PRINTOBJDIR}
+PROG=		ld.elf_so-${MLIBDIR}
+CPPFLAGS+=	-DRTLD_ARCH_SUBDIR=\${MLIBDIR}\
 .else
-CLIBOBJ!=	cd ${NETBSDSRCDIR}/lib/libc  ${PRINTOBJDIR}
+PROG=		ld.elf_so
 .endif
 
+CLIBOBJ!=	cd ${NETBSDSRCDIR}/lib/libc  ${PRINTOBJDIR}
+
 SRCS+=		rtld.c reloc.c symbol.c xmalloc.c xprintf.c debug.c \
 		map_object.c load.c search.c headers.c paths.c expand.c
 

Index: src/libexec/ld.elf_so/arch/i386/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.13 src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.14
--- src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.13	Sun Dec 13 08:25:20 2009
+++ src/libexec/ld.elf_so/arch/i386/Makefile.inc	Sun Dec 13 09:31:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.13 2009/12/13 08:25:20 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.14 2009/12/13 09:31:47 mrg Exp $
 
 SRCS+=		rtld_start.S mdreloc.c
 
@@ -8,7 +8,3 @@
 CPPFLAGS+=	-DELFSIZE=32
 
 LDFLAGS+=	-Wl,-e,.rtld_start
-
-.if defined(MLIBDIR)
-.include Makefile.ld32
-.endif

Index: src/libexec/ld.elf_so/arch/sparc/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.13 src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.14
--- src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.13	Sun Dec 13 08:25:20 2009
+++ src/libexec/ld.elf_so/arch/sparc/Makefile.inc	Sun Dec 13 09:31:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.13 2009/12/13 08:25:20 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.14 2009/12/13 09:31:47 mrg Exp $
 
 SRCS+=		rtld_start.S mdreloc.c
 
@@ -8,7 +8,3 @@
 CPPFLAGS+=	-DELFSIZE=32
 
 LDFLAGS+=	-Wl,-e,_rtld_start
-
-.if defined(MLIBDIR)
-.include Makefile.ld32
-.endif



CVS commit: src/compat

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:33:25 UTC 2009

Removed Files:
src/compat: build-makefiles
src/compat/crypto/external/bsd/netpgp/lib: Makefile
src/compat/crypto/external/bsd/openssh/lib: Makefile
src/compat/crypto/external/bsd/openssl/lib: Makefile
src/compat/crypto/external/bsd/openssl/lib/libcrypto: Makefile
src/compat/crypto/external/bsd/openssl/lib/libcrypto_idea: Makefile
src/compat/crypto/external/bsd/openssl/lib/libcrypto_mdc2: Makefile
src/compat/crypto/external/bsd/openssl/lib/libcrypto_rc5: Makefile
src/compat/crypto/external/bsd/openssl/lib/libdes: Makefile
src/compat/crypto/external/bsd/openssl/lib/libssl: Makefile
src/compat/crypto/external/lib: Makefile
src/compat/external/bsd/atf/lib: Makefile
src/compat/external/bsd/atf/lib/libatf-c: Makefile
src/compat/external/bsd/atf/lib/libatf-c++: Makefile
src/compat/external/bsd/bind/lib: Makefile Makefile.inc
src/compat/external/bsd/bind/lib/libbind9: Makefile
src/compat/external/bsd/bind/lib/libdns: Makefile
src/compat/external/bsd/bind/lib/libisc: Makefile
src/compat/external/bsd/bind/lib/libisccc: Makefile
src/compat/external/bsd/bind/lib/libisccfg: Makefile
src/compat/external/bsd/bind/lib/liblwres: Makefile
src/compat/external/bsd/file/lib: Makefile
src/compat/external/bsd/flex/lib: Makefile
src/compat/external/bsd/iscsi/lib: Makefile
src/compat/external/bsd/libevent: Makefile Makefile.inc
src/compat/external/bsd/libevent/include: Makefile
src/compat/external/bsd/libevent/lib: Makefile
src/compat/external/bsd/openldap/lib: Makefile
src/compat/external/bsd/openldap/lib/liblber: Makefile
src/compat/external/bsd/openldap/lib/libldap: Makefile
src/compat/external/bsd/openldap/lib/libldap_r: Makefile
src/compat/external/bsd/openldap/lib/liblutil: Makefile
src/compat/external/gpl3/binutils/lib: Makefile
src/compat/external/gpl3/binutils/lib/libbfd: Makefile
src/compat/external/gpl3/binutils/lib/libiberty: Makefile
src/compat/external/gpl3/binutils/lib/libopcodes: Makefile
src/compat/external/lib: Makefile
src/compat/gnu/lib: Makefile
src/compat/gnu/lib/crtstuff4: Makefile
src/compat/gnu/lib/libbfd: Makefile
src/compat/gnu/lib/libgcc4: Makefile Makefile.inc
src/compat/gnu/lib/libgcc4/libgcc: Makefile
src/compat/gnu/lib/libgcc4/libgcc_eh: Makefile
src/compat/gnu/lib/libgcc4/libgcc_s: Makefile
src/compat/gnu/lib/libgcc4/libgcov: Makefile
src/compat/gnu/lib/libiberty: Makefile
src/compat/gnu/lib/libmalloc: Makefile
src/compat/gnu/lib/libobjc4: Makefile
src/compat/gnu/lib/libopcodes: Makefile
src/compat/gnu/lib/libstdc++-v3_4: Makefile
src/compat/gnu/lib/libstdc++-v3_4/include: Makefile
src/compat/gnu/lib/libsupc++4: Makefile
src/compat/lib: Makefile Makefile.inc
src/compat/lib/csu: Makefile Makefile.real
src/compat/lib/csu/i386_elf: Makefile crt0.c
src/compat/lib/csu/sparc_elf: Makefile crt0.c
src/compat/lib/i18n_module: Makefile Makefile.inc
src/compat/lib/i18n_module/BIG5: Makefile
src/compat/lib/i18n_module/DECHanyu: Makefile
src/compat/lib/i18n_module/EUC: Makefile
src/compat/lib/i18n_module/EUCTW: Makefile
src/compat/lib/i18n_module/GBK2K: Makefile
src/compat/lib/i18n_module/HZ: Makefile
src/compat/lib/i18n_module/ISO2022: Makefile
src/compat/lib/i18n_module/JOHAB: Makefile
src/compat/lib/i18n_module/MSKanji: Makefile
src/compat/lib/i18n_module/UES: Makefile
src/compat/lib/i18n_module/UTF1632: Makefile
src/compat/lib/i18n_module/UTF7: Makefile
src/compat/lib/i18n_module/UTF8: Makefile
src/compat/lib/i18n_module/VIQR: Makefile
src/compat/lib/i18n_module/ZW: Makefile
src/compat/lib/i18n_module/iconv_none: Makefile
src/compat/lib/i18n_module/iconv_std: Makefile
src/compat/lib/i18n_module/mapper_646: Makefile
src/compat/lib/i18n_module/mapper_none: Makefile
src/compat/lib/i18n_module/mapper_parallel: Makefile
src/compat/lib/i18n_module/mapper_serial: Makefile
src/compat/lib/i18n_module/mapper_std: Makefile
src/compat/lib/i18n_module/mapper_zone: Makefile
src/compat/lib/libarch: Makefile
src/compat/lib/libasn1: Makefile
src/compat/lib/libbind9: Makefile
src/compat/lib/libbluetooth: Makefile
src/compat/lib/libbsdmalloc: Makefile
src/compat/lib/libbz2: Makefile
src/compat/lib/libc: Makefile Makefile.inc
src/compat/lib/libcom_err: Makefile
src/compat/lib/libcompat: Makefile
src/compat/lib/libcrypt: Makefile
   

CVS commit: src/external/gpl3/binutils/usr.bin/ld

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 13 09:38:22 UTC 2009

Modified Files:
src/external/gpl3/binutils/usr.bin/ld: Makefile

Log Message:
- set EMUL_LIB_PATH* for relevant mips emulations
- make sure to install the all right mips ldscripts. XXX ugly


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/binutils/usr.bin/ld/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/ld/Makefile
diff -u src/external/gpl3/binutils/usr.bin/ld/Makefile:1.6 src/external/gpl3/binutils/usr.bin/ld/Makefile:1.7
--- src/external/gpl3/binutils/usr.bin/ld/Makefile:1.6	Fri Nov 27 14:39:39 2009
+++ src/external/gpl3/binutils/usr.bin/ld/Makefile	Sun Dec 13 09:38:22 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2009/11/27 14:39:39 skrll Exp $
+#	$NetBSD: Makefile,v 1.7 2009/12/13 09:38:22 mrg Exp $
 
 .include bsd.own.mk
 
@@ -83,6 +83,12 @@
 EMUL_LIB_PATH.${f}=/usr/lib/sparc
 . else
 EMUL_LIB_PATH.${f}=/usr/lib
+. elif ${MACHINE_ARCH} == mips64el
+.  if ${f} == elf32ltsmip || ${f} == elf32btsmip
+EMUL_LIB_PATH.${f}:=/usr/lib/o32
+.  elif ${f} == elf64btsmip || ${f} == elf64btsmip
+EMUL_LIB_PATH.${f}:=/usr/lib/64
+.  endif
 . endif
 
 #GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${prefix} ${exec_prefix} @host@ @target@ @ta rget_alias@ @EMULATION_LIBPATH@ @NATIVE_LIB_DIRS@ @use_sysroot@
@@ -95,13 +101,19 @@
 		${G_target_alias} ${G_target_alias} ${G_target_alias} \
 		${G_EMUL} ${LIBDIR} yes ${f} ${G_target_alias}
 
-.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == sparc64
+.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == sparc64 || \
+${MACHINE_ARCH} == mips64el || ${MACHINE_ARCH} == mips64eb
 FILES+=		${f}.x ${f}.xbn ${f}.xn ${f}.xr ${f}.xu
 
-# XXX hack to find out if .xs exists - slow!
+# XXX hack to find out if .xs/.xc exists - slow!
 HAS_XS!=	grep '^GENERATE_SHLIB_SCRIPT' ${DIST}/ld/emulparams/${f}.sh || echo
+# XXX
+#HAS_XC!=	grep '^GENERATE_COMBRELOC_SCRIPT' ${DIST}/ld/emulparams/${f}.sh || echo
 .if !empty(HAS_XS)
 FILES+= ${f}.xc ${f}.xd ${f}.xdc ${f}.xdw ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw
+# only do this if we don't have GENERATE_SHLIB_SCRIPT
+.elif ${MACHINE_ARCH} == mips64el || ${MACHINE_ARCH} == mips64eb
+FILES+= ${f}.xc ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw
 .endif
 .endif	# x64_64 || sparc64
 



CVS commit: src/sys/arch/sgimips/mace

2009-12-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 13 11:10:50 UTC 2009

Modified Files:
src/sys/arch/sgimips/mace: mcclock_mace.c

Log Message:
Split device_t/softc, some KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sgimips/mace/mcclock_mace.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/sgimips/mace/mcclock_mace.c
diff -u src/sys/arch/sgimips/mace/mcclock_mace.c:1.12 src/sys/arch/sgimips/mace/mcclock_mace.c:1.13
--- src/sys/arch/sgimips/mace/mcclock_mace.c:1.12	Sun Dec 13 11:03:33 2009
+++ src/sys/arch/sgimips/mace/mcclock_mace.c	Sun Dec 13 11:10:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcclock_mace.c,v 1.12 2009/12/13 11:03:33 tsutsui Exp $	*/
+/*	$NetBSD: mcclock_mace.c,v 1.13 2009/12/13 11:10:50 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2001 Antti Kantee.  All Rights Reserved.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mcclock_mace.c,v 1.12 2009/12/13 11:03:33 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: mcclock_mace.c,v 1.13 2009/12/13 11:10:50 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -84,7 +84,7 @@
 #include sgimips/sgimips/clockvar.h
 
 struct mcclock_mace_softc {
-	struct device		sc_dev;
+	device_t		sc_dev;
 
 	struct todr_chip_handle sc_todrch;
 
@@ -94,12 +94,12 @@
 
 static struct mcclock_mace_softc *mace0 = NULL;
 
-static int	mcclock_mace_match(struct device *, struct cfdata *, void *);
-static void	mcclock_mace_attach(struct device*, struct device *, void *);
+static int	mcclock_mace_match(device_t, cfdata_t, void *);
+static void	mcclock_mace_attach(device_t, device_t, void *);
 
-static int	mcclock_mace_gettime_ymdhms(struct todr_chip_handle *,
+static int	mcclock_mace_gettime_ymdhms(todr_chip_handle_t,
 struct clock_ymdhms *);
-static int	mcclock_mace_settime_ymdhms(struct todr_chip_handle *,
+static int	mcclock_mace_settime_ymdhms(todr_chip_handle_t,
 struct clock_ymdhms *);
 
 unsigned int	ds1687_read(void *arg, unsigned int addr);
@@ -108,21 +108,23 @@
 void		mcclock_poweroff(void);
 
 
-CFATTACH_DECL(mcclock_mace, sizeof(struct mcclock_mace_softc),
+CFATTACH_DECL_NEW(mcclock_mace, sizeof(struct mcclock_mace_softc),
 mcclock_mace_match, mcclock_mace_attach, NULL, NULL);
 
 static int
-mcclock_mace_match(struct device *parent, struct cfdata *match, void *aux)
+mcclock_mace_match(device_t parent, cfdata_t cf, void *aux)
 {
+
 	return 1;
 }
 
 void
-mcclock_mace_attach(struct device *parent, struct device *self, void *aux)
+mcclock_mace_attach(device_t parent, device_t self, void *aux)
 {
-	struct mcclock_mace_softc *sc = (void *)self;
+	struct mcclock_mace_softc *sc = device_private(self);
 	struct mace_attach_args *maa = aux;
 
+	sc-sc_dev = self;
 	sc-sc_st = maa-maa_st;
 	/* XXX should be bus_space_map() */
 	if (bus_space_subregion(maa-maa_st, maa-maa_sh,
@@ -161,25 +163,23 @@
 unsigned int
 ds1687_read(void *arg, unsigned int addr)
 {
-	struct mcclock_mace_softc *sc = (struct mcclock_mace_softc *)arg;
+	struct mcclock_mace_softc *sc = arg;
 
-	return (bus_space_read_1(sc-sc_st, sc-sc_sh, addr));
+	return bus_space_read_1(sc-sc_st, sc-sc_sh, addr);
 }
 
 void
 ds1687_write(void *arg, unsigned int addr, unsigned int data)
 {
-	struct mcclock_mace_softc *sc = (struct mcclock_mace_softc *)arg;
+	struct mcclock_mace_softc *sc = arg;
 
 	bus_space_write_1(sc-sc_st, sc-sc_sh, addr, data);
 }
 
 static int
-mcclock_mace_gettime_ymdhms(struct todr_chip_handle *todrch,
-struct clock_ymdhms *dt)
+mcclock_mace_gettime_ymdhms(todr_chip_handle_t todrch, struct clock_ymdhms *dt)
 {
-	struct mcclock_mace_softc *sc =
-	(struct mcclock_mace_softc *)todrch-cookie;
+	struct mcclock_mace_softc *sc = todrch-cookie;
 	ds1687_todregs regs;
 	int s;
 
@@ -196,15 +196,13 @@
 	dt-dt_year = FROMBCD(regs[DS1687_SOFT_YEAR]) +
 	(100 * FROMBCD(regs[DS1687_SOFT_CENTURY]));
 
-	return (0);
+	return 0;
 }
 
 static int
-mcclock_mace_settime_ymdhms(struct todr_chip_handle *todrch,
-struct clock_ymdhms *dt)
+mcclock_mace_settime_ymdhms(todr_chip_handle_t todrch, struct clock_ymdhms *dt)
 {
-	struct mcclock_mace_softc *sc =
-	(struct mcclock_mace_softc *)todrch-cookie;
+	struct mcclock_mace_softc *sc = todrch-cookie;
 	ds1687_todregs regs;
 	int s;
 
@@ -222,7 +220,7 @@
 	DS1687_PUTTOD(sc, regs);
 	splx(s);
 
-	return (0);
+	return 0;
 }
 
 void
@@ -254,5 +252,6 @@
 	ds1687_write(mace0, DS1687_BANK1_XCTRL4A, xctl_a | DS1687_X4A_PAB);
 	ds1687_write(mace0, DS1687_CONTROLA, a);
 	wbflush();
-	while(1);
+	for (;;)
+		;
 }



CVS commit: src/sys/arch

2009-12-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 13 11:24:04 UTC 2009

Modified Files:
src/sys/arch/cesfic/cesfic: locore.s
src/sys/arch/hp300/hp300: locore.s
src/sys/arch/luna68k/luna68k: locore.s
src/sys/arch/mvme68k/mvme68k: locore.s
src/sys/arch/news68k/news68k: locore.s
src/sys/arch/next68k/next68k: locore.s
src/sys/arch/x68k/x68k: locore.s

Log Message:
Now we have Sysseg_pa value so no need to calculate it from KVA Sysseg.
Tested on hp300.

XXX: mac68k seems to have a different VA vs PA mechanism so I leave it for now.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cesfic/cesfic/locore.s
cvs rdiff -u -r1.150 -r1.151 src/sys/arch/hp300/hp300/locore.s
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/mvme68k/mvme68k/locore.s
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/next68k/next68k/locore.s
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/x68k/x68k/locore.s

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/cesfic/cesfic/locore.s
diff -u src/sys/arch/cesfic/cesfic/locore.s:1.20 src/sys/arch/cesfic/cesfic/locore.s:1.21
--- src/sys/arch/cesfic/cesfic/locore.s:1.20	Fri Dec 11 18:28:35 2009
+++ src/sys/arch/cesfic/cesfic/locore.s	Sun Dec 13 11:24:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.20 2009/12/11 18:28:35 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.21 2009/12/13 11:24:02 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -245,7 +245,7 @@
 	RELOC(physmem, %a0)
 	movl	%d1,%a0@		| and physmem
 /* configure kernel and lwp0 VA space so we can get going */
-	.globl	_Sysseg, _pmap_bootstrap, _avail_start
+	.globl	_Sysseg_pa, _pmap_bootstrap, _avail_start
 #if NKSYMS || defined(DDB) || defined(LKM)
 	RELOC(esym,%a0)			| end of static kernel test/data/syms
 	movl	%a0@,%d5
@@ -267,9 +267,8 @@
 /*
  * Prepare to enable MMU.
  */
-	RELOC(Sysseg, %a0)		| system segment table addr
-	movl	%a0@,%d1		| read value (a KVA)
-	addl	%a5,%d1			| convert to PA
+	RELOC(Sysseg_pa, %a0)		| system segment table addr
+	movl	%a0@,%d1		| read value (a PA)
 	subl	#KERNBASE, %d1
 
 	RELOC(mmutype, %a0)

Index: src/sys/arch/hp300/hp300/locore.s
diff -u src/sys/arch/hp300/hp300/locore.s:1.150 src/sys/arch/hp300/hp300/locore.s:1.151
--- src/sys/arch/hp300/hp300/locore.s:1.150	Sat Dec 12 16:37:22 2009
+++ src/sys/arch/hp300/hp300/locore.s	Sun Dec 13 11:24:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.150 2009/12/12 16:37:22 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.151 2009/12/13 11:24:02 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -453,9 +453,8 @@
  *
  * Is this all really necessary, or am I paranoid??
  */
-	RELOC(Sysseg, %a0)		| system segment table addr
-	movl	%a0@,%d1		| read value (a KVA)
-	addl	%a5,%d1			| convert to PA
+	RELOC(Sysseg_pa, %a0)		| system segment table addr
+	movl	%a0@,%d1		| read value (a PA)
 	RELOC(mmutype, %a0)
 	tstl	%a0@			| HP MMU?
 	jeq	Lhpmmu2			| yes, skip

Index: src/sys/arch/luna68k/luna68k/locore.s
diff -u src/sys/arch/luna68k/luna68k/locore.s:1.32 src/sys/arch/luna68k/luna68k/locore.s:1.33
--- src/sys/arch/luna68k/luna68k/locore.s:1.32	Fri Dec 11 18:28:35 2009
+++ src/sys/arch/luna68k/luna68k/locore.s	Sun Dec 13 11:24:02 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.32 2009/12/11 18:28:35 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.33 2009/12/13 11:24:02 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -267,9 +267,8 @@
  * Enable the MMU.
  * Since the kernel is mapped logical == physical, we just turn it on.
  */
-	RELOC(Sysseg,%a0)		| system segment table addr
-	movl	%a0@,%d1		| read value (a KVA)
-	addl	%a5,%d1			| convert to PA (%a5 == 0, indeed)
+	RELOC(Sysseg_pa,%a0)		| system segment table addr
+	movl	%a0@,%d1		| read value (a PA)
 #if defined(M68040)
 	RELOC(mmutype,%a0)
 	cmpl	#MMU_68040,%a0@		| 68040?

Index: src/sys/arch/mvme68k/mvme68k/locore.s
diff -u src/sys/arch/mvme68k/mvme68k/locore.s:1.103 src/sys/arch/mvme68k/mvme68k/locore.s:1.104
--- src/sys/arch/mvme68k/mvme68k/locore.s:1.103	Fri Dec 11 18:28:35 2009
+++ src/sys/arch/mvme68k/mvme68k/locore.s	Sun Dec 13 11:24:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.103 2009/12/11 18:28:35 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.104 2009/12/13 11:24:03 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -610,9 +610,8 @@
  * Enable the MMU.
  * Since the kernel is mapped logical == physical, we just turn it on.
  */
-	RELOC(Sysseg, %a0)		| system segment table addr
-	movl	%a0@,%d1		| read value (a KVA)
-	addl	%a5,%d1			| convert to PA
+	RELOC(Sysseg_pa, %a0)		| system segment table addr
+	movl	%a0@,%d1		| read value (a PA)
 	RELOC(mmutype, %a0)
 	cmpl	#MMU_68040,%a0@		| 68040?
 	jne	Lmotommu1		| no, skip

Index: src/sys/arch/news68k/news68k/locore.s
diff -u 

CVS commit: src/sys/arch/hp300/hp300

2009-12-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 13 12:21:27 UTC 2009

Modified Files:
src/sys/arch/hp300/hp300: genassym.cf locore.s

Log Message:
Replace a couple of magic numbers with proper macro.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp300/hp300/genassym.cf
cvs rdiff -u -r1.151 -r1.152 src/sys/arch/hp300/hp300/locore.s

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/hp300/hp300/genassym.cf
diff -u src/sys/arch/hp300/hp300/genassym.cf:1.40 src/sys/arch/hp300/hp300/genassym.cf:1.41
--- src/sys/arch/hp300/hp300/genassym.cf:1.40	Thu Dec 10 05:10:01 2009
+++ src/sys/arch/hp300/hp300/genassym.cf	Sun Dec 13 12:21:26 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.40 2009/12/10 05:10:01 rmind Exp $
+#	$NetBSD: genassym.cf,v 1.41 2009/12/13 12:21:26 tsutsui Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -203,6 +203,8 @@
 define	MMU_CEN			MMU_CEN
 define	MMU_IEN			MMU_IEN
 define	MMU_FPE			MMU_FPE
+define	DC_FREEZE		DC_FREEZE
+define	CACHE40_ON		CACHE40_ON
 define	CACHE_ON		CACHE_ON
 define	CACHE_OFF		CACHE_OFF
 define	CACHE_CLR		CACHE_CLR

Index: src/sys/arch/hp300/hp300/locore.s
diff -u src/sys/arch/hp300/hp300/locore.s:1.151 src/sys/arch/hp300/hp300/locore.s:1.152
--- src/sys/arch/hp300/hp300/locore.s:1.151	Sun Dec 13 11:24:02 2009
+++ src/sys/arch/hp300/hp300/locore.s	Sun Dec 13 12:21:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.151 2009/12/13 11:24:02 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.152 2009/12/13 12:21:26 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -205,7 +205,7 @@
 
 /* determine our CPU/MMU combo - check for all regardless of kernel config */
 	movl	#INTIOBASE+MMUBASE,%a1
-	movl	#0x200,%d0		| data freeze bit
+	movl	#DC_FREEZE,%d0		| data freeze bit
 	movc	%d0,%cacr		|   only exists on 68030
 	movc	%cacr,%d0		| read it back
 	tstl	%d0			| zero?
@@ -528,7 +528,7 @@
 	movl	#0x8000,%d0
 #endif
 	.long	0x4e7b0003		| movc %d0,%tc
-	movl	#0x80008000,%d0
+	movl	#CACHE40_ON,%d0
 	movc	%d0,%cacr		| turn on both caches
 	jmp	Lenab1:l		| forced not be pc-relative
 Lmotommu2:



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

2009-12-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 13 12:32:46 UTC 2009

Modified Files:
src/sys/arch/m68k/include: pmap_motorola.h

Log Message:
- update some comments
- use unsigned constant for shift op


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/m68k/include/pmap_motorola.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/m68k/include/pmap_motorola.h
diff -u src/sys/arch/m68k/include/pmap_motorola.h:1.27 src/sys/arch/m68k/include/pmap_motorola.h:1.28
--- src/sys/arch/m68k/include/pmap_motorola.h:1.27	Fri Dec 11 18:57:44 2009
+++ src/sys/arch/m68k/include/pmap_motorola.h	Sun Dec 13 12:32:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_motorola.h,v 1.27 2009/12/11 18:57:44 tsutsui Exp $	*/
+/*	$NetBSD: pmap_motorola.h,v 1.28 2009/12/13 12:32:46 tsutsui Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -101,8 +101,8 @@
  * We are using following segment layout in m68k pmap_motorola.c:
  * 68020/030 4KB/page: l1,l2,page== 10,10,12	(%tc = 0x82c0aa00)
  * 68020/030 8KB/page: l1,l2,page==  8,11,13	(%tc = 0x82d08b00)
- * 68040/060 4KB/page: l1,l2,l3,page == 7,7,6,12
- * 68040/060 8KB/page: l1,l2,l3,page == 7,7,5,13
+ * 68040/060 4KB/page: l1,l2,l3,page == 7,7,6,12	(%tc = 0x8000)
+ * 68040/060 8KB/page: l1,l2,l3,page == 7,7,5,13	(%tc = 0xc000)
  *
  * 68020/030 l2 size is chosen per NPTEPG, a number of page table entries
  * per page, to use one whole page for PTEs per one segment table entry,
@@ -152,18 +152,20 @@
  * (block 31).  For convenience, the level 1 table is considered to be
  * block 0.
  *
- * MAX[KU]L2SIZE control how many pages of level 2 descriptors are allowed.
- * for the kernel and users.  8 implies only the initial segment table
- * page is used.  WARNING: don't change MAXUL2SIZE unless you can allocate
- * physically contiguous pages for the ST in pmap.c!
+ * MAX[KU]L2SIZE control how many pages of level 2 descriptors are allowed
+ * for the kernel and users.
+ * 16 or 8 implies only the initial segment table page is used,
+ * i.e. it means PAGE_SIZE / (SG4_LEV1SIZE * sizeof(st_entry_t)).
+ * WARNING: don't change MAXUL2SIZE unless you can allocate
+ * physically contiguous pages for the ST in pmap_motorola.c!
  */
 #define MAXKL2SIZE	32
-#if PAGE_SIZE == 8192
+#if PAGE_SIZE == 8192	/* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */
 #define MAXUL2SIZE	16
 #else
 #define MAXUL2SIZE	8
 #endif
-#define l2tobm(n)	(1  (n))
+#define l2tobm(n)	(1U  (n))
 #define bmtol2(n)	(ffs(n) - 1)
 
 /*



CVS commit: src/doc

2009-12-13 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Sun Dec 13 16:48:56 UTC 2009

Modified Files:
src/doc: 3RDPARTY

Log Message:
note release of ntp 4.2.6


To generate a diff of this commit:
cvs rdiff -u -r1.738 -r1.739 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.738 src/doc/3RDPARTY:1.739
--- src/doc/3RDPARTY:1.738	Tue Dec  8 21:54:22 2009
+++ src/doc/3RDPARTY	Sun Dec 13 16:48:56 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.738 2009/12/08 21:54:22 kardel Exp $
+#	$NetBSD: 3RDPARTY,v 1.739 2009/12/13 16:48:56 kardel Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -693,7 +693,7 @@
 HAVE_STRICT_ALIGNMENT.  Fix RCS IDs, import.
 
 Package:	ntp
-Version:	4.2.4p8
+Version:	4.2.6
 Current Vers:	4.2.4p8
 Maintainer:	David L. Mills mi...@udel.edu
 Archive Site:	ftp://ftp.udel.edu/pub/ntp/ntp4/



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

2009-12-13 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Sun Dec 13 16:57:37 UTC 2009

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

Log Message:
Import ntp 4.2.6

Status:

Vendor Tag: UDEL
Release Tags:   ntp-4-2-6

N src/external/bsd/ntp/dist/CommitLog-4.1.0
N src/external/bsd/ntp/dist/COPYRIGHT
N src/external/bsd/ntp/dist/ChangeLog
N src/external/bsd/ntp/dist/CommitLog
N src/external/bsd/ntp/dist/Makefile.am
N src/external/bsd/ntp/dist/INSTALL
N src/external/bsd/ntp/dist/NOTES.y2kfixes
N src/external/bsd/ntp/dist/Makefile.in
N src/external/bsd/ntp/dist/NEWS
N src/external/bsd/ntp/dist/README.bk
N src/external/bsd/ntp/dist/README
N src/external/bsd/ntp/dist/README.hackers
N src/external/bsd/ntp/dist/README.patches
N src/external/bsd/ntp/dist/README.refclocks
N src/external/bsd/ntp/dist/README.versions
N src/external/bsd/ntp/dist/TODO
N src/external/bsd/ntp/dist/WHERE-TO-START
N src/external/bsd/ntp/dist/aclocal.m4
N src/external/bsd/ntp/dist/bincheck.mf
N src/external/bsd/ntp/dist/bootstrap
N src/external/bsd/ntp/dist/build
N src/external/bsd/ntp/dist/compile
N src/external/bsd/ntp/dist/config.guess
N src/external/bsd/ntp/dist/config.h.in
N src/external/bsd/ntp/dist/config.sub
N src/external/bsd/ntp/dist/configure
N src/external/bsd/ntp/dist/configure.ac
N src/external/bsd/ntp/dist/depcomp
N src/external/bsd/ntp/dist/deps-ver
N src/external/bsd/ntp/dist/depsver.mf
N src/external/bsd/ntp/dist/dot.emacs
N src/external/bsd/ntp/dist/excludes
N src/external/bsd/ntp/dist/flock-build
N src/external/bsd/ntp/dist/install-sh
N src/external/bsd/ntp/dist/ltmain.sh
N src/external/bsd/ntp/dist/missing
N src/external/bsd/ntp/dist/packageinfo.sh
N src/external/bsd/ntp/dist/readme.y2kfixes
N src/external/bsd/ntp/dist/results.y2kfixes
N src/external/bsd/ntp/dist/version.m4
N src/external/bsd/ntp/dist/version
N src/external/bsd/ntp/dist/ylwrap
N src/external/bsd/ntp/dist/ElectricFence/efence.h
N src/external/bsd/ntp/dist/ElectricFence/Makefile.am
N src/external/bsd/ntp/dist/ElectricFence/README
N src/external/bsd/ntp/dist/ElectricFence/Makefile.in
N src/external/bsd/ntp/dist/ElectricFence/COPYING
N src/external/bsd/ntp/dist/ElectricFence/efence.c
N src/external/bsd/ntp/dist/ElectricFence/page.c
N src/external/bsd/ntp/dist/ElectricFence/print.c
N src/external/bsd/ntp/dist/ElectricFence/eftest.c
N src/external/bsd/ntp/dist/ElectricFence/tstheap.c
N src/external/bsd/ntp/dist/ElectricFence/libefence.3
N src/external/bsd/ntp/dist/ElectricFence/CHANGES
N src/external/bsd/ntp/dist/adjtimed/adjtimed.c
N src/external/bsd/ntp/dist/adjtimed/Makefile.am
N src/external/bsd/ntp/dist/adjtimed/README
N src/external/bsd/ntp/dist/adjtimed/Makefile.in
N src/external/bsd/ntp/dist/clockstuff/chutest.c
N src/external/bsd/ntp/dist/clockstuff/Makefile.am
N src/external/bsd/ntp/dist/clockstuff/README
N src/external/bsd/ntp/dist/clockstuff/Makefile.in
N src/external/bsd/ntp/dist/clockstuff/clktest.c
N src/external/bsd/ntp/dist/clockstuff/propdelay.c
N src/external/bsd/ntp/dist/arlib/arlib.h
N src/external/bsd/ntp/dist/arlib/configure.in
N src/external/bsd/ntp/dist/arlib/README
N src/external/bsd/ntp/dist/arlib/aclocal.m4
N src/external/bsd/ntp/dist/arlib/arlib.c
N src/external/bsd/ntp/dist/arlib/Makefile.am
N src/external/bsd/ntp/dist/arlib/Makefile.in
N src/external/bsd/ntp/dist/arlib/configure
N src/external/bsd/ntp/dist/arlib/COPYING
N src/external/bsd/ntp/dist/arlib/INSTALL
N src/external/bsd/ntp/dist/arlib/depcomp
N src/external/bsd/ntp/dist/arlib/install-sh
N src/external/bsd/ntp/dist/arlib/missing
N src/external/bsd/ntp/dist/arlib/arplib.h
N src/external/bsd/ntp/dist/arlib/sample.c
N src/external/bsd/ntp/dist/arlib/arlib.3
N src/external/bsd/ntp/dist/arlib/UNSHAR.HDR
N src/external/bsd/ntp/dist/conf/beauregard.conf
N src/external/bsd/ntp/dist/conf/baldwin.conf
N src/external/bsd/ntp/dist/conf/README
N src/external/bsd/ntp/dist/conf/grundoon.conf
N src/external/bsd/ntp/dist/conf/malarky.conf
N src/external/bsd/ntp/dist/conf/pogo.conf
N src/external/bsd/ntp/dist/conf/rackety.conf
N src/external/bsd/ntp/dist/html/copyright.html
N src/external/bsd/ntp/dist/html/extern.html
N src/external/bsd/ntp/dist/html/sntp.html
N src/external/bsd/ntp/dist/html/prefer.html
N src/external/bsd/ntp/dist/html/ntptrace.html
N src/external/bsd/ntp/dist/html/debug.html
N src/external/bsd/ntp/dist/html/comdex.html
N src/external/bsd/ntp/dist/html/config.html
N src/external/bsd/ntp/dist/html/manyopt.html
N src/external/bsd/ntp/dist/html/assoc.html
N src/external/bsd/ntp/dist/html/sitemap.html
N src/external/bsd/ntp/dist/html/keygen.html
N src/external/bsd/ntp/dist/html/ntpd.html
N src/external/bsd/ntp/dist/html/release.html
N src/external/bsd/ntp/dist/html/ntpdc.html
N src/external/bsd/ntp/dist/html/audio.html
N src/external/bsd/ntp/dist/html/xleave.html
N src/external/bsd/ntp/dist/html/hints.html
N src/external/bsd/ntp/dist/html/howto.html
N src/external/bsd/ntp/dist/html/quick.html
N 

CVS commit: src/external/bsd/ntp

2009-12-13 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Sun Dec 13 17:13:49 UTC 2009

Added Files:
src/external/bsd/ntp: Makefile Makefile.inc importdate ntp2netbsd
src/external/bsd/ntp/bin: Makefile Makefile.inc
src/external/bsd/ntp/bin/ntp-keygen: Makefile
src/external/bsd/ntp/bin/ntpd: Makefile
src/external/bsd/ntp/bin/ntpdate: Makefile
src/external/bsd/ntp/bin/ntpdc: Makefile
src/external/bsd/ntp/bin/ntpq: Makefile
src/external/bsd/ntp/bin/ntptime: Makefile
src/external/bsd/ntp/include: config.h
src/external/bsd/ntp/lib: Makefile Makefile.inc
src/external/bsd/ntp/lib/libiscntp: Makefile
src/external/bsd/ntp/lib/libntp: Makefile
src/external/bsd/ntp/lib/libopts: Makefile
src/external/bsd/ntp/lib/libparse: Makefile
src/external/bsd/ntp/scripts: mkver

Log Message:
initial version of reachover make- and support-files


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/Makefile \
src/external/bsd/ntp/Makefile.inc src/external/bsd/ntp/importdate \
src/external/bsd/ntp/ntp2netbsd
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/bin/Makefile \
src/external/bsd/ntp/bin/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/bin/ntp-keygen/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/bin/ntpd/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/bin/ntpdate/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/bin/ntpdc/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/bin/ntpq/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/bin/ntptime/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/include/config.h
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/lib/Makefile \
src/external/bsd/ntp/lib/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/lib/libiscntp/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/lib/libntp/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/lib/libopts/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/lib/libparse/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/ntp/scripts/mkver

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

Added files:

Index: src/external/bsd/ntp/Makefile
diff -u /dev/null src/external/bsd/ntp/Makefile:1.1
--- /dev/null	Sun Dec 13 17:13:49 2009
+++ src/external/bsd/ntp/Makefile	Sun Dec 13 17:13:49 2009
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/13 17:13:49 kardel Exp $
+
+SUBDIR+= lib .WAIT bin
+
+.include bsd.subdir.mk
Index: src/external/bsd/ntp/Makefile.inc
diff -u /dev/null src/external/bsd/ntp/Makefile.inc:1.1
--- /dev/null	Sun Dec 13 17:13:49 2009
+++ src/external/bsd/ntp/Makefile.inc	Sun Dec 13 17:13:48 2009
@@ -0,0 +1,57 @@
+#	$NetBSD: Makefile.inc,v 1.1 2009/12/13 17:13:48 kardel Exp $
+
+.if !defined(NTP_MAKEFILE_INC)
+NTP_MAKEFILE_INC=yes
+
+USE_FORT?= yes	# network client/server
+
+WARNS?=	0
+
+.include bsd.own.mk
+
+.if ${MKCRYPTO} == no
+NTP_USE_OPENSSL?=no
+.endif
+
+IDIST=		${NETBSDSRCDIR}/external/bsd/ntp/dist
+NTP_SRCDIR=	${NETBSDSRCDIR}/external/bsd/ntp
+NTP_HTMLDIR=	/usr/share/doc/html/ntp
+
+SYSCONFDIR=/etc
+LOCALSTATEDIR=/var
+
+CPPFLAGS+=-DHAVE_CONFIG_H
+CPPFLAGS+=-I${NTP_SRCDIR}/include \
+	  -I${IDIST}/include \
+	  -I${IDIST}/lib/isc/include \
+	  -I${IDIST}/lib/isc/unix/include \
+	  -I${IDIST}/lib/isc/nothreads/include
+
+.if defined(PROG)
+LIBNTP!=	cd ${.CURDIR}/../../lib/libntp  ${PRINTOBJDIR}
+LIBISC!=	cd ${.CURDIR}/../../lib/libiscntp  ${PRINTOBJDIR}
+LIBOPTS!=	cd ${.CURDIR}/../../lib/libopts  ${PRINTOBJDIR}
+LIBPARSE!=	cd ${.CURDIR}/../../lib/libparse  ${PRINTOBJDIR}
+
+LDADD+=		-L${LIBNTP} -lntp -L${LIBOPTS} -lopts
+DPADD+=		${LIBNTP}/libntp.a ${LIBOPTS}/libopts.a
+
+.if (${MKCRYPTO} != no)
+LDADD+=		-lcrypto -lcrypt
+DPADD+=		${LIBCRYPTO} ${LIBCRYPT}
+.endif
+
+SRCS+=	version.c
+
+CLEANFILES+=version.c version.o
+version.c: ${LIBNTP}/libntp.a ${.CURDIR}/../../scripts/mkver ${.CURDIR}/../../importdate
+	${_MKTARGET_CREATE}
+	${HOST_SH} ${.CURDIR}/../../scripts/mkver ${PROG}  /dev/null
+
+.endif # defined(PROG)
+
+.if exists(${.CURDIR}/../../Makefile.inc)
+.include ${.CURDIR}/../../Makefile.inc
+.endif
+
+.endif
\ No newline at end of file
Index: src/external/bsd/ntp/importdate
diff -u /dev/null src/external/bsd/ntp/importdate:1.1
--- /dev/null	Sun Dec 13 17:13:49 2009
+++ src/external/bsd/ntp/importdate	Sun Dec 13 17:13:48 2009
@@ -0,0 +1 @@
+Sun Dec 13 14:48:32 UTC 2009 (import)
Index: src/external/bsd/ntp/ntp2netbsd
diff -u /dev/null src/external/bsd/ntp/ntp2netbsd:1.1
--- /dev/null	Sun Dec 13 17:13:49 2009
+++ src/external/bsd/ntp/ntp2netbsd	Sun Dec 13 17:13:48 2009
@@ -0,0 +1,139 @@
+#! /bin/sh
+#
+#	$NetBSD: ntp2netbsd,v 1.1 2009/12/13 17:13:48 kardel Exp $
+#
+# Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following 

CVS commit: src/share/man/man4

2009-12-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec 13 17:31:53 UTC 2009

Modified Files:
src/share/man/man4: ral.4

Log Message:
Add Hama WLAN PCI Card 54 Mbps to recognized cards. Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/ral.4

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

Modified files:

Index: src/share/man/man4/ral.4
diff -u src/share/man/man4/ral.4:1.7 src/share/man/man4/ral.4:1.8
--- src/share/man/man4/ral.4:1.7	Mon Mar  9 19:24:28 2009
+++ src/share/man/man4/ral.4	Sun Dec 13 17:31:53 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: ral.4,v 1.7 2009/03/09 19:24:28 joerg Exp $
+.\ $NetBSD: ral.4,v 1.8 2009/12/13 17:31:53 wiz Exp $
 .\ $OpenBSD: ral.4,v 1.53 2006/05/06 17:26:25 jmc Exp $
 .\
 .\ Copyright (c) 2005, 2006
@@ -16,7 +16,7 @@
 .\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\
-.Dd June 7, 2006
+.Dd December 13, 2009
 .Dt RAL 4
 .Os
 .Sh NAME
@@ -267,6 +267,7 @@
 Fiberline WL-400P.
 Foxconn WLL-3350.
 Gigabyte GN-WPKG.
+Hama WLAN PCI Card 54 Mbps.
 Hawking HWP54GR.
 Hercules HWGPCI-54.
 iNexQ CR054g-009 (R03).



CVS commit: src/compat

2009-12-13 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 13 17:58:27 UTC 2009

Modified Files:
src/compat: README

Log Message:
Fix a few typos.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/compat/README

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

Modified files:

Index: src/compat/README
diff -u src/compat/README:1.4 src/compat/README:1.5
--- src/compat/README:1.4	Sun Dec 13 09:27:57 2009
+++ src/compat/README	Sun Dec 13 17:58:27 2009
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.4 2009/12/13 09:27:57 mrg Exp $
+$NetBSD: README,v 1.5 2009/12/13 17:58:27 snj Exp $
 
 
 Building multi- ABI libraries for NetBSD platforms.
@@ -6,7 +6,7 @@
 
 src/compat has a framework to (re)build the libraries shipped with
 NetBSD for a different ABI than the default for that platform.  This
-allow 32-bit libraries for the amd64 and sparc64 ports, and enables
+allows 32-bit libraries for the amd64 and sparc64 ports, and enables
 the mips64 port to support all three of old-style 32-bit (o32), the
 new 32-bit (default, n32, 64-bit CPU required) or the 64-bit ABI.
 
@@ -16,7 +16,7 @@
 of options.  Each platform wanting support should create their port
 subdirectory directly in src/compat, and then one subdirectory in here
 for each ABI required.  e.g., src/compat/amd64/i386 is where we build
-the 32-bit compat libraries for the amd64port.  In each of these
+the 32-bit compat libraries for the amd64 port.  In each of these
 subdirs, a small Makefile and makefile fragment should exist.  The
 Makefile should set BSD_MK_COMPAT_FILE to equal the fragment, and then
 include ../../Makefile.common.  Eg, amd64/i386/Makefile has:
@@ -28,7 +28,7 @@
 In the makefile fragment any changes to ABI flags are passed here
 and the MLIBDIR variable must be set to the subdirectory in /usr/lib
 where libraries for the ABI will be installed.  There are a couple of
-helper Makefile's around.  amd64/i386/bsd.i386.mk looks like:
+helper Makefiles around.  amd64/i386/bsd.i386.mk looks like:
 
 	LD+=			-m elf_i386
 	MLIBDIR=		i386



CVS commit: src/sys

2009-12-13 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sun Dec 13 18:27:02 UTC 2009

Modified Files:
src/sys/kern: sys_pipe.c
src/sys/sys: pipe.h

Log Message:
Revert most of the previous change.
Only one fd needs clobbering, not all fds that reference the pipe.
This may be what ad@ realised when he tried to add the same code to
sockets. Unfixes part of PR/26567.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/kern/sys_pipe.c
cvs rdiff -u -r1.30 -r1.31 src/sys/sys/pipe.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/sys_pipe.c
diff -u src/sys/kern/sys_pipe.c:1.123 src/sys/kern/sys_pipe.c:1.124
--- src/sys/kern/sys_pipe.c:1.123	Sat Dec 12 21:28:04 2009
+++ src/sys/kern/sys_pipe.c	Sun Dec 13 18:27:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_pipe.c,v 1.123 2009/12/12 21:28:04 dsl Exp $	*/
+/*	$NetBSD: sys_pipe.c,v 1.124 2009/12/13 18:27:02 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_pipe.c,v 1.123 2009/12/12 21:28:04 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_pipe.c,v 1.124 2009/12/13 18:27:02 dsl Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -542,12 +542,8 @@
 		 * Detect EOF condition.
 		 * Read returns 0 on EOF, no need to set error.
 		 */
-		if (rpipe-pipe_state  (PIPE_EOF | PIPE_ABORTED)) {
-			if (rpipe-pipe_state  PIPE_ABORTED)
-/* Another thread has called close() */
-error = EBADF;
+		if (rpipe-pipe_state  PIPE_EOF)
 			break;
-		}
 
 		/*
 		 * Don't block on non-blocking I/O.
@@ -984,13 +980,6 @@
 break;
 			}
 
-			if (wpipe-pipe_state  PIPE_ABORTED) {
-/* Another thread has called close() */
-if (uio-uio_resid == 0)
-	error = EBADF;
-break;
-			}
-
 			/*
 			 * We have no more space and have something to offer,
 			 * wake up select/poll.
@@ -1220,9 +1209,14 @@
 {
 	struct pipe *pipe = fp-f_data;
 
-	/* Unblock blocked reads/writes - they will return EBADF. */
+	/*
+	 * Unblock blocked reads/writes in order to allow close() to complete.
+	 * This isn't going to work yet!
+	 * The underlying problem is that only the 'fd' in question needs
+	 * its operations terminating, the pipe itself my be open via
+	 * other fd.
+	 */
 	mutex_enter(pipe-pipe_lock);
-	pipe-pipe_state |= PIPE_ABORTED;
 	cv_broadcast(pipe-pipe_rcv);
 	cv_broadcast(pipe-pipe_wcv);
 	mutex_exit(pipe-pipe_lock);

Index: src/sys/sys/pipe.h
diff -u src/sys/sys/pipe.h:1.30 src/sys/sys/pipe.h:1.31
--- src/sys/sys/pipe.h:1.30	Sat Dec 12 21:28:04 2009
+++ src/sys/sys/pipe.h	Sun Dec 13 18:27:02 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: pipe.h,v 1.30 2009/12/12 21:28:04 dsl Exp $ */
+/* $NetBSD: pipe.h,v 1.31 2009/12/13 18:27:02 dsl Exp $ */
 
 /*
  * Copyright (c) 1996 John S. Dyson
@@ -96,7 +96,6 @@
    pointers/data. */
 #define	PIPE_LWANT	0x200	/* Process wants exclusive access to
    pointers/data. */
-#define	PIPE_ABORTED	0x400	/* fo_abort()ed, unblock read/write */
 
 /*
  * Per-pipe data structure.



CVS commit: src/sys/kern

2009-12-13 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sun Dec 13 20:02:23 UTC 2009

Modified Files:
src/sys/kern: sys_pipe.c

Log Message:
Another, better, fix for PR/26567.
Only sleep once within each pipe_read/pipe_write call.
If there is no data/space available after we wakeup return ERESTART so
then the 'fd' number is validated again.
A simple broadcast of the cvs is then enough to evict the correct threads
when close() is called from an active thread.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/kern/sys_pipe.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/sys_pipe.c
diff -u src/sys/kern/sys_pipe.c:1.124 src/sys/kern/sys_pipe.c:1.125
--- src/sys/kern/sys_pipe.c:1.124	Sun Dec 13 18:27:02 2009
+++ src/sys/kern/sys_pipe.c	Sun Dec 13 20:02:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_pipe.c,v 1.124 2009/12/13 18:27:02 dsl Exp $	*/
+/*	$NetBSD: sys_pipe.c,v 1.125 2009/12/13 20:02:23 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_pipe.c,v 1.124 2009/12/13 18:27:02 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_pipe.c,v 1.125 2009/12/13 20:02:23 dsl Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -449,6 +449,7 @@
 	size_t nread = 0;
 	size_t size;
 	size_t ocnt;
+	int slept = 0;
 
 	mutex_enter(lock);
 	++rpipe-pipe_busy;
@@ -566,6 +567,7 @@
 		if ((rpipe-pipe_state  PIPE_DIRECTR) != 0)
 			goto again;
 
+#if 1   /* XXX (dsl) I'm sure these aren't needed here ... */
 		/*
 		 * We want to read more, wake up select/poll.
 		 */
@@ -575,11 +577,18 @@
 		 * If the write-side is blocked, wake it up now.
 		 */
 		cv_broadcast(rpipe-pipe_wcv);
+#endif
+
+		if (slept) {
+			error = ERESTART;
+			goto unlocked_error;
+		}
 
 		/* Now wait until the pipe is filled */
 		error = cv_wait_sig(rpipe-pipe_rcv, lock);
 		if (error != 0)
 			goto unlocked_error;
+		slept = 1;
 		goto again;
 	}
 
@@ -814,6 +823,7 @@
 	struct pipebuf *bp;
 	kmutex_t *lock;
 	int error;
+	int slept = 0;
 
 	/* We want to write to our peer */
 	rpipe = (struct pipe *) fp-f_data;
@@ -987,6 +997,11 @@
 			if (bp-cnt)
 pipeselwakeup(wpipe, wpipe, POLL_IN);
 
+			if (slept) {
+error = ERESTART;
+break;
+			}
+
 			pipeunlock(wpipe);
 			error = cv_wait_sig(wpipe-pipe_wcv, lock);
 			(void)pipelock(wpipe, 0);
@@ -1000,6 +1015,7 @@
 error = EPIPE;
 break;
 			}
+			slept = 1;
 		}
 	}
 



CVS commit: othersrc/lib/libfsu_mount

2009-12-13 Thread Antti Kantee
Module Name:othersrc
Committed By:   pooka
Date:   Sun Dec 13 20:33:39 UTC 2009

Modified Files:
othersrc/lib/libfsu_mount: fsu_mount.c

Log Message:
Initialize fsdevice and fstype before use.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 othersrc/lib/libfsu_mount/fsu_mount.c

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

Modified files:

Index: othersrc/lib/libfsu_mount/fsu_mount.c
diff -u othersrc/lib/libfsu_mount/fsu_mount.c:1.14 othersrc/lib/libfsu_mount/fsu_mount.c:1.15
--- othersrc/lib/libfsu_mount/fsu_mount.c:1.14	Wed Dec  9 16:33:02 2009
+++ othersrc/lib/libfsu_mount/fsu_mount.c	Sun Dec 13 20:33:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fsu_mount.c,v 1.14 2009/12/09 16:33:02 stacktic Exp $ */
+/* $NetBSD: fsu_mount.c,v 1.15 2009/12/13 20:33:39 pooka Exp $ */
 
 /*
  * Copyright (c) 2008,2009 Arnaud Ysmal.  All Rights Reserved.
@@ -109,7 +109,7 @@
 	int idx;
 	char ch, *mntopts, afsdev[MAXPATHLEN], *path, *puffsexec, *specopts;
 	char *tmp;
-	const char *fsdevice, *fstype;
+	const char *fsdevice = NULL, *fstype = NULL;
 	struct stat sb;
 #ifdef WITH_SYSPUFFS
 	const char options[] = f:o:p:s:t:;



CVS commit: othersrc/lib/libfsu_mount

2009-12-13 Thread Antti Kantee
Module Name:othersrc
Committed By:   pooka
Date:   Sun Dec 13 20:35:14 UTC 2009

Modified Files:
othersrc/lib/libfsu_mount: fsu_mount.c

Log Message:
do previous with style


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 othersrc/lib/libfsu_mount/fsu_mount.c

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

Modified files:

Index: othersrc/lib/libfsu_mount/fsu_mount.c
diff -u othersrc/lib/libfsu_mount/fsu_mount.c:1.15 othersrc/lib/libfsu_mount/fsu_mount.c:1.16
--- othersrc/lib/libfsu_mount/fsu_mount.c:1.15	Sun Dec 13 20:33:39 2009
+++ othersrc/lib/libfsu_mount/fsu_mount.c	Sun Dec 13 20:35:14 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fsu_mount.c,v 1.15 2009/12/13 20:33:39 pooka Exp $ */
+/* $NetBSD: fsu_mount.c,v 1.16 2009/12/13 20:35:14 pooka Exp $ */
 
 /*
  * Copyright (c) 2008,2009 Arnaud Ysmal.  All Rights Reserved.
@@ -109,7 +109,7 @@
 	int idx;
 	char ch, *mntopts, afsdev[MAXPATHLEN], *path, *puffsexec, *specopts;
 	char *tmp;
-	const char *fsdevice = NULL, *fstype = NULL;
+	const char *fsdevice, *fstype;
 	struct stat sb;
 #ifdef WITH_SYSPUFFS
 	const char options[] = f:o:p:s:t:;
@@ -121,6 +121,7 @@
 	puffsexec = specopts = mntopts = NULL;
 	fst = NULL;
 	ukfs = NULL;
+	fstype = fsdevice = NULL;
 	memset(mntd, 0, sizeof(mntd));
 
 	ukfs_init();



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

2009-12-13 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Sun Dec 13 20:46:10 UTC 2009

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

Log Message:
Fix MKKERBEROS=no MKPAM=no MKDEBUGLIB=yes builds by adding missing
keywords to a few *_g.a files.


To generate a diff of this commit:
cvs rdiff -u -r1.1344 -r1.1345 src/distrib/sets/lists/comp/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1344 src/distrib/sets/lists/comp/mi:1.1345
--- src/distrib/sets/lists/comp/mi:1.1344	Sat Dec  5 22:43:34 2009
+++ src/distrib/sets/lists/comp/mi	Sun Dec 13 20:46:10 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1344 2009/12/05 22:43:34 pooka Exp $
+#	$NetBSD: mi,v 1.1345 2009/12/13 20:46:10 dyoung Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2369,6 +2369,7 @@
 ./usr/lib/libfetch_g.a-unknown-		debuglib
 ./usr/lib/libfetch_p.acomp-c-proflib		profile
 ./usr/lib/libfl.acomp-c-lib
+./usr/lib/libfl_g.a-unknown-		debuglib
 ./usr/lib/libfl_p.acomp-c-proflib		profile
 ./usr/lib/libform.acomp-c-lib
 ./usr/lib/libform_g.a-unknown-		debuglib
@@ -2496,7 +2497,7 @@
 ./usr/lib/libp2k_g.a-unknown-		debuglib
 ./usr/lib/libp2k_p.acomp-puffs-proflib	profile
 ./usr/lib/libpam.acomp-c-lib		pam
-./usr/lib/libpam_g.a-unknown-		debuglib
+./usr/lib/libpam_g.a-unknown-		pam,debuglib
 ./usr/lib/libpcap.acomp-c-lib
 ./usr/lib/libpcap_g.a-unknown-		debuglib
 ./usr/lib/libpcap_p.acomp-c-proflib		profile
@@ -2651,11 +2652,11 @@
 ./usr/lib/libskey_g.a-unknown-		debuglib,skey
 ./usr/lib/libskey_p.acomp-c-proflib		profile,skey
 ./usr/lib/libsl.acomp-krb5-lib		kerberos
-./usr/lib/libsl_g.a-unknown-		debuglib
+./usr/lib/libsl_g.a-unknown-		kerberos,debuglib
 ./usr/lib/libsl_p.acomp-krb5-proflib	profile,kerberos
 ./usr/lib/libsm.acomp-obsolete		obsolete
 ./usr/lib/libss.acomp-krb5-lib		kerberos
-./usr/lib/libss_g.a-unknown-		debuglib
+./usr/lib/libss_g.a-unknown-		kerberos,debuglib
 ./usr/lib/libss_p.acomp-krb5-proflib	profile,kerberos
 ./usr/lib/libssh.acomp-c-lib		crypto
 ./usr/lib/libssh_g.a-unknown-		debuglib
@@ -2695,7 +2696,7 @@
 ./usr/lib/libutil_p.acomp-c-proflib		profile
 ./usr/lib/libuutil.acomp-zfs-lib		zfs
 ./usr/lib/libuutil_p.acomp-zfs-proflib	profile,zfs
-./usr/lib/libvers_g.a-unknown-		debuglib
+./usr/lib/libvers_g.a-unknown-		kerberos,debuglib
 ./usr/lib/libwrap.acomp-c-lib
 ./usr/lib/libwrap_g.a-unknown-		debuglib
 ./usr/lib/libwrap_p.acomp-c-proflib		profile



CVS commit: src/lib/libukfs

2009-12-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Dec 13 20:52:36 UTC 2009

Modified Files:
src/lib/libukfs: ukfs.c

Log Message:
Refcount ukfs_part.  Otherwise it's not possible to call ukfs_mount()
several times with only one ukfs_part_probe().


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libukfs/ukfs.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/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.46 src/lib/libukfs/ukfs.c:1.47
--- src/lib/libukfs/ukfs.c:1.46	Sat Dec 12 00:46:04 2009
+++ src/lib/libukfs/ukfs.c	Sun Dec 13 20:52:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukfs.c,v 1.46 2009/12/12 00:46:04 pooka Exp $	*/
+/*	$NetBSD: ukfs.c,v 1.47 2009/12/13 20:52:36 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -164,6 +164,9 @@
 }
 
 struct ukfs_part {
+	pthread_spinlock_t part_lck;
+	int part_refcount;
+
 	int part_type;
 	char part_labelchar;
 	off_t part_devoff;
@@ -231,7 +234,14 @@
 		errno = ENOMEM;
 		return -1;
 	}
+	if (pthread_spin_init(part-part_lck, PTHREAD_PROCESS_PRIVATE) == -1) {
+		error = errno;
+		free(part);
+		errno = error;
+		return -1;
+	}
 	part-part_type = UKFS_PART_NONE;
+	part-part_refcount = 1;
 
 	/*
 	 * Check for magic in pathname:
@@ -338,7 +348,7 @@
 		part-part_devsize = val;
 		part-part_type = UKFS_PART_OFFSET;
 	} else {
-		free(part);
+		ukfs_part_release(part);
 		part = ukfs_part_none;
 	}
 
@@ -395,6 +405,9 @@
 {
 	struct flock flarg;
 
+	if (part == ukfs_part_na)
+		return;
+
 	memset(flarg, 0, sizeof(flarg));
 	flarg.l_type = F_UNLCK;
 	flarg.l_whence = SEEK_SET;
@@ -497,6 +510,9 @@
 	int mounted = 0;
 	int regged = 0;
 
+	pthread_spin_lock(part-part_lck);
+	part-part_refcount++;
+	pthread_spin_unlock(part-part_lck);
 	if (part != ukfs_part_na) {
 		if ((rv = process_diskdevice(devpath, part,
 		mntflags  MNT_RDONLY, devfd)) != 0)
@@ -621,7 +637,6 @@
 		rump_pub_lwp_release(rump_pub_lwp_curlwp());
 	}
 
-	ukfs_part_release(fs-ukfs_part);
 	if (fs-ukfs_devpath) {
 		rump_pub_etfs_remove(fs-ukfs_devpath);
 		free(fs-ukfs_devpath);
@@ -633,6 +648,7 @@
 		unlockdev(fs-ukfs_devfd, fs-ukfs_part);
 		close(fs-ukfs_devfd);
 	}
+	ukfs_part_release(fs-ukfs_part);
 	free(fs);
 
 	return 0;
@@ -641,9 +657,17 @@
 void
 ukfs_part_release(struct ukfs_part *part)
 {
+	int release;
 
-	if (part != ukfs_part_none  part != ukfs_part_na)
-		free(part);
+	if (part != ukfs_part_none  part != ukfs_part_na) {
+		pthread_spin_lock(part-part_lck);
+		release = --part-part_refcount == 0;
+		pthread_spin_unlock(part-part_lck);
+		if (release) {
+			pthread_spin_destroy(part-part_lck);
+			free(part);
+		}
+	}
 }
 
 #define STDCALL(ukfs, thecall)		\



CVS commit: othersrc/lib/libfsu_mount

2009-12-13 Thread Antti Kantee
Module Name:othersrc
Committed By:   pooka
Date:   Sun Dec 13 20:53:33 UTC 2009

Modified Files:
othersrc/lib/libfsu_mount: fsu_mount.c

Log Message:
Support ukfs magic paths.  For example, this works now:
golem fsu_ls wd0.img%DISKLABEL:a% -l


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 othersrc/lib/libfsu_mount/fsu_mount.c

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

Modified files:

Index: othersrc/lib/libfsu_mount/fsu_mount.c
diff -u othersrc/lib/libfsu_mount/fsu_mount.c:1.16 othersrc/lib/libfsu_mount/fsu_mount.c:1.17
--- othersrc/lib/libfsu_mount/fsu_mount.c:1.16	Sun Dec 13 20:35:14 2009
+++ othersrc/lib/libfsu_mount/fsu_mount.c	Sun Dec 13 20:53:33 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fsu_mount.c,v 1.16 2009/12/13 20:35:14 pooka Exp $ */
+/* $NetBSD: fsu_mount.c,v 1.17 2009/12/13 20:53:33 pooka Exp $ */
 
 /*
  * Copyright (c) 2008,2009 Arnaud Ysmal.  All Rights Reserved.
@@ -85,6 +85,7 @@
 	char **mntd_argv;
 	int mntd_argv_size;
 	char *mntd_cwd;
+	struct ukfs_part *mntd_part;
 };
 
 static struct ukfs *mount_alias(struct fsu_fsalias_s *, char *, char *,
@@ -106,10 +107,10 @@
 	fsu_fs_t *fst;
 	struct fsu_fsalias_s *alias;
 	struct mount_data_s mntd;
-	int idx;
+	int idx, fflag;
 	char ch, *mntopts, afsdev[MAXPATHLEN], *path, *puffsexec, *specopts;
 	char *tmp;
-	const char *fsdevice, *fstype;
+	char *fsdevice, *fstype;
 	struct stat sb;
 #ifdef WITH_SYSPUFFS
 	const char options[] = f:o:p:s:t:;
@@ -122,6 +123,7 @@
 	fst = NULL;
 	ukfs = NULL;
 	fstype = fsdevice = NULL;
+	fflag = 0;
 	memset(mntd, 0, sizeof(mntd));
 
 	ukfs_init();
@@ -135,6 +137,7 @@
 		case 'f':
 			if (fsdevice == NULL)
 fsdevice = optarg;
+			fflag = 1;
 			break;
 		case 'o':
 			if (mntopts == NULL)
@@ -219,7 +222,11 @@
 return NULL;
 			}
 		}
+	}
+	if (ukfs_part_probe(fsdevice, mntd.mntd_part) == -1)
+		return NULL;
 
+	if (!fflag) {
 		build_alias_list();
 		alias = get_alias(fsdevice);
 		if (alias != NULL)
@@ -420,7 +427,7 @@
 #ifdef HAVE_UKFS_DISKLABEL
 if (fs-fs_flags == 0) {
 ukfs = ukfs_mount_disk(fs-fs_name,
-mntdp-mntd_canon_dev, ukfs_part_none,
+mntdp-mntd_canon_dev, mntdp-mntd_part,
 			mntdp-mntd_canon_dir, mntdp-mntd_flags,
 			fs-fs_args, fs-fs_args_size);
 } else



CVS commit: othersrc/lib/libfsu_mount

2009-12-13 Thread Antti Kantee
Module Name:othersrc
Committed By:   pooka
Date:   Sun Dec 13 20:57:25 UTC 2009

Modified Files:
othersrc/lib/libfsu_mount: filesystems.h fsu_mount.c

Log Message:
Use macro to determine disk-based file systems.  No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/lib/libfsu_mount/filesystems.h
cvs rdiff -u -r1.17 -r1.18 othersrc/lib/libfsu_mount/fsu_mount.c

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

Modified files:

Index: othersrc/lib/libfsu_mount/filesystems.h
diff -u othersrc/lib/libfsu_mount/filesystems.h:1.1 othersrc/lib/libfsu_mount/filesystems.h:1.2
--- othersrc/lib/libfsu_mount/filesystems.h:1.1	Thu Nov  5 14:02:42 2009
+++ othersrc/lib/libfsu_mount/filesystems.h	Sun Dec 13 20:57:25 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: filesystems.h,v 1.1 2009/11/05 14:02:42 stacktic Exp $ */
+/* $NetBSD: filesystems.h,v 1.2 2009/12/13 20:57:25 pooka Exp $ */
 
 /*
  * Copyright (c) 2009 Arnaud Ysmal.  All Rights Reserved.
@@ -115,6 +115,8 @@
 #endif
 } _args;
 
+#define FSU_ISDISKFS(fsufs) ((fsufs-fs_flags  FS_NO_AUTO) == 0)
+
 /* supported file systems */
 fsu_fs_t fslist[] = {
 	/* MOUNT_	args_	struct		parseargs	autodetect */

Index: othersrc/lib/libfsu_mount/fsu_mount.c
diff -u othersrc/lib/libfsu_mount/fsu_mount.c:1.17 othersrc/lib/libfsu_mount/fsu_mount.c:1.18
--- othersrc/lib/libfsu_mount/fsu_mount.c:1.17	Sun Dec 13 20:53:33 2009
+++ othersrc/lib/libfsu_mount/fsu_mount.c	Sun Dec 13 20:57:25 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fsu_mount.c,v 1.17 2009/12/13 20:53:33 pooka Exp $ */
+/* $NetBSD: fsu_mount.c,v 1.18 2009/12/13 20:57:25 pooka Exp $ */
 
 /*
  * Copyright (c) 2008,2009 Arnaud Ysmal.  All Rights Reserved.
@@ -425,7 +425,7 @@
 (mntdp-mntd_flags), mntdp-mntd_canon_dev, mntdp-mntd_canon_dir);
 if (rv == 0) {
 #ifdef HAVE_UKFS_DISKLABEL
-if (fs-fs_flags == 0) {
+if (FSU_ISDISKFS(fs)) {
 ukfs = ukfs_mount_disk(fs-fs_name,
 mntdp-mntd_canon_dev, mntdp-mntd_part,
 			mntdp-mntd_canon_dir, mntdp-mntd_flags,



CVS commit: src/external/bsd/atf/share

2009-12-13 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 13 21:14:18 UTC 2009

Modified Files:
src/external/bsd/atf/share/examples/atf: Makefile
src/external/bsd/atf/share/xml/atf: Makefile
src/external/bsd/atf/share/xsl/atf: Makefile

Log Message:
Wrap these with .if ${MKSHARE} != no


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/atf/share/examples/atf/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/atf/share/xml/atf/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/atf/share/xsl/atf/Makefile

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

Modified files:

Index: src/external/bsd/atf/share/examples/atf/Makefile
diff -u src/external/bsd/atf/share/examples/atf/Makefile:1.1 src/external/bsd/atf/share/examples/atf/Makefile:1.2
--- src/external/bsd/atf/share/examples/atf/Makefile:1.1	Mon Jan 19 07:13:05 2009
+++ src/external/bsd/atf/share/examples/atf/Makefile	Sun Dec 13 21:14:18 2009
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2009/01/19 07:13:05 jmmv Exp $
+# $NetBSD: Makefile,v 1.2 2009/12/13 21:14:18 snj Exp $
 
 .include bsd.own.mk
 
+.if ${MKSHARE} != no
 SRCDIR=		${NETBSDSRCDIR}/external/bsd/atf/dist
 .PATH:		${SRCDIR}/data
 
@@ -9,5 +10,6 @@
 FILESMODE=	444
 FILES=		atf-run.hooks \
 		tests-results.css
+.endif
 
 .include bsd.prog.mk

Index: src/external/bsd/atf/share/xml/atf/Makefile
diff -u src/external/bsd/atf/share/xml/atf/Makefile:1.1 src/external/bsd/atf/share/xml/atf/Makefile:1.2
--- src/external/bsd/atf/share/xml/atf/Makefile:1.1	Mon Jan 19 07:13:05 2009
+++ src/external/bsd/atf/share/xml/atf/Makefile	Sun Dec 13 21:14:18 2009
@@ -1,12 +1,14 @@
-# $NetBSD: Makefile,v 1.1 2009/01/19 07:13:05 jmmv Exp $
+# $NetBSD: Makefile,v 1.2 2009/12/13 21:14:18 snj Exp $
 
 .include bsd.own.mk
 
+.if ${MKSHARE} != no
 SRCDIR=		${NETBSDSRCDIR}/external/bsd/atf/dist
 .PATH:		${SRCDIR}/data
 
 FILESDIR=	/usr/share/xml/atf
 FILESMODE=	444
 FILES=		tests-results.dtd
+.endif
 
 .include bsd.prog.mk

Index: src/external/bsd/atf/share/xsl/atf/Makefile
diff -u src/external/bsd/atf/share/xsl/atf/Makefile:1.1 src/external/bsd/atf/share/xsl/atf/Makefile:1.2
--- src/external/bsd/atf/share/xsl/atf/Makefile:1.1	Mon Jan 19 07:13:05 2009
+++ src/external/bsd/atf/share/xsl/atf/Makefile	Sun Dec 13 21:14:18 2009
@@ -1,12 +1,14 @@
-# $NetBSD: Makefile,v 1.1 2009/01/19 07:13:05 jmmv Exp $
+# $NetBSD: Makefile,v 1.2 2009/12/13 21:14:18 snj Exp $
 
 .include bsd.own.mk
 
+.if ${MKSHARE} != no
 SRCDIR=		${NETBSDSRCDIR}/external/bsd/atf/dist
 .PATH:		${SRCDIR}/data
 
 FILESDIR=	/usr/share/xsl/atf
 FILESMODE=	444
 FILES=		tests-results.xsl
+.endif
 
 .include bsd.prog.mk



CVS commit: src/usr.sbin/puffs

2009-12-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Dec 13 21:16:55 UTC 2009

Modified Files:
src/usr.sbin/puffs/rump_cd9660: rump_cd9660.c
src/usr.sbin/puffs/rump_efs: rump_efs.c
src/usr.sbin/puffs/rump_ext2fs: rump_ext2fs.c
src/usr.sbin/puffs/rump_ffs: rump_ffs.c
src/usr.sbin/puffs/rump_hfs: rump_hfs.c
src/usr.sbin/puffs/rump_lfs: rump_lfs.c
src/usr.sbin/puffs/rump_msdos: rump_msdos.c
src/usr.sbin/puffs/rump_ntfs: rump_ntfs.c
src/usr.sbin/puffs/rump_sysvbfs: rump_sysvbfs.c
src/usr.sbin/puffs/rump_udf: rump_udf.c

Log Message:
Call ukfs_part_release().  For completeness and educational value.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_efs/rump_efs.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_ffs/rump_ffs.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_hfs/rump_hfs.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/puffs/rump_lfs/rump_lfs.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/rump_msdos/rump_msdos.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_ntfs/rump_ntfs.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_udf/rump_udf.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/puffs/rump_cd9660/rump_cd9660.c
diff -u src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c:1.6 src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c:1.7
--- src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c:1.6	Thu Dec  3 14:27:16 2009
+++ src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c	Sun Dec 13 21:16:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_cd9660.c,v 1.6 2009/12/03 14:27:16 pooka Exp $	*/
+/*	$NetBSD: rump_cd9660.c,v 1.7 2009/12/13 21:16:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -55,6 +55,7 @@
 	canon_dev, canon_dir);
 	rv = p2k_run_diskfs(MOUNT_CD9660, canon_dev, part, canon_dir, mntflags,
 	args, sizeof(args), 0);
+	ukfs_part_release(part);
 	if (rv)
 		err(1, mount);
 

Index: src/usr.sbin/puffs/rump_efs/rump_efs.c
diff -u src/usr.sbin/puffs/rump_efs/rump_efs.c:1.5 src/usr.sbin/puffs/rump_efs/rump_efs.c:1.6
--- src/usr.sbin/puffs/rump_efs/rump_efs.c:1.5	Thu Dec  3 14:27:16 2009
+++ src/usr.sbin/puffs/rump_efs/rump_efs.c	Sun Dec 13 21:16:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_efs.c,v 1.5 2009/12/03 14:27:16 pooka Exp $	*/
+/*	$NetBSD: rump_efs.c,v 1.6 2009/12/13 21:16:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -55,6 +55,7 @@
 	mount_efs_parseargs(argc, argv, args, mntflags, canon_dev, canon_dir);
 	rv = p2k_run_diskfs(MOUNT_EFS, canon_dev, part, canon_dir, mntflags, 
 		args, sizeof(args), 0);
+	ukfs_part_release(part);
 	if (rv)
 		err(1, mount);
 

Index: src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c
diff -u src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c:1.7 src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c:1.8
--- src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c:1.7	Thu Dec  3 14:27:16 2009
+++ src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c	Sun Dec 13 21:16:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_ext2fs.c,v 1.7 2009/12/03 14:27:16 pooka Exp $	*/
+/*	$NetBSD: rump_ext2fs.c,v 1.8 2009/12/13 21:16:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -56,6 +56,7 @@
 	canon_dev, canon_dir);
 	rv = p2k_run_diskfs(MOUNT_EXT2FS, canon_dev, part, canon_dir, mntflags, 
 		args, sizeof(args), 0);
+	ukfs_part_release(part);
 	if (rv)
 		err(1, mount);
 

Index: src/usr.sbin/puffs/rump_ffs/rump_ffs.c
diff -u src/usr.sbin/puffs/rump_ffs/rump_ffs.c:1.5 src/usr.sbin/puffs/rump_ffs/rump_ffs.c:1.6
--- src/usr.sbin/puffs/rump_ffs/rump_ffs.c:1.5	Thu Dec  3 14:27:16 2009
+++ src/usr.sbin/puffs/rump_ffs/rump_ffs.c	Sun Dec 13 21:16:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_ffs.c,v 1.5 2009/12/03 14:27:16 pooka Exp $	*/
+/*	$NetBSD: rump_ffs.c,v 1.6 2009/12/13 21:16:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -55,6 +55,7 @@
 	mount_ffs_parseargs(argc, argv, args, mntflags, canon_dev, canon_dir);
 	rv = p2k_run_diskfs(MOUNT_FFS, canon_dev, part, canon_dir,
 	mntflags, args, sizeof(args), 0);
+	ukfs_part_release(part);
 	if (rv)
 		err(1, mount);
 

Index: src/usr.sbin/puffs/rump_hfs/rump_hfs.c
diff -u src/usr.sbin/puffs/rump_hfs/rump_hfs.c:1.5 src/usr.sbin/puffs/rump_hfs/rump_hfs.c:1.6
--- src/usr.sbin/puffs/rump_hfs/rump_hfs.c:1.5	Thu Dec  3 14:27:16 2009
+++ src/usr.sbin/puffs/rump_hfs/rump_hfs.c	Sun Dec 13 21:16:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_hfs.c,v 1.5 2009/12/03 14:27:16 pooka Exp $	*/
+/*	$NetBSD: rump_hfs.c,v 1.6 2009/12/13 21:16:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -55,6 +55,7 @@
 	

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

2009-12-13 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Dec 13 23:01:42 UTC 2009

Modified Files:
src/sys/arch/i386/stand/pxeboot: dev_net.c main.c pxe.c pxe_netif.h

Log Message:
Shut down the PXE network stack when we are done with it.

This fixes an issue where a CK804 nfe(4) would have a
byte-reversed MAC address after pxeboot(8).


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/stand/pxeboot/dev_net.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/stand/pxeboot/main.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/stand/pxeboot/pxe.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/pxeboot/pxe_netif.h

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

Modified files:

Index: src/sys/arch/i386/stand/pxeboot/dev_net.c
diff -u src/sys/arch/i386/stand/pxeboot/dev_net.c:1.9 src/sys/arch/i386/stand/pxeboot/dev_net.c:1.10
--- src/sys/arch/i386/stand/pxeboot/dev_net.c:1.9	Sat Mar 14 15:36:08 2009
+++ src/sys/arch/i386/stand/pxeboot/dev_net.c	Sun Dec 13 23:01:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dev_net.c,v 1.9 2009/03/14 15:36:08 dsl Exp $	*/
+/*	$NetBSD: dev_net.c,v 1.10 2009/12/13 23:01:42 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -127,7 +127,6 @@
 		if (debug)
 			printf(net_close: calling netif_close()\n);
 		pxe_netif_close(netdev_sock);
-		//pxe_netif_shutdown(); /* XXX shouldn't be done here */
 		netdev_sock = -1;
 	}
 	return (0);

Index: src/sys/arch/i386/stand/pxeboot/main.c
diff -u src/sys/arch/i386/stand/pxeboot/main.c:1.21 src/sys/arch/i386/stand/pxeboot/main.c:1.22
--- src/sys/arch/i386/stand/pxeboot/main.c:1.21	Mon Sep 14 11:56:27 2009
+++ src/sys/arch/i386/stand/pxeboot/main.c	Sun Dec 13 23:01:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.21 2009/09/14 11:56:27 jmcneill Exp $	*/
+/*	$NetBSD: main.c,v 1.22 2009/12/13 23:01:42 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1996
@@ -85,10 +85,17 @@
 		clear_pc_screen();
 }
 
+static void
+alldone(void)
+{
+	pxe_fini();
+	clearit();
+}
+
 static int 
 bootit(const char *filename, int howto)
 {
-	if (exec_netbsd(filename, 0, howto, 0, clearit)  0)
+	if (exec_netbsd(filename, 0, howto, 0, alldone)  0)
 		printf(boot: %s\n, strerror(errno));
 	else
 		printf(boot returned\n);

Index: src/sys/arch/i386/stand/pxeboot/pxe.c
diff -u src/sys/arch/i386/stand/pxeboot/pxe.c:1.16 src/sys/arch/i386/stand/pxeboot/pxe.c:1.17
--- src/sys/arch/i386/stand/pxeboot/pxe.c:1.16	Mon Oct 26 19:16:56 2009
+++ src/sys/arch/i386/stand/pxeboot/pxe.c	Sun Dec 13 23:01:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pxe.c,v 1.16 2009/10/26 19:16:56 cegger Exp $	*/
+/*	$NetBSD: pxe.c,v 1.17 2009/12/13 23:01:42 jakllsch Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -252,13 +252,6 @@
 		uc-status);
 }
 
-void
-pxe_netif_shutdown(void)
-{
-
-	pxe_fini();
-}
-
 struct iodesc *
 socktodesc(int sock)
 {

Index: src/sys/arch/i386/stand/pxeboot/pxe_netif.h
diff -u src/sys/arch/i386/stand/pxeboot/pxe_netif.h:1.1 src/sys/arch/i386/stand/pxeboot/pxe_netif.h:1.2
--- src/sys/arch/i386/stand/pxeboot/pxe_netif.h:1.1	Wed Mar 12 17:33:10 2003
+++ src/sys/arch/i386/stand/pxeboot/pxe_netif.h	Sun Dec 13 23:01:42 2009
@@ -1,5 +1,4 @@
-/* $NetBSD: pxe_netif.h,v 1.1 2003/03/12 17:33:10 drochner Exp $ */
+/* $NetBSD: pxe_netif.h,v 1.2 2009/12/13 23:01:42 jakllsch Exp $ */
 
 int pxe_netif_open(void);
 void pxe_netif_close(int);
-void pxe_netif_shutdown(void);



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

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 13 23:25:24 UTC 2009

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

Log Message:
int/long portability.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/libopts/save.c

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

Modified files:

Index: src/external/bsd/ntp/dist/libopts/save.c
diff -u src/external/bsd/ntp/dist/libopts/save.c:1.1.1.1 src/external/bsd/ntp/dist/libopts/save.c:1.2
--- src/external/bsd/ntp/dist/libopts/save.c:1.1.1.1	Sun Dec 13 11:55:13 2009
+++ src/external/bsd/ntp/dist/libopts/save.c	Sun Dec 13 18:25:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: save.c,v 1.1.1.1 2009/12/13 16:55:13 kardel Exp $	*/
+/*	$NetBSD: save.c,v 1.2 2009/12/13 23:25:24 christos Exp $	*/
 
 
 /*
@@ -305,7 +305,7 @@
  *  THEN the char pointer is really the number
  */
 if (OPTST_GET_ARGTYPE(p-fOptState) == OPARG_TYPE_NUMERIC)
-fprintf( fp,   %d\n, (int)(t_word)pzLA );
+fprintf( fp,   %ld\n, (long)pzLA );
 
 /*
  *  OTHERWISE, FOR each line of the value text, ...



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

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 13 23:25:40 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/libopts: makeshell.c version.c

Log Message:
(unsigned char) for ctype functions.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/libopts/makeshell.c \
src/external/bsd/ntp/dist/libopts/version.c

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

Modified files:

Index: src/external/bsd/ntp/dist/libopts/makeshell.c
diff -u src/external/bsd/ntp/dist/libopts/makeshell.c:1.1.1.1 src/external/bsd/ntp/dist/libopts/makeshell.c:1.2
--- src/external/bsd/ntp/dist/libopts/makeshell.c:1.1.1.1	Sun Dec 13 11:55:08 2009
+++ src/external/bsd/ntp/dist/libopts/makeshell.c	Sun Dec 13 18:25:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: makeshell.c,v 1.1.1.1 2009/12/13 16:55:08 kardel Exp $	*/
+/*	$NetBSD: makeshell.c,v 1.2 2009/12/13 23:25:40 christos Exp $	*/
 
 
 /*
@@ -617,7 +617,7 @@
 char* pzPN = zTimeBuf;
 tCC*  pz   = pOpts-pzPROGNAME;
 for (;;) {
-if ((*pzPN++ = tolower( *pz++ )) == '\0')
+if ((*pzPN++ = tolower( (unsigned char)*pz++ )) == '\0')
 break;
 }
 }
@@ -833,8 +833,8 @@
  *  They must not be the same.  They cannot be, because it would
  *  not compile correctly if they were.
  */
-while (  toupper( pOD-pz_Name[matchCt] )
-  == toupper( pzMatchName[matchCt] ))
+while (  toupper( (unsigned char)pOD-pz_Name[matchCt] )
+ == toupper( (unsigned char)pzMatchName[matchCt] ))
 matchCt++;
 
 if (matchCt  min)
@@ -845,8 +845,8 @@
  */
 if (pOD-pz_DisableName != NULL) {
 matchCt = 0;
-while (  toupper( pOD-pz_DisableName[matchCt] )
-  == toupper( pzMatchName[matchCt] ))
+while (  toupper( (unsigned char)pOD-pz_DisableName[matchCt] )
+ == toupper( (unsigned char)pzMatchName[matchCt] ))
 matchCt++;
 if (matchCt  min)
 min = matchCt;
@@ -1060,7 +1060,7 @@
 AGDUPSTR( pz, pShellParseOptions-pzPROGNAME, program name );
 pShellParseOptions-pzProgName = pz;
 while (*pz != NUL) {
-*pz = tolower( *pz );
+*pz = tolower( (unsigned char)*pz );
 pz++;
 }
 }
Index: src/external/bsd/ntp/dist/libopts/version.c
diff -u src/external/bsd/ntp/dist/libopts/version.c:1.1.1.1 src/external/bsd/ntp/dist/libopts/version.c:1.2
--- src/external/bsd/ntp/dist/libopts/version.c:1.1.1.1	Sun Dec 13 11:55:15 2009
+++ src/external/bsd/ntp/dist/libopts/version.c	Sun Dec 13 18:25:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.c,v 1.1.1.1 2009/12/13 16:55:15 kardel Exp $	*/
+/*	$NetBSD: version.c,v 1.2 2009/12/13 23:25:40 christos Exp $	*/
 
 
 /*  Id: e21e2bf9958c54e440efbdc7c1026e46ac589f66
@@ -67,7 +67,7 @@
 if (  ((pOD-fOptState  OPTST_ARG_OPTIONAL) == 0)
|| (pOD-optArg.argString == NULL))
  swCh = 'v';
-else swCh = tolower(pOD-optArg.argString[0]);
+else swCh = tolower((unsigned char)pOD-optArg.argString[0]);
 
 if (pOpts-pzFullVersion != NULL) {
 fputs( pOpts-pzFullVersion, fp );



CVS commit: src/external/bsd/ntp/dist/include

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:38:20 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/include: refclock_atom.h

Log Message:
don't redefine NANOSECOND


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/ntp/dist/include/refclock_atom.h

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

Modified files:

Index: src/external/bsd/ntp/dist/include/refclock_atom.h
diff -u src/external/bsd/ntp/dist/include/refclock_atom.h:1.1.1.1 src/external/bsd/ntp/dist/include/refclock_atom.h:1.2
--- src/external/bsd/ntp/dist/include/refclock_atom.h:1.1.1.1	Sun Dec 13 11:54:54 2009
+++ src/external/bsd/ntp/dist/include/refclock_atom.h	Sun Dec 13 19:38:20 2009
@@ -1,9 +1,11 @@
-/*	$NetBSD: refclock_atom.h,v 1.1.1.1 2009/12/13 16:54:54 kardel Exp $	*/
+/*	$NetBSD: refclock_atom.h,v 1.2 2009/12/14 00:38:20 christos Exp $	*/
 
 /*
  * Definitions for the atom driver and its friends
  */
+#ifndef NANOSECOND
 #define NANOSECOND	10 /* one second (ns) */
+#endif
 #define RANGEGATE	50  /* range gate (ns) */
 
 struct refclock_atom {



CVS commit: src/external/bsd/ntp/dist/libntp

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:38:48 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/libntp: atoint.c atolfp.c atouint.c audio.c
hextolfp.c mstolfp.c octtoint.c

Log Message:
fix bogus ctype casts


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/libntp/atoint.c \
src/external/bsd/ntp/dist/libntp/atolfp.c \
src/external/bsd/ntp/dist/libntp/atouint.c \
src/external/bsd/ntp/dist/libntp/audio.c \
src/external/bsd/ntp/dist/libntp/hextolfp.c \
src/external/bsd/ntp/dist/libntp/mstolfp.c \
src/external/bsd/ntp/dist/libntp/octtoint.c

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

Modified files:

Index: src/external/bsd/ntp/dist/libntp/atoint.c
diff -u src/external/bsd/ntp/dist/libntp/atoint.c:1.1.1.1 src/external/bsd/ntp/dist/libntp/atoint.c:1.2
--- src/external/bsd/ntp/dist/libntp/atoint.c:1.1.1.1	Sun Dec 13 11:55:01 2009
+++ src/external/bsd/ntp/dist/libntp/atoint.c	Sun Dec 13 19:38:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: atoint.c,v 1.1.1.1 2009/12/13 16:55:01 kardel Exp $	*/
+/*	$NetBSD: atoint.c,v 1.2 2009/12/14 00:38:48 christos Exp $	*/
 
 /*
  * atoint - convert an ascii string to a signed long, with error checking
@@ -36,7 +36,7 @@
 
 	u = 0;
 	while (*cp != '\0') {
-		if (!isdigit((int)*cp))
+		if (!isdigit((unsigned char)*cp))
 		return 0;
 		if (u  214748364 || (u == 214748364  *cp  oflow_digit))
 		return 0;	/* overflow */
Index: src/external/bsd/ntp/dist/libntp/atolfp.c
diff -u src/external/bsd/ntp/dist/libntp/atolfp.c:1.1.1.1 src/external/bsd/ntp/dist/libntp/atolfp.c:1.2
--- src/external/bsd/ntp/dist/libntp/atolfp.c:1.1.1.1	Sun Dec 13 11:55:01 2009
+++ src/external/bsd/ntp/dist/libntp/atolfp.c	Sun Dec 13 19:38:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: atolfp.c,v 1.1.1.1 2009/12/13 16:55:01 kardel Exp $	*/
+/*	$NetBSD: atolfp.c,v 1.2 2009/12/14 00:38:48 christos Exp $	*/
 
 /*
  * atolfp - convert an ascii string to an l_fp number
@@ -53,7 +53,7 @@
 	 *
 	 * [spaces][-|+][digits][.][digits][spaces|\n|\0]
 	 */
-	while (isspace((int)*cp))
+	while (isspace((unsigned char)*cp))
 	cp++;
 	
 	if (*cp == '-') {
@@ -64,7 +64,7 @@
 	if (*cp == '+')
 	cp++;
 
-	if (*cp != '.'  !isdigit((int)*cp))
+	if (*cp != '.'  !isdigit((unsigned char)*cp))
 	return 0;
 
 	while (*cp != '\0'  (ind = strchr(digits, *cp)) != NULL) {
@@ -73,7 +73,7 @@
 		cp++;
 	}
 
-	if (*cp != '\0'  !isspace((int)*cp)) {
+	if (*cp != '\0'  !isspace((unsigned char)*cp)) {
 		if (*cp++ != '.')
 		return 0;
 	
@@ -85,10 +85,10 @@
 			cp++;
 		}
 
-		while (isdigit((int)*cp))
+		while (isdigit((unsigned char)*cp))
 		cp++;
 		
-		if (*cp != '\0'  !isspace((int)*cp))
+		if (*cp != '\0'  !isspace((unsigned char)*cp))
 		return 0;
 	}
 
Index: src/external/bsd/ntp/dist/libntp/atouint.c
diff -u src/external/bsd/ntp/dist/libntp/atouint.c:1.1.1.1 src/external/bsd/ntp/dist/libntp/atouint.c:1.2
--- src/external/bsd/ntp/dist/libntp/atouint.c:1.1.1.1	Sun Dec 13 11:55:01 2009
+++ src/external/bsd/ntp/dist/libntp/atouint.c	Sun Dec 13 19:38:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: atouint.c,v 1.1.1.1 2009/12/13 16:55:01 kardel Exp $	*/
+/*	$NetBSD: atouint.c,v 1.2 2009/12/14 00:38:48 christos Exp $	*/
 
 /*
  * atouint - convert an ascii string to an unsigned long, with error checking
@@ -24,7 +24,7 @@
 
 	u = 0;
 	while (*cp != '\0') {
-		if (!isdigit((int)*cp))
+		if (!isdigit((unsigned char)*cp))
 		return 0;
 		if (u  429496729 || (u == 429496729  *cp = '6'))
 		return 0;	/* overflow */
Index: src/external/bsd/ntp/dist/libntp/audio.c
diff -u src/external/bsd/ntp/dist/libntp/audio.c:1.1.1.1 src/external/bsd/ntp/dist/libntp/audio.c:1.2
--- src/external/bsd/ntp/dist/libntp/audio.c:1.1.1.1	Sun Dec 13 11:55:01 2009
+++ src/external/bsd/ntp/dist/libntp/audio.c	Sun Dec 13 19:38:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.1.1.1 2009/12/13 16:55:01 kardel Exp $	*/
+/*	$NetBSD: audio.c,v 1.2 2009/12/14 00:38:48 christos Exp $	*/
 
 /*
  * audio.c - audio interface for reference clock audio drivers
@@ -147,12 +147,12 @@
 
 		/* Remove any trailing spaces */
 		for (i = strlen(line);
-		 i  0  isascii((int)line[i - 1])  isspace((int)line[i - 1]);
+		 i  0  isascii((unsigned char)line[i - 1])  isspace((unsigned char)line[i - 1]);
 			)
 			line[--i] = '\0';
 
 		/* Remove leading space */
-		for (cc = line; *cc  isascii((int)*cc)  isspace((int)*cc); cc++)
+		for (cc = line; *cc  isascii((unsigned char)*cc)  isspace((unsigned char)*cc); cc++)
 			continue;
 
 		/* Stop if nothing left */
@@ -161,16 +161,16 @@
 
 		/* Uppercase the command and find the arg */
 		for (ca = cc; *ca; ca++) {
-			if (isascii((int)*ca)) {
-if (islower((int)*ca)) {
-	*ca = toupper(*ca);
-} else if (isspace((int)*ca) || (*ca == '='))
+			if (isascii((unsigned char)*ca)) {
+if (islower((unsigned char)*ca)) {
+	*ca = toupper((unsigned 

CVS commit: src/external/mit/xorg/lib/fontconfig/etc

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 00:39:58 UTC 2009

Modified Files:
src/external/mit/xorg/lib/fontconfig/etc: fonts.conf

Log Message:
update the generated fonts.conf from the template.
from Jukka Salmi in PR #42169.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/lib/fontconfig/etc/fonts.conf

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/lib/fontconfig/etc/fonts.conf
diff -u src/external/mit/xorg/lib/fontconfig/etc/fonts.conf:1.3 src/external/mit/xorg/lib/fontconfig/etc/fonts.conf:1.4
--- src/external/mit/xorg/lib/fontconfig/etc/fonts.conf:1.3	Fri Sep 26 11:13:28 2008
+++ src/external/mit/xorg/lib/fontconfig/etc/fonts.conf	Mon Dec 14 00:39:58 2009
@@ -1,41 +1,33 @@
 ?xml version=1.0?
 !DOCTYPE fontconfig SYSTEM fonts.dtd
-!-- $NetBSD: fonts.conf,v 1.3 2008/09/26 11:13:28 jmcneill Exp $ --
-!-- /etc/fonts.conf file to configure system font access --
+!-- $NetBSD: fonts.conf,v 1.4 2009/12/14 00:39:58 mrg Exp $ --
+!-- /etc/fonts/fonts.conf file to configure system font access --
 fontconfig
 
 !--
+	DO NOT EDIT THIS FILE.
+	IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
+	LOCAL CHANGES BELONG IN 'local.conf'.
+
 	The intent of this standard configuration file is to be adequate for
 	most environments.  If you have a reasonably normal environment and
 	have found problems with this configuration, they are probably
-	things that others will also want fixed.  Please send any suggested
-	changes to fo...@xfree86.org so that future releases can include
-	such changes.
+	things that others will also want fixed.  Please submit any
+	problems to the fontconfig bugzilla system located at fontconfig.org
 
-	Note that the normal 'make install' procedure for XFree86 is to
+	Note that the normal 'make install' procedure for fontconfig is to
 	replace any existing fonts.conf file with the new version.  Place
 	any local customizations in local.conf which this file references.
 
 	Keith Packard
 --
 
-!-- Font directory list configured on Sun Aug 24 19:25:49 EST 2003 --
+!-- Font directory list --
 
 	dir/usr/X11R7/lib/X11/fonts/dir
-	dir/usr/share/fonts/dir
 	dir~/.fonts/dir
 
 !--
-  Enable sub-pixel rendering
-	match target=font
-		test qual=all name=rgba
-			constunknown/const
-		/test
-		edit name=rgba mode=assignconstrgb/const/edit
-	/match
---
-
-!--
   Accept deprecated 'mono' alias, replacing it with 'monospace'
 --
 	match target=pattern
@@ -72,178 +64,15 @@
 	/match
 
 !--
-  Mark common families with their generics so we'll get
-  something reasonable
---
-
-!--
-  Serif faces
- --
-	alias
-		familyTimes/family
-		familyTimes New Roman/family
-		familyNimbus Roman No9 L/family
-		familyLuxi Serif/family
-		familyKochi Mincho/family
-		familyAR PL SungtiL GB/family
-		familyAR PL Mingti2L Big5/family
-		familyBaekmuk Batang/family			
-		defaultfamilyserif/family/default
-	/alias
-!--
-  Sans-serif faces
- --
-	alias
-		familyHelvetica/family
-		familyArial/family
-		familyVerdana/family
-		familyNimbus Sans L/family
-		familyLuxi Sans/family
-		familyKochi Gothic/family
-		familyAR PL KaitiM GB/family
-		familyAR PL KaitiM Big5/family
-		familyBaekmuk Dotum/family
-		familySimSun/family
-		defaultfamilysans-serif/family/default
-	/alias
-!--
-  Monospace faces
- --
- 	alias
-		familyCourier/family
-		familyCourier New/family
-		familyAndale Mono/family
-		familyLuxi Mono/family
-		familyNimbus Mono L/family
-		familyNSimSun/family
-		defaultfamilymonospace/family/default
-	/alias
-!--
-  If the font still has no generic name, add sans-serif
- --
-	match target=pattern
-		test qual=all name=family compare=not_eq
-			stringsans-serif/string
-		/test
-		test qual=all name=family compare=not_eq
-			stringserif/string
-		/test
-		test qual=all name=family compare=not_eq
-			stringmonospace/string
-		/test
-		edit name=family mode=append_last
-			stringsans-serif/string
-		/edit
-	/match
-	
-!--
-  Load per-user customization file
---
-	include ignore_missing=yes~/.fonts.conf/include
-
-!--
   Load local system customization file
 --
 	include ignore_missing=yesconf.d/include
 
-!--
-  Font cache directory list
---
+!-- Font cache directory list --
+
 	cachedir/var/cache/fontconfig/cachedir
 	cachedir~/.fontconfig/cachedir
 
-!--
-  Alias well known font names to available TrueType fonts
---
-	alias
-		familyTimes/family
-		acceptfamilyTimes New Roman/family/accept
-	/alias
-	alias
-		familyHelvetica/family
-		acceptfamilyVerdana/family/accept
-	/alias
-	alias
-		familyArial/family
-		acceptfamilyVerdana/family/accept
-	/alias
-	alias
-		familyCourier/family
-		acceptfamilyCourier New/family/accept
-	/alias
-
-!--
-  Provide required aliases for standard names
---
-	alias
-		familyserif/family
-		prefer
-			familyTimes New Roman/family
-			familyNimbus Roman No9 L/family
-			familyLuxi Serif/family
-			familyTimes/family
-			

CVS commit: src/gnu/dist/gcc4/gcc

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:40:04 UTC 2009

Modified Files:
src/gnu/dist/gcc4/gcc: config.gcc
src/gnu/dist/gcc4/gcc/config/mips: mips.c mips.h netbsd.h
Added Files:
src/gnu/dist/gcc4/gcc/config/mips: netbsd64.h t-netbsd64

Log Message:
Merge gcc mips64 support from matt-nb5-mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/gnu/dist/gcc4/gcc/config.gcc
cvs rdiff -u -r1.6 -r1.7 src/gnu/dist/gcc4/gcc/config/mips/mips.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gcc4/gcc/config/mips/mips.h
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gcc4/gcc/config/mips/netbsd.h
cvs rdiff -u -r0 -r1.2 src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h \
src/gnu/dist/gcc4/gcc/config/mips/t-netbsd64

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

Modified files:

Index: src/gnu/dist/gcc4/gcc/config.gcc
diff -u src/gnu/dist/gcc4/gcc/config.gcc:1.19 src/gnu/dist/gcc4/gcc/config.gcc:1.20
--- src/gnu/dist/gcc4/gcc/config.gcc:1.19	Sat Oct 11 05:03:43 2008
+++ src/gnu/dist/gcc4/gcc/config.gcc	Mon Dec 14 00:40:04 2009
@@ -1496,10 +1496,13 @@
 	;;
 mips64*-*-netbsd*)			# NetBSD/mips64, either endian.
 	target_cpu_default=MASK_ABICALLS|MASK_64BIT|MASK_FLOAT64
-	tm_file=elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h
+	tm_file=elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h mips/netbsd64.h
+	tmake_file=${tmake_file} mips/t-netbsd64
 #	tm_defines=${tm_defines} MIPS_ISA_DEFAULT=64
-	tm_defines=${tm_defines} MIPS_ABI_DEFAULT=ABI_64
+	tm_defines=${tm_defines} MIPS_ABI_DEFAULT=ABI_N32
 #	tm_defines=${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\mips64\\\
+	gnu_ld=yes
+	gas=yes
 	;;
 mips*-*-netbsd*)			# NetBSD/mips, either endian.
 	target_cpu_default=MASK_ABICALLS

Index: src/gnu/dist/gcc4/gcc/config/mips/mips.c
diff -u src/gnu/dist/gcc4/gcc/config/mips/mips.c:1.6 src/gnu/dist/gcc4/gcc/config/mips/mips.c:1.7
--- src/gnu/dist/gcc4/gcc/config/mips/mips.c:1.6	Sun Aug 31 09:51:31 2008
+++ src/gnu/dist/gcc4/gcc/config/mips/mips.c	Mon Dec 14 00:40:04 2009
@@ -713,6 +713,7 @@
   { mips32, PROCESSOR_4KC, 32 },
   { mips32r2, PROCESSOR_M4K, 33 },
   { mips64, PROCESSOR_5KC, 64 },
+  { mips64r2, PROCESSOR_5KC, 65 },
 
   /* MIPS I */
   { r3000, PROCESSOR_R3000, 1 },

Index: src/gnu/dist/gcc4/gcc/config/mips/mips.h
diff -u src/gnu/dist/gcc4/gcc/config/mips/mips.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/mips/mips.h:1.2
--- src/gnu/dist/gcc4/gcc/config/mips/mips.h:1.1.1.1	Thu Apr 20 09:53:33 2006
+++ src/gnu/dist/gcc4/gcc/config/mips/mips.h	Mon Dec 14 00:40:04 2009
@@ -171,7 +171,7 @@
 
 /* Generate mips16 code */
 #define TARGET_MIPS16		((target_flags  MASK_MIPS16) != 0)
-/* Generate mips16e code. Default 16bit ASE for mips32/mips32r2/mips64 */
+/* Generate mips16e code. Default 16bit ASE for mips32/mips32r2/mips64/mips64r2 */
 #define GENERATE_MIPS16E	(TARGET_MIPS16  mips_isa = 32)
 
 /* Generic ISA defines.  */
@@ -182,6 +182,7 @@
 #define ISA_MIPS32		(mips_isa == 32)
 #define ISA_MIPS32R2		(mips_isa == 33)
 #define ISA_MIPS64  (mips_isa == 64)
+#define ISA_MIPS64R2		(mips_isa == 65)
 
 /* Architecture target defines.  */
 #define TARGET_MIPS3900 (mips_arch == PROCESSOR_R3900)
@@ -361,6 +362,12 @@
 	  builtin_define (__mips_isa_rev=1);			\
 	  builtin_define (_MIPS_ISA=_MIPS_ISA_MIPS64);	\
 	}			\
+  else if (ISA_MIPS64R2)	\
+	{			\
+	  builtin_define (__mips=64);\
+	  builtin_define (__mips_isa_rev=2);			\
+	  builtin_define (_MIPS_ISA=_MIPS_ISA_MIPS64);	\
+	}			\
 \
   if (TARGET_HARD_FLOAT)	\
 	builtin_define (__mips_hard_float);			\
@@ -480,7 +487,11 @@
 #  if MIPS_ISA_DEFAULT == 64
 #define MULTILIB_ISA_DEFAULT mips64
 #  else
-#define MULTILIB_ISA_DEFAULT mips1
+#   if MIPS_ISA_DEFAULT == 65
+# define MULTILIB_ISA_DEFAULT mips64r2
+#   else
+# define MULTILIB_ISA_DEFAULT mips1
+#   endif
 #  endif
 #endif
 #  endif
@@ -541,8 +552,9 @@
   || TARGET_MAD\
   || ISA_MIPS32	\
   || ISA_MIPS32R2   \
-  || ISA_MIPS64)\
-  !TARGET_MIPS16)
+  || ISA_MIPS64 \
+  || ISA_MIPS64R2   \
+  )  !TARGET_MIPS16)
 
 /* Generate three-operand multiply instructions for DImode.  */
 #define GENERATE_MULT3_DI   ((TARGET_MIPS3900)  \
@@ -563,7 +575,8 @@
 /* ISA has instructions for managing 64 bit fp and gp regs (e.g. mips3).  */
 #define ISA_HAS_64BIT_REGS	(ISA_MIPS3\
  || ISA_MIPS4\
-   

CVS commit: src/external/bsd/ntp/dist/ntpd

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:40:26 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_crypto.c

Log Message:
constify


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpd/ntp_crypto.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_crypto.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_crypto.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/ntp_crypto.c:1.2
--- src/external/bsd/ntp/dist/ntpd/ntp_crypto.c:1.1.1.1	Sun Dec 13 11:55:33 2009
+++ src/external/bsd/ntp/dist/ntpd/ntp_crypto.c	Sun Dec 13 19:40:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_crypto.c,v 1.1.1.1 2009/12/13 16:55:33 kardel Exp $	*/
+/*	$NetBSD: ntp_crypto.c,v 1.2 2009/12/14 00:40:26 christos Exp $	*/
 
 /*
  * ntp_crypto.c - NTP version 4 public key routines
@@ -403,7 +403,7 @@
 	keyid_t	cookie;		/* crumbles */
 	int	hismode;	/* packet mode */
 	int	rval = XEVNT_OK;
-	u_char	*ptr;
+	const u_char	*ptr;
 	u_int32 temp32;
 
 	/*
@@ -1553,7 +1553,8 @@
 	tstamp_t tstamp;	/* NTP timestamp */
 	u_int32	temp32;
 	u_int	len;
-	u_char	*ptr;
+	const u_char	*ptr;
+	u_char *sptr;
 
 	/*
 	 * Extract the public key from the request.
@@ -1577,9 +1578,9 @@
 	len = EVP_PKEY_size(pkey);
 	vp-vallen = htonl(len);
 	vp-ptr = emalloc(len);
-	ptr = vp-ptr;
+	sptr = vp-ptr;
 	temp32 = htonl(*cookie);
-	if (RSA_public_encrypt(4, (u_char *)temp32, ptr,
+	if (RSA_public_encrypt(4, (const u_char *)temp32, sptr,
 	pkey-pkey.rsa, RSA_PKCS1_OAEP_PADDING) = 0) {
 		msyslog(LOG_ERR, crypto_encrypt: %s,
 		ERR_error_string(ERR_get_error(), NULL));
@@ -2946,7 +2947,7 @@
 	EVP_MD_CTX ctx;		/* message digest context */
 	tstamp_t tstamp;	/* NTP timestamp */
 	u_int	len;
-	u_char	*ptr;
+	const u_char	*ptr;
 	int	i, temp;
 
 	/*
@@ -3029,7 +3030,7 @@
 	vp-vallen = htonl(len);
 	vp-ptr = emalloc(len);
 	ptr = vp-ptr;
-	i2d_X509(cert, ptr);
+	i2d_X509(cert, (unsigned char **)ptr);
 	vp-siglen = 0;
 	if (tstamp != 0) {
 		vp-sig = emalloc(sign_siglen);
@@ -3132,7 +3133,7 @@
 {
 	struct cert_info *xp;	/* subject certificate */
 	X509	*cert;		/* X509 certificate */
-	u_char	*ptr;
+	const u_char	*ptr;
 
 	/*
 	 * Save the issuer on the new certificate, but remember the old
@@ -3231,7 +3232,7 @@
 	struct cert_info *ret;	/* certificate info/value */
 	BIO	*bp;
 	char	pathbuf[MAXFILENAME];
-	u_char	*ptr;
+	const u_char	*ptr;
 	int	temp, cnt, i;
 
 	/*



CVS commit: src/external/bsd/ntp/dist/ntpd

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:41:03 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_loopfilter.c

Log Message:
bring back our status printing function


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c:1.2
--- src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c:1.1.1.1	Sun Dec 13 11:55:34 2009
+++ src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c	Sun Dec 13 19:41:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_loopfilter.c,v 1.1.1.1 2009/12/13 16:55:34 kardel Exp $	*/
+/*	$NetBSD: ntp_loopfilter.c,v 1.2 2009/12/14 00:41:03 christos Exp $	*/
 
 /*
  * ntp_loopfilter.c - implements the NTP loop filter algorithm
@@ -20,6 +20,9 @@
 
 #include signal.h
 #include setjmp.h
+#ifdef __NetBSD__
+#include util.h
+#endif
 
 #if defined(VMS)  defined(VMS_LOCALUNIT)	/*wjm*/
 #include ntp_refclock.h
@@ -178,6 +181,19 @@
 #endif /* SIGSYS */
 #endif /* KERNEL_PLL */
 
+static void
+sync_status(const char *what, int status)
+{
+	char buf[256], tbuf[1024];
+#ifdef STA_FMT
+	snprintb(buf, sizeof(buf), STA_FMT, status);
+#else
+	snprintf(buf, sizeof(buf), %04x, status);
+#endif
+	snprintf(tbuf, sizeof(tbuf), %s status=%s, what, buf);
+	report_event(EVNT_KERN, NULL, tbuf);
+}
+
 /*
  * init_loopfilter - initialize loop filter data
  */
@@ -545,16 +561,13 @@
 			 * Enable/disable the PPS if requested.
 			 */
 			if (pps_enable) {
-if (!(pll_status  STA_PPSTIME))
-	report_event(EVNT_KERN,
-	NULL, PPS enabled);
 ntv.status |= STA_PPSTIME | STA_PPSFREQ;
+if (!(pll_status  STA_PPSTIME))
+	sync_status(PPS enbled, ntv.status);
 			} else {
+ntv.status = ~(STA_PPSTIME | STA_PPSFREQ);
 if (pll_status  STA_PPSTIME)
-	report_event(EVNT_KERN,
-	NULL, PPS disabled);
-ntv.status = ~(STA_PPSTIME |
-STA_PPSFREQ);
+	sync_status(PPS disabled, ntv.status);
 			}
 			if (sys_leap == LEAP_ADDSECOND)
 ntv.status |= STA_INS;
@@ -569,8 +582,12 @@
 		 */
 		if (ntp_adjtime(ntv) == TIME_ERROR) {
 			if (!(ntv.status  STA_PPSSIGNAL))
-report_event(EVNT_KERN, NULL,
-PPS no signal);
+sync_status(PPS no signal, ntv.status);
+			else
+sync_status(adjtime error, ntv.status);
+		} else {
+ 			if ((ntv.status ^ pll_status)  ~STA_FLL)
+sync_status(status change, ntv.status);
 		}
 		pll_status = ntv.status;
 #ifdef STA_NANO
@@ -914,8 +931,7 @@
 			if (pll_status  STA_CLK)
 ext_enable = 1;
 #endif /* STA_NANO */
-			report_event(EVNT_KERN, NULL,
- 		  	kernel time sync enabled);
+			sync_status(kernel time sync enabled, ntv.status);
 		}
 #endif /* KERNEL_PLL */
 #endif /* LOCKCLOCK */
@@ -953,8 +969,7 @@
 			ntv.modes = MOD_STATUS;
 			ntv.status = STA_UNSYNC;
 			ntp_adjtime(ntv);
-			report_event(EVNT_KERN, NULL,
- 		  	kernel time sync disabledx);
+			sync_status(kernel time sync disabled, ntv.status);
 		   }
 #endif /* KERNEL_PLL */
 #endif /* LOCKCLOCK */



CVS commit: src/libexec/ld.elf_so/arch/mips

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:41:19 UTC 2009

Modified Files:
src/libexec/ld.elf_so/arch/mips: Makefile.inc mips_reloc.c rtld_start.S

Log Message:
Merge from matt-nb5-mips64:
Add N32/N64 support for mips dynamic loader.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/libexec/ld.elf_so/arch/mips/Makefile.inc
cvs rdiff -u -r1.55 -r1.56 src/libexec/ld.elf_so/arch/mips/mips_reloc.c
cvs rdiff -u -r1.9 -r1.10 src/libexec/ld.elf_so/arch/mips/rtld_start.S

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

Modified files:

Index: src/libexec/ld.elf_so/arch/mips/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.16 src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.17
--- src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.16	Wed Nov  4 17:02:43 2009
+++ src/libexec/ld.elf_so/arch/mips/Makefile.inc	Mon Dec 14 00:41:18 2009
@@ -1,11 +1,17 @@
-#	$NetBSD: Makefile.inc,v 1.16 2009/11/04 17:02:43 skrll Exp $
+#	$NetBSD: Makefile.inc,v 1.17 2009/12/14 00:41:18 matt Exp $
 
 SRCS+=		rtld_start.S mips_reloc.c
 
 # XXX Should not be in CPPFLAGS!
-CPPFLAGS+=	-mabicalls -G0 -fPIC
+CPUFLAGS+=	-G0
 
+ABI64?= ${CPUFLAGS:M-mabi=64:M-mabi=o64}
+.if !empty(ABI64)
+CPPFLAGS+=	-DELFSIZE=64
+.else
 CPPFLAGS+=	-DELFSIZE=32
+.endif
 CPPFLAGS+=	-DRTLD_INHIBIT_COPY_RELOCS
+AFLAGS+=	-Wa,--fatal-warnings
 
 LDFLAGS+=	-Wl,-e,rtld_start

Index: src/libexec/ld.elf_so/arch/mips/mips_reloc.c
diff -u src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.55 src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.56
--- src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.55	Sat Aug 29 13:46:55 2009
+++ src/libexec/ld.elf_so/arch/mips/mips_reloc.c	Mon Dec 14 00:41:18 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_reloc.c,v 1.55 2009/08/29 13:46:55 jmmv Exp $	*/
+/*	$NetBSD: mips_reloc.c,v 1.56 2009/12/14 00:41:18 matt Exp $	*/
 
 /*
  * Copyright 1997 Michael L. Hitch mhi...@montana.edu
@@ -30,11 +30,12 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: mips_reloc.c,v 1.55 2009/08/29 13:46:55 jmmv Exp $);
+__RCSID($NetBSD: mips_reloc.c,v 1.56 2009/12/14 00:41:18 matt Exp $);
 #endif /* not lint */
 
 #include sys/types.h
 #include sys/stat.h
+#include sys/endian.h
 
 #include stdlib.h
 #include string.h
@@ -42,7 +43,9 @@
 #include debug.h
 #include rtld.h
 
+#ifdef __mips_o32
 #define SUPPORT_OLD_BROKEN_LD
+#endif
 
 void _rtld_bind_start(void);
 void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr);
@@ -52,29 +55,69 @@
  * It is possible for the compiler to emit relocations for unaligned data.
  * We handle this situation with these inlines.
  */
-#define	RELOC_ALIGNED_P(x) \
-	(((uintptr_t)(x)  (sizeof(void *) - 1)) == 0)
 
-static inline Elf_Addr
-load_ptr(void *where)
+#if ELFSIZE == 64
+/*
+ * ELF64 MIPS encodes the relocs uniquely.  The first 32-bits of info contain
+ * the symbol index.  The top 32-bits contain three relocation types encoded
+ * in big-endian integer with first relocation in LSB.  This means for little
+ * endian we have to byte swap that interger (r_type).
+ */
+#define	Elf_Sxword			Elf64_Sxword
+#define	ELF_R_NXTTYPE_64_P(r_type)	r_type)  8)  0xff) == R_TYPE(64))
+#if BYTE_ORDER == LITTLE_ENDIAN
+#undef ELF_R_SYM
+#undef ELF_R_TYPE
+#define ELF_R_SYM(r_info)		((r_info)  0x)
+#define ELF_R_TYPE(r_info)		bswap32((r_info)  32)
+#endif
+#else
+#define	ELF_R_NXTTYPE_64_P(r_type)	(0)
+#define	Elf_Sxword			Elf32_Sword
+#endif
+
+static inline Elf_Sxword
+load_ptr(void *where, size_t len)
 {
-	if (__predict_true(RELOC_ALIGNED_P(where)))
-		return *(Elf_Addr *)where;
-	else {
-		Elf_Addr res;
+	Elf_Sxword val;
 
-		(void)memcpy(res, where, sizeof(res));
-		return res;
+	if (__predict_true(((uintptr_t)where  (len - 1)) == 0)) {
+#if ELFSIZE == 64
+		if (len == sizeof(Elf_Sxword))
+			return *(Elf_Sxword *)where;
+#endif
+		return *(Elf_Sword *)where;
 	}
+
+	val = 0;
+#if BYTE_ORDER == LITTLE_ENDIAN
+	(void)memcpy(val, where, len);
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+	(void)memcpy((uint8_t *)((val)+1) - len, where, len);
+#endif
+	return (len == sizeof(Elf_Sxword)) ? val : (Elf_Sword)val;
 }
 
 static inline void
-store_ptr(void *where, Elf_Addr val)
+store_ptr(void *where, Elf_Sxword val, size_t len)
 {
-	if (__predict_true(RELOC_ALIGNED_P(where)))
-		*(Elf_Addr *)where = val;
-	else
-		(void)memcpy(where, val, sizeof(val));
+	if (__predict_true(((uintptr_t)where  (len - 1)) == 0)) {
+#if ELFSIZE == 64
+		if (len == sizeof(Elf_Sxword)) {
+			*(Elf_Sxword *)where = val;
+			return;
+		}
+#endif
+		*(Elf_Sword *)where = val;
+		return;
+	}
+#if BYTE_ORDER == LITTLE_ENDIAN
+	(void)memcpy(where, val, len);
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+	(void)memcpy(where, (const uint8_t *)((val)+1) - len, len);
+#endif
 }
 
 
@@ -94,7 +137,8 @@
 	void *where;
 	const Elf_Sym *symtab = NULL, *sym;
 	Elf_Addr *got = NULL;
-	Elf_Word local_gotno = 0, symtabno = 0, gotsym = 0, i;
+	Elf_Word local_gotno = 0, symtabno 

CVS commit: src/usr.bin/xlint

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:42:06 UTC 2009

Modified Files:
src/usr.bin/xlint: Makefile.inc

Log Message:
Merge from matt-nb5-mips64
Teach lint about mips64


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/xlint/Makefile.inc

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

Modified files:

Index: src/usr.bin/xlint/Makefile.inc
diff -u src/usr.bin/xlint/Makefile.inc:1.10 src/usr.bin/xlint/Makefile.inc:1.11
--- src/usr.bin/xlint/Makefile.inc:1.10	Tue Apr 14 09:09:59 2009
+++ src/usr.bin/xlint/Makefile.inc	Mon Dec 14 00:42:06 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2009/04/14 09:09:59 lukem Exp $
+#	$NetBSD: Makefile.inc,v 1.11 2009/12/14 00:42:06 matt Exp $
 
 WARNS?=		3	# XXX: fails -Wsign-compare
 
@@ -11,6 +11,8 @@
 # on the m68000), so we special case the directory name here.
 .if ${MACHINE_ARCH} == m68000
 ARCHSUBDIR=	m68000
+.elif ${MACHINE_ARCH} == mips64eb || ${MACHINE_ARCH} == mips64el
+ARCHSUBDIR=	mips64
 .else
 ARCHSUBDIR=	${MACHINE_CPU}
 .endif



CVS commit: src/external/bsd/ntp/dist/ntpd

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:42:21 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/ntpd: refclock_acts.c

Log Message:
fix debug printf format
fix bogus ctype cast


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpd/refclock_acts.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/refclock_acts.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_acts.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/refclock_acts.c:1.2
--- src/external/bsd/ntp/dist/ntpd/refclock_acts.c:1.1.1.1	Sun Dec 13 11:55:43 2009
+++ src/external/bsd/ntp/dist/ntpd/refclock_acts.c	Sun Dec 13 19:42:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_acts.c,v 1.1.1.1 2009/12/13 16:55:43 kardel Exp $	*/
+/*	$NetBSD: refclock_acts.c,v 1.2 2009/12/14 00:42:21 christos Exp $	*/
 
 /*
  * refclock_acts - clock driver for the NIST/USNO/PTB/NPL Computer Time
@@ -330,7 +330,7 @@
 acts_message(peer);
 up-bufptr = pp-a_lastcode;
 			}
-		} else if (!iscntrl(*tptr)) {
+		} else if (!iscntrl((unsigned char)*tptr)) {
 			*up-bufptr++ = *tptr;
 			if (*tptr == '*' || *tptr == '#') {
 up-tstamp = pp-lastrec;
@@ -364,7 +364,7 @@
 	up = (struct actsunit *)pp-unitptr;
 #ifdef DEBUG
 	ioctl(pp-io.fd, TIOCMGET, (char *)modem);
-	snprintf(tbuf, sizeof(tbuf), acts: %04x (%d %d) %d %s, modem,
+	snprintf(tbuf, sizeof(tbuf), acts: %04x (%d %d) %zu %s, modem,
 	up-state, up-timer, strlen(pp-a_lastcode),
 	pp-a_lastcode);
 	if (debug)



CVS commit: src/external/bsd/ntp/dist/ntpd

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:42:47 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntpd.c

Log Message:
use initgroups/setgroups
proper types for uid and gid.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpd/ntpd.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntpd.c
diff -u src/external/bsd/ntp/dist/ntpd/ntpd.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/ntpd.c:1.2
--- src/external/bsd/ntp/dist/ntpd/ntpd.c:1.1.1.1	Sun Dec 13 11:56:15 2009
+++ src/external/bsd/ntp/dist/ntpd/ntpd.c	Sun Dec 13 19:42:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntpd.c,v 1.1.1.1 2009/12/13 16:56:15 kardel Exp $	*/
+/*	$NetBSD: ntpd.c,v 1.2 2009/12/14 00:42:47 christos Exp $	*/
 
 /*
  * ntpd.c - main program for the fixed point NTP daemon
@@ -177,8 +177,8 @@
 char *user = NULL;		/* User to switch to */
 char *group = NULL;		/* group to switch to */
 const char *chrootdir = NULL;	/* directory to chroot to */
-int sw_uid;
-int sw_gid;
+uid_t sw_uid;
+gid_t sw_gid;
 char *endp;
 struct group *gr;
 struct passwd *pw;
@@ -962,6 +962,10 @@
 			msyslog(LOG_ERR, Cannot setegid() to group `%s': %m, group);
 			exit (-1);
 		}
+		if (group)
+			setgroups(1, sw_gid);
+		else
+			initgroups(pw-pw_name, pw-pw_gid);
 		if (user  setuid(sw_uid)) {
 			msyslog(LOG_ERR, Cannot setuid() to user `%s': %m, user);
 			exit (-1);



CVS commit: src/usr.bin/elf2ecoff

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:43:06 UTC 2009

Modified Files:
src/usr.bin/elf2ecoff: Makefile elf2ecoff.c

Log Message:
Merge from matt-nb5-mips64


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/elf2ecoff/Makefile
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/elf2ecoff/elf2ecoff.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/elf2ecoff/Makefile
diff -u src/usr.bin/elf2ecoff/Makefile:1.10 src/usr.bin/elf2ecoff/Makefile:1.11
--- src/usr.bin/elf2ecoff/Makefile:1.10	Sun May 18 07:57:34 2003
+++ src/usr.bin/elf2ecoff/Makefile	Mon Dec 14 00:43:05 2009
@@ -1,10 +1,13 @@
-#	$NetBSD: Makefile,v 1.10 2003/05/18 07:57:34 lukem Exp $
+#	$NetBSD: Makefile,v 1.11 2009/12/14 00:43:05 matt Exp $
 #	from: @(#)Makefile	5.4 (Berkeley) 5/11/90
 
 .include bsd.own.mk
 
+ABI64:=  ${CPUFLAGS:M-mabi=64:M-mabi=o64}
 # Build ELF to {ecoff, aout} tools on mips, for old bootblocks/PROMs.
-.if (${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb)
+.if (${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb || \
+ ((${MACHINE_ARCH} == mips64el || ${MACHINE_ARCH} == mips64eb)  \
+  !defined(HOSTPROG)  empty(ABI64)))
 
 PROG=	elf2ecoff
 

Index: src/usr.bin/elf2ecoff/elf2ecoff.c
diff -u src/usr.bin/elf2ecoff/elf2ecoff.c:1.23 src/usr.bin/elf2ecoff/elf2ecoff.c:1.24
--- src/usr.bin/elf2ecoff/elf2ecoff.c:1.23	Thu Apr 23 14:49:32 2009
+++ src/usr.bin/elf2ecoff/elf2ecoff.c	Mon Dec 14 00:43:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf2ecoff.c,v 1.23 2009/04/23 14:49:32 tsutsui Exp $	*/
+/*	$NetBSD: elf2ecoff.c,v 1.24 2009/12/14 00:43:05 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Jonathan Stone
@@ -400,16 +400,16 @@
 	/* Write the headers... */
 	safewrite(outfile, ep.f, sizeof(ep.f), ep.f: write: %s\n);
 	if (debug)
-		fprintf(stderr, wrote %d byte file header.\n, sizeof(ep.f));
+		fprintf(stderr, wrote %zu byte file header.\n, sizeof(ep.f));
 
 	safewrite(outfile, ep.a, sizeof(ep.a), ep.a: write: %s\n);
 	if (debug)
-		fprintf(stderr, wrote %d byte a.out header.\n, sizeof(ep.a));
+		fprintf(stderr, wrote %zu byte a.out header.\n, sizeof(ep.a));
 
 	safewrite(outfile, esecs, sizeof(esecs[0]) * nsecs,
 	esecs: write: %s\n);
 	if (debug)
-		fprintf(stderr, wrote %d bytes of section headers.\n,
+		fprintf(stderr, wrote %zu bytes of section headers.\n,
 		sizeof(esecs[0]) * nsecs);
 
 
@@ -661,7 +661,7 @@
 	symhdrp-issExtMax = strsize;
 	if (debug)
 		fprintf(stderr,
-		ECOFF symhdr: symhdr %x, strsize %lx, symsize %lx\n,
+		ECOFF symhdr: symhdr %zx, strsize %lx, symsize %lx\n,
 		sizeof(*symhdrp), strsize,
 		(nesyms * sizeof(struct ecoff_extsym)));
 



CVS commit: src/external/bsd/ntp/dist/ntpd

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:43:09 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntpd-opts.h

Log Message:
don't warn about SLEW; ntpd defines it!


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpd/ntpd-opts.h

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntpd-opts.h
diff -u src/external/bsd/ntp/dist/ntpd/ntpd-opts.h:1.1.1.1 src/external/bsd/ntp/dist/ntpd/ntpd-opts.h:1.2
--- src/external/bsd/ntp/dist/ntpd/ntpd-opts.h:1.1.1.1	Sun Dec 13 11:56:16 2009
+++ src/external/bsd/ntp/dist/ntpd/ntpd-opts.h	Sun Dec 13 19:43:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntpd-opts.h,v 1.1.1.1 2009/12/13 16:56:16 kardel Exp $	*/
+/*	$NetBSD: ntpd-opts.h,v 1.2 2009/12/14 00:43:09 christos Exp $	*/
 
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.h)
@@ -236,10 +236,14 @@
 #  warning undefining DVAR due to option name conflict
 #  undef   DVAR
 # endif
+
+/* Defined in ntpsim.h!
 # ifdefSLEW
 #  warning undefining SLEW due to option name conflict
 #  undef   SLEW
 # endif
+*/
+
 # ifdefUSEPCC
 #  warning undefining USEPCC due to option name conflict
 #  undef   USEPCC



CVS commit: src/external/bsd/ntp/dist/ntpd

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:43:58 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c

Log Message:
fix for long long time_t


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpd/ntp_io.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.2
--- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.1.1.1	Sun Dec 13 11:56:13 2009
+++ src/external/bsd/ntp/dist/ntpd/ntp_io.c	Sun Dec 13 19:43:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_io.c,v 1.1.1.1 2009/12/13 16:56:13 kardel Exp $	*/
+/*	$NetBSD: ntp_io.c,v 1.2 2009/12/14 00:43:58 christos Exp $	*/
 
 /*
  * ntp_io.c - input/output routines for ntpd.	The socket-opening code
@@ -3080,8 +3080,8 @@
 			l_fp nts;
 
 			tvp = (struct timeval *)CMSG_DATA(cmsghdr);
-			DPRINTF(4, (fetch_timestamp: system network time stamp: %ld.%06ld\n,
-tvp-tv_sec, tvp-tv_usec));
+			DPRINTF(4, (fetch_timestamp: system network time stamp: %lld.%06ld\n,
+(long long)tvp-tv_sec, tvp-tv_usec));
 			nts.l_i = tvp-tv_sec + JAN_1970;
 			dtemp = (tvp-tv_usec 
  + (ntp_random() * 2. / FRAC)) / 1e6;



CVS commit: src/external/bsd/ntp/dist/ntpd

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:46:21 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_refclock.c ntp_request.c
refclock_arc.c refclock_heath.c refclock_neoclock4x.c
refclock_nmea.c refclock_oncore.c refclock_parse.c

Log Message:
fix bogus ctype casts


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpd/ntp_refclock.c \
src/external/bsd/ntp/dist/ntpd/ntp_request.c \
src/external/bsd/ntp/dist/ntpd/refclock_arc.c \
src/external/bsd/ntp/dist/ntpd/refclock_heath.c \
src/external/bsd/ntp/dist/ntpd/refclock_neoclock4x.c \
src/external/bsd/ntp/dist/ntpd/refclock_nmea.c \
src/external/bsd/ntp/dist/ntpd/refclock_oncore.c \
src/external/bsd/ntp/dist/ntpd/refclock_parse.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_refclock.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_refclock.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/ntp_refclock.c:1.2
--- src/external/bsd/ntp/dist/ntpd/ntp_refclock.c:1.1.1.1	Sun Dec 13 11:55:38 2009
+++ src/external/bsd/ntp/dist/ntpd/ntp_refclock.c	Sun Dec 13 19:46:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_refclock.c,v 1.1.1.1 2009/12/13 16:55:38 kardel Exp $	*/
+/*	$NetBSD: ntp_refclock.c,v 1.2 2009/12/14 00:46:21 christos Exp $	*/
 
 /*
  * ntp_refclock - processing support for reference clocks
Index: src/external/bsd/ntp/dist/ntpd/ntp_request.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_request.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/ntp_request.c:1.2
--- src/external/bsd/ntp/dist/ntpd/ntp_request.c:1.1.1.1	Sun Dec 13 11:55:40 2009
+++ src/external/bsd/ntp/dist/ntpd/ntp_request.c	Sun Dec 13 19:46:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_request.c,v 1.1.1.1 2009/12/13 16:55:40 kardel Exp $	*/
+/*	$NetBSD: ntp_request.c,v 1.2 2009/12/14 00:46:21 christos Exp $	*/
 
 /*
  * ntp_request.c - respond to information requests
@@ -411,7 +411,6 @@
 	int mod_okay
 	)
 {
-	static u_long quiet_until;
 	struct req_pkt *inpkt;
 	struct req_pkt_tail *tailinpkt;
 	sockaddr_u *srcadr;
@@ -450,14 +449,8 @@
 	|| (++ec, INFO_MBZ(inpkt-mbz_itemsize) != 0)
 	|| (++ec, rbufp-recv_length  REQ_LEN_HDR)
 		) {
-		NLOG(NLOG_SYSEVENT)
-			if (current_time = quiet_until) {
-msyslog(LOG_ERR,
-	process_private: drop test %d
-	 failed, pkt from %s,
-	ec, stoa(srcadr));
-quiet_until = current_time + 60;
-			}
+		msyslog(LOG_ERR, process_private: INFO_ERR_FMT: test %d failed, pkt from %s, ec, stoa(srcadr));
+		req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
 		return;
 	}
 
@@ -1183,7 +1176,7 @@
 	/*
 	 * Importations from the peer module
 	 */
-	extern int peer_hash_count[NTP_HASH_SIZE];
+	extern int peer_hash_count[];
 	extern int peer_free_count;
 	extern u_long peer_timereset;
 	extern u_long findpeer_calls;
Index: src/external/bsd/ntp/dist/ntpd/refclock_arc.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_arc.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/refclock_arc.c:1.2
--- src/external/bsd/ntp/dist/ntpd/refclock_arc.c:1.1.1.1	Sun Dec 13 11:55:44 2009
+++ src/external/bsd/ntp/dist/ntpd/refclock_arc.c	Sun Dec 13 19:46:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_arc.c,v 1.1.1.1 2009/12/13 16:55:44 kardel Exp $	*/
+/*	$NetBSD: refclock_arc.c,v 1.2 2009/12/14 00:46:21 christos Exp $	*/
 
 /*
  * refclock_arc - clock driver for ARCRON MSF/DCF/WWVB receivers
@@ -831,7 +831,7 @@
 static int
 get2(char *p, int *val)
 {
-  if (!isdigit((int)p[0]) || !isdigit((int)p[1])) return 0;
+  if (!isdigit((unsigned char)p[0]) || !isdigit((unsigned char)p[1])) return 0;
   *val = (p[0] - '0') * 10 + p[1] - '0';
   return 1;
 }
@@ -839,7 +839,7 @@
 static int
 get1(char *p, int *val)
 {
-  if (!isdigit((int)p[0])) return 0;
+  if (!isdigit((unsigned char)p[0])) return 0;
   *val = p[0] - '0';
   return 1;
 }
@@ -931,7 +931,7 @@
 #ifdef DEBUG
 		if(debug) { /* Show \r as `R', other non-printing char as `?'. */
 			printf(arc: stamp --%c-- (%d chars rcvd)\n,
-			   ((c == '\r') ? 'R' : (isgraph((int)c) ? c : '?')),
+			   ((c == '\r') ? 'R' : (isgraph((unsigned char)c) ? c : '?')),
 			   rbufp-recv_length);
 		}
 #endif
Index: src/external/bsd/ntp/dist/ntpd/refclock_heath.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_heath.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/refclock_heath.c:1.2
--- src/external/bsd/ntp/dist/ntpd/refclock_heath.c:1.1.1.1	Sun Dec 13 11:55:48 2009
+++ src/external/bsd/ntp/dist/ntpd/refclock_heath.c	Sun Dec 13 19:46:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_heath.c,v 1.1.1.1 2009/12/13 16:55:48 kardel Exp $	*/
+/*	$NetBSD: refclock_heath.c,v 1.2 2009/12/14 00:46:21 christos Exp $	*/
 
 /*
  * refclock_heath - clock driver for Heath GC-1000
@@ -379,7 +379,7 @@
 	/*
 	 * Determine synchronization and last update
 	 */
-	if (!isdigit((int)dsec))
+	if (!isdigit((unsigned char)dsec))
 		pp-leap = 

CVS commit: src/sys/compat

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:47:12 UTC 2009

Modified Files:
src/sys/compat/common: Makefile.inc
src/sys/compat/irix: files.irix irix_exec.c irix_exec.h
irix_exec_elf32.c irix_fcntl.c irix_prctl.c irix_signal.c
irix_sysmp.c irix_syssgi.c irix_types.h
src/sys/compat/linux/arch/mips: linux_machdep.c
src/sys/compat/netbsd32: netbsd32.h netbsd32_exec_elf32.c netbsd32_fs.c
netbsd32_netbsd.c netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c syscalls.master
src/sys/compat/ultrix: ultrix_flock.h ultrix_fs.c ultrix_ioctl.c
ultrix_pathname.c ultrix_tty.h
Added Files:
src/sys/compat/irix: irix_exec_elf64.c

Log Message:
Merge from matt-nb5-mips64


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/compat/common/Makefile.inc
cvs rdiff -u -r1.26 -r1.27 src/sys/compat/irix/files.irix
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/irix/irix_exec.c
cvs rdiff -u -r1.27 -r1.28 src/sys/compat/irix/irix_exec.h \
src/sys/compat/irix/irix_fcntl.c
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/irix/irix_exec_elf32.c
cvs rdiff -u -r0 -r1.2 src/sys/compat/irix/irix_exec_elf64.c
cvs rdiff -u -r1.49 -r1.50 src/sys/compat/irix/irix_prctl.c \
src/sys/compat/irix/irix_syssgi.c
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/irix/irix_signal.c
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/irix/irix_sysmp.c
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/irix/irix_types.h
cvs rdiff -u -r1.39 -r1.40 src/sys/compat/linux/arch/mips/linux_machdep.c
cvs rdiff -u -r1.83 -r1.84 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.30 -r1.31 src/sys/compat/netbsd32/netbsd32_exec_elf32.c
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/netbsd32/netbsd32_fs.c
cvs rdiff -u -r1.162 -r1.163 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.87 -r1.88 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.80 -r1.81 src/sys/compat/netbsd32/syscalls.master
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/ultrix/ultrix_flock.h
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/ultrix/ultrix_fs.c
cvs rdiff -u -r1.35 -r1.36 src/sys/compat/ultrix/ultrix_ioctl.c
cvs rdiff -u -r1.37 -r1.38 src/sys/compat/ultrix/ultrix_pathname.c
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/ultrix/ultrix_tty.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/compat/common/Makefile.inc
diff -u src/sys/compat/common/Makefile.inc:1.19 src/sys/compat/common/Makefile.inc:1.20
--- src/sys/compat/common/Makefile.inc:1.19	Sat Nov  2 07:49:57 2002
+++ src/sys/compat/common/Makefile.inc	Mon Dec 14 00:47:10 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.19 2002/11/02 07:49:57 perry Exp $
+#	$NetBSD: Makefile.inc,v 1.20 2009/12/14 00:47:10 matt Exp $
 #
 #	Configuration variables (default values are below):
 #
@@ -41,7 +41,8 @@
 	LORDER=${LORDER:Q} \
 	TSORT=${TSORT:Q} \
 	RANLIB=${RANLIB:Q} \
-	LD=${LD:Q} STRIP=${STRIP:Q} \
+	LD=${LD:Q} LDFLAGS=${LDFLAGS:Q} \
+	STRIP=${STRIP:Q} \
 	MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
 	COMPATCPPFLAGS=${CPPFLAGS:s...@^-i.@-i${compatdotd...@g:Q} \
 	LINTFLAGS=${KERNLINTFLAGS:Q} \

Index: src/sys/compat/irix/files.irix
diff -u src/sys/compat/irix/files.irix:1.26 src/sys/compat/irix/files.irix:1.27
--- src/sys/compat/irix/files.irix:1.26	Wed Nov 19 18:36:03 2008
+++ src/sys/compat/irix/files.irix	Mon Dec 14 00:47:10 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: files.irix,v 1.26 2008/11/19 18:36:03 ad Exp $
+#	$NetBSD: files.irix,v 1.27 2009/12/14 00:47:10 matt Exp $
 #
 
 file	arch/mips/mips/irix_syscall.c		compat_irix
@@ -7,6 +7,7 @@
 file	compat/irix/irix_errno.c		compat_irix
 file	compat/irix/irix_exec.c			compat_irix
 file	compat/irix/irix_exec_elf32.c		compat_irix  exec_elf32
+file	compat/irix/irix_exec_elf64.c		compat_irix  exec_elf64
 file	compat/irix/irix_fcntl.c		compat_irix
 file	compat/irix/irix_ioctl.c		compat_irix
 file	compat/irix/irix_kmem.c			compat_irix

Index: src/sys/compat/irix/irix_exec.c
diff -u src/sys/compat/irix/irix_exec.c:1.55 src/sys/compat/irix/irix_exec.c:1.56
--- src/sys/compat/irix/irix_exec.c:1.55	Thu Dec 10 14:13:53 2009
+++ src/sys/compat/irix/irix_exec.c	Mon Dec 14 00:47:10 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: irix_exec.c,v 1.55 2009/12/10 14:13:53 matt Exp $ */
+/*	$NetBSD: irix_exec.c,v 1.56 2009/12/14 00:47:10 matt Exp $ */
 
 /*-
  * Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: irix_exec.c,v 1.55 2009/12/10 14:13:53 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: irix_exec.c,v 1.56 2009/12/14 00:47:10 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_syscall_debug.h
@@ -124,10 

CVS commit: src/sys

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:48:36 UTC 2009

Modified Files:
src/sys/kern: core_elf32.c exec_elf.c init_sysent.c sys_process.c
syscalls.c
src/sys/lib/libkern/arch/mips: Makefile.inc
src/sys/sys: exec.h ptrace.h

Log Message:
Merge from matt-nb5-mips64


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.11 -r1.12 src/sys/kern/exec_elf.c
cvs rdiff -u -r1.241 -r1.242 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.151 -r1.152 src/sys/kern/sys_process.c
cvs rdiff -u -r1.232 -r1.233 src/sys/kern/syscalls.c
cvs rdiff -u -r1.20 -r1.21 src/sys/lib/libkern/arch/mips/Makefile.inc
cvs rdiff -u -r1.128 -r1.129 src/sys/sys/exec.h
cvs rdiff -u -r1.41 -r1.42 src/sys/sys/ptrace.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/core_elf32.c
diff -u src/sys/kern/core_elf32.c:1.34 src/sys/kern/core_elf32.c:1.35
--- src/sys/kern/core_elf32.c:1.34	Wed Oct 21 21:12:06 2009
+++ src/sys/kern/core_elf32.c	Mon Dec 14 00:48:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_elf32.c,v 1.34 2009/10/21 21:12:06 rmind Exp $	*/
+/*	$NetBSD: core_elf32.c,v 1.35 2009/12/14 00:48:35 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.34 2009/10/21 21:12:06 rmind Exp $);
+__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.35 2009/12/14 00:48:35 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_coredump.h
@@ -90,7 +90,11 @@
 #define	elfround(x)	roundup((x), ELFROUNDSIZE)
 
 #define elf_process_read_regs	CONCAT(process_read_regs, ELFSIZE)
+#ifdef __HAVE_PROCESS_XFPREGS
+#define elf_process_read_xfpregs CONCAT(process_read_xfpregs, ELFSIZE)
+#else
 #define elf_process_read_fpregs	CONCAT(process_read_fpregs, ELFSIZE)
+#endif
 #define elf_reg			CONCAT(process_reg, ELFSIZE)
 #define elf_fpreg		CONCAT(process_fpreg, ELFSIZE)
 
@@ -162,6 +166,10 @@
 	ehdr.e_shnum = 0;
 	ehdr.e_shstrndx = 0;
 
+#ifdef ELF_MD_COREDUMP_SETUP
+	ELF_MD_COREDUMP_SETUP(l, ehdr);
+#endif
+
 	/* Write out the ELF header. */
 	error = coredump_write(cookie, UIO_SYSSPACE, ehdr, sizeof(ehdr));
 	if (error)
@@ -451,12 +459,17 @@
 #ifdef PT_GETFPREGS
 	notesize = sizeof(nhdr) + elfround(namesize) + elfround(sizeof(freg));
 	if (iocookie) {
+		size_t freglen = sizeof(freg);
+#ifdef __HAVE_PROCESS_XFPREGS
+		error = elf_process_read_xfpregs(l, freg, freglen);
+#else
 		error = elf_process_read_fpregs(l, freg);
+#endif
 		if (error)
 			return (error);
 
 		nhdr.n_namesz = namesize;
-		nhdr.n_descsz = sizeof(freg);
+		nhdr.n_descsz = freglen;
 		nhdr.n_type = PT_GETFPREGS;
 
 		error = ELFNAMEEND(coredump_writenote)(p, iocookie, nhdr,

Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.11 src/sys/kern/exec_elf.c:1.12
--- src/sys/kern/exec_elf.c:1.11	Wed Dec 17 20:51:35 2008
+++ src/sys/kern/exec_elf.c	Mon Dec 14 00:48:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.11 2008/12/17 20:51:35 cegger Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.12 2009/12/14 00:48:35 matt Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.11 2008/12/17 20:51:35 cegger Exp $);
+__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.12 2009/12/14 00:48:35 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pax.h
@@ -909,7 +909,10 @@
 
 	if ((error = netbsd_elf_signature(l, epp, eh)) != 0)
 		return error;
-#ifdef ELF_INTERP_NON_RELOCATABLE
+#ifdef ELF_MD_PROBE_FUNC
+	if ((error = ELF_MD_PROBE_FUNC(l, epp, eh, itp, pos)) != 0)
+		return error;
+#elif defined(ELF_INTERP_NON_RELOCATABLE)
 	*pos = ELF_LINK_ADDR;
 #endif
 	return 0;

Index: src/sys/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.241 src/sys/kern/init_sysent.c:1.242
--- src/sys/kern/init_sysent.c:1.241	Tue Oct 13 21:57:53 2009
+++ src/sys/kern/init_sysent.c	Mon Dec 14 00:48:35 2009
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.241 2009/10/13 21:57:53 pooka Exp $ */
+/* $NetBSD: init_sysent.c,v 1.242 2009/12/14 00:48:35 matt Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.229 2009/07/21 23:59:00 pooka Exp
+ * created from	NetBSD
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.241 2009/10/13 21:57:53 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.242 2009/12/14 00:48:35 matt Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h
@@ -465,9 +465,9 @@
 #endif
 	{ 0, 0, 0,
 	sys_nosys },			/* 172 = unimplemented */
-	{ ns(struct sys_pread_args), 0,
+	{ ns(struct sys_pread_args), SYCALL_NARGS64_VAL(1) | SYCALL_ARG4_64,
 	(sy_call_t *)sys_pread },		/* 173 = pread */
-	{ ns(struct sys_pwrite_args), 0,
+	{ ns(struct sys_pwrite_args), SYCALL_NARGS64_VAL(1) | SYCALL_ARG4_64,
 	  

CVS commit: src/external/bsd/ntp/dist/ntpq

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 00:49:46 UTC 2009

Modified Files:
src/external/bsd/ntp/dist/ntpq: ntpq-subs.c

Log Message:
constify


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpq/ntpq-subs.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpq/ntpq-subs.c
diff -u src/external/bsd/ntp/dist/ntpq/ntpq-subs.c:1.1.1.1 src/external/bsd/ntp/dist/ntpq/ntpq-subs.c:1.2
--- src/external/bsd/ntp/dist/ntpq/ntpq-subs.c:1.1.1.1	Sun Dec 13 11:56:29 2009
+++ src/external/bsd/ntp/dist/ntpq/ntpq-subs.c	Sun Dec 13 19:49:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntpq-subs.c,v 1.1.1.1 2009/12/13 16:56:29 kardel Exp $	*/
+/*	$NetBSD: ntpq-subs.c,v 1.2 2009/12/14 00:49:45 christos Exp $	*/
 
 /*
  * ntpq_ops.c - subroutines which are called to perform operations by ntpq
@@ -13,7 +13,7 @@
 #include ntpq.h
 #include ntpq-opts.h
 
-extern char *	chosts[];
+extern const char *	chosts[];
 extern char currenthost[];
 extern int	numhosts;
 int 	maxhostlen;



CVS commit: src/sys/dev/mii

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:51:06 UTC 2009

Modified Files:
src/sys/dev/mii: makphy.c

Log Message:
Add E1149 Phy.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/mii/makphy.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/mii/makphy.c
diff -u src/sys/dev/mii/makphy.c:1.32 src/sys/dev/mii/makphy.c:1.33
--- src/sys/dev/mii/makphy.c:1.32	Mon Oct 19 18:41:14 2009
+++ src/sys/dev/mii/makphy.c	Mon Dec 14 00:51:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: makphy.c,v 1.32 2009/10/19 18:41:14 bouyer Exp $	*/
+/*	$NetBSD: makphy.c,v 1.33 2009/12/14 00:51:06 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: makphy.c,v 1.32 2009/10/19 18:41:14 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: makphy.c,v 1.33 2009/12/14 00:51:06 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -101,6 +101,9 @@
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1011,
 	  MII_STR_xxMARVELL_E1011 },
 
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1149,
+	  MII_STR_xxMARVELL_E1149 },
+
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E,
 	  MII_STR_xxMARVELL_E },
 



CVS commit: src/sys/dev/pci

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:52:10 UTC 2009

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

Log Message:
Only tick mii if the phy had a status change.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/if_msk.c

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

Modified files:

Index: src/sys/dev/pci/if_msk.c
diff -u src/sys/dev/pci/if_msk.c:1.28 src/sys/dev/pci/if_msk.c:1.29
--- src/sys/dev/pci/if_msk.c:1.28	Sat Sep  5 14:09:55 2009
+++ src/sys/dev/pci/if_msk.c	Mon Dec 14 00:52:04 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.28 2009/09/05 14:09:55 tsutsui Exp $ */
+/* $NetBSD: if_msk.c,v 1.29 2009/12/14 00:52:04 matt Exp $ */
 /*	$OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $	*/
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_msk.c,v 1.28 2009/09/05 14:09:55 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_msk.c,v 1.29 2009/12/14 00:52:04 matt Exp $);
 
 #include bpfilter.h
 #include rnd.h
@@ -1219,8 +1219,9 @@
 	case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT:
 		if (pci_mapreg_map(pa, SK_PCI_LOMEM,
    memtype, 0, sc-sk_btag, sc-sk_bhandle,
-   NULL, size) == 0)
+   NULL, size) == 0) {
 			break;
+		}
 	default:
 		aprint_error(: can't map mem space\n);
 		return;
@@ -1821,10 +1822,15 @@
 {
 	struct sk_if_softc *sc_if = xsc_if;  
 	struct mii_data *mii = sc_if-sk_mii;
+	uint16_t gpsr;
 	int s;
 
 	s = splnet();
-	mii_tick(mii);
+	gpsr = SK_YU_READ_2(sc_if, YUKON_GPSR);
+	if ((gpsr  YU_GPSR_MII_PHY_STC) != 0) {
+		SK_YU_WRITE_2(sc_if, YUKON_GPSR, YU_GPSR_MII_PHY_STC);
+		mii_tick(mii);
+	}
 	splx(s);
 
 	callout_schedule(sc_if-sk_tick_ch, hz);



CVS commit: src/sys/dev

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:52:38 UTC 2009

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

Log Message:
Use PRIxVADDR


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/kloader.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/kloader.c
diff -u src/sys/dev/kloader.c:1.19 src/sys/dev/kloader.c:1.20
--- src/sys/dev/kloader.c:1.19	Wed Mar 18 10:22:39 2009
+++ src/sys/dev/kloader.c	Mon Dec 14 00:52:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kloader.c,v 1.19 2009/03/18 10:22:39 cegger Exp $	*/
+/*	$NetBSD: kloader.c,v 1.20 2009/12/14 00:52:38 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kloader.c,v 1.19 2009/03/18 10:22:39 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: kloader.c,v 1.20 2009/12/14 00:52:38 matt Exp $);
 
 #include debug_kloader.h
 
@@ -510,7 +510,7 @@
 		if (freesz  sz)
 			freesz = sz;
 
-		DPRINTFN(1, 0x%08lx + 0x%zx - 0x%lx\n, dst, freesz,
+		DPRINTFN(1, 0x%08PRIxVADDR + 0x%zx - 0x%lx\n, dst, freesz,
 		(unsigned long)ofs);
 		kloader_read(ofs, freesz, (void *)(tag-src + tag-sz));
 
@@ -535,7 +535,7 @@
 		if (freesz  sz)
 			freesz = sz;
 
-		DPRINTFN(1, 0x%08lx + 0x%zx - %p\n, dst, freesz, src);
+		DPRINTFN(1, 0x%08PRIxVADDR + 0x%zx - %p\n, dst, freesz, src);
 		memcpy((void *)(tag-src + tag-sz), src, freesz);
 
 		tag-sz += freesz;
@@ -559,7 +559,7 @@
 		if (freesz  sz)
 			freesz = sz;
 
-		DPRINTFN(1, 0x%08lx + 0x%zx\n, dst, freesz);
+		DPRINTFN(1, 0x%08PRIxVADDR + 0x%zx\n, dst, freesz);
 		memset((void *)(tag-src + tag-sz), 0, freesz);
 
 		tag-sz += freesz;



CVS commit: src/sys

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 00:53:33 UTC 2009

Modified Files:
src/sys/kern: init_sysent.c syscalls.c
src/sys/sys: syscall.h syscallargs.h

Log Message:
Regen (new makesyscalls.sh)


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.233 -r1.234 src/sys/kern/syscalls.c
cvs rdiff -u -r1.229 -r1.230 src/sys/sys/syscall.h
cvs rdiff -u -r1.211 -r1.212 src/sys/sys/syscallargs.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_sysent.c
diff -u src/sys/kern/init_sysent.c:1.242 src/sys/kern/init_sysent.c:1.243
--- src/sys/kern/init_sysent.c:1.242	Mon Dec 14 00:48:35 2009
+++ src/sys/kern/init_sysent.c	Mon Dec 14 00:53:32 2009
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.242 2009/12/14 00:48:35 matt Exp $ */
+/* $NetBSD: init_sysent.c,v 1.243 2009/12/14 00:53:32 matt Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD
+ * created from	NetBSD: syscalls.master,v 1.231 2009/11/26 17:20:20 pooka Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.242 2009/12/14 00:48:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.243 2009/12/14 00:53:32 matt Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.233 src/sys/kern/syscalls.c:1.234
--- src/sys/kern/syscalls.c:1.233	Mon Dec 14 00:48:35 2009
+++ src/sys/kern/syscalls.c	Mon Dec 14 00:53:32 2009
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.233 2009/12/14 00:48:35 matt Exp $ */
+/* $NetBSD: syscalls.c,v 1.234 2009/12/14 00:53:32 matt Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD
+ * created from	NetBSD: syscalls.master,v 1.231 2009/11/26 17:20:20 pooka Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.233 2009/12/14 00:48:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.234 2009/12/14 00:53:32 matt Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_modular.h

Index: src/sys/sys/syscall.h
diff -u src/sys/sys/syscall.h:1.229 src/sys/sys/syscall.h:1.230
--- src/sys/sys/syscall.h:1.229	Tue Oct 13 21:57:53 2009
+++ src/sys/sys/syscall.h	Mon Dec 14 00:53:32 2009
@@ -1,10 +1,10 @@
-/* $NetBSD: syscall.h,v 1.229 2009/10/13 21:57:53 pooka Exp $ */
+/* $NetBSD: syscall.h,v 1.230 2009/12/14 00:53:32 matt Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.229 2009/07/21 23:59:00 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.231 2009/11/26 17:20:20 pooka Exp
  */
 
 #ifndef _SYS_SYSCALL_H_

Index: src/sys/sys/syscallargs.h
diff -u src/sys/sys/syscallargs.h:1.211 src/sys/sys/syscallargs.h:1.212
--- src/sys/sys/syscallargs.h:1.211	Tue Oct 13 21:57:53 2009
+++ src/sys/sys/syscallargs.h	Mon Dec 14 00:53:32 2009
@@ -1,10 +1,10 @@
-/* $NetBSD: syscallargs.h,v 1.211 2009/10/13 21:57:53 pooka Exp $ */
+/* $NetBSD: syscallargs.h,v 1.212 2009/12/14 00:53:32 matt Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.229 2009/07/21 23:59:00 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.231 2009/11/26 17:20:20 pooka Exp
  */
 
 #ifndef _SYS_SYSCALLARGS_H_



CVS commit: src/share/mk

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 01:00:46 UTC 2009

Modified Files:
src/share/mk: bsd.kmodule.mk bsd.own.mk bsd.prog.mk bsd.sys.mk

Log Message:
Merge from matt-nb5-mips64


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/share/mk/bsd.kmodule.mk
cvs rdiff -u -r1.612 -r1.613 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.244 -r1.245 src/share/mk/bsd.prog.mk
cvs rdiff -u -r1.187 -r1.188 src/share/mk/bsd.sys.mk

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

Modified files:

Index: src/share/mk/bsd.kmodule.mk
diff -u src/share/mk/bsd.kmodule.mk:1.21 src/share/mk/bsd.kmodule.mk:1.22
--- src/share/mk/bsd.kmodule.mk:1.21	Tue Nov 10 14:47:52 2009
+++ src/share/mk/bsd.kmodule.mk	Mon Dec 14 01:00:46 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.kmodule.mk,v 1.21 2009/11/10 14:47:52 skrll Exp $
+#	$NetBSD: bsd.kmodule.mk,v 1.22 2009/12/14 01:00:46 matt Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -43,7 +43,8 @@
 
 ${PROG}: ${OBJS} ${DPADD}
 	${_MKTARGET_LINK}
-	${LD} -T ${KMODSCRIPT} -r -d -o ${.TARGET} ${OBJS}
+	${CC} ${LDFLAGS} -nostdlib -Wl,-T,${KMODSCRIPT},-r,-d \
+		-o ${.TARGET} ${OBJS}
 
 # Install rules
 .if !target(kmodinstall)

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.612 src/share/mk/bsd.own.mk:1.613
--- src/share/mk/bsd.own.mk:1.612	Sun Dec 13 09:10:16 2009
+++ src/share/mk/bsd.own.mk	Mon Dec 14 01:00:46 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.612 2009/12/13 09:10:16 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.613 2009/12/14 01:00:46 matt Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -532,8 +532,7 @@
 
 #
 # On VAX using ELF, all objects are PIC, not just shared libraries,
-# so don't build the _pic version.  Unless we are using GCC3 which
-# doesn't support PIC yet.
+# so don't build the _pic version.
 #
 .if ${MACHINE_ARCH} == vax
 MKPICLIB=	no
@@ -653,7 +652,8 @@
 #
 # MK* options which have variable defaults.
 #
-.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == sparc64
+.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == sparc64 || \
+${MACHINE_ARCH} == mips64eb || ${MACHINE_ARCH} == mips64el
 MKCOMPAT?=	yes
 .else
 # Don't let this build where it really isn't supported.
@@ -680,9 +680,9 @@
 _MKVARS.yes= \
 	MKATF \
 	MKBINUTILS \
-	MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \
+	MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS MKCXX \
 	MKDOC \
-	MKGCC MKGCCCMDS MKGDB \
+	MKGCC MKGCCCMDS MKGDB MKGROFF \
 	MKHESIOD MKHTML \
 	MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
 	MKKERBEROS \
@@ -741,6 +741,11 @@
 # Force some options off if their dependencies are off.
 #
 
+.if ${MKCXX} == no
+MKATF:=		no
+MKGROFF:=	no
+.endif
+
 .if ${MKCRYPTO} == no
 MKKERBEROS:=	no
 .endif

Index: src/share/mk/bsd.prog.mk
diff -u src/share/mk/bsd.prog.mk:1.244 src/share/mk/bsd.prog.mk:1.245
--- src/share/mk/bsd.prog.mk:1.244	Tue Dec  8 15:18:42 2009
+++ src/share/mk/bsd.prog.mk	Mon Dec 14 01:00:46 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.prog.mk,v 1.244 2009/12/08 15:18:42 uebayasi Exp $
+#	$NetBSD: bsd.prog.mk,v 1.245 2009/12/14 01:00:46 matt Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -309,7 +309,7 @@
 
 ${_P}.ro: ${OBJS.${_P}} ${DPADD}
 	${_MKTARGET_LINK}
-	${LD} -r -dc -o ${.TARGET} ${OBJS.${_P}}
+	${CC} ${LDFLAGS} -nostdlib -Wl,-r,-dc -o ${.TARGET} ${OBJS.${_P}}
 
 .if defined(_PROGDEBUG.${_P})
 ${_PROGDEBUG.${_P}}: ${_P}

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.187 src/share/mk/bsd.sys.mk:1.188
--- src/share/mk/bsd.sys.mk:1.187	Sun Dec 13 18:40:50 2009
+++ src/share/mk/bsd.sys.mk	Mon Dec 14 01:00:46 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.187 2009/12/13 18:40:50 christos Exp $
+#	$NetBSD: bsd.sys.mk,v 1.188 2009/12/14 01:00:46 matt Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -89,6 +89,18 @@
 CFLAGS+=	-Wa,-Av8plus
 .endif
 
+.if (${MACHINE_ARCH} == mips64el) || (${MACHINE_ARCH} == mips64eb)
+CPUFLAGS+=	-Wa,--fatal-warnings
+.endif
+
+#.if ${MACHINE} == sbmips
+#CFLAGS+=	-mips64 -mtune=sb1
+#.endif
+
+#.if (${MACHINE_ARCH} == mips64el || ${MACHINE_ARCH} == mips64eb)  \
+#(defined(MKPIC)  ${MKPIC} == no)
+#CPUFLAGS+=	-mno-abicalls -fno-PIC
+#.endif
 CFLAGS+=	${CPUFLAGS}
 AFLAGS+=	${CPUFLAGS}
 



CVS commit: src/lib/csu

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 01:04:02 UTC 2009

Modified Files:
src/lib/csu/common_elf: common.h
src/lib/csu/mips: crt0.c dot_init.h

Log Message:
Merge from matt-nb5-mips64


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/csu/common_elf/common.h
cvs rdiff -u -r1.19 -r1.20 src/lib/csu/mips/crt0.c
cvs rdiff -u -r1.9 -r1.10 src/lib/csu/mips/dot_init.h

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

Modified files:

Index: src/lib/csu/common_elf/common.h
diff -u src/lib/csu/common_elf/common.h:1.12 src/lib/csu/common_elf/common.h:1.13
--- src/lib/csu/common_elf/common.h:1.12	Thu May 18 17:54:19 2006
+++ src/lib/csu/common_elf/common.h	Mon Dec 14 01:04:02 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.12 2006/05/18 17:54:19 christos Exp $ */
+/* $NetBSD: common.h,v 1.13 2009/12/14 01:04:02 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -53,7 +53,7 @@
 typedef void Obj_Entry;
 #endif
 
-extern int	__syscall(quad_t, ...);
+extern quad_t	__syscall(quad_t, ...);
 #define	_exit(v)	__syscall(SYS_exit, (v))
 #define	write(fd, s, n)	__syscall(SYS_write, (fd), (s), (n))
 

Index: src/lib/csu/mips/crt0.c
diff -u src/lib/csu/mips/crt0.c:1.19 src/lib/csu/mips/crt0.c:1.20
--- src/lib/csu/mips/crt0.c:1.19	Sat Dec 24 22:02:10 2005
+++ src/lib/csu/mips/crt0.c	Mon Dec 14 01:04:02 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.19 2005/12/24 22:02:10 perry Exp $ */
+/* $NetBSD: crt0.c,v 1.20 2009/12/14 01:04:02 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -86,10 +86,15 @@
 	 */
 
 #ifndef DYNAMIC
+#ifdef _LP64
+	__asm volatile(dla $28,_gp);
+#else
 	__asm volatile(la $28,_gp);
 #endif
+#endif
 
 	ksp = (char**)sp;
+#if defined(__mips_n32) || defined(__mips_n64)
 	if (ksp == 0) {
 		/*
 		 * Uh, oh. We're running on a old kernel that passed
@@ -110,6 +115,7 @@
 		__asm volatile(	addiu	%0,$29,64 : =r (ksp));
 #endif
 	}
+#endif
 
 
 	argc = *(int *)ksp;
@@ -157,7 +163,7 @@
  *  is the entrypoint. (Only needed for old toolchains).
  */
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: crt0.c,v 1.19 2005/12/24 22:02:10 perry Exp $);
+__RCSID($NetBSD: crt0.c,v 1.20 2009/12/14 01:04:02 matt Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include common.c

Index: src/lib/csu/mips/dot_init.h
diff -u src/lib/csu/mips/dot_init.h:1.9 src/lib/csu/mips/dot_init.h:1.10
--- src/lib/csu/mips/dot_init.h:1.9	Sat May 10 15:31:04 2008
+++ src/lib/csu/mips/dot_init.h	Mon Dec 14 01:04:02 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: dot_init.h,v 1.9 2008/05/10 15:31:04 martin Exp $ */
+/* $NetBSD: dot_init.h,v 1.10 2009/12/14 01:04:02 matt Exp $ */
 
 /*-
  * Copyright (c) 2001 Ross Harvey
@@ -36,48 +36,98 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-#define	ra	$31
+#define	t9	$25
 
 /*
- * Allocate 32 bytes for the stack frame.  Store GP at SP+16 (since
- * this is where code generated by the compiler for fallthru processing
- * expects it to be), and the RA at SP+28.
+ * For O32/O64, allocate 8 slots for the stack frame.  Store GP in the 4th
+ * (zero-based) slot (since this is where compiler generated code for fallthru
+ * processing expects it to be), and the RA in seventh (highest address).
  *
- * This will need adjustment for 64-bit ABIs.
+ * For N32/N64, allocate 4 8-byte slots for the stack frame.  Store GP in the
+ * 2nd (zero-based) slot (since ...) and the RA in third (highest address).
  */
+
+#ifdef __mips_o32
+#define	sPTR_ADDU		addu
+#define	sREG_L			lw
+#define	sREG_S			sw
+#define sRAOFF			28
+#define sFRAMESZ		32
+#define	MD_GPRESTORE		/* nothing */
+#else
+#define	sPTR_ADDU		daddu
+#define	sREG_L			ld
+#define	sREG_S			sd
+#if defined(__mips_n32) || defined(__mips_n64)
+#define	MD_GPRESTORE		ld	$gp,8($sp)		\n\t
+#define sRAOFF			24
+#define sFRAMESZ		32
+#elif defined(__mips_o64)
+#define sRAOFF			56
+#define sFRAMESZ		64
+#define	MD_GPRESTORE		/* nothing */
+#endif
+#endif
+
 #ifdef __ABICALLS__
-#define	MD_FUNCTION_PROLOGUE\
-		.set	noreorder			\n\
-		.cpload $25\n\
-		.set	reorder\n\
-			subu	$sp,$sp,32		\n\
-		.cprestore 16\n\
-			sw	ra,28($sp)		\n
+#if defined(__mips_o32) || defined(__mips_o64)
+#define	MD_FUNCTION_PROLOGUE(entry_pt)	\
+		.set	noreorder\n\t	\
+		.cpload t9	\n\t	\
+		.set	reorder\n\t	\
+		sPTR_ADDU	$sp,$sp,-sFRAMESZ		\n\t	\
+		.cprestore 16	\n\t	\
+		sREG_S	$ra,sRAOFF($sp)			\n\t
+
+#elif defined(__mips_n32) || defined(__mips_n64)
+#define	MD_FUNCTION_PROLOGUE(entry_pt)	\
+		.set	noreorder\n\t	\
+		daddu	$sp,$sp,-32\n\t	\
+		.cpsetup t9, 8, #entry_pt			\n\t	\
+		sd	$ra,24($sp)\n\t	\
+		.set	reorder\n\t
+#else
+#error ABI not supported (__ABICALLS)
+#endif
+#else
+#if defined(__mips_o32) || defined(__mips_o64)
+#define	MD_FUNCTION_PROLOGUE(entry_pt)	\
+		sPTR_ADDU	$sp,$sp,-sFRAMESZ		\n\t	\
+		sREG_S	$ra,sRAOFF($sp)			\n\t
+
+#elif 

CVS commit: src/lib/libc/gen

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 01:04:46 UTC 2009

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

Log Message:
Make sure the kernel doesn't pass back 0 for pagesize.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/gen/getpagesize.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/getpagesize.c
diff -u src/lib/libc/gen/getpagesize.c:1.9 src/lib/libc/gen/getpagesize.c:1.10
--- src/lib/libc/gen/getpagesize.c:1.9	Thu Aug  7 16:42:50 2003
+++ src/lib/libc/gen/getpagesize.c	Mon Dec 14 01:04:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: getpagesize.c,v 1.9 2003/08/07 16:42:50 agc Exp $	*/
+/*	$NetBSD: getpagesize.c,v 1.10 2009/12/14 01:04:46 matt Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -34,13 +34,14 @@
 #if 0
 static char sccsid[] = @(#)getpagesize.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: getpagesize.c,v 1.9 2003/08/07 16:42:50 agc Exp $);
+__RCSID($NetBSD: getpagesize.c,v 1.10 2009/12/14 01:04:46 matt Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
 #include sys/param.h
 #include sys/sysctl.h
+#include assert.h
 #include unistd.h
 
 #ifdef __weak_alias
@@ -61,6 +62,7 @@
 		size = sizeof pagsz;
 		if (sysctl(mib, 2, pagsz, size, NULL, 0) == -1)
 			return (-1);
+		_DIAGASSERT(pagsz);
 	}
 	return (pagsz);
 }



CVS commit: src

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 01:11:02 UTC 2009

Modified Files:
src: build.sh

Log Message:
Merge from matt-nb5-mips64


To generate a diff of this commit:
cvs rdiff -u -r1.223 -r1.224 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.223 src/build.sh:1.224
--- src/build.sh:1.223	Sat Dec  5 16:29:10 2009
+++ src/build.sh	Mon Dec 14 01:11:02 2009
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.223 2009/12/05 16:29:10 pooka Exp $
+#	$NetBSD: build.sh,v 1.224 2009/12/14 01:11:02 matt Exp $
 #
 # Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -341,10 +341,22 @@
 	evbmips|sbmips)		# no default MACHINE_ARCH
 		;;
 
+	sgimips64)
+		makewrappermachine=${MACHINE}
+		MACHINE=${MACHINE%64}
+		MACHINE_ARCH=mips64eb
+		;;
+
 	ews4800mips|mipsco|newsmips|sgimips)
 		MACHINE_ARCH=mipseb
 		;;
 
+	algor64|pmax64)
+		makewrappermachine=${MACHINE}
+		MACHINE=${MACHINE%64}
+		MACHINE_ARCH=mips64el
+		;;
+
 	algor|arc|cobalt|hpcmips|pmax)
 		MACHINE_ARCH=mipsel
 		;;
@@ -412,6 +424,10 @@
 		arches=arm armeb
 		;;
 
+	algor|pmax)
+		arches=mipsel mips64el
+		;;
+
 	evbmips|sbmips)
 		arches=mipseb mipsel mips64eb mips64el
 		;;
@@ -1336,7 +1352,7 @@
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.223 2009/12/05 16:29:10 pooka Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.224 2009/12/14 01:11:02 matt Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: src/sys/dev/mii

2009-12-13 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Mon Dec 14 01:48:34 UTC 2009

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
Regen so that makphy.c compiles.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.92 src/sys/dev/mii/miidevs.h:1.93
--- src/sys/dev/mii/miidevs.h:1.92	Wed Nov 18 23:01:47 2009
+++ src/sys/dev/mii/miidevs.h	Mon Dec 14 01:48:34 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.92 2009/11/18 23:01:47 bouyer Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.93 2009/12/14 01:48:34 enami Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.90 2009/11/18 23:00:46 bouyer Exp
+ *	NetBSD: miidevs,v 1.91 2009/12/13 19:20:17 matt Exp
  */
 
 /*-
@@ -311,6 +311,8 @@
 #define	MII_STR_xxMARVELL_E1000_5	Marvell 88E1000 Gigabit PHY
 #define	MII_MODEL_xxMARVELL_E6060	0x0008
 #define	MII_STR_xxMARVELL_E6060	Marvell 88E6060 10/100 5-port PHY switch
+#define	MII_MODEL_xxMARVELL_E1149	0x000b
+#define	MII_STR_xxMARVELL_E1149	Marvell 88E1149 Gigabit PHY
 #define	MII_MODEL_xxMARVELL_E	0x000c
 #define	MII_STR_xxMARVELL_E	Marvell 88E Gigabit PHY
 #define	MII_MODEL_xxMARVELL_E1116	0x0021

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.82 src/sys/dev/mii/miidevs_data.h:1.83
--- src/sys/dev/mii/miidevs_data.h:1.82	Wed Nov 18 23:01:47 2009
+++ src/sys/dev/mii/miidevs_data.h	Mon Dec 14 01:48:34 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.82 2009/11/18 23:01:47 bouyer Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.83 2009/12/14 01:48:34 enami Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.90 2009/11/18 23:00:46 bouyer Exp
+ *	NetBSD: miidevs,v 1.91 2009/12/13 19:20:17 matt Exp
  */
 
 /*-
@@ -118,6 +118,7 @@
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1000_3, MII_STR_xxMARVELL_E1000_3 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1000_5, MII_STR_xxMARVELL_E1000_5 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E6060, MII_STR_xxMARVELL_E6060 },
+ { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1149, MII_STR_xxMARVELL_E1149 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E, MII_STR_xxMARVELL_E },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116, MII_STR_xxMARVELL_E1116 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R, MII_STR_xxMARVELL_E1116R },



CVS commit: src/lib/libc/net

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 01:53:31 UTC 2009

Modified Files:
src/lib/libc/net: getaddrinfo.3

Log Message:
getaddrinfo is defined to use the AF_* constants, even though perhaps its
interface ought to have been defined in terms of PF_*. Add a note about
how the distinction has been lost anyway. Fixes PR lib/42384.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/lib/libc/net/getaddrinfo.3

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

Modified files:

Index: src/lib/libc/net/getaddrinfo.3
diff -u src/lib/libc/net/getaddrinfo.3:1.50 src/lib/libc/net/getaddrinfo.3:1.51
--- src/lib/libc/net/getaddrinfo.3:1.50	Fri Oct  2 07:41:08 2009
+++ src/lib/libc/net/getaddrinfo.3	Mon Dec 14 01:53:31 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: getaddrinfo.3,v 1.50 2009/10/02 07:41:08 wiz Exp $
+.\	$NetBSD: getaddrinfo.3,v 1.51 2009/12/14 01:53:31 dholland Exp $
 .\	$KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $
 .\	$OpenBSD: getaddrinfo.3,v 1.35 2004/12/21 03:40:31 jaredy Exp $
 .\
@@ -77,7 +77,7 @@
 .Bd -literal
 struct addrinfo {
 	int ai_flags;		/* input flags */
-	int ai_family;		/* protocol family for socket */
+	int ai_family;		/* address family for socket */
 	int ai_socktype;	/* socket type */
 	int ai_protocol;	/* protocol for socket */
 	socklen_t ai_addrlen;	/* length of socket-address */
@@ -93,13 +93,30 @@
 .Fa hints :
 .Bl -tag -width ai_socktypeXX
 .It Fa ai_family
-The protocol family that should be used.
+The address
+.Pq and protocol
+family that should be used.
 When
 .Fa ai_family
 is set to
-.Dv PF_UNSPEC ,
-it means the caller will accept any protocol family supported by the
+.Dv AF_UNSPEC ,
+it means the caller will accept any address family supported by the
 operating system.
+Note that while address families
+.Pq Dv AF_*
+and protocol families
+.Pq Dv PF_*
+are theoretically distinct, in practice the distinction has been lost.
+.\ (.Dv !? Consistent with usage below though...)
+.Dv RFC 3493
+defines
+.Fn getaddrinfo
+in terms of the address family constants
+.Dv AF_*
+even though
+.Fa ai_family
+is to be passed as a protocol family to
+.Xr socket 2 .
 .It Fa ai_socktype
 Denotes the type of socket that is wanted:
 .Dv SOCK_STREAM ,
@@ -200,7 +217,7 @@
 with
 .Fa ai_family
 set to
-.Dv PF_UNSPEC
+.Dv AF_UNSPEC
 and all other elements set to zero or
 .Dv NULL .
 .Pp
@@ -341,7 +358,7 @@
 const char *cause = NULL;
 
 memset(\*[Am]hints, 0, sizeof(hints));
-hints.ai_family = PF_UNSPEC;
+hints.ai_family = AF_UNSPEC;
 hints.ai_socktype = SOCK_STREAM;
 error = getaddrinfo(www.kame.net, http, \*[Am]hints, \*[Am]res0);
 if (error) {
@@ -384,7 +401,7 @@
 const char *cause = NULL;
 
 memset(\*[Am]hints, 0, sizeof(hints));
-hints.ai_family = PF_UNSPEC;
+hints.ai_family = AF_UNSPEC;
 hints.ai_socktype = SOCK_STREAM;
 hints.ai_flags = AI_PASSIVE;
 error = getaddrinfo(NULL, http, \*[Am]hints, \*[Am]res0);



CVS commit: src/external/bsd/ntp

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 02:09:39 UTC 2009

Modified Files:
src/external/bsd/ntp: Makefile.inc

Log Message:
put back -Werror


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ntp/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/bsd/ntp/Makefile.inc
diff -u src/external/bsd/ntp/Makefile.inc:1.1 src/external/bsd/ntp/Makefile.inc:1.2
--- src/external/bsd/ntp/Makefile.inc:1.1	Sun Dec 13 12:13:48 2009
+++ src/external/bsd/ntp/Makefile.inc	Sun Dec 13 21:09:39 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2009/12/13 17:13:48 kardel Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2009/12/14 02:09:39 christos Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=yes
@@ -6,6 +6,7 @@
 USE_FORT?= yes	# network client/server
 
 WARNS?=	0
+COPTS+=-Werror
 
 .include bsd.own.mk
 
@@ -54,4 +55,4 @@
 .include ${.CURDIR}/../../Makefile.inc
 .endif
 
-.endif
\ No newline at end of file
+.endif



CVS commit: src/bin/stty

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 02:34:52 UTC 2009

Modified Files:
src/bin/stty: stty.1

Log Message:
Document stty insane properly. Closes PR bin/25024.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/bin/stty/stty.1

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

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.36 src/bin/stty/stty.1:1.37
--- src/bin/stty/stty.1:1.36	Wed May 13 22:41:43 2009
+++ src/bin/stty/stty.1	Mon Dec 14 02:34:52 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: stty.1,v 1.36 2009/05/13 22:41:43 wiz Exp $
+.\	$NetBSD: stty.1,v 1.37 2009/12/14 02:34:52 dholland Exp $
 .\
 .\ Copyright (c) 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -436,7 +436,9 @@
 .It Cm sane
 Resets all modes to reasonable values for interactive terminal use.
 .It Cm insane
-Resets all modes to unreasonable values for interactive terminal use.
+Sets all modes to random values, which are very likely
+.Pq but not guaranteed
+to be unreasonable for interactive terminal use.
 .It Cm tty
 Set the line discipline to the standard terminal line discipline
 .Dv TTYDISC .



CVS commit: src/external/gpl3/binutils/dist/ld

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 02:52:08 UTC 2009

Modified Files:
src/external/gpl3/binutils/dist/ld: configure.tgt

Log Message:
default netbsd*mips64 to n32.  from matt-nb5-mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/binutils/dist/ld/configure.tgt

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

Modified files:

Index: src/external/gpl3/binutils/dist/ld/configure.tgt
diff -u src/external/gpl3/binutils/dist/ld/configure.tgt:1.4 src/external/gpl3/binutils/dist/ld/configure.tgt:1.5
--- src/external/gpl3/binutils/dist/ld/configure.tgt:1.4	Sun Nov 15 10:25:17 2009
+++ src/external/gpl3/binutils/dist/ld/configure.tgt	Mon Dec 14 02:52:08 2009
@@ -362,11 +362,11 @@
 mips*-sgi-irix*)	targ_emul=mipsbig ;;
 mips*el-*-ecoff*)	targ_emul=mipsidtl ;;
 mips*-*-ecoff*)		targ_emul=mipsidt ;;
-mips64*el-*-netbsd*)	targ_emul=elf64ltsmip
-			targ_extra_emuls=elf64btsmip elf32ltsmipn32 elf32ltsmip elf32btsmipn32 elf32btsmip
+mips64*el-*-netbsd*)	targ_emul=elf32ltsmipn32
+			targ_extra_emuls=elf64btsmip elf64ltsmip elf32ltsmip elf32btsmipn32 elf32btsmip
 			;;
-mips64*-*-netbsd*)	targ_emul=elf64btsmip
-			targ_extra_emuls=elf64ltsmip elf32btsmipn32 elf32btsmip elf32ltsmipn32 elf32ltsmip
+mips64*-*-netbsd*)	targ_emul=elf32btsmipn32
+			targ_extra_emuls=elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip
 			;;
 mips*el-*-netbsd*)	targ_emul=elf32ltsmip
 			targ_extra_emuls=elf32btsmip elf64ltsmip elf64btsmip



CVS commit: src/lib/libc/arch/mips/string

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 02:53:52 UTC 2009

Modified Files:
src/lib/libc/arch/mips/string: bzero.S

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/mips/string/bzero.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/libc/arch/mips/string/bzero.S
diff -u src/lib/libc/arch/mips/string/bzero.S:1.9 src/lib/libc/arch/mips/string/bzero.S:1.10
--- src/lib/libc/arch/mips/string/bzero.S:1.9	Mon Dec 14 01:07:42 2009
+++ src/lib/libc/arch/mips/string/bzero.S	Mon Dec 14 02:53:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bzero.S,v 1.9 2009/12/14 01:07:42 matt Exp $	*/
+/*	$NetBSD: bzero.S,v 1.10 2009/12/14 02:53:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
 #if 0
 	RCSID(from: @(#)bzero.s	8.1 (Berkeley) 6/4/93)
 #else
-	RCSID($NetBSD: bzero.S,v 1.9 2009/12/14 01:07:42 matt Exp $)
+	RCSID($NetBSD: bzero.S,v 1.10 2009/12/14 02:53:52 matt Exp $)
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -71,7 +71,7 @@
 	REG_SLLV	a2, a2, a3	# we want to keep the LSB bytes
 #endif
 	nor		a2, zero, a2	# complement the mask
-	REL_L		v0, -SZREG(a0)	# load the word to partially clear
+	REG_L		v0, -SZREG(a0)	# load the word to partially clear
 	and		v0, v0, a2	# clear the bytes
 	REG_S		v0, -SZREG(a0)	# store it back
 #endif



CVS commit: src/lib/libc/compat/arch/mips

2009-12-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 14 03:04:33 UTC 2009

Modified Files:
src/lib/libc/compat/arch/mips/gen: compat_setjmp.S compat_sigsetjmp.S
src/lib/libc/compat/arch/mips/sys: compat_Ovfork.S compat___semctl.S
compat___sigreturn14.S compat___sigtramp1.S compat_sigpending.S
compat_sigprocmask.S compat_sigreturn.S compat_sigsuspend.S

Log Message:
Merge from matt-nb5-mips64


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/arch/mips/gen/compat_setjmp.S \
src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/arch/mips/sys/compat_Ovfork.S \
src/lib/libc/compat/arch/mips/sys/compat___sigreturn14.S \
src/lib/libc/compat/arch/mips/sys/compat_sigpending.S \
src/lib/libc/compat/arch/mips/sys/compat_sigprocmask.S \
src/lib/libc/compat/arch/mips/sys/compat_sigreturn.S \
src/lib/libc/compat/arch/mips/sys/compat_sigsuspend.S
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/compat/arch/mips/sys/compat___semctl.S \
src/lib/libc/compat/arch/mips/sys/compat___sigtramp1.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/libc/compat/arch/mips/gen/compat_setjmp.S
diff -u src/lib/libc/compat/arch/mips/gen/compat_setjmp.S:1.1 src/lib/libc/compat/arch/mips/gen/compat_setjmp.S:1.2
--- src/lib/libc/compat/arch/mips/gen/compat_setjmp.S:1.1	Sat Sep 17 11:49:39 2005
+++ src/lib/libc/compat/arch/mips/gen/compat_setjmp.S	Mon Dec 14 03:04:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_setjmp.S,v 1.1 2005/09/17 11:49:39 tsutsui Exp $	*/
+/*	$NetBSD: compat_setjmp.S,v 1.2 2009/12/14 03:04:33 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -32,21 +32,18 @@
  * SUCH DAMAGE.
  */
 
-#include machine/cdefs.h
 #include sys/syscall.h
-#include mips/regnum.h
 #include mips/asm.h
-#include machine/signal.h
-#include machine/setjmp.h
 
-#if defined(LIBC_SCCS)  !defined(lint)
-	ASMSTR(from: @(#)setjmp.s	8.1 (Berkeley) 6/4/93)
-	ASMSTR($NetBSD: compat_setjmp.S,v 1.1 2005/09/17 11:49:39 tsutsui Exp $)
-#endif /* LIBC_SCCS and not lint */
+#include assym.h
 
-#ifdef __ABICALLS__
-	.abicalls
+#if defined(LIBC_SCCS)  !defined(lint)
+#if 0
+	RCSID(from: @(#)setjmp.s	8.1 (Berkeley) 6/4/93)
+#else
+	RCSID($NetBSD: compat_setjmp.S,v 1.2 2009/12/14 03:04:33 matt Exp $)
 #endif
+#endif /* LIBC_SCCS and not lint */
 
 /*
  * C library -- setjmp, longjmp
@@ -59,86 +56,107 @@
  * and a struct sigcontext, see signal.h
  */
 
-#define SETJMP_FRAME_SIZE	(CALLFRAME_SIZ + 12)
+#define SETJMP_FRAME_SIZE	(CALLFRAME_SIZ + STACK_T_SIZE)
 
 NON_LEAF(setjmp, SETJMP_FRAME_SIZE, ra)
-	.mask	0x8000, (CALLFRAME_RA - CALLFRAME_SIZ)
-#ifdef __ABICALLS__
-	.set	noreorder
-	.cpload	t9
-	.set	reorder
-#endif
-	subu	sp, sp, SETJMP_FRAME_SIZE	# allocate stack frame
-#ifdef __ABICALLS__
-	.cprestore 16
-#endif
-	sw	ra, CALLFRAME_RA(sp)		# save state
-	sw	a0, SETJMP_FRAME_SIZE(sp)
-	move	a0, zero			# get current signal mask
-	jal	_C_LABEL(sigblock)
-	lw	v1, SETJMP_FRAME_SIZE(sp)	# v1 = jmpbuf
-	sw	v0, (1 * 4)(v1)			# save sc_mask = sigblock(0)
-	move	a0, zero
-	addu	a1, sp, CALLFRAME_SIZ	# pointer to struct sigaltstack
-	jal	_C_LABEL(__sigaltstack14)
-	lw	a0, SETJMP_FRAME_SIZE(sp)	# restore jmpbuf
-	lw	v1, CALLFRAME_SIZ+8(sp)	# get old ss_onstack
-	and	v1, v1, 1			# extract onstack flag
-	sw	v1, 0(a0)			# save it in sc_onstack
-	lw	ra, CALLFRAME_RA(sp)
-	addu	sp, sp, SETJMP_FRAME_SIZE
-	blt	v0, zero, botch			# check for sigstack() error
+	.mask	0x8001, (CALLFRAME_RA - CALLFRAME_SIZ)
+	SETUP_GP
+	PTR_SUBU	sp, sp, SETJMP_FRAME_SIZE	# allocate stack frame
+	SAVE_GP(CALLFRAME_GP)
+	SETUP_GP64(CALLFRAME_GP, setjmp)
+
+	REG_S		ra, CALLFRAME_RA(sp)		# save RA
+	REG_S		s0, CALLFRAME_S0(sp)		# save S0
+	move		s0, a0# save sigcontext
+
+	/* Get the signal mask. */
+	move		a0, zero			# get current sigmask
+	jal		_C_LABEL(sigblock)
+	nop
+	INT_S		v0, _OFFSETOF_SC_MASK13(s0)	# save sc_mask13
+
+	/* Get the signal stack. */
+	move		a0, zero
+	PTR_ADDU	a1, sp, CALLFRAME_SIZ		# pointer to stack_t
+	jal		_C_LABEL(__sigaltstack14)
+
+	move		a0, s0# restore jmpbuf
+	INT_L		v1, CALLFRAME_SIZ+_OFFSETOF_STACK_T_FLAGS(sp)
+			# get old ss_onstack
+	and		v1, v1, SS_ONSTACK		# extract onstack flag
+	INT_S		v1, _OFFSETOF_SC_ONSTACK(a0)	# save it in sc_onstack
+
+	REG_L		s0, CALLFRAME_S0(sp)		# restore S0
+	REG_L		ra, CALLFRAME_RA(sp)		# restore RA
+	blt		v0, zero, botch		# check for sigaltstack() error
+	nop
+	/*
+	 * We know we won't need this routine's GP anymore.
+	 */
+	RESTORE_GP64
+	PTR_ADDU	sp, sp, SETJMP_FRAME_SIZE	# pop stack frame
+
 	REG_PROLOGUE
-	REG_S	ra, (2 * 4)(a0)			# sc_pc = return address
+	REG_S	ra, _OFFSETOF_SC_PC(a0)		# sc_pc = return address
 	REG_LI	v0, 0xACEDBADE			# sigcontext magic number
-	REG_S	v0, (_OFFSETOF_SC_REGS + SZREG * _R_ZERO)(a0) # saved in sc_regs[0]
-	REG_S	s0, (_OFFSETOF_SC_REGS + SZREG * 

CVS commit: src/sys/dev

2009-12-13 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Dec 14 03:11:22 UTC 2009

Modified Files:
src/sys/dev: md.h vndvar.h

Log Message:
Protect multiple inclusion.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/md.h
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/vndvar.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/md.h
diff -u src/sys/dev/md.h:1.10 src/sys/dev/md.h:1.11
--- src/sys/dev/md.h:1.10	Wed Oct 21 23:12:10 2009
+++ src/sys/dev/md.h	Mon Dec 14 03:11:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.10 2009/10/21 23:12:10 snj Exp $	*/
+/*	$NetBSD: md.h,v 1.11 2009/12/14 03:11:22 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -25,6 +25,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _SYS_DEV_MD_H_
+#define _SYS_DEV_MD_H_
+
 /*
  * Memory-disk ioctl functions:
  */
@@ -86,3 +89,5 @@
 
 extern int md_is_root;
 #endif /* _KERNEL */
+
+#endif /* _SYS_DEV_MD_H_ */

Index: src/sys/dev/vndvar.h
diff -u src/sys/dev/vndvar.h:1.25 src/sys/dev/vndvar.h:1.26
--- src/sys/dev/vndvar.h:1.25	Sun Dec  6 16:33:18 2009
+++ src/sys/dev/vndvar.h	Mon Dec 14 03:11:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vndvar.h,v 1.25 2009/12/06 16:33:18 dsl Exp $	*/
+/*	$NetBSD: vndvar.h,v 1.26 2009/12/14 03:11:22 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -106,6 +106,9 @@
  *	@(#)vnioctl.h	8.1 (Berkeley) 6/10/93
  */
 
+#ifndef _SYS_DEV_VNDVAR_H_
+#define _SYS_DEV_VNDVAR_H_
+
 #include sys/pool.h
 
 /*
@@ -220,3 +223,5 @@
 offsetof(struct vnd_ioctl, vnd_size))
 #define VNDIOOCCLR	_IOC(IOC_IN, 'F', 1, \
 offsetof(struct vnd_ioctl, vnd_size))
+
+#endif /* _SYS_DEV_VNDVAR_H_ */



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

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 03:20:27 UTC 2009

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

Log Message:
forward declare struct exec_package


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/include/elf_machdep.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/elf_machdep.h
diff -u src/sys/arch/mips/include/elf_machdep.h:1.12 src/sys/arch/mips/include/elf_machdep.h:1.13
--- src/sys/arch/mips/include/elf_machdep.h:1.12	Mon Dec 14 00:46:04 2009
+++ src/sys/arch/mips/include/elf_machdep.h	Mon Dec 14 03:20:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_machdep.h,v 1.12 2009/12/14 00:46:04 matt Exp $	*/
+/*	$NetBSD: elf_machdep.h,v 1.13 2009/12/14 03:20:27 mrg Exp $	*/
 
 #ifndef _MIPS_ELF_MACHDEP_H_
 #define  _MIPS_ELF_MACHDEP_H_
@@ -189,6 +189,8 @@
 #define	ELF_MD_COREDUMP_SETUP	ELFNAME2(coredump,setup)
 #endif
 
+struct exec_package;
+
 int mips_netbsd_elf32_probe(struct lwp *, struct exec_package *, void *, char *,
 	vaddr_t *);
 void coredump_elf32_setup(struct lwp *, void *);



CVS commit: src/gnu

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 03:44:27 UTC 2009

Modified Files:
src/gnu/lib/libgcc4/arch: mips64el.mk
src/gnu/lib/libstdc++-v3_4/arch/mips64el: c++config.h config.h
src/gnu/usr.bin/gcc4/arch/mips64el: auto-host.h configargs.h
src/gnu/usr.bin/gcc4/libiberty: defs.mk
src/gnu/usr.bin/gcc4/libiberty/arch/mips64el: config.h

Log Message:
regenerate these with -current mknative-gcc.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/lib/libgcc4/arch/mips64el.mk
cvs rdiff -u -r1.2 -r1.3 src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h \
src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h
cvs rdiff -u -r1.2 -r1.3 src/gnu/usr.bin/gcc4/arch/mips64el/auto-host.h \
src/gnu/usr.bin/gcc4/arch/mips64el/configargs.h
cvs rdiff -u -r1.9 -r1.10 src/gnu/usr.bin/gcc4/libiberty/defs.mk
cvs rdiff -u -r1.2 -r1.3 \
src/gnu/usr.bin/gcc4/libiberty/arch/mips64el/config.h

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

Modified files:

Index: src/gnu/lib/libgcc4/arch/mips64el.mk
diff -u src/gnu/lib/libgcc4/arch/mips64el.mk:1.2 src/gnu/lib/libgcc4/arch/mips64el.mk:1.3
--- src/gnu/lib/libgcc4/arch/mips64el.mk:1.2	Mon Dec 14 02:26:29 2009
+++ src/gnu/lib/libgcc4/arch/mips64el.mk	Mon Dec 14 03:44:27 2009
@@ -1,5 +1,5 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: 	NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp 
+# Generated from: 	NetBSD: mknative-gcc,v 1.43 2009/12/01 04:59:24 uebayasi 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 
@@ -9,6 +9,7 @@
 G_LIB1ASMSRC=
 G_LIB2_DIVMOD_FUNCS=_divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
 G_LIB2FUNCS_ST=_eprintf __gcc_bcmp
+G_LIB2FUNCS_EXTRA=
 G_LIBGCC2_CFLAGS=-O2   -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED 
 G_SHLIB_MKMAP=${GNUHOSTDIST}/gcc/mkmap-symver.awk
 G_SHLIB_MKMAP_OPTS=

Index: src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h
diff -u src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h:1.2 src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h:1.3
--- src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h:1.2	Mon Dec 14 02:26:29 2009
+++ src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h	Mon Dec 14 03:44:27 2009
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: 	NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp  */
+/* Generated from: 	NetBSD: mknative-gcc,v 1.43 2009/12/01 04:59:24 uebayasi Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
 
 // Predefined symbols and macros -*- C++ -*-
@@ -770,13 +770,13 @@
 #define _GLIBCXX_HOSTED 1
 
 /* Define if ptrdiff_t is int. */
-#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+/* #undef _GLIBCXX_PTRDIFF_T_IS_INT */
 
 /* Define if using setrlimit to set resource limits during make check */
 /* #undef _GLIBCXX_RES_LIMITS */
 
 /* Define if size_t is unsigned int. */
-#define _GLIBCXX_SIZE_T_IS_UINT 1
+/* #undef _GLIBCXX_SIZE_T_IS_UINT */
 
 /* Define if the compiler is configured for setjmp/longjmp exceptions. */
 /* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
Index: src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h
diff -u src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h:1.2 src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h:1.3
--- src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h:1.2	Mon Dec 14 02:26:29 2009
+++ src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h	Mon Dec 14 03:44:27 2009
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: 	NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp  */
+/* Generated from: 	NetBSD: mknative-gcc,v 1.43 2009/12/01 04:59:24 uebayasi Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
 
 /* config.h.  Generated by configure.  */
@@ -664,13 +664,13 @@
 #define _GLIBCXX_HOSTED 1
 
 /* Define if ptrdiff_t is int. */
-#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+/* #undef _GLIBCXX_PTRDIFF_T_IS_INT */
 
 /* Define if using setrlimit to set resource limits during make check */
 /* #undef _GLIBCXX_RES_LIMITS */
 
 /* Define if size_t is unsigned int. */
-#define _GLIBCXX_SIZE_T_IS_UINT 1
+/* #undef _GLIBCXX_SIZE_T_IS_UINT */
 
 /* Define if the compiler is configured for setjmp/longjmp exceptions. */
 /* #undef _GLIBCXX_SJLJ_EXCEPTIONS */

Index: src/gnu/usr.bin/gcc4/arch/mips64el/auto-host.h
diff -u src/gnu/usr.bin/gcc4/arch/mips64el/auto-host.h:1.2 src/gnu/usr.bin/gcc4/arch/mips64el/auto-host.h:1.3
--- src/gnu/usr.bin/gcc4/arch/mips64el/auto-host.h:1.2	Mon Dec 14 02:26:30 2009
+++ 

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2009-12-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Mon Dec 14 03:55:52 UTC 2009

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_pcie.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/arch/mips/rmi/rmixl_pcie.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/mips/rmi/rmixl_pcie.c
diff -u src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.4 src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.5
--- src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.4	Wed Nov 18 01:15:32 2009
+++ src/sys/arch/mips/rmi/rmixl_pcie.c	Mon Dec 14 03:55:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_pcie.c,v 1.1.2.4 2009/11/18 01:15:32 cliff Exp $	*/
+/*	$NetBSD: rmixl_pcie.c,v 1.1.2.5 2009/12/14 03:55:52 cliff Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_pcie.c,v 1.1.2.4 2009/11/18 01:15:32 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_pcie.c,v 1.1.2.5 2009/12/14 03:55:52 cliff Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -884,7 +884,7 @@
 bus_space_unmap(bst, ecfg_bsh, size);
 			err = bus_space_map(bst, ba, size, 0, ecfg_bsh);
 			if (err != 0) {
-#ifdef DEBUH
+#ifdef DEBUG
 panic(%s: bus_space_map err %d, ECFG space,
 	__func__, err);	/* XXX */
 #endif



CVS commit: src/usr.bin/less/less

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 03:58:27 UTC 2009

Modified Files:
src/usr.bin/less/less: cmdbuf.c

Log Message:
Don't attempt to read or write ~/.lesshst if it's not a regular file
or a symlink to a regular file. Previously, symlinking to /dev/null
would cause less to trash /dev/null if run with sufficient privileges,
as seen in PR misc/42237.

While the official way to disable .lesshst is to set an environment
variable, that is problematic in some cases, such as single-user mode.
A safer way to prevent even an unpatched less from writing anything
out is to mkdir ~/.lesshst.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/less/less/cmdbuf.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/less/less/cmdbuf.c
diff -u src/usr.bin/less/less/cmdbuf.c:1.7 src/usr.bin/less/less/cmdbuf.c:1.8
--- src/usr.bin/less/less/cmdbuf.c:1.7	Thu Oct 26 01:33:08 2006
+++ src/usr.bin/less/less/cmdbuf.c	Mon Dec 14 03:58:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmdbuf.c,v 1.7 2006/10/26 01:33:08 mrg Exp $	*/
+/*	$NetBSD: cmdbuf.c,v 1.8 2009/12/14 03:58:27 dholland Exp $	*/
 
 /*
  * Copyright (C) 1984-2005  Mark Nudelman
@@ -22,6 +22,9 @@
 #if HAVE_STAT
 #include sys/stat.h
 #endif
+#if HAVE_ERRNO_H
+#include errno.h
+#endif
 
 extern int sc_width;
 extern int utf_mode;
@@ -1362,10 +1365,20 @@
 	char *filename;
 	FILE *f;
 	char *p;
+#ifdef HAVE_STAT
+	struct stat st;
+#endif
 
 	filename = histfile_name();
 	if (filename == NULL)
 		return;
+#ifdef HAVE_STAT
+	/* ignore devices/fifos; allow symlinks */
+	if (stat(filename, st)  0)
+		return;
+	if (!S_ISREG(st.st_mode))
+		return;
+#endif
 	f = fopen(filename, r);
 	free(filename);
 	if (f == NULL)
@@ -1442,10 +1455,22 @@
 #if CMD_HISTORY
 	char *filename;
 	FILE *f;
+#ifdef HAVE_STAT
+	struct stat st;
+#endif
 
 	filename = histfile_name();
 	if (filename == NULL)
 		return;
+#ifdef HAVE_STAT
+	/* ignore devices/fifos; allow symlinks */
+	if (stat(filename, st)  0) {
+		if (errno != ENOENT)
+			return;
+	}
+	else if (!S_ISREG(st.st_mode))
+		return;
+#endif
 	f = fopen(filename, w);
 	free(filename);
 	if (f == NULL)



CVS commit: src/sys

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 04:09:38 UTC 2009

Modified Files:
src/sys/arch/mips/mips: cpu_exec.c
src/sys/compat/common: compat_util.c compat_util.h
src/sys/compat/netbsd32: netbsd32_exec_elf32.c

Log Message:
replace mips:elf_check_itp() and ELFNAME2(netbsd32,probe_noteless) that
it's based upon with a common compat_elf_check_interp().

tested on MALTA64 and sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/mips/mips/cpu_exec.c
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/common/compat_util.c
cvs rdiff -u -r1.21 -r1.22 src/sys/compat/common/compat_util.h
cvs rdiff -u -r1.31 -r1.32 src/sys/compat/netbsd32/netbsd32_exec_elf32.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/mips/mips/cpu_exec.c
diff -u src/sys/arch/mips/mips/cpu_exec.c:1.58 src/sys/arch/mips/mips/cpu_exec.c:1.59
--- src/sys/arch/mips/mips/cpu_exec.c:1.58	Mon Dec 14 00:46:05 2009
+++ src/sys/arch/mips/mips/cpu_exec.c	Mon Dec 14 04:09:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_exec.c,v 1.58 2009/12/14 00:46:05 matt Exp $	*/
+/*	$NetBSD: cpu_exec.c,v 1.59 2009/12/14 04:09:38 mrg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.58 2009/12/14 00:46:05 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.59 2009/12/14 04:09:38 mrg Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_compat_ultrix.h
@@ -52,6 +52,8 @@
 
 #include uvm/uvm_extern.h
 
+#include compat/common/compat_util.h
+
 #ifdef EXEC_ECOFF
 #include sys/exec_ecoff.h
 #endif
@@ -241,42 +243,6 @@
 	return 0;
 }
 
-static int
-elf_check_itp(struct exec_package *epp, const char *itp,
-	const char *itp_suffix)
-{
-	if (itp) {
-		/*
-		 * If the path is exactly /usr/libexec/ld.elf_so, first
-		 * try to see if /usr/libexec/ld.elf_so-abi exists
-		 * and if so, use that instead.
-		 * XXX maybe move this into compat/common
-		 */
-		if (strcmp(itp, /usr/libexec/ld.elf_so) == 0 ||
-		strcmp(itp, /libexec/ld.elf_so) == 0) {
-			struct nameidata nd;
-			char *path;
-			int error;
-
-			path = PNBUF_GET();
-			snprintf(path, MAXPATHLEN, %s-%s, itp, itp_suffix);
-			NDINIT(nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path);
-			error = namei(nd);
-			/*
-			 * If that worked, replace interpreter in case we
-			 * actually need to load it
-			 */
-			if (error == 0) {
-if (epp-ep_interp != NULL)
-	vrele(epp-ep_interp);
-epp-ep_interp = nd.ni_vp;
-			}
-			PNBUF_PUT(path);
-		}
-	}
-	return 0;
-}
-
 #if EXEC_ELF32
 int
 mips_netbsd_elf32_probe(struct lwp *l, struct exec_package *epp, void *eh0,
@@ -338,7 +304,8 @@
 		return ENOEXEC;
 	}
 
-	return elf_check_itp(epp, itp, itp_suffix);
+	(void)compat_elf_check_interp(epp, itp, itp_suffix);
+	return 0;
 }
 
 void
@@ -431,7 +398,8 @@
 		return ENOEXEC;
 	}
 
-	return elf_check_itp(epp, itp, itp_suffix);
+	(void)compat_elf_check_interp(epp, itp, itp_suffix);
+	return 0;
 }
 
 void

Index: src/sys/compat/common/compat_util.c
diff -u src/sys/compat/common/compat_util.c:1.42 src/sys/compat/common/compat_util.c:1.43
--- src/sys/compat/common/compat_util.c:1.42	Mon Jun 29 05:08:15 2009
+++ src/sys/compat/common/compat_util.c	Mon Dec 14 04:09:38 2009
@@ -1,4 +1,4 @@
-/* 	$NetBSD: compat_util.c,v 1.42 2009/06/29 05:08:15 dholland Exp $	*/
+/* 	$NetBSD: compat_util.c,v 1.43 2009/12/14 04:09:38 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -29,8 +29,36 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+/*
+ * Copyright (c) 2008, 2009 Matthew R. Green
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote products
+ *derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR 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 

CVS commit: src/lib/libc/stdio

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 04:39:29 UTC 2009

Modified Files:
src/lib/libc/stdio: scanf.3

Log Message:
Document %ll. Closes PR 42283.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/stdio/scanf.3

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

Modified files:

Index: src/lib/libc/stdio/scanf.3
diff -u src/lib/libc/stdio/scanf.3:1.20 src/lib/libc/stdio/scanf.3:1.21
--- src/lib/libc/stdio/scanf.3:1.20	Fri May 30 17:29:54 2008
+++ src/lib/libc/stdio/scanf.3	Mon Dec 14 04:39:29 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: scanf.3,v 1.20 2008/05/30 17:29:54 gdt Exp $
+.\	$NetBSD: scanf.3,v 1.21 2009/12/14 04:39:29 dholland Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -181,6 +181,15 @@
 .Em double
 (rather than
 .Em float ) .
+.It Cm ll
+Indicates that the conversion will be one of
+.Cm dioux
+or
+.Cm n
+and the next pointer is a pointer to a
+.Em long long  int
+(rather than
+.Em int ) .
 .It Cm q
 Indicates that the conversion will be one of
 .Cm dioux



CVS commit: src/lib/libc/stdio

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 04:40:29 UTC 2009

Modified Files:
src/lib/libc/stdio: scanf.3

Log Message:
whoops, bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/stdio/scanf.3

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

Modified files:

Index: src/lib/libc/stdio/scanf.3
diff -u src/lib/libc/stdio/scanf.3:1.21 src/lib/libc/stdio/scanf.3:1.22
--- src/lib/libc/stdio/scanf.3:1.21	Mon Dec 14 04:39:29 2009
+++ src/lib/libc/stdio/scanf.3	Mon Dec 14 04:40:29 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: scanf.3,v 1.21 2009/12/14 04:39:29 dholland Exp $
+.\	$NetBSD: scanf.3,v 1.22 2009/12/14 04:40:29 dholland Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .\
 .\ @(#)scanf.3	8.2 (Berkeley) 12/11/93
 .\
-.Dd May 30, 2008
+.Dd December 14, 2009
 .Dt SCANF 3
 .Os
 .Sh NAME



CVS commit: src/gnu

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 04:43:59 UTC 2009

Modified Files:
src/gnu/lib/libgcc4/arch: mips64eb.mk
src/gnu/usr.bin/gcc4/arch/mips64eb: auto-host.h configargs.h
src/gnu/usr.bin/gcc4/libiberty/arch/mips64eb: config.h

Log Message:
run mknative-gcc for these, in -current.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/lib/libgcc4/arch/mips64eb.mk
cvs rdiff -u -r1.2 -r1.3 src/gnu/usr.bin/gcc4/arch/mips64eb/auto-host.h \
src/gnu/usr.bin/gcc4/arch/mips64eb/configargs.h
cvs rdiff -u -r1.2 -r1.3 \
src/gnu/usr.bin/gcc4/libiberty/arch/mips64eb/config.h

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

Modified files:

Index: src/gnu/lib/libgcc4/arch/mips64eb.mk
diff -u src/gnu/lib/libgcc4/arch/mips64eb.mk:1.2 src/gnu/lib/libgcc4/arch/mips64eb.mk:1.3
--- src/gnu/lib/libgcc4/arch/mips64eb.mk:1.2	Mon Dec 14 02:26:29 2009
+++ src/gnu/lib/libgcc4/arch/mips64eb.mk	Mon Dec 14 04:43:59 2009
@@ -1,5 +1,5 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: 	NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp 
+# Generated from: 	NetBSD: mknative-gcc,v 1.43 2009/12/01 04:59:24 uebayasi 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 
@@ -9,6 +9,7 @@
 G_LIB1ASMSRC=
 G_LIB2_DIVMOD_FUNCS=_divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
 G_LIB2FUNCS_ST=_eprintf __gcc_bcmp
+G_LIB2FUNCS_EXTRA=
 G_LIBGCC2_CFLAGS=-O2   -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED 
 G_SHLIB_MKMAP=${GNUHOSTDIST}/gcc/mkmap-symver.awk
 G_SHLIB_MKMAP_OPTS=

Index: src/gnu/usr.bin/gcc4/arch/mips64eb/auto-host.h
diff -u src/gnu/usr.bin/gcc4/arch/mips64eb/auto-host.h:1.2 src/gnu/usr.bin/gcc4/arch/mips64eb/auto-host.h:1.3
--- src/gnu/usr.bin/gcc4/arch/mips64eb/auto-host.h:1.2	Mon Dec 14 02:26:29 2009
+++ src/gnu/usr.bin/gcc4/arch/mips64eb/auto-host.h	Mon Dec 14 04:43:59 2009
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: 	NetBSD: mknative-gcc,v 1.22 2006/06/25 03:06:15 mrg Exp  */
+/* Generated from: 	NetBSD: mknative-gcc,v 1.43 2009/12/01 04:59:24 uebayasi Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
 
 /* auto-host.h.  Generated from config.in by configure.  */
@@ -757,7 +757,7 @@
 
 /* Define if your assembler supports .weakref. */
 #ifndef USED_FOR_TARGET
-/* #undef HAVE_GAS_WEAKREF */
+#define HAVE_GAS_WEAKREF 1
 #endif
 
 
@@ -875,7 +875,7 @@
 /* Define if your linker links a mix of read-only and read-write sections into
a read-write section. */
 #ifndef USED_FOR_TARGET
-#define HAVE_LD_RO_RW_SECTION_MIXING 1
+/* #undef HAVE_LD_RO_RW_SECTION_MIXING */
 #endif
 
 
Index: src/gnu/usr.bin/gcc4/arch/mips64eb/configargs.h
diff -u src/gnu/usr.bin/gcc4/arch/mips64eb/configargs.h:1.2 src/gnu/usr.bin/gcc4/arch/mips64eb/configargs.h:1.3
--- src/gnu/usr.bin/gcc4/arch/mips64eb/configargs.h:1.2	Mon Dec 14 02:26:29 2009
+++ src/gnu/usr.bin/gcc4/arch/mips64eb/configargs.h	Mon Dec 14 04:43:59 2009
@@ -1,9 +1,9 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: 	NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp  */
+/* Generated from: 	NetBSD: mknative-gcc,v 1.43 2009/12/01 04:59:24 uebayasi Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
 
 /* Generated automatically. */
-static const char configuration_arguments[] = /usr/5/src-mips64/tools/gcc/../../gnu/dist/gcc4/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=x86_64-unknown-netbsd5.0. --host=mips64--netbsd --target=mips64--netbsd --enable-__cxa_atexit;
+static const char configuration_arguments[] = /usr/src2/tools/gcc/../../gnu/dist/gcc4/configure --target=mips64--netbsd --enable-long-long --enable-threads --enable-__cxa_atexit --disable-multilib --disable-symvers --build=x86_64-unknown-netbsd5.0. --host=mips64--netbsd;
 static const char thread_model[] = posix;
 
 static const struct {

Index: src/gnu/usr.bin/gcc4/libiberty/arch/mips64eb/config.h
diff -u src/gnu/usr.bin/gcc4/libiberty/arch/mips64eb/config.h:1.2 src/gnu/usr.bin/gcc4/libiberty/arch/mips64eb/config.h:1.3
--- src/gnu/usr.bin/gcc4/libiberty/arch/mips64eb/config.h:1.2	Mon Dec 14 02:26:30 2009
+++ src/gnu/usr.bin/gcc4/libiberty/arch/mips64eb/config.h	Mon Dec 14 04:43:59 2009
@@ -1,6 +1,6 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: 	NetBSD: mknative-gcc,v 1.22 2006/06/25 03:06:15 mrg Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp  */
+/* Generated from: 	NetBSD: 

CVS commit: src/bin/pax

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 05:04:48 UTC 2009

Modified Files:
src/bin/pax: options.c

Log Message:
Don't use NOGLOB_MTCH for pax, only for tar. Fixes fix for PR 41167 and
closes PR 42301. Since the 41167 fix was pulled up to -5, this needs to
be too.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/bin/pax/options.c

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

Modified files:

Index: src/bin/pax/options.c
diff -u src/bin/pax/options.c:1.105 src/bin/pax/options.c:1.106
--- src/bin/pax/options.c:1.105	Mon Jul 13 19:05:39 2009
+++ src/bin/pax/options.c	Mon Dec 14 05:04:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: options.c,v 1.105 2009/07/13 19:05:39 roy Exp $	*/
+/*	$NetBSD: options.c,v 1.106 2009/12/14 05:04:48 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)options.c	8.2 (Berkeley) 4/18/94;
 #else
-__RCSID($NetBSD: options.c,v 1.105 2009/07/13 19:05:39 roy Exp $);
+__RCSID($NetBSD: options.c,v 1.106 2009/12/14 05:04:48 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -692,7 +692,7 @@
 	case LIST:
 	case EXTRACT:
 		for (; optind  argc; optind++)
-			if (pat_add(argv[optind], NULL, NOGLOB_MTCH)  0)
+			if (pat_add(argv[optind], NULL, 0)  0)
 pax_usage();
 		break;
 	case COPY:



CVS commit: src/bin/sh

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 05:13:38 UTC 2009

Modified Files:
src/bin/sh: Makefile

Log Message:
use .ORDER for rules that create multiple files.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/bin/sh/Makefile

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

Modified files:

Index: src/bin/sh/Makefile
diff -u src/bin/sh/Makefile:1.88 src/bin/sh/Makefile:1.89
--- src/bin/sh/Makefile:1.88	Fri Dec 11 03:39:42 2009
+++ src/bin/sh/Makefile	Mon Dec 14 00:13:38 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.88 2009/12/11 08:39:42 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.89 2009/12/14 05:13:38 christos Exp $
 #	@(#)Makefile	8.4 (Berkeley) 5/5/95
 
 .include bsd.own.mk
@@ -19,7 +19,6 @@
 DPADD+=	${LIBL} ${LIBEDIT} ${LIBTERMCAP}
 
 LFLAGS=	-8	# 8-bit lex scanner for arithmetic
-YFLAGS=	-d
 
 # Environment for scripts executed during build.
 SCRIPT_ENV= \
@@ -55,28 +54,23 @@
 
 token.h: mktokens
 	${_MKTARGET_CREATE}
-	${GENCMD} ${.TARGET} \
 	${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}
 
-builtins.c builtins.h: mkbuiltins shell.h builtins.def
+.ORDER: builtins.h builtins.c
+builtins.h builtins.c: mkbuiltins shell.h builtins.def
 	${_MKTARGET_CREATE}
-	${GENCMD} ${.TARGET} \
-	${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} .
+	${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR}
+	[ -f builtins.h ]
 
 init.c: mkinit.sh ${SHSRCS}
 	${_MKTARGET_CREATE}
-	${GENCMD} ${.TARGET} \
 	${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}
 
+.ORDER: nodes.h nodes.c
 nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat
 	${_MKTARGET_CREATE}
-	${GENCMD} ${.TARGET} \
-	${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} .
-
-arith.c arith.h: arith.y
-	${_MKTARGET_CREATE}
-	${GENCMD} y.tab.${.TARGET:T:E} \
-	${YACC.y} ${.ALLSRC}
+	${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR}
+	[ -f nodes.h ]
 
 .if ${USETOOLS} == yes
 COMPATOBJDIR!=	cd ${NETBSDSRCDIR}/tools/compat  ${PRINTOBJDIR}
@@ -84,7 +78,3 @@
 .endif
 
 .include bsd.prog.mk
-
-# override
-.y.c:
-.y.h:



CVS commit: src/share/mk

2009-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 14 05:25:21 UTC 2009

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

Log Message:
don't need GENCMD anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.613 -r1.614 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.613 src/share/mk/bsd.own.mk:1.614
--- src/share/mk/bsd.own.mk:1.613	Sun Dec 13 20:00:46 2009
+++ src/share/mk/bsd.own.mk	Mon Dec 14 00:25:21 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.613 2009/12/14 01:00:46 matt Exp $
+#	$NetBSD: bsd.own.mk,v 1.614 2009/12/14 05:25:21 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -994,28 +994,6 @@
 	_makedirtarget
 
 #
-# ${GENCMD} generated name command and arguments
-#	Extract only one output from generation command so that make rule is
-#   written straight and avoid race (duplicate generation).  generated
-#   name is usually ${.TARGET}; if you want foo.c from foo.y, yacc
-#   generates y.tab.c, so generated name is y.tab.c.  See bin/sh/Makefile
-#	for examples.
-#
-GENCMD=\
-	@_gencmd() { \
-		local _dst=$$1; shift; local _src=$$1; shift; local _gen=$$1; shift; \
-		local _tmp=$$( ${TOOL_MKTEMP} -d /tmp/_gencmd.XX ); \
-		local _opwd=$$PWD; \
-		local _exit; \
-		cp $$_src $$_tmp; \
-		{ cd $$_tmp  eval $$@; _exit=$$?; cd $$_opwd; }; \
-		[ $$_exit = 0 ]  cp $${_tmp}/$${_gen} $$_dst; \
-		rm -fr $$_tmp; \
-		return $$_exit; \
-	}; \
-	_gencmd ${.TARGET} ${.ALLSRC}
-
-#
 # MAKEVERBOSE support.  Levels are:
 #	0	Minimal output (quiet)
 #	1	Describe what is occurring



CVS commit: src/common/lib/libprop

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 05:47:30 UTC 2009

Modified Files:
src/common/lib/libprop: prop_copyin_ioctl.9

Log Message:
Minor wording fix/clarification (sending - copying) from Silas Silva
in PR 42415.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libprop/prop_copyin_ioctl.9

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

Modified files:

Index: src/common/lib/libprop/prop_copyin_ioctl.9
diff -u src/common/lib/libprop/prop_copyin_ioctl.9:1.6 src/common/lib/libprop/prop_copyin_ioctl.9:1.7
--- src/common/lib/libprop/prop_copyin_ioctl.9:1.6	Sun Oct 11 01:55:28 2009
+++ src/common/lib/libprop/prop_copyin_ioctl.9	Mon Dec 14 05:47:30 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: prop_copyin_ioctl.9,v 1.6 2009/10/11 01:55:28 wiz Exp $
+.\	$NetBSD: prop_copyin_ioctl.9,v 1.7 2009/12/14 05:47:30 dholland Exp $
 .\
 .\ Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -65,14 +65,14 @@
 .Nm prop_dictionary_copyin_ioctl ,
 and
 .Nm prop_dictionary_copyout_ioctl
-functions implement the kernel side of a protocol for sending property lists
+functions implement the kernel side of a protocol for copying property lists
 to and from the kernel using
 .Xr ioctl 2 .
 The functions
 .Nm prop_array_copyin
 and
 .Nm prop_dictionary_copyin
-implement the kernel side of a protocol for sending property lists to the
+implement the kernel side of a protocol for copying property lists to the
 kernel as arguments of normal system calls.
 .Pp
 A kernel routine receiving or returning a property list will be passed a



CVS commit: src/common/lib/libprop

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 06:03:23 UTC 2009

Modified Files:
src/common/lib/libprop: prop_array.3 prop_data.3

Log Message:
Fix some ordering inconsistencies, noted by Silas Silva in PR 42415.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/common/lib/libprop/prop_array.3
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libprop/prop_data.3

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

Modified files:

Index: src/common/lib/libprop/prop_array.3
diff -u src/common/lib/libprop/prop_array.3:1.10 src/common/lib/libprop/prop_array.3:1.11
--- src/common/lib/libprop/prop_array.3:1.10	Sat Oct 10 18:06:54 2009
+++ src/common/lib/libprop/prop_array.3	Mon Dec 14 06:03:23 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: prop_array.3,v 1.10 2009/10/10 18:06:54 bad Exp $
+.\	$NetBSD: prop_array.3,v 1.11 2009/12/14 06:03:23 dholland Exp $
 .\
 .\ Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -225,14 +225,6 @@
 .Fa index .
 The object will be released and the array compacted following
 the removal.
-.It Fn prop_array_equals prop_array_t array1 prop_array_t array2
-Returns
-.Dv true
-if the two arrays are equivalent.
-If at least one of the supplied objects isn't an array,
-.Dv false
-is returned.
-Note: Objects contained in the array are compared by value, not by reference.
 .It Fn prop_array_externalize prop_array_t array
 Externalizes an array, returning a NUL-terminated buffer containing
 the XML representation of the array.
@@ -280,6 +272,14 @@
 Returns
 .Dv false
 if externalizing the array fails for any reason.
+.It Fn prop_array_equals prop_array_t array1 prop_array_t array2
+Returns
+.Dv true
+if the two arrays are equivalent.
+If at least one of the supplied objects isn't an array,
+.Dv false
+is returned.
+Note: Objects contained in the array are compared by value, not by reference.
 .El
 .Sh SEE ALSO
 .Xr prop_bool 3 ,

Index: src/common/lib/libprop/prop_data.3
diff -u src/common/lib/libprop/prop_data.3:1.6 src/common/lib/libprop/prop_data.3:1.7
--- src/common/lib/libprop/prop_data.3:1.6	Wed Apr 30 13:10:46 2008
+++ src/common/lib/libprop/prop_data.3	Mon Dec 14 06:03:23 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: prop_data.3,v 1.6 2008/04/30 13:10:46 martin Exp $
+.\	$NetBSD: prop_data.3,v 1.7 2009/12/14 06:03:23 dholland Exp $
 .\
 .\ Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -54,10 +54,10 @@
 .Ft prop_data_t
 .Fn prop_data_copy prop_data_t data
 .\
-.Ft void *
-.Fn prop_data_data prop_data_t data
 .Ft size_t
 .Fn prop_data_size prop_data_t data
+.Ft void *
+.Fn prop_data_data prop_data_t data
 .Ft const void *
 .Fn prop_data_data_nocopy prop_data_t data
 .\



CVS commit: src/common/lib/libprop

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 06:06:22 UTC 2009

Modified Files:
src/common/lib/libprop: prop_string.3

Log Message:
Add two missing functions to the SYNOPSIS. From Silas Silva in PR 42415.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libprop/prop_string.3

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

Modified files:

Index: src/common/lib/libprop/prop_string.3
diff -u src/common/lib/libprop/prop_string.3:1.6 src/common/lib/libprop/prop_string.3:1.7
--- src/common/lib/libprop/prop_string.3:1.6	Wed Apr 30 13:10:46 2008
+++ src/common/lib/libprop/prop_string.3	Mon Dec 14 06:06:22 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: prop_string.3,v 1.6 2008/04/30 13:10:46 martin Exp $
+.\	$NetBSD: prop_string.3,v 1.7 2009/12/14 06:06:22 dholland Exp $
 .\
 .\ Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -63,6 +63,11 @@
 .Ft prop_string_t
 .Fn prop_string_copy_mutable prop_string_t string
 .\
+.Ft size_t
+.Fn prop_string_size prop_string_t string
+.Ft bool
+.Fn prop_string_mutable prop_string_t string
+.\
 .Ft char *
 .Fn prop_string_cstring prop_string_t string
 .Ft const char *



CVS commit: [matt-nb5-mips64] src/compat

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 06:21:12 UTC 2009

Modified Files:
src/compat [matt-nb5-mips64]: Makefile Makefile.compat README
Added Files:
src/compat [matt-nb5-mips64]: Makefile.common Makefile.m32
Makefile.md_subdir
src/compat/amd64/i386 [matt-nb5-mips64]: Makefile bsd.i386.mk
src/compat/dirshack [matt-nb5-mips64]: Makefile
src/compat/mips64/64 [matt-nb5-mips64]: Makefile bsd.64.mk
src/compat/mips64/o32 [matt-nb5-mips64]: Makefile bsd.o32.mk
src/compat/sparc64/sparc [matt-nb5-mips64]: Makefile bsd.sparc.mk
Removed Files:
src/compat [matt-nb5-mips64]: build-makefiles
src/compat/external/bsd/openldap/lib [matt-nb5-mips64]: Makefile
src/compat/external/bsd/openldap/lib/liblber [matt-nb5-mips64]:
Makefile
src/compat/external/bsd/openldap/lib/libldap [matt-nb5-mips64]:
Makefile
src/compat/external/bsd/openldap/lib/libldap_r [matt-nb5-mips64]:
Makefile
src/compat/external/bsd/openldap/lib/liblutil [matt-nb5-mips64]:
Makefile
src/compat/gnu/lib [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/crtstuff4 [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libbfd [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libgcc4 [matt-nb5-mips64]: Makefile Makefile.inc
src/compat/gnu/lib/libgcc4/libgcc [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libgcc4/libgcc_eh [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libgcc4/libgcc_s [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libgcc4/libgcov [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libiberty [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libmalloc [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libobjc4 [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libopcodes [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libstdc++-v3_4 [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libstdc++-v3_4/include [matt-nb5-mips64]: Makefile
src/compat/gnu/lib/libsupc++4 [matt-nb5-mips64]: Makefile
src/compat/lib [matt-nb5-mips64]: Makefile Makefile.inc
src/compat/lib/csu [matt-nb5-mips64]: Makefile Makefile.real
src/compat/lib/csu/i386_elf [matt-nb5-mips64]: Makefile crt0.c
src/compat/lib/csu/mips [matt-nb5-mips64]: Makefile crt0.c
src/compat/lib/csu/sparc_elf [matt-nb5-mips64]: Makefile crt0.c
src/compat/lib/i18n_module [matt-nb5-mips64]: Makefile Makefile.inc
src/compat/lib/i18n_module/BIG5 [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/DECHanyu [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/EUC [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/EUCTW [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/GBK2K [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/HZ [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/ISO2022 [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/JOHAB [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/MSKanji [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/UES [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/UTF1632 [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/UTF7 [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/UTF8 [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/VIQR [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/ZW [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/iconv_none [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/iconv_std [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/mapper_646 [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/mapper_none [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/mapper_parallel [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/mapper_serial [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/mapper_std [matt-nb5-mips64]: Makefile
src/compat/lib/i18n_module/mapper_zone [matt-nb5-mips64]: Makefile
src/compat/lib/libarch [matt-nb5-mips64]: Makefile
src/compat/lib/libasn1 [matt-nb5-mips64]: Makefile
src/compat/lib/libatf-c [matt-nb5-mips64]: Makefile
src/compat/lib/libatf-c++ [matt-nb5-mips64]: Makefile
src/compat/lib/libbind9 [matt-nb5-mips64]: Makefile
src/compat/lib/libbluetooth [matt-nb5-mips64]: Makefile
src/compat/lib/libbsdmalloc [matt-nb5-mips64]: Makefile
src/compat/lib/libbz2 [matt-nb5-mips64]: Makefile
src/compat/lib/libc [matt-nb5-mips64]: Makefile Makefile.inc
src/compat/lib/libcom_err [matt-nb5-mips64]: Makefile
src/compat/lib/libcompat [matt-nb5-mips64]: Makefile
src/compat/lib/libcrypt [matt-nb5-mips64]: Makefile
src/compat/lib/libcrypto [matt-nb5-mips64]: 

CVS commit: [matt-nb5-mips64] src/gnu/usr.bin/binutils/ld

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 06:28:08 UTC 2009

Modified Files:
src/gnu/usr.bin/binutils/ld [matt-nb5-mips64]: Makefile

Log Message:
use the right paths for compat ldscript files.


To generate a diff of this commit:
cvs rdiff -u -r1.27.2.3 -r1.27.2.3.4.1 src/gnu/usr.bin/binutils/ld/Makefile

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

Modified files:

Index: src/gnu/usr.bin/binutils/ld/Makefile
diff -u src/gnu/usr.bin/binutils/ld/Makefile:1.27.2.3 src/gnu/usr.bin/binutils/ld/Makefile:1.27.2.3.4.1
--- src/gnu/usr.bin/binutils/ld/Makefile:1.27.2.3	Sun Jan 18 20:55:29 2009
+++ src/gnu/usr.bin/binutils/ld/Makefile	Mon Dec 14 06:28:08 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.27.2.3 2009/01/18 20:55:29 snj Exp $
+#	$NetBSD: Makefile,v 1.27.2.3.4.1 2009/12/14 06:28:08 mrg Exp $
 
 .include bsd.own.mk
 
@@ -84,6 +84,12 @@
 .  if ${f} == elf32_sparc || ${f} == sparcnbsd
 EMUL_LIB_PATH.${f}:=/usr/lib/sparc
 .  endif
+. elif ${MACHINE_ARCH} == mips64el
+.  if ${f} == elf32ltsmip || ${f} == elf32btsmip
+EMUL_LIB_PATH.${f}:=/usr/lib/o32
+.  elif ${f} == elf64btsmip || ${f} == elf64btsmip
+EMUL_LIB_PATH.${f}:=/usr/lib/64
+.  endif
 . endif
 
 e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed
@@ -94,13 +100,19 @@
 		${G_target_alias} ${G_target_alias} ${G_target_alias} \
 		${G_EMUL} ${LIBDIR} yes ${f} ${G_target_alias}
 
-.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == sparc64
+.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == sparc64 || \
+${MACHINE_ARCH} == mips64el || ${MACHINE_ARCH} == mips64eb
 FILES+=		${f}.x ${f}.xbn ${f}.xn ${f}.xr ${f}.xu
 
-# XXX hack to find out if .xs exists - slow!
+# XXX hack to find out if .xs/.xc exists - slow!
 HAS_XS!=	grep '^GENERATE_SHLIB_SCRIPT' ${DIST}/ld/emulparams/${f}.sh || echo
+# XXX
+#HAS_XC!=	grep '^GENERATE_COMBRELOC_SCRIPT' ${DIST}/ld/emulparams/${f}.sh || echo
 .if !empty(HAS_XS)
 FILES+= ${f}.xc ${f}.xd ${f}.xdc ${f}.xdw ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw
+# only do this if we don't have GENERATE_SHLIB_SCRIPT
+.elif ${MACHINE_ARCH} == mips64el || ${MACHINE_ARCH} == mips64eb
+FILES+= ${f}.xc ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw
 .endif
 .endif	# x64_64 || sparc64
 



CVS commit: [matt-nb5-mips64] src/lib

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 06:29:20 UTC 2009

Modified Files:
src/lib/csu [matt-nb5-mips64]: Makefile
src/lib/i18n_module [matt-nb5-mips64]: Makefile.inc
src/lib/libarch [matt-nb5-mips64]: Makefile
src/lib/libarch/i386 [matt-nb5-mips64]: Makefile.inc
src/lib/libarch/x86_64 [matt-nb5-mips64]: Makefile.inc
src/lib/libpam [matt-nb5-mips64]: Makefile.inc
src/lib/libpam/modules [matt-nb5-mips64]: mod.mk

Log Message:
s/LD32DIR/MLIBDIR/ in most places, also look for CSU_MACHINE_ARCH.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.46.1 src/lib/csu/Makefile
cvs rdiff -u -r1.10 -r1.10.8.1 src/lib/i18n_module/Makefile.inc
cvs rdiff -u -r1.21 -r1.21.8.1 src/lib/libarch/Makefile
cvs rdiff -u -r1.13 -r1.13.8.1 src/lib/libarch/i386/Makefile.inc
cvs rdiff -u -r1.3 -r1.3.8.1 src/lib/libarch/x86_64/Makefile.inc
cvs rdiff -u -r1.8 -r1.8.8.1 src/lib/libpam/Makefile.inc
cvs rdiff -u -r1.6 -r1.6.8.1 src/lib/libpam/modules/mod.mk

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

Modified files:

Index: src/lib/csu/Makefile
diff -u src/lib/csu/Makefile:1.24 src/lib/csu/Makefile:1.24.46.1
--- src/lib/csu/Makefile:1.24	Thu May  2 16:42:53 2002
+++ src/lib/csu/Makefile	Mon Dec 14 06:29:20 2009
@@ -1,8 +1,10 @@
-#	$NetBSD: Makefile,v 1.24 2002/05/02 16:42:53 wiz Exp $
+#	$NetBSD: Makefile,v 1.24.46.1 2009/12/14 06:29:20 mrg Exp $
 
 .include bsd.own.mk
 
-.if ${OBJECT_FMT} == ELF  exists(${MACHINE_ARCH}_elf)
+.if ${OBJECT_FMT} == ELF  exists(${CSU_MACHINE_ARCH}_elf)
+SUBDIR=	${CSU_MACHINE_ARCH}_elf
+.elif ${OBJECT_FMT} == ELF  exists(${MACHINE_ARCH}_elf)
 SUBDIR=	${MACHINE_ARCH}_elf
 .elif ${OBJECT_FMT} == ELF  exists(${MACHINE_CPU}_elf)
 SUBDIR=	${MACHINE_CPU}_elf

Index: src/lib/i18n_module/Makefile.inc
diff -u src/lib/i18n_module/Makefile.inc:1.10 src/lib/i18n_module/Makefile.inc:1.10.8.1
--- src/lib/i18n_module/Makefile.inc:1.10	Sun Oct 26 07:06:07 2008
+++ src/lib/i18n_module/Makefile.inc	Mon Dec 14 06:29:20 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2008/10/26 07:06:07 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.10.8.1 2009/12/14 06:29:20 mrg Exp $
 
 NOLINT=		# defined
 NOPICINSTALL=	# defined
@@ -7,10 +7,10 @@
 .include bsd.own.mk
 
 SHLIB_VERSION_FILE=	${NETBSDSRCDIR}/lib/i18n_module/shlib_version
-.if defined(LD32DIR)
-LIBDIR=		/usr/lib/${LD32DIR}/i18n
-SHLIBDIR=	/usr/lib/${LD32DIR}/i18n
-SHLIBINSTALLDIR=/usr/lib/${LD32DIR}/i18n
+.if defined(MLIBDIR)
+LIBDIR=		/usr/lib/${MLIBDIR}/i18n
+SHLIBDIR=	/usr/lib/${MLIBDIR}/i18n
+SHLIBINSTALLDIR=/usr/lib/${MLIBDIR}/i18n
 .else
 LIBDIR=		/usr/lib/i18n
 SHLIBDIR=	/usr/lib/i18n

Index: src/lib/libarch/Makefile
diff -u src/lib/libarch/Makefile:1.21 src/lib/libarch/Makefile:1.21.8.1
--- src/lib/libarch/Makefile:1.21	Sun Oct 26 07:05:33 2008
+++ src/lib/libarch/Makefile	Mon Dec 14 06:29:20 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2008/10/26 07:05:33 mrg Exp $
+#	$NetBSD: Makefile,v 1.21.8.1 2009/12/14 06:29:20 mrg Exp $
 
 # These should always be a MACHINE_CPU value
 ARCHDIRS= alpha arm i386 m68k sparc x86_64
@@ -14,8 +14,8 @@
 
 # Build the library if SRCS is now defined ...
 .if defined(SRCS)
-.if defined(LD32DIR)  ${LD32DIR} != none
-LIB=	${LD32DIR}
+.if defined(MLIBDIR)  ${MLIBDIR} != none
+LIB=	${MLIBDIR}
 .else
 LIB=	${MACHINE_CPU}
 .endif

Index: src/lib/libarch/i386/Makefile.inc
diff -u src/lib/libarch/i386/Makefile.inc:1.13 src/lib/libarch/i386/Makefile.inc:1.13.8.1
--- src/lib/libarch/i386/Makefile.inc:1.13	Sun Oct 26 07:05:33 2008
+++ src/lib/libarch/i386/Makefile.inc	Mon Dec 14 06:29:20 2009
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile.inc,v 1.13 2008/10/26 07:05:33 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.13.8.1 2009/12/14 06:29:20 mrg Exp $
 
-LD32DIR?=	none
+MLIBDIR?=	none
 
-.if (${MACHINE_ARCH} == i386 || ${LD32DIR} == i386)
+.if (${MACHINE_ARCH} == i386 || ${MLIBDIR} == i386)
 SRCS+=	i386_get_ldt.c i386_set_ldt.c \
 	i386_iopl.c i386_get_ioperm.c i386_set_ioperm.c \
 	i386_vm86.c i386_pmc.c i386_mtrr.c

Index: src/lib/libarch/x86_64/Makefile.inc
diff -u src/lib/libarch/x86_64/Makefile.inc:1.3 src/lib/libarch/x86_64/Makefile.inc:1.3.8.1
--- src/lib/libarch/x86_64/Makefile.inc:1.3	Sun Oct 26 07:05:33 2008
+++ src/lib/libarch/x86_64/Makefile.inc	Mon Dec 14 06:29:20 2009
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile.inc,v 1.3 2008/10/26 07:05:33 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.3.8.1 2009/12/14 06:29:20 mrg Exp $
 
-LD32DIR?=	none
+MLIBDIR?=	none
 
-.if (${MACHINE_ARCH} == x86_64  ${LD32DIR} != i386)
+.if (${MACHINE_ARCH} == x86_64  ${MLIBDIR} != i386)
 SRCS+=	x86_64_mtrr.c x86_64_iopl.c
 .endif
 

Index: src/lib/libpam/Makefile.inc
diff -u src/lib/libpam/Makefile.inc:1.8 src/lib/libpam/Makefile.inc:1.8.8.1
--- src/lib/libpam/Makefile.inc:1.8	Sun May 11 19:17:07 2008
+++ src/lib/libpam/Makefile.inc	Mon Dec 14 06:29:20 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.8 2008/05/11 19:17:07 he Exp $

CVS commit: [matt-nb5-mips64] src/share/mk

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 06:33:16 UTC 2009

Modified Files:
src/share/mk [matt-nb5-mips64]: bsd.lib.mk

Log Message:
from current:
replace /usr/lib with ${_GCC_CRTDIR} or ${SHLIBDIR} as appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.289.2.2.2.1 -r1.289.2.2.2.1.2.1 src/share/mk/bsd.lib.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.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.289.2.2.2.1 src/share/mk/bsd.lib.mk:1.289.2.2.2.1.2.1
--- src/share/mk/bsd.lib.mk:1.289.2.2.2.1	Sat Jun  6 22:10:49 2009
+++ src/share/mk/bsd.lib.mk	Mon Dec 14 06:33:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.289.2.2.2.1 2009/06/06 22:10:49 bouyer Exp $
+#	$NetBSD: bsd.lib.mk,v 1.289.2.2.2.1.2.1 2009/12/14 06:33:16 mrg Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -202,8 +202,8 @@
 SHLIB_SOVERSION=	${SHLIB_MAJOR}
 SHLIB_SHFLAGS=		-Wl,-soname,${_LIB_PREFIX}${LIB}.so.${SHLIB_SOVERSION}
 SHLIB_SHFLAGS+=		-Wl,--warn-shared-textrel
-SHLIB_LDSTARTFILE?=	${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGINS}
-SHLIB_LDENDFILE?=	${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o
+SHLIB_LDSTARTFILE?=	${_GCC_CRTDIR}/crti.o ${_GCC_CRTBEGINS}
+SHLIB_LDENDFILE?=	${_GCC_CRTENDS} ${_GCC_CRTDIR}/crtn.o
 .endif
 
 CFLAGS+=	${COPTS}
@@ -504,7 +504,7 @@
 	${_MKTARGET_BUILD}
 	rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
 .if defined(DESTDIR)
-	${LIBCC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
+	${LIBCC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}${SHLIBDIR}/ \
 	${_LIBLDOPTS} \
 	-Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
 	-Wl,--whole-archive ${SOLIB} \



CVS commit: [matt-nb5-mips64] src/share/mk

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 06:35:02 UTC 2009

Modified Files:
src/share/mk [matt-nb5-mips64]: bsd.own.mk

Log Message:
pullup from -current:
revision 1.612
date: 2009/12/13 09:10:16;  author: mrg;  state: Exp;  lines: +4 -3
enable MAKEDIRTARGET to be called with a separate environment,
called $MAKEDIRTARGETENV, defaulting to nothing.

revision 1.611
date: 2009/12/13 09:01:46;  author: mrg;  state: Exp;  lines: +6 -1
if BSD_MK_COMPAT_FILE is defined, .include it.


To generate a diff of this commit:
cvs rdiff -u -r1.542.2.9.4.3 -r1.542.2.9.4.4 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.542.2.9.4.3 src/share/mk/bsd.own.mk:1.542.2.9.4.4
--- src/share/mk/bsd.own.mk:1.542.2.9.4.3	Sun Sep 13 22:24:40 2009
+++ src/share/mk/bsd.own.mk	Mon Dec 14 06:35:01 2009
@@ -1,4 +1,9 @@
-#	$NetBSD: bsd.own.mk,v 1.542.2.9.4.3 2009/09/13 22:24:40 matt Exp $
+#	$NetBSD: bsd.own.mk,v 1.542.2.9.4.4 2009/12/14 06:35:01 mrg Exp $
+
+# This needs to be before bsd.init.mk
+.if defined(BSD_MK_COMPAT_FILE)
+.include ${BSD_MK_COMPAT_FILE}
+.endif
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -892,8 +897,9 @@
 
 #
 # MAKEDIRTARGET dir target [extra make(1) params]
-#	run cd $${dir}  ${MAKE} [params] $${target}, with a pretty message
+#	run cd $${dir}  ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}, with a pretty message
 #
+MAKEDIRTARGETENV?=
 MAKEDIRTARGET=\
 	@_makedirtarget() { \
 		dir=$$1; shift; \
@@ -909,7 +915,7 @@
 		show=$${this:-.}; \
 		echo $${target} === $${show%/}$${1:+	(with: $$@)}; \
 		cd $${real} \
-		 ${MAKE} _THISDIR_=$${this} $$@ $${target}; \
+		 ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_=$${this} $$@ $${target}; \
 	}; \
 	_makedirtarget
 



CVS commit: [matt-nb5-mips64] src/libexec/ld.elf_so

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 06:57:17 UTC 2009

Modified Files:
src/libexec/ld.elf_so [matt-nb5-mips64]: Makefile
src/libexec/ld.elf_so/arch/i386 [matt-nb5-mips64]: Makefile.inc
src/libexec/ld.elf_so/arch/mips [matt-nb5-mips64]: Makefile.inc
src/libexec/ld.elf_so/arch/sparc [matt-nb5-mips64]: Makefile.inc
Removed Files:
src/libexec/ld.elf_so/arch/i386 [matt-nb5-mips64]: Makefile.ld32
src/libexec/ld.elf_so/arch/sparc [matt-nb5-mips64]: Makefile.ld32

Log Message:
merge from -current:
rename LD32DIR to MLIBDIR.

- adjust the logic for compat ldd: add an elf32_compat module and arrange
  for mips64 to build this with MLIBDIR set to o32
- make mips64 ldd call elf32_compat_ldd as well
- make mips64 elf64 set MLIBDIR to 64
- don't need ld.elf_so's Makefile.ld32 files anymore (they are going away
  soon anyway)

tested on amd64 and sparc64, and an earlier version tested on mips64.

if BSD_MK_COMPAT_FILE is defined, .include it.

simplify the logic for compat ld.elf_so and move it here.  we now can
find the libc objdir for multiple compat ld.elf_so's, too.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.87.8.1 src/libexec/ld.elf_so/Makefile
cvs rdiff -u -r1.11.2.1 -r1.11.2.1.4.1 \
src/libexec/ld.elf_so/arch/i386/Makefile.inc
cvs rdiff -u -r1.1.2.2 -r0 src/libexec/ld.elf_so/arch/i386/Makefile.ld32
cvs rdiff -u -r1.15.32.4 -r1.15.32.5 \
src/libexec/ld.elf_so/arch/mips/Makefile.inc
cvs rdiff -u -r1.11.2.1 -r1.11.2.1.4.1 \
src/libexec/ld.elf_so/arch/sparc/Makefile.inc
cvs rdiff -u -r1.1.2.2 -r0 src/libexec/ld.elf_so/arch/sparc/Makefile.ld32

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

Modified files:

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.87 src/libexec/ld.elf_so/Makefile:1.87.8.1
--- src/libexec/ld.elf_so/Makefile:1.87	Sun Oct 26 07:11:54 2008
+++ src/libexec/ld.elf_so/Makefile	Mon Dec 14 06:57:16 2009
@@ -1,4 +1,9 @@
-#	$NetBSD: Makefile,v 1.87 2008/10/26 07:11:54 mrg Exp $
+#	$NetBSD: Makefile,v 1.87.8.1 2009/12/14 06:57:16 mrg Exp $
+
+# This needs to be before bsd.init.mk
+.if defined(BSD_MK_COMPAT_FILE)
+.include ${BSD_MK_COMPAT_FILE}
+.endif
 
 # We are not building this with PIE
 PIE_CFLAGS=
@@ -28,8 +33,6 @@
  (${MACHINE_ARCH} == vax)) 	\
 ${OBJECT_FMT} == ELF  ${MKPIC} != no
 
-PROG?=		ld.elf_so
-
 LDFLAGS+=	-shared -symbolic -nostartfiles
 LDFLAGS+=	-Wl,-static
 
@@ -39,13 +42,16 @@
 .include $M/Makefile.inc
 .endif
 
-# Support src/compat/libexec/ld.elf_so.
-.if defined(LD32DIR)
-CLIBOBJ!=	cd ${NETBSDSRCDIR}/compat/lib/libc  ${PRINTOBJDIR}
+# Support compat ld.elf_so.
+.if defined(MLIBDIR)
+PROG=		ld.elf_so-${MLIBDIR}
+CPPFLAGS+=	-DRTLD_ARCH_SUBDIR=\${MLIBDIR}\
 .else
-CLIBOBJ!=	cd ${NETBSDSRCDIR}/lib/libc  ${PRINTOBJDIR}
+PROG=		ld.elf_so
 .endif
 
+CLIBOBJ!=	cd ${NETBSDSRCDIR}/lib/libc  ${PRINTOBJDIR}
+
 SRCS+=		rtld.c reloc.c symbol.c xmalloc.c xprintf.c debug.c \
 		map_object.c load.c search.c headers.c paths.c expand.c
 

Index: src/libexec/ld.elf_so/arch/i386/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.11.2.1 src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.11.2.1.4.1
--- src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.11.2.1	Fri Jan 16 22:21:30 2009
+++ src/libexec/ld.elf_so/arch/i386/Makefile.inc	Mon Dec 14 06:57:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11.2.1 2009/01/16 22:21:30 bouyer Exp $
+#	$NetBSD: Makefile.inc,v 1.11.2.1.4.1 2009/12/14 06:57:16 mrg Exp $
 
 SRCS+=		rtld_start.S mdreloc.c
 
@@ -8,7 +8,3 @@
 CPPFLAGS+=	-DELFSIZE=32
 
 LDFLAGS+=	-Wl,-e,.rtld_start
-
-.if defined(LD32DIR)
-.include Makefile.ld32
-.endif

Index: src/libexec/ld.elf_so/arch/mips/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.4 src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.5
--- src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.4	Sun Sep 13 21:21:57 2009
+++ src/libexec/ld.elf_so/arch/mips/Makefile.inc	Mon Dec 14 06:57:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.15.32.4 2009/09/13 21:21:57 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.15.32.5 2009/12/14 06:57:16 mrg Exp $
 
 SRCS+=		rtld_start.S mips_reloc.c
 
@@ -6,7 +6,7 @@
 CPUFLAGS+=	-G0
 
 ABI64?= ${CPUFLAGS:M-mabi=64:M-mabi=o64}
-.if !empty(ABI64)
+.if !empty(ABI64) || (defined(MLIBDIR)  ${MLIBDIR} == 64)
 CPPFLAGS+=	-DELFSIZE=64
 .else
 CPPFLAGS+=	-DELFSIZE=32

Index: src/libexec/ld.elf_so/arch/sparc/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.11.2.1 src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.11.2.1.4.1
--- src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.11.2.1	Fri Jan 16 22:21:30 2009
+++ src/libexec/ld.elf_so/arch/sparc/Makefile.inc	Mon Dec 14 06:57:17 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11.2.1 2009/01/16 22:21:30 bouyer Exp $
+#	$NetBSD: Makefile.inc,v 1.11.2.1.4.1 2009/12/14 06:57:17 mrg Exp $
 
 SRCS+=		

CVS commit: [matt-nb5-mips64] src/sys

2009-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 14 07:13:31 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_exec.c
src/sys/compat/common [matt-nb5-mips64]: compat_util.c compat_util.h
src/sys/compat/netbsd32 [matt-nb5-mips64]: netbsd32_exec_elf32.c

Log Message:
pullup from -current:
replace mips:elf_check_itp() and ELFNAME2(netbsd32,probe_noteless) that
it's based upon with a common compat_elf_check_interp().

tested on MALTA64 and sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.50.54.1.4.10 -r1.50.54.1.4.11 \
src/sys/arch/mips/mips/cpu_exec.c
cvs rdiff -u -r1.41 -r1.41.18.1 src/sys/compat/common/compat_util.c
cvs rdiff -u -r1.20 -r1.20.14.1 src/sys/compat/common/compat_util.h
cvs rdiff -u -r1.29.14.1 -r1.29.14.2 \
src/sys/compat/netbsd32/netbsd32_exec_elf32.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/mips/mips/cpu_exec.c
diff -u src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.10 src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.11
--- src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.10	Tue Dec  8 02:21:16 2009
+++ src/sys/arch/mips/mips/cpu_exec.c	Mon Dec 14 07:13:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_exec.c,v 1.50.54.1.4.10 2009/12/08 02:21:16 mrg Exp $	*/
+/*	$NetBSD: cpu_exec.c,v 1.50.54.1.4.11 2009/12/14 07:13:31 mrg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.50.54.1.4.10 2009/12/08 02:21:16 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.50.54.1.4.11 2009/12/14 07:13:31 mrg Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_compat_ultrix.h
@@ -62,6 +62,8 @@
 #include machine/reg.h
 #include mips/regnum.h			/* symbolic register indices */
 
+#include compat/common/compat_util.h
+
 int	mips_elf_makecmds(struct lwp *, struct exec_package *);
 
 
@@ -310,42 +312,6 @@
 	return 0;
 }
 
-static int
-elf_check_itp(struct exec_package *epp, const char *itp,
-	const char *itp_suffix)
-{
-	if (itp) {
-		/*
-		 * If the path is exactly /usr/libexec/ld.elf_so, first
-		 * try to see if /usr/libexec/ld.elf_so-abi exists
-		 * and if so, use that instead.
-		 * XXX maybe move this into compat/common
-		 */
-		if (strcmp(itp, /usr/libexec/ld.elf_so) == 0 ||
-		strcmp(itp, /libexec/ld.elf_so) == 0) {
-			struct nameidata nd;
-			char *path;
-			int error;
-
-			path = PNBUF_GET();
-			snprintf(path, MAXPATHLEN, %s-%s, itp, itp_suffix);
-			NDINIT(nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path);
-			error = namei(nd);
-			/*
-			 * If that worked, replace interpreter in case we
-			 * actually need to load it
-			 */
-			if (error == 0) {
-if (epp-ep_interp != NULL)
-	vrele(epp-ep_interp);
-epp-ep_interp = nd.ni_vp;
-			}
-			PNBUF_PUT(path);
-		}
-	}
-	return 0;
-}
-
 #if EXEC_ELF32
 int
 mips_netbsd_elf32_probe(struct lwp *l, struct exec_package *epp, void *eh0,
@@ -407,7 +373,8 @@
 		return ENOEXEC;
 	}
 
-	return elf_check_itp(epp, itp, itp_suffix);
+	(void)compat_elf_check_interp(epp, itp, itp_suffix);
+	return 0;
 }
 
 void
@@ -500,7 +467,8 @@
 		return ENOEXEC;
 	}
 
-	return elf_check_itp(epp, itp, itp_suffix);
+	(void)compat_elf_check_interp(epp, itp, itp_suffix);
+	return 0;
 }
 
 void

Index: src/sys/compat/common/compat_util.c
diff -u src/sys/compat/common/compat_util.c:1.41 src/sys/compat/common/compat_util.c:1.41.18.1
--- src/sys/compat/common/compat_util.c:1.41	Mon Apr 28 20:23:41 2008
+++ src/sys/compat/common/compat_util.c	Mon Dec 14 07:13:31 2009
@@ -1,4 +1,4 @@
-/* 	$NetBSD: compat_util.c,v 1.41 2008/04/28 20:23:41 martin Exp $	*/
+/* 	$NetBSD: compat_util.c,v 1.41.18.1 2009/12/14 07:13:31 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -29,8 +29,36 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+/*
+ * Copyright (c) 2008, 2009 Matthew R. Green
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote products
+ *derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2009-12-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Mon Dec 14 07:18:26 UTC 2009

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_obio.c rmixl_obiovar.h
rmixlvar.h

Log Message:
- replace single bus space with two (big  little endian) bus spaces for obio


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/mips/rmi/rmixl_obio.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/rmi/rmixl_obiovar.h
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/rmi/rmixlvar.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/rmi/rmixl_obio.c
diff -u src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.7 src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.8
--- src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.7	Wed Nov 18 01:14:49 2009
+++ src/sys/arch/mips/rmi/rmixl_obio.c	Mon Dec 14 07:18:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_obio.c,v 1.1.2.7 2009/11/18 01:14:49 cliff Exp $	*/
+/*	$NetBSD: rmixl_obio.c,v 1.1.2.8 2009/12/14 07:18:26 cliff Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_obio.c,v 1.1.2.7 2009/11/18 01:14:49 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_obio.c,v 1.1.2.8 2009/12/14 07:18:26 cliff Exp $);
 
 #include locators.h
 #include obio.h
@@ -141,7 +141,8 @@
 	struct obio_softc *sc = device_private(parent);
 	struct obio_attach_args obio;
 
-	obio.obio_bst = sc-sc_bst;
+	obio.obio_eb_bst = sc-sc_eb_bst;
+	obio.obio_el_bst = sc-sc_el_bst;
 	obio.obio_addr = cf-cf_loc[OBIOCF_ADDR];
 	obio.obio_size = cf-cf_loc[OBIOCF_SIZE];
 	obio.obio_mult = cf-cf_loc[OBIOCF_MULT];
@@ -166,9 +167,13 @@
 		return;
 	done = 1;
 
-	/* obio (devio) space */
-	if (rcp-rc_obio_memt.bs_cookie == 0)
-		rmixl_obio_bus_mem_init(rcp-rc_obio_memt, rcp);
+	/* obio (devio) space, Big Endian */
+	if (rcp-rc_obio_eb_memt.bs_cookie == 0)
+		rmixl_obio_eb_bus_mem_init(rcp-rc_obio_eb_memt, rcp);
+
+	/* obio (devio) space, Little Endian */
+	if (rcp-rc_obio_el_memt.bs_cookie == 0)
+		rmixl_obio_el_bus_mem_init(rcp-rc_obio_el_memt, rcp);
 
 	/* dma space for addr  512MB */
 	if (rcp-rc_29bit_dmat._cookie == 0)
@@ -184,7 +189,8 @@
 
 	sc-sc_base = (bus_addr_t)rcp-rc_io_pbase;
 	sc-sc_size = (bus_size_t)RMIXL_IO_DEV_SIZE;
-	sc-sc_bst = (bus_space_tag_t)rcp-rc_obio_memt;
+	sc-sc_eb_bst = (bus_space_tag_t)rcp-rc_obio_eb_memt;
+	sc-sc_el_bst = (bus_space_tag_t)rcp-rc_obio_el_memt;
 	sc-sc_29bit_dmat = rcp-rc_29bit_dmat;
 #ifdef NOTYET
 	sc-sc_32bit_dmat = rcp-rc_32bit_dmat;

Index: src/sys/arch/mips/rmi/rmixl_obiovar.h
diff -u src/sys/arch/mips/rmi/rmixl_obiovar.h:1.1.2.6 src/sys/arch/mips/rmi/rmixl_obiovar.h:1.1.2.7
--- src/sys/arch/mips/rmi/rmixl_obiovar.h:1.1.2.6	Sun Nov 15 22:58:15 2009
+++ src/sys/arch/mips/rmi/rmixl_obiovar.h	Mon Dec 14 07:18:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_obiovar.h,v 1.1.2.6 2009/11/15 22:58:15 cliff Exp $	*/
+/*	$NetBSD: rmixl_obiovar.h,v 1.1.2.7 2009/12/14 07:18:26 cliff Exp $	*/
 
 #ifndef _MIPS_RMI_RMIXL_OBIOVAR_H_
 #define _MIPS_RMI_RMIXL_OBIOVAR_H_
@@ -8,7 +8,8 @@
 #include mips/pci_machdep.h
 
 struct obio_attach_args {
-	bus_space_tag_t	obio_bst;
+	bus_space_tag_t	obio_eb_bst;
+	bus_space_tag_t	obio_el_bst;
 	bus_addr_t	obio_addr;
 	bus_size_t	obio_size;
 	int		obio_intr;
@@ -20,7 +21,8 @@
 
 typedef struct obio_softc {
 	device_t		sc_dev;
-	bus_space_tag_t		sc_bst;
+	bus_space_tag_t		sc_eb_bst;
+	bus_space_tag_t		sc_el_bst;
 	bus_dma_tag_t		sc_29bit_dmat;
 	bus_dma_tag_t		sc_32bit_dmat;
 	bus_dma_tag_t		sc_64bit_dmat;

Index: src/sys/arch/mips/rmi/rmixlvar.h
diff -u src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.8 src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.9
--- src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.8	Wed Nov 18 01:16:07 2009
+++ src/sys/arch/mips/rmi/rmixlvar.h	Mon Dec 14 07:18:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixlvar.h,v 1.1.2.8 2009/11/18 01:16:07 cliff Exp $	*/
+/*	$NetBSD: rmixlvar.h,v 1.1.2.9 2009/12/14 07:18:26 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -100,7 +100,8 @@
 	bus_size_t		 rc_pci_mem_size;
 	bus_addr_t		 rc_pci_io_pbase;	
 	bus_size_t		 rc_pci_io_size;
-	struct mips_bus_space	 rc_obio_memt; 		/* DEVIO */
+	struct mips_bus_space	 rc_obio_eb_memt; 	/* DEVIO -eb */
+	struct mips_bus_space	 rc_obio_el_memt; 	/* DEVIO -el */
 	struct mips_bus_space	 rc_pcie_cfg_memt; 	/* PCI CFG  */
 	struct mips_bus_space	 rc_pcie_ecfg_memt; 	/* PCI ECFG */
 	struct mips_bus_space	 rc_pci_memt; 		/* PCI MEM */
@@ -109,7 +110,8 @@
 	struct mips_bus_dma_tag	 rc_32bit_dmat;
 	struct mips_bus_dma_tag	 rc_64bit_dmat;
 	struct extent		*rc_phys_ex;	/* Note: MB units */
-	struct extent		*rc_obio_ex;
+	struct extent		*rc_obio_eb_ex;
+	struct extent		*rc_obio_el_ex;
 	struct extent		*rc_pcie_cfg_ex;
 	struct extent		*rc_pcie_ecfg_ex;
 	struct extent		*rc_pcie_mem_ex;
@@ -119,7 +121,8 @@
 
 extern struct rmixl_config rmixl_configuration;
 
-extern 

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2009-12-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Mon Dec 14 07:18:55 UTC 2009

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_com.c

Log Message:
- replace single bus space with two (big  little endian) bus spaces for obio
- use comcnspeed instead of CONSPEED
- use comcnfreq instead of CONFREQ


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/rmi/rmixl_com.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/mips/rmi/rmixl_com.c
diff -u src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.8 src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.9
--- src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.8	Sat Dec 12 01:45:01 2009
+++ src/sys/arch/mips/rmi/rmixl_com.c	Mon Dec 14 07:18:55 2009
@@ -1,4 +1,4 @@
-/* $Id: rmixl_com.c,v 1.1.2.8 2009/12/12 01:45:01 cliff Exp $ */
+/* $Id: rmixl_com.c,v 1.1.2.9 2009/12/14 07:18:55 cliff Exp $ */
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
  * Copyright (c) 2006 Garrett D'Amore.
@@ -101,7 +101,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_com.c,v 1.1.2.8 2009/12/12 01:45:01 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_com.c,v 1.1.2.9 2009/12/14 07:18:55 cliff Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -143,6 +143,9 @@
 volatile uint32_t *com0addr = (uint32_t *)
 	MIPS_PHYS_TO_KSEG1(RMIXL_IO_DEV_PBASE + RMIXL_IO_DEV_UART_1);
 
+extern int comcnfreq;
+extern int comcnspeed;
+
 void
 rmixl_putchar_init(uint64_t io_pbase)
 {
@@ -152,8 +155,8 @@
 	com0addr = (uint32_t *)
 		MIPS_PHYS_TO_KSEG1(io_pbase + RMIXL_IO_DEV_UART_1);
 
-	if (CONSFREQ != -1) {
-		rate = comspeed(CONSPEED, CONSFREQ, COM_TYPE_NORMAL);
+	if (comcnfreq != -1) {
+		rate = comspeed(comcnspeed, comcnfreq, COM_TYPE_NORMAL);
 		if (rate  0)
 			return;	/* XXX */
 
@@ -227,7 +230,7 @@
 	struct com_regs	regs;
 	int rv;
 
-	bst = obio-obio_bst;
+	bst = obio-obio_eb_bst;
 	addr = obio-obio_addr;
 	size = obio-obio_size;
 
@@ -262,9 +265,9 @@
 	bus_size_t size;
 
 	sc-sc_dev = self;
-	sc-sc_frequency = CONSFREQ;
+	sc-sc_frequency = comcnfreq;
 
-	bst = obio-obio_bst;
+	bst = obio-obio_eb_bst;
 	addr = obio-obio_addr;
 	size = obio-obio_size;
 
@@ -308,7 +311,7 @@
 	bus_size_t sz;
 	struct com_regs	regs;
 
-	bst = (bus_space_tag_t)rmixl_configuration.rc_obio_memt;
+	bst = (bus_space_tag_t)rmixl_configuration.rc_obio_eb_memt;
 	sz = COM_NPORTS * sizeof(uint32_t);	/* span of UART regs in bytes */
 
 	memset(regs, 0, sizeof(regs));



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2009-12-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Mon Dec 14 07:19:17 UTC 2009

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixlreg.h

Log Message:
- add bit defines for GPIO_RESET register
- add register defines for USB


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/arch/mips/rmi/rmixlreg.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/rmi/rmixlreg.h
diff -u src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.4 src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.5
--- src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.4	Mon Nov  9 10:07:44 2009
+++ src/sys/arch/mips/rmi/rmixlreg.h	Mon Dec 14 07:19:16 2009
@@ -1,11 +1,11 @@
-/*	$NetBSD: rmixlreg.h,v 1.1.2.4 2009/11/09 10:07:44 cliff Exp $	*/
+/*	$NetBSD: rmixlreg.h,v 1.1.2.5 2009/12/14 07:19:16 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
- * by  NN
+ * by Cliff Neighbors
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -416,6 +416,49 @@
 #define RMIXL_GPIO_INT_TYP		_RMIXL_OFFSET(0x7)	/* Interrupt Type register */
 #define RMIXL_GPIO_RESET		_RMIXL_OFFSET(0x8)	/* XLS Soft Reset register */
 
+/*
+ * RMIXL_GPIO_RESET bits
+ */
+#define RMIXL_GPIO_RESET_RESa		__BITS(31,28)
+#define RMIXL_GPIO_RESET_PCIE_SRIO_SEL	__BITS(27,26)		/* PCIe or SRIO Select:
+ * 00 = PCIe selected, SRIO not available
+ * 01 = SRIO selected, 1.25 Gbaud (1.0 Gbps)
+ * 10 = SRIO selected, 2.25 Gbaud (2.0 Gbps)
+ * 11 = SRIO selected, 3.125 Gbaud (2.5 Gbps)
+ */
+#define RMIXL_GPIO_RESET_XAUI_PORT1_SEL	__BIT(25)		/* XAUI Port 1 Select:
+ *  0 = Disabled - Port is SGMII ports 4-7
+ *  1 = Enabled -  Port is 4-lane XAUI Port 1
+ */
+#define RMIXL_GPIO_RESET_XAUI_PORT0_SEL	__BIT(24)		/* XAUI Port 0 Select:
+ *  0 = Disabled - Port is SGMII ports 0-3
+ *  1 = Enabled -  Port is 4-lane XAUI Port 0
+ */
+#define RMIXL_GPIO_RESET_RESb		__BIT(23)
+#define RMIXL_GPIO_RESET_USB_DEV	__BIT(22)		/* USB Device:
+ *  0 = Device Mode
+ *  1 = Host Mode
+ */
+#define RMIXL_GPIO_RESET_PCIE_CFG	__BITS(21,20)		/* PCIe or SRIO configuration */
+#define RMIXL_GPIO_RESET_FLASH33_EN	__BIT(19)		/* Flash 33 MHZ Enable:
+ *  0 = 66.67 MHz
+ *  1 = 33.33 MHz
+ */
+#define RMIXL_GPIO_RESET_BIST_DIAG_EN	__BIT(18)		/* BIST Diagnostics enable */
+#define RMIXL_GPIO_RESET_BIST_RUN_EN	__BIT(18)		/* BIST Run enable */
+#define RMIXL_GPIO_RESET_NOOT_NAND	__BIT(16)		/* Enable boot from NAND Flash */
+#define RMIXL_GPIO_RESET_BOOT_PCMCIA	__BIT(15)		/* Enable boot from PCMCIA */
+#define RMIXL_GPIO_RESET_FLASH_CFG	__BIT(14)		/* Flash 32-bit Data Configuration:
+ *  0 = 32-bit address / 16-bit data
+ *  1 = 32-bit address / 32-bit data
+ */
+#define RMIXL_GPIO_RESET_PCMCIA_EN	__BIT(13)		/* PCMCIA Enable Status */
+#define RMIXL_GPIO_RESET_PARITY_EN	__BIT(12)		/* Parity Enable Status */
+#define RMIXL_GPIO_RESET_BIGEND		__BIT(11)		/* Big Endian Mode Enable Status */
+#define RMIXL_GPIO_RESET_PLL1_OUT_DIV	__BITS(10,8)		/* PLL1 (Core PLL) Output Divider */
+#define RMIXL_GPIO_RESET_PLL1_FB_DIV	__BITS(7,0)		/* PLL1 Feedback Divider */
+
+
 /* GPIO System Control Registers */
 #define RMIXL_GPIO_RESET_CFG		_RMIXL_OFFSET(0x15)	/* Reset Configuration register */
 #define RMIXL_GPIO_THERMAL_CSR		_RMIXL_OFFSET(0x16)	/* Thermal Control/Status register */
@@ -516,5 +559,174 @@
 #define RMIXL_PCIE_MSG_CREDIT_FIRST	_RMIXL_OFFSET(0x380)
 #define RMIXL_PCIE_MSG_CREDIT_LAST	_RMIXL_OFFSET(0x3ff)
 
+/*
+ * USB General Interface registers
+ * these are opffset from REGSPACE selected by __BIT(12) == 1
+ *	RMIXL_IOREG_VADDR(RMIXL_IO_DEV_USB_B + reg)
+ * see Tables 18-7 and 18-14 in the XLS PRM
+ */
+#define RMIXL_USB_GEN_CTRL1		0x00
+#define RMIXL_USB_GEN_CTRL2		0x04
+#define RMIXL_USB_GEN_CTRL3		0x08
+#define RMIXL_USB_IOBM_TIMER		0x0C
+#define RMIXL_USB_VBUS_TIMER		0x10
+#define RMIXL_USB_BYTESWAP_EN		0x14
+#define RMIXL_USB_COHERENT_MEM_BASE	0x40
+#define RMIXL_USB_COHERENT_MEM_LIMIT	0x44
+#define RMIXL_USB_L2ALLOC_MEM_BASE	0x48
+#define RMIXL_USB_L2ALLOC_MEM_LIMIT	0x4C
+#define RMIXL_USB_READEX_MEM_BASE	0x50
+#define RMIXL_USB_READEX_MEM_LIMIT	0x54
+#define RMIXL_USB_PHY_STATUS		0xC0
+#define RMIXL_USB_INTERRUPT_STATUS	0xC4
+#define RMIXL_USB_INTERRUPT_ENABLE	0xC8
+
+/*
+ * RMIXL_USB_GEN_CTRL1 bits
+ */
+#define RMIXL_UG_CTRL1_RESV		__BITS(31,2)
+#define RMIXL_UG_CTRL1_HOST_RST		__BIT(1)	/* Resets the Host Controller
+			 *  0: reset
+			 *  1: normal operation
+			 */
+#define RMIXL_UG_CTRL1_DEV_RST		__BIT(0)	/* Resets the Device Controller
+			 *  0: reset
+			 *  1: normal operation
+		

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2009-12-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Mon Dec 14 07:21:41 UTC 2009

Added Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_usbi.c rmixl_usbivar.h

Log Message:
- add driver for XLS USB Interface


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_usbi.c \
src/sys/arch/mips/rmi/rmixl_usbivar.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/mips/rmi/rmixl_usbi.c
diff -u /dev/null src/sys/arch/mips/rmi/rmixl_usbi.c:1.1.2.1
--- /dev/null	Mon Dec 14 07:21:41 2009
+++ src/sys/arch/mips/rmi/rmixl_usbi.c	Mon Dec 14 07:21:41 2009
@@ -0,0 +1,321 @@
+/*	$NetBSD: rmixl_usbi.c,v 1.1.2.1 2009/12/14 07:21:41 cliff Exp $	*/
+
+/*-
+ * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Cliff Neighbors
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: rmixl_usbi.c,v 1.1.2.1 2009/12/14 07:21:41 cliff Exp $);
+
+#include locators.h
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+
+#include machine/bus.h
+
+#include mips/rmi/rmixlreg.h
+#include mips/rmi/rmixlvar.h
+#include mips/rmi/rmixl_obiovar.h
+#include mips/rmi/rmixl_usbivar.h
+
+#include dev/usb/usb.h   
+#include dev/usb/usbdi.h
+#include dev/usb/usbdivar.h
+#include dev/usb/usb_mem.h
+
+/*
+ * USB I/O register byte order is
+ * LITTLE ENDIAN regardless of code model
+ */
+#define RMIXL_USBI_GEN_VADDR(o)	\
+	(volatile uint32_t *)MIPS_PHYS_TO_KSEG1(	\
+		rmixl_configuration.rc_io_pbase + RMIXL_IO_DEV_USB_B + (o))
+#define RMIXL_USBI_GEN_READ(o) le32toh(*RMIXL_USBI_GEN_VADDR(o))
+#define RMIXL_USBI_GEN_WRITE(o,v)  *RMIXL_USBI_GEN_VADDR(o) = htole32(v)
+
+static const char *rmixl_usbi_intrnames[RMIXL_UB_INTERRUPT_MAX+1] = {
+	int 0 (ohci0),
+	int 1 (ohci1),
+	int 2 (ehci),
+	int 3 (device),
+	int 4 (phy),
+	int 5 (force)
+};
+
+typedef struct rmixl_usbi_dispatch {
+	int (*func)(void *);
+	void *arg; 
+	struct evcnt count;
+} rmixl_usbi_dispatch_t;
+
+typedef struct rmixl_usbi_softc {
+	device_t		sc_dev;
+	bus_space_tag_t		sc_eb_bst;
+	bus_space_tag_t		sc_el_bst;
+	bus_addr_t		sc_addr;
+	bus_size_t		sc_size;
+	bus_dma_tag_t		sc_dmat;
+	rmixl_usbi_dispatch_t	sc_dispatch[RMIXL_UB_INTERRUPT_MAX + 1];
+} rmixl_usbi_softc_t;
+
+
+static int	rmixl_usbi_match(device_t, cfdata_t, void *);
+static void	rmixl_usbi_attach(device_t, device_t, void *);
+static int  	rmixl_usbi_print(void *, const char *);
+static int  	rmixl_usbi_search(device_t, cfdata_t, const int *, void *);
+static int  rmixl_usbi_intr(void *);
+
+#ifdef RMIXL_USBI_DEBUG
+int	rmixl_usbi_rdump(void);
+rmixl_usbi_softc_t *rmixl_usbi_sc;
+#endif
+
+
+CFATTACH_DECL_NEW(rmixl_usbi, sizeof (rmixl_usbi_softc_t),
+rmixl_usbi_match, rmixl_usbi_attach, NULL, NULL);
+
+int
+rmixl_usbi_match(device_t parent, cfdata_t match, void *aux)
+{
+	struct obio_attach_args *obio = aux;
+
+if (obio-obio_addr == RMIXL_IO_DEV_USB_B)
+return 1;
+
+return 0;
+}
+
+void
+rmixl_usbi_attach(device_t parent, device_t self, void *aux)
+{
+	rmixl_usbi_softc_t *sc = device_private(self);
+	struct obio_attach_args *obio = aux;
+	void *ih;
+
+#ifdef RMIXL_USBI_DEBUG
+	rmixl_usbi_sc = sc;
+#endif
+	sc-sc_dev = self;
+	sc-sc_eb_bst = obio-obio_eb_bst;
+	sc-sc_el_bst = obio-obio_el_bst;
+	sc-sc_addr = obio-obio_addr;
+	sc-sc_size = obio-obio_size;
+	sc-sc_dmat = obio-obio_29bit_dmat;	/* XXX */
+
+	for (int intr=0; intr = RMIXL_UB_INTERRUPT_MAX; intr++) {
+		

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2009-12-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Mon Dec 14 07:22:15 UTC 2009

Added Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_ohci.c

Log Message:
- add attach glue for ohci at XLS USB Interface


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_ohci.c

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/mips/rmi/rmixl_ohci.c
diff -u /dev/null src/sys/arch/mips/rmi/rmixl_ohci.c:1.1.2.1
--- /dev/null	Mon Dec 14 07:22:15 2009
+++ src/sys/arch/mips/rmi/rmixl_ohci.c	Mon Dec 14 07:22:15 2009
@@ -0,0 +1,130 @@
+/*	$NetBSD: rmixl_ohci.c,v 1.1.2.1 2009/12/14 07:22:15 cliff Exp $	*/
+
+/*-
+ * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Herb Peyerl of Middle Digital Inc.
+ *
+ * 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 locators.h
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: rmixl_ohci.c,v 1.1.2.1 2009/12/14 07:22:15 cliff Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+
+#include machine/bus.h
+
+#include mips/rmi/rmixlreg.h
+#include mips/rmi/rmixlvar.h
+#include mips/rmi/rmixl_usbivar.h
+
+#include dev/usb/usb.h   
+#include dev/usb/usbdi.h
+#include dev/usb/usbdivar.h
+#include dev/usb/usb_mem.h
+
+#include dev/usb/ohcireg.h
+#include dev/usb/ohcivar.h
+
+
+static int	rmixl_ohci_match(device_t, cfdata_t, void *);
+static void	rmixl_ohci_attach(device_t, device_t, void *);
+
+
+CFATTACH_DECL_NEW(rmixl_ohci, sizeof (ohci_softc_t),
+rmixl_ohci_match, rmixl_ohci_attach, NULL, NULL);
+
+int
+rmixl_ohci_match(device_t parent, cfdata_t match, void *aux)
+{
+	struct rmixl_usbi_attach_args *usbi = aux;
+
+if ((usbi-usbi_addr == (RMIXL_IO_DEV_USB_A+RMIXL_USB_HOST_0HCI0_BASE))
+||  (usbi-usbi_addr == (RMIXL_IO_DEV_USB_A+RMIXL_USB_HOST_0HCI1_BASE)))
+return 1;
+
+return 0;
+}
+
+void
+rmixl_ohci_attach(device_t parent, device_t self, void *aux)
+{
+	ohci_softc_t *sc = device_private(self);
+	struct rmixl_usbi_attach_args *usbi = aux;
+	void *ih = NULL;
+	uint32_t r;
+	usbd_status status;
+
+	/* check state of IO_AD9 signal latched in GPIO Reset Config reg */
+	r = RMIXL_IOREG_READ(RMIXL_IO_DEV_GPIO + RMIXL_GPIO_RESET_CFG);
+	if ((r  RMIXL_GPIO_RESET_USB_DEV) == 0) {
+		aprint_error_dev(self,
+			IO_AD9 selects Device mode, abort Host attach\n);
+		return;
+	}
+
+	sc-sc_dev = self;
+	sc-iot = usbi-usbi_el_bst;
+	sc-sc_size = usbi-usbi_size;
+	sc-sc_bus.dmatag = usbi-usbi_dmat;
+	sc-sc_bus.hci_private = sc;
+
+	if (bus_space_map(sc-iot, usbi-usbi_addr, sc-sc_size, 0, sc-ioh)) {
+		aprint_error_dev(self, unable to map registers\n);
+		return;
+	}
+
+	/* Disable OHCI interrupts */
+	bus_space_write_4(sc-iot, sc-ioh, OHCI_INTERRUPT_DISABLE,
+OHCI_ALL_INTRS);
+
+	/* establish interrupt */
+	if (usbi-usbi_intr != RMIXL_USBICF_INTR_DEFAULT) {
+		ih = rmixl_usbi_intr_establish(device_private(parent),
+			usbi-usbi_intr, ohci_intr, sc);
+		if (ih == NULL)
+			panic(%s: couldn't establish interrupt,
+device_xname(self));
+	}
+
+	/* we handle endianess in bus space */
+	sc-sc_endian = OHCI_HOST_ENDIAN;
+
+	status = ohci_init(sc);
+	if (status != USBD_NORMAL_COMPLETION) {
+		aprint_error_dev(self, init failed, error=%d\n, status);
+		if (ih != NULL)
+			rmixl_intr_disestablish(ih);
+		return;
+	}
+
+	/* Attach USB device */
+	sc-sc_child = config_found(self, sc-sc_bus, usbctlprint);
+}
+



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2009-12-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Mon Dec 14 07:22:37 UTC 2009

Added Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_ehci.c

Log Message:
- add attach glue for ehci at XLS USB Interface


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_ehci.c

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/mips/rmi/rmixl_ehci.c
diff -u /dev/null src/sys/arch/mips/rmi/rmixl_ehci.c:1.1.2.1
--- /dev/null	Mon Dec 14 07:22:37 2009
+++ src/sys/arch/mips/rmi/rmixl_ehci.c	Mon Dec 14 07:22:37 2009
@@ -0,0 +1,129 @@
+/*	$NetBSD: rmixl_ehci.c,v 1.1.2.1 2009/12/14 07:22:37 cliff Exp $	*/
+
+/*-
+ * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Herb Peyerl of Middle Digital Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: rmixl_ehci.c,v 1.1.2.1 2009/12/14 07:22:37 cliff Exp $);
+
+#include locators.h
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+
+#include machine/bus.h
+
+#include mips/rmi/rmixlreg.h
+#include mips/rmi/rmixlvar.h
+#include mips/rmi/rmixl_usbivar.h
+
+#include dev/usb/usb.h   
+#include dev/usb/usbdi.h
+#include dev/usb/usbdivar.h
+#include dev/usb/usb_mem.h
+
+#include dev/usb/ehcireg.h
+#include dev/usb/ehcivar.h
+
+
+static int	rmixl_ehci_match(device_t, cfdata_t, void *);
+static void	rmixl_ehci_attach(device_t, device_t, void *);
+
+
+CFATTACH_DECL_NEW(rmixl_ehci, sizeof (ehci_softc_t),
+rmixl_ehci_match, rmixl_ehci_attach, NULL, NULL);
+
+int
+rmixl_ehci_match(device_t parent, cfdata_t match, void *aux)
+{
+	struct rmixl_usbi_attach_args *usbi = aux;
+
+if (usbi-usbi_addr == (RMIXL_IO_DEV_USB_A + RMIXL_USB_HOST_EHCI_BASE))
+return 1;
+
+return 0;
+}
+
+void
+rmixl_ehci_attach(device_t parent, device_t self, void *aux)
+{
+	ehci_softc_t *sc = device_private(self);
+	struct rmixl_usbi_attach_args *usbi = aux;
+	void *ih = NULL;
+	uint32_t r;
+	usbd_status status;
+
+	/* check state of IO_AD9 signal latched in GPIO Reset Config reg */
+	r = RMIXL_IOREG_READ(RMIXL_IO_DEV_GPIO + RMIXL_GPIO_RESET_CFG);
+	if ((r  RMIXL_GPIO_RESET_USB_DEV) == 0) {
+		aprint_error_dev(self,
+			IO_AD9 selects Device mode, abort Host attach\n);
+		return;
+	}
+
+	sc-sc_dev = self;
+	sc-sc_bus.hci_private = sc;
+	sc-iot = usbi-usbi_el_bst;
+	sc-sc_size = usbi-usbi_size;
+	sc-sc_bus.dmatag = usbi-usbi_dmat;
+	sc-sc_bus.usbrev = USBREV_1_0;
+
+	if (bus_space_map(sc-iot, usbi-usbi_addr, sc-sc_size, 0, sc-ioh)) {
+		aprint_error_dev(self, unable to map registers\n);
+		return;
+	}
+
+	/* get offset to operational regs */
+	sc-sc_offs = EREAD1(sc, EHCI_CAPLENGTH);
+
+	/* Disable EHCI interrupts */
+	EOWRITE2(sc, EHCI_USBINTR, 0);
+
+	/* establish interrupt */
+	if (usbi-usbi_intr != RMIXL_USBICF_INTR_DEFAULT) {
+		ih = rmixl_usbi_intr_establish(device_private(parent),
+			usbi-usbi_intr, ehci_intr, sc);
+		if (ih == NULL)
+			panic(%s: couldn't establish interrupt,
+device_xname(self));
+	}
+
+	status = ehci_init(sc);
+	if (status != USBD_NORMAL_COMPLETION) {
+		aprint_error_dev(self, init failed, error=%d\n, status);
+		if (ih != NULL)
+			rmixl_intr_disestablish(ih);
+		return;
+	}
+
+	/* Attach USB device */
+	sc-sc_child = config_found(self, sc-sc_bus, usbctlprint);
+}
+



  1   2   >