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

2012-05-05 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat May  5 13:47:07 UTC 2012

Modified Files:
src/sys/arch/sun3/conf: files.sun3

Log Message:
make sure opt_sunkbd.h exists


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/sun3/conf/files.sun3

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/sun3/conf/files.sun3
diff -u src/sys/arch/sun3/conf/files.sun3:1.80 src/sys/arch/sun3/conf/files.sun3:1.81
--- src/sys/arch/sun3/conf/files.sun3:1.80	Tue Nov 15 12:23:22 2011
+++ src/sys/arch/sun3/conf/files.sun3	Sat May  5 13:47:07 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.sun3,v 1.80 2011/11/15 12:23:22 tsutsui Exp $
+#	$NetBSD: files.sun3,v 1.81 2012/05/05 13:47:07 macallan Exp $
 
 #
 # sun3-specific configuration info
@@ -235,6 +235,7 @@ file dev/sun/kbdsun.c			kbd_zs
 file dev/sun/kbd.c			kbd needs-flag
 file dev/sun/kbd_tables.c 		kbd
 file arch/sun3/dev/kd.c 		kbd
+defflag opt_sunkbd.h			KBD_HIJACK_VOLUME_BUTTONS
 
 device ms: zsevent
 attach ms at zsc with ms_zs



CVS commit: src/lib/libossaudio

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 15:04:58 UTC 2012

Modified Files:
src/lib/libossaudio: soundcard.h

Log Message:
avoid using cpp variadic macros and explain why.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libossaudio/soundcard.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/libossaudio/soundcard.h
diff -u src/lib/libossaudio/soundcard.h:1.20 src/lib/libossaudio/soundcard.h:1.21
--- src/lib/libossaudio/soundcard.h:1.20	Fri May  4 07:48:12 2012
+++ src/lib/libossaudio/soundcard.h	Sat May  5 11:04:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: soundcard.h,v 1.20 2012/05/04 11:48:12 christos Exp $	*/
+/*	$NetBSD: soundcard.h,v 1.21 2012/05/05 15:04:57 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -291,24 +291,18 @@ typedef struct buffmem_desc {
 	int size;
 } buffmem_desc;
 
-#if 0
-/* This is what we'd like to have, but it causes prototype conflicts. */
 #define ioctl _oss_ioctl
-#else
 /*
- * XXX force inclusion of sys/ioctl.h before we redefine
- * ioctl() to avoid a prototype conflict.
- * Its multiple inclusion protection will keep this from
- * happening if it is pulled in later.
+ * If we already included sys/ioctl.h, then we define our own prototype,
+ * else we depend on sys/ioctl.h to do it for us. We do it this way, so
+ * that we don't define the prototype twice.
  */
+#ifndef _SYS_IOCTL_H
 #include sys/ioctl.h
-#define ioctl(x, y, ...) _oss_ioctl(x, y, __VA_ARGS__)
-#endif
-
-#include sys/cdefs.h
-
+#else
 __BEGIN_DECLS
 int _oss_ioctl(int, unsigned long, ...);
 __END_DECLS
+#endif
 
 #endif /* !_SOUNDCARD_H_ */



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

2012-05-05 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sat May  5 15:08:29 UTC 2012

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Add latest CR4 bits:
- CR4_VMXE: VMX operations, used for hardware virtualization.
- CR4_SMXE: SMX operations, used for safer Mode Extensions (ground for
Intel's TXT - Trusted Execution Technology - platform).
- CR4_FSGSBASE: enable *FSBASE and *GSBASE instructions, for R/W access
to FS/GS segment base addresses.
- CR4_PCIDE: enable Process Context IDentifiers (other architectures may call
 these address space identifiers).
- CR4_OSXSAVE: enable xsave and xrestore instructions
- CR4_SMEP: Supervisor Mode Execution Prevention. Allows enforcing --x rights
from cpl 0.

From Intel® 64 and IA-32 Architectures Software Developer’s Manual,
March 2012.

Align declarations.

CPUID_* bits for these features follow.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.58 src/sys/arch/x86/include/specialreg.h:1.59
--- src/sys/arch/x86/include/specialreg.h:1.58	Mon Apr 30 00:04:31 2012
+++ src/sys/arch/x86/include/specialreg.h	Sat May  5 15:08:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.58 2012/04/30 00:04:31 christos Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.59 2012/05/05 15:08:29 jym Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -68,20 +68,26 @@
 /* the remaining 7 bits of this register are reserved */
 
 /*
- * bits in the pentiums %cr4 register:
+ * bits in the %cr4 control register:
  */
+#define CR4_VME		0x0001 /* virtual 8086 mode extension enable */
+#define CR4_PVI		0x0002 /* protected mode virtual interrupt enable */
+#define CR4_TSD		0x0004 /* restrict RDTSC instruction to cpl 0 */
+#define CR4_DE		0x0008 /* debugging extension */
+#define CR4_PSE		0x0010 /* large (4MB) page size enable */
+#define CR4_PAE		0x0020 /* physical address extension enable */
+#define CR4_MCE		0x0040 /* machine check enable */
+#define CR4_PGE		0x0080 /* page global enable */
+#define CR4_PCE		0x0100 /* enable RDPMC instruction for all cpls */
+#define CR4_OSFXSR	0x0200 /* enable fxsave/fxrestor and SSE */
+#define CR4_OSXMMEXCPT	0x0400 /* enable unmasked SSE exceptions */
+#define CR4_VMXE	0x2000 /* enable VMX operations */
+#define CR4_SMXE	0x4000 /* enable SMX operations */
+#define CR4_FSGSBASE	0x0001 /* enable *FSBASE and *GSBASE instructions */
+#define CR4_PCIDE	0x0002 /* enable Process Context IDentifiers */
+#define CR4_OSXSAVE	0x0004 /* enable xsave and xrestore */
+#define CR4_SMEP	0x0010 /* enable SMEP support */
 
-#define CR4_VME	0x0001	/* virtual 8086 mode extension enable */
-#define CR4_PVI 0x0002	/* protected mode virtual interrupt enable */
-#define CR4_TSD 0x0004	/* restrict RDTSC instruction to cpl 0 only */
-#define CR4_DE	0x0008	/* debugging extension */
-#define CR4_PSE	0x0010	/* large (4MB) page size enable */
-#define CR4_PAE 0x0020	/* physical address extension enable */
-#define CR4_MCE	0x0040	/* machine check enable */
-#define CR4_PGE	0x0080	/* page global enable */
-#define CR4_PCE	0x0100	/* enable RDPMC instruction for all cpls */
-#define CR4_OSFXSR	0x0200	/* enable fxsave/fxrestor and SSE */
-#define CR4_OSXMMEXCPT	0x0400	/* enable unmasked SSE exceptions */
 
 /*
  * CPUID features bits



CVS commit: src/lib/libossaudio

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 15:57:45 UTC 2012

Modified Files:
src/lib/libossaudio: Makefile ossaudio.c soundcard.h

Log Message:
fix typo, WARNS=5


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libossaudio/Makefile
cvs rdiff -u -r1.27 -r1.28 src/lib/libossaudio/ossaudio.c
cvs rdiff -u -r1.21 -r1.22 src/lib/libossaudio/soundcard.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/libossaudio/Makefile
diff -u src/lib/libossaudio/Makefile:1.9 src/lib/libossaudio/Makefile:1.10
--- src/lib/libossaudio/Makefile:1.9	Wed Mar 21 06:08:30 2012
+++ src/lib/libossaudio/Makefile	Sat May  5 11:57:45 2012
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.9 2012/03/21 10:08:30 matt Exp $
+#	$NetBSD: Makefile,v 1.10 2012/05/05 15:57:45 christos Exp $
 
-WARNS=	2
+WARNS=	5
 
 LIB=	ossaudio
 MAN=	ossaudio.3

Index: src/lib/libossaudio/ossaudio.c
diff -u src/lib/libossaudio/ossaudio.c:1.27 src/lib/libossaudio/ossaudio.c:1.28
--- src/lib/libossaudio/ossaudio.c:1.27	Fri May  4 07:48:12 2012
+++ src/lib/libossaudio/ossaudio.c	Sat May  5 11:57:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.27 2012/05/04 11:48:12 christos Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.28 2012/05/05 15:57:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: ossaudio.c,v 1.27 2012/05/04 11:48:12 christos Exp $);
+__RCSID($NetBSD: ossaudio.c,v 1.28 2012/05/05 15:57:45 christos Exp $);
 
 /*
  * This is an OSS (Linux) sound API emulator.
@@ -549,7 +549,7 @@ getdevinfo(int fd)
 	mixer_devinfo_t mi;
 	int i, j, e;
 	static struct {
-		char *name;
+		const char *name;
 		int code;
 	} *dp, devs[] = {
 		{ AudioNmicrophone,	SOUND_MIXER_MIC },
@@ -574,7 +574,7 @@ getdevinfo(int fd)
 /*		{ AudioNmixerout,	?? },*/
 		{ 0, -1 }
 	};
-	static struct audiodevinfo devcache = { 0 };
+	static struct audiodevinfo devcache = { .done = 0 };
 	struct audiodevinfo *di = devcache;
 	struct stat sb;
 	size_t mlen, dlen;
@@ -826,7 +826,7 @@ static void
 setblocksize(int fd, struct audio_info *info)
 {
 	struct audio_info set;
-	int s;
+	size_t s;
 
 	if (info-blocksize  (info-blocksize-1)) {
 		for(s = 32; s  info-blocksize; s = 1)

Index: src/lib/libossaudio/soundcard.h
diff -u src/lib/libossaudio/soundcard.h:1.21 src/lib/libossaudio/soundcard.h:1.22
--- src/lib/libossaudio/soundcard.h:1.21	Sat May  5 11:04:57 2012
+++ src/lib/libossaudio/soundcard.h	Sat May  5 11:57:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: soundcard.h,v 1.21 2012/05/05 15:04:57 christos Exp $	*/
+/*	$NetBSD: soundcard.h,v 1.22 2012/05/05 15:57:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -297,7 +297,7 @@ typedef struct buffmem_desc {
  * else we depend on sys/ioctl.h to do it for us. We do it this way, so
  * that we don't define the prototype twice.
  */
-#ifndef _SYS_IOCTL_H
+#ifndef _SYS_IOCTL_H_
 #include sys/ioctl.h
 #else
 __BEGIN_DECLS



CVS commit: src

2012-05-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat May  5 16:03:55 UTC 2012

Modified Files:
src/sbin/fdisk: Makefile fdisk.c
src/tools/fdisk: Makefile

Log Message:
Don't use #if defined(__i386__) || defined(__x86_64__) conditionals
in C source file to define option features.
Define proper options in each Makefile per ${MACHINE_ARCH} variable instead.

Previously if a host is x86 and it has /usr/mdec/mbr file in its system,
tools fdisk implicitly installs it as mbr bootcode even for !x86 targets.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sbin/fdisk/Makefile
cvs rdiff -u -r1.140 -r1.141 src/sbin/fdisk/fdisk.c
cvs rdiff -u -r1.4 -r1.5 src/tools/fdisk/Makefile

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

Modified files:

Index: src/sbin/fdisk/Makefile
diff -u src/sbin/fdisk/Makefile:1.41 src/sbin/fdisk/Makefile:1.42
--- src/sbin/fdisk/Makefile:1.41	Fri Nov 27 15:37:32 2009
+++ src/sbin/fdisk/Makefile	Sat May  5 16:03:55 2012
@@ -1,10 +1,17 @@
-#	$NetBSD: Makefile,v 1.41 2009/11/27 15:37:32 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.42 2012/05/05 16:03:55 tsutsui Exp $
 
 PROG=	fdisk 
 SRCS=	fdisk.c
 
 MAN=	fdisk.8
 
+.if ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64
+CPPFLAGS+= -DBOOTSEL
+.if (${HOSTPROG:U} == )
+CPPFLAGS+= -DUSE_DISKLIST
+.endif
+.endif
+
 .if ${MACHINE} == arc
 CPPFLAGS+= -D_PATH_DEFDISK='/dev/rsd0d'
 .endif

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.140 src/sbin/fdisk/fdisk.c:1.141
--- src/sbin/fdisk/fdisk.c:1.140	Fri Apr  6 20:09:26 2012
+++ src/sbin/fdisk/fdisk.c	Sat May  5 16:03:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.140 2012/04/06 20:09:26 christos Exp $ */
+/*	$NetBSD: fdisk.c,v 1.141 2012/05/05 16:03:55 tsutsui Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.140 2012/04/06 20:09:26 christos Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.141 2012/05/05 16:03:55 tsutsui Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -91,13 +91,6 @@ __RCSID($NetBSD: fdisk.c,v 1.140 2012/0
 #define	LE_MBR_MAGIC		htole16(MBR_MAGIC)
 #define	LE_MBR_BS_MAGIC		htole16(MBR_BS_MAGIC)
 
-#if defined(__i386__) || defined(__x86_64__)
-#if !HAVE_NBTOOL_CONFIG_H
-#include machine/cpu.h
-#endif /* !HAVE_NBTOOL_CONFIG_H */
-#define BOOTSEL
-#endif
-
 #ifdef BOOTSEL
 
 #define	DEFAULT_BOOTCODE	mbr
@@ -250,8 +243,8 @@ static char *iobuf;		/* buffer for non 5
 static int bootsize;		/* actual size of bootcode */
 static int boot_installed;	/* 1 if we've copied code into the mbr */
 
-#if (defined(__i386__) || defined(__x86_64__))  !HAVE_NBTOOL_CONFIG_H
-#define USE_DISKLIST
+#if defined(USE_DISKLIST)
+#include machine/cpu.h
 static struct disklist *dl;
 #endif
 

Index: src/tools/fdisk/Makefile
diff -u src/tools/fdisk/Makefile:1.4 src/tools/fdisk/Makefile:1.5
--- src/tools/fdisk/Makefile:1.4	Sat Jun 19 23:11:10 2010
+++ src/tools/fdisk/Makefile	Sat May  5 16:03:55 2012
@@ -1,13 +1,9 @@
-#	$NetBSD: Makefile,v 1.4 2010/06/19 23:11:10 riz Exp $
+#	$NetBSD: Makefile,v 1.5 2012/05/05 16:03:55 tsutsui Exp $
 
 HOSTPROGNAME=	${MACHINE_GNU_PLATFORM}-fdisk
 HOST_SRCDIR=	sbin/fdisk
 HOST_SRCS=	getcap.c disklabel.c
 
-.if ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64
-CPPFLAGS+= -DBOOTSEL
-.endif
-
 .include ${.CURDIR}/../Makefile.nbincludes
 .include ${.CURDIR}/../Makefile.host
 



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

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 17:52:29 UTC 2012

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

Log Message:
add tgamma{,f}


To generate a diff of this commit:
cvs rdiff -u -r1.1755 -r1.1756 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.1755 src/distrib/sets/lists/comp/mi:1.1756
--- src/distrib/sets/lists/comp/mi:1.1755	Sat Apr 21 08:27:24 2012
+++ src/distrib/sets/lists/comp/mi	Sat May  5 13:52:27 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1755 2012/04/21 12:27:24 roy Exp $
+#	$NetBSD: mi,v 1.1756 2012/05/05 17:52:27 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -9163,6 +9163,8 @@
 ./usr/share/man/cat3/termname.0			comp-c-catman		.cat
 ./usr/share/man/cat3/textdomain.0		comp-c-catman		.cat
 ./usr/share/man/cat3/tfind.0			comp-c-catman		.cat
+./usr/share/man/cat3/tgamma.0			comp-c-catman		.cat
+./usr/share/man/cat3/tgammaf.0			comp-c-catman		.cat
 ./usr/share/man/cat3/tgetent.0			comp-c-catman		.cat
 ./usr/share/man/cat3/tgetflag.0			comp-c-catman		.cat
 ./usr/share/man/cat3/tgetnum.0			comp-c-catman		.cat
@@ -15395,6 +15397,8 @@
 ./usr/share/man/html3/termname.html		comp-c-htmlman		html
 ./usr/share/man/html3/textdomain.html		comp-c-htmlman		html
 ./usr/share/man/html3/tfind.html		comp-c-htmlman		html
+./usr/share/man/html3/tgamma.html		comp-c-htmlman		html
+./usr/share/man/html3/tgammaf.html		comp-c-htmlman		html
 ./usr/share/man/html3/tgetent.html		comp-c-htmlman		html
 ./usr/share/man/html3/tgetflag.html		comp-c-htmlman		html
 ./usr/share/man/html3/tgetnum.html		comp-c-htmlman		html
@@ -21693,6 +21697,8 @@
 ./usr/share/man/man3/termname.3			comp-c-man		.man
 ./usr/share/man/man3/textdomain.3		comp-c-man		.man
 ./usr/share/man/man3/tfind.3			comp-c-man		.man
+./usr/share/man/man3/tgamma.3			comp-c-man		.man
+./usr/share/man/man3/tgammaf.3			comp-c-man		.man
 ./usr/share/man/man3/tgetent.3			comp-c-man		.man
 ./usr/share/man/man3/tgetflag.3			comp-c-man		.man
 ./usr/share/man/man3/tgetnum.3			comp-c-man		.man



CVS commit: src/lib/libm

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 17:54:14 UTC 2012

Modified Files:
src/lib/libm: Makefile
src/lib/libm/man: lgamma.3
src/lib/libm/src: math_private.h
Added Files:
src/lib/libm/src: b_exp.c b_log.c b_tgamma.c s_tgammaf.c

Log Message:
Add tgamma{,f} from FreeBSD via  rudolf, netbsd at eq dot cz


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/lib/libm/Makefile
cvs rdiff -u -r1.21 -r1.22 src/lib/libm/man/lgamma.3
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/b_exp.c src/lib/libm/src/b_log.c \
src/lib/libm/src/b_tgamma.c src/lib/libm/src/s_tgammaf.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libm/src/math_private.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/libm/Makefile
diff -u src/lib/libm/Makefile:1.123 src/lib/libm/Makefile:1.124
--- src/lib/libm/Makefile:1.123	Wed Apr  4 06:59:46 2012
+++ src/lib/libm/Makefile	Sat May  5 13:54:13 2012
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.123 2012/04/04 10:59:46 joerg Exp $
+#  $NetBSD: Makefile,v 1.124 2012/05/05 17:54:13 christos Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -129,7 +129,8 @@ COPTS+=	-fno-strict-aliasing
 CPPFLAGS+=-DLIBM_SCCS
 
 LIB=	m
-COMMON_SRCS+= e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \
+COMMON_SRCS+= b_exp.c b_log.c b_tgamma.c \
+	e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \
 	e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_cosh.c e_coshf.c e_exp.c \
 	e_expf.c e_fmod.c e_fmodf.c e_hypot.c e_hypotf.c e_j0.c e_j0f.c \
 	e_j1.c e_j1f.c e_jn.c e_jnf.c e_lgamma_r.c e_lgammaf_r.c e_log.c \
@@ -148,7 +149,7 @@ COMMON_SRCS+= e_acos.c e_acosf.c e_acosh
 	s_matherr.c s_modff.c s_nextafter.c \
 	s_nextafterf.c s_remquo.c s_remquof.c s_rint.c s_rintf.c s_round.c s_roundf.c s_scalbn.c \
 	s_scalbnf.c s_scalbnl.c s_signgam.c s_significand.c s_significandf.c s_sin.c \
-	s_sinf.c s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_trunc.c s_truncf.c \
+	s_sinf.c s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c s_trunc.c s_truncf.c \
 	w_acos.c w_acosf.c w_acosh.c w_acoshf.c w_asin.c w_asinf.c w_atan2.c \
 	w_atan2f.c w_atanh.c w_atanhf.c w_cosh.c w_coshf.c \
 	w_drem.c w_dremf.c w_exp.c w_expf.c w_fmod.c w_fmodf.c w_gamma.c \
@@ -269,7 +270,7 @@ MLINKS+=j0.3 j0f.3 j0.3 j1.3 j0.3 j1f.3 
 	j0.3 y0.3 j0.3 y0f.3 j0.3 y1.3 j0.3 y1f.3 j0.3 yn.3 j0.3 ynf.3
 MLINKS+=lgamma.3 lgammaf.3 lgamma.3 lgamma_r.3 lgamma.3 lgammaf_r.3 \
 	lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 gamma_r.3 \
-	lgamma.3 gammaf_r.3
+	lgamma.3 gammaf_r.3 lgamma.3 tgamma.3 lgamma.3 tgammaf.3
 MLINKS+=nextafter.3 nextafterf.3 \
 	nextafter.3 nextafterl.3 \
 	nextafter.3 nexttoward.3

Index: src/lib/libm/man/lgamma.3
diff -u src/lib/libm/man/lgamma.3:1.21 src/lib/libm/man/lgamma.3:1.22
--- src/lib/libm/man/lgamma.3:1.21	Thu Aug  7 12:44:48 2003
+++ src/lib/libm/man/lgamma.3	Sat May  5 13:54:13 2012
@@ -26,9 +26,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)lgamma.3	6.6 (Berkeley) 12/3/92
-.\	$NetBSD: lgamma.3,v 1.21 2003/08/07 16:44:48 agc Exp $
+.\	$NetBSD: lgamma.3,v 1.22 2012/05/05 17:54:13 christos Exp $
 .\
-.Dd December 3, 1992
+.Dd May 4, 2012
 .Dt LGAMMA 3
 .Os
 .Sh NAME
@@ -39,7 +39,9 @@
 .Nm gamma ,
 .Nm gammaf ,
 .Nm gamma_r ,
-.Nm gammaf_r
+.Nm gammaf_r ,
+.Nm tgamma ,
+.Nm tgammaf
 .Nd log gamma function
 .Sh LIBRARY
 .Lb libm
@@ -64,6 +66,10 @@
 .Fn gamma_r double x int *sign
 .Ft float
 .Fn gammaf_r float x int *sign
+.Ft double
+.Fn tgamma double x
+.Ft float
+.Fn tgammaf float x
 .Sh DESCRIPTION
 .Fn lgamma x
 .if t \{\
@@ -90,6 +96,26 @@ pointed to by the
 argument and
 .Fa signgam
 is not modified.
+.Pp
+The
+.Fn tgamma x
+and
+.Fn tgammaf x
+functions return \(*G(x), with no effect on
+.Fa signgam .
+.Pp
+.Fn gamma ,
+.Fn gammaf ,
+.Fn gamma_r ,
+and
+.Fn gammaf_r
+are deprecated aliases for
+.Fn lgamma ,
+.Fn lgammaf ,
+.Fn lgamma_r ,
+and
+.Fn lgammaf_r ,
+respectively.
 .Sh IDIOSYNCRASIES
 Do not use the expression
 .Dq Li signgam\(**exp(lgamma(x))
@@ -107,6 +133,9 @@ has returned can signgam be correct.
 returns appropriate values unless an argument is out of range.
 Overflow will occur for sufficiently large positive values, and
 non-positive integers.
+For large non-integer negative values,
+.Fn tgamma
+will underflow.
 On the
 .Tn VAX ,
 the reserved operator is returned,
@@ -121,3 +150,7 @@ The
 .Nm lgamma
 function appeared in
 .Bx 4.3 .
+The
+.Fn tgamma
+function appeared in
+.Nx 6.0 .

Index: src/lib/libm/src/math_private.h
diff -u src/lib/libm/src/math_private.h:1.16 src/lib/libm/src/math_private.h:1.17
--- src/lib/libm/src/math_private.h:1.16	Thu Sep 16 16:39:50 2010
+++ src/lib/libm/src/math_private.h	Sat May  5 13:54:14 2012
@@ -11,7 +11,7 @@
 
 /*
  * from: @(#)fdlibm.h 5.1 93/09/24
- * $NetBSD: math_private.h,v 1.16 2010/09/16 20:39:50 drochner Exp $
+ * $NetBSD: math_private.h,v 1.17 2012/05/05 17:54:14 christos Exp $
  */
 
 #ifndef _MATH_PRIVATE_H_
@@ 

CVS commit: src/sys

2012-05-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat May  5 19:15:11 UTC 2012

Modified Files:
src/sys/conf: files
src/sys/kern: subr_pool.c
src/sys/sys: pool.h

Log Message:
G/C POOL_DIAGNOSTIC option.  No objection on tech-kern@.


To generate a diff of this commit:
cvs rdiff -u -r1.1048 -r1.1049 src/sys/conf/files
cvs rdiff -u -r1.194 -r1.195 src/sys/kern/subr_pool.c
cvs rdiff -u -r1.73 -r1.74 src/sys/sys/pool.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/conf/files
diff -u src/sys/conf/files:1.1048 src/sys/conf/files:1.1049
--- src/sys/conf/files:1.1048	Sat Apr 28 23:03:39 2012
+++ src/sys/conf/files	Sat May  5 19:15:10 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1048 2012/04/28 23:03:39 rmind Exp $
+#	$NetBSD: files,v 1.1049 2012/05/05 19:15:10 rmind Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -69,8 +69,6 @@ defflag	opt_ntp.h		PPS_SYNC NTP
 defflag	opt_ptm.h		NO_DEV_PTM COMPAT_BSDPTY
 
 defparam opt_kmempages.h	NKMEMPAGES NKMEMPAGES_MIN NKMEMPAGES_MAX
-defflag	opt_pool.h		POOL_DIAGNOSTIC
-defparam opt_poollog.h		POOL_LOGSIZE
 
 defflag	opt_revcache.h		NAMECACHE_ENTER_REVERSE
 

Index: src/sys/kern/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.194 src/sys/kern/subr_pool.c:1.195
--- src/sys/kern/subr_pool.c:1.194	Sat Feb  4 22:11:42 2012
+++ src/sys/kern/subr_pool.c	Sat May  5 19:15:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.194 2012/02/04 22:11:42 para Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.195 2012/05/05 19:15:10 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010
@@ -32,11 +32,9 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.194 2012/02/04 22:11:42 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.195 2012/05/05 19:15:10 rmind Exp $);
 
 #include opt_ddb.h
-#include opt_pool.h
-#include opt_poollog.h
 #include opt_lockdebug.h
 
 #include sys/param.h
@@ -45,7 +43,6 @@ __KERNEL_RCSID(0, $NetBSD: subr_pool.c,
 #include sys/proc.h
 #include sys/errno.h
 #include sys/kernel.h
-#include sys/malloc.h
 #include sys/vmem.h
 #include sys/pool.h
 #include sys/syslog.h
@@ -213,136 +210,6 @@ static void pool_print1(struct pool *, c
 static int pool_chk_page(struct pool *, const char *,
 			 struct pool_item_header *);
 
-/*
- * Pool log entry. An array of these is allocated in pool_init().
- */
-struct pool_log {
-	const char	*pl_file;
-	long		pl_line;
-	int		pl_action;
-#define	PRLOG_GET	1
-#define	PRLOG_PUT	2
-	void		*pl_addr;
-};
-
-#ifdef POOL_DIAGNOSTIC
-/* Number of entries in pool log buffers */
-#ifndef POOL_LOGSIZE
-#define	POOL_LOGSIZE	10
-#endif
-
-int pool_logsize = POOL_LOGSIZE;
-
-static inline void
-pr_log(struct pool *pp, void *v, int action, const char *file, long line)
-{
-	int n;
-	struct pool_log *pl;
-
-	if ((pp-pr_roflags  PR_LOGGING) == 0)
-		return;
-
-	if (pp-pr_log == NULL) {
-		if (kmem_map != NULL)
-			pp-pr_log = malloc(
-pool_logsize * sizeof(struct pool_log),
-M_TEMP, M_NOWAIT | M_ZERO);
-		if (pp-pr_log == NULL)
-			return;
-		pp-pr_curlogentry = 0;
-		pp-pr_logsize = pool_logsize;
-	}
-
-	/*
-	 * Fill in the current entry. Wrap around and overwrite
-	 * the oldest entry if necessary.
-	 */
-	n = pp-pr_curlogentry;
-	pl = pp-pr_log[n];
-	pl-pl_file = file;
-	pl-pl_line = line;
-	pl-pl_action = action;
-	pl-pl_addr = v;
-	if (++n = pp-pr_logsize)
-		n = 0;
-	pp-pr_curlogentry = n;
-}
-
-static void
-pr_printlog(struct pool *pp, struct pool_item *pi,
-void (*pr)(const char *, ...))
-{
-	int i = pp-pr_logsize;
-	int n = pp-pr_curlogentry;
-
-	if (pp-pr_log == NULL)
-		return;
-
-	/*
-	 * Print all entries in this pool's log.
-	 */
-	while (i--  0) {
-		struct pool_log *pl = pp-pr_log[n];
-		if (pl-pl_action != 0) {
-			if (pi == NULL || pi == pl-pl_addr) {
-(*pr)(\tlog entry %d:\n, i);
-(*pr)(\t\taction = %s, addr = %p\n,
-pl-pl_action == PRLOG_GET ? get : put,
-pl-pl_addr);
-(*pr)(\t\tfile: %s at line %lu\n,
-pl-pl_file, pl-pl_line);
-			}
-		}
-		if (++n = pp-pr_logsize)
-			n = 0;
-	}
-}
-
-static inline void
-pr_enter(struct pool *pp, const char *file, long line)
-{
-
-	if (__predict_false(pp-pr_entered_file != NULL)) {
-		printf(pool %s: reentrancy at file %s line %ld\n,
-		pp-pr_wchan, file, line);
-		printf( previous entry at file %s line %ld\n,
-		pp-pr_entered_file, pp-pr_entered_line);
-		panic(pr_enter);
-	}
-
-	pp-pr_entered_file = file;
-	pp-pr_entered_line = line;
-}
-
-static inline void
-pr_leave(struct pool *pp)
-{
-
-	if (__predict_false(pp-pr_entered_file == NULL)) {
-		printf(pool %s not entered?\n, pp-pr_wchan);
-		panic(pr_leave);
-	}
-
-	pp-pr_entered_file = NULL;
-	pp-pr_entered_line = 0;
-}
-
-static inline void
-pr_enter_check(struct pool *pp, void (*pr)(const char *, ...))
-{
-
-	if (pp-pr_entered_file != NULL)
-		(*pr)(\n\tcurrently entered from file %s line 

CVS commit: src/sys/kern

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 19:37:37 UTC 2012

Modified Files:
src/sys/kern: kern_syscall.c makesyscalls.sh syscalls.master

Log Message:
Add a new type of syscall EXTERN which is meant for modules that live
outside the tree (in pkgsrc). Use it to define afssys (210) which has
been reserved for years, and make it autoload the openafs module.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/kern_syscall.c
cvs rdiff -u -r1.119 -r1.120 src/sys/kern/makesyscalls.sh
cvs rdiff -u -r1.258 -r1.259 src/sys/kern/syscalls.master

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/kern_syscall.c
diff -u src/sys/kern/kern_syscall.c:1.6 src/sys/kern/kern_syscall.c:1.7
--- src/sys/kern/kern_syscall.c:1.6	Thu Mar  8 16:59:30 2012
+++ src/sys/kern/kern_syscall.c	Sat May  5 15:37:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_syscall.c,v 1.6 2012/03/08 21:59:30 joerg Exp $	*/
+/*	$NetBSD: kern_syscall.c,v 1.7 2012/05/05 19:37:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_syscall.c,v 1.6 2012/03/08 21:59:30 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_syscall.c,v 1.7 2012/05/05 19:37:37 christos Exp $);
 
 #include opt_modular.h
 
@@ -194,6 +194,7 @@ sys_nomodule(struct lwp *l, const void *
 	{ SYS__ksem_destroy, ksem },
 	{ SYS__ksem_timedwait, ksem },
 	{ SYS_nfssvc, nfsserver },
+	{ SYS_afssys, openafs },
 	};
 	const struct sysent *sy;
 	const struct emul *em;

Index: src/sys/kern/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.119 src/sys/kern/makesyscalls.sh:1.120
--- src/sys/kern/makesyscalls.sh:1.119	Sun Jun 26 12:42:42 2011
+++ src/sys/kern/makesyscalls.sh	Sat May  5 15:37:37 2012
@@ -1,5 +1,5 @@
 #! /bin/sh -
-#	$NetBSD: makesyscalls.sh,v 1.119 2011/06/26 16:42:42 christos Exp $
+#	$NetBSD: makesyscalls.sh,v 1.120 2012/05/05 19:37:37 christos Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -725,7 +725,7 @@ function putent(type, compatwrap) {
 		# output a prototype, to be used to generate lint stubs in
 		# libc.
 		printproto()
-	} else if (type == COMPAT) {
+	} else if (type == COMPAT || type == EXTERN) {
 		# Just define the syscall number with a comment.  These
 		# may be used by compatibility stubs in libc.
 		printproto(compatwrap_)
@@ -880,6 +880,12 @@ $2 == OBSOL || $2 == UNIMPL || $2 ==
 	syscall++
 	next
 }
+$2 == EXTERN {
+	parseline()
+	putent(EXTERN, )
+	syscall++
+	next
+}
 {
 	for (i = 1; i = ncompat; i++) {
 		if ($2 == compat_upper[i]) {

Index: src/sys/kern/syscalls.master
diff -u src/sys/kern/syscalls.master:1.258 src/sys/kern/syscalls.master:1.259
--- src/sys/kern/syscalls.master:1.258	Thu Mar  8 16:55:45 2012
+++ src/sys/kern/syscalls.master	Sat May  5 15:37:37 2012
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp $
+	$NetBSD: syscalls.master,v 1.259 2012/05/05 19:37:37 christos Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -26,6 +26,7 @@
 ;	INDIR	included, but don't define the syscall args structure,
 ;		and allow it to be really varargs.
 ;	NOERR	included, syscall does not set errno
+;	EXTERN	implemented, but as 3rd party module
 ;
 ; arguments:
 ;	PAD	argument not part of the C interface, used only for padding
@@ -403,7 +404,8 @@
 ;
 ; Syscalls 210-219 are reserved for dynamically loaded syscalls
 ;
-210	UNIMPL
+210	EXTERN	MODULAR { int|sys||afssys(long id, long a1, long a2, \
+			  long a3, long a4, long a5, long a6); }
 211	UNIMPL
 212	UNIMPL
 213	UNIMPL



CVS commit: src/sys/kern

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 19:44:02 UTC 2012

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

Log Message:
use sy_call() so that l-l_sysent gets set, so that we can autoload modules
that define new syscalls properly.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/sys_syscall.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_syscall.c
diff -u src/sys/kern/sys_syscall.c:1.9 src/sys/kern/sys_syscall.c:1.10
--- src/sys/kern/sys_syscall.c:1.9	Tue Apr 29 02:53:03 2008
+++ src/sys/kern/sys_syscall.c	Sat May  5 15:44:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_syscall.c,v 1.9 2008/04/29 06:53:03 martin Exp $	*/
+/*	$NetBSD: sys_syscall.c,v 1.10 2012/05/05 19:44:02 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,9 +30,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_syscall.c,v 1.9 2008/04/29 06:53:03 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_syscall.c,v 1.10 2012/05/05 19:44:02 christos Exp $);
 
 #include sys/syscall_stats.h
+#include sys/syscallvar.h
 
 /*
  * MI indirect system call support.
@@ -74,7 +75,7 @@ SYS_SYSCALL(struct lwp *l, const struct 
 		return ENOSYS;
 
 	if (__predict_true(!p-p_trace_enabled))
-		return callp-sy_call(l, uap-args, rval);
+		return sy_call(callp, l, uap-args, rval);
 
 	narg = callp-sy_narg;
 #ifdef NETBSD32_SYSCALL
@@ -85,7 +86,7 @@ SYS_SYSCALL(struct lwp *l, const struct 
 	error = trace_enter(code, TRACE_ARGS, narg);
 	if (__predict_false(error != 0))
 		return error;
-	error = callp-sy_call(l, uap-args, rval);
+	error = sy_call(callp, l, uap-args, rval);
 	trace_exit(code, rval, error);
 	return error;
 



CVS commit: src/sys

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 19:49:13 UTC 2012

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.255 -r1.256 src/sys/kern/syscalls.c
cvs rdiff -u -r1.251 -r1.252 src/sys/sys/syscall.h
cvs rdiff -u -r1.234 -r1.235 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.264 src/sys/kern/init_sysent.c:1.265
--- src/sys/kern/init_sysent.c:1.264	Thu Mar  8 16:59:30 2012
+++ src/sys/kern/init_sysent.c	Sat May  5 15:49:13 2012
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.264 2012/03/08 21:59:30 joerg Exp $ */
+/* $NetBSD: init_sysent.c,v 1.265 2012/05/05 19:49:13 christos Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
+ * created from	NetBSD: syscalls.master,v 1.259 2012/05/05 19:37:37 christos Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.264 2012/03/08 21:59:30 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.265 2012/05/05 19:49:13 christos Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h
@@ -550,8 +550,8 @@ struct sysent sysent[] = {
 	(sy_call_t *)sys_reboot },		/* 208 = reboot */
 	{ ns(struct sys_poll_args), 0,
 	(sy_call_t *)sys_poll },		/* 209 = poll */
-	{ 0, 0, 0,
-	sys_nosys },			/* 210 = unimplemented */
+	{ ns(struct sys_afssys_args), 0,
+	(sy_call_t *)sys_nomodule },	/* 210 = afssys */
 	{ 0, 0, 0,
 	sys_nosys },			/* 211 = unimplemented */
 	{ 0, 0, 0,

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.255 src/sys/kern/syscalls.c:1.256
--- src/sys/kern/syscalls.c:1.255	Thu Mar  8 16:59:30 2012
+++ src/sys/kern/syscalls.c	Sat May  5 15:49:13 2012
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.255 2012/03/08 21:59:30 joerg Exp $ */
+/* $NetBSD: syscalls.c,v 1.256 2012/05/05 19:49:13 christos Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
+ * created from	NetBSD: syscalls.master,v 1.259 2012/05/05 19:37:37 christos Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.255 2012/03/08 21:59:30 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.256 2012/05/05 19:49:13 christos Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_modular.h
@@ -250,7 +250,7 @@ const char *const syscallnames[] = {
 	/* 207 */	getpgid,
 	/* 208 */	reboot,
 	/* 209 */	poll,
-	/* 210 */	#210 (unimplemented),
+	/* 210 */	afssys,
 	/* 211 */	#211 (unimplemented),
 	/* 212 */	#212 (unimplemented),
 	/* 213 */	#213 (unimplemented),

Index: src/sys/sys/syscall.h
diff -u src/sys/sys/syscall.h:1.251 src/sys/sys/syscall.h:1.252
--- src/sys/sys/syscall.h:1.251	Thu Mar  8 16:59:31 2012
+++ src/sys/sys/syscall.h	Sat May  5 15:49:13 2012
@@ -1,10 +1,10 @@
-/* $NetBSD: syscall.h,v 1.251 2012/03/08 21:59:31 joerg Exp $ */
+/* $NetBSD: syscall.h,v 1.252 2012/05/05 19:49:13 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
+ * created from	NetBSD: syscalls.master,v 1.259 2012/05/05 19:37:37 christos Exp
  */
 
 #ifndef _SYS_SYSCALL_H_
@@ -589,6 +589,9 @@
 /* syscall: poll ret: int args: struct pollfd * u_int int */
 #define	SYS_poll	209
 
+/* syscall: afssys ret: int args: long long long long long long long */
+#define	SYS_afssys	210
+
 #if defined(SYSVSEM) || !defined(_KERNEL_OPT)
 /* syscall: compat_14___semctl ret: int args: int int int union __semun * */
 #define	SYS_compat_14___semctl	220

Index: src/sys/sys/syscallargs.h
diff -u src/sys/sys/syscallargs.h:1.234 src/sys/sys/syscallargs.h:1.235
--- src/sys/sys/syscallargs.h:1.234	Thu Mar  8 16:59:32 2012
+++ src/sys/sys/syscallargs.h	Sat May  5 15:49:13 2012
@@ -1,10 +1,10 @@
-/* $NetBSD: syscallargs.h,v 1.234 2012/03/08 21:59:32 joerg Exp $ */
+/* $NetBSD: syscallargs.h,v 1.235 2012/05/05 19:49:13 christos Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
+ * created from	NetBSD: syscalls.master,v 1.259 2012/05/05 19:37:37 christos Exp
  */
 
 #ifndef _SYS_SYSCALLARGS_H_
@@ -1121,6 +1121,17 @@ struct sys_poll_args {
 	syscallarg(int) timeout;
 };
 check_syscall_args(sys_poll)
+
+struct sys_afssys_args {
+	syscallarg(long) id;
+	syscallarg(long) a1;
+	syscallarg(long) a2;
+	syscallarg(long) a3;
+	syscallarg(long) a4;
+	syscallarg(long) a5;
+	

CVS commit: src/sys/uvm

2012-05-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat May  5 20:45:35 UTC 2012

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

Log Message:
Describe PG_ flags (for struct vm_page).  Reviewed by yamt@.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/uvm/uvm_page.h

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

Modified files:

Index: src/sys/uvm/uvm_page.h
diff -u src/sys/uvm/uvm_page.h:1.74 src/sys/uvm/uvm_page.h:1.75
--- src/sys/uvm/uvm_page.h:1.74	Sat Jan 28 19:12:10 2012
+++ src/sys/uvm/uvm_page.h	Sat May  5 20:45:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.h,v 1.74 2012/01/28 19:12:10 rmind Exp $	*/
+/*	$NetBSD: uvm_page.h,v 1.75 2012/05/05 20:45:35 rmind Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -145,30 +145,74 @@ struct vm_page {
 };
 
 /*
- * These are the flags defined for vm_page.
- */
-
-/*
- * locking rules:
- *   PG_ == locked by object lock
- *   PQ_ == lock by page queue lock
- *   PQ_FREE is locked by free queue lock and is mutex with all other PQs
- *
- * PG_ZERO is used to indicate that a page has been pre-zero'd.  This flag
- * is only set when the page is on no queues, and is cleared when the page
- * is placed on the free list.
- */
-
-#define	PG_BUSY		0x0001		/* page is locked */
-#define	PG_WANTED	0x0002		/* someone is waiting for page */
-#define	PG_TABLED	0x0004		/* page is in VP table  */
-#define	PG_CLEAN	0x0008		/* page has not been modified */
-#define	PG_PAGEOUT	0x0010		/* page to be freed for pagedaemon */
-#define PG_RELEASED	0x0020		/* page to be freed when unbusied */
-#define	PG_FAKE		0x0040		/* page is not yet initialized */
-#define	PG_RDONLY	0x0080		/* page must be mapped read-only */
-#define	PG_ZERO		0x0100		/* page is pre-zero'd */
-#define	PG_MARKER	0x0200		/* dummy marker page */
+ * Overview of UVM page flags.
+ *
+ * Locking notes:
+ *
+ * PG_, struct vm_page::flags	= locked by the owner
+ * PQ_, struct vm_page::pqflags	= locked by the page-queue lock
+ * PQ_FREE			= additionally locked by free-queue lock
+ *
+ * Flag descriptions:
+ *
+ * PG_BUSY:
+ *	Page is long-term locked, usually because of I/O (transfer from the
+ *	page memory to the backing store) is in progress.  LWP attempting
+ *	to access the page shall set PG_WANTED and wait.
+ *
+ * PG_WANTED:
+ *	Indicates that the page, which is currently PG_BUSY, is wanted by
+ *	some other LWP.  The page owner (i.e. LWP which set PG_BUSY) is
+ *	responsible to clear both flags and wake up any waiters once it has
+ *	released the long-term lock (PG_BUSY).
+ *
+ * PG_RELEASED:
+ *	Indicates that the page, which is currently PG_BUSY, should be freed
+ *	after the release of long-term lock.  It is responsibility of the
+ *	owning LWP (i.e. which set PG_BUSY) to do it.
+ *
+ * PG_CLEAN:
+ *	Page has not been modified since it was loaded from the backing
+ *	store.  If this flag is not set, page is considered dirty.
+ *	XXX: Currently it means that the page *might* be clean; will be
+ *	fixed with yamt-pagecache merge.
+ *
+ * PG_FAKE:
+ *	Page has been allocated, but not yet initialised.  The flag is used
+ *	to avoid overwriting of valid data, e.g. to prevent read from the
+ *	backing store when in-core data is newer.
+ *
+ * PG_TABLED:
+ *	Indicates that the page is currently in the object's offset queue,
+ *	and that it should be removed from it once the page is freed.  Used
+ *	diagnostic purposes.
+ *
+ * PG_PAGEOUT:
+ *	Indicates that the page is being paged-out in preparation for
+ *	being freed.
+ *
+ * PG_RDONLY:
+ *	Indicates that the page must be mapped read-only.
+ *
+ * PG_ZERO:
+ *	Indicates that the page has been pre-zeroed.  This flag is only
+ *	set when the page is not in the queues and is cleared when the
+ *	page is placed on the free list.
+ *
+ * PG_MARKER:
+ *	Dummy marker page.
+ */
+
+#define	PG_BUSY		0x0001
+#define	PG_WANTED	0x0002
+#define	PG_TABLED	0x0004
+#define	PG_CLEAN	0x0008
+#define	PG_PAGEOUT	0x0010
+#define	PG_RELEASED	0x0020
+#define	PG_FAKE		0x0040
+#define	PG_RDONLY	0x0080
+#define	PG_ZERO		0x0100
+#define	PG_MARKER	0x0200
 
 #define PG_PAGER1	0x1000		/* pager-specific flag */
 



CVS commit: src/usr.bin/find

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 20:48:51 UTC 2012

Modified Files:
src/usr.bin/find: function.c

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/find/function.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/find/function.c
diff -u src/usr.bin/find/function.c:1.68 src/usr.bin/find/function.c:1.69
--- src/usr.bin/find/function.c:1.68	Tue Mar 20 20:34:57 2012
+++ src/usr.bin/find/function.c	Sat May  5 20:48:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: function.c,v 1.68 2012/03/20 20:34:57 matt Exp $	*/
+/*	$NetBSD: function.c,v 1.69 2012/05/05 20:48:51 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = from: @(#)function.c	8.10 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: function.c,v 1.68 2012/03/20 20:34:57 matt Exp $);
+__RCSID($NetBSD: function.c,v 1.69 2012/05/05 20:48:51 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -638,7 +638,7 @@ c_exec(char ***argvp, int isok)
 
 	/*
 	 * Terminate if we encounter an arg exacty equal to ;, or an
-	 * arg exacty equal to + following an arg exacty equal to
+	 * arg exacty equal to + following an arg exactly equal to
 	 * {}.
 	 */
 	for (ap = argv = *argvp, brace = 0;; ++ap) {



CVS commit: src/sbin/dump

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 21:03:03 UTC 2012

Modified Files:
src/sbin/dump: dump.h

Log Message:
remove ancient crap


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sbin/dump/dump.h

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

Modified files:

Index: src/sbin/dump/dump.h
diff -u src/sbin/dump/dump.h:1.46 src/sbin/dump/dump.h:1.47
--- src/sbin/dump/dump.h:1.46	Thu Feb 25 21:11:40 2010
+++ src/sbin/dump/dump.h	Sat May  5 17:03:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: dump.h,v 1.46 2010/02/26 02:11:40 christos Exp $	*/
+/*	$NetBSD: dump.h,v 1.47 2012/05/05 21:03:02 christos Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1993
@@ -282,18 +282,6 @@ void	putdumptime(void);
 
 void	sig(int signo);
 
-/*
- * Compatibility with old systems.
- */
-#ifdef COMPAT
-#include sys/file.h
-#define	strchr(a,b)	index(a,b)
-#define	strrchr(a,b)	rindex(a,b)
-extern char *strdup(), *ctime();
-extern int read(), write();
-extern int errno;
-#endif
-
 #ifndef	_PATH_FSTAB
 #define	_PATH_FSTAB	/etc/fstab
 #endif



CVS commit: src/lib/libc/string

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 21:14:55 UTC 2012

Modified Files:
src/lib/libc/string: index.3 rindex.3

Log Message:
Describe these as obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/string/index.3
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/string/rindex.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/string/index.3
diff -u src/lib/libc/string/index.3:1.13 src/lib/libc/string/index.3:1.14
--- src/lib/libc/string/index.3:1.13	Thu Apr 29 06:54:26 2010
+++ src/lib/libc/string/index.3	Sat May  5 21:14:55 2012
@@ -28,7 +28,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)index.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: index.3,v 1.13 2010/04/29 06:54:26 jruoho Exp $
+.\	$NetBSD: index.3,v 1.14 2012/05/05 21:14:55 dholland Exp $
 .\
 .Dd April 29, 2010
 .Dt INDEX 3
@@ -52,6 +52,11 @@ locates the first character matching
 .Em char )
 in the nul-terminated string
 .Fa s .
+.Pp
+This function is obsolete.
+The equivalent function
+.Xr strchr 3
+should be used instead.
 .Sh RETURN VALUES
 A pointer to the character is returned if it is found; otherwise
 .Dv NULL

Index: src/lib/libc/string/rindex.3
diff -u src/lib/libc/string/rindex.3:1.12 src/lib/libc/string/rindex.3:1.13
--- src/lib/libc/string/rindex.3:1.12	Thu Apr 29 06:54:26 2010
+++ src/lib/libc/string/rindex.3	Sat May  5 21:14:55 2012
@@ -28,7 +28,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)rindex.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: rindex.3,v 1.12 2010/04/29 06:54:26 jruoho Exp $
+.\	$NetBSD: rindex.3,v 1.13 2012/05/05 21:14:55 dholland Exp $
 .\
 .Dd April 29, 2010
 .Dt RINDEX 3
@@ -53,6 +53,11 @@ matching
 .Em char )
 in the nul-terminated string
 .Fa s .
+.Pp
+This function is obsolete.
+The equivalent function
+.Xr strrchr 3
+should be used instead.
 .Sh RETURN VALUES
 A pointer to the character is returned if it is found; otherwise
 .Dv NULL



CVS commit: src/usr.bin/find

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 21:16:16 UTC 2012

Modified Files:
src/usr.bin/find: function.c

Log Message:
rest of previous.
BQS: 1. dholland: 0.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/usr.bin/find/function.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/find/function.c
diff -u src/usr.bin/find/function.c:1.69 src/usr.bin/find/function.c:1.70
--- src/usr.bin/find/function.c:1.69	Sat May  5 20:48:51 2012
+++ src/usr.bin/find/function.c	Sat May  5 21:16:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: function.c,v 1.69 2012/05/05 20:48:51 dholland Exp $	*/
+/*	$NetBSD: function.c,v 1.70 2012/05/05 21:16:16 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = from: @(#)function.c	8.10 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: function.c,v 1.69 2012/05/05 20:48:51 dholland Exp $);
+__RCSID($NetBSD: function.c,v 1.70 2012/05/05 21:16:16 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -637,8 +637,8 @@ c_exec(char ***argvp, int isok)
 		new-flags |= F_NEEDOK;
 
 	/*
-	 * Terminate if we encounter an arg exacty equal to ;, or an
-	 * arg exacty equal to + following an arg exactly equal to
+	 * Terminate if we encounter an arg exactly equal to ;, or an
+	 * arg exactly equal to + following an arg exactly equal to
 	 * {}.
 	 */
 	for (ap = argv = *argvp, brace = 0;; ++ap) {



CVS commit: src/lib/libc/string

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 21:18:43 UTC 2012

Modified Files:
src/lib/libc/string: index.3 rindex.3

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/string/index.3
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/string/rindex.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/string/index.3
diff -u src/lib/libc/string/index.3:1.14 src/lib/libc/string/index.3:1.15
--- src/lib/libc/string/index.3:1.14	Sat May  5 21:14:55 2012
+++ src/lib/libc/string/index.3	Sat May  5 21:18:43 2012
@@ -28,9 +28,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)index.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: index.3,v 1.14 2012/05/05 21:14:55 dholland Exp $
+.\	$NetBSD: index.3,v 1.15 2012/05/05 21:18:43 dholland Exp $
 .\
-.Dd April 29, 2010
+.Dd May 5, 2012
 .Dt INDEX 3
 .Os
 .Sh NAME

Index: src/lib/libc/string/rindex.3
diff -u src/lib/libc/string/rindex.3:1.13 src/lib/libc/string/rindex.3:1.14
--- src/lib/libc/string/rindex.3:1.13	Sat May  5 21:14:55 2012
+++ src/lib/libc/string/rindex.3	Sat May  5 21:18:43 2012
@@ -28,9 +28,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)rindex.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: rindex.3,v 1.13 2012/05/05 21:14:55 dholland Exp $
+.\	$NetBSD: rindex.3,v 1.14 2012/05/05 21:18:43 dholland Exp $
 .\
-.Dd April 29, 2010
+.Dd May 5, 2012
 .Dt RINDEX 3
 .Os
 .Sh NAME



CVS commit: src/lib/libc/string

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 21:24:19 UTC 2012

Modified Files:
src/lib/libc/string: bcmp.3 bcopy.3

Log Message:
Mark these obsolete as well.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/string/bcmp.3 \
src/lib/libc/string/bcopy.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/string/bcmp.3
diff -u src/lib/libc/string/bcmp.3:1.13 src/lib/libc/string/bcmp.3:1.14
--- src/lib/libc/string/bcmp.3:1.13	Thu Apr 29 06:54:26 2010
+++ src/lib/libc/string/bcmp.3	Sat May  5 21:24:19 2012
@@ -28,9 +28,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)bcmp.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: bcmp.3,v 1.13 2010/04/29 06:54:26 jruoho Exp $
+.\	$NetBSD: bcmp.3,v 1.14 2012/05/05 21:24:19 dholland Exp $
 .\
-.Dd April 29, 2010
+.Dd May 5, 2012
 .Dt BCMP 3
 .Os
 .Sh NAME
@@ -57,6 +57,11 @@ bytes long.
 Zero-length strings are always identical.
 .Pp
 The strings may overlap.
+.Pp
+This function is obsolete.
+The equivalent function
+.Xr memcmp 3
+should be used instead.
 .Sh SEE ALSO
 .Xr memcmp 3 ,
 .Xr strcasecmp 3 ,
Index: src/lib/libc/string/bcopy.3
diff -u src/lib/libc/string/bcopy.3:1.13 src/lib/libc/string/bcopy.3:1.14
--- src/lib/libc/string/bcopy.3:1.13	Thu Apr 29 07:27:30 2010
+++ src/lib/libc/string/bcopy.3	Sat May  5 21:24:19 2012
@@ -29,9 +29,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)bcopy.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: bcopy.3,v 1.13 2010/04/29 07:27:30 wiz Exp $
+.\	$NetBSD: bcopy.3,v 1.14 2012/05/05 21:24:19 dholland Exp $
 .\
-.Dd April 29, 2010
+.Dd May 5, 2012
 .Dt BCOPY 3
 .Os
 .Sh NAME
@@ -57,6 +57,20 @@ The two strings may overlap.
 If
 .Fa len
 is zero, no bytes are copied.
+.Pp
+This function is obsolete.
+The functions
+.Xr memcpy 3
+and/or
+.Xr memmove 3
+should be used instead.
+Note that
+.Fn bcopy
+takes its
+.Fa src
+and
+.Fa dst
+arguments in the opposite order from these.
 .Sh SEE ALSO
 .Xr memccpy 3 ,
 .Xr memcpy 3 ,



CVS commit: src/include

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 22:07:58 UTC 2012

Modified Files:
src/include: math.h

Log Message:
oops, forgot to commit: add tgamma and tgammaf


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/include/math.h

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

Modified files:

Index: src/include/math.h
diff -u src/include/math.h:1.57 src/include/math.h:1.58
--- src/include/math.h:1.57	Sun Feb  5 12:57:17 2012
+++ src/include/math.h	Sat May  5 18:07:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.57 2012/02/05 17:57:17 matt Exp $	*/
+/*	$NetBSD: math.h,v 1.58 2012/05/05 22:07:57 christos Exp $	*/
 
 /*
  * 
@@ -321,6 +321,8 @@ float	sqrtf(float);
 float	erff(float);
 float	erfcf(float);
 float	lgammaf(float);
+float	tgammaf(float);
+double	tgamma(double);
 
 /* 7.12.9 nearest integer */
 



CVS commit: src/sys/net/npf

2012-05-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun May  6 02:45:25 UTC 2012

Modified Files:
src/sys/net/npf: npf_handler.c npf_impl.h npf_sendpkt.c

Log Message:
- Fix double-free case on ICMP return case.
- npf_pfil_register: handle kernels without INET6 option correctly.
- Reduce some #ifdefs.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.13 -r1.14 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.9 -r1.10 src/sys/net/npf/npf_sendpkt.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/net/npf/npf_handler.c
diff -u src/sys/net/npf/npf_handler.c:1.15 src/sys/net/npf/npf_handler.c:1.16
--- src/sys/net/npf/npf_handler.c:1.15	Sun Mar 11 18:27:59 2012
+++ src/sys/net/npf/npf_handler.c	Sun May  6 02:45:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_handler.c,v 1.15 2012/03/11 18:27:59 rmind Exp $	*/
+/*	$NetBSD: npf_handler.c,v 1.16 2012/05/06 02:45:25 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_handler.c,v 1.15 2012/03/11 18:27:59 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_handler.c,v 1.16 2012/05/06 02:45:25 rmind Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -236,17 +236,20 @@ out:
 	 * Depending on the flags and protocol, return TCP reset (RST) or
 	 * ICMP destination unreachable.
 	 */
-	if (retfl) {
-		npf_return_block(npc, nbuf, retfl);
+	if (retfl  npf_return_block(npc, nbuf, retfl)) {
+		*mp = NULL;
 	}
+
 	if (error) {
 		npf_stats_inc(NPF_STAT_ERROR);
 	} else {
 		error = ENETUNREACH;
 	}
-	m_freem(*mp);
-	*mp = NULL;
 
+	if (*mp) {
+		m_freem(*mp);
+		*mp = NULL;
+	}
 	return error;
 }
 
@@ -271,7 +274,7 @@ npf_pfil_register(void)
 	npf_ph_if = pfil_head_get(PFIL_TYPE_IFNET, 0);
 	npf_ph_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
 	npf_ph_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6);
-	if (npf_ph_if == NULL || npf_ph_inet == NULL || npf_ph_inet6 == NULL) {
+	if (!npf_ph_if || (!npf_ph_inet  !npf_ph_inet6)) {
 		npf_ph_if = NULL;
 		error = ENOENT;
 		goto fail;
@@ -283,13 +286,16 @@ npf_pfil_register(void)
 	KASSERT(error == 0);
 
 	/* Packet IN/OUT handler on all interfaces and IP layer. */
-	error = pfil_add_hook(npf_packet_handler, NULL,
-	PFIL_WAITOK | PFIL_ALL, npf_ph_inet);
-	KASSERT(error == 0);
-
-	error = pfil_add_hook(npf_packet_handler, NULL,
-	PFIL_WAITOK | PFIL_ALL, npf_ph_inet6);
-	KASSERT(error == 0);
+	if (npf_ph_inet) {
+		error = pfil_add_hook(npf_packet_handler, NULL,
+		PFIL_WAITOK | PFIL_ALL, npf_ph_inet);
+		KASSERT(error == 0);
+	}
+	if (npf_ph_inet6) {
+		error = pfil_add_hook(npf_packet_handler, NULL,
+		PFIL_WAITOK | PFIL_ALL, npf_ph_inet6);
+		KASSERT(error == 0);
+	}
 fail:
 	KERNEL_UNLOCK_ONE(NULL);
 	mutex_exit(softnet_lock);
@@ -308,15 +314,19 @@ npf_pfil_unregister(void)
 	KERNEL_LOCK(1, NULL);
 
 	if (npf_ph_if) {
-		(void)pfil_remove_hook(npf_packet_handler, NULL,
-		PFIL_ALL, npf_ph_inet6);
-		(void)pfil_remove_hook(npf_packet_handler, NULL,
-		PFIL_ALL, npf_ph_inet);
 		(void)pfil_remove_hook(npf_ifhook, NULL,
 		PFIL_IFADDR | PFIL_IFNET, npf_ph_if);
-
-		npf_ph_if = NULL;
 	}
+	if (npf_ph_inet) {
+		(void)pfil_remove_hook(npf_packet_handler, NULL,
+		PFIL_ALL, npf_ph_inet);
+	}
+	if (npf_ph_inet6) {
+		(void)pfil_remove_hook(npf_packet_handler, NULL,
+		PFIL_ALL, npf_ph_inet6);
+	}
+
+	npf_ph_if = NULL;
 
 	KERNEL_UNLOCK_ONE(NULL);
 	mutex_exit(softnet_lock);

Index: src/sys/net/npf/npf_impl.h
diff -u src/sys/net/npf/npf_impl.h:1.13 src/sys/net/npf/npf_impl.h:1.14
--- src/sys/net/npf/npf_impl.h:1.13	Sat Apr 14 19:01:21 2012
+++ src/sys/net/npf/npf_impl.h	Sun May  6 02:45:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_impl.h,v 1.13 2012/04/14 19:01:21 rmind Exp $	*/
+/*	$NetBSD: npf_impl.h,v 1.14 2012/05/06 02:45:25 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -173,7 +173,7 @@ int		npf_tcpsaw(npf_cache_t *, tcp_seq *
 bool		npf_fetch_tcpopts(const npf_cache_t *, nbuf_t *,
 		uint16_t *, int *);
 bool		npf_normalize(npf_cache_t *, nbuf_t *, bool, bool, u_int, u_int);
-void		npf_return_block(npf_cache_t *, nbuf_t *, const int);
+bool		npf_return_block(npf_cache_t *, nbuf_t *, const int);
 
 /* Complex instructions. */
 int		npf_match_ether(nbuf_t *, int, int, uint16_t, uint32_t *);

Index: src/sys/net/npf/npf_sendpkt.c
diff -u src/sys/net/npf/npf_sendpkt.c:1.9 src/sys/net/npf/npf_sendpkt.c:1.10
--- src/sys/net/npf/npf_sendpkt.c:1.9	Mon Feb 20 00:18:20 2012
+++ src/sys/net/npf/npf_sendpkt.c	Sun May  6 02:45:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_sendpkt.c,v 1.9 2012/02/20 00:18:20 rmind Exp $	*/
+/*	$NetBSD: npf_sendpkt.c,v 1.10 2012/05/06 02:45:25 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2010-2011 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: 

CVS commit: src/sys/miscfs/procfs

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun May  6 03:13:11 UTC 2012

Modified Files:
src/sys/miscfs/procfs: procfs_map.c

Log Message:
- match format with the linux map printing
- fix PK_32 map printing for linux processes
should fix 32 bit java stack guard setting.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/miscfs/procfs/procfs_map.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/miscfs/procfs/procfs_map.c
diff -u src/sys/miscfs/procfs/procfs_map.c:1.41 src/sys/miscfs/procfs/procfs_map.c:1.42
--- src/sys/miscfs/procfs/procfs_map.c:1.41	Sun Oct 16 08:26:16 2011
+++ src/sys/miscfs/procfs/procfs_map.c	Sat May  5 23:13:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_map.c,v 1.41 2011/10/16 12:26:16 hannken Exp $	*/
+/*	$NetBSD: procfs_map.c,v 1.42 2012/05/06 03:13:11 christos Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_map.c,v 1.41 2011/10/16 12:26:16 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_map.c,v 1.42 2012/05/06 03:13:11 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -120,6 +120,8 @@ procfs_domap(struct lwp *curl, struct pr
 	dev_t dev;
 	long fileid;
 	size_t pos;
+	int width = (int)((curl-l_proc-p_flag  PK_32) ? sizeof(int32_t) : 
+	sizeof(void *)) * 2;
 
 	if (uio-uio_rw != UIO_READ)
 		return EOPNOTSUPP;
@@ -173,18 +175,17 @@ again:
 }
 			}
 			pos += snprintf(buffer + pos, bufsize - pos,
-			%#0*PRIxVADDR-%#0*PRIxVADDR %c%c%c%c 
-			%0*lx %llx:%llx %ld %s\n,
-			(int)sizeof(void *) * 2,entry-start,
-			(int)sizeof(void *) * 2,entry-end,
+			%.*PRIxVADDR-%.*PRIxVADDR %c%c%c%c 
+			%.*lx %.2llx:%.2llx %-8ld %25.s %s\n,
+			width, entry-start,
+			width, entry-end,
 			(entry-protection  VM_PROT_READ) ? 'r' : '-',
 			(entry-protection  VM_PROT_WRITE) ? 'w' : '-',
 			(entry-protection  VM_PROT_EXECUTE) ? 'x' : '-',
 			(entry-etype  UVM_ET_COPYONWRITE) ? 'p' : 's',
-			(int)sizeof(void *) * 2,
-			(unsigned long)entry-offset,
+			width, (unsigned long)entry-offset,
 			(unsigned long long)major(dev),
-			(unsigned long long)minor(dev), fileid, path);
+			(unsigned long long)minor(dev), fileid, , path);
 		} else {
 			pos += snprintf(buffer + pos, bufsize - pos,
 			%#PRIxVADDR %#PRIxVADDR 



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

2012-05-05 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat May  5 13:47:07 UTC 2012

Modified Files:
src/sys/arch/sun3/conf: files.sun3

Log Message:
make sure opt_sunkbd.h exists


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/sun3/conf/files.sun3

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



CVS commit: src/lib/libossaudio

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 15:04:58 UTC 2012

Modified Files:
src/lib/libossaudio: soundcard.h

Log Message:
avoid using cpp variadic macros and explain why.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libossaudio/soundcard.h

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



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

2012-05-05 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sat May  5 15:08:29 UTC 2012

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Add latest CR4 bits:
- CR4_VMXE: VMX operations, used for hardware virtualization.
- CR4_SMXE: SMX operations, used for safer Mode Extensions (ground for
Intel's TXT - Trusted Execution Technology - platform).
- CR4_FSGSBASE: enable *FSBASE and *GSBASE instructions, for R/W access
to FS/GS segment base addresses.
- CR4_PCIDE: enable Process Context IDentifiers (other architectures may call
 these address space identifiers).
- CR4_OSXSAVE: enable xsave and xrestore instructions
- CR4_SMEP: Supervisor Mode Execution Prevention. Allows enforcing --x rights
from cpl 0.

From Intel® 64 and IA-32 Architectures Software Developer’s Manual,
March 2012.

Align declarations.

CPUID_* bits for these features follow.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/x86/include/specialreg.h

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



CVS commit: src/lib/libossaudio

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 15:57:45 UTC 2012

Modified Files:
src/lib/libossaudio: Makefile ossaudio.c soundcard.h

Log Message:
fix typo, WARNS=5


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libossaudio/Makefile
cvs rdiff -u -r1.27 -r1.28 src/lib/libossaudio/ossaudio.c
cvs rdiff -u -r1.21 -r1.22 src/lib/libossaudio/soundcard.h

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



CVS commit: src

2012-05-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat May  5 16:03:55 UTC 2012

Modified Files:
src/sbin/fdisk: Makefile fdisk.c
src/tools/fdisk: Makefile

Log Message:
Don't use #if defined(__i386__) || defined(__x86_64__) conditionals
in C source file to define option features.
Define proper options in each Makefile per ${MACHINE_ARCH} variable instead.

Previously if a host is x86 and it has /usr/mdec/mbr file in its system,
tools fdisk implicitly installs it as mbr bootcode even for !x86 targets.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sbin/fdisk/Makefile
cvs rdiff -u -r1.140 -r1.141 src/sbin/fdisk/fdisk.c
cvs rdiff -u -r1.4 -r1.5 src/tools/fdisk/Makefile

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



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

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 17:52:29 UTC 2012

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

Log Message:
add tgamma{,f}


To generate a diff of this commit:
cvs rdiff -u -r1.1755 -r1.1756 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.



CVS commit: src/lib/libm

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 17:54:14 UTC 2012

Modified Files:
src/lib/libm: Makefile
src/lib/libm/man: lgamma.3
src/lib/libm/src: math_private.h
Added Files:
src/lib/libm/src: b_exp.c b_log.c b_tgamma.c s_tgammaf.c

Log Message:
Add tgamma{,f} from FreeBSD via  rudolf, netbsd at eq dot cz


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/lib/libm/Makefile
cvs rdiff -u -r1.21 -r1.22 src/lib/libm/man/lgamma.3
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/b_exp.c src/lib/libm/src/b_log.c \
src/lib/libm/src/b_tgamma.c src/lib/libm/src/s_tgammaf.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libm/src/math_private.h

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



CVS commit: src/sys

2012-05-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat May  5 19:15:11 UTC 2012

Modified Files:
src/sys/conf: files
src/sys/kern: subr_pool.c
src/sys/sys: pool.h

Log Message:
G/C POOL_DIAGNOSTIC option.  No objection on tech-kern@.


To generate a diff of this commit:
cvs rdiff -u -r1.1048 -r1.1049 src/sys/conf/files
cvs rdiff -u -r1.194 -r1.195 src/sys/kern/subr_pool.c
cvs rdiff -u -r1.73 -r1.74 src/sys/sys/pool.h

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



CVS commit: src/sys/kern

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 19:37:37 UTC 2012

Modified Files:
src/sys/kern: kern_syscall.c makesyscalls.sh syscalls.master

Log Message:
Add a new type of syscall EXTERN which is meant for modules that live
outside the tree (in pkgsrc). Use it to define afssys (210) which has
been reserved for years, and make it autoload the openafs module.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/kern_syscall.c
cvs rdiff -u -r1.119 -r1.120 src/sys/kern/makesyscalls.sh
cvs rdiff -u -r1.258 -r1.259 src/sys/kern/syscalls.master

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



CVS commit: src/sys/kern

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 19:44:02 UTC 2012

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

Log Message:
use sy_call() so that l-l_sysent gets set, so that we can autoload modules
that define new syscalls properly.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/sys_syscall.c

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



CVS commit: src/sys

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 19:49:13 UTC 2012

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.255 -r1.256 src/sys/kern/syscalls.c
cvs rdiff -u -r1.251 -r1.252 src/sys/sys/syscall.h
cvs rdiff -u -r1.234 -r1.235 src/sys/sys/syscallargs.h

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



CVS commit: src/sys/uvm

2012-05-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat May  5 20:45:35 UTC 2012

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

Log Message:
Describe PG_ flags (for struct vm_page).  Reviewed by yamt@.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/uvm/uvm_page.h

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



CVS commit: src/usr.bin/find

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 20:48:51 UTC 2012

Modified Files:
src/usr.bin/find: function.c

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/find/function.c

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



CVS commit: src/sbin/dump

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 21:03:03 UTC 2012

Modified Files:
src/sbin/dump: dump.h

Log Message:
remove ancient crap


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sbin/dump/dump.h

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



CVS commit: src/lib/libc/string

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 21:14:55 UTC 2012

Modified Files:
src/lib/libc/string: index.3 rindex.3

Log Message:
Describe these as obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/string/index.3
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/string/rindex.3

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



CVS commit: src/usr.bin/find

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 21:16:16 UTC 2012

Modified Files:
src/usr.bin/find: function.c

Log Message:
rest of previous.
BQS: 1. dholland: 0.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/usr.bin/find/function.c

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



CVS commit: src/lib/libc/string

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 21:18:43 UTC 2012

Modified Files:
src/lib/libc/string: index.3 rindex.3

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/string/index.3
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/string/rindex.3

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



CVS commit: src/lib/libc/string

2012-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  5 21:24:19 UTC 2012

Modified Files:
src/lib/libc/string: bcmp.3 bcopy.3

Log Message:
Mark these obsolete as well.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/string/bcmp.3 \
src/lib/libc/string/bcopy.3

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



CVS commit: src/include

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  5 22:07:58 UTC 2012

Modified Files:
src/include: math.h

Log Message:
oops, forgot to commit: add tgamma and tgammaf


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/include/math.h

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



CVS commit: src/sys/net/npf

2012-05-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun May  6 02:45:25 UTC 2012

Modified Files:
src/sys/net/npf: npf_handler.c npf_impl.h npf_sendpkt.c

Log Message:
- Fix double-free case on ICMP return case.
- npf_pfil_register: handle kernels without INET6 option correctly.
- Reduce some #ifdefs.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.13 -r1.14 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.9 -r1.10 src/sys/net/npf/npf_sendpkt.c

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



CVS commit: src/sys/miscfs/procfs

2012-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun May  6 03:13:11 UTC 2012

Modified Files:
src/sys/miscfs/procfs: procfs_map.c

Log Message:
- match format with the linux map printing
- fix PK_32 map printing for linux processes
should fix 32 bit java stack guard setting.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/miscfs/procfs/procfs_map.c

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