CVS commit: src/gnu/lib/libgcc4/libgcov

2009-12-18 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 18 12:48:16 UTC 2009

Modified Files:
src/gnu/lib/libgcc4/libgcov: Makefile

Log Message:
Fix a misplaced conditional I made.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/gnu/lib/libgcc4/libgcov/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/lib/libgcc4/libgcov/Makefile
diff -u src/gnu/lib/libgcc4/libgcov/Makefile:1.7 src/gnu/lib/libgcc4/libgcov/Makefile:1.8
--- src/gnu/lib/libgcc4/libgcov/Makefile:1.7	Wed Dec  9 17:30:14 2009
+++ src/gnu/lib/libgcc4/libgcov/Makefile	Fri Dec 18 12:48:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2009/12/09 17:30:14 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.8 2009/12/18 12:48:16 uebayasi Exp $
 
 REQUIRETOOLS=	yes
 NOPIC=		# defined
@@ -9,7 +9,7 @@
 
 .include bsd.own.mk
 
-.if !defined(MKNATIVE_LIBGCC_NEW)  ${MKGCC} != no
+.if ${MKGCC} != no
 
 .include ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
 



CVS commit: src/gnu/lib/libgcc4/arch/mips64eb

2009-12-18 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 18 12:51:43 UTC 2009

Added Files:
src/gnu/lib/libgcc4/arch/mips64eb: dp-bit.c fp-bit.c tp-bit.c

Log Message:
Libgcc softfloat wrapper source code.  This file is not auto-generated.  Due
to the design of libgcc build procedure I had to reverse engineer this from
generated files.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/gnu/lib/libgcc4/arch/mips64eb/dp-bit.c \
src/gnu/lib/libgcc4/arch/mips64eb/fp-bit.c \
src/gnu/lib/libgcc4/arch/mips64eb/tp-bit.c

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

Added files:

Index: src/gnu/lib/libgcc4/arch/mips64eb/dp-bit.c
diff -u /dev/null src/gnu/lib/libgcc4/arch/mips64eb/dp-bit.c:1.1
--- /dev/null	Fri Dec 18 12:51:43 2009
+++ src/gnu/lib/libgcc4/arch/mips64eb/dp-bit.c	Fri Dec 18 12:51:43 2009
@@ -0,0 +1,3 @@
+/*	$NetBSD: dp-bit.c,v 1.1 2009/12/18 12:51:43 uebayasi Exp $	*/
+#define QUIET_NAN_NEGATED
+#include gcc/config/fp-bit.c
Index: src/gnu/lib/libgcc4/arch/mips64eb/fp-bit.c
diff -u /dev/null src/gnu/lib/libgcc4/arch/mips64eb/fp-bit.c:1.1
--- /dev/null	Fri Dec 18 12:51:43 2009
+++ src/gnu/lib/libgcc4/arch/mips64eb/fp-bit.c	Fri Dec 18 12:51:43 2009
@@ -0,0 +1,4 @@
+/*	$NetBSD: fp-bit.c,v 1.1 2009/12/18 12:51:43 uebayasi Exp $	*/
+#define QUIET_NAN_NEGATED
+#define FLOAT
+#include gcc/config/fp-bit.c
Index: src/gnu/lib/libgcc4/arch/mips64eb/tp-bit.c
diff -u /dev/null src/gnu/lib/libgcc4/arch/mips64eb/tp-bit.c:1.1
--- /dev/null	Fri Dec 18 12:51:43 2009
+++ src/gnu/lib/libgcc4/arch/mips64eb/tp-bit.c	Fri Dec 18 12:51:43 2009
@@ -0,0 +1,6 @@
+/*	$NetBSD: tp-bit.c,v 1.1 2009/12/18 12:51:43 uebayasi Exp $	*/
+#if __LDBL_MANT_DIG__ == 113
+#define QUIET_NAN_NEGATED
+#define TFLOAT
+#include gcc/config/fp-bit.c
+#endif



CVS commit: src/gnu/lib/libgcc4/arch/mips64eb

2009-12-18 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 18 13:01:44 UTC 2009

Modified Files:
src/gnu/lib/libgcc4/arch/mips64eb: libs.libgcc.srcs.mk
libs.libgcc.tmplsrcs.tmplfpsrcs.mk libs.libgcc_s.srcs.mk
libs.libgcc_s.tmplsrcs.tmplfpsrcs.mk srcs.copts.mk srcs.cppflags.mk
srcs.tmplsrcs.mk

Log Message:
Regenerate with libgcc TFmode softfloat support enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.srcs.mk \
src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.tmplsrcs.tmplfpsrcs.mk \
src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc_s.srcs.mk \
src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc_s.tmplsrcs.tmplfpsrcs.mk \
src/gnu/lib/libgcc4/arch/mips64eb/srcs.copts.mk \
src/gnu/lib/libgcc4/arch/mips64eb/srcs.cppflags.mk \
src/gnu/lib/libgcc4/arch/mips64eb/srcs.tmplsrcs.mk

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/libs.libgcc.srcs.mk
diff -u src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.srcs.mk:1.1 src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.srcs.mk:1.2
--- src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.srcs.mk:1.1	Mon Nov 30 10:26:36 2009
+++ src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.srcs.mk	Fri Dec 18 13:01:44 2009
@@ -10,6 +10,7 @@
 	tmp__absvsi2.c \
 	tmp__addsub_df.c \
 	tmp__addsub_sf.c \
+	tmp__addsub_tf.c \
 	tmp__addvdi3.c \
 	tmp__addvsi3.c \
 	tmp__ashldi3.c \
@@ -21,14 +22,17 @@
 	tmp__cmpdi2.c \
 	tmp__compare_df.c \
 	tmp__compare_sf.c \
+	tmp__compare_tf.c \
 	tmp__ctors.c \
 	tmp__ctzdi2.c \
 	tmp__ctzsi2.c \
 	tmp__df_to_sf.c \
 	tmp__df_to_si.c \
+	tmp__df_to_tf.c \
 	tmp__df_to_usi.c \
 	tmp__div_df.c \
 	tmp__div_sf.c \
+	tmp__div_tf.c \
 	tmp__divdc3.c \
 	tmp__divdi3.c \
 	tmp__divsc3.c \
@@ -38,6 +42,7 @@
 	tmp__eprintf.c \
 	tmp__eq_df.c \
 	tmp__eq_sf.c \
+	tmp__eq_tf.c \
 	tmp__ffsdi2.c \
 	tmp__ffssi2.c \
 	tmp__fixdfdi.c \
@@ -69,20 +74,27 @@
 	tmp__floattixf.c \
 	tmp__fpcmp_parts_df.c \
 	tmp__fpcmp_parts_sf.c \
+	tmp__fpcmp_parts_tf.c \
 	tmp__ge_df.c \
 	tmp__ge_sf.c \
+	tmp__ge_tf.c \
 	tmp__gt_df.c \
 	tmp__gt_sf.c \
+	tmp__gt_tf.c \
 	tmp__le_df.c \
 	tmp__le_sf.c \
+	tmp__le_tf.c \
 	tmp__lshrdi3.c \
 	tmp__lt_df.c \
 	tmp__lt_sf.c \
+	tmp__lt_tf.c \
 	tmp__make_df.c \
 	tmp__make_sf.c \
+	tmp__make_tf.c \
 	tmp__moddi3.c \
 	tmp__mul_df.c \
 	tmp__mul_sf.c \
+	tmp__mul_tf.c \
 	tmp__muldc3.c \
 	tmp__muldi3.c \
 	tmp__mulsc3.c \
@@ -92,13 +104,16 @@
 	tmp__mulxc3.c \
 	tmp__ne_df.c \
 	tmp__ne_sf.c \
+	tmp__ne_tf.c \
 	tmp__negate_df.c \
 	tmp__negate_sf.c \
+	tmp__negate_tf.c \
 	tmp__negdi2.c \
 	tmp__negvdi2.c \
 	tmp__negvsi2.c \
 	tmp__pack_df.c \
 	tmp__pack_sf.c \
+	tmp__pack_tf.c \
 	tmp__paritydi2.c \
 	tmp__paritysi2.c \
 	tmp__popcount_tab.c \
@@ -110,13 +125,20 @@
 	tmp__powixf2.c \
 	tmp__sf_to_df.c \
 	tmp__sf_to_si.c \
+	tmp__sf_to_tf.c \
 	tmp__sf_to_usi.c \
 	tmp__si_to_df.c \
 	tmp__si_to_sf.c \
+	tmp__si_to_tf.c \
 	tmp__subvdi3.c \
 	tmp__subvsi3.c \
+	tmp__tf_to_df.c \
+	tmp__tf_to_sf.c \
+	tmp__tf_to_si.c \
+	tmp__tf_to_usi.c \
 	tmp__thenan_df.c \
 	tmp__thenan_sf.c \
+	tmp__thenan_tf.c \
 	tmp__trampoline.c \
 	tmp__ucmpdi2.c \
 	tmp__udiv_w_sdiv.c \
@@ -125,7 +147,10 @@
 	tmp__umoddi3.c \
 	tmp__unord_df.c \
 	tmp__unord_sf.c \
+	tmp__unord_tf.c \
 	tmp__unpack_df.c \
 	tmp__unpack_sf.c \
+	tmp__unpack_tf.c \
 	tmp__usi_to_df.c \
 	tmp__usi_to_sf.c \
+	tmp__usi_to_tf.c \
Index: src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.tmplsrcs.tmplfpsrcs.mk
diff -u src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.tmplsrcs.tmplfpsrcs.mk:1.1 src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.tmplsrcs.tmplfpsrcs.mk:1.2
--- src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.tmplsrcs.tmplfpsrcs.mk:1.1	Mon Nov 30 10:26:36 2009
+++ src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc.tmplsrcs.tmplfpsrcs.mk	Fri Dec 18 13:01:44 2009
@@ -6,3 +6,4 @@
 TMPLFPSRCS.libgcc.a = \
 	dp-bit.c \
 	fp-bit.c \
+	tp-bit.c \
Index: src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc_s.srcs.mk
diff -u src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc_s.srcs.mk:1.1 src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc_s.srcs.mk:1.2
--- src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc_s.srcs.mk:1.1	Mon Nov 30 10:26:36 2009
+++ src/gnu/lib/libgcc4/arch/mips64eb/libs.libgcc_s.srcs.mk	Fri Dec 18 13:01:44 2009
@@ -9,6 +9,7 @@
 	tmp__absvsi2_s.c \
 	tmp__addsub_df_s.c \
 	tmp__addsub_sf_s.c \
+	tmp__addsub_tf_s.c \
 	tmp__addvdi3_s.c \
 	tmp__addvsi3_s.c \
 	tmp__ashldi3_s.c \
@@ -20,14 +21,17 @@
 	tmp__cmpdi2_s.c \
 	tmp__compare_df_s.c \
 	tmp__compare_sf_s.c \
+	tmp__compare_tf_s.c \
 	tmp__ctors_s.c \
 	tmp__ctzdi2_s.c \
 	tmp__ctzsi2_s.c \
 	tmp__df_to_sf_s.c \
 	tmp__df_to_si_s.c \
+	tmp__df_to_tf_s.c \
 	tmp__df_to_usi_s.c \
 	tmp__div_df_s.c \
 	tmp__div_sf_s.c \
+	tmp__div_tf_s.c \
 	tmp__divdc3_s.c \
 	tmp__divdi3_s.c \
 	tmp__divsc3_s.c \
@@ -36,6 

CVS commit: src/sys/arch/hppa/hppa

2009-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 18 15:20:15 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Fix pmap_dump_table so that it doesn't loop indefinitely for a space that
doesn't map anything in the last PDE.

Also, don't loop unnecessarily through the spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.60 src/sys/arch/hppa/hppa/pmap.c:1.61
--- src/sys/arch/hppa/hppa/pmap.c:1.60	Sat Nov 28 13:53:28 2009
+++ src/sys/arch/hppa/hppa/pmap.c	Fri Dec 18 15:20:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.60 2009/11/28 13:53:28 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.61 2009/12/18 15:20:15 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.60 2009/11/28 13:53:28 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.61 2009/12/18 15:20:15 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -447,38 +447,39 @@
 pmap_dump_table(pa_space_t space, vaddr_t sva)
 {
 	char buf[64];
-	pa_space_t sp;
-
-	for (sp = 0; sp = hppa_sid_max; sp++) {
-		volatile pt_entry_t *pde = NULL;
-		pt_entry_t pte;
-		vaddr_t va, pdemask;
-		uint32_t *pd;
+	volatile pt_entry_t *pde = NULL;
+	vaddr_t va = sva;
+	vaddr_t pdemask = 1;
+	pt_entry_t pte;
+	uint32_t *pd;
 
-		if (((int)space = 0  sp != space) ||
-		!(pd = pmap_sdir_get(sp)))
-			continue;
+	if (space  hppa_sid_max)
+		return;
 
-		for (pdemask = 1, va = sva ? sva : 0;
-		va  0xf000; va += PAGE_SIZE) {
-			if (pdemask != (va  PDE_MASK)) {
-pdemask = va  PDE_MASK;
-if (!(pde = pmap_pde_get(pd, va))) {
-	va = pdemask + PDE_SIZE - PAGE_SIZE;
-	continue;
-}
-printf(%x:%8p:\n, sp, pde);
-			}
+	pd = pmap_sdir_get(space);
+	if (!pd)
+		return;
 
-			if (!(pte = pmap_pte_get(pde, va)))
+	do {
+		if (pdemask != (va  PDE_MASK)) {
+			pdemask = va  PDE_MASK;
+			pde = pmap_pde_get(pd, va);
+			if (!pde) {
+va = pdemask + PDE_SIZE;
 continue;
+			}
+			printf(%x:%8p:\n, space, pde);
+		}
 
+		pte = pmap_pte_get(pde, va);
+		if (pte) {
 			snprintb(buf, sizeof(buf), TLB_BITS,
 			   TLB_PROT(pte  PAGE_MASK));
 			printf(0x%08lx-0x%08x:%s\n, va, pte  ~PAGE_MASK,
 			buf);
 		}
-	}
+		va += PAGE_SIZE;
+	} while (va != 0);
 }
 
 void



CVS commit: src/sys/arch/hp700/hp700

2009-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 18 15:49:48 UTC 2009

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

Log Message:
Add some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.30 src/sys/arch/hp700/hp700/autoconf.c:1.31
--- src/sys/arch/hp700/hp700/autoconf.c:1.30	Sun Nov 22 19:09:15 2009
+++ src/sys/arch/hp700/hp700/autoconf.c	Fri Dec 18 15:49:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.30 2009/11/22 19:09:15 mbalmer Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.31 2009/12/18 15:49:48 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.30 2009/11/22 19:09:15 mbalmer Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.31 2009/12/18 15:49:48 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -120,7 +120,11 @@
 #include hp700/dev/cpudevs.h
 #include hp700/gsc/gscbusvar.h
 
-register_t	kpsw = PSW_Q | PSW_P | PSW_C | PSW_D;
+register_t	kpsw = 
+	PSW_Q |		/* Interrupt State Collection Enable */
+	PSW_P |		/* Protection Identifier Validation Enable */
+	PSW_C |		/* Instruction Address Translation Enable */
+	PSW_D;		/* Data Address Translation Enable */
 
 /*
  * LED blinking thing



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

2009-12-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Dec 18 17:10:07 UTC 2009

Modified Files:
src/libexec/ld.elf_so/arch/mips: Makefile.inc

Log Message:
use COPTS for -G0.
replace ${CPUFLAGS:M-mabi=64:M-mabi=o64} with two constructs.
the former doesn't seem to work anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/libexec/ld.elf_so/arch/mips/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/libexec/ld.elf_so/arch/mips/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.17 src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.18
--- src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.17	Mon Dec 14 00:41:18 2009
+++ src/libexec/ld.elf_so/arch/mips/Makefile.inc	Fri Dec 18 17:10:07 2009
@@ -1,12 +1,12 @@
-#	$NetBSD: Makefile.inc,v 1.17 2009/12/14 00:41:18 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.18 2009/12/18 17:10:07 mrg Exp $
 
 SRCS+=		rtld_start.S mips_reloc.c
 
-# XXX Should not be in CPPFLAGS!
-CPUFLAGS+=	-G0
+COPTS+=		-G0
 
-ABI64?= ${CPUFLAGS:M-mabi=64:M-mabi=o64}
-.if !empty(ABI64)
+ABI64?= ${CFLAGS:M-mabi=64}
+ABIO64?= ${CFLAGS:M-mabi=o64}
+.if !empty(ABI64) || !empty(ABIO64)
 CPPFLAGS+=	-DELFSIZE=64
 .else
 CPPFLAGS+=	-DELFSIZE=32



CVS commit: src/external/mit/xorg/bin/xdm

2009-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 18 17:28:48 UTC 2009

Modified Files:
src/external/mit/xorg/bin/xdm: Makefile
src/external/mit/xorg/bin/xdm/config: Makefile

Log Message:
From Patrick Welche:
The following trivial typo fix gets rid of unsecure sessions...
XDMATHDIR - XDMXAUTHDIR


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/bin/xdm/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/bin/xdm/config/Makefile

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

Modified files:

Index: src/external/mit/xorg/bin/xdm/Makefile
diff -u src/external/mit/xorg/bin/xdm/Makefile:1.5 src/external/mit/xorg/bin/xdm/Makefile:1.6
--- src/external/mit/xorg/bin/xdm/Makefile:1.5	Wed May  6 04:49:37 2009
+++ src/external/mit/xorg/bin/xdm/Makefile	Fri Dec 18 12:28:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2009/05/06 08:49:37 mrg Exp $
+#	$NetBSD: Makefile,v 1.6 2009/12/18 17:28:47 christos Exp $
 
 .include bsd.own.mk
 
@@ -56,7 +56,7 @@
 			-DCHOOSERPATH=${XDMCHOOSERPATH} \
 			-DGREETERLIBPATH=${XDMGREETERLIB} \
 			-DXDMDIR=${XDMDIR} \
-			-DXDMAUTHDIR=${XDMVARDIR} \
+			-DXDMXAUTHDIR=${XDMVARDIR} \
 			-DXDMLOGDIR=${XDMLOGDIR} \
 			-DXDMPIDDIR=${XDMPIDDIR}
 

Index: src/external/mit/xorg/bin/xdm/config/Makefile
diff -u src/external/mit/xorg/bin/xdm/config/Makefile:1.7 src/external/mit/xorg/bin/xdm/config/Makefile:1.8
--- src/external/mit/xorg/bin/xdm/config/Makefile:1.7	Fri Mar 13 13:12:44 2009
+++ src/external/mit/xorg/bin/xdm/config/Makefile	Fri Dec 18 12:28:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2009/03/13 17:12:44 plunky Exp $
+#	$NetBSD: Makefile,v 1.8 2009/12/18 17:28:47 christos Exp $
 
 .include bsd.own.mk
 
@@ -21,7 +21,7 @@
 -DSHELL_CMD=/bin/sh
 CPPSCRIPTFLAGS_Xstartup=	-DBINDIR=${X11BINDIR} -DXDMCONFIGDIR=${XDMDIR}
 CPPSCRIPTFLAGS_xdm-config=	-DXDMDIR=${XDMDIR} \
--DXDMAUTHDIR=${XDMVARDIR} \
+-DXDMXAUTHDIR=${XDMVARDIR} \
 -DXDMLOGDIR=${XDMLOGDIR} \
 -DXDMPIDDIR=${XDMPIDDIR} \
 -DXPM \



CVS commit: src/sys/arch/hppa/hppa

2009-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 18 19:17:08 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
DPRINTF format fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.61 src/sys/arch/hppa/hppa/pmap.c:1.62
--- src/sys/arch/hppa/hppa/pmap.c:1.61	Fri Dec 18 15:20:15 2009
+++ src/sys/arch/hppa/hppa/pmap.c	Fri Dec 18 19:17:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.61 2009/12/18 15:20:15 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.62 2009/12/18 19:17:08 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.61 2009/12/18 15:20:15 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.62 2009/12/18 19:17:08 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -313,7 +313,7 @@
 {
 
 	DPRINTF(PDB_FOLLOW|PDB_VP,
-	(%s(%p, 0x%x, 0x%x)\n, __func__, pm, (int)va, (int)ptp));
+	(%s(%p, 0x%lx, 0x%lx)\n, __func__, pm, va, ptp));
 
 	KASSERT((ptp  PGOFSET) == 0);
 
@@ -327,7 +327,7 @@
 	paddr_t pa;
 
 	DPRINTF(PDB_FOLLOW|PDB_VP,
-	(%s(%p, 0x%x, %p)\n, __func__, pm, (int)va, pdep));
+	(%s(%p, 0x%lx, %p)\n, __func__, pm, va, pdep));
 
 	KASSERT(pm != pmap_kernel());
 	KASSERT(mutex_owned(pm-pm_lock));
@@ -339,7 +339,7 @@
 
 	pa = VM_PAGE_TO_PHYS(pg);
 
-	DPRINTF(PDB_FOLLOW|PDB_VP, (%s: pde %x\n, __func__, (int)pa));
+	DPRINTF(PDB_FOLLOW|PDB_VP, (%s: pde %lx\n, __func__, pa));
 
 	pg-flags = ~PG_BUSY;		/* never busy */
 	pg-wire_count = 1;		/* no mappings yet */
@@ -361,7 +361,7 @@
 	if (pm-pm_ptphint  VM_PAGE_TO_PHYS(pm-pm_ptphint) == pa)
 		return (pm-pm_ptphint);
 
-	DPRINTF(PDB_FOLLOW|PDB_PV, (%s: lookup 0x%x\n, __func__, (int)pa));
+	DPRINTF(PDB_FOLLOW|PDB_PV, (%s: lookup 0x%lx\n, __func__, pa));
 
 	return (PHYS_TO_VM_PAGE(pa));
 }
@@ -371,7 +371,7 @@
 {
 
 	DPRINTF(PDB_FOLLOW|PDB_PV,
-	(%s(%p, 0x%x, %p)\n, __func__, pmap, (int)va, ptp));
+	(%s(%p, 0x%lx, %p)\n, __func__, pmap, va, ptp));
 
 	KASSERT(pmap != pmap_kernel());
 	if (pmap != pmap_kernel()  --ptp-wire_count = 1) {
@@ -400,8 +400,8 @@
 pmap_pte_set(volatile pt_entry_t *pde, vaddr_t va, pt_entry_t pte)
 {
 
-	DPRINTF(PDB_FOLLOW|PDB_VP, (%s(%p, 0x%x, 0x%x)\n,
-	__func__, pde, (int)va, (int)pte));
+	DPRINTF(PDB_FOLLOW|PDB_VP, (%s(%p, 0x%lx, 0x%x)\n,
+	__func__, pde, va, pte));
 
 	KASSERT(pde != NULL);
 	KASSERT(((paddr_t)pde  PGOFSET) == 0);
@@ -518,8 +518,7 @@
 	u_int attrs;
 
 	DPRINTF(PDB_FOLLOW|PDB_ALIAS,
-	(%s(%p, %p, 0x%x, %p)\n, __func__, pg, pve, (int)va,
-	ptep));
+	(%s(%p, %p, 0x%lx, %p)\n, __func__, pg, pve, va, ptep));
 
 	/* we should only be looking if we're not PVF_NC */
 	KASSERT((pg-mdpage.pvh_attrs  PVF_NC) == 0);
@@ -529,13 +528,13 @@
 		attrs = pmap_pvh_attrs(*ptep);
 
 		DPRINTF(PDB_FOLLOW|PDB_ALIAS,
-		(%s: va 0x%08x attrs 0x%08x (new)\n, __func__, (int)va,
+		(%s: va 0x%08lx attrs 0x%08x (new)\n, __func__, va,
 		attrs));
 	} else {
 		attrs = 0;
 
 		DPRINTF(PDB_FOLLOW|PDB_ALIAS,
-		(%s: va 0x%08x (removed)\n, __func__, (int)va));
+		(%s: va 0x%08lx (removed)\n, __func__, va));
 	}
 
 	/*
@@ -554,8 +553,8 @@
 			nonequiv = true;
 
 		DPRINTF(PDB_FOLLOW|PDB_ALIAS,
-		(%s: va 0x%08x:0x%08x attrs 0x%08x %s\n, __func__,
-		(int)tpve-pv_pmap-pm_space, (int)tpve-pv_va  PV_VAMASK,
+		(%s: va 0x%08x:0x%08lx attrs 0x%08x %s\n, __func__,
+		tpve-pv_pmap-pm_space, tpve-pv_va  PV_VAMASK,
 		pmap_pvh_attrs(pte), nonequiv ? alias : ));
 	}
 
@@ -640,8 +639,8 @@
 pmap_pv_enter(struct vm_page *pg, struct pv_entry *pve, pmap_t pm,
 vaddr_t va, struct vm_page *pdep, u_int flags)
 {
-	DPRINTF(PDB_FOLLOW|PDB_PV, (%s(%p, %p, %p, 0x%x, %p, 0x%x)\n,
-	__func__, pg, pve, pm, (int)va, pdep, flags));
+	DPRINTF(PDB_FOLLOW|PDB_PV, (%s(%p, %p, %p, 0x%lx, %p, 0x%x)\n,
+	__func__, pg, pve, pm, va, pdep, flags));
 
 	KASSERT(mutex_owned(pg-mdpage.pvh_lock));
 
@@ -695,7 +694,7 @@
 	extern int __rodata_start, __rodata_end;
 	extern int __data_start;
 
-	DPRINTF(PDB_FOLLOW|PDB_INIT, (%s(0x%x)\n, __func__, (int)vstart));
+	DPRINTF(PDB_FOLLOW|PDB_INIT, (%s(0x%lx)\n, __func__, vstart));
 
 	uvm_setpagesize();
 
@@ -733,8 +732,8 @@
 	size = round_page((hppa_sid_max + 1) * 4);
 	memset((void *)addr, 0, size);
 	fdcache(HPPA_SID_KERNEL, addr, size);
-	DPRINTF(PDB_INIT, (%s: vtop 0x%x @ 0x%x\n, __func__, (int)size,
-	(int)addr));
+	DPRINTF(PDB_INIT, (%s: vtop 0x%lx @ 0x%lx\n, __func__, size,
+	addr));
 
 	addr += size;
 	pmap_sdir_set(HPPA_SID_KERNEL, kpm-pm_pdir);
@@ -763,8 +762,8 @@
 		pmap_hpt = addr;
 		addr += pmap_hptsize;
 
-		DPRINTF(PDB_INIT, (%s: hpt_table 0x%x @ 0x%x\n, __func__,
-		pmap_hptsize, (int)addr));
+		DPRINTF(PDB_INIT, (%s: 

CVS commit: src/sys/arch/hppa/hppa

2009-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 18 19:20:35 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Remove unnecessary part of conditional.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.62 src/sys/arch/hppa/hppa/pmap.c:1.63
--- src/sys/arch/hppa/hppa/pmap.c:1.62	Fri Dec 18 19:17:08 2009
+++ src/sys/arch/hppa/hppa/pmap.c	Fri Dec 18 19:20:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.62 2009/12/18 19:17:08 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.63 2009/12/18 19:20:35 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.62 2009/12/18 19:17:08 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.63 2009/12/18 19:20:35 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -374,7 +374,7 @@
 	(%s(%p, 0x%lx, %p)\n, __func__, pmap, va, ptp));
 
 	KASSERT(pmap != pmap_kernel());
-	if (pmap != pmap_kernel()  --ptp-wire_count = 1) {
+	if (--ptp-wire_count = 1) {
 		DPRINTF(PDB_FOLLOW|PDB_PV,
 		(%s: disposing ptp %p\n, __func__, ptp));
 		pmap_pde_set(pmap, va, 0);



CVS commit: src/tests/syscall

2009-12-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 18 21:24:13 UTC 2009

Modified Files:
src/tests/syscall: t_cmsg.c

Log Message:
Must use CMSG_SPACE instead of CMSG_LEN for control message buffer.
Fixes test on sparc64 (and possible other alignment-picky ports).
from mlelstv


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/syscall/t_cmsg.c

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

Modified files:

Index: src/tests/syscall/t_cmsg.c
diff -u src/tests/syscall/t_cmsg.c:1.12 src/tests/syscall/t_cmsg.c:1.13
--- src/tests/syscall/t_cmsg.c:1.12	Thu Nov 26 17:33:23 2009
+++ src/tests/syscall/t_cmsg.c	Fri Dec 18 21:24:13 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_cmsg.c,v 1.12 2009/11/26 17:33:23 pooka Exp $	*/
+/*	$NetBSD: t_cmsg.c,v 1.13 2009/12/18 21:24:13 pooka Exp $	*/
 
 #include sys/types.h
 #include sys/mount.h
@@ -40,7 +40,7 @@
 	if (rump_sys_socketpair(AF_LOCAL, SOCK_STREAM, 0, s) == -1)
 		atf_tc_fail(rump_sys_socket);
 
-	cmp = malloc(CMSG_LEN(sizeof(int)));
+	cmp = malloc(CMSG_SPACE(sizeof(int)));
 
 	iov.iov_base = fd;
 	iov.iov_len = sizeof(int);
@@ -54,7 +54,7 @@
 	msg.msg_name = NULL;
 	msg.msg_namelen = 0;
 	msg.msg_control = cmp;
-	msg.msg_controllen = CMSG_LEN(sizeof(int));
+	msg.msg_controllen = CMSG_SPACE(sizeof(int));
 
 	/*
 	 * ERROR HERE: trying to pass invalid fd
@@ -128,14 +128,14 @@
 	sizeof(MAGICSTRING))
 		atf_tc_fail_errno(pipe write); /* XXX: errno */
 
-	cmp = malloc(CMSG_LEN(sizeof(int)));
+	cmp = malloc(CMSG_SPACE(sizeof(int)));
 
 	iov.iov_base = storage;
 	iov.iov_len = sizeof(int);
 
 	cmp-cmsg_level = SOL_SOCKET;
 	cmp-cmsg_type = SCM_RIGHTS;
-	cmp-cmsg_len = CMSG_LEN(sizeof(int));
+	cmp-cmsg_len = CMSG_SPACE(sizeof(int));
 
 	msg.msg_iov = iov;
 	msg.msg_iovlen = 1;
@@ -149,6 +149,13 @@
 	if (rump_sys_sendmsg(s2, msg, 0) == -1)
 		atf_tc_fail_errno(sendmsg failed);
 
+	/*
+	 * We will read to the same cmsg space.  Overwrite the space
+	 * with an invalid fd to make sure we get an explicit error
+	 * if we don't manage to read the fd.
+	 */
+	*(int *)CMSG_DATA(cmp) = -1;
+
 	/* switch back to original proc */
 	rump_pub_lwp_switch(l1);
 



CVS commit: src/sys/arch/cobalt/cobalt

2009-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 18 23:22:29 UTC 2009

Modified Files:
src/sys/arch/cobalt/cobalt: machdep.c

Log Message:
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/cobalt/cobalt/machdep.c

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

Modified files:

Index: src/sys/arch/cobalt/cobalt/machdep.c
diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.107 src/sys/arch/cobalt/cobalt/machdep.c:1.108
--- src/sys/arch/cobalt/cobalt/machdep.c:1.107	Thu Dec 17 15:29:47 2009
+++ src/sys/arch/cobalt/cobalt/machdep.c	Fri Dec 18 23:22:28 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.108 2009/12/18 23:22:28 matt Exp $	*/
 
 /*-
  * Copyright (c) 2006 Izumi Tsutsui.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.108 2009/12/18 23:22:28 matt Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -101,7 +101,7 @@
 struct vm_map *phys_map = NULL;
 
 int	physmem;		/* Total physical memory */
-char	*bootinfo = NULL;	/* pointer to bootinfo structure */
+void	*bootinfo = NULL;	/* pointer to bootinfo structure */
 
 char	bootstring[512];	/* Boot command */
 int	netboot;		/* Are we netbooting? */
@@ -126,7 +126,7 @@
 phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
 int mem_cluster_cnt;
 
-void	mach_init(unsigned int, u_int, int32_t);
+void	mach_init(intptr_t, u_int, int32_t);
 void	decode_bootstring(void);
 static char *strtok_light(char *, const char);
 static u_int read_board_id(void);
@@ -143,10 +143,9 @@
  * Do all the stuff that locore normally does before calling main().
  */
 void
-mach_init(unsigned int memsize32, u_int bim, int32_t bip32)
+mach_init(intptr_t memsize, u_int bim, int32_t bip32)
 {
-	size_t memsize = memsize32;
-	char *bip = (void *)(intptr_t)bip32;
+	void *bip = (void *)(intptr_t)bip32;
 	char *kernend;
 	u_long first, last;
 	extern char edata[], end[];
@@ -201,12 +200,17 @@
 
 		bootinfo = bip;
 		bi_magic = lookup_bootinfo(BTINFO_MAGIC);
-		if (bi_magic == NULL || bi_magic-magic != BOOTINFO_MAGIC)
-			bi_msg = invalid bootinfo structure.\n;
-		else
+		if (bi_magic == NULL) {
+			bi_msg = missing bootinfo structure;
+			bim = (uintptr_t)bip;
+		} else if (bi_magic-magic != BOOTINFO_MAGIC) {
+			bi_msg = invalid bootinfo structure;
+			bim = bi_magic-magic;
+		} else
 			bi_msg = NULL;
-	} else
-		bi_msg = invalid bootinfo (standalone boot?)\n;
+	} else {
+		bi_msg = invalid bootinfo (standalone boot?);
+	}
 
 #if NKSYMS || defined(DDB) || defined(MODULAR)
 	bi_syms = lookup_bootinfo(BTINFO_SYMTAB);
@@ -258,7 +262,7 @@
 	consinit();
 
 	if (bi_msg != NULL)
-		printf(bi_msg);
+		printf(%s: magic=%#x\n, bi_msg, bim);
 
 	uvm_setpagesize();
 
@@ -495,7 +499,7 @@
  * Look up information in bootinfo of boot loader.
  */
 void *
-lookup_bootinfo(int type)
+lookup_bootinfo(unsigned int type)
 {
 	struct btinfo_common *bt;
 	char *help = bootinfo;



CVS commit: [netbsd-5] src/share/man/man4

2009-12-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 23:59:38 UTC 2009

Modified Files:
src/share/man/man4 [netbsd-5]: envsys.4

Log Message:
Small grammar fix.  From Constantine Aleksandrovich Murenin.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.4.1 src/share/man/man4/envsys.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/envsys.4
diff -u src/share/man/man4/envsys.4:1.41 src/share/man/man4/envsys.4:1.41.4.1
--- src/share/man/man4/envsys.4:1.41	Wed Apr 30 13:10:54 2008
+++ src/share/man/man4/envsys.4	Fri Dec 18 23:59:38 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: envsys.4,v 1.41 2008/04/30 13:10:54 martin Exp $
+.\	$NetBSD: envsys.4,v 1.41.4.1 2009/12/18 23:59:38 snj Exp $
 .\
 .\ Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -151,7 +151,7 @@
 .It Fa allow-rfact
 Set to
 .Em true
-mean that the sensor is able to change the resistor factor,
+means that the sensor is able to change the resistor factor,
 only used in Voltage sensors.
 .It Fa avg-value
 Current average value in the sensor.



CVS commit: [netbsd-5] src/share/man/man9

2009-12-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Dec 19 00:13:42 UTC 2009

Modified Files:
src/share/man/man9 [netbsd-5]: sysmon_envsys.9

Log Message:
Revert commit to the wrong branch.


To generate a diff of this commit:
cvs rdiff -u -r1.19.4.1 -r1.19.4.2 src/share/man/man9/sysmon_envsys.9

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/man9/sysmon_envsys.9
diff -u src/share/man/man9/sysmon_envsys.9:1.19.4.1 src/share/man/man9/sysmon_envsys.9:1.19.4.2
--- src/share/man/man9/sysmon_envsys.9:1.19.4.1	Sat Dec 19 00:03:59 2009
+++ src/share/man/man9/sysmon_envsys.9	Sat Dec 19 00:13:42 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysmon_envsys.9,v 1.19.4.1 2009/12/19 00:03:59 snj Exp $
+.\	$NetBSD: sysmon_envsys.9,v 1.19.4.2 2009/12/19 00:13:42 snj Exp $
 .\
 .\ Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -94,7 +94,7 @@
 .Pp
 The
 .Em sysmon_envsys
-structure is defined as follows
+structure is defined as follow
 (only the public members are shown):
 .Bd -literal
 struct sysmon_envsys {
@@ -246,7 +246,7 @@
 .Pp
 Each sensor uses a
 .Sy envsys_data_t
-structure, it's defined as follows (only the public members are shown);
+structure, it's defined as follow (only the public members are shown);
 .Bd -literal
 typedef struct envsys_data {
 	uint32_t	units;



CVS commit: src/share/mk

2009-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 19 00:14:43 UTC 2009

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

Log Message:
We mustn't search in the path for ${dir}.${MACHINE}; make sure we only
find the ones relative to ${.CURDIR}.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/share/mk/bsd.subdir.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.subdir.mk
diff -u src/share/mk/bsd.subdir.mk:1.50 src/share/mk/bsd.subdir.mk:1.51
--- src/share/mk/bsd.subdir.mk:1.50	Sun Nov 29 11:00:00 2009
+++ src/share/mk/bsd.subdir.mk	Fri Dec 18 19:14:43 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.subdir.mk,v 1.50 2009/11/29 16:00:00 uebayasi Exp $
+#	$NetBSD: bsd.subdir.mk,v 1.51 2009/12/19 00:14:43 christos Exp $
 #	@(#)bsd.subdir.mk	8.1 (Berkeley) 6/8/93
 
 .include bsd.init.mk
@@ -6,11 +6,26 @@
 .if !defined(NOSUBDIR)	# {
 
 .for dir in ${SUBDIR}
+.if ${dir} == .WAIT
+# Don't play with .WAI
+__REALSUBDIR+=${dir}
+.else
+.if ${dir:H} != 
+# It is a relative path; make it absolute so exists can't search the path.
+.if exists(${.CURDIR}/${dir}.${MACHINE})
+__REALSUBDIR+=${dir}.${MACHINE}
+.else
+__REALSUBDIR+=${dir}
+.endif
+.else
+# It is an absolute path; leave it alone
 .if exists(${dir}.${MACHINE})
 __REALSUBDIR+=${dir}.${MACHINE}
 .else
 __REALSUBDIR+=${dir}
 .endif
+.endif
+.endif
 .endfor
 
 __recurse: .USE



CVS commit: src/compat/amd64/i386

2009-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 19 00:15:13 UTC 2009

Modified Files:
src/compat/amd64/i386: bsd.i386.mk

Log Message:
Don't use ${NETBSDSRCDIR}. It might not be set yet.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/compat/amd64/i386/bsd.i386.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/amd64/i386/bsd.i386.mk
diff -u src/compat/amd64/i386/bsd.i386.mk:1.1 src/compat/amd64/i386/bsd.i386.mk:1.2
--- src/compat/amd64/i386/bsd.i386.mk:1.1	Sun Dec 13 04:07:32 2009
+++ src/compat/amd64/i386/bsd.i386.mk	Fri Dec 18 19:15:13 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.i386.mk,v 1.1 2009/12/13 09:07:32 mrg Exp $
+#	$NetBSD: bsd.i386.mk,v 1.2 2009/12/19 00:15:13 christos Exp $
 
 LD+=			-m elf_i386
 MLIBDIR=		i386
@@ -11,4 +11,4 @@
 CRYPTO_MACHINE_CPU=	${MLIBDIR}
 LDELFSO_MACHINE_CPU=	${MLIBDIR}
 
-.include ${NETBSDSRCDIR}/compat/m32.mk
+.include ${.PARSEDIR}/../../m32.mk



CVS commit: src/share/man/man4

2009-12-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Dec 19 00:15:28 UTC 2009

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

Log Message:
Small grammar fix.  From Constantine Aleksandrovich Murenin.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/share/man/man4/envsys.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/envsys.4
diff -u src/share/man/man4/envsys.4:1.44 src/share/man/man4/envsys.4:1.45
--- src/share/man/man4/envsys.4:1.44	Wed Oct 14 23:18:39 2009
+++ src/share/man/man4/envsys.4	Sat Dec 19 00:15:28 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: envsys.4,v 1.44 2009/10/14 23:18:39 joerg Exp $
+.\	$NetBSD: envsys.4,v 1.45 2009/12/19 00:15:28 snj Exp $
 .\
 .\ Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -157,7 +157,7 @@
 .It Fa allow-rfact
 Set to
 .Em true
-mean that the sensor is able to change the resistor factor,
+means that the sensor is able to change the resistor factor,
 only used in Voltage sensors.
 .It Fa avg-value
 Current average value in the sensor.



CVS commit: src/share/man/man9

2009-12-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Dec 19 00:16:51 UTC 2009

Modified Files:
src/share/man/man9: sysmon_envsys.9

Log Message:
A couple small grammar fixes.  From Constantine Aleksandrovich Murenin.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man9/sysmon_envsys.9

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/man9/sysmon_envsys.9
diff -u src/share/man/man9/sysmon_envsys.9:1.30 src/share/man/man9/sysmon_envsys.9:1.31
--- src/share/man/man9/sysmon_envsys.9:1.30	Mon Jun 15 12:21:33 2009
+++ src/share/man/man9/sysmon_envsys.9	Sat Dec 19 00:16:51 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysmon_envsys.9,v 1.30 2009/06/15 12:21:33 wiz Exp $
+.\	$NetBSD: sysmon_envsys.9,v 1.31 2009/12/19 00:16:51 snj Exp $
 .\
 .\ Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -94,7 +94,7 @@
 .Pp
 The
 .Em sysmon_envsys
-structure is defined as follow
+structure is defined as follows
 (only the public members are shown):
 .Bd -literal
 struct sysmon_envsys {
@@ -274,7 +274,7 @@
 .Ss SENSOR DETAILS
 Each sensor uses a
 .Sy envsys_data_t
-structure, it's defined as follow (only the public members are shown);
+structure, it's defined as follows (only the public members are shown);
 .Bd -literal
 typedef struct envsys_data {
 	uint32_t	units;



CVS commit: src/compat

2009-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 19 04:11:33 UTC 2009

Modified Files:
src/compat/mips64/64: bsd.64.mk
src/compat/mips64/o32: bsd.o32.mk
src/compat/sparc64/sparc: bsd.sparc.mk

Log Message:
Avoid using ${NETBSDSRCDIR} by using ${.PARSEDIR} like I did for amd64/i386


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/compat/mips64/64/bsd.64.mk
cvs rdiff -u -r1.3 -r1.4 src/compat/mips64/o32/bsd.o32.mk
cvs rdiff -u -r1.1 -r1.2 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.

Modified files:

Index: src/compat/mips64/64/bsd.64.mk
diff -u src/compat/mips64/64/bsd.64.mk:1.3 src/compat/mips64/64/bsd.64.mk:1.4
--- src/compat/mips64/64/bsd.64.mk:1.3	Mon Dec 14 23:05:34 2009
+++ src/compat/mips64/64/bsd.64.mk	Fri Dec 18 23:11:32 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.64.mk,v 1.3 2009/12/15 04:05:34 mrg Exp $
+#	$NetBSD: bsd.64.mk,v 1.4 2009/12/19 04:11:32 christos Exp $
 
 .if ${MACHINE_ARCH} == mips64eb
 LD+=		-m elf64btsmip
@@ -13,4 +13,4 @@
 LDFLAGS+=	-mabi=64
 MKDEPFLAGS+=	-mabi=64
 
-.include ${NETBSDSRCDIR}/compat/Makefile.compat
+.include ${.PARSEDIR}/../../Makefile.compat

Index: src/compat/mips64/o32/bsd.o32.mk
diff -u src/compat/mips64/o32/bsd.o32.mk:1.3 src/compat/mips64/o32/bsd.o32.mk:1.4
--- src/compat/mips64/o32/bsd.o32.mk:1.3	Mon Dec 14 23:05:34 2009
+++ src/compat/mips64/o32/bsd.o32.mk	Fri Dec 18 23:11:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.o32.mk,v 1.3 2009/12/15 04:05:34 mrg Exp $
+#	$NetBSD: bsd.o32.mk,v 1.4 2009/12/19 04:11:33 christos Exp $
 
 .if ${MACHINE_ARCH} == mips64eb
 LD+=		-m elf32btsmip
@@ -13,4 +13,4 @@
 LDFLAGS+=	-mabi=32 -march=mips3
 MKDEPFLAGS+=	-mabi=32 -march=mips3
 
-.include ${NETBSDSRCDIR}/compat/Makefile.compat
+.include ${.PARSEDIR}/../../Makefile.compat

Index: src/compat/sparc64/sparc/bsd.sparc.mk
diff -u src/compat/sparc64/sparc/bsd.sparc.mk:1.1 src/compat/sparc64/sparc/bsd.sparc.mk:1.2
--- src/compat/sparc64/sparc/bsd.sparc.mk:1.1	Sun Dec 13 04:07:32 2009
+++ src/compat/sparc64/sparc/bsd.sparc.mk	Fri Dec 18 23:11:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sparc.mk,v 1.1 2009/12/13 09:07:32 mrg Exp $
+#	$NetBSD: bsd.sparc.mk,v 1.2 2009/12/19 04:11:33 christos Exp $
 
 LD+=			-m elf32_sparc
 MLIBDIR=		sparc
@@ -11,4 +11,4 @@
 CRYPTO_MACHINE_CPU=	${MLIBDIR}
 LDELFSO_MACHINE_CPU=	${MLIBDIR}
 
-.include ${NETBSDSRCDIR}/compat/m32.mk
+.include ${.PARSEDIR}/../../m32.mk



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 05:43:41 UTC 2009

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

Log Message:
Import the libelf from FreeBSD 8.0-RC3.

Status:

Vendor Tag: FreeBSD
Release Tags:   FreeBSD-8-0-RC3

N src/external/bsd/libelf/dist/_libelf.h
N src/external/bsd/libelf/dist/elf.3
N src/external/bsd/libelf/dist/elf_begin.3
N src/external/bsd/libelf/dist/elf_begin.c
N src/external/bsd/libelf/dist/elf_cntl.3
N src/external/bsd/libelf/dist/elf_cntl.c
N src/external/bsd/libelf/dist/elf_data.c
N src/external/bsd/libelf/dist/elf_end.3
N src/external/bsd/libelf/dist/elf_end.c
N src/external/bsd/libelf/dist/elf_errmsg.3
N src/external/bsd/libelf/dist/elf_errmsg.c
N src/external/bsd/libelf/dist/elf_errno.c
N src/external/bsd/libelf/dist/elf_fill.3
N src/external/bsd/libelf/dist/elf_fill.c
N src/external/bsd/libelf/dist/elf_flag.c
N src/external/bsd/libelf/dist/elf_flagdata.3
N src/external/bsd/libelf/dist/elf_getarhdr.3
N src/external/bsd/libelf/dist/elf_getarhdr.c
N src/external/bsd/libelf/dist/elf_getarsym.3
N src/external/bsd/libelf/dist/elf_getarsym.c
N src/external/bsd/libelf/dist/elf_getbase.3
N src/external/bsd/libelf/dist/elf_getbase.c
N src/external/bsd/libelf/dist/elf_getdata.3
N src/external/bsd/libelf/dist/elf_getident.3
N src/external/bsd/libelf/dist/elf_getident.c
N src/external/bsd/libelf/dist/elf_getphnum.3
N src/external/bsd/libelf/dist/elf_getscn.3
N src/external/bsd/libelf/dist/elf_getshnum.3
N src/external/bsd/libelf/dist/elf_getshstrndx.3
N src/external/bsd/libelf/dist/elf_hash.3
N src/external/bsd/libelf/dist/elf_hash.c
N src/external/bsd/libelf/dist/elf_kind.3
N src/external/bsd/libelf/dist/elf_kind.c
N src/external/bsd/libelf/dist/elf_memory.3
N src/external/bsd/libelf/dist/elf_memory.c
N src/external/bsd/libelf/dist/elf_next.3
N src/external/bsd/libelf/dist/elf_next.c
N src/external/bsd/libelf/dist/elf_phnum.c
N src/external/bsd/libelf/dist/elf_rand.3
N src/external/bsd/libelf/dist/elf_rand.c
N src/external/bsd/libelf/dist/elf_rawfile.3
N src/external/bsd/libelf/dist/elf_rawfile.c
N src/external/bsd/libelf/dist/elf_scn.c
N src/external/bsd/libelf/dist/elf_shnum.c
N src/external/bsd/libelf/dist/elf_shstrndx.c
N src/external/bsd/libelf/dist/elf_strptr.3
N src/external/bsd/libelf/dist/elf_strptr.c
N src/external/bsd/libelf/dist/elf_types.m4
N src/external/bsd/libelf/dist/elf_update.3
N src/external/bsd/libelf/dist/elf_update.c
N src/external/bsd/libelf/dist/elf_version.3
N src/external/bsd/libelf/dist/elf_version.c
N src/external/bsd/libelf/dist/gelf.3
N src/external/bsd/libelf/dist/gelf.h
N src/external/bsd/libelf/dist/gelf_cap.c
N src/external/bsd/libelf/dist/gelf_checksum.3
N src/external/bsd/libelf/dist/gelf_checksum.c
N src/external/bsd/libelf/dist/gelf_dyn.c
N src/external/bsd/libelf/dist/gelf_ehdr.c
N src/external/bsd/libelf/dist/gelf_fsize.3
N src/external/bsd/libelf/dist/gelf_fsize.c
N src/external/bsd/libelf/dist/gelf_getcap.3
N src/external/bsd/libelf/dist/gelf_getclass.3
N src/external/bsd/libelf/dist/gelf_getclass.c
N src/external/bsd/libelf/dist/gelf_getdyn.3
N src/external/bsd/libelf/dist/gelf_getehdr.3
N src/external/bsd/libelf/dist/gelf_getmove.3
N src/external/bsd/libelf/dist/gelf_getphdr.3
N src/external/bsd/libelf/dist/gelf_getrel.3
N src/external/bsd/libelf/dist/gelf_getrela.3
N src/external/bsd/libelf/dist/gelf_getshdr.3
N src/external/bsd/libelf/dist/gelf_getsym.3
N src/external/bsd/libelf/dist/gelf_getsyminfo.3
N src/external/bsd/libelf/dist/gelf_getsymshndx.3
N src/external/bsd/libelf/dist/gelf_move.c
N src/external/bsd/libelf/dist/gelf_newehdr.3
N src/external/bsd/libelf/dist/gelf_newphdr.3
N src/external/bsd/libelf/dist/gelf_phdr.c
N src/external/bsd/libelf/dist/gelf_rel.c
N src/external/bsd/libelf/dist/gelf_rela.c
N src/external/bsd/libelf/dist/gelf_shdr.c
N src/external/bsd/libelf/dist/gelf_sym.c
N src/external/bsd/libelf/dist/gelf_syminfo.c
N src/external/bsd/libelf/dist/gelf_symshndx.c
N src/external/bsd/libelf/dist/gelf_update_ehdr.3
N src/external/bsd/libelf/dist/gelf_xlate.c
N src/external/bsd/libelf/dist/gelf_xlatetof.3
N src/external/bsd/libelf/dist/libelf.c
N src/external/bsd/libelf/dist/libelf.h
N src/external/bsd/libelf/dist/libelf_align.c
N src/external/bsd/libelf/dist/libelf_allocate.c
N src/external/bsd/libelf/dist/libelf_ar.c
N src/external/bsd/libelf/dist/libelf_checksum.c
N src/external/bsd/libelf/dist/libelf_convert.m4
N src/external/bsd/libelf/dist/libelf_data.c
N src/external/bsd/libelf/dist/libelf_ehdr.c
N src/external/bsd/libelf/dist/libelf_extended.c
N src/external/bsd/libelf/dist/libelf_fsize.m4
N src/external/bsd/libelf/dist/libelf_msize.m4
N src/external/bsd/libelf/dist/libelf_phdr.c
N src/external/bsd/libelf/dist/libelf_shdr.c
N src/external/bsd/libelf/dist/libelf_xlate.c
N src/external/bsd/libelf/dist/Makefile
N src/external/bsd/libelf/dist/README
N src/external/bsd/libelf/dist/Version.map

No conflicts created by 

CVS commit: src/external/bsd/libelf

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 05:45:28 UTC 2009

Added Files:
src/external/bsd/libelf: prepare-import.sh

Log Message:
Add a script to prepare libelf for import.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libelf/prepare-import.sh

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/libelf/prepare-import.sh
diff -u /dev/null src/external/bsd/libelf/prepare-import.sh:1.1
--- /dev/null	Sat Dec 19 05:45:28 2009
+++ src/external/bsd/libelf/prepare-import.sh	Sat Dec 19 05:45:28 2009
@@ -0,0 +1,42 @@
+#!/bin/sh
+# $NetBSD: prepare-import.sh,v 1.1 2009/12/19 05:45:28 thorpej Exp $
+
+# Copy the FreeBSD src/lib/libelf directory contents to dist.  Run
+# this script and you're done.
+#
+# lib/ is built as SUBDIR from external/lib/Makefile.
+#
+# Use the following template to import
+#  cvs import src/external/bsd/libelf/dist FreeBSD FreeBSD-X-Y-Z
+#
+# don't forget to bump the lib/shlib_version if necessary
+#
+
+set -e
+
+echo Adding RCS tags ..
+for f in $(grep -RL '\$NetBSD.*\$' dist | grep -v CVS); do
+case $f in
+*.[ch] | *.m4)
+	cat -  ${f}_tmp - EOF
+		/*	\$NetBSD\$	*/
+
+	EOF
+	sed -e 's,^__FBSDID.*,\/\*  \*\/\
+__RCSID\(\\$NetBSD\$\\)\;,g' ${f}  ${f}_tmp
+	mv ${f}_tmp ${f}
+	;;
+*.[0-9])
+	cat - ${f}  ${f}_tmp - EOF
+		.\	\$NetBSD\$
+		.\
+	EOF
+	mv ${f}_tmp ${f}
+	;;
+*)
+	echo No RCS tag added to ${f}
+	;;
+esac
+done
+
+echo prepare-import done



CVS commit: src/external/bsd/libelf

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 05:52:01 UTC 2009

Added Files:
src/external/bsd/libelf: Makefile Makefile.inc
src/external/bsd/libelf/lib: Makefile shlib_version

Log Message:
Initial build glue for libelf.  Still a work-in-progress.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libelf/Makefile \
src/external/bsd/libelf/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/libelf/lib/Makefile \
src/external/bsd/libelf/lib/shlib_version

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/libelf/Makefile
diff -u /dev/null src/external/bsd/libelf/Makefile:1.1
--- /dev/null	Sat Dec 19 05:52:01 2009
+++ src/external/bsd/libelf/Makefile	Sat Dec 19 05:52:01 2009
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/19 05:52:01 thorpej Exp $
+
+SUBDIR=		lib
+
+.include bsd.subdir.mk
Index: src/external/bsd/libelf/Makefile.inc
diff -u /dev/null src/external/bsd/libelf/Makefile.inc:1.1
--- /dev/null	Sat Dec 19 05:52:01 2009
+++ src/external/bsd/libelf/Makefile.inc	Sat Dec 19 05:52:01 2009
@@ -0,0 +1,11 @@
+#	$NetBSD: Makefile.inc,v 1.1 2009/12/19 05:52:01 thorpej Exp $
+
+.include bsd.own.mk
+
+LIBELF_DIR=	${NETBSDSRCDIR}/external/bsd/libelf/dist
+
+CPPFLAGS+=	-I${LIBELF_DIR}
+
+WARNS?=		4
+
+.PATH:		${LIBELF_DIR}

Index: src/external/bsd/libelf/lib/Makefile
diff -u /dev/null src/external/bsd/libelf/lib/Makefile:1.1
--- /dev/null	Sat Dec 19 05:52:01 2009
+++ src/external/bsd/libelf/lib/Makefile	Sat Dec 19 05:52:01 2009
@@ -0,0 +1,144 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/19 05:52:01 thorpej Exp $
+
+.include bsd.init.mk
+
+LIB=		elf
+
+SRCS=		elf_begin.c		\
+		elf_cntl.c		\
+		elf_end.c elf_errmsg.c elf_errno.c			\
+		elf_data.c		\
+		elf_fill.c elf_flag.c	\
+		elf_getarhdr.c elf_getarsym.c elf_getbase.c		\
+		elf_getident.c	\
+		elf_hash.c		\
+		elf_kind.c		\
+		elf_memory.c		\
+		elf_next.c		\
+		elf_rand.c elf_rawfile.c\
+		elf_phnum.c		\
+		elf_shnum.c elf_shstrndx.c elf_scn.c elf_strptr.c	\
+		elf_update.c		\
+		elf_version.c		\
+		gelf_cap.c		\
+		gelf_checksum.c		\
+		gelf_dyn.c		\
+		gelf_ehdr.c		\
+		gelf_getclass.c		\
+		gelf_fsize.c		\
+		gelf_move.c		\
+		gelf_phdr.c		\
+		gelf_rel.c gelf_rela.c	\
+		gelf_shdr.c gelf_sym.c gelf_syminfo.c gelf_symshndx.c	\
+		gelf_xlate.c		\
+		libelf.c		\
+		libelf_align.c libelf_allocate.c libelf_ar.c		\
+		libelf_checksum.c	\
+		libelf_data.c		\
+		libelf_ehdr.c libelf_extended.c\
+		libelf_phdr.c		\
+		libelf_shdr.c		\
+		libelf_xlate.c		\
+		${LIBELF_GENSRCS}
+
+INCS=		libelf.h gelf.h
+INCSDIR=	/usr/include
+
+LIBELF_GENSRCS=	libelf_fsize.c libelf_msize.c libelf_convert.c
+
+CLEANFILES+=	${LIBELF_GENSRCS}
+CPPFLAGS+=	-I${.CURDIR}
+
+MAN=		elf.3			\
+		elf_begin.3		\
+		elf_cntl.3		\
+		elf_end.3 elf_errmsg.3	\
+		elf_fill.3 elf_flagdata.3\
+		elf_getarhdr.3 elf_getarsym.3 elf_getbase.3		\
+		elf_getdata.3 elf_getident.3 elf_getscn.3		\
+		elf_getphnum.3 elf_getshnum.3 elf_getshstrndx.3	\
+		elf_hash.3		\
+		elf_kind.3		\
+		elf_memory.3		\
+		elf_next.3		\
+		elf_rawfile.3 elf_rand.3\
+		elf_strptr.3		\
+		elf_update.3		\
+		elf_version.3		\
+		gelf.3			\
+		gelf_checksum.3		\
+		gelf_fsize.3		\
+		gelf_getcap.3 gelf_getclass.3 gelf_getdyn.3		\
+		gelf_getehdr.3 gelf_getmove.3 gelf_getphdr.3	\
+		gelf_getrel.3 gelf_getrela.3 gelf_getshdr.3		\
+		gelf_getsym.3 gelf_getsyminfo.3 gelf_getsymshndx.3	\
+		gelf_newehdr.3 gelf_hewphdr.3\
+		gelf_update_ehdr.3	\
+		gelf_xlatetof.3
+
+MLINKS+=	elf_errmsg.3 elf_errno.3
+
+MLINKS+=	elf_flagdata.3 elf_flagehdr.3
+MLINKS+=	elf_flagdata.3 elf_flagelf.3
+MLINKS+=	elf_flagdata.3 elf_flagphdr.3
+MLINKS+=	elf_flagdata.3 elf_flagscn.3
+MLINKS+=	elf_flagdata.3 elf_flagshdr.3
+
+MLINKS+=	elf_getdata.3 elf_newdata.3
+MLINKS+=	elf_getdata.3 elf_rawdata.3
+
+MLINKS+=	elf_getscn.3 elf_ndxscn.3
+MLINKS+=	elf_getscn.3 elf_newscn.3
+MLINKS+=	elf_getscn.3 elf_nextscn.3
+
+MLINKS+=	elf_getshstrndx.3 elf_setshstrndx.3
+
+MLINKS+=	gelf_getcap.3 gelf_update_cap.3
+
+MLINKS+=	gelf_getdyn.3 gelf_update_dyn.3
+
+MLINKS+=	gelf_getmove.3 gelf_update_move.3
+
+MLINKS+=	gelf_getrel.3 gelf_update_rel.3
+
+MLINKS+=	gelf_getrela.3 gelf_update_rela.3
+
+MLINKS+=	gelf_getsym.3 gelf_update_sym.3
+
+MLINKS+=	gelf_getsyminfo.3 gelf_update_syminfo.3
+
+MLINKS+=	gelf_getsymshndx.3 gelf_update_symshndx.3
+
+MLINKS+=	gelf_update_ehdr.3 gelf_update_phdr.3
+
+MLINKS+=	gelf_update_ehdr.3 gelf_update_shdr.3
+
+MLINKS+=	gelf_xlatetof.3 gelf_xlatetom.3
+
+.for E in 32 64
+MLINKS+=	gelf_checksum.3 elf${E}_checksum.3
+MLINKS+=	gelf_fsize.3 elf${E}_fsize.3
+MLINKS+=	gelf_getehdr.3 elf${E}_getehdr.3
+MLINKS+=	gelf_getphdr.3 elf${E}_getphdr.3
+MLINKS+=	gelf_getshdr.3 

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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 05:55:37 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: _libelf.h elf_scn.c elf_update.c
libelf_allocate.c libelf_ar.c libelf_convert.m4 libelf_ehdr.c

Log Message:
while (0) - while (/*CONSTCOND*/0)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libelf/dist/_libelf.h \
src/external/bsd/libelf/dist/elf_scn.c \
src/external/bsd/libelf/dist/elf_update.c \
src/external/bsd/libelf/dist/libelf_allocate.c \
src/external/bsd/libelf/dist/libelf_ar.c \
src/external/bsd/libelf/dist/libelf_convert.m4 \
src/external/bsd/libelf/dist/libelf_ehdr.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/libelf/dist/_libelf.h
diff -u src/external/bsd/libelf/dist/_libelf.h:1.1.1.1 src/external/bsd/libelf/dist/_libelf.h:1.2
--- src/external/bsd/libelf/dist/_libelf.h:1.1.1.1	Sat Dec 19 05:43:39 2009
+++ src/external/bsd/libelf/dist/_libelf.h	Sat Dec 19 05:55:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: _libelf.h,v 1.1.1.1 2009/12/19 05:43:39 thorpej Exp $	*/
+/*	$NetBSD: _libelf.h,v 1.2 2009/12/19 05:55:37 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -63,7 +63,7 @@
 #define	LIBELF_SET_ERROR(E, O) do {	\
 	LIBELF_PRIVATE(error) = ((ELF_E_##E  LIBELF_ELF_ERROR_MASK)|	\
 	((O)  LIBELF_OS_ERROR_SHIFT));\
-	} while (0)
+	} while (/*CONSTCOND*/0)
 
 #define	LIBELF_ADJUST_AR_SIZE(S)	(((S) + 1U)  ~1U)
 
@@ -145,7 +145,7 @@
 			return (0);			\
 		}	\
 		(DST)-NAME = (SRC)-NAME;		\
-	} while (0)
+	} while (/*CONSTCOND*/0)
 
 #define	LIBELF_COPY_S32(DST,SRC,NAME)	do {		\
 		if ((SRC)-NAME  INT_MAX ||		\
@@ -154,7 +154,7 @@
 			return (0);			\
 		}	\
 		(DST)-NAME = (SRC)-NAME;		\
-	} while (0)
+	} while (/*CONSTCOND*/0)
 
 
 /*
Index: src/external/bsd/libelf/dist/elf_scn.c
diff -u src/external/bsd/libelf/dist/elf_scn.c:1.1.1.1 src/external/bsd/libelf/dist/elf_scn.c:1.2
--- src/external/bsd/libelf/dist/elf_scn.c:1.1.1.1	Sat Dec 19 05:43:39 2009
+++ src/external/bsd/libelf/dist/elf_scn.c	Sat Dec 19 05:55:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_scn.c,v 1.1.1.1 2009/12/19 05:43:39 thorpej Exp $	*/
+/*	$NetBSD: elf_scn.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/elf_scn.c,v 1.2.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: elf_scn.c,v 1.1.1.1 2009/12/19 05:43:39 thorpej Exp $);
+__RCSID($NetBSD: elf_scn.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $);
 
 #include assert.h
 #include errno.h
@@ -63,7 +63,7 @@
 			LIBELF_SET_ERROR(HEADER, 0);		\
 			return (0);\
 		}		\
-	} while (0)
+	} while (/*CONSTCOND*/0)
 
 	ec = e-e_class;
 	fsz = _libelf_fsize(ELF_T_SHDR, ec, e-e_version, (size_t) 1);
Index: src/external/bsd/libelf/dist/elf_update.c
diff -u src/external/bsd/libelf/dist/elf_update.c:1.1.1.1 src/external/bsd/libelf/dist/elf_update.c:1.2
--- src/external/bsd/libelf/dist/elf_update.c:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/elf_update.c	Sat Dec 19 05:55:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_update.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $	*/
+/*	$NetBSD: elf_update.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006-2008 Joseph Koshy
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/elf_update.c,v 1.5.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: elf_update.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $);
+__RCSID($NetBSD: elf_update.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $);
 
 #include sys/mman.h
 #include sys/param.h
@@ -430,7 +430,7 @@
 		(size_t) 1);	\
 		(E)-e_shentsize = _libelf_fsize(ELF_T_SHDR, (EC), (V),	\
 		(size_t) 1);	\
-	} while (0)
+	} while (/*CONSTCOND*/0)
 
 	if (ec == ELFCLASS32)
 		INITIALIZE_EHDR(eh32, ec, eh_version);
Index: src/external/bsd/libelf/dist/libelf_allocate.c
diff -u src/external/bsd/libelf/dist/libelf_allocate.c:1.1.1.1 src/external/bsd/libelf/dist/libelf_allocate.c:1.2
--- src/external/bsd/libelf/dist/libelf_allocate.c:1.1.1.1	Sat Dec 19 05:43:41 2009
+++ src/external/bsd/libelf/dist/libelf_allocate.c	Sat Dec 19 05:55:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_allocate.c,v 1.1.1.1 2009/12/19 05:43:41 thorpej Exp $	*/
+/*	$NetBSD: libelf_allocate.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -32,7 +32,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf_allocate.c,v 1.2.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf_allocate.c,v 1.1.1.1 2009/12/19 05:43:41 thorpej Exp $);
+__RCSID($NetBSD: libelf_allocate.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $);
 
 #include sys/errno.h
 
@@ -91,7 +91,7 @@
 #define	FREE(P)		do {\
 		if (P)	\
 			free(P);			\
-	} while 

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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 06:22:25 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: elf_begin.c libelf_allocate.c

Log Message:
sys/errno.h - errno.h


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libelf/dist/elf_begin.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libelf/dist/libelf_allocate.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/libelf/dist/elf_begin.c
diff -u src/external/bsd/libelf/dist/elf_begin.c:1.1.1.1 src/external/bsd/libelf/dist/elf_begin.c:1.2
--- src/external/bsd/libelf/dist/elf_begin.c:1.1.1.1	Sat Dec 19 05:43:39 2009
+++ src/external/bsd/libelf/dist/elf_begin.c	Sat Dec 19 06:22:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_begin.c,v 1.1.1.1 2009/12/19 05:43:39 thorpej Exp $	*/
+/*	$NetBSD: elf_begin.c,v 1.2 2009/12/19 06:22:25 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,15 +28,15 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/elf_begin.c,v 1.1.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: elf_begin.c,v 1.1.1.1 2009/12/19 05:43:39 thorpej Exp $);
+__RCSID($NetBSD: elf_begin.c,v 1.2 2009/12/19 06:22:25 thorpej Exp $);
 
 #include sys/types.h
-#include sys/errno.h
 #include sys/mman.h
 #include sys/stat.h
 
 #include ar.h
 #include ctype.h
+#include errno.h
 #include libelf.h
 
 #include _libelf.h

Index: src/external/bsd/libelf/dist/libelf_allocate.c
diff -u src/external/bsd/libelf/dist/libelf_allocate.c:1.2 src/external/bsd/libelf/dist/libelf_allocate.c:1.3
--- src/external/bsd/libelf/dist/libelf_allocate.c:1.2	Sat Dec 19 05:55:37 2009
+++ src/external/bsd/libelf/dist/libelf_allocate.c	Sat Dec 19 06:22:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_allocate.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $	*/
+/*	$NetBSD: libelf_allocate.c,v 1.3 2009/12/19 06:22:25 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -32,11 +32,10 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf_allocate.c,v 1.2.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf_allocate.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $);
-
-#include sys/errno.h
+__RCSID($NetBSD: libelf_allocate.c,v 1.3 2009/12/19 06:22:25 thorpej Exp $);
 
 #include assert.h
+#include errno.h
 #include libelf.h
 #include stdlib.h
 #include string.h



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 06:39:29 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: gelf_cap.c gelf_dyn.c gelf_ehdr.c
gelf_move.c gelf_phdr.c gelf_rel.c gelf_rela.c gelf_shdr.c
gelf_sym.c gelf_syminfo.c gelf_symshndx.c

Log Message:
sys/limits.h - limits.h


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libelf/dist/gelf_cap.c \
src/external/bsd/libelf/dist/gelf_dyn.c \
src/external/bsd/libelf/dist/gelf_ehdr.c \
src/external/bsd/libelf/dist/gelf_move.c \
src/external/bsd/libelf/dist/gelf_phdr.c \
src/external/bsd/libelf/dist/gelf_rel.c \
src/external/bsd/libelf/dist/gelf_rela.c \
src/external/bsd/libelf/dist/gelf_shdr.c \
src/external/bsd/libelf/dist/gelf_sym.c \
src/external/bsd/libelf/dist/gelf_syminfo.c \
src/external/bsd/libelf/dist/gelf_symshndx.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/libelf/dist/gelf_cap.c
diff -u src/external/bsd/libelf/dist/gelf_cap.c:1.1.1.1 src/external/bsd/libelf/dist/gelf_cap.c:1.2
--- src/external/bsd/libelf/dist/gelf_cap.c:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/gelf_cap.c	Sat Dec 19 06:39:29 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gelf_cap.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $	*/
+/*	$NetBSD: gelf_cap.c,v 1.2 2009/12/19 06:39:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,11 +28,10 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/gelf_cap.c,v 1.2.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: gelf_cap.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $);
-
-#include sys/limits.h
+__RCSID($NetBSD: gelf_cap.c,v 1.2 2009/12/19 06:39:29 thorpej Exp $);
 
 #include assert.h
+#include limits.h
 #include gelf.h
 #include osreldate.h
 
Index: src/external/bsd/libelf/dist/gelf_dyn.c
diff -u src/external/bsd/libelf/dist/gelf_dyn.c:1.1.1.1 src/external/bsd/libelf/dist/gelf_dyn.c:1.2
--- src/external/bsd/libelf/dist/gelf_dyn.c:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/gelf_dyn.c	Sat Dec 19 06:39:29 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gelf_dyn.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $	*/
+/*	$NetBSD: gelf_dyn.c,v 1.2 2009/12/19 06:39:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,11 +28,10 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/gelf_dyn.c,v 1.1.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: gelf_dyn.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $);
-
-#include sys/limits.h
+__RCSID($NetBSD: gelf_dyn.c,v 1.2 2009/12/19 06:39:29 thorpej Exp $);
 
 #include assert.h
+#include limits.h
 #include gelf.h
 
 #include _libelf.h
Index: src/external/bsd/libelf/dist/gelf_ehdr.c
diff -u src/external/bsd/libelf/dist/gelf_ehdr.c:1.1.1.1 src/external/bsd/libelf/dist/gelf_ehdr.c:1.2
--- src/external/bsd/libelf/dist/gelf_ehdr.c:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/gelf_ehdr.c	Sat Dec 19 06:39:29 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gelf_ehdr.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $	*/
+/*	$NetBSD: gelf_ehdr.c,v 1.2 2009/12/19 06:39:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,11 +28,10 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/gelf_ehdr.c,v 1.1.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: gelf_ehdr.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $);
-
-#include sys/limits.h
+__RCSID($NetBSD: gelf_ehdr.c,v 1.2 2009/12/19 06:39:29 thorpej Exp $);
 
 #include assert.h
+#include limits.h
 #include gelf.h
 #include libelf.h
 #include string.h
Index: src/external/bsd/libelf/dist/gelf_move.c
diff -u src/external/bsd/libelf/dist/gelf_move.c:1.1.1.1 src/external/bsd/libelf/dist/gelf_move.c:1.2
--- src/external/bsd/libelf/dist/gelf_move.c:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/gelf_move.c	Sat Dec 19 06:39:29 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gelf_move.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $	*/
+/*	$NetBSD: gelf_move.c,v 1.2 2009/12/19 06:39:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,11 +28,10 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/gelf_move.c,v 1.2.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: gelf_move.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $);
-
-#include sys/limits.h
+__RCSID($NetBSD: gelf_move.c,v 1.2 2009/12/19 06:39:29 thorpej Exp $);
 
 #include assert.h
+#include limits.h
 #include gelf.h
 #include osreldate.h
 
Index: src/external/bsd/libelf/dist/gelf_phdr.c
diff -u src/external/bsd/libelf/dist/gelf_phdr.c:1.1.1.1 src/external/bsd/libelf/dist/gelf_phdr.c:1.2
--- src/external/bsd/libelf/dist/gelf_phdr.c:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/gelf_phdr.c	Sat Dec 19 06:39:29 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gelf_phdr.c,v 1.1.1.1 

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

2009-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 19 06:58:30 UTC 2009

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

Log Message:
Change pmap_steal_memory to map allocated memory in XKPHYS is _LP64 kernels.
The CCA used is the one used for KSEG0.


To generate a diff of this commit:
cvs rdiff -u -r1.179.16.5 -r1.179.16.6 src/sys/arch/mips/mips/pmap.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/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.179.16.5 src/sys/arch/mips/mips/pmap.c:1.179.16.6
--- src/sys/arch/mips/mips/pmap.c:1.179.16.5	Tue Sep  8 08:11:29 2009
+++ src/sys/arch/mips/mips/pmap.c	Sat Dec 19 06:58:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.179.16.5 2009/09/08 08:11:29 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.179.16.6 2009/12/19 06:58:30 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.179.16.5 2009/09/08 08:11:29 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.179.16.6 2009/12/19 06:58:30 matt Exp $);
 
 /*
  *	Manages physical address maps.
@@ -436,7 +436,6 @@
 vaddr_t
 pmap_steal_memory(vsize_t size, vaddr_t *vstartp, vaddr_t *vendp)
 {
-	int bank, x;
 	u_int npgs;
 	paddr_t pa;
 	vaddr_t va;
@@ -444,7 +443,7 @@
 	size = round_page(size);
 	npgs = atop(size);
 
-	for (bank = 0; bank  vm_nphysseg; bank++) {
+	for (u_int bank = 0; bank  vm_nphysseg; bank++) {
 		if (uvm.page_init_done == true)
 			panic(pmap_steal_memory: called _after_ bootstrap);
 
@@ -472,21 +471,30 @@
 
 			/* Remove this segment from the list. */
 			vm_nphysseg--;
-			for (x = bank; x  vm_nphysseg; x++) {
+			for (u_int x = bank; x  vm_nphysseg; x++) {
 /* structure copy */
 vm_physmem[x] = vm_physmem[x + 1];
 			}
 		}
 
+#ifdef _LP64
 		/*
-		 * We don't use XKPHYS here since we don't know what CCA
-		 * to use for cached access yet.
+		 * Use the same CCA as used to access KSEG0 for XKPHYS.
 		 */
-		if (pa + size  MIPS_KSEG1_START)
-			panic(pmap_steal_memory: 
-			  pa can not be mapped into K0);
+		uint32_t v;
+
+		__asm __volatile(mfc0 %0,$%1
+		: =r(v)
+		: n(MIPS_COP_0_CONFIG));
 
+		va = MIPS_PHYS_TO_XKPHYS(v  MIPS3_CONFIG_K0_MASK, pa);
+#else
+		if (pa + size  MIPS_PHYS_MASK + 1)
+			panic(pmap_steal_memory: pa %PRIxPADDR
+			 can not be mapped into KSEG0, pa);
 		va = MIPS_PHYS_TO_KSEG0(pa);
+#endif
+
 		memset((void *)va, 0, size);
 		return va;
 	}



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

2009-12-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Dec 19 07:08:23 UTC 2009

Modified Files:
src/sys/arch/hpcsh/dev: psh3tp.c

Log Message:
http://mail-index.netbsd.org/source-changes/2009/04/05/msg219234.html


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpcsh/dev/psh3tp.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/hpcsh/dev/psh3tp.c
diff -u src/sys/arch/hpcsh/dev/psh3tp.c:1.12 src/sys/arch/hpcsh/dev/psh3tp.c:1.13
--- src/sys/arch/hpcsh/dev/psh3tp.c:1.12	Mon Mar 31 15:49:29 2008
+++ src/sys/arch/hpcsh/dev/psh3tp.c	Sat Dec 19 07:08:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: psh3tp.c,v 1.12 2008/03/31 15:49:29 kiyohara Exp $	*/
+/*	$NetBSD: psh3tp.c,v 1.13 2009/12/19 07:08:23 kiyohara Exp $	*/
 /*
  * Copyright (c) 2005 KIYOHARA Takashi
  * All rights reserved.
@@ -198,6 +198,9 @@
 	intc_intr_establish(SH7709_INTEVT2_IRQ2,
 	IST_EDGE, IPL_TTY, psh3tp_intr, sc);
 	intc_intr_disable(SH7709_INTEVT2_IRQ2);
+
+ 	if (!pmf_device_register(self, NULL, NULL))
+ 		aprint_error_dev(self, unable to establish power handler\n);
 }
 
 



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

2009-12-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Dec 19 07:08:55 UTC 2009

Modified Files:
src/sys/arch/hpcsh/dev: psh3lcd.c

Log Message:
http://mail-index.netbsd.org/source-changes/2009/04/05/msg219235.html


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hpcsh/dev/psh3lcd.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/hpcsh/dev/psh3lcd.c
diff -u src/sys/arch/hpcsh/dev/psh3lcd.c:1.4 src/sys/arch/hpcsh/dev/psh3lcd.c:1.5
--- src/sys/arch/hpcsh/dev/psh3lcd.c:1.4	Mon Mar 31 15:49:29 2008
+++ src/sys/arch/hpcsh/dev/psh3lcd.c	Sat Dec 19 07:08:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: psh3lcd.c,v 1.4 2008/03/31 15:49:29 kiyohara Exp $	*/
+/*	$NetBSD: psh3lcd.c,v 1.5 2009/12/19 07:08:55 kiyohara Exp $	*/
 /*
  * Copyright (c) 2005 KIYOHARA Takashi
  * All rights reserved.
@@ -287,6 +287,10 @@
 	/* LCD on/off hook */
 	config_hook(CONFIG_HOOK_POWERCONTROL,
 	CONFIG_HOOK_POWERCONTROL_LCD, CONFIG_HOOK_SHARE, psh3lcd_power, sc);
+
+ 	/* XXX: TODO: don't rely on CONFIG_HOOK_POWERCONTROL_LCD */
+ 	if (!pmf_device_register(self, NULL, NULL))
+ 		aprint_error_dev(self, unable to establish power handler\n);
 }
 
 



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

2009-12-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Dec 19 07:09:28 UTC 2009

Modified Files:
src/sys/arch/hpcsh/dev: psh3pwr.c

Log Message:
http://mail-index.netbsd.org/source-changes/2009/04/05/msg219236.html


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hpcsh/dev/psh3pwr.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/hpcsh/dev/psh3pwr.c
diff -u src/sys/arch/hpcsh/dev/psh3pwr.c:1.3 src/sys/arch/hpcsh/dev/psh3pwr.c:1.4
--- src/sys/arch/hpcsh/dev/psh3pwr.c:1.3	Mon Mar 31 15:49:29 2008
+++ src/sys/arch/hpcsh/dev/psh3pwr.c	Sat Dec 19 07:09:28 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: psh3pwr.c,v 1.3 2008/03/31 15:49:29 kiyohara Exp $	*/
+/*	$NetBSD: psh3pwr.c,v 1.4 2009/12/19 07:09:28 kiyohara Exp $	*/
 /*
  * Copyright (c) 2005, 2007 KIYOHARA Takashi
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: psh3pwr.c,v 1.3 2008/03/31 15:49:29 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: psh3pwr.c,v 1.4 2009/12/19 07:09:28 kiyohara Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -157,6 +157,9 @@
 	/* : WindowsCE sets this bit. */
 	aprint_normal_dev(self, plug status: %s\n,
 	psh3pwr_ac_is_off() ? out : in);
+
+ 	if (!pmf_device_register(self, NULL, NULL))
+ 		aprint_error_dev(self, unable to establish power handler\n);
 }
 
 



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:31:04 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: elf_types.m4 gelf.h gelf_cap.c
gelf_move.c gelf_syminfo.c libelf.h libelf_align.c
libelf_convert.m4 libelf_data.c libelf_fsize.m4 libelf_msize.m4

Log Message:
Centralize dependency on __FreeBSD_version into libelf.h, and generalize
the conditional inclusion of API/ELF features so that it works with NetBSD
as well.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libelf/dist/elf_types.m4 \
src/external/bsd/libelf/dist/gelf.h src/external/bsd/libelf/dist/libelf.h \
src/external/bsd/libelf/dist/libelf_align.c \
src/external/bsd/libelf/dist/libelf_data.c \
src/external/bsd/libelf/dist/libelf_fsize.m4 \
src/external/bsd/libelf/dist/libelf_msize.m4
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libelf/dist/gelf_cap.c \
src/external/bsd/libelf/dist/gelf_move.c \
src/external/bsd/libelf/dist/gelf_syminfo.c \
src/external/bsd/libelf/dist/libelf_convert.m4

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/libelf/dist/elf_types.m4
diff -u src/external/bsd/libelf/dist/elf_types.m4:1.1.1.1 src/external/bsd/libelf/dist/elf_types.m4:1.2
--- src/external/bsd/libelf/dist/elf_types.m4:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/elf_types.m4	Sat Dec 19 07:31:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_types.m4,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $	*/
+/*	$NetBSD: elf_types.m4,v 1.2 2009/12/19 07:31:04 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -31,41 +31,36 @@
 /*
  * ELF types, defined in the enum Elf_Type API.
  *
- * The members of the list form a 3-tuple: (name, C-type-suffix, OSversion).
+ * The members of the list form a 3-tuple: (name, C-type-suffix, condition).
  * + `name' is an Elf_Type symbol without the `ELF_T_' prefix.
  * + `C-type-suffix' is the suffix for Elf32_ and Elf64_ type names.
- * + `version' is the OS version the symbol first appeared in.
- *
- * OS revisions of note are:
- * 600102 - The earliest (6.0-STABLE) version supported by this code.
- * 79 - Symbol versioning and ELF64 type changes.
- * 700025 - More ELF types and the introduction of libelf.
+ * + `condition' is the conditional check for this type.
  */
 
 define(`ELF_TYPE_LIST',
-	``ADDR,		Addr,	600102',
-	`BYTE,		Byte,	600102',
-	`CAP,		Cap,	700025',
-	`DYN,		Dyn,	600102',
-	`EHDR,		Ehdr,	600102',
-	`HALF,		Half,	600102',
-	`LWORD,		Lword,	700025',
-	`MOVE,		Move,	700025',
-	`MOVEP,		MoveP,	700025',
-	`NOTE,		Note,	600102',
-	`OFF,		Off,	600102',
-	`PHDR,		Phdr,	600102',
-	`REL,		Rel,	600102',
-	`RELA,		Rela,	600102',
-	`SHDR,		Shdr,	600102',
-	`SWORD,		Sword,	600102',
-	`SXWORD,	Sxword,	79',
-	`SYMINFO,	Syminfo, 700025',
-	`SYM,		Sym,	600102',
-	`VDEF,		Verdef,	79',
-	`VNEED,		Verneed, 79',
-	`WORD,		Word,	600102',
-	`XWORD,		Xword,	79',
+	``ADDR,		Addr,	1',
+	`BYTE,		Byte,	1',
+	`CAP,		Cap,	__LIBELF_HAVE_ELF_CAP',
+	`DYN,		Dyn,	1',
+	`EHDR,		Ehdr,	1',
+	`HALF,		Half,	1',
+	`LWORD,		Lword,	__LIBELF_HAVE_ELF_MOVE',
+	`MOVE,		Move,	__LIBELF_HAVE_ELF_MOVE',
+	`MOVEP,		MoveP,	__LIBELF_HAVE_ELF_MOVE',
+	`NOTE,		Note,	1',
+	`OFF,		Off,	1',
+	`PHDR,		Phdr,	1',
+	`REL,		Rel,	1',
+	`RELA,		Rela,	1',
+	`SHDR,		Shdr,	1',
+	`SWORD,		Sword,	1',
+	`SXWORD,	Sxword,	__LIBELF_HAVE_ELF_VERS',
+	`SYMINFO,	Syminfo, __LIBELF_HAVE_ELF_SYMINFO',
+	`SYM,		Sym,	1',
+	`VDEF,		Verdef,	__LIBELF_HAVE_ELF_VERS',
+	`VNEED,		Verneed, __LIBELF_HAVE_ELF_VERS',
+	`WORD,		Word,	1',
+	`XWORD,		Xword,	__LIBELF_HAVE_ELF_VERS',
 	`NUM,		_,	_'')
 
 /*
Index: src/external/bsd/libelf/dist/gelf.h
diff -u src/external/bsd/libelf/dist/gelf.h:1.1.1.1 src/external/bsd/libelf/dist/gelf.h:1.2
--- src/external/bsd/libelf/dist/gelf.h:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/gelf.h	Sat Dec 19 07:31:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gelf.h,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $	*/
+/*	$NetBSD: gelf.h,v 1.2 2009/12/19 07:31:04 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -34,7 +34,6 @@
 #include sys/cdefs.h
 
 #include libelf.h
-#include osreldate.h
 
 typedef Elf64_Addr	GElf_Addr;	/* Addresses */
 typedef Elf64_Half	GElf_Half;	/* Half words (16 bit) */
@@ -52,9 +51,13 @@
 typedef Elf64_Rel	GElf_Rel;	/* Relocation entries */
 typedef Elf64_Rela	GElf_Rela;	/* Relocation entries with addend */
 
-#if	__FreeBSD_version = 700025
+#if defined(__LIBELF_HAVE_ELF_CAP)
 typedef	Elf64_Cap	GElf_Cap;	/* SW/HW capabilities */
+#endif
+#if defined(__LIBELF_HAVE_ELF_MOVE)
 typedef Elf64_Move	GElf_Move;	/* Move entries */
+#endif
+#if defined(__LIBELF_HAVE_ELF_SYMINFO)
 typedef Elf64_Syminfo	GElf_Syminfo;	/* Symbol information */
 #endif
 
@@ -102,14 +105,21 @@
 Elf_Data 	*gelf_xlatetof(Elf *_elf, Elf_Data *_dst, const Elf_Data *_src, unsigned int _encode);
 

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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:31:44 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: libelf_convert.m4 libelf_fsize.m4
libelf_msize.m4

Log Message:
Don't need to include osreldate.h here.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libelf/dist/libelf_convert.m4
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libelf/dist/libelf_fsize.m4 \
src/external/bsd/libelf/dist/libelf_msize.m4

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/libelf/dist/libelf_convert.m4
diff -u src/external/bsd/libelf/dist/libelf_convert.m4:1.3 src/external/bsd/libelf/dist/libelf_convert.m4:1.4
--- src/external/bsd/libelf/dist/libelf_convert.m4:1.3	Sat Dec 19 07:31:04 2009
+++ src/external/bsd/libelf/dist/libelf_convert.m4	Sat Dec 19 07:31:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_convert.m4,v 1.3 2009/12/19 07:31:04 thorpej Exp $	*/
+/*	$NetBSD: libelf_convert.m4,v 1.4 2009/12/19 07:31:44 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006,2007 Joseph Koshy
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf_convert.m4,v 1.4.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf_convert.m4,v 1.3 2009/12/19 07:31:04 thorpej Exp $);
+__RCSID($NetBSD: libelf_convert.m4,v 1.4 2009/12/19 07:31:44 thorpej Exp $);
 
 #include sys/types.h
 #include sys/elf32.h
@@ -36,7 +36,6 @@
 
 #include assert.h
 #include libelf.h
-#include osreldate.h
 #include string.h
 
 #include _libelf.h

Index: src/external/bsd/libelf/dist/libelf_fsize.m4
diff -u src/external/bsd/libelf/dist/libelf_fsize.m4:1.2 src/external/bsd/libelf/dist/libelf_fsize.m4:1.3
--- src/external/bsd/libelf/dist/libelf_fsize.m4:1.2	Sat Dec 19 07:31:04 2009
+++ src/external/bsd/libelf/dist/libelf_fsize.m4	Sat Dec 19 07:31:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_fsize.m4,v 1.2 2009/12/19 07:31:04 thorpej Exp $	*/
+/*	$NetBSD: libelf_fsize.m4,v 1.3 2009/12/19 07:31:44 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -29,7 +29,6 @@
  */
 
 #include libelf.h
-#include osreldate.h
 
 #include _libelf.h
 
Index: src/external/bsd/libelf/dist/libelf_msize.m4
diff -u src/external/bsd/libelf/dist/libelf_msize.m4:1.2 src/external/bsd/libelf/dist/libelf_msize.m4:1.3
--- src/external/bsd/libelf/dist/libelf_msize.m4:1.2	Sat Dec 19 07:31:04 2009
+++ src/external/bsd/libelf/dist/libelf_msize.m4	Sat Dec 19 07:31:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_msize.m4,v 1.2 2009/12/19 07:31:04 thorpej Exp $	*/
+/*	$NetBSD: libelf_msize.m4,v 1.3 2009/12/19 07:31:44 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf_msize.m4,v 1.2.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf_msize.m4,v 1.2 2009/12/19 07:31:04 thorpej Exp $);
+__RCSID($NetBSD: libelf_msize.m4,v 1.3 2009/12/19 07:31:44 thorpej Exp $);
 
 #include sys/types.h
 #include sys/elf32.h
@@ -36,7 +36,6 @@
 
 #include assert.h
 #include libelf.h
-#include osreldate.h
 #include string.h
 
 #include _libelf.h



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:33:06 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: libelf_convert.m4 libelf_msize.m4

Log Message:
libelf.h is responsible for including sys/elf32.h and sys/elf64.h on
FreeBSD; no need to do it here.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libelf/dist/libelf_convert.m4
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libelf/dist/libelf_msize.m4

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/libelf/dist/libelf_convert.m4
diff -u src/external/bsd/libelf/dist/libelf_convert.m4:1.4 src/external/bsd/libelf/dist/libelf_convert.m4:1.5
--- src/external/bsd/libelf/dist/libelf_convert.m4:1.4	Sat Dec 19 07:31:44 2009
+++ src/external/bsd/libelf/dist/libelf_convert.m4	Sat Dec 19 07:33:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_convert.m4,v 1.4 2009/12/19 07:31:44 thorpej Exp $	*/
+/*	$NetBSD: libelf_convert.m4,v 1.5 2009/12/19 07:33:06 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006,2007 Joseph Koshy
@@ -28,11 +28,9 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf_convert.m4,v 1.4.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf_convert.m4,v 1.4 2009/12/19 07:31:44 thorpej Exp $);
+__RCSID($NetBSD: libelf_convert.m4,v 1.5 2009/12/19 07:33:06 thorpej Exp $);
 
 #include sys/types.h
-#include sys/elf32.h
-#include sys/elf64.h
 
 #include assert.h
 #include libelf.h

Index: src/external/bsd/libelf/dist/libelf_msize.m4
diff -u src/external/bsd/libelf/dist/libelf_msize.m4:1.3 src/external/bsd/libelf/dist/libelf_msize.m4:1.4
--- src/external/bsd/libelf/dist/libelf_msize.m4:1.3	Sat Dec 19 07:31:44 2009
+++ src/external/bsd/libelf/dist/libelf_msize.m4	Sat Dec 19 07:33:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_msize.m4,v 1.3 2009/12/19 07:31:44 thorpej Exp $	*/
+/*	$NetBSD: libelf_msize.m4,v 1.4 2009/12/19 07:33:06 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,11 +28,9 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf_msize.m4,v 1.2.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf_msize.m4,v 1.3 2009/12/19 07:31:44 thorpej Exp $);
+__RCSID($NetBSD: libelf_msize.m4,v 1.4 2009/12/19 07:33:06 thorpej Exp $);
 
 #include sys/types.h
-#include sys/elf32.h
-#include sys/elf64.h
 
 #include assert.h
 #include libelf.h



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:37:35 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: libelf.c

Log Message:
machine/elf.h is a FreeBSD-specific header.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libelf/dist/libelf.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/libelf/dist/libelf.c
diff -u src/external/bsd/libelf/dist/libelf.c:1.1.1.1 src/external/bsd/libelf/dist/libelf.c:1.2
--- src/external/bsd/libelf/dist/libelf.c:1.1.1.1	Sat Dec 19 05:43:40 2009
+++ src/external/bsd/libelf/dist/libelf.c	Sat Dec 19 07:37:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $	*/
+/*	$NetBSD: libelf.c,v 1.2 2009/12/19 07:37:34 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,11 +28,13 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf.c,v 1.1.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf.c,v 1.1.1.1 2009/12/19 05:43:40 thorpej Exp $);
+__RCSID($NetBSD: libelf.c,v 1.2 2009/12/19 07:37:34 thorpej Exp $);
 
 #include sys/param.h
 
+#if defined(__FreeBSD__)
 #include machine/elf.h
+#endif /* __FreeBSD__ */
 #include machine/endian.h
 
 #include libelf.h



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:44:27 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: elf_scn.c

Log Message:
- _libelf_load_scn(): If shoff is larger than SSIZE_MAX, bail out with
  a HEADER error.  Pass lint.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libelf/dist/elf_scn.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/libelf/dist/elf_scn.c
diff -u src/external/bsd/libelf/dist/elf_scn.c:1.2 src/external/bsd/libelf/dist/elf_scn.c:1.3
--- src/external/bsd/libelf/dist/elf_scn.c:1.2	Sat Dec 19 05:55:37 2009
+++ src/external/bsd/libelf/dist/elf_scn.c	Sat Dec 19 07:44:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_scn.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $	*/
+/*	$NetBSD: elf_scn.c,v 1.3 2009/12/19 07:44:27 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,13 +28,15 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/elf_scn.c,v 1.2.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: elf_scn.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $);
+__RCSID($NetBSD: elf_scn.c,v 1.3 2009/12/19 07:44:27 thorpej Exp $);
 
 #include assert.h
 #include errno.h
 #include gelf.h
 #include libelf.h
+#include stddef.h
 #include stdlib.h
+#include limits.h
 
 #include _libelf.h
 
@@ -84,7 +86,11 @@
 	xlator = _libelf_get_translator(ELF_T_SHDR, ELF_TOMEMORY, ec);
 
 	swapbytes = e-e_byteorder != LIBELF_PRIVATE(byteorder);
-	src = e-e_rawfile + shoff;
+	if (shoff  SSIZE_MAX) {
+		LIBELF_SET_ERROR(HEADER, 0);
+		return (0);
+	}
+	src = e-e_rawfile + (ssize_t)shoff;
 
 	/*
 	 * If the file is using extended numbering then section #0
@@ -104,7 +110,7 @@
 		if ((scn = _libelf_allocate_scn(e, i)) == NULL)
 			return (0);
 
-		(*xlator)((char *) scn-s_shdr, src, (size_t) 1, swapbytes);
+		(*xlator)((void *) scn-s_shdr, src, (size_t) 1, swapbytes);
 
 		if (ec == ELFCLASS32) {
 			scn-s_offset = scn-s_rawoff =



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:47:23 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: _libelf.h

Log Message:
LIBELF_COPY_U32(), LIBELF_COPY_S32(): Make sure that the SRC values are
being compared as the maximum width and appropriate signed-ness.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libelf/dist/_libelf.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/libelf/dist/_libelf.h
diff -u src/external/bsd/libelf/dist/_libelf.h:1.2 src/external/bsd/libelf/dist/_libelf.h:1.3
--- src/external/bsd/libelf/dist/_libelf.h:1.2	Sat Dec 19 05:55:37 2009
+++ src/external/bsd/libelf/dist/_libelf.h	Sat Dec 19 07:47:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: _libelf.h,v 1.2 2009/12/19 05:55:37 thorpej Exp $	*/
+/*	$NetBSD: _libelf.h,v 1.3 2009/12/19 07:47:22 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -140,7 +140,7 @@
 };
 
 #define	LIBELF_COPY_U32(DST,SRC,NAME)	do {		\
-		if ((SRC)-NAME  UINT_MAX) {		\
+		if ((uint64_t)(SRC)-NAME  UINT_MAX) {	\
 			LIBELF_SET_ERROR(RANGE, 0);	\
 			return (0);			\
 		}	\
@@ -148,8 +148,8 @@
 	} while (/*CONSTCOND*/0)
 
 #define	LIBELF_COPY_S32(DST,SRC,NAME)	do {		\
-		if ((SRC)-NAME  INT_MAX ||		\
-		(SRC)-NAME  INT_MIN) {		\
+		if ((int64_t)(SRC)-NAME  INT_MAX ||	\
+		(int64_t)(SRC)-NAME  INT_MIN) {	\
 			LIBELF_SET_ERROR(RANGE, 0);	\
 			return (0);			\
 		}	\



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:54:32 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: libelf_align.c

Log Message:
Provide definitions of MALIGN() and MALIGN64() for the __lint__ case.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libelf/dist/libelf_align.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/libelf/dist/libelf_align.c
diff -u src/external/bsd/libelf/dist/libelf_align.c:1.2 src/external/bsd/libelf/dist/libelf_align.c:1.3
--- src/external/bsd/libelf/dist/libelf_align.c:1.2	Sat Dec 19 07:31:04 2009
+++ src/external/bsd/libelf/dist/libelf_align.c	Sat Dec 19 07:54:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_align.c,v 1.2 2009/12/19 07:31:04 thorpej Exp $	*/
+/*	$NetBSD: libelf_align.c,v 1.3 2009/12/19 07:54:32 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf_align.c,v 1.3.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf_align.c,v 1.2 2009/12/19 07:31:04 thorpej Exp $);
+__RCSID($NetBSD: libelf_align.c,v 1.3 2009/12/19 07:54:32 thorpej Exp $);
 
 #include sys/types.h
 
@@ -43,7 +43,16 @@
 	int a64;
 };
 
-#ifdef	__GNUC__
+#if defined(__lint__)
+#define	MALIGN(N)	{	\
+		.a32 = sizeof(Elf32_##N),			\
+		.a64 = sizeof(Elf64_##N)			\
+	}
+#define	MALIGN64(V)	  {	\
+		.a32 = 0,	\
+		.a64 = sizeof(Elf64_##V)			\
+	}
+#elif defined(__GNUC__)
 #define	MALIGN(N)	{	\
 		.a32 = __alignof__(Elf32_##N),			\
 		.a64 = __alignof__(Elf64_##N)			\



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:58:24 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: elf_hash.c libelf.h

Log Message:
Change elf_hash() to take a const void *, rather than a const char *.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libelf/dist/elf_hash.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libelf/dist/libelf.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/libelf/dist/elf_hash.c
diff -u src/external/bsd/libelf/dist/elf_hash.c:1.1.1.1 src/external/bsd/libelf/dist/elf_hash.c:1.2
--- src/external/bsd/libelf/dist/elf_hash.c:1.1.1.1	Sat Dec 19 05:43:39 2009
+++ src/external/bsd/libelf/dist/elf_hash.c	Sat Dec 19 07:58:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_hash.c,v 1.1.1.1 2009/12/19 05:43:39 thorpej Exp $	*/
+/*	$NetBSD: elf_hash.c,v 1.2 2009/12/19 07:58:24 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/elf_hash.c,v 1.1.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: elf_hash.c,v 1.1.1.1 2009/12/19 05:43:39 thorpej Exp $);
+__RCSID($NetBSD: elf_hash.c,v 1.2 2009/12/19 07:58:24 thorpej Exp $);
 
 #include libelf.h
 
@@ -38,7 +38,7 @@
  */
 
 unsigned long
-elf_hash(const char *name)
+elf_hash(const void *name)
 {
 	unsigned long h, t;
 	const unsigned char *s;

Index: src/external/bsd/libelf/dist/libelf.h
diff -u src/external/bsd/libelf/dist/libelf.h:1.2 src/external/bsd/libelf/dist/libelf.h:1.3
--- src/external/bsd/libelf/dist/libelf.h:1.2	Sat Dec 19 07:31:04 2009
+++ src/external/bsd/libelf/dist/libelf.h	Sat Dec 19 07:58:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf.h,v 1.2 2009/12/19 07:31:04 thorpej Exp $	*/
+/*	$NetBSD: libelf.h,v 1.3 2009/12/19 07:58:24 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -220,7 +220,7 @@
 Elf_Scn		*elf_getscn(Elf *_elf, size_t _index);
 int		elf_getshnum(Elf *_elf, size_t *_dst);
 int		elf_getshstrndx(Elf *_elf, size_t *_dst);
-unsigned long	elf_hash(const char *_name);
+unsigned long	elf_hash(const void *_name);
 Elf_Kind	elf_kind(Elf *_elf);
 Elf		*elf_memory(char *_image, size_t _size);
 size_t		elf_ndxscn(Elf_Scn *_scn);



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

2009-12-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 07:59:24 UTC 2009

Modified Files:
src/external/bsd/libelf/dist: libelf_ar.c

Log Message:
Squash a signed-vs-unsigned char * warning.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libelf/dist/libelf_ar.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/libelf/dist/libelf_ar.c
diff -u src/external/bsd/libelf/dist/libelf_ar.c:1.2 src/external/bsd/libelf/dist/libelf_ar.c:1.3
--- src/external/bsd/libelf/dist/libelf_ar.c:1.2	Sat Dec 19 05:55:37 2009
+++ src/external/bsd/libelf/dist/libelf_ar.c	Sat Dec 19 07:59:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libelf_ar.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $	*/
+/*	$NetBSD: libelf_ar.c,v 1.3 2009/12/19 07:59:24 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libelf/libelf_ar.c,v 1.3.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $); */
-__RCSID($NetBSD: libelf_ar.c,v 1.2 2009/12/19 05:55:37 thorpej Exp $);
+__RCSID($NetBSD: libelf_ar.c,v 1.3 2009/12/19 07:59:24 thorpej Exp $);
 
 #include ar.h
 #include assert.h
@@ -461,7 +461,7 @@
 
 		sym-as_off = off;
 		sym-as_hash = elf_hash(s);
-		sym-as_name = s;
+		sym-as_name = (char *)s;
 
 		p += INTSZ;
 		sym++;