CVS commit: src/sys/net

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Jun 23 05:46:10 UTC 2017

Modified Files:
src/sys/net: if_llatbl.c if_llatbl.h rtsock.c

Log Message:
Tweak lltable_sysctl_dumparp

- Rename lltable_sysctl_dumparp to lltable_sysctl_dump
  because it's not only for ARP
- Enable it not only for INET but also for INET6


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.11 -r1.12 src/sys/net/if_llatbl.h
cvs rdiff -u -r1.218 -r1.219 src/sys/net/rtsock.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/if_llatbl.c
diff -u src/sys/net/if_llatbl.c:1.19 src/sys/net/if_llatbl.c:1.20
--- src/sys/net/if_llatbl.c:1.19	Thu Jun 22 09:56:48 2017
+++ src/sys/net/if_llatbl.c	Fri Jun 23 05:46:10 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.c,v 1.19 2017/06/22 09:56:48 ozaki-r Exp $	*/
+/*	$NetBSD: if_llatbl.c,v 1.20 2017/06/23 05:46:10 ozaki-r Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -149,7 +149,7 @@ lltable_dump_af(struct lltable *llt, str
  * Dump arp state for a specific address family.
  */
 int
-lltable_sysctl_dumparp(int af, struct rt_walkarg *w)
+lltable_sysctl_dump(int af, struct rt_walkarg *w)
 {
 	struct lltable *llt;
 	int error = 0;

Index: src/sys/net/if_llatbl.h
diff -u src/sys/net/if_llatbl.h:1.11 src/sys/net/if_llatbl.h:1.12
--- src/sys/net/if_llatbl.h:1.11	Thu Jun 22 09:56:48 2017
+++ src/sys/net/if_llatbl.h	Fri Jun 23 05:46:10 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.h,v 1.11 2017/06/22 09:56:48 ozaki-r Exp $	*/
+/*	$NetBSD: if_llatbl.h,v 1.12 2017/06/23 05:46:10 ozaki-r Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -258,7 +258,7 @@ void		lltable_prefix_free(const int, con
 		const struct sockaddr *, const u_int);
 void		lltable_drain(int);
 void		lltable_purge_entries(struct lltable *);
-int		lltable_sysctl_dumparp(int, struct rt_walkarg *);
+int		lltable_sysctl_dump(int, struct rt_walkarg *);
 int		lltable_dump_entry(struct lltable *, struct llentry *,
 		struct rt_walkarg *, struct sockaddr *);
 

Index: src/sys/net/rtsock.c
diff -u src/sys/net/rtsock.c:1.218 src/sys/net/rtsock.c:1.219
--- src/sys/net/rtsock.c:1.218	Fri Jun 23 04:27:55 2017
+++ src/sys/net/rtsock.c	Fri Jun 23 05:46:10 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.218 2017/06/23 04:27:55 ozaki-r Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.219 2017/06/23 05:46:10 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.218 2017/06/23 04:27:55 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.219 2017/06/23 05:46:10 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1916,7 +1916,7 @@ again:
 
 	case NET_RT_DUMP:
 	case NET_RT_FLAGS:
-#ifdef INET
+#if defined(INET) || defined(INET6)
 		/*
 		 * take care of llinfo entries, the caller must
 		 * specify an AF
@@ -1924,12 +1924,12 @@ again:
 		if (w.w_op == NET_RT_FLAGS &&
 		(w.w_arg == 0 || w.w_arg & RTF_LLDATA)) {
 			if (af != 0)
-error = lltable_sysctl_dumparp(af, );
+error = lltable_sysctl_dump(af, );
 			else
 error = EINVAL;
 			break;
 		}
-#endif /* INET */
+#endif
 
 		for (i = 1; i <= AF_MAX; i++)
 			if ((af == 0 || af == i) &&



CVS commit: src/sys/dev/pci/ixgbe

2017-06-22 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Jun 23 04:36:48 UTC 2017

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

Log Message:
 Use IFM_1000_KX more.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/dev/pci/ixgbe/ixgbe.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.89 src/sys/dev/pci/ixgbe/ixgbe.c:1.90
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.89	Mon Jun 12 03:03:22 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Jun 23 04:36:48 2017
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.89 2017/06/12 03:03:22 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.90 2017/06/23 04:36:48 msaitoh Exp $*/
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2145,41 +2145,19 @@ ixgbe_media_change(struct ifnet * ifp)
 	** media types of the adapter; ifmedia will take care of
 	** that for us.
 	*/
-#ifndef IFM_ETH_XTYPE
 	switch (IFM_SUBTYPE(ifm->ifm_media)) {
 		case IFM_AUTO:
 		case IFM_10G_T:
 			speed |= IXGBE_LINK_SPEED_100_FULL;
 		case IFM_10G_LRM:
-		case IFM_10G_SR: /* KR, too */
 		case IFM_10G_LR:
+#ifndef IFM_ETH_XTYPE
+		case IFM_10G_SR: /* KR, too */
 		case IFM_10G_CX4: /* KX4 */
-			speed |= IXGBE_LINK_SPEED_1GB_FULL;
-		case IFM_10G_TWINAX:
-			speed |= IXGBE_LINK_SPEED_10GB_FULL;
-			break;
-		case IFM_1000_T:
-			speed |= IXGBE_LINK_SPEED_100_FULL;
-		case IFM_1000_LX:
-		case IFM_1000_SX:
-		case IFM_1000_CX: /* KX */
-			speed |= IXGBE_LINK_SPEED_1GB_FULL;
-			break;
-		case IFM_100_TX:
-			speed |= IXGBE_LINK_SPEED_100_FULL;
-			break;
-		default:
-			goto invalid;
-	}
 #else
-	switch (IFM_SUBTYPE(ifm->ifm_media)) {
-		case IFM_AUTO:
-		case IFM_10G_T:
-			speed |= IXGBE_LINK_SPEED_100_FULL;
-		case IFM_10G_LRM:
 		case IFM_10G_KR:
-		case IFM_10G_LR:
 		case IFM_10G_KX4:
+#endif
 			speed |= IXGBE_LINK_SPEED_1GB_FULL;
 		case IFM_10G_TWINAX:
 			speed |= IXGBE_LINK_SPEED_10GB_FULL;
@@ -2197,7 +2175,6 @@ ixgbe_media_change(struct ifnet * ifp)
 		default:
 			goto invalid;
 	}
-#endif
 
 	hw->mac.autotry_restart = TRUE;
 	hw->mac.ops.setup_link(hw, speed, TRUE);
@@ -3260,10 +3237,6 @@ ixgbe_add_media_types(struct adapter *ad
 		ADD(AIFM_10G_KX4, 0);
 		ADD(AIFM_10G_KX4 | IFM_FDX, 0);
 	}
-	if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX) {
-		ADD(IFM_1000_KX, 0);
-		ADD(IFM_1000_KX | IFM_FDX, 0);
-	}
 #else
 	if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR) {
 		device_printf(dev, "Media supported: 10GbaseKR\n");
@@ -3277,13 +3250,11 @@ ixgbe_add_media_types(struct adapter *ad
 		ADD(IFM_10G_CX4, 0);
 		ADD(IFM_10G_CX4 | IFM_FDX, 0);
 	}
+#endif
 	if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX) {
-		device_printf(dev, "Media supported: 1000baseKX\n");
-		device_printf(dev, "1000baseKX mapped to 1000baseCX\n");
-		ADD(IFM_1000_CX, 0);
-		ADD(IFM_1000_CX | IFM_FDX, 0);
+		ADD(IFM_1000_KX, 0);
+		ADD(IFM_1000_KX | IFM_FDX, 0);
 	}
-#endif
 	if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_BX)
 		device_printf(dev, "Media supported: 1000baseBX\n");
 	/* XXX no ifmedia_set? */



CVS commit: src/sys/net

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Jun 23 04:27:55 UTC 2017

Modified Files:
src/sys/net: rtsock.c

Log Message:
Fix build of kernels without both INET and INET6


To generate a diff of this commit:
cvs rdiff -u -r1.217 -r1.218 src/sys/net/rtsock.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/rtsock.c
diff -u src/sys/net/rtsock.c:1.217 src/sys/net/rtsock.c:1.218
--- src/sys/net/rtsock.c:1.217	Thu Jun 22 09:58:04 2017
+++ src/sys/net/rtsock.c	Fri Jun 23 04:27:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.217 2017/06/22 09:58:04 ozaki-r Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.218 2017/06/23 04:27:55 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.217 2017/06/22 09:58:04 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.218 2017/06/23 04:27:55 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -712,6 +712,8 @@ route_output_change(struct rtentry *rt, 
 	if (ifp_changed && rt_mask(rt) != NULL)
 		lltable_prefix_free(rt_getkey(rt)->sa_family, rt_getkey(rt),
 		rt_mask(rt), 0);
+#else
+	(void)ifp_changed; /* XXX gcc */
 #endif
 out:
 	if_put(ifp, _ifp);



CVS commit: src/usr.sbin/wsfontload

2017-06-22 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Jun 23 02:16:39 UTC 2017

Modified Files:
src/usr.sbin/wsfontload: wsfontload.c

Log Message:
load files from ttf2wsfont


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/wsfontload/wsfontload.c

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

Modified files:

Index: src/usr.sbin/wsfontload/wsfontload.c
diff -u src/usr.sbin/wsfontload/wsfontload.c:1.18 src/usr.sbin/wsfontload/wsfontload.c:1.19
--- src/usr.sbin/wsfontload/wsfontload.c:1.18	Fri Apr  5 03:18:26 2013
+++ src/usr.sbin/wsfontload/wsfontload.c	Fri Jun 23 02:16:39 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfontload.c,v 1.18 2013/04/05 03:18:26 dholland Exp $ */
+/* $NetBSD: wsfontload.c,v 1.19 2017/06/23 02:16:39 macallan Exp $ */
 
 /*
  * Copyright (c) 1999
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -134,9 +135,11 @@ main(int argc, char **argv)
 {
 	const char *wsdev;
 	struct wsdisplay_font f;
+	struct stat st;
 	int c, res, wsfd, ffd, verbose = 0;
 	size_t len;
 	void *buf;
+	char nbuf[65];
 
 	wsdev = DEFDEV;
 	f.fontwidth = DEFWIDTH;
@@ -205,6 +208,39 @@ main(int argc, char **argv)
 	if (!f.stride)
 		f.stride = (f.fontwidth + 7) / 8;
 	len = f.fontheight * f.numchars * f.stride;
+	if (fstat(ffd, ) == 0) {
+		if (len != st.st_size) {
+			uint32_t foo = 0;
+			char b[65];
+			len = st.st_size;
+			/* read header */
+			read(ffd, b, 4);
+			if (strncmp(b, "WSFT", 4) != 0)
+errx(1, "invalid wsf file ");
+			read(ffd, b, 64);
+			b[64] = 0;
+			strcpy(nbuf, b);
+			f.name = nbuf;
+			read(ffd, , 4);
+			f.firstchar = le32toh(foo);
+			read(ffd, , 4);
+			f.numchars = le32toh(foo);
+			read(ffd, , 4);
+			f.encoding = le32toh(foo);
+			read(ffd, , 4);
+			f.fontwidth = le32toh(foo);
+			read(ffd, , 4);
+			f.fontheight = le32toh(foo);
+			read(ffd, , 4);
+			f.stride = le32toh(foo);
+			read(ffd, , 4);
+			f.bitorder = le32toh(foo);
+			read(ffd, , 4);
+			f.byteorder = le32toh(foo);
+			len = f.numchars * f.fontheight * f.stride;
+		}
+	}
+
 	if (!len)
 		errx(1, "invalid font size");
 



CVS commit: xsrc/local/programs/ttf2wsfont

2017-06-22 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Jun 23 02:15:07 UTC 2017

Modified Files:
xsrc/local/programs/ttf2wsfont: Makefile main.c

Log Message:
- write out fonts in a binary format suitable for wsfontload
- skip characters 0 - 31


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 xsrc/local/programs/ttf2wsfont/Makefile
cvs rdiff -u -r1.2 -r1.3 xsrc/local/programs/ttf2wsfont/main.c

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

Modified files:

Index: xsrc/local/programs/ttf2wsfont/Makefile
diff -u xsrc/local/programs/ttf2wsfont/Makefile:1.1 xsrc/local/programs/ttf2wsfont/Makefile:1.2
--- xsrc/local/programs/ttf2wsfont/Makefile:1.1	Wed Dec 28 16:53:30 2011
+++ xsrc/local/programs/ttf2wsfont/Makefile	Fri Jun 23 02:15:07 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/12/28 16:53:30 macallan Exp $
+#	$NetBSD: Makefile,v 1.2 2017/06/23 02:15:07 macallan Exp $
 #	@(#)Makefile	8.1 (Berkeley) 5/31/93
 
 PROG=	ttf2wsfont
@@ -6,7 +6,7 @@ PROG=	ttf2wsfont
 SRCS=	main.c
 WARNS=	3
 
-CPPFLAGS+=	-DXFREE86_FT2 -I${DESTDIR}${X11INCDIR}/freetype2
+CPPFLAGS+=	-DXFREE86_FT2 -I${DESTDIR}${X11INCDIR}/freetype2 -D_NETBSD_SOURCE
 
 LDADD+=	-lfreetype
 

Index: xsrc/local/programs/ttf2wsfont/main.c
diff -u xsrc/local/programs/ttf2wsfont/main.c:1.2 xsrc/local/programs/ttf2wsfont/main.c:1.3
--- xsrc/local/programs/ttf2wsfont/main.c:1.2	Wed Dec 28 16:55:27 2011
+++ xsrc/local/programs/ttf2wsfont/main.c	Fri Jun 23 02:15:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.2 2011/12/28 16:55:27 macallan Exp $	*/
+/*	$NetBSD: main.c,v 1.3 2017/06/23 02:15:07 macallan Exp $	*/
 
 /*
  * Copyright (c) 2011 Michael Lorenz
@@ -27,6 +27,10 @@
 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include 
 #include FT_FREETYPE_H
@@ -69,7 +73,7 @@ main(int argc, char *argv[])
 {
 	int error, glyph_index;
 	int x, y, idx, width_in_bytes, height = 22, cell_height;
-	int width, datalen, didx, i, start, end;
+	int width, datalen, didx, i, start, end, out;
 	FILE *output;
 	uint8_t *fontdata;
 	char fontname[128], filename[128];
@@ -139,7 +143,7 @@ main(int argc, char *argv[])
 	/* now output as a header file */
 	snprintf(fontname, 128, "%s_%dx%d", face->family_name, width, cell_height);
 	for (i = 0; i < strlen(fontname); i++) {
-		if (isblank(fontname[i]))
+		if (isblank((int)fontname[i]))
 			fontname[i]='_';
 	}
 	snprintf(filename, 128, "%s.h", fontname);
@@ -151,8 +155,8 @@ main(int argc, char *argv[])
 	fprintf(output, "\n");
 	fprintf(output, "static struct wsdisplay_font %s = {\n", fontname);
 	fprintf(output, "\t\"%s\",\t\t\t/* typeface name */\n", face->family_name);
-	fprintf(output, "\t0,\t\t\t\t/* firstchar */\n");
-	fprintf(output, "\t255 - 0 + 1,\t\t\t/* numchar */\n");
+	fprintf(output, "\t32,\t\t\t\t/* firstchar */\n");
+	fprintf(output, "\t256 - 32,\t\t\t/* numchar */\n");
 	fprintf(output, "\tWSDISPLAY_FONTENC_ISO,\t\t/* encoding */\n");
 	fprintf(output, "\t%d,\t\t\t\t/* width */\n", width);
 	fprintf(output, "\t%d,\t\t\t\t/* height */\n", cell_height);
@@ -162,7 +166,7 @@ main(int argc, char *argv[])
 	fprintf(output, "\t%s_data\t\t/* data */\n", fontname);
 	fprintf(output, "};\n\n");
 	fprintf(output, "static u_char %s_data[] = {\n", fontname);
-	for (i = 0; i < 256; i++) {
+	for (i = 32; i < 256; i++) {
 		fprintf(output, "\t/* %d */\n", i);
 		idx = i * width * cell_height;
 		for (y = 0; y < cell_height; y++) {
@@ -180,6 +184,44 @@ main(int argc, char *argv[])
 	}
 	fprintf(output, "};\n");
 	fclose(output);
+	/* dump as binary */
+	snprintf(filename, 128, "%s.wsf", fontname);	
+	if ((out = open(filename, O_RDWR | O_CREAT | O_TRUNC, DEFFILEMODE)) > 0) {
+		char nbuf[64];
+		uint32_t foo;
+		write(out, "WSFT", 4);
+		memset(nbuf, 0, 64);
+		strncpy(nbuf, face->family_name, 64);
+		write(out, nbuf, 64);
+		/* firstchar */
+		foo = htole32(32);
+		write(out, , 4);
+		/* numchar */
+		foo = htole32(256 - 32);
+		write(out, , 4);
+		/* encoding */
+		foo = htole32(WSDISPLAY_FONTENC_ISO);
+		write(out, , 4);
+		/* fontwidth */
+		foo = htole32(width);
+		write(out, , 4);
+		/* fontheight */
+		foo = htole32(cell_height);
+		write(out, , 4);
+		/* stride */
+		foo = htole32(width);
+		write(out, , 4);
+		/* bitorder */
+		foo = htole32(WSDISPLAY_FONTORDER_L2R);
+		write(out, , 4);
+		/* byteorder */
+		foo = htole32(WSDISPLAY_FONTORDER_L2R);
+		write(out, , 4);
+		/* now the font data */
+		write(out, fontdata + (32 * width * cell_height),
+		   (256 - 32) * width * cell_height);
+		close(out);
+	}
 	free(fontdata);
 	FT_Done_Face(face);
 	FT_Done_FreeType(library);



CVS commit: src/sys/dev/wsfont

2017-06-22 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Jun 23 01:57:40 UTC 2017

Modified Files:
src/sys/dev/wsfont: wsfontdev.c

Log Message:
allow longer font names


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/wsfont/wsfontdev.c

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

Modified files:

Index: src/sys/dev/wsfont/wsfontdev.c
diff -u src/sys/dev/wsfont/wsfontdev.c:1.17 src/sys/dev/wsfont/wsfontdev.c:1.18
--- src/sys/dev/wsfont/wsfontdev.c:1.17	Thu Aug 20 14:40:18 2015
+++ src/sys/dev/wsfont/wsfontdev.c	Fri Jun 23 01:57:40 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfontdev.c,v 1.17 2015/08/20 14:40:18 christos Exp $ */
+/* $NetBSD: wsfontdev.c,v 1.18 2017/06/23 01:57:40 macallan Exp $ */
 
 /*
  * Copyright (c) 2001
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfontdev.c,v 1.17 2015/08/20 14:40:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfontdev.c,v 1.18 2017/06/23 01:57:40 macallan Exp $");
 
 #include 
 #include 
@@ -74,7 +74,7 @@ static int
 wsfontioctl(dev_t dev, u_long cmd, void *data, int flag,
 struct lwp *l)
 {
-	char nbuf[16];
+	char nbuf[64];
 	void *buf;
 	int res;
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:35:20 UTC 2017

Modified Files:
src/bin/ksh: config.h

Log Message:
ksh: Drop support for systems without clock_t type


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/bin/ksh/config.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.37 src/bin/ksh/config.h:1.38
--- src/bin/ksh/config.h:1.37	Fri Jun 23 00:29:42 2017
+++ src/bin/ksh/config.h	Fri Jun 23 00:35:20 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.37 2017/06/23 00:29:42 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.38 2017/06/23 00:35:20 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -87,9 +87,6 @@
 /* Define if C compiler groks __attribute__((...)) (const, noreturn, format) */
 #define HAVE_GCC_FUNC_ATTR 1
 
-/* Define to 32-bit signed integer type if  doesn't define */
-/* #undef clock_t */
-
 /* Define to the type of struct rlimit fields if the rlim_t type is missing */
 /* #undef rlim_t */
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:29:42 UTC 2017

Modified Files:
src/bin/ksh: config.h jobs.c sh.h

Log Message:
ksh: Replace homegrown int_least32_t with the C99 version


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/bin/ksh/config.h
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/jobs.c
cvs rdiff -u -r1.28 -r1.29 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.36 src/bin/ksh/config.h:1.37
--- src/bin/ksh/config.h:1.36	Fri Jun 23 00:20:22 2017
+++ src/bin/ksh/config.h	Fri Jun 23 00:29:42 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.36 2017/06/23 00:20:22 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.37 2017/06/23 00:29:42 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -172,12 +172,6 @@
 /* Include game-of-life? */
 /* #undef SILLY */
 
-/* The number of bytes in a int.  */
-#define SIZEOF_INT 4
-
-/* The number of bytes in a long.  */
-#define SIZEOF_LONG 4
-
 /* Define if you have the _setjmp function.  */
 #define HAVE__SETJMP
 

Index: src/bin/ksh/jobs.c
diff -u src/bin/ksh/jobs.c:1.13 src/bin/ksh/jobs.c:1.14
--- src/bin/ksh/jobs.c:1.13	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/jobs.c	Fri Jun 23 00:29:42 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: jobs.c,v 1.13 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: jobs.c,v 1.14 2017/06/23 00:29:42 kamil Exp $	*/
 
 /*
  * Process and job control
@@ -26,7 +26,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: jobs.c,v 1.13 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: jobs.c,v 1.14 2017/06/23 00:29:42 kamil Exp $");
 #endif
 
 
@@ -142,7 +142,7 @@ struct job {
 	int	status;		/* exit status of last process */
 	pid_t	pgrp;		/* process group of job */
 	pid_t	ppid;		/* pid of process that forked job */
-	INT32	age;		/* number of jobs started */
+	int_least32_t	age;	/* number of jobs started */
 	clock_t	systime;	/* system time used by job */
 	clock_t	usrtime;	/* user time used by job */
 	Proc	*proc_list;	/* process list */
@@ -183,7 +183,7 @@ static Job		*async_job;
 static pid_t		async_pid;
 
 static int		nzombie;	/* # of zombies owned by this process */
-static INT32		njobs;		/* # of jobs started */
+static int_least32_t	njobs;		/* # of jobs started */
 static int		child_max;	/* CHILD_MAX */
 
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.28 src/bin/ksh/sh.h:1.29
--- src/bin/ksh/sh.h:1.28	Fri Jun 23 00:18:01 2017
+++ src/bin/ksh/sh.h	Fri Jun 23 00:29:42 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.28 2017/06/23 00:18:01 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.29 2017/06/23 00:29:42 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.28 2017/06/23 00:18:01 kamil Exp $ */
+/* $Id: sh.h,v 1.29 2017/06/23 00:29:42 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifndef O_ACCMODE
 # define O_ACCMODE	(O_RDONLY|O_WRONLY|O_RDWR)
@@ -118,20 +119,6 @@ typedef	RETSIGTYPE (*handler_t) ARGS((in
 # define ksh_jmp_buf		jmp_buf
 #endif /* HAVE_SIGSETJMP */
 
-/* Find a integer type that is at least 32 bits (or die) - SIZEOF_* defined
- * by autoconf (assumes an 8 bit byte, but I'm not concerned).
- * NOTE: INT32 may end up being more than 32 bits.
- */
-#if SIZEOF_INT >= 4
-# define INT32	int
-#else /* SIZEOF_INT */
-# if SIZEOF_LONG >= 4
-#  define INT32	long
-# else /* SIZEOF_LONG */
-   #error cannot find 32 bit type...
-# endif /* SIZEOF_LONG */
-#endif /* SIZEOF_INT */
-
 /* end of common headers */
 
 /* Stop gcc and lint from complaining about possibly uninitialized variables */
@@ -187,7 +174,7 @@ typedef int bool_t;
 #define	BIT(i)	(1<<(i))	/* define bit in flag */
 
 /* Table flag type - needs > 16 and < 32 bits */
-typedef INT32 Tflag;
+typedef int_least32_t Tflag;
 
 #define	NUFILE	32		/* Number of user-accessible files */
 #define	FDBASE	10		/* First file usable by Shell */
@@ -495,7 +482,7 @@ EXTERN Getopt user_opt;		/* parsing stat
 #ifdef KSH
 /* This for co-processes */
 
-typedef INT32 Coproc_id; /* something that won't (realisticly) wrap */
+typedef int_least32_t Coproc_id; /* something that won't (realisticly) wrap */
 struct coproc {
 	int	read;		/* pipe from co-process's stdout */
 	int	readw;		/* other side of read (saved temporarily) */



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:20:23 UTC 2017

Modified Files:
src/bin/ksh: config.h

Log Message:
ksh: Drop support for systems that return void for closedir(2)


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/bin/ksh/config.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.35 src/bin/ksh/config.h:1.36
--- src/bin/ksh/config.h:1.35	Fri Jun 23 00:00:58 2017
+++ src/bin/ksh/config.h	Fri Jun 23 00:20:22 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.35 2017/06/23 00:00:58 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.36 2017/06/23 00:20:22 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -54,9 +54,6 @@
 /* Define to `int' if  doesn't define.  */
 /* #undef uid_t */
 
-/* Define if the closedir function returns void instead of int.  */
-/* #undef VOID_CLOSEDIR */
-
 /* Define if your kernel doesn't handle scripts starting with #! */
 /* #undef SHARPBANG */
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:18:01 UTC 2017

Modified Files:
src/bin/ksh: io.c lex.c sh.h shf.c tree.c

Log Message:
ksh: Use ANSI C varargs, drop support for older version 


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/io.c
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/lex.c
cvs rdiff -u -r1.27 -r1.28 src/bin/ksh/sh.h
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/shf.c
cvs rdiff -u -r1.6 -r1.7 src/bin/ksh/tree.c

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

Modified files:

Index: src/bin/ksh/io.c
diff -u src/bin/ksh/io.c:1.13 src/bin/ksh/io.c:1.14
--- src/bin/ksh/io.c:1.13	Thu Jun 22 19:41:07 2017
+++ src/bin/ksh/io.c	Fri Jun 23 00:18:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: io.c,v 1.13 2017/06/22 19:41:07 kamil Exp $	*/
+/*	$NetBSD: io.c,v 1.14 2017/06/23 00:18:01 kamil Exp $	*/
 
 /*
  * shell buffered IO and formatted output
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: io.c,v 1.13 2017/06/22 19:41:07 kamil Exp $");
+__RCSID("$NetBSD: io.c,v 1.14 2017/06/23 00:18:01 kamil Exp $");
 #endif
 
 
@@ -37,7 +37,7 @@ errorf(fmt, va_alist)
 	exstat = 1;
 	if (*fmt) {
 		error_prefix(TRUE);
-		SH_VA_START(va, fmt);
+		va_start(va, fmt);
 		shf_vfprintf(shl_out, fmt, va);
 		va_end(va);
 		shf_putchar('\n', shl_out);
@@ -60,7 +60,7 @@ warningf(fileline, fmt, va_alist)
 	va_list va;
 
 	error_prefix(fileline);
-	SH_VA_START(va, fmt);
+	va_start(va, fmt);
 	shf_vfprintf(shl_out, fmt, va);
 	va_end(va);
 	shf_putchar('\n', shl_out);
@@ -88,7 +88,7 @@ bi_errorf(fmt, va_alist)
 		/* not set when main() calls parse_args() */
 		if (builtin_argv0)
 			shf_fprintf(shl_out, "%s: ", builtin_argv0);
-		SH_VA_START(va, fmt);
+		va_start(va, fmt);
 		shf_vfprintf(shl_out, fmt, va);
 		va_end(va);
 		shf_putchar('\n', shl_out);
@@ -121,7 +121,7 @@ internal_errorf(jump, fmt, va_alist)
 
 	error_prefix(TRUE);
 	shf_fprintf(shl_out, "internal error: ");
-	SH_VA_START(va, fmt);
+	va_start(va, fmt);
 	shf_vfprintf(shl_out, fmt, va);
 	va_end(va);
 	shf_putchar('\n', shl_out);
@@ -160,7 +160,7 @@ shellf(fmt, va_alist)
 
 	if (!initio_done) /* shl_out may not be set up yet... */
 		return;
-	SH_VA_START(va, fmt);
+	va_start(va, fmt);
 	shf_vfprintf(shl_out, fmt, va);
 	va_end(va);
 	shf_flush(shl_out);
@@ -180,7 +180,7 @@ shprintf(fmt, va_alist)
 
 	if (!shl_stdout_ok)
 		internal_errorf(1, "shl_stdout not valid");
-	SH_VA_START(va, fmt);
+	va_start(va, fmt);
 	shf_vfprintf(shl_stdout, fmt, va);
 	va_end(va);
 }
@@ -216,7 +216,7 @@ kshdebug_printf_(fmt, va_alist)
 
 	if (!kshdebug_shf)
 		return;
-	SH_VA_START(va, fmt);
+	va_start(va, fmt);
 	shf_fprintf(kshdebug_shf, "[%d] ", getpid());
 	shf_vfprintf(kshdebug_shf, fmt, va);
 	va_end(va);

Index: src/bin/ksh/lex.c
diff -u src/bin/ksh/lex.c:1.18 src/bin/ksh/lex.c:1.19
--- src/bin/ksh/lex.c:1.18	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/lex.c	Fri Jun 23 00:18:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex.c,v 1.18 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: lex.c,v 1.19 2017/06/23 00:18:01 kamil Exp $	*/
 
 /*
  * lexical analysis and source input
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: lex.c,v 1.18 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: lex.c,v 1.19 2017/06/23 00:18:01 kamil Exp $");
 #endif
 
 
@@ -852,7 +852,7 @@ yyerror(fmt, va_alist)
 	source->str = null;	/* zap pending input */
 
 	error_prefix(TRUE);
-	SH_VA_START(va, fmt);
+	va_start(va, fmt);
 	shf_vfprintf(shl_out, fmt, va);
 	va_end(va);
 	errorf("%s", null);

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.27 src/bin/ksh/sh.h:1.28
--- src/bin/ksh/sh.h:1.27	Fri Jun 23 00:09:36 2017
+++ src/bin/ksh/sh.h	Fri Jun 23 00:18:01 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.27 2017/06/23 00:09:36 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.28 2017/06/23 00:18:01 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.27 2017/06/23 00:09:36 kamil Exp $ */
+/* $Id: sh.h,v 1.28 2017/06/23 00:18:01 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -23,15 +23,7 @@
 #include 
 #include 
 #include 
-
-#ifdef HAVE_PROTOTYPES
-# include 
-# define SH_VA_START(va, argn) va_start(va, argn)
-#else
-# include 
-# define SH_VA_START(va, argn) va_start(va)
-#endif /* HAVE_PROTOTYPES */
-
+#include 
 #include 
 #include 
 

Index: src/bin/ksh/shf.c
diff -u src/bin/ksh/shf.c:1.10 src/bin/ksh/shf.c:1.11
--- src/bin/ksh/shf.c:1.10	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/shf.c	Fri Jun 23 00:18:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: shf.c,v 1.10 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: shf.c,v 1.11 2017/06/23 00:18:01 kamil Exp $	*/
 
 /*
  *  Shell file I/O routines
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: shf.c,v 1.10 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: shf.c,v 1.11 2017/06/23 00:18:01 kamil Exp $");
 #endif
 
 
@@ -770,7 +770,7 @@ shf_fprintf(shf, fmt, va_alist)
 	

CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:11:01 UTC 2017

Modified Files:
src/bin/ksh: tty.c

Log Message:
ksh: Remove remnant hack for SCO UNIX in tty code


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/bin/ksh/tty.c

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

Modified files:

Index: src/bin/ksh/tty.c
diff -u src/bin/ksh/tty.c:1.6 src/bin/ksh/tty.c:1.7
--- src/bin/ksh/tty.c:1.6	Fri Jun 23 00:09:36 2017
+++ src/bin/ksh/tty.c	Fri Jun 23 00:11:01 2017
@@ -1,9 +1,9 @@
-/*	$NetBSD: tty.c,v 1.6 2017/06/23 00:09:36 kamil Exp $	*/
+/*	$NetBSD: tty.c,v 1.7 2017/06/23 00:11:01 kamil Exp $	*/
 
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: tty.c,v 1.6 2017/06/23 00:09:36 kamil Exp $");
+__RCSID("$NetBSD: tty.c,v 1.7 2017/06/23 00:11:01 kamil Exp $");
 #endif
 
 
@@ -109,8 +109,6 @@ tty_init(init_ttystate)
 	}
 	tty_devtty = 1;
 
-	/* SCO can't job control on /dev/tty, so don't try... */
-#if !defined(__SCO__)
 	if ((tfd = open(devtty, O_RDWR, 0)) < 0) {
 		if (tfd < 0) {
 			tty_devtty = 0;
@@ -119,9 +117,6 @@ tty_init(init_ttystate)
 devtty, strerror(errno));
 		}
 	}
-#else /* !__SCO__ */
-	tfd = -1;
-#endif /* __SCO__ */
 
 	if (tfd < 0) {
 		do_close = 0;



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:09:36 UTC 2017

Modified Files:
src/bin/ksh: sh.h tty.c

Log Message:
ksh: Remove support for NeXT Operating System


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/bin/ksh/sh.h
cvs rdiff -u -r1.5 -r1.6 src/bin/ksh/tty.c

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

Modified files:

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.26 src/bin/ksh/sh.h:1.27
--- src/bin/ksh/sh.h:1.26	Thu Jun 22 23:50:24 2017
+++ src/bin/ksh/sh.h	Fri Jun 23 00:09:36 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.26 2017/06/22 23:50:24 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.27 2017/06/23 00:09:36 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.26 2017/06/22 23:50:24 kamil Exp $ */
+/* $Id: sh.h,v 1.27 2017/06/23 00:09:36 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -553,11 +553,7 @@ EXTERN	int	x_cols I__(80);	/* tty column
 
 /* Determine the location of the system (common) profile */
 #ifndef KSH_SYSTEM_PROFILE
-# ifdef __NeXT
-#  define KSH_SYSTEM_PROFILE "/etc/profile.std"
-# else /* __NeXT */
-#  define KSH_SYSTEM_PROFILE "/etc/profile"
-# endif /* __NeXT */
+# define KSH_SYSTEM_PROFILE "/etc/profile"
 #endif /* KSH_SYSTEM_PROFILE */
 
 /* Used by v_evaluate() and setstr() to control action when error occurs */

Index: src/bin/ksh/tty.c
diff -u src/bin/ksh/tty.c:1.5 src/bin/ksh/tty.c:1.6
--- src/bin/ksh/tty.c:1.5	Fri Jun 23 00:04:20 2017
+++ src/bin/ksh/tty.c	Fri Jun 23 00:09:36 2017
@@ -1,9 +1,9 @@
-/*	$NetBSD: tty.c,v 1.5 2017/06/23 00:04:20 kamil Exp $	*/
+/*	$NetBSD: tty.c,v 1.6 2017/06/23 00:09:36 kamil Exp $	*/
 
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: tty.c,v 1.5 2017/06/23 00:04:20 kamil Exp $");
+__RCSID("$NetBSD: tty.c,v 1.6 2017/06/23 00:09:36 kamil Exp $");
 #endif
 
 
@@ -112,22 +112,6 @@ tty_init(init_ttystate)
 	/* SCO can't job control on /dev/tty, so don't try... */
 #if !defined(__SCO__)
 	if ((tfd = open(devtty, O_RDWR, 0)) < 0) {
-#ifdef __NeXT
-		/* rlogin on NeXT boxes does not set up the controlling tty,
-		 * so force it to be done here...
-		 */
-		{
-			extern char *ttyname ARGS((int));
-			char *s = ttyname(isatty(2) ? 2 : 0);
-			int fd;
-
-			if (s && (fd = open(s, O_RDWR, 0)) >= 0) {
-close(fd);
-tfd = open(devtty, O_RDWR, 0);
-			}
-		}
-#endif /* __NeXT */
-
 		if (tfd < 0) {
 			tty_devtty = 0;
 			warningf(FALSE,



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:07:15 UTC 2017

Modified Files:
src/bin/ksh: sigact.c

Log Message:
ksh: Drop the latest ifdef for BSD4.1 and eliminate dead code around it


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/bin/ksh/sigact.c

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

Modified files:

Index: src/bin/ksh/sigact.c
diff -u src/bin/ksh/sigact.c:1.6 src/bin/ksh/sigact.c:1.7
--- src/bin/ksh/sigact.c:1.6	Thu Jun 22 23:59:28 2017
+++ src/bin/ksh/sigact.c	Fri Jun 23 00:07:15 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: sigact.c,v 1.6 2017/06/22 23:59:28 kamil Exp $	*/
+/*	$NetBSD: sigact.c,v 1.7 2017/06/23 00:07:15 kamil Exp $	*/
 
 /* NAME:
  *  sigact.c - fake sigaction(2)
@@ -141,7 +141,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: sigact.c,v 1.6 2017/06/22 23:59:28 kamil Exp $");
+__RCSID("$NetBSD: sigact.c,v 1.7 2017/06/23 00:07:15 kamil Exp $");
 #endif
 
 
@@ -169,28 +169,6 @@ __RCSID("$NetBSD: sigact.c,v 1.6 2017/06
 
 #define USE_SIGMASK
 
-/*
- * if we haven't been told,
- * try and guess what we should implement with.
- */
-#if !defined(USE_SIGSET) && !defined(USE_SIGMASK) && !defined(USE_SIGNAL)
-# if defined(sigmask) || defined(BSD) || defined(_BSD) && !defined(BSD41)
-#   define USE_SIGMASK
-# else
-#   ifndef NO_SIGSET
-# define USE_SIGSET
-#   else
-# define USE_SIGNAL
-#   endif
-# endif
-#endif
-/*
- * if we still don't know, we're in trouble
- */
-#if !defined(USE_SIGSET) && !defined(USE_SIGMASK) && !defined(USE_SIGNAL)
-error must know what to implement with
-#endif
-
 #include "sigact.h"
 
 /*



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:04:20 UTC 2017

Modified Files:
src/bin/ksh: tty.c

Log Message:
ksh: Drop BSD4.3 temporary hack in tty code


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/bin/ksh/tty.c

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

Modified files:

Index: src/bin/ksh/tty.c
diff -u src/bin/ksh/tty.c:1.4 src/bin/ksh/tty.c:1.5
--- src/bin/ksh/tty.c:1.4	Mon Jun 23 11:39:06 2003
+++ src/bin/ksh/tty.c	Fri Jun 23 00:04:20 2017
@@ -1,9 +1,9 @@
-/*	$NetBSD: tty.c,v 1.4 2003/06/23 11:39:06 agc Exp $	*/
+/*	$NetBSD: tty.c,v 1.5 2017/06/23 00:04:20 kamil Exp $	*/
 
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: tty.c,v 1.4 2003/06/23 11:39:06 agc Exp $");
+__RCSID("$NetBSD: tty.c,v 1.5 2017/06/23 00:04:20 kamil Exp $");
 #endif
 
 
@@ -74,16 +74,6 @@ set_tty(fd, ts, flags)
 			ret = -1;
 #   endif
 #  else /* HAVE_TERMIO_H */
-#   if defined(__mips) && (defined(_SYSTYPE_BSD43) || defined(__SYSTYPE_BSD43))
-	/* Under RISC/os 5.00, bsd43 environment, after a tty driver
-	 * generated interrupt (eg, INTR, TSTP), all output to tty is
-	 * lost until a SETP is done (there must be a better way of
-	 * doing this...).
-	 */
-	if (flags & TF_MIPSKLUDGE)
-		ret = ioctl(fd, TIOCSETP, >sgttyb);
-	else
-#   endif /* _SYSTYPE_BSD43 */
 	ret = ioctl(fd, TIOCSETN, >sgttyb);
 #   ifdef TIOCGATC
 	if (ioctl(fd, TIOCSATC, >lchars) < 0)
@@ -138,15 +128,12 @@ tty_init(init_ttystate)
 		}
 #endif /* __NeXT */
 
-/* X11R5 xterm on mips doesn't set controlling tty properly - temporary hack */
-# if !defined(__mips) || !(defined(_SYSTYPE_BSD43) || defined(__SYSTYPE_BSD43))
 		if (tfd < 0) {
 			tty_devtty = 0;
 			warningf(FALSE,
 "No controlling tty (open %s: %s)",
 devtty, strerror(errno));
 		}
-# endif /* __mips  */
 	}
 #else /* !__SCO__ */
 	tfd = -1;



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 23 00:00:58 UTC 2017

Modified Files:
src/bin/ksh: config.h trap.c

Log Message:
ksh: Drop support for UNIX V7-style signal routines


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/bin/ksh/config.h
cvs rdiff -u -r1.11 -r1.12 src/bin/ksh/trap.c

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.34 src/bin/ksh/config.h:1.35
--- src/bin/ksh/config.h:1.34	Thu Jun 22 23:59:28 2017
+++ src/bin/ksh/config.h	Fri Jun 23 00:00:58 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.34 2017/06/22 23:59:28 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.35 2017/06/23 00:00:58 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -66,9 +66,6 @@
 /* Define if you have posix signal routines (sigaction(), et. al.) */
 #define POSIX_SIGNALS 1
 
-/* Define if you have v7 signal routines (signal(), signal reset on delivery) */
-/* #undef V7_SIGNALS */
-
 /* Define to use the fake posix signal routines (sigact.[ch]) */
 /* #undef USE_FAKE_SIGACT */
 

Index: src/bin/ksh/trap.c
diff -u src/bin/ksh/trap.c:1.11 src/bin/ksh/trap.c:1.12
--- src/bin/ksh/trap.c:1.11	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/trap.c	Fri Jun 23 00:00:58 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.11 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: trap.c,v 1.12 2017/06/23 00:00:58 kamil Exp $	*/
 
 /*
  * signal handling
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: trap.c,v 1.11 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: trap.c,v 1.12 2017/06/23 00:00:58 kamil Exp $");
 #endif
 
 #include "sh.h"
@@ -141,10 +141,7 @@ trapsig(i)
 	}
 	if (p->shtrap)
 		(*p->shtrap)(i);
-#ifdef V7_SIGNALS
-	if (sigtraps[i].cursig == trapsig) /* this for SIGCHLD,SIGALRM */
-		sigaction(i, _trap, (struct sigaction *) 0);
-#endif /* V7_SIGNALS */
+
 	errno = errno_;
 	return RETSIGVAL;
 }



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:59:29 UTC 2017

Modified Files:
src/bin/ksh: conf-end.h config.h sigact.c

Log Message:
ksh: Drop fallback for BSD4.2 signal routines


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/bin/ksh/conf-end.h
cvs rdiff -u -r1.33 -r1.34 src/bin/ksh/config.h
cvs rdiff -u -r1.5 -r1.6 src/bin/ksh/sigact.c

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

Modified files:

Index: src/bin/ksh/conf-end.h
diff -u src/bin/ksh/conf-end.h:1.3 src/bin/ksh/conf-end.h:1.4
--- src/bin/ksh/conf-end.h:1.3	Thu Jun 22 23:54:13 2017
+++ src/bin/ksh/conf-end.h	Thu Jun 22 23:59:28 2017
@@ -1,9 +1,9 @@
-/*	$NetBSD: conf-end.h,v 1.3 2017/06/22 23:54:13 kamil Exp $	*/
+/*	$NetBSD: conf-end.h,v 1.4 2017/06/22 23:59:28 kamil Exp $	*/
 
 /*
  * End of configuration stuff for PD ksh.
  *
- * RCSid: $NetBSD: conf-end.h,v 1.3 2017/06/22 23:54:13 kamil Exp $
+ * RCSid: $NetBSD: conf-end.h,v 1.4 2017/06/22 23:59:28 kamil Exp $
  */
 
 #if defined(EMACS) || defined(VI)
@@ -24,7 +24,7 @@
 
 /* Can we safely catch sigchld and wait for processes? */
 #if (defined(HAVE_WAITPID) || defined(HAVE_WAIT3)) \
-&& (defined(POSIX_SIGNALS) || defined(BSD42_SIGNALS))
+&& (defined(POSIX_SIGNALS))
 # define JOB_SIGS
 #endif
 

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.33 src/bin/ksh/config.h:1.34
--- src/bin/ksh/config.h:1.33	Thu Jun 22 23:56:24 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:59:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.33 2017/06/22 23:56:24 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.34 2017/06/22 23:59:28 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -66,9 +66,6 @@
 /* Define if you have posix signal routines (sigaction(), et. al.) */
 #define POSIX_SIGNALS 1
 
-/* Define if you have BSD4.2 signal routines (sigsetmask(), et. al.) */
-/* #undef BSD42_SIGNALS */
-
 /* Define if you have v7 signal routines (signal(), signal reset on delivery) */
 /* #undef V7_SIGNALS */
 

Index: src/bin/ksh/sigact.c
diff -u src/bin/ksh/sigact.c:1.5 src/bin/ksh/sigact.c:1.6
--- src/bin/ksh/sigact.c:1.5	Thu Jun 22 23:56:24 2017
+++ src/bin/ksh/sigact.c	Thu Jun 22 23:59:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: sigact.c,v 1.5 2017/06/22 23:56:24 kamil Exp $	*/
+/*	$NetBSD: sigact.c,v 1.6 2017/06/22 23:59:28 kamil Exp $	*/
 
 /* NAME:
  *  sigact.c - fake sigaction(2)
@@ -141,7 +141,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: sigact.c,v 1.5 2017/06/22 23:56:24 kamil Exp $");
+__RCSID("$NetBSD: sigact.c,v 1.6 2017/06/22 23:59:28 kamil Exp $");
 #endif
 
 
@@ -167,12 +167,7 @@ __RCSID("$NetBSD: sigact.c,v 1.5 2017/06
 #ifdef USE_FAKE_SIGACT /* let autoconf decide.. */
 /* #if !defined(SA_NOCLDSTOP) || defined(_SIGACT_H) || defined(USE_SIGNAL) || defined(USE_SIGSET) || defined(USE_SIGMASK) */
 
-/* Let autoconf decide which to use */
-#ifdef BSD42_SIGNALS
-# define USE_SIGMASK
-#else
-# define USE_SIGNAL
-#endif /* BSD42_SIGNALS */
+#define USE_SIGMASK
 
 /*
  * if we haven't been told,



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:56:24 UTC 2017

Modified Files:
src/bin/ksh: config.h sigact.c

Log Message:
ksh: Remove fallback to BSD4.1 signal routines


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/bin/ksh/config.h
cvs rdiff -u -r1.4 -r1.5 src/bin/ksh/sigact.c

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.32 src/bin/ksh/config.h:1.33
--- src/bin/ksh/config.h:1.32	Thu Jun 22 23:54:13 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:56:24 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.32 2017/06/22 23:54:13 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.33 2017/06/22 23:56:24 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -69,9 +69,6 @@
 /* Define if you have BSD4.2 signal routines (sigsetmask(), et. al.) */
 /* #undef BSD42_SIGNALS */
 
-/* Define if you have BSD4.1 signal routines (sigset(), et. al.) */
-/* #undef BSD41_SIGNALS */
-
 /* Define if you have v7 signal routines (signal(), signal reset on delivery) */
 /* #undef V7_SIGNALS */
 

Index: src/bin/ksh/sigact.c
diff -u src/bin/ksh/sigact.c:1.4 src/bin/ksh/sigact.c:1.5
--- src/bin/ksh/sigact.c:1.4	Mon Jun 23 11:39:03 2003
+++ src/bin/ksh/sigact.c	Thu Jun 22 23:56:24 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: sigact.c,v 1.4 2003/06/23 11:39:03 agc Exp $	*/
+/*	$NetBSD: sigact.c,v 1.5 2017/06/22 23:56:24 kamil Exp $	*/
 
 /* NAME:
  *  sigact.c - fake sigaction(2)
@@ -141,7 +141,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: sigact.c,v 1.4 2003/06/23 11:39:03 agc Exp $");
+__RCSID("$NetBSD: sigact.c,v 1.5 2017/06/22 23:56:24 kamil Exp $");
 #endif
 
 
@@ -171,11 +171,7 @@ __RCSID("$NetBSD: sigact.c,v 1.4 2003/06
 #ifdef BSD42_SIGNALS
 # define USE_SIGMASK
 #else
-# ifdef BSD41_SIGNALS
-#  define USE_SIGSET
-# else
-#  define USE_SIGNAL
-# endif
+# define USE_SIGNAL
 #endif /* BSD42_SIGNALS */
 
 /*



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:54:13 UTC 2017

Modified Files:
src/bin/ksh: conf-end.h config.h

Log Message:
ksh: Drop support for systems without mmap(2)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/bin/ksh/conf-end.h
cvs rdiff -u -r1.31 -r1.32 src/bin/ksh/config.h

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

Modified files:

Index: src/bin/ksh/conf-end.h
diff -u src/bin/ksh/conf-end.h:1.2 src/bin/ksh/conf-end.h:1.3
--- src/bin/ksh/conf-end.h:1.2	Sun Jan 12 19:11:43 1997
+++ src/bin/ksh/conf-end.h	Thu Jun 22 23:54:13 2017
@@ -1,9 +1,9 @@
-/*	$NetBSD: conf-end.h,v 1.2 1997/01/12 19:11:43 tls Exp $	*/
+/*	$NetBSD: conf-end.h,v 1.3 2017/06/22 23:54:13 kamil Exp $	*/
 
 /*
  * End of configuration stuff for PD ksh.
  *
- * RCSid: $NetBSD: conf-end.h,v 1.2 1997/01/12 19:11:43 tls Exp $
+ * RCSid: $NetBSD: conf-end.h,v 1.3 2017/06/22 23:54:13 kamil Exp $
  */
 
 #if defined(EMACS) || defined(VI)
@@ -17,11 +17,7 @@
 # define HISTORY
 #endif /* EDIT */
 
-/*
- * if you don't have mmap() you can't use Peter Collinson's history
- * mechanism.  If that is the case, then define EASY_HISTORY
- */
-#if defined(HISTORY) && (!defined(COMPLEX_HISTORY) || !defined(HAVE_MMAP) || !defined(HAVE_FLOCK))
+#if defined(HISTORY) && (!defined(COMPLEX_HISTORY) || !defined(HAVE_FLOCK))
 # undef COMPLEX_HISTORY
 # define EASY_HISTORY			/* sjg's trivial history file */
 #endif

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.31 src/bin/ksh/config.h:1.32
--- src/bin/ksh/config.h:1.31	Thu Jun 22 23:50:24 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:54:13 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.31 2017/06/22 23:50:24 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.32 2017/06/22 23:54:13 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -14,9 +14,6 @@
 /* Define to `int' if  doesn't define.  */
 /* #undef gid_t */
 
-/* Define if you have a working `mmap' system call.  */
-#define HAVE_MMAP 1
-
 /* Define if your struct stat has st_rdev.  */
 #define HAVE_ST_RDEV 1
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:50:25 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without dup2(2)


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/bin/ksh/config.h
cvs rdiff -u -r1.25 -r1.26 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.30 src/bin/ksh/config.h:1.31
--- src/bin/ksh/config.h:1.30	Thu Jun 22 23:47:29 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:50:24 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.30 2017/06/22 23:47:29 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.31 2017/06/22 23:50:24 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -138,9 +138,6 @@
 /* Define if opendir() will open non-directory files */
 /* #undef OPENDIR_DOES_NONDIR */
 
-/* Define if you have a dup2() function in your C library */
-#define	HAVE_DUP2 1
-
 /* Define if the pgrp of setpgrp() can't be the pid of a zombie process */
 /* #undef NEED_PGRP_SYNC */
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.25 src/bin/ksh/sh.h:1.26
--- src/bin/ksh/sh.h:1.25	Thu Jun 22 23:47:29 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:50:24 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.25 2017/06/22 23:47:29 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.26 2017/06/22 23:50:24 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.25 2017/06/22 23:47:29 kamil Exp $ */
+/* $Id: sh.h,v 1.26 2017/06/22 23:50:24 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -126,10 +126,6 @@ typedef	RETSIGTYPE (*handler_t) ARGS((in
 # define ksh_jmp_buf		jmp_buf
 #endif /* HAVE_SIGSETJMP */
 
-#ifndef HAVE_DUP2
-extern int dup2 ARGS((int, int));
-#endif /* !HAVE_DUP2 */
-
 /* Find a integer type that is at least 32 bits (or die) - SIZEOF_* defined
  * by autoconf (assumes an 8 bit byte, but I'm not concerned).
  * NOTE: INT32 may end up being more than 32 bits.



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:47:29 UTC 2017

Modified Files:
src/bin/ksh: config.h exec.c sh.h

Log Message:
ksh: Drop support for ISC UNIX


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/bin/ksh/config.h
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/exec.c
cvs rdiff -u -r1.24 -r1.25 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.29 src/bin/ksh/config.h:1.30
--- src/bin/ksh/config.h:1.29	Thu Jun 22 23:38:49 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:47:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.29 2017/06/22 23:38:49 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.30 2017/06/22 23:47:29 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -144,9 +144,6 @@
 /* Define if the pgrp of setpgrp() can't be the pid of a zombie process */
 /* #undef NEED_PGRP_SYNC */
 
-/* Define if you arg running ISC unix */
-/* #undef OS_ISC */
-
 /* Define if you have a POSIX.1 compatible  */
 #define POSIX_SYS_WAIT 1
 

Index: src/bin/ksh/exec.c
diff -u src/bin/ksh/exec.c:1.18 src/bin/ksh/exec.c:1.19
--- src/bin/ksh/exec.c:1.18	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/exec.c	Thu Jun 22 23:47:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec.c,v 1.18 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: exec.c,v 1.19 2017/06/22 23:47:29 kamil Exp $	*/
 
 /*
  * execute command tree
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: exec.c,v 1.18 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: exec.c,v 1.19 2017/06/22 23:47:29 kamil Exp $");
 #endif
 
 
@@ -420,7 +420,7 @@ execute(t, flags)
 #endif
 		restoresigs();
 		cleanup_proc_env();
-		ksh_execve(t->str, t->args, ap, flags);
+		execve(t->str, t->args, ap);
 		if (errno == ENOEXEC)
 			scriptexec(t, ap);
 		else
@@ -813,7 +813,7 @@ scriptexec(tp, ap)
 #endif	/* SHARPBANG */
 	*tp->args = shellv;
 
-	ksh_execve(tp->args[0], tp->args, ap, 0);
+	execve(tp->args[0], tp->args, ap);
 
 	/* report both the program that was run and the bogus shell */
 	errorf("%s: %s: %s", tp->str, shellv, strerror(errno));

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.24 src/bin/ksh/sh.h:1.25
--- src/bin/ksh/sh.h:1.24	Thu Jun 22 23:42:35 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:47:29 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.24 2017/06/22 23:42:35 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.25 2017/06/22 23:47:29 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.24 2017/06/22 23:42:35 kamil Exp $ */
+/* $Id: sh.h,v 1.25 2017/06/22 23:47:29 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -108,19 +108,6 @@ typedef	RETSIGTYPE (*handler_t) ARGS((in
 # define killpg(p, s)	kill(-(p), (s))
 #endif /* !HAVE_KILLPG */
 
-/* Special cases for execve(2) */
-# if defined(OS_ISC) && defined(_POSIX_SOURCE)
-/* Kludge for ISC 3.2 (and other versions?) so programs will run correctly.  */
-#  define ksh_execve(p, av, ev, flags) \
-do { \
-	__setostype(0); \
-	execve(p, av, ev); \
-	__setostype(1); \
-} while (0)
-# else /* OS_ISC && _POSIX */
-#  define ksh_execve(p, av, ev, flags)	execve(p, av, ev)
-# endif /* OS_ISC && _POSIX */
-
 /* this is a hang-over from older versions of the os2 port */
 #define ksh_dupbase(fd, base) fcntl(fd, F_DUPFD, base)
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:42:35 UTC 2017

Modified Files:
src/bin/ksh: sh.h

Log Message:
ksh: Drop support for systems without offsetof(3)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.23 src/bin/ksh/sh.h:1.24
--- src/bin/ksh/sh.h:1.23	Thu Jun 22 23:38:49 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:42:35 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.23 2017/06/22 23:38:49 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.24 2017/06/22 23:42:35 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.23 2017/06/22 23:38:49 kamil Exp $ */
+/* $Id: sh.h,v 1.24 2017/06/22 23:42:35 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -104,10 +104,6 @@ typedef	RETSIGTYPE (*handler_t) ARGS((in
 # define DEFAULT__PATH DEFAULT_PATH
 #endif /* _PATH_DEFPATH */
 
-#ifndef offsetof
-# define offsetof(type,id) ((size_t)&((type*)NULL)->id)
-#endif
-
 #ifndef HAVE_KILLPG
 # define killpg(p, s)	kill(-(p), (s))
 #endif /* !HAVE_KILLPG */



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:38:49 UTC 2017

Modified Files:
src/bin/ksh: config.h misc.c sh.h

Log Message:
ksh: Drop support for systems without 


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/bin/ksh/config.h
cvs rdiff -u -r1.21 -r1.22 src/bin/ksh/misc.c
cvs rdiff -u -r1.22 -r1.23 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.28 src/bin/ksh/config.h:1.29
--- src/bin/ksh/config.h:1.28	Thu Jun 22 23:37:00 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:38:49 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.28 2017/06/22 23:37:00 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.29 2017/06/22 23:38:49 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -259,9 +259,6 @@
 /* Define if you have the  header file.  */
 #define HAVE_DIRENT_H 1
 
-/* Define if you have the  header file.  */
-#define HAVE_LIMITS_H 1
-
 /* Define if you have the  header file.  */
 /* #undef HAVE_NDIR_H */
 

Index: src/bin/ksh/misc.c
diff -u src/bin/ksh/misc.c:1.21 src/bin/ksh/misc.c:1.22
--- src/bin/ksh/misc.c:1.21	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/misc.c	Thu Jun 22 23:38:49 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: misc.c,v 1.21 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: misc.c,v 1.22 2017/06/22 23:38:49 kamil Exp $	*/
 
 /*
  * Miscellaneous functions
@@ -6,15 +6,13 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: misc.c,v 1.21 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: misc.c,v 1.22 2017/06/22 23:38:49 kamil Exp $");
 #endif
 
 
 #include "sh.h"
 #include 	/* for FILECHCONV */
-#ifdef HAVE_LIMITS_H
-# include 
-#endif
+#include 
 
 #ifndef UCHAR_MAX
 # define UCHAR_MAX	0xFF

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.22 src/bin/ksh/sh.h:1.23
--- src/bin/ksh/sh.h:1.22	Thu Jun 22 23:37:00 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:38:49 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.22 2017/06/22 23:37:00 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.23 2017/06/22 23:38:49 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.22 2017/06/22 23:37:00 kamil Exp $ */
+/* $Id: sh.h,v 1.23 2017/06/22 23:38:49 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -61,9 +61,7 @@
 /* Some machines (eg, FreeBSD 1.1.5) define CLK_TCK in limits.h
  * (ksh_limval.h assumes limits has been included, if available)
  */
-#ifdef HAVE_LIMITS_H
-# include 
-#endif /* HAVE_LIMITS_H */
+#include 
 
 #include 
 #ifdef	NSIG



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:37:00 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without 


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/bin/ksh/config.h
cvs rdiff -u -r1.21 -r1.22 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.27 src/bin/ksh/config.h:1.28
--- src/bin/ksh/config.h:1.27	Thu Jun 22 23:33:36 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:37:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.27 2017/06/22 23:33:36 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.28 2017/06/22 23:37:00 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -259,9 +259,6 @@
 /* Define if you have the  header file.  */
 #define HAVE_DIRENT_H 1
 
-/* Define if you have the  header file.  */
-#define HAVE_FCNTL_H 1
-
 /* Define if you have the  header file.  */
 #define HAVE_LIMITS_H 1
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.21 src/bin/ksh/sh.h:1.22
--- src/bin/ksh/sh.h:1.21	Thu Jun 22 23:33:36 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:37:00 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.21 2017/06/22 23:33:36 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.22 2017/06/22 23:37:00 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.21 2017/06/22 23:33:36 kamil Exp $ */
+/* $Id: sh.h,v 1.22 2017/06/22 23:37:00 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -33,12 +33,8 @@
 #endif /* HAVE_PROTOTYPES */
 
 #include 
+#include 
 
-#ifdef HAVE_FCNTL_H
-# include 
-#else
-# include 
-#endif /* HAVE_FCNTL_H */
 #ifndef O_ACCMODE
 # define O_ACCMODE	(O_RDONLY|O_WRONLY|O_RDWR)
 #endif /* !O_ACCMODE */



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:33:36 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without memmove(3) and stop using bcopy(3)


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/bin/ksh/config.h
cvs rdiff -u -r1.20 -r1.21 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.26 src/bin/ksh/config.h:1.27
--- src/bin/ksh/config.h:1.26	Thu Jun 22 23:30:42 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:33:36 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.26 2017/06/22 23:30:42 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.27 2017/06/22 23:33:36 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -126,12 +126,6 @@
 /* Define if you have a sane  header file */
 #define HAVE_TERMIOS_H 1
 
-/* Define if you have a memmove() function in your C library */
-#define HAVE_MEMMOVE 1
-
-/* Define if you have a bcopy() function in your C library */
-#define HAVE_BCOPY
-
 /* Define if you have a lstat() function in your C library */
 #define HAVE_LSTAT 1
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.20 src/bin/ksh/sh.h:1.21
--- src/bin/ksh/sh.h:1.20	Thu Jun 22 23:30:42 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:33:36 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.20 2017/06/22 23:30:42 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.21 2017/06/22 23:33:36 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.20 2017/06/22 23:30:42 kamil Exp $ */
+/* $Id: sh.h,v 1.21 2017/06/22 23:33:36 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -24,14 +24,6 @@
 #include 
 #include 
 
-#ifndef HAVE_MEMMOVE
-# ifdef HAVE_BCOPY
-#  define memmove(d, s, n)	bcopy(s, d, n)
-# else
-void *memmove ARGS((void *d, const void *s, size_t n));
-# endif
-#endif /* HAVE_MEMMOVE */
-
 #ifdef HAVE_PROTOTYPES
 # include 
 # define SH_VA_START(va, argn) va_start(va, argn)



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:30:42 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without memset(3)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/bin/ksh/config.h
cvs rdiff -u -r1.19 -r1.20 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.25 src/bin/ksh/config.h:1.26
--- src/bin/ksh/config.h:1.25	Thu Jun 22 23:29:35 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:30:42 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.25 2017/06/22 23:29:35 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.26 2017/06/22 23:30:42 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -126,9 +126,6 @@
 /* Define if you have a sane  header file */
 #define HAVE_TERMIOS_H 1
 
-/* Define if you have a memset() function in your C library */
-#define HAVE_MEMSET 1
-
 /* Define if you have a memmove() function in your C library */
 #define HAVE_MEMMOVE 1
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.19 src/bin/ksh/sh.h:1.20
--- src/bin/ksh/sh.h:1.19	Thu Jun 22 23:29:35 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:30:42 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.19 2017/06/22 23:29:35 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.20 2017/06/22 23:30:42 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.19 2017/06/22 23:29:35 kamil Exp $ */
+/* $Id: sh.h,v 1.20 2017/06/22 23:30:42 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -24,11 +24,6 @@
 #include 
 #include 
 
-#ifndef HAVE_MEMSET
-# define memcpy(d, s, n)	bcopy(s, d, n)
-# define memcmp(s1, s2, n)	bcmp(s1, s2, n)
-void *memset ARGS((void *d, int c, size_t n));
-#endif /* HAVE_MEMSET */
 #ifndef HAVE_MEMMOVE
 # ifdef HAVE_BCOPY
 #  define memmove(d, s, n)	bcopy(s, d, n)



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:29:35 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop usage of SVID header , it's legacy standard


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/bin/ksh/config.h
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.24 src/bin/ksh/config.h:1.25
--- src/bin/ksh/config.h:1.24	Thu Jun 22 23:27:53 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:29:35 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.24 2017/06/22 23:27:53 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.25 2017/06/22 23:29:35 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -274,9 +274,6 @@
 /* Define if you have the  header file.  */
 #define HAVE_LIMITS_H 1
 
-/* Define if you have the  header file.  */
-#define HAVE_MEMORY_H 1
-
 /* Define if you have the  header file.  */
 /* #undef HAVE_NDIR_H */
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.18 src/bin/ksh/sh.h:1.19
--- src/bin/ksh/sh.h:1.18	Thu Jun 22 23:27:53 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:29:35 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.18 2017/06/22 23:27:53 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.19 2017/06/22 23:29:35 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.18 2017/06/22 23:27:53 kamil Exp $ */
+/* $Id: sh.h,v 1.19 2017/06/22 23:29:35 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -24,9 +24,6 @@
 #include 
 #include 
 
-#ifdef HAVE_MEMORY_H
-# include 
-#endif
 #ifndef HAVE_MEMSET
 # define memcpy(d, s, n)	bcopy(s, d, n)
 # define memcmp(s1, s2, n)	bcmp(s1, s2, n)



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:27:53 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without strcasecmp(3) and strncasecmp(3)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/config.h
cvs rdiff -u -r1.17 -r1.18 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.23 src/bin/ksh/config.h:1.24
--- src/bin/ksh/config.h:1.23	Thu Jun 22 23:26:17 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:27:53 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.23 2017/06/22 23:26:17 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.24 2017/06/22 23:27:53 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -244,9 +244,6 @@
 /* Define if you have the sigsetjmp function.  */
 #define HAVE_SIGSETJMP 1
 
-/* Define if you have the strcasecmp function.  */
-#define HAVE_STRCASECMP 1
-
 /* Define if you have the strerror function.  */
 #define HAVE_STRERROR 1
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.17 src/bin/ksh/sh.h:1.18
--- src/bin/ksh/sh.h:1.17	Thu Jun 22 23:26:17 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:27:53 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.17 2017/06/22 23:26:17 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.18 2017/06/22 23:27:53 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.17 2017/06/22 23:26:17 kamil Exp $ */
+/* $Id: sh.h,v 1.18 2017/06/22 23:27:53 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -24,11 +24,6 @@
 #include 
 #include 
 
-#ifndef HAVE_STRCASECMP
-int strcasecmp ARGS((const char *s1, const char *s2));
-int strncasecmp ARGS((const char *s1, const char *s2, int n));
-#endif /* HAVE_STRCASECMP */
-
 #ifdef HAVE_MEMORY_H
 # include 
 #endif



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:26:17 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without strstr(3)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/bin/ksh/config.h
cvs rdiff -u -r1.16 -r1.17 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.22 src/bin/ksh/config.h:1.23
--- src/bin/ksh/config.h:1.22	Thu Jun 22 23:23:27 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:26:17 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.22 2017/06/22 23:23:27 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.23 2017/06/22 23:26:17 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -250,9 +250,6 @@
 /* Define if you have the strerror function.  */
 #define HAVE_STRERROR 1
 
-/* Define if you have the strstr function.  */
-#define HAVE_STRSTR 1
-
 /* Define if you have the sysconf function.  */
 #define HAVE_SYSCONF 1
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.16 src/bin/ksh/sh.h:1.17
--- src/bin/ksh/sh.h:1.16	Thu Jun 22 23:23:27 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:26:17 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.16 2017/06/22 23:23:27 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.17 2017/06/22 23:26:17 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.16 2017/06/22 23:23:27 kamil Exp $ */
+/* $Id: sh.h,v 1.17 2017/06/22 23:26:17 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -24,9 +24,6 @@
 #include 
 #include 
 
-#ifndef HAVE_STRSTR
-char *strstr ARGS((const char *s, const char *p));
-#endif /* HAVE_STRSTR */
 #ifndef HAVE_STRCASECMP
 int strcasecmp ARGS((const char *s1, const char *s2));
 int strncasecmp ARGS((const char *s1, const char *s2, int n));



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:23:27 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without 


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/bin/ksh/config.h
cvs rdiff -u -r1.15 -r1.16 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.21 src/bin/ksh/config.h:1.22
--- src/bin/ksh/config.h:1.21	Thu Jun 22 23:19:53 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:23:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.21 2017/06/22 23:19:53 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.22 2017/06/22 23:23:27 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -289,9 +289,6 @@
 /* Define if you have the  header file.  */
 #define HAVE_PATHS_H 1
 
-/* Define if you have the  header file.  */
-#define HAVE_STRING_H 1
-
 /* Define if you have the  header file.  */
 #define HAVE_SYS_DIR_H
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.15 src/bin/ksh/sh.h:1.16
--- src/bin/ksh/sh.h:1.15	Thu Jun 22 23:19:53 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:23:27 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.15 2017/06/22 23:19:53 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.16 2017/06/22 23:23:27 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.15 2017/06/22 23:19:53 kamil Exp $ */
+/* $Id: sh.h,v 1.16 2017/06/22 23:23:27 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -22,14 +22,8 @@
 #include 
 #include 
 #include 
+#include 
 
-#ifdef HAVE_STRING_H
-# include 
-#else
-# include 
-# define strchr index
-# define strrchr rindex
-#endif /* HAVE_STRING_H */
 #ifndef HAVE_STRSTR
 char *strstr ARGS((const char *s, const char *p));
 #endif /* HAVE_STRSTR */



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:19:53 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without 

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/bin/ksh/config.h
cvs rdiff -u -r1.14 -r1.15 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.20 src/bin/ksh/config.h:1.21
--- src/bin/ksh/config.h:1.20	Thu Jun 22 23:17:50 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:19:53 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.20 2017/06/22 23:17:50 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.21 2017/06/22 23:19:53 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -289,9 +289,6 @@
 /* Define if you have the  header file.  */
 #define HAVE_PATHS_H 1
 
-/* Define if you have the  header file.  */
-#define HAVE_STDDEF_H 1
-
 /* Define if you have the  header file.  */
 #define HAVE_STRING_H 1
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.14 src/bin/ksh/sh.h:1.15
--- src/bin/ksh/sh.h:1.14	Thu Jun 22 23:17:50 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:19:53 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.14 2017/06/22 23:17:50 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.15 2017/06/22 23:19:53 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.14 2017/06/22 23:17:50 kamil Exp $ */
+/* $Id: sh.h,v 1.15 2017/06/22 23:19:53 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -19,10 +19,7 @@
 #include 
 #include 
 #include 
-#ifdef HAVE_STDDEF_H
-# include 
-#endif
-
+#include 
 #include 
 #include 
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:17:50 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without 

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/ksh/config.h
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.19 src/bin/ksh/config.h:1.20
--- src/bin/ksh/config.h:1.19	Thu Jun 22 23:15:05 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:17:50 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.19 2017/06/22 23:15:05 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.20 2017/06/22 23:17:50 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -292,9 +292,6 @@
 /* Define if you have the  header file.  */
 #define HAVE_STDDEF_H 1
 
-/* Define if you have the  header file.  */
-#define HAVE_STDLIB_H 1
-
 /* Define if you have the  header file.  */
 #define HAVE_STRING_H 1
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.13 src/bin/ksh/sh.h:1.14
--- src/bin/ksh/sh.h:1.13	Thu Jun 22 23:15:05 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:17:50 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.13 2017/06/22 23:15:05 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.14 2017/06/22 23:17:50 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.13 2017/06/22 23:15:05 kamil Exp $ */
+/* $Id: sh.h,v 1.14 2017/06/22 23:17:50 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -23,20 +23,7 @@
 # include 
 #endif
 
-#ifdef HAVE_STDLIB_H
-# include 
-#else
-/* just a useful subset of what stdlib.h would have */
-extern char * getenv  ARGS((const char *));
-extern void * malloc  ARGS((size_t));
-extern void * realloc ARGS((void *, size_t));
-extern intfreeARGS((void *));
-extern intexitARGS((int));
-extern intrandARGS((void));
-extern void   srand   ARGS((unsigned int));
-extern intatoiARGS((const char *));
-#endif /* HAVE_STDLIB_H */
-
+#include 
 #include 
 
 #ifdef HAVE_STRING_H



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:15:05 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h

Log Message:
ksh: Drop support for systems without 

This code wouldn't work for them anyway.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/config.h
cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.18 src/bin/ksh/config.h:1.19
--- src/bin/ksh/config.h:1.18	Thu Jun 22 23:11:48 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:15:05 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.18 2017/06/22 23:11:48 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.19 2017/06/22 23:15:05 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -23,9 +23,6 @@
 /* Define if you have  that is POSIX.1 compatible.  */
 #define HAVE_SYS_WAIT_H 1
 
-/* Define if you have .  */
-#define HAVE_UNISTD_H 1
-
 /* Define if on MINIX.  */
 /* #undef _MINIX */
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.12 src/bin/ksh/sh.h:1.13
--- src/bin/ksh/sh.h:1.12	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 23:15:05 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.12 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.13 2017/06/22 23:15:05 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.12 2017/06/22 14:20:46 kamil Exp $ */
+/* $Id: sh.h,v 1.13 2017/06/22 23:15:05 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -37,45 +37,7 @@ extern void   srand   ARGS((unsigned int
 extern intatoiARGS((const char *));
 #endif /* HAVE_STDLIB_H */
 
-#ifdef HAVE_UNISTD_H
-# include 
-#else
-/* just a useful subset of what unistd.h would have */
-extern int access ARGS((const char *, int));
-extern int open ARGS((const char *, int, ...));
-extern int creat ARGS((const char *, mode_t));
-extern int read ARGS((int, char *, unsigned));
-extern int write ARGS((int, const char *, unsigned));
-extern off_t lseek ARGS((int, off_t, int));
-extern int close ARGS((int));
-extern int pipe ARGS((int []));
-extern int dup2 ARGS((int, int));
-extern int unlink ARGS((const char *));
-extern int fork ARGS((void));
-extern int execve ARGS((const char *, char * const[], char * const[]));
-extern int chdir ARGS((const char *));
-extern int kill ARGS((pid_t, int));
-extern char *getcwd();	/* no ARGS here - differs on different machines */
-extern int geteuid ARGS((void));
-extern int readlink ARGS((const char *, char *, int));
-extern int getegid ARGS((void));
-extern int getpid ARGS((void));
-extern int getppid ARGS((void));
-extern unsigned int sleep ARGS((unsigned int));
-extern int isatty ARGS((int));
-# ifdef POSIX_PGRP
-extern int getpgrp ARGS((void));
-extern int setpgid ARGS((pid_t, pid_t));
-# endif /* POSIX_PGRP */
-# ifdef BSD_PGRP
-extern int getpgrp ARGS((pid_t));
-extern int setpgrp ARGS((pid_t, pid_t));
-# endif /* BSD_PGRP */
-# ifdef SYSV_PGRP
-extern int getpgrp ARGS((void));
-extern int setpgrp ARGS((void));
-# endif /* SYSV_PGRP */
-#endif /* HAVE_UNISTD_H */
+#include 
 
 #ifdef HAVE_STRING_H
 # include 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:11:48 UTC 2017

Modified Files:
src/bin/ksh: config.h

Log Message:
ksh: Kill switch for CLOSEDIR_VOID (closedir(2) returns void)

No users in the code. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/bin/ksh/config.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.17 src/bin/ksh/config.h:1.18
--- src/bin/ksh/config.h:1.17	Thu Jun 22 23:09:32 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:11:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.17 2017/06/22 23:09:32 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.18 2017/06/22 23:11:48 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -11,9 +11,6 @@
 #ifndef CONFIG_H
 #define CONFIG_H
 
-/* Define if the closedir function returns void instead of int.  */
-/* #undef CLOSEDIR_VOID */
-
 /* Define to `int' if  doesn't define.  */
 /* #undef gid_t */
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 23:09:32 UTC 2017

Modified Files:
src/bin/ksh: config.h

Log Message:
ksh: Assume that $CC handles const (ANSI C89)

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/bin/ksh/config.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.16 src/bin/ksh/config.h:1.17
--- src/bin/ksh/config.h:1.16	Thu Jun 22 19:46:54 2017
+++ src/bin/ksh/config.h	Thu Jun 22 23:09:32 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.16 2017/06/22 19:46:54 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.17 2017/06/22 23:09:32 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -14,9 +14,6 @@
 /* Define if the closedir function returns void instead of int.  */
 /* #undef CLOSEDIR_VOID */
 
-/* Define to empty if the keyword does not work.  */
-/* #undef const */
-
 /* Define to `int' if  doesn't define.  */
 /* #undef gid_t */
 



CVS commit: src/sys/arch/xen/xen

2017-06-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Thu Jun 22 22:36:50 UTC 2017

Modified Files:
src/sys/arch/xen/xen: privcmd.c

Log Message:
use UVM_FLAG_UNMAP instead of unmapping separately.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/xen/xen/privcmd.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/xen/xen/privcmd.c
diff -u src/sys/arch/xen/xen/privcmd.c:1.50 src/sys/arch/xen/xen/privcmd.c:1.51
--- src/sys/arch/xen/xen/privcmd.c:1.50	Thu Jun  1 02:45:08 2017
+++ src/sys/arch/xen/xen/privcmd.c	Thu Jun 22 22:36:50 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: privcmd.c,v 1.50 2017/06/01 02:45:08 chs Exp $ */
+/* $NetBSD: privcmd.c,v 1.51 2017/06/22 22:36:50 chs Exp $ */
 
 /*-
  * Copyright (c) 2004 Christian Limpach.
@@ -27,7 +27,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: privcmd.c,v 1.50 2017/06/01 02:45:08 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: privcmd.c,v 1.51 2017/06/22 22:36:50 chs Exp $");
 
 #include 
 #include 
@@ -546,34 +546,20 @@ privcmd_map_obj(struct vm_map *map, vadd
 		return EINVAL;
 	}
 	vm_map_unlock_read(map);
-	/* remove current entries */
-	uvm_unmap1(map, start, start + size, 0);
 
 	obj = kmem_alloc(sizeof(*obj), KM_SLEEP);
 	privcmd_nobjects++;
 	uvm_obj_init(>uobj, , true, 1);
-	mutex_enter(obj->uobj.vmobjlock);
 	obj->maddr = maddr;
 	obj->npages = npages;
 	obj->domid = domid;
-	mutex_exit(obj->uobj.vmobjlock);
 	uvmflag = UVM_MAPFLAG(prot, prot, UVM_INH_NONE, UVM_ADV_NORMAL,
-	UVM_FLAG_FIXED | UVM_FLAG_NOMERGE);
+	UVM_FLAG_FIXED | UVM_FLAG_UNMAP | UVM_FLAG_NOMERGE);
 	error = uvm_map(map, , size, >uobj, 0, 0, uvmflag);
 
-	if (error) {
-		if (obj)
-			obj->uobj.pgops->pgo_detach(>uobj);
-		return error;
-	}
-	if (newstart != start) {
-		printf("uvm_map didn't give us back our vm space\n");
-		uvm_unmap1(map, newstart, newstart + size, 0);
-		if (obj)
-			obj->uobj.pgops->pgo_detach(>uobj);
-		return EINVAL;
-	}
-	return 0;
+	if (error)
+		obj->uobj.pgops->pgo_detach(>uobj);
+	return error;
 }
 
 static const struct kernfs_fileop privcmd_fileops[] = {



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

2017-06-22 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Jun 22 20:11:17 UTC 2017

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

Log Message:
Merge define/device mainbus too.  Same ioconf.c is generated.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/landisk/conf/files.landisk

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/landisk/conf/files.landisk
diff -u src/sys/arch/landisk/conf/files.landisk:1.5 src/sys/arch/landisk/conf/files.landisk:1.6
--- src/sys/arch/landisk/conf/files.landisk:1.5	Thu Jun 22 18:39:04 2017
+++ src/sys/arch/landisk/conf/files.landisk	Thu Jun 22 20:11:17 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.landisk,v 1.5 2017/06/22 18:39:04 uwe Exp $
+#	$NetBSD: files.landisk,v 1.6 2017/06/22 20:11:17 uwe Exp $
 
 # maxpartitions must be first item in files.${MACHINE}
 maxpartitions 16
@@ -35,8 +35,7 @@ file dev/md_root.cmemory_disk_hooks
 # System bus types
 #
 
-define	mainbus {}
-device	mainbus: pcibus, mainbus
+device	mainbus {}: pcibus
 attach	mainbus at root
 file	arch/landisk/landisk/mainbus.c		mainbus
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 19:46:54 UTC 2017

Modified Files:
src/bin/ksh: config.h

Log Message:
Drop support for $CC incapable to use void* / volatile* (pre ANSI C89)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/bin/ksh/config.h

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.15 src/bin/ksh/config.h:1.16
--- src/bin/ksh/config.h:1.15	Thu Jun 22 19:41:07 2017
+++ src/bin/ksh/config.h	Thu Jun 22 19:46:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.15 2017/06/22 19:41:07 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.16 2017/06/22 19:46:54 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -105,12 +105,6 @@
 /* Define if you don't have setpgrp(), setpgid() or getpgrp() routines */
 /* #undef NO_PGRP */
 
-/* Define to char if your compiler doesn't like the void keyword */
-/* #undef void */
-
-/* Define to nothing if compiler doesn't like the volatile keyword */
-/* #undef volatile */
-
 /* Define if C compiler groks function prototypes */
 #define HAVE_PROTOTYPES 1
 



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 19:41:07 UTC 2017

Modified Files:
src/bin/ksh: c_ksh.c config.h io.c

Log Message:
Drop Ultrix support from ksh(1), a DEC UNIX for VAX


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/c_ksh.c
cvs rdiff -u -r1.14 -r1.15 src/bin/ksh/config.h
cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/io.c

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

Modified files:

Index: src/bin/ksh/c_ksh.c
diff -u src/bin/ksh/c_ksh.c:1.23 src/bin/ksh/c_ksh.c:1.24
--- src/bin/ksh/c_ksh.c:1.23	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/c_ksh.c	Thu Jun 22 19:41:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ksh.c,v 1.23 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: c_ksh.c,v 1.24 2017/06/22 19:41:07 kamil Exp $	*/
 
 /*
  * built-in Korn commands: c_*
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.23 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.24 2017/06/22 19:41:07 kamil Exp $");
 #endif
 
 #include "sh.h"
@@ -325,7 +325,7 @@ c_print(wp)
 
 switch ((c = *s++)) {
 /* Oddly enough, \007 seems more portable than
- * \a (due to Ultrix cc, old pcc's,
+ * \a (due to old pcc's,
  * etc.).
  */
 case 'a': c = '\007'; break;

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.14 src/bin/ksh/config.h:1.15
--- src/bin/ksh/config.h:1.14	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/config.h	Thu Jun 22 19:41:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.14 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.15 2017/06/22 19:41:07 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -72,9 +72,6 @@
 /* Define if your kernel doesn't handle scripts starting with #! */
 /* #undef SHARPBANG */
 
-/* Define if dup2() preserves the close-on-exec flag (ultrix does this) */
-/* #undef DUP2_BROKEN */
-
 /* Define as the return value of signal handlers (0 or ).  */
 #define RETSIGVAL 
 

Index: src/bin/ksh/io.c
diff -u src/bin/ksh/io.c:1.12 src/bin/ksh/io.c:1.13
--- src/bin/ksh/io.c:1.12	Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/io.c	Thu Jun 22 19:41:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: io.c,v 1.12 2017/06/22 14:20:46 kamil Exp $	*/
+/*	$NetBSD: io.c,v 1.13 2017/06/22 19:41:07 kamil Exp $	*/
 
 /*
  * shell buffered IO and formatted output
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: io.c,v 1.12 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: io.c,v 1.13 2017/06/22 19:41:07 kamil Exp $");
 #endif
 
 
@@ -283,12 +283,6 @@ ksh_dup2(ofd, nfd, errok)
 	if (ret < 0 && errno != EBADF && !errok)
 		errorf("too many files open in shell");
 
-#ifdef DUP2_BROKEN
-	/* Ultrix systems like to preserve the close-on-exec flag */
-	if (ret >= 0)
-		(void) fcntl(nfd, F_SETFD, 0);
-#endif /* DUP2_BROKEN */
-
 	return ret;
 }
 



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

2017-06-22 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Jun 22 18:39:04 UTC 2017

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

Log Message:
Merge define obio {} + device obio into single device obio {...}
Same ioconf.c is generated.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/landisk/conf/files.landisk

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/landisk/conf/files.landisk
diff -u src/sys/arch/landisk/conf/files.landisk:1.4 src/sys/arch/landisk/conf/files.landisk:1.5
--- src/sys/arch/landisk/conf/files.landisk:1.4	Wed Feb 20 21:43:34 2008
+++ src/sys/arch/landisk/conf/files.landisk	Thu Jun 22 18:39:04 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.landisk,v 1.4 2008/02/20 21:43:34 drochner Exp $
+#	$NetBSD: files.landisk,v 1.5 2017/06/22 18:39:04 uwe Exp $
 
 # maxpartitions must be first item in files.${MACHINE}
 maxpartitions 16
@@ -85,9 +85,7 @@ file	arch/landisk/dev/rs5c313_landisk.c	
 #
 # on-board I/O bus
 #
-define obio { [port = -1], [size = 0], [iomem = -1], [iosiz = 0], [irq = -1] }
-
-device	obio: obio
+device	obio { [port = -1], [size = 0], [iomem = -1], [iosiz = 0], [irq = -1] }
 attach	obio at mainbus
 file	arch/landisk/dev/obio.c		obio needs-flag
 



CVS commit: src/sys/arch

2017-06-22 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Thu Jun 22 18:14:32 UTC 2017

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0
src/sys/arch/i386/conf: XEN3_DOM0
src/sys/arch/xen/conf: files.xen

Log Message:
Register support for SD card readers with Xen DOM0 kernels

Tested on a Lenovo ThinkPad T440s (amd64)


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/i386/conf/XEN3_DOM0
cvs rdiff -u -r1.147 -r1.148 src/sys/arch/xen/conf/files.xen

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/amd64/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.135 src/sys/arch/amd64/conf/XEN3_DOM0:1.136
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.135	Thu Apr 20 09:56:27 2017
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Thu Jun 22 18:14:32 2017
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.135 2017/04/20 09:56:27 msaitoh Exp $
+# $NetBSD: XEN3_DOM0,v 1.136 2017/06/22 18:14:32 khorben Exp $
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -797,6 +797,19 @@ wsmouse* at btmagic? mux 0
 # Bluetooth Audio support
 btsco* at bthub?
 
+
+# SD/MMC/SDIO Controller and Device support
+
+# SD/MMC controller
+sdhc*	at pci?		# SD Host Controller
+rtsx*	at pci?		# Realtek RTS5209/RTS5229 Card Reader
+#sdhc*	at cardbus?	# SD Host Controller
+sdmmc*	at sdhc?	# SD/MMC bus
+sdmmc*	at rtsx?	# SD/MMC bus
+
+ld*	at sdmmc?
+
+
 # Cryptographic Devices
 
 # PCI cryptographic devices

Index: src/sys/arch/i386/conf/XEN3_DOM0
diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.112 src/sys/arch/i386/conf/XEN3_DOM0:1.113
--- src/sys/arch/i386/conf/XEN3_DOM0:1.112	Mon Apr 17 09:54:59 2017
+++ src/sys/arch/i386/conf/XEN3_DOM0	Thu Jun 22 18:14:32 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: XEN3_DOM0,v 1.112 2017/04/17 09:54:59 bouyer Exp $
+#	$NetBSD: XEN3_DOM0,v 1.113 2017/06/22 18:14:32 khorben Exp $
 #
 #	XEN3_0: Xen 3.0 domain0 kernel
 
@@ -689,6 +689,23 @@ ieee1394if* at fwohci?
 fwip*	at ieee1394if?			# IP over IEEE1394
 sbp*	at ieee1394if? euihi ? euilo ?	# SCSI over IEEE1394
 
+
+# SD/MMC/SDIO Controller and Device support
+
+# PCI SD/MMC controller
+sdhc*	at pci?# SD Host Controller
+rtsx*	at pci?# Realtek RTS5209/RTS5229 Card Reader
+
+# CardBus SD/MMC controller
+#sdhc*	at cardbus? function ?		# SD Host Controller
+
+sdmmc*	at sdhc?			# SD/MMC bus
+sdmmc*	at rtsx?			# SD/MMC bus
+ld*	at sdmmc?
+
+
+# Audio Devices
+
 # PCI audio devices
 auacer* at pci? dev ? function ?	# ALi M5455 integrated AC'97 Audio
 auich*	at pci? dev ? function ?	# Intel ICH integrated AC'97 Audio
@@ -768,6 +785,7 @@ wsmouse* at btmagic? mux 0
 # Bluetooth Audio support
 btsco* at bthub?
 
+
 # Cryptographic Devices
 
 # PCI cryptographic devices

Index: src/sys/arch/xen/conf/files.xen
diff -u src/sys/arch/xen/conf/files.xen:1.147 src/sys/arch/xen/conf/files.xen:1.148
--- src/sys/arch/xen/conf/files.xen:1.147	Tue May 23 08:48:35 2017
+++ src/sys/arch/xen/conf/files.xen	Thu Jun 22 18:14:32 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.xen,v 1.147 2017/05/23 08:48:35 nonaka Exp $
+#	$NetBSD: files.xen,v 1.148 2017/06/22 18:14:32 khorben Exp $
 #	NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp 
 #	NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp 
 
@@ -375,6 +375,8 @@ include	"compat/ossaudio/files.ossaudio"
 # Bluetooth
 include "dev/bluetooth/files.bluetooth"
 
+include "dev/sdmmc/files.sdmmc"
+
 #
 # CARDBUS
 #



CVS commit: src

2017-06-22 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Thu Jun 22 17:51:22 UTC 2017

Modified Files:
src/etc/etc.vax: MAKEDEV.conf
src/sys/arch/vax/conf: files.vax majors.vax
Added Files:
src/sys/arch/vax/conf: GENERIC_USB

Log Message:
USB for vax (similar to pmax; no/negligible impact on legacy):
* Add USB device files/majors.
* Make kernel configs with USB work.
* Provide a USB-enabled kernel config.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/etc/etc.vax/MAKEDEV.conf
cvs rdiff -u -r0 -r1.1 src/sys/arch/vax/conf/GENERIC_USB
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/vax/conf/files.vax
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/vax/conf/majors.vax

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

Modified files:

Index: src/etc/etc.vax/MAKEDEV.conf
diff -u src/etc/etc.vax/MAKEDEV.conf:1.18 src/etc/etc.vax/MAKEDEV.conf:1.19
--- src/etc/etc.vax/MAKEDEV.conf:1.18	Tue Jun 20 15:10:03 2017
+++ src/etc/etc.vax/MAKEDEV.conf	Thu Jun 22 17:51:22 2017
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.18 2017/06/20 15:10:03 flxd Exp $
+# $NetBSD: MAKEDEV.conf,v 1.19 2017/06/22 17:51:22 flxd Exp $
 
 all_md)
 	makedev mt0 mt1 ts0 ts1 st0 st1 uk0 ss0 cd0 vt0
@@ -7,6 +7,7 @@ all_md)
 	makedev scsibus0 scsibus1 scsibus2 scsibus3
 	makedev ses0 ses1 ses2 ses3
 	makedev audio speaker
+	makedev usbs
 	makedev std_vax
 	;;
 

Index: src/sys/arch/vax/conf/files.vax
diff -u src/sys/arch/vax/conf/files.vax:1.122 src/sys/arch/vax/conf/files.vax:1.123
--- src/sys/arch/vax/conf/files.vax:1.122	Thu Jun 22 16:46:53 2017
+++ src/sys/arch/vax/conf/files.vax	Thu Jun 22 17:51:22 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.vax,v 1.122 2017/06/22 16:46:53 flxd Exp $
+#	$NetBSD: files.vax,v 1.123 2017/06/22 17:51:22 flxd Exp $
 #
 # new style config file for vax architecture
 #
@@ -180,6 +180,11 @@ device	si: scsi, ncr5380sbc
 attach	si at vsbus with si_vsbus
 file	arch/vax/vsa/ncr.c		si_vsbus
 
+#
+# Machine-independent ATA drivers
+#
+include "dev/ata/files.ata"
+
 # Monochrome framebuffer on VS3100.
 device	smg: displaydev, wsemuldisplaydev
 attach	smg at vsbus
@@ -412,4 +417,12 @@ include "compat/vax1k/files.vax1k"
 #arch/vax/if/if_vv.c		optional vv device-driver
 #arch/vax/if/raw_hy.c		optional hy device-driver
 
+# this wants to be probed as late as possible.
+#
+# Machine-independent USB device support
+#
+include "dev/usb/files.usb"
+
+include "dev/bluetooth/files.bluetooth"
+
 include "arch/vax/conf/majors.vax"

Index: src/sys/arch/vax/conf/majors.vax
diff -u src/sys/arch/vax/conf/majors.vax:1.26 src/sys/arch/vax/conf/majors.vax:1.27
--- src/sys/arch/vax/conf/majors.vax:1.26	Sun Jul  5 03:06:27 2015
+++ src/sys/arch/vax/conf/majors.vax	Thu Jun 22 17:51:22 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.vax,v 1.26 2015/07/05 03:06:27 matt Exp $
+#	$NetBSD: majors.vax,v 1.27 2017/06/22 17:51:22 flxd Exp $
 #
 # Device majors for vax
 #
@@ -97,3 +97,5 @@ device-major	uu			 block 13	uu
 # Majors up to 143 are reserved for machine-dependent drivers.
 # New machine-independent driver majors are assigned in 
 # sys/conf/majors.
+
+include "conf/majors.usb"

Added files:

Index: src/sys/arch/vax/conf/GENERIC_USB
diff -u /dev/null src/sys/arch/vax/conf/GENERIC_USB:1.1
--- /dev/null	Thu Jun 22 17:51:22 2017
+++ src/sys/arch/vax/conf/GENERIC_USB	Thu Jun 22 17:51:22 2017
@@ -0,0 +1,16 @@
+# $NetBSD: GENERIC_USB,v 1.1 2017/06/22 17:51:22 flxd Exp $
+#
+# GENERIC kernel with USB
+
+include	"arch/vax/conf/GENERIC"
+
+# TC-USB
+tcu*	at tc? slot ? offset ?
+slhci*	at tcu?
+gpio*	at gpiobus?
+
+# USB bus support
+usb*	at slhci?
+
+include	"dev/usb/usbdevices.config"
+midi*	at midibus?



CVS commit: src/sys/dev/tc

2017-06-22 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Thu Jun 22 17:01:34 UTC 2017

Modified Files:
src/sys/dev/tc: tcdevs.h tcdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/tc/tcdevs.h \
src/sys/dev/tc/tcdevs_data.h

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

Modified files:

Index: src/sys/dev/tc/tcdevs.h
diff -u src/sys/dev/tc/tcdevs.h:1.24 src/sys/dev/tc/tcdevs.h:1.25
--- src/sys/dev/tc/tcdevs.h:1.24	Fri Oct 14 15:01:39 2016
+++ src/sys/dev/tc/tcdevs.h	Thu Jun 22 17:01:34 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: tcdevs.h,v 1.24 2016/10/14 15:01:39 flxd Exp $	*/
+/*	$NetBSD: tcdevs.h,v 1.25 2017/06/22 17:01:34 flxd Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: tcdevs,v 1.22 2016/08/11 09:05:42 christos Exp
+ *	NetBSD: tcdevs,v 1.23 2017/06/22 16:46:53 flxd Exp
  */
 
 /*
@@ -150,7 +150,7 @@
 #define	TC_DESCRIPTION_PMAP_AA	"Prestoserve"
 
 #define	TC_DEVICE_PMAT_AA	"tra"
-#define	TC_DESCRIPTION_PMAT_AA	"DEC TurboChannel Token Ring Controller"
+#define	TC_DESCRIPTION_PMAT_AA	"DEC TURBOchannel Token Ring Controller"
 
 #define	TC_DEVICE_PMAZ_AA	"asc"
 #define	TC_DESCRIPTION_PMAZ_AA	"53c94 SCSI"
@@ -177,10 +177,10 @@
 #define	TC_DESCRIPTION_PMTNV_AA	"Non-volatile RAM option card"
 
 #define	TC_DEVICE_T1D4PKT	"ds"
-#define	TC_DESCRIPTION_T1D4PKT	"DECWRL Turbochannel T1"
+#define	TC_DESCRIPTION_T1D4PKT	"DECWRL TURBOchannel T1"
 
 #define	TC_DEVICE_T3PKT	"tt"
-#define	TC_DESCRIPTION_T3PKT	"DECWRL Turbochannel T3"
+#define	TC_DESCRIPTION_T3PKT	"DECWRL TURBOchannel T3"
 
 #define	TC_DEVICE_TC_USB	"tcu"
 #define	TC_DESCRIPTION_TC_USB	"flxd TC-USB"
Index: src/sys/dev/tc/tcdevs_data.h
diff -u src/sys/dev/tc/tcdevs_data.h:1.24 src/sys/dev/tc/tcdevs_data.h:1.25
--- src/sys/dev/tc/tcdevs_data.h:1.24	Fri Oct 14 15:01:39 2016
+++ src/sys/dev/tc/tcdevs_data.h	Thu Jun 22 17:01:34 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: tcdevs_data.h,v 1.24 2016/10/14 15:01:39 flxd Exp $	*/
+/*	$NetBSD: tcdevs_data.h,v 1.25 2017/06/22 17:01:34 flxd Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: tcdevs,v 1.22 2016/08/11 09:05:42 christos Exp
+ *	NetBSD: tcdevs,v 1.23 2017/06/22 16:46:53 flxd Exp
  */
 
 /*



CVS commit: src

2017-06-22 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Thu Jun 22 16:46:53 UTC 2017

Modified Files:
src/distrib/notes/alpha: hardware install
src/distrib/notes/pmax: hardware install
src/share/man/man4: scc.4
src/share/man/man8/man8.pmax: boot.8
src/sys/arch/alpha/include: bus_defs.h cfbreg.h tc_machdep.h
src/sys/arch/alpha/tc: tc_3000_300.h tc_3000_500.h tc_bus_mem.c
tc_conf.h tc_dma_3000_500.c tc_sgmap.h tcasic.c
src/sys/arch/arc/arc: arcbios.h
src/sys/arch/mipsco/mipsco: autoconf.c
src/sys/arch/news68k/news68k: autoconf.c
src/sys/arch/newsmips/newsmips: autoconf.c
src/sys/arch/pmax/pmax: kn03.h
src/sys/arch/pmax/stand/common: rz.c
src/sys/arch/vax/conf: files.vax
src/sys/conf: files
src/sys/dev/dec: if_le_dec.c
src/sys/dev/ic: pdqvar.h
src/sys/dev/tc: if_fta.c if_le_tc.c tcdevs tcds.c tcreg.h

Log Message:
spelling (DEC called it "TURBOchannel")


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/distrib/notes/alpha/hardware
cvs rdiff -u -r1.37 -r1.38 src/distrib/notes/alpha/install
cvs rdiff -u -r1.18 -r1.19 src/distrib/notes/pmax/hardware
cvs rdiff -u -r1.41 -r1.42 src/distrib/notes/pmax/install
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/scc.4
cvs rdiff -u -r1.15 -r1.16 src/share/man/man8/man8.pmax/boot.8
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/alpha/include/bus_defs.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/alpha/include/cfbreg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/include/tc_machdep.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/tc/tc_3000_300.h \
src/sys/arch/alpha/tc/tc_3000_500.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/tc/tc_bus_mem.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/tc/tc_conf.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/alpha/tc/tc_dma_3000_500.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/alpha/tc/tc_sgmap.h
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/alpha/tc/tcasic.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/arc/arcbios.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/mipsco/mipsco/autoconf.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/news68k/autoconf.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/newsmips/newsmips/autoconf.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/pmax/pmax/kn03.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/pmax/stand/common/rz.c
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/vax/conf/files.vax
cvs rdiff -u -r1.1178 -r1.1179 src/sys/conf/files
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/dec/if_le_dec.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ic/pdqvar.h
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/tc/if_fta.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/tc/if_le_tc.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/tc/tcdevs
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/tc/tcds.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/tc/tcreg.h

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

Modified files:

Index: src/distrib/notes/alpha/hardware
diff -u src/distrib/notes/alpha/hardware:1.18 src/distrib/notes/alpha/hardware:1.19
--- src/distrib/notes/alpha/hardware:1.18	Tue May 19 19:30:26 2015
+++ src/distrib/notes/alpha/hardware	Thu Jun 22 16:46:52 2017
@@ -1,10 +1,10 @@
-.\"	$NetBSD: hardware,v 1.18 2015/05/19 19:30:26 snj Exp $
+.\"	$NetBSD: hardware,v 1.19 2017/06/22 16:46:52 flxd Exp $
 .
 .Nx*M
 \*V runs on most of the
 .Tn DEC
 Alpha PCI platforms, on all
-of the TURBOChannel models, on the high end 8200 and 8400 systems,
+of the TURBOchannel models, on the high end 8200 and 8400 systems,
 and on the 4100 series.
 .Pp
 The SRM console is required.
@@ -40,7 +40,7 @@ it is actually possible to boot and inst
 in only
 16 MB of RAM, you will want to have at least 32 MB.
 .
-We support add-in devices on the PCI, ISA, EISA and TurboChannel buses.
+We support add-in devices on the PCI, ISA, EISA and TURBOchannel buses.
 Because
 .Nx
 has an extremely machine-independent device driver
@@ -192,7 +192,7 @@ BusLogic 7xx SCSI
 .bullet)
 .bullet)
 .
-.Ss2 Supported Turbochannel bus devices
+.Ss2 Supported TURBOchannel bus devices
 .(bullet -offset indent
 Graphics Adapters
 .(bullet -compact
@@ -206,7 +206,7 @@ SFB video (PMAGB-BA,
 Although these boards are supported by
 .Nx*M
 since there is no keyboard or mouse support available for the
-TurboChannel systems, they aren't very useful.
+TURBOchannel systems, they aren't very useful.
 .\" XXX: is this still true now that the MI sfb.c is used???
 .Note)
 .It

Index: src/distrib/notes/alpha/install
diff -u src/distrib/notes/alpha/install:1.37 src/distrib/notes/alpha/install:1.38
--- src/distrib/notes/alpha/install:1.37	Sat Apr 25 21:21:47 2009
+++ src/distrib/notes/alpha/install	Thu Jun 22 16:46:52 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: install,v 1.37 2009/04/25 21:21:47 snj Exp $
+.\"	$NetBSD: install,v 1.38 2017/06/22 16:46:52 flxd Exp $
 .\"
 .\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -358,7 +358,7 @@ with:
 .Pp
 

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

2017-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 22 15:27:23 UTC 2017

Modified Files:
src/sys/arch/evbarm/conf: files.integrator

Log Message:
we don't support 'no device' so re-define it; it will get both file attachments
but that is not an error.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/files.integrator

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

Modified files:

Index: src/sys/arch/evbarm/conf/files.integrator
diff -u src/sys/arch/evbarm/conf/files.integrator:1.12 src/sys/arch/evbarm/conf/files.integrator:1.13
--- src/sys/arch/evbarm/conf/files.integrator:1.12	Wed Jun 21 22:19:25 2017
+++ src/sys/arch/evbarm/conf/files.integrator	Thu Jun 22 11:27:23 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.integrator,v 1.12 2017/06/22 02:19:25 christos Exp $
+#	$NetBSD: files.integrator,v 1.13 2017/06/22 15:27:23 christos Exp $
 #
 # ARM, Ltd. Integrator evaluation board configuraiton info
 #
@@ -30,8 +30,6 @@ file	arch/evbarm/ifpga/plmmc_ifpga.c		pl
 
 # Integrator real-time clock
 # XXX: dev/ic/pl031.c
-no device plrtc
-device plrtc
 attach plrtc at ifpga
 file	arch/evbarm/ifpga/pl030_rtc.c		plrtc
 



CVS commit: src/sys/dev/usb

2017-06-22 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Thu Jun 22 15:22:16 UTC 2017

Modified Files:
src/sys/dev/usb: uvideo.c

Log Message:
Typos in comments


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/usb/uvideo.c

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

Modified files:

Index: src/sys/dev/usb/uvideo.c
diff -u src/sys/dev/usb/uvideo.c:1.44 src/sys/dev/usb/uvideo.c:1.45
--- src/sys/dev/usb/uvideo.c:1.44	Thu Jun  1 02:45:12 2017
+++ src/sys/dev/usb/uvideo.c	Thu Jun 22 15:22:16 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvideo.c,v 1.44 2017/06/01 02:45:12 chs Exp $	*/
+/*	$NetBSD: uvideo.c,v 1.45 2017/06/22 15:22:16 khorben Exp $	*/
 
 /*
  * Copyright (c) 2008 Patrick Mahoney
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.44 2017/06/01 02:45:12 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.45 2017/06/22 15:22:16 khorben Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1929,7 +1929,7 @@ uvideo_get_format(void *addr, struct vid
 }
 
 /*
- * uvideo_set_format - TODO: this is boken and does nothing
+ * uvideo_set_format - TODO: this is broken and does nothing
  */
 static int
 uvideo_set_format(void *addr, struct video_format *format)
@@ -2071,7 +2071,7 @@ uvideo_start_transfer(void *addr)
 	struct uvideo_stream *vs;
 	int s, err;
 
-	/* FIXME: this functions should be stream specific */
+	/* FIXME: this function should be stream specific */
 	vs = SLIST_FIRST(>sc_stream_list);
 	s = splusb();
 	err = uvideo_stream_start_xfer(vs);



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 14:20:46 UTC 2017

Modified Files:
src/bin/ksh: c_ksh.c c_sh.c c_ulimit.c config.h edit.c emacs.c eval.c
exec.c history.c io.c jobs.c lex.c main.c misc.c path.c sh.h shf.c
trap.c tree.h vi.c

Log Message:
Reapply removal of code from 90ties for OS/2 Cygwin AIX HPUX SCOUnix

Added missing #endif terminator in emacs.c


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/bin/ksh/c_ksh.c
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/c_sh.c src/bin/ksh/eval.c
cvs rdiff -u -r1.14 -r1.15 src/bin/ksh/c_ulimit.c src/bin/ksh/history.c
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/config.h
cvs rdiff -u -r1.29 -r1.30 src/bin/ksh/edit.c
cvs rdiff -u -r1.34 -r1.35 src/bin/ksh/emacs.c
cvs rdiff -u -r1.17 -r1.18 src/bin/ksh/exec.c src/bin/ksh/lex.c \
src/bin/ksh/main.c
cvs rdiff -u -r1.11 -r1.12 src/bin/ksh/io.c src/bin/ksh/path.c \
src/bin/ksh/sh.h
cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/jobs.c
cvs rdiff -u -r1.20 -r1.21 src/bin/ksh/misc.c
cvs rdiff -u -r1.9 -r1.10 src/bin/ksh/shf.c
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/trap.c
cvs rdiff -u -r1.6 -r1.7 src/bin/ksh/tree.h
cvs rdiff -u -r1.15 -r1.16 src/bin/ksh/vi.c

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

Modified files:

Index: src/bin/ksh/c_ksh.c
diff -u src/bin/ksh/c_ksh.c:1.22 src/bin/ksh/c_ksh.c:1.23
--- src/bin/ksh/c_ksh.c:1.22	Thu Jun 22 14:11:27 2017
+++ src/bin/ksh/c_ksh.c	Thu Jun 22 14:20:46 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ksh.c,v 1.22 2017/06/22 14:11:27 kamil Exp $	*/
+/*	$NetBSD: c_ksh.c,v 1.23 2017/06/22 14:20:46 kamil Exp $	*/
 
 /*
  * built-in Korn commands: c_*
@@ -6,17 +6,13 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.22 2017/06/22 14:11:27 kamil Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.23 2017/06/22 14:20:46 kamil Exp $");
 #endif
 
 #include "sh.h"
 #include "ksh_stat.h"
 #include 
 
-#ifdef __CYGWIN__
-#include 
-#endif /* __CYGWIN__ */
-
 int
 c_cd(wp)
 	char	**wp;
@@ -145,15 +141,7 @@ c_cd(wp)
 		setstr(oldpwd_s, current_wd, KSH_RETURN_ERROR);
 
 	if (!ISABSPATH(Xstring(xs, xp))) {
-#ifdef OS2
-		/* simplify_path() doesn't know about os/2's drive contexts,
-		 * so it can't set current_wd when changing to a:foo.
-		 * Handle this by calling getcwd()...
-		 */
-		pwd = ksh_get_wd((char *) 0, 0);
-#else /* OS2 */
 		pwd = (char *) 0;
-#endif /* OS2 */
 	} else
 #ifdef S_ISLNK
 	if (!physical || !(pwd = get_phys_path(Xstring(xs, xp
@@ -162,12 +150,7 @@ c_cd(wp)
 
 	/* Set PWD */
 	if (pwd) {
-#ifdef __CYGWIN__
-		char ptmp[PATH];  /* larger than MAX_PATH */
-		cygwin_conv_to_full_posix_path(pwd, ptmp);
-#else /* __CYGWIN__ */
 		char *ptmp = pwd;
-#endif /* __CYGWIN__ */
 		set_current_wd(ptmp);
 		/* Ignore failure (happens if readonly or integer) */
 		setstr(pwd_s, ptmp, KSH_RETURN_ERROR);
@@ -241,7 +224,6 @@ c_print(wp)
 #define PO_PMINUSMINUS	BIT(2)	/* print a -- argument */
 #define PO_HIST		BIT(3)	/* print to history instead of stdout */
 #define PO_COPROC	BIT(4)	/* printing to coprocess: block SIGPIPE */
-#define PO_FSLASH	BIT(5)  /* swap slash for backslash (for os2 ) */
 	int fd = 1;
 	int flags = PO_EXPAND|PO_NL;
 	char *s;
@@ -282,11 +264,7 @@ c_print(wp)
 		}
 	} else {
 		int optc;
-#if OS2
-		const char *options = "Rnpfrsu,"; /* added f flag */
-#else
 		const char *options = "Rnprsu,";
-#endif
 		while ((optc = ksh_getopt(wp, _opt, options)) != EOF)
 			switch (optc) {
 			  case 'R': /* fake BSD echo command */
@@ -297,11 +275,6 @@ c_print(wp)
 			  case 'e':
 flags |= PO_EXPAND;
 break;
-#ifdef OS2
-			  case 'f':
-flags |= PO_FSLASH;
-break;
-#endif
 			  case 'n':
 flags &= ~PO_NL;
 break;
@@ -347,19 +320,12 @@ c_print(wp)
 		s = *wp;
 		while ((c = *s++) != '\0') {
 			Xcheck(xs, xp);
-#ifdef OS2
-			if ((flags & PO_FSLASH) && c == '\\')
-if (*s == '\\')
-	*s++;
-else
-	c = '/';
-#endif /* OS2 */
 			if ((flags & PO_EXPAND) && c == '\\') {
 int i;
 
 switch ((c = *s++)) {
 /* Oddly enough, \007 seems more portable than
- * \a (due to HP-UX cc, Ultrix cc, old pcc's,
+ * \a (due to Ultrix cc, old pcc's,
  * etc.).
  */
 case 'a': c = '\007'; break;

Index: src/bin/ksh/c_sh.c
diff -u src/bin/ksh/c_sh.c:1.18 src/bin/ksh/c_sh.c:1.19
--- src/bin/ksh/c_sh.c:1.18	Thu Jun 22 14:11:27 2017
+++ src/bin/ksh/c_sh.c	Thu Jun 22 14:20:46 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_sh.c,v 1.18 2017/06/22 14:11:27 kamil Exp $	*/
+/*	$NetBSD: c_sh.c,v 1.19 2017/06/22 14:20:46 kamil Exp $	*/
 
 /*
  * built-in Bourne commands
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_sh.c,v 1.18 2017/06/22 14:11:27 kamil Exp $");
+__RCSID("$NetBSD: c_sh.c,v 1.19 2017/06/22 14:20:46 kamil Exp $");
 #endif
 
 
@@ -331,9 +331,6 @@ c_read(wp)
 			while (1) {
 c = shf_getc(shf);
 if (c == '\0'
-#ifdef OS2
-|| c == '\r'
-#endif /* OS2 */
 )
 	continue;
 

CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 14:11:28 UTC 2017

Modified Files:
src/bin/ksh: c_ksh.c c_sh.c c_ulimit.c config.h edit.c emacs.c eval.c
exec.c history.c io.c jobs.c lex.c main.c misc.c path.c sh.h shf.c
trap.c tree.h vi.c

Log Message:
Temporarily revert previous.

emacs.* gets wrong code in generation


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/bin/ksh/c_ksh.c
cvs rdiff -u -r1.17 -r1.18 src/bin/ksh/c_sh.c src/bin/ksh/eval.c
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/c_ulimit.c src/bin/ksh/history.c
cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/config.h
cvs rdiff -u -r1.28 -r1.29 src/bin/ksh/edit.c
cvs rdiff -u -r1.33 -r1.34 src/bin/ksh/emacs.c
cvs rdiff -u -r1.16 -r1.17 src/bin/ksh/exec.c src/bin/ksh/lex.c \
src/bin/ksh/main.c
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/io.c src/bin/ksh/path.c \
src/bin/ksh/sh.h
cvs rdiff -u -r1.11 -r1.12 src/bin/ksh/jobs.c
cvs rdiff -u -r1.19 -r1.20 src/bin/ksh/misc.c
cvs rdiff -u -r1.8 -r1.9 src/bin/ksh/shf.c
cvs rdiff -u -r1.9 -r1.10 src/bin/ksh/trap.c
cvs rdiff -u -r1.5 -r1.6 src/bin/ksh/tree.h
cvs rdiff -u -r1.14 -r1.15 src/bin/ksh/vi.c

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

Modified files:

Index: src/bin/ksh/c_ksh.c
diff -u src/bin/ksh/c_ksh.c:1.21 src/bin/ksh/c_ksh.c:1.22
--- src/bin/ksh/c_ksh.c:1.21	Thu Jun 22 13:35:47 2017
+++ src/bin/ksh/c_ksh.c	Thu Jun 22 14:11:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ksh.c,v 1.21 2017/06/22 13:35:47 kamil Exp $	*/
+/*	$NetBSD: c_ksh.c,v 1.22 2017/06/22 14:11:27 kamil Exp $	*/
 
 /*
  * built-in Korn commands: c_*
@@ -6,13 +6,17 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.21 2017/06/22 13:35:47 kamil Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.22 2017/06/22 14:11:27 kamil Exp $");
 #endif
 
 #include "sh.h"
 #include "ksh_stat.h"
 #include 
 
+#ifdef __CYGWIN__
+#include 
+#endif /* __CYGWIN__ */
+
 int
 c_cd(wp)
 	char	**wp;
@@ -141,7 +145,15 @@ c_cd(wp)
 		setstr(oldpwd_s, current_wd, KSH_RETURN_ERROR);
 
 	if (!ISABSPATH(Xstring(xs, xp))) {
+#ifdef OS2
+		/* simplify_path() doesn't know about os/2's drive contexts,
+		 * so it can't set current_wd when changing to a:foo.
+		 * Handle this by calling getcwd()...
+		 */
+		pwd = ksh_get_wd((char *) 0, 0);
+#else /* OS2 */
 		pwd = (char *) 0;
+#endif /* OS2 */
 	} else
 #ifdef S_ISLNK
 	if (!physical || !(pwd = get_phys_path(Xstring(xs, xp
@@ -150,7 +162,12 @@ c_cd(wp)
 
 	/* Set PWD */
 	if (pwd) {
+#ifdef __CYGWIN__
+		char ptmp[PATH];  /* larger than MAX_PATH */
+		cygwin_conv_to_full_posix_path(pwd, ptmp);
+#else /* __CYGWIN__ */
 		char *ptmp = pwd;
+#endif /* __CYGWIN__ */
 		set_current_wd(ptmp);
 		/* Ignore failure (happens if readonly or integer) */
 		setstr(pwd_s, ptmp, KSH_RETURN_ERROR);
@@ -224,6 +241,7 @@ c_print(wp)
 #define PO_PMINUSMINUS	BIT(2)	/* print a -- argument */
 #define PO_HIST		BIT(3)	/* print to history instead of stdout */
 #define PO_COPROC	BIT(4)	/* printing to coprocess: block SIGPIPE */
+#define PO_FSLASH	BIT(5)  /* swap slash for backslash (for os2 ) */
 	int fd = 1;
 	int flags = PO_EXPAND|PO_NL;
 	char *s;
@@ -264,7 +282,11 @@ c_print(wp)
 		}
 	} else {
 		int optc;
+#if OS2
+		const char *options = "Rnpfrsu,"; /* added f flag */
+#else
 		const char *options = "Rnprsu,";
+#endif
 		while ((optc = ksh_getopt(wp, _opt, options)) != EOF)
 			switch (optc) {
 			  case 'R': /* fake BSD echo command */
@@ -275,6 +297,11 @@ c_print(wp)
 			  case 'e':
 flags |= PO_EXPAND;
 break;
+#ifdef OS2
+			  case 'f':
+flags |= PO_FSLASH;
+break;
+#endif
 			  case 'n':
 flags &= ~PO_NL;
 break;
@@ -320,12 +347,19 @@ c_print(wp)
 		s = *wp;
 		while ((c = *s++) != '\0') {
 			Xcheck(xs, xp);
+#ifdef OS2
+			if ((flags & PO_FSLASH) && c == '\\')
+if (*s == '\\')
+	*s++;
+else
+	c = '/';
+#endif /* OS2 */
 			if ((flags & PO_EXPAND) && c == '\\') {
 int i;
 
 switch ((c = *s++)) {
 /* Oddly enough, \007 seems more portable than
- * \a (due to Ultrix cc, old pcc's,
+ * \a (due to HP-UX cc, Ultrix cc, old pcc's,
  * etc.).
  */
 case 'a': c = '\007'; break;

Index: src/bin/ksh/c_sh.c
diff -u src/bin/ksh/c_sh.c:1.17 src/bin/ksh/c_sh.c:1.18
--- src/bin/ksh/c_sh.c:1.17	Thu Jun 22 13:33:39 2017
+++ src/bin/ksh/c_sh.c	Thu Jun 22 14:11:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_sh.c,v 1.17 2017/06/22 13:33:39 kamil Exp $	*/
+/*	$NetBSD: c_sh.c,v 1.18 2017/06/22 14:11:27 kamil Exp $	*/
 
 /*
  * built-in Bourne commands
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_sh.c,v 1.17 2017/06/22 13:33:39 kamil Exp $");
+__RCSID("$NetBSD: c_sh.c,v 1.18 2017/06/22 14:11:27 kamil Exp $");
 #endif
 
 
@@ -331,6 +331,9 @@ c_read(wp)
 			while (1) {
 c = shf_getc(shf);
 if (c == '\0'
+#ifdef OS2
+|| c == '\r'
+#endif /* OS2 */
 )
 	continue;
 if (c == EOF && shf_error(shf)
@@ -902,5 +905,13 

CVS commit: src/usr.bin/make

2017-06-22 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Jun 22 13:42:10 UTC 2017

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

Log Message:
Improve description of -V. Can probably be improved further.


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/usr.bin/make/make.1

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.269 src/usr.bin/make/make.1:1.270
--- src/usr.bin/make/make.1:1.269	Thu Jun 22 13:34:13 2017
+++ src/usr.bin/make/make.1	Thu Jun 22 13:42:09 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.269 2017/06/22 13:34:13 wiz Exp $
+.\"	$NetBSD: make.1,v 1.270 2017/06/22 13:42:09 dholland Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -337,24 +337,39 @@ for each job started and completed.
 Rather than re-building a target as specified in the makefile, create it
 or update its modification time to make it appear up-to-date.
 .It Fl V Ar variable
-Print
-.Nm Ns 's
-idea of the value of
-.Ar variable ,
-in the global context.
+Print the value of
+.Ar variable .
 Do not build any targets.
 Multiple instances of this option may be specified;
 the variables will be printed one per line,
 with a blank line for each null or undefined variable.
+The value printed is extracted from the global context after all
+makefiles have been read.
+By default, the raw variable contents (which may
+include additional unexpanded variable references) are shown.
 If
 .Ar variable
 contains a
 .Ql \&$
-then the value will be expanded before printing.
+then the value will be recursively expanded to its complete resultant
+text before printing.
+The expanded value will also be printed if
+.Va .MAKE.EXPAND_VARIABLES
+is set to true and
+the
+.Fl dV
+option has not been used to override it.
+Note that loop-local and target-local variables, as well as values
+taken temporarily by global variables during makefile processing, are
+not accessible via this option.
+The
+.Fl dv
+debug mode can be used to see these at the cost of generating
+substantial extraneous output.
 .It Fl v Ar variable
 Like
 .Fl V
-but the variable is always expanded to its final value.
+but the variable is always expanded to its complete value.
 .It Fl W
 Treat any warnings during makefile parsing as errors.
 .It Fl w



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 13:37:16 UTC 2017

Modified Files:
src/bin/ksh: config.h sh.h trap.c

Log Message:
Remove code for AIX, including hack for 3.2.5 (from 1997) - from ksh(1)

OK by 


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/bin/ksh/config.h
cvs rdiff -u -r1.9 -r1.10 src/bin/ksh/sh.h
cvs rdiff -u -r1.8 -r1.9 src/bin/ksh/trap.c

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.11 src/bin/ksh/config.h:1.12
--- src/bin/ksh/config.h:1.11	Thu Jun 22 13:35:47 2017
+++ src/bin/ksh/config.h	Thu Jun 22 13:37:16 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.11 2017/06/22 13:35:47 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.12 2017/06/22 13:37:16 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -11,13 +11,6 @@
 #ifndef CONFIG_H
 #define CONFIG_H
 
-/* Define if on AIX 3.
-   System headers sometimes define this.
-   We just want to avoid a redefinition error message.  */
-#ifndef _ALL_SOURCE
-/* #undef _ALL_SOURCE */
-#endif
-
 /* Define if the closedir function returns void instead of int.  */
 /* #undef CLOSEDIR_VOID */
 

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.9 src/bin/ksh/sh.h:1.10
--- src/bin/ksh/sh.h:1.9	Thu Jun 22 13:33:39 2017
+++ src/bin/ksh/sh.h	Thu Jun 22 13:37:16 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.9 2017/06/22 13:33:39 kamil Exp $	*/
+/*	$NetBSD: sh.h,v 1.10 2017/06/22 13:37:16 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.9 2017/06/22 13:33:39 kamil Exp $ */
+/* $Id: sh.h,v 1.10 2017/06/22 13:37:16 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -545,10 +545,7 @@ typedef struct trap {
 EXTERN	int volatile trap;	/* traps pending? */
 EXTERN	int volatile intrsig;	/* pending trap interrupts executing command */
 EXTERN	int volatile fatal_trap;/* received a fatal signal */
-#ifndef FROM_TRAP_C
-/* Kludge to avoid bogus re-declaration of sigtraps[] error on AIX 3.2.5 */
 extern	Trap	sigtraps[SIGNALS+1];
-#endif /* !FROM_TRAP_C */
 
 #ifdef KSH
 /*

Index: src/bin/ksh/trap.c
diff -u src/bin/ksh/trap.c:1.8 src/bin/ksh/trap.c:1.9
--- src/bin/ksh/trap.c:1.8	Mon Oct 16 00:07:32 2006
+++ src/bin/ksh/trap.c	Thu Jun 22 13:37:16 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.8 2006/10/16 00:07:32 christos Exp $	*/
+/*	$NetBSD: trap.c,v 1.9 2017/06/22 13:37:16 kamil Exp $	*/
 
 /*
  * signal handling
@@ -6,12 +6,9 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: trap.c,v 1.8 2006/10/16 00:07:32 christos Exp $");
+__RCSID("$NetBSD: trap.c,v 1.9 2017/06/22 13:37:16 kamil Exp $");
 #endif
 
-
-/* Kludge to avoid bogus re-declaration of sigtraps[] error on AIX 3.2.5 */
-#define FROM_TRAP_C
 #include "sh.h"
 
 /* Table is indexed by signal number



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 13:35:47 UTC 2017

Modified Files:
src/bin/ksh: c_ksh.c c_ulimit.c config.h misc.c

Log Message:
Drop HP-UX support from ksh(1)

OK by 


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/bin/ksh/c_ksh.c
cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/c_ulimit.c
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/config.h
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/misc.c

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

Modified files:

Index: src/bin/ksh/c_ksh.c
diff -u src/bin/ksh/c_ksh.c:1.20 src/bin/ksh/c_ksh.c:1.21
--- src/bin/ksh/c_ksh.c:1.20	Thu Jun 22 13:33:39 2017
+++ src/bin/ksh/c_ksh.c	Thu Jun 22 13:35:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ksh.c,v 1.20 2017/06/22 13:33:39 kamil Exp $	*/
+/*	$NetBSD: c_ksh.c,v 1.21 2017/06/22 13:35:47 kamil Exp $	*/
 
 /*
  * built-in Korn commands: c_*
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.20 2017/06/22 13:33:39 kamil Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.21 2017/06/22 13:35:47 kamil Exp $");
 #endif
 
 #include "sh.h"
@@ -325,7 +325,7 @@ c_print(wp)
 
 switch ((c = *s++)) {
 /* Oddly enough, \007 seems more portable than
- * \a (due to HP-UX cc, Ultrix cc, old pcc's,
+ * \a (due to Ultrix cc, old pcc's,
  * etc.).
  */
 case 'a': c = '\007'; break;

Index: src/bin/ksh/c_ulimit.c
diff -u src/bin/ksh/c_ulimit.c:1.12 src/bin/ksh/c_ulimit.c:1.13
--- src/bin/ksh/c_ulimit.c:1.12	Sat May  9 13:26:06 2015
+++ src/bin/ksh/c_ulimit.c	Thu Jun 22 13:35:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ulimit.c,v 1.12 2015/05/09 13:26:06 christos Exp $	*/
+/*	$NetBSD: c_ulimit.c,v 1.13 2017/06/22 13:35:47 kamil Exp $	*/
 
 /*
 	ulimit -- handle "ulimit" builtin
@@ -20,7 +20,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_ulimit.c,v 1.12 2015/05/09 13:26:06 christos Exp $");
+__RCSID("$NetBSD: c_ulimit.c,v 1.13 2017/06/22 13:35:47 kamil Exp $");
 #endif
 
 
@@ -113,9 +113,6 @@ c_ulimit(wp)
 #  ifdef UL_GETBREAK /* osf/1 */
 		{ "vmemory(maxaddr)", ULIMIT, UL_GETBREAK, -1, 1, 'v' },
 #  else /* UL_GETBREAK */
-#   ifdef UL_GETMAXBRK /* hpux */
-		{ "vmemory(maxaddr)", ULIMIT, UL_GETMAXBRK, -1, 1, 'v' },
-#   endif /* UL_GETMAXBRK */
 #  endif /* UL_GETBREAK */
 # endif /* UL_GMEMLIM */
 #endif /* RLIMIT_VMEM */

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.10 src/bin/ksh/config.h:1.11
--- src/bin/ksh/config.h:1.10	Thu Jun 22 13:34:48 2017
+++ src/bin/ksh/config.h	Thu Jun 22 13:35:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.10 2017/06/22 13:34:48 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.11 2017/06/22 13:35:47 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -194,10 +194,6 @@
 #define DEFAULT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
 #endif
 
-/* Define if your C library's getwd/getcwd function dumps core in unreadable
- * directories.  */
-/* #undef HPUX_GETWD_BUG */
-
 /* Include ksh features? */
 #define KSH 1
 

Index: src/bin/ksh/misc.c
diff -u src/bin/ksh/misc.c:1.18 src/bin/ksh/misc.c:1.19
--- src/bin/ksh/misc.c:1.18	Thu Jun 22 13:33:39 2017
+++ src/bin/ksh/misc.c	Thu Jun 22 13:35:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: misc.c,v 1.18 2017/06/22 13:33:39 kamil Exp $	*/
+/*	$NetBSD: misc.c,v 1.19 2017/06/22 13:35:47 kamil Exp $	*/
 
 /*
  * Miscellaneous functions
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: misc.c,v 1.18 2017/06/22 13:33:39 kamil Exp $");
+__RCSID("$NetBSD: misc.c,v 1.19 2017/06/22 13:35:47 kamil Exp $");
 #endif
 
 
@@ -1284,25 +1284,6 @@ reset_nonblock(fd)
 # define MAXPATHLEN PATH
 #endif /* MAXPATHLEN */
 
-#ifdef HPUX_GETWD_BUG
-# include "ksh_dir.h"
-
-/*
- * Work around bug in hpux 10.x C library - getwd/getcwd dump core
- * if current directory is not readable.  Done in macro 'cause code
- * is needed in GETWD and GETCWD cases.
- */
-# define HPUX_GETWD_BUG_CODE \
-	{ \
-	DIR *d = ksh_opendir("."); \
-	if (!d) \
-		return (char *) 0; \
-	closedir(d); \
-	}
-#else /* HPUX_GETWD_BUG */
-# define HPUX_GETWD_BUG_CODE
-#endif /* HPUX_GETWD_BUG */
-
 /* Like getcwd(), except bsize is ignored if buf is 0 (MAXPATHLEN is used) */
 char *
 ksh_get_wd(buf, bsize)
@@ -1313,9 +1294,6 @@ ksh_get_wd(buf, bsize)
 	char *b;
 	char *ret;
 
-	/* Before memory allocated */
-	HPUX_GETWD_BUG_CODE
-
 	/* Assume getcwd() available */
 	if (!buf) {
 		bsize = MAXPATHLEN;
@@ -1338,9 +1316,6 @@ ksh_get_wd(buf, bsize)
 	char *b;
 	int len;
 
-	/* Before memory allocated */
-	HPUX_GETWD_BUG_CODE
-
 	if (buf && bsize > MAXPATHLEN)
 		b = buf;
 	else



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 13:34:48 UTC 2017

Modified Files:
src/bin/ksh: config.h edit.c

Log Message:
Remove sco unix 3.2v4.1 support (from 1992) from ksh(1)

OK by 


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/bin/ksh/config.h
cvs rdiff -u -r1.27 -r1.28 src/bin/ksh/edit.c

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

Modified files:

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.9 src/bin/ksh/config.h:1.10
--- src/bin/ksh/config.h:1.9	Thu Jun 22 13:33:39 2017
+++ src/bin/ksh/config.h	Thu Jun 22 13:34:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.9 2017/06/22 13:33:39 kamil Exp $	*/
+/*	$NetBSD: config.h,v 1.10 2017/06/22 13:34:48 kamil Exp $	*/
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -178,9 +178,6 @@
 /* Define if the pgrp of setpgrp() can't be the pid of a zombie process */
 /* #undef NEED_PGRP_SYNC */
 
-/* Define if you arg running SCO unix */
-/* #undef OS_SCO */
-
 /* Define if you arg running ISC unix */
 /* #undef OS_ISC */
 

Index: src/bin/ksh/edit.c
diff -u src/bin/ksh/edit.c:1.27 src/bin/ksh/edit.c:1.28
--- src/bin/ksh/edit.c:1.27	Thu Jun 22 13:33:39 2017
+++ src/bin/ksh/edit.c	Thu Jun 22 13:34:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: edit.c,v 1.27 2017/06/22 13:33:39 kamil Exp $	*/
+/*	$NetBSD: edit.c,v 1.28 2017/06/22 13:34:48 kamil Exp $	*/
 
 /*
  * Command line editing - common code
@@ -7,7 +7,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: edit.c,v 1.27 2017/06/22 13:33:39 kamil Exp $");
+__RCSID("$NetBSD: edit.c,v 1.28 2017/06/22 13:34:48 kamil Exp $");
 #endif
 
 
@@ -19,10 +19,6 @@ __RCSID("$NetBSD: edit.c,v 1.27 2017/06/
 #define EXTERN
 #include "edit.h"
 #undef EXTERN
-#ifdef OS_SCO	/* SCO Unix 3.2v4.1 */
-# include 	/* needed for  */
-# include 		/* needed for struct winsize */
-#endif /* OS_SCO */
 #include 
 #include 
 #include "ksh_stat.h"



CVS commit: src/usr.bin/make

2017-06-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun 22 13:34:13 UTC 2017

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

Log Message:
Whitespace fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/usr.bin/make/make.1

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.268 src/usr.bin/make/make.1:1.269
--- src/usr.bin/make/make.1:1.268	Thu Jun 22 13:21:21 2017
+++ src/usr.bin/make/make.1	Thu Jun 22 13:34:13 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.268 2017/06/22 13:21:21 dholland Exp $
+.\"	$NetBSD: make.1,v 1.269 2017/06/22 13:34:13 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -209,7 +209,7 @@ Force the
 .Fl V
 option to print raw values of variables, overriding the default behavior
 set via
-.Va .MAKE.EXPAND_VARIABLES.
+.Va .MAKE.EXPAND_VARIABLES .
 .It Ar v
 Print debugging information about variable assignment.
 .It Ar x
@@ -352,7 +352,7 @@ contains a
 .Ql \&$
 then the value will be expanded before printing.
 .It Fl v Ar variable
-Like 
+Like
 .Fl V
 but the variable is always expanded to its final value.
 .It Fl W



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 13:33:39 UTC 2017

Modified Files:
src/bin/ksh: c_ksh.c c_sh.c config.h edit.c emacs.c eval.c exec.c
history.c io.c jobs.c lex.c main.c misc.c path.c sh.h shf.c tree.h
vi.c

Log Message:
Remove os2 support in ksh(1)

OK by 


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/ksh/c_ksh.c
cvs rdiff -u -r1.16 -r1.17 src/bin/ksh/c_sh.c src/bin/ksh/eval.c
cvs rdiff -u -r1.8 -r1.9 src/bin/ksh/config.h src/bin/ksh/sh.h
cvs rdiff -u -r1.26 -r1.27 src/bin/ksh/edit.c
cvs rdiff -u -r1.32 -r1.33 src/bin/ksh/emacs.c
cvs rdiff -u -r1.15 -r1.16 src/bin/ksh/exec.c src/bin/ksh/lex.c \
src/bin/ksh/main.c
cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/history.c
cvs rdiff -u -r1.9 -r1.10 src/bin/ksh/io.c src/bin/ksh/path.c
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/jobs.c
cvs rdiff -u -r1.17 -r1.18 src/bin/ksh/misc.c
cvs rdiff -u -r1.7 -r1.8 src/bin/ksh/shf.c
cvs rdiff -u -r1.4 -r1.5 src/bin/ksh/tree.h
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/vi.c

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

Modified files:

Index: src/bin/ksh/c_ksh.c
diff -u src/bin/ksh/c_ksh.c:1.19 src/bin/ksh/c_ksh.c:1.20
--- src/bin/ksh/c_ksh.c:1.19	Thu Jun 22 13:32:04 2017
+++ src/bin/ksh/c_ksh.c	Thu Jun 22 13:33:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ksh.c,v 1.19 2017/06/22 13:32:04 kamil Exp $	*/
+/*	$NetBSD: c_ksh.c,v 1.20 2017/06/22 13:33:39 kamil Exp $	*/
 
 /*
  * built-in Korn commands: c_*
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.19 2017/06/22 13:32:04 kamil Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.20 2017/06/22 13:33:39 kamil Exp $");
 #endif
 
 #include "sh.h"
@@ -141,15 +141,7 @@ c_cd(wp)
 		setstr(oldpwd_s, current_wd, KSH_RETURN_ERROR);
 
 	if (!ISABSPATH(Xstring(xs, xp))) {
-#ifdef OS2
-		/* simplify_path() doesn't know about os/2's drive contexts,
-		 * so it can't set current_wd when changing to a:foo.
-		 * Handle this by calling getcwd()...
-		 */
-		pwd = ksh_get_wd((char *) 0, 0);
-#else /* OS2 */
 		pwd = (char *) 0;
-#endif /* OS2 */
 	} else
 #ifdef S_ISLNK
 	if (!physical || !(pwd = get_phys_path(Xstring(xs, xp
@@ -232,7 +224,6 @@ c_print(wp)
 #define PO_PMINUSMINUS	BIT(2)	/* print a -- argument */
 #define PO_HIST		BIT(3)	/* print to history instead of stdout */
 #define PO_COPROC	BIT(4)	/* printing to coprocess: block SIGPIPE */
-#define PO_FSLASH	BIT(5)  /* swap slash for backslash (for os2 ) */
 	int fd = 1;
 	int flags = PO_EXPAND|PO_NL;
 	char *s;
@@ -273,11 +264,7 @@ c_print(wp)
 		}
 	} else {
 		int optc;
-#if OS2
-		const char *options = "Rnpfrsu,"; /* added f flag */
-#else
 		const char *options = "Rnprsu,";
-#endif
 		while ((optc = ksh_getopt(wp, _opt, options)) != EOF)
 			switch (optc) {
 			  case 'R': /* fake BSD echo command */
@@ -288,11 +275,6 @@ c_print(wp)
 			  case 'e':
 flags |= PO_EXPAND;
 break;
-#ifdef OS2
-			  case 'f':
-flags |= PO_FSLASH;
-break;
-#endif
 			  case 'n':
 flags &= ~PO_NL;
 break;
@@ -338,13 +320,6 @@ c_print(wp)
 		s = *wp;
 		while ((c = *s++) != '\0') {
 			Xcheck(xs, xp);
-#ifdef OS2
-			if ((flags & PO_FSLASH) && c == '\\')
-if (*s == '\\')
-	*s++;
-else
-	c = '/';
-#endif /* OS2 */
 			if ((flags & PO_EXPAND) && c == '\\') {
 int i;
 

Index: src/bin/ksh/c_sh.c
diff -u src/bin/ksh/c_sh.c:1.16 src/bin/ksh/c_sh.c:1.17
--- src/bin/ksh/c_sh.c:1.16	Tue Oct 11 06:31:07 2016
+++ src/bin/ksh/c_sh.c	Thu Jun 22 13:33:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_sh.c,v 1.16 2016/10/11 06:31:07 dholland Exp $	*/
+/*	$NetBSD: c_sh.c,v 1.17 2017/06/22 13:33:39 kamil Exp $	*/
 
 /*
  * built-in Bourne commands
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_sh.c,v 1.16 2016/10/11 06:31:07 dholland Exp $");
+__RCSID("$NetBSD: c_sh.c,v 1.17 2017/06/22 13:33:39 kamil Exp $");
 #endif
 
 
@@ -331,9 +331,6 @@ c_read(wp)
 			while (1) {
 c = shf_getc(shf);
 if (c == '\0'
-#ifdef OS2
-|| c == '\r'
-#endif /* OS2 */
 )
 	continue;
 if (c == EOF && shf_error(shf)
@@ -905,13 +902,5 @@ const struct builtin shbuiltins [] = {
 	{"ulimit", c_ulimit},
 	{"+umask", c_umask},
 	{"*=unset", c_unset},
-#ifdef OS2
-	/* In OS2, the first line of a file can be "extproc name", which
-	 * tells the command interpreter (cmd.exe) to use name to execute
-	 * the file.  For this to be useful, ksh must ignore commands
-	 * starting with extproc and this does the trick...
-	 */
-	{"extproc", c_label},
-#endif /* OS2 */
 	{NULL, NULL}
 };
Index: src/bin/ksh/eval.c
diff -u src/bin/ksh/eval.c:1.16 src/bin/ksh/eval.c:1.17
--- src/bin/ksh/eval.c:1.16	Tue Oct  4 15:09:03 2016
+++ src/bin/ksh/eval.c	Thu Jun 22 13:33:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.16 2016/10/04 15:09:03 joerg Exp $	*/
+/*	$NetBSD: eval.c,v 1.17 2017/06/22 13:33:39 kamil Exp $	*/
 
 /*
  * Expansion - quoting, separation, substitution, globbing
@@ 

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

2017-06-22 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Jun 22 13:32:47 UTC 2017

Modified Files:
src/sys/arch/x86/x86: ipmi.c

Log Message:
Use a proper format string.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/x86/x86/ipmi.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/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.65 src/sys/arch/x86/x86/ipmi.c:1.66
--- src/sys/arch/x86/x86/ipmi.c:1.65	Wed Jun 21 21:55:07 2017
+++ src/sys/arch/x86/x86/ipmi.c	Thu Jun 22 13:32:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.65 2017/06/21 21:55:07 christos Exp $ */
+/*	$NetBSD: ipmi.c,v 1.66 2017/06/22 13:32:47 joerg Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.65 2017/06/21 21:55:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.66 2017/06/22 13:32:47 joerg Exp $");
 
 #include 
 #include 
@@ -2165,7 +2165,7 @@ ipmi_attach(device_t parent, device_t se
 	cv_init(>sc_poll_cv, "ipmipoll");
 
 	if (kthread_create(PRI_NONE, 0, NULL, ipmi_thread, self,
-	>sc_kthread, device_xname(self)) != 0) {
+	>sc_kthread, "%s", device_xname(self)) != 0) {
 		aprint_error_dev(self, "unable to create thread, disabled\n");
 	}
 }



CVS commit: src/bin/ksh

2017-06-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 22 13:32:04 UTC 2017

Modified Files:
src/bin/ksh: c_ksh.c edit.c path.c sh.h

Log Message:
Remove ancient cygwin support in ksh(1)

OK by 


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/c_ksh.c
cvs rdiff -u -r1.25 -r1.26 src/bin/ksh/edit.c
cvs rdiff -u -r1.8 -r1.9 src/bin/ksh/path.c
cvs rdiff -u -r1.7 -r1.8 src/bin/ksh/sh.h

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

Modified files:

Index: src/bin/ksh/c_ksh.c
diff -u src/bin/ksh/c_ksh.c:1.18 src/bin/ksh/c_ksh.c:1.19
--- src/bin/ksh/c_ksh.c:1.18	Sun Oct 16 17:12:11 2011
+++ src/bin/ksh/c_ksh.c	Thu Jun 22 13:32:04 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ksh.c,v 1.18 2011/10/16 17:12:11 joerg Exp $	*/
+/*	$NetBSD: c_ksh.c,v 1.19 2017/06/22 13:32:04 kamil Exp $	*/
 
 /*
  * built-in Korn commands: c_*
@@ -6,17 +6,13 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.18 2011/10/16 17:12:11 joerg Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.19 2017/06/22 13:32:04 kamil Exp $");
 #endif
 
 #include "sh.h"
 #include "ksh_stat.h"
 #include 
 
-#ifdef __CYGWIN__
-#include 
-#endif /* __CYGWIN__ */
-
 int
 c_cd(wp)
 	char	**wp;
@@ -162,12 +158,7 @@ c_cd(wp)
 
 	/* Set PWD */
 	if (pwd) {
-#ifdef __CYGWIN__
-		char ptmp[PATH];  /* larger than MAX_PATH */
-		cygwin_conv_to_full_posix_path(pwd, ptmp);
-#else /* __CYGWIN__ */
 		char *ptmp = pwd;
-#endif /* __CYGWIN__ */
 		set_current_wd(ptmp);
 		/* Ignore failure (happens if readonly or integer) */
 		setstr(pwd_s, ptmp, KSH_RETURN_ERROR);

Index: src/bin/ksh/edit.c
diff -u src/bin/ksh/edit.c:1.25 src/bin/ksh/edit.c:1.26
--- src/bin/ksh/edit.c:1.25	Sat Jun  5 03:02:37 2010
+++ src/bin/ksh/edit.c	Thu Jun 22 13:32:04 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: edit.c,v 1.25 2010/06/05 03:02:37 sjg Exp $	*/
+/*	$NetBSD: edit.c,v 1.26 2017/06/22 13:32:04 kamil Exp $	*/
 
 /*
  * Command line editing - common code
@@ -7,7 +7,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: edit.c,v 1.25 2010/06/05 03:02:37 sjg Exp $");
+__RCSID("$NetBSD: edit.c,v 1.26 2017/06/22 13:32:04 kamil Exp $");
 #endif
 
 
@@ -293,11 +293,6 @@ x_mode(onoff)
 
 		set_tty(tty_fd, , TF_WAIT);
 
-#ifdef __CYGWIN__
-		if (edchars.eof == '\0')
-			edchars.eof = '\4';
-#endif /* __CYGWIN__ */
-
 		/* Convert unset values to internal `unset' value */
 		if (edchars.erase == vdisable_c)
 			edchars.erase = -1;

Index: src/bin/ksh/path.c
diff -u src/bin/ksh/path.c:1.8 src/bin/ksh/path.c:1.9
--- src/bin/ksh/path.c:1.8	Sat Apr 25 05:11:37 2009
+++ src/bin/ksh/path.c	Thu Jun 22 13:32:04 2017
@@ -1,8 +1,8 @@
-/*	$NetBSD: path.c,v 1.8 2009/04/25 05:11:37 lukem Exp $	*/
+/*	$NetBSD: path.c,v 1.9 2017/06/22 13:32:04 kamil Exp $	*/
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: path.c,v 1.8 2009/04/25 05:11:37 lukem Exp $");
+__RCSID("$NetBSD: path.c,v 1.9 2017/06/22 13:32:04 kamil Exp $");
 #endif
 
 
@@ -130,10 +130,10 @@ simplify_path(pathx)
 
 	if ((isrooted = ISROOTEDPATH(pathx)))
 		very_start++;
-#if defined (OS2) || defined (__CYGWIN__)
+#if defined (OS2)
 	if (pathx[0] && pathx[1] == ':')	/* skip a: */
 		very_start += 2;
-#endif /* OS2 || __CYGWIN__ */
+#endif /* OS2 */
 
 	/* Before			After
 	 *  /foo/			/foo
@@ -143,19 +143,13 @@ simplify_path(pathx)
 	 *  ....
 	 *  ./foo			foo
 	 *  foo/../../../bar		../../bar
-	 * OS2 and CYGWIN:
+	 * OS2:
 	 *  a:/foo/../..		a:/
 	 *  a:.a:
 	 *  a:..			a:..
 	 *  a:foo/../../blah		a:../blah
 	 */
 
-#ifdef __CYGWIN__
-   /* preserve leading double-slash on pathnames (for UNC paths) */
-   if (pathx[0] && ISDIRSEP(pathx[0]) && pathx[1] && ISDIRSEP(pathx[1]))
-   very_start++;
-#endif /* __CYGWIN__ */
-
 	for (cur = t = start = very_start; ; ) {
 		/* treat multiple '/'s as one '/' */
 		while (ISDIRSEP(*t))

Index: src/bin/ksh/sh.h
diff -u src/bin/ksh/sh.h:1.7 src/bin/ksh/sh.h:1.8
--- src/bin/ksh/sh.h:1.7	Sun Jun 26 19:09:00 2005
+++ src/bin/ksh/sh.h	Thu Jun 22 13:32:04 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: sh.h,v 1.7 2005/06/26 19:09:00 christos Exp $	*/
+/*	$NetBSD: sh.h,v 1.8 2017/06/22 13:32:04 kamil Exp $	*/
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.7 2005/06/26 19:09:00 christos Exp $ */
+/* $Id: sh.h,v 1.8 2017/06/22 13:32:04 kamil Exp $ */
 
 #include "config.h"	/* system and option configuration info */
 
@@ -323,14 +323,8 @@ extern char *ksh_strrchr_dirsep(const ch
 # define DIRSEP '/'
 # define DIRSEPSTR  "/"
 # define ISDIRSEP(c)((c) == '/')
-#ifdef __CYGWIN__
-#  define ISABSPATH(s) \
-   (((s)[0] && (s)[1] == ':' && ISDIRSEP((s)[2])) || ISDIRSEP((s)[0]))
-#  define ISRELPATH(s) (!(s)[0] || ((s)[1] != ':' && !ISDIRSEP((s)[0])))
-#else /* __CYGWIN__ */
 # define ISABSPATH(s)	ISDIRSEP((s)[0])
 # define ISRELPATH(s)	(!ISABSPATH(s))
-#endif /* __CYGWIN__ */
 # define ISROOTEDPATH(s) ISABSPATH(s)
 # define FILECHCONV(c)	c
 # define FILECMP(s1, s2) strcmp(s1, s2)



CVS commit: src/usr.bin/make

2017-06-22 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Jun 22 13:21:21 UTC 2017

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

Log Message:
Document what the magic variable .MAKE.EXPAND_VARIABLES actually does.


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/usr.bin/make/make.1

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.267 src/usr.bin/make/make.1:1.268
--- src/usr.bin/make/make.1:1.267	Mon Jun 19 19:58:24 2017
+++ src/usr.bin/make/make.1	Thu Jun 22 13:21:21 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.267 2017/06/19 19:58:24 christos Exp $
+.\"	$NetBSD: make.1,v 1.268 2017/06/22 13:21:21 dholland Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd June 19, 2017
+.Dd June 22, 2017
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -207,7 +207,9 @@ Print debugging information about target
 .It Ar V
 Force the
 .Fl V
-option to print raw values of variables.
+option to print raw values of variables, overriding the default behavior
+set via
+.Va .MAKE.EXPAND_VARIABLES.
 .It Ar v
 Print debugging information about variable assignment.
 .It Ar x
@@ -781,6 +783,10 @@ from which generated dependencies are re
 A boolean that controls the default behavior of the
 .Fl V
 option.
+If true, variable values printed with
+.Fl V
+are fully expanded; if false, the raw variable contents (which may
+include additional unexpanded variable references) are shown.
 .It Va .MAKE.EXPORTED
 The list of variables exported by
 .Nm .



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

2017-06-22 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun 22 13:13:51 UTC 2017

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_emmc.c

Log Message:
Disable SDR50 support, it is not reliable on these boards.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/broadcom/bcm2835_emmc.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm2835_emmc.c
diff -u src/sys/arch/arm/broadcom/bcm2835_emmc.c:1.29 src/sys/arch/arm/broadcom/bcm2835_emmc.c:1.30
--- src/sys/arch/arm/broadcom/bcm2835_emmc.c:1.29	Tue Feb  2 13:55:50 2016
+++ src/sys/arch/arm/broadcom/bcm2835_emmc.c	Thu Jun 22 13:13:51 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_emmc.c,v 1.29 2016/02/02 13:55:50 skrll Exp $	*/
+/*	$NetBSD: bcm2835_emmc.c,v 1.30 2017/06/22 13:13:51 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_emmc.c,v 1.29 2016/02/02 13:55:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_emmc.c,v 1.30 2017/06/22 13:13:51 jmcneill Exp $");
 
 #include "bcmdmac.h"
 
@@ -117,7 +117,6 @@ bcmemmc_attach(device_t parent, device_t
 	sc->sc.sc_flags |= SDHC_FLAG_NO_HS_BIT;
 	sc->sc.sc_caps = SDHC_VOLTAGE_SUPP_3_3V | SDHC_HIGH_SPEED_SUPP |
 	(SDHC_MAX_BLK_LEN_1024 << SDHC_MAX_BLK_LEN_SHIFT);
-	sc->sc.sc_caps2 = SDHC_SDR50_SUPP;
 
 	sc->sc.sc_host = sc->sc_hosts;
 	sc->sc.sc_clkbase = 5;	/* Default to 50MHz */



CVS commit: src/lib/libm/src

2017-06-22 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Jun 22 12:43:43 UTC 2017

Modified Files:
src/lib/libm/src: k_rem_pio2.c k_rem_pio2f.c

Log Message:
Correct misleading indentation. NFC

>From GCC8


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libm/src/k_rem_pio2.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libm/src/k_rem_pio2f.c

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

Modified files:

Index: src/lib/libm/src/k_rem_pio2.c
diff -u src/lib/libm/src/k_rem_pio2.c:1.12 src/lib/libm/src/k_rem_pio2.c:1.13
--- src/lib/libm/src/k_rem_pio2.c:1.12	Fri Apr 23 19:17:07 2010
+++ src/lib/libm/src/k_rem_pio2.c	Thu Jun 22 12:43:43 2017
@@ -12,7 +12,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_rem_pio2.c,v 1.12 2010/04/23 19:17:07 drochner Exp $");
+__RCSID("$NetBSD: k_rem_pio2.c,v 1.13 2017/06/22 12:43:43 maya Exp $");
 #endif
 
 /*
@@ -175,7 +175,9 @@ __kernel_rem_pio2(double *x, double *y, 
 
 /* compute q[0],q[1],...q[jk] */
 	for (i=0;i<=jk;i++) {
-	for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+	for(j=0,fw=0.0;j<=jx;j++)
+		fw += x[j]*f[jx+i-j];
+	q[i] = fw;
 	}
 
 	jz = jk;

Index: src/lib/libm/src/k_rem_pio2f.c
diff -u src/lib/libm/src/k_rem_pio2f.c:1.8 src/lib/libm/src/k_rem_pio2f.c:1.9
--- src/lib/libm/src/k_rem_pio2f.c:1.8	Fri Apr 23 19:17:07 2010
+++ src/lib/libm/src/k_rem_pio2f.c	Thu Jun 22 12:43:43 2017
@@ -15,7 +15,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_rem_pio2f.c,v 1.8 2010/04/23 19:17:07 drochner Exp $");
+__RCSID("$NetBSD: k_rem_pio2f.c,v 1.9 2017/06/22 12:43:43 maya Exp $");
 #endif
 
 #include "namespace.h"
@@ -68,7 +68,9 @@ __kernel_rem_pio2f(float *x, float *y, i
 
 /* compute q[0],q[1],...q[jk] */
 	for (i=0;i<=jk;i++) {
-	for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+	for(j=0,fw=0.0;j<=jx;j++)
+		fw += x[j]*f[jx+i-j];
+	q[i] = fw;
 	}
 
 	jz = jk;



CVS commit: src/tests/net

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 10:06:34 UTC 2017

Modified Files:
src/tests/net/arp: t_arp.sh
src/tests/net/ndp: t_ndp.sh

Log Message:
Test implicit removals of ARP/NDP entries

One test case reproudces PR 51179.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.23 -r1.24 src/tests/net/ndp/t_ndp.sh

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

Modified files:

Index: src/tests/net/arp/t_arp.sh
diff -u src/tests/net/arp/t_arp.sh:1.26 src/tests/net/arp/t_arp.sh:1.27
--- src/tests/net/arp/t_arp.sh:1.26	Wed Jun 21 09:05:31 2017
+++ src/tests/net/arp/t_arp.sh	Thu Jun 22 10:06:33 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_arp.sh,v 1.26 2017/06/21 09:05:31 ozaki-r Exp $
+#	$NetBSD: t_arp.sh,v 1.27 2017/06/22 10:06:33 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -28,6 +28,8 @@
 SOCKSRC=unix://commsock1
 SOCKDST=unix://commsock2
 IP4SRC=10.0.1.1
+IP4SRC2=10.0.1.5
+IP4NET=10.0.1.0
 IP4DST=10.0.1.2
 IP4DST_PROXYARP1=10.0.1.3
 IP4DST_PROXYARP2=10.0.1.4
@@ -666,6 +668,124 @@ arp_rtm_cleanup()
 	cleanup
 }
 
+atf_test_case arp_purge_on_route_change cleanup
+arp_purge_on_route_change_head()
+{
+
+	atf_set "descr" "Tests if ARP entries are removed on route change"
+	atf_set "require.progs" "rump_server"
+}
+
+arp_purge_on_route_change_body()
+{
+
+	rump_server_start $SOCKSRC
+	rump_server_start $SOCKDST
+
+	setup_dst_server
+	setup_src_server
+
+	rump_server_add_iface $SOCKSRC shmif1 bus1
+	export RUMP_SERVER=$SOCKSRC
+	atf_check -s exit:0 rump.ifconfig shmif1 inet $IP4SRC2/24
+	atf_check -s exit:0 rump.ifconfig -w 10
+
+	$DEBUG && rump.netstat -nr -f inet
+	atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP4DST
+	$DEBUG && rump.arp -na
+	atf_check -s exit:0 -o ignore \
+	rump.route change -net $IP4NET -ifp shmif1
+	$DEBUG && rump.netstat -nr -f inet
+	$DEBUG && rump.arp -na
+	# The entry was already removed on route change
+	atf_check -s not-exit:0 -e match:'no entry' rump.arp -n $IP4DST
+
+	rump_server_destroy_ifaces
+}
+
+arp_purge_on_route_change_cleanup()
+{
+
+	$DEBUG && dump
+	cleanup
+}
+
+atf_test_case arp_purge_on_route_delete cleanup
+arp_purge_on_route_delete_head()
+{
+
+	atf_set "descr" "Tests if ARP entries are removed on route delete"
+	atf_set "require.progs" "rump_server"
+}
+
+arp_purge_on_route_delete_body()
+{
+
+	rump_server_start $SOCKSRC
+	rump_server_start $SOCKDST
+
+	setup_dst_server
+	setup_src_server
+
+	$DEBUG && rump.netstat -nr -f inet
+	atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP4DST
+	$DEBUG && rump.arp -na
+
+	atf_check -s exit:0 -o ignore rump.route delete -net $IP4NET
+	$DEBUG && rump.netstat -nr -f inet
+	$DEBUG && rump.arp -na
+
+	# The entry was already removed on route delete
+	atf_check -s not-exit:0 -e match:'no entry' rump.arp -n $IP4DST
+
+	rump_server_destroy_ifaces
+}
+
+arp_purge_on_route_delete_cleanup()
+{
+
+	$DEBUG && dump
+	cleanup
+}
+
+atf_test_case arp_purge_on_ifdown cleanup
+arp_purge_on_ifdown_head()
+{
+
+	atf_set "descr" "Tests if ARP entries are removed on interface down"
+	atf_set "require.progs" "rump_server"
+}
+
+arp_purge_on_ifdown_body()
+{
+
+	rump_server_start $SOCKSRC
+	rump_server_start $SOCKDST
+
+	setup_dst_server
+	setup_src_server
+
+	$DEBUG && rump.netstat -nr -f inet
+	atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP4DST
+	atf_check -s exit:0 -o match:'shmif0' rump.arp -n $IP4DST
+
+	# Shutdown the interface
+	atf_check -s exit:0 rump.ifconfig shmif0 down
+	$DEBUG && rump.netstat -nr -f inet
+	$DEBUG && rump.arp -na
+
+	atf_check -s not-exit:0 -e match:'no entry' rump.arp -n $IP4DST
+
+	rump_server_destroy_ifaces
+}
+
+arp_purge_on_ifdown_cleanup()
+{
+
+	$DEBUG && dump
+	cleanup
+}
+
 atf_init_test_cases()
 {
 	atf_add_test_case arp_cache_expiration_5s
@@ -678,4 +798,7 @@ atf_init_test_cases()
 	atf_add_test_case arp_link_activation
 	atf_add_test_case arp_static
 	atf_add_test_case arp_rtm
+	atf_add_test_case arp_purge_on_route_change
+	atf_add_test_case arp_purge_on_route_delete
+	atf_add_test_case arp_purge_on_ifdown
 }

Index: src/tests/net/ndp/t_ndp.sh
diff -u src/tests/net/ndp/t_ndp.sh:1.23 src/tests/net/ndp/t_ndp.sh:1.24
--- src/tests/net/ndp/t_ndp.sh:1.23	Thu Jun 22 09:05:02 2017
+++ src/tests/net/ndp/t_ndp.sh	Thu Jun 22 10:06:34 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ndp.sh,v 1.23 2017/06/22 09:05:02 ozaki-r Exp $
+#	$NetBSD: t_ndp.sh,v 1.24 2017/06/22 10:06:34 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -28,7 +28,9 @@
 SOCKSRC=unix://commsock1
 SOCKDST=unix://commsock2
 IP6SRC=fc00::1
+IP6SRC2=fc00::3
 IP6DST=fc00::2
+IP6NET=fc00::0
 
 DEBUG=${DEBUG:-false}
 TIMEOUT=1
@@ -465,6 +467,129 @@ ndp_rtm_cleanup()
 	cleanup
 }
 
+atf_test_case ndp_purge_on_route_change cleanup
+ndp_purge_on_route_change_head()
+{
+
+	atf_set "descr" "Tests if NDP 

CVS commit: src/sys/net

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 09:58:04 UTC 2017

Modified Files:
src/sys/net: rtsock.c

Log Message:
Purge L2 caches on changing an interface of a route

The change addresses situations similar to PR 51179.


To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/sys/net/rtsock.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/rtsock.c
diff -u src/sys/net/rtsock.c:1.216 src/sys/net/rtsock.c:1.217
--- src/sys/net/rtsock.c:1.216	Fri Jun 16 02:26:17 2017
+++ src/sys/net/rtsock.c	Thu Jun 22 09:58:04 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.216 2017/06/16 02:26:17 ozaki-r Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.217 2017/06/22 09:58:04 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.216 2017/06/16 02:26:17 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.217 2017/06/22 09:58:04 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -641,7 +641,7 @@ route_output_change(struct rtentry *rt, 
 	struct ifnet *ifp = NULL, *new_ifp;
 	struct ifaddr *ifa = NULL, *new_ifa;
 	struct psref psref_ifa, psref_new_ifa, psref_ifp;
-	bool newgw;
+	bool newgw, ifp_changed = false;
 
 	/*
 	 * New gateway could require new ifaddr, ifp;
@@ -691,13 +691,16 @@ route_output_change(struct rtentry *rt, 
 oifa->ifa_rtrequest(RTM_DELETE, rt, info);
 			rt_replace_ifa(rt, ifa);
 			rt->rt_ifp = new_ifp;
+			ifp_changed = true;
 		}
 		if (new_ifa == NULL)
 			ifa_release(ifa, _ifa);
 	}
 	ifa_release(new_ifa, _new_ifa);
-	if (new_ifp && rt->rt_ifp != new_ifp && !if_is_deactivated(new_ifp))
+	if (new_ifp && rt->rt_ifp != new_ifp && !if_is_deactivated(new_ifp)) {
 		rt->rt_ifp = new_ifp;
+		ifp_changed = true;
+	}
 	rt_setmetrics(rtm->rtm_inits, rtm, rt);
 	if (rt->rt_flags != info->rti_flags) {
 		rt->rt_flags = (info->rti_flags & ~PRESERVED_RTF) |
@@ -705,6 +708,11 @@ route_output_change(struct rtentry *rt, 
 	}
 	if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest)
 		rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, info);
+#if defined(INET) || defined(INET6)
+	if (ifp_changed && rt_mask(rt) != NULL)
+		lltable_prefix_free(rt_getkey(rt)->sa_family, rt_getkey(rt),
+		rt_mask(rt), 0);
+#endif
 out:
 	if_put(ifp, _ifp);
 



CVS commit: src

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 09:56:48 UTC 2017

Modified Files:
src/sys/net: if_llatbl.c if_llatbl.h route.c
src/tests/net/ndp: t_ra.sh

Log Message:
Purge all related L2 caches on removing a route

The change addresses situations similar to PR 51179.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.10 -r1.11 src/sys/net/if_llatbl.h
cvs rdiff -u -r1.195 -r1.196 src/sys/net/route.c
cvs rdiff -u -r1.28 -r1.29 src/tests/net/ndp/t_ra.sh

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

Modified files:

Index: src/sys/net/if_llatbl.c
diff -u src/sys/net/if_llatbl.c:1.18 src/sys/net/if_llatbl.c:1.19
--- src/sys/net/if_llatbl.c:1.18	Fri Mar  3 06:27:20 2017
+++ src/sys/net/if_llatbl.c	Thu Jun 22 09:56:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.c,v 1.18 2017/03/03 06:27:20 msaitoh Exp $	*/
+/*	$NetBSD: if_llatbl.c,v 1.19 2017/06/22 09:56:48 ozaki-r Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -486,8 +486,8 @@ lltable_drain(int af)
 }
 
 void
-lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask,
-u_int flags)
+lltable_prefix_free(const int af, const struct sockaddr *prefix,
+const struct sockaddr *mask, const u_int flags)
 {
 	struct lltable *llt;
 

Index: src/sys/net/if_llatbl.h
diff -u src/sys/net/if_llatbl.h:1.10 src/sys/net/if_llatbl.h:1.11
--- src/sys/net/if_llatbl.h:1.10	Wed Dec 21 08:47:02 2016
+++ src/sys/net/if_llatbl.h	Thu Jun 22 09:56:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.h,v 1.10 2016/12/21 08:47:02 ozaki-r Exp $	*/
+/*	$NetBSD: if_llatbl.h,v 1.11 2017/06/22 09:56:48 ozaki-r Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -254,8 +254,8 @@ void lltableinit(void);
 struct lltable *lltable_allocate_htbl(uint32_t hsize);
 void		lltable_free(struct lltable *);
 void		lltable_link(struct lltable *llt);
-void		lltable_prefix_free(int, struct sockaddr *,
-		struct sockaddr *, u_int);
+void		lltable_prefix_free(const int, const struct sockaddr *,
+		const struct sockaddr *, const u_int);
 void		lltable_drain(int);
 void		lltable_purge_entries(struct lltable *);
 int		lltable_sysctl_dumparp(int, struct rt_walkarg *);

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.195 src/sys/net/route.c:1.196
--- src/sys/net/route.c:1.195	Thu Jun 22 08:31:54 2017
+++ src/sys/net/route.c	Thu Jun 22 09:56:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.195 2017/06/22 08:31:54 ozaki-r Exp $	*/
+/*	$NetBSD: route.c,v 1.196 2017/06/22 09:56:48 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.195 2017/06/22 08:31:54 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.196 2017/06/22 09:56:48 ozaki-r Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -123,6 +123,9 @@ __KERNEL_RCSID(0, "$NetBSD: route.c,v 1.
 #include 
 #include 
 #include 
+#if defined(INET) || defined(INET6)
+#include 
+#endif
 
 #include 
 #include 
@@ -1249,6 +1252,10 @@ rtrequest1(int req, struct rt_addrinfo *
 		need_unlock = false;
 		rt_timer_remove_all(rt);
 		rtcache_clear_rtentry(dst->sa_family, rt);
+#if defined(INET) || defined(INET6)
+		if (netmask != NULL)
+			lltable_prefix_free(dst->sa_family, dst, netmask, 0);
+#endif
 		if (ret_nrt == NULL) {
 			/* Adjust the refcount */
 			rt_ref(rt);

Index: src/tests/net/ndp/t_ra.sh
diff -u src/tests/net/ndp/t_ra.sh:1.28 src/tests/net/ndp/t_ra.sh:1.29
--- src/tests/net/ndp/t_ra.sh:1.28	Wed Jun 21 09:05:31 2017
+++ src/tests/net/ndp/t_ra.sh	Thu Jun 22 09:56:48 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ra.sh,v 1.28 2017/06/21 09:05:31 ozaki-r Exp $
+#	$NetBSD: t_ra.sh,v 1.29 2017/06/22 09:56:48 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -334,7 +334,6 @@ ra_flush_defrouter_entries_body()
 	atf_check -s exit:0 -o empty rump.ndp -r
 	atf_check -s exit:0 -o match:'No advertising router' rump.ndp -p
 	atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
-	atf_check -s exit:0 -o match:"$ONEDAYISH S R" rump.ndp -n -a
 	atf_check -s exit:0 -o not-match:'fc00:1:' rump.ndp -n -a
 	atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6
 	unset RUMP_SERVER
@@ -762,7 +761,6 @@ ra_defrouter_expiration_body()
 	atf_check -s exit:0 -o not-match:'if=shmif0' rump.ndp -r
 	atf_check -s exit:0 -o match:'No advertising router' rump.ndp -p
 	atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
-	atf_check -s exit:0 -o match:"$ONEDAYISH S R" rump.ndp -n -a
 	atf_check -s exit:0 -o not-match:'fc00:1:' rump.ndp -n -a
 	atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6
 	unset RUMP_SERVER



CVS commit: src/sys

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 09:53:25 UTC 2017

Modified Files:
src/sys/netinet: in.c
src/sys/netinet6: in6.c

Log Message:
Purge ARP/NDP entries on an interface when the interface is down

Fix PR kern/51179


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/netinet/in.c
cvs rdiff -u -r1.247 -r1.248 src/sys/netinet6/in6.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/netinet/in.c
diff -u src/sys/netinet/in.c:1.204 src/sys/netinet/in.c:1.205
--- src/sys/netinet/in.c:1.204	Thu Jun 22 09:23:10 2017
+++ src/sys/netinet/in.c	Thu Jun 22 09:53:24 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.204 2017/06/22 09:23:10 ozaki-r Exp $	*/
+/*	$NetBSD: in.c,v 1.205 2017/06/22 09:53:24 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.204 2017/06/22 09:23:10 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.205 2017/06/22 09:53:24 ozaki-r Exp $");
 
 #include "arp.h"
 
@@ -1505,6 +1505,7 @@ in_if_down(struct ifnet *ifp)
 {
 
 	in_if_link_down(ifp);
+	lltable_purge_entries(LLTABLE(ifp));
 }
 
 void

Index: src/sys/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.247 src/sys/netinet6/in6.c:1.248
--- src/sys/netinet6/in6.c:1.247	Thu Jun 22 09:29:23 2017
+++ src/sys/netinet6/in6.c	Thu Jun 22 09:53:25 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.247 2017/06/22 09:29:23 ozaki-r Exp $	*/
+/*	$NetBSD: in6.c,v 1.248 2017/06/22 09:53:25 ozaki-r Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.247 2017/06/22 09:29:23 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.248 2017/06/22 09:53:25 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2274,6 +2274,7 @@ in6_if_down(struct ifnet *ifp)
 {
 
 	in6_if_link_down(ifp);
+	lltable_purge_entries(LLTABLE6(ifp));
 }
 
 void



CVS commit: src/sys/netinet6

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 09:29:23 UTC 2017

Modified Files:
src/sys/netinet6: in6.c

Log Message:
Allow in6_lltable_free_entry to be called without holding the afdata lock of 
ifp as well as in_lltable_free_entry

This behavior is a bit odd and should be fixed in the future...


To generate a diff of this commit:
cvs rdiff -u -r1.246 -r1.247 src/sys/netinet6/in6.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.246 src/sys/netinet6/in6.c:1.247
--- src/sys/netinet6/in6.c:1.246	Wed Jun 21 09:05:31 2017
+++ src/sys/netinet6/in6.c	Thu Jun 22 09:29:23 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.246 2017/06/21 09:05:31 ozaki-r Exp $	*/
+/*	$NetBSD: in6.c,v 1.247 2017/06/22 09:29:23 ozaki-r Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.246 2017/06/21 09:05:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.247 2017/06/22 09:29:23 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2416,15 +2416,16 @@ static void
 in6_lltable_free_entry(struct lltable *llt, struct llentry *lle)
 {
 	struct ifnet *ifp = llt->llt_ifp;
+	bool locked = false;
 
-	IF_AFDATA_WLOCK_ASSERT(ifp);
 	LLE_WLOCK_ASSERT(lle);
 
 	/* Unlink entry from table */
 	if ((lle->la_flags & LLE_LINKED) != 0) {
-
+		IF_AFDATA_WLOCK_ASSERT(ifp);
 		lltable_unlink_entry(llt, lle);
 		KASSERT((lle->la_flags & LLE_LINKED) == 0);
+		locked = true;
 	}
 	/*
 	 * We need to release the lock here to lle_timer proceeds;
@@ -2434,7 +2435,8 @@ in6_lltable_free_entry(struct lltable *l
 	 */
 	LLE_ADDREF(lle);
 	LLE_WUNLOCK(lle);
-	IF_AFDATA_WUNLOCK(ifp);
+	if (locked)
+		IF_AFDATA_WUNLOCK(ifp);
 
 #ifdef NET_MPSAFE
 	callout_halt(>lle_timer, NULL);
@@ -2450,7 +2452,8 @@ in6_lltable_free_entry(struct lltable *l
 	lltable_drop_entry_queue(lle);
 	LLE_FREE_LOCKED(lle);
 
-	IF_AFDATA_WLOCK(ifp);
+	if (locked)
+		IF_AFDATA_WLOCK(ifp);
 }
 
 static int



CVS commit: src/sys/net

2017-06-22 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Jun 22 09:26:43 UTC 2017

Modified Files:
src/sys/net: if_gif.c

Log Message:
I have forgotten to commit this gif(4) MP-ify patch for a long time, sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/net/if_gif.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/if_gif.c
diff -u src/sys/net/if_gif.c:1.126 src/sys/net/if_gif.c:1.127
--- src/sys/net/if_gif.c:1.126	Thu Jun  1 02:45:14 2017
+++ src/sys/net/if_gif.c	Thu Jun 22 09:26:43 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gif.c,v 1.126 2017/06/01 02:45:14 chs Exp $	*/
+/*	$NetBSD: if_gif.c,v 1.127 2017/06/22 09:26:43 knakahara Exp $	*/
 /*	$KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126 2017/06/01 02:45:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.127 2017/06/22 09:26:43 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -608,7 +608,12 @@ gif_input(struct mbuf *m, int af, struct
 		return;
 	}
 
-	if (__predict_true(pktq_enqueue(pktq, m, 0))) {
+#ifdef GIF_MPSAFE
+	const u_int h = curcpu()->ci_index;
+#else
+	const uint32_t h = pktq_rps_hash(m);
+#endif
+	if (__predict_true(pktq_enqueue(pktq, m, h))) {
 		ifp->if_ibytes += pktlen;
 		ifp->if_ipackets++;
 	} else {



CVS commit: src/sys/netinet6

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 09:24:02 UTC 2017

Modified Files:
src/sys/netinet6: nd6.c nd6.h

Log Message:
Remove unused function (nd6_rem_ifa_lle)


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.84 -r1.85 src/sys/netinet6/nd6.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/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.234 src/sys/netinet6/nd6.c:1.235
--- src/sys/netinet6/nd6.c:1.234	Wed Jun 21 09:05:31 2017
+++ src/sys/netinet6/nd6.c	Thu Jun 22 09:24:02 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.234 2017/06/21 09:05:31 ozaki-r Exp $	*/
+/*	$NetBSD: nd6.c,v 1.235 2017/06/22 09:24:02 ozaki-r Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.234 2017/06/21 09:05:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.235 2017/06/22 09:24:02 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2423,24 +2423,6 @@ nd6_need_cache(struct ifnet *ifp)
 	}
 }
 
-/*
- * Removes ALL lle records for interface address prefix.
- * XXXME: That's probably not we really want to do, we need
- * to remove address record only and keep other records
- * until we determine if given prefix is really going
- * to be removed.
- */
-void
-nd6_rem_ifa_lle(struct in6_ifaddr *ia)
-{
-	struct sockaddr_in6 mask, addr;
-
-	memcpy(, >ia_addr, sizeof(ia->ia_addr));
-	memcpy(, >ia_prefixmask, sizeof(ia->ia_prefixmask));
-	lltable_prefix_free(AF_INET6, sin6tosa(), sin6tosa(),
-	LLE_STATIC);
-}
-
 static void 
 clear_llinfo_pqueue(struct llentry *ln)
 {

Index: src/sys/netinet6/nd6.h
diff -u src/sys/netinet6/nd6.h:1.84 src/sys/netinet6/nd6.h:1.85
--- src/sys/netinet6/nd6.h:1.84	Wed Jun 21 09:05:31 2017
+++ src/sys/netinet6/nd6.h	Thu Jun 22 09:24:02 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.h,v 1.84 2017/06/21 09:05:31 ozaki-r Exp $	*/
+/*	$NetBSD: nd6.h,v 1.85 2017/06/22 09:24:02 ozaki-r Exp $	*/
 /*	$KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $	*/
 
 /*
@@ -447,7 +447,6 @@ void nd6_cache_lladdr(struct ifnet *, st
 int nd6_sysctl(int, void *, size_t *, void *, size_t);
 int nd6_need_cache(struct ifnet *);
 void nd6_llinfo_release_pkts(struct llentry *, struct ifnet *);
-void nd6_rem_ifa_lle(struct in6_ifaddr *);
 
 /* nd6_nbr.c */
 void nd6_na_input(struct mbuf *, int, int);



CVS commit: src/sys/netinet

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 09:23:10 UTC 2017

Modified Files:
src/sys/netinet: in.c

Log Message:
Fix in_lltable_match_prefix

The function has not been used but will be used soon.


To generate a diff of this commit:
cvs rdiff -u -r1.203 -r1.204 src/sys/netinet/in.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/netinet/in.c
diff -u src/sys/netinet/in.c:1.203 src/sys/netinet/in.c:1.204
--- src/sys/netinet/in.c:1.203	Thu Jun  1 02:45:14 2017
+++ src/sys/netinet/in.c	Thu Jun 22 09:23:10 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.203 2017/06/01 02:45:14 chs Exp $	*/
+/*	$NetBSD: in.c,v 1.204 2017/06/22 09:23:10 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.203 2017/06/01 02:45:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.204 2017/06/22 09:23:10 ozaki-r Exp $");
 
 #include "arp.h"
 
@@ -1896,12 +1896,15 @@ in_lltable_match_prefix(const struct soc
 {
 	const struct sockaddr_in *pfx = (const struct sockaddr_in *)prefix;
 	const struct sockaddr_in *msk = (const struct sockaddr_in *)mask;
+	struct in_addr lle_addr;
+
+	lle_addr.s_addr = ntohl(lle->r_l3addr.addr4.s_addr);
 
 	/*
 	 * (flags & LLE_STATIC) means deleting all entries
 	 * including static ARP entries.
 	 */
-	if (IN_ARE_MASKED_ADDR_EQUAL(lle->r_l3addr.addr4, pfx, msk) &&
+	if (IN_ARE_MASKED_ADDR_EQUAL(lle_addr, pfx, msk) &&
 	((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC)))
 		return (1);
 



CVS commit: src/tests/net/ndp

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 09:05:02 UTC 2017

Modified Files:
src/tests/net/ndp: t_ndp.sh

Log Message:
Fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/net/ndp/t_ndp.sh

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

Modified files:

Index: src/tests/net/ndp/t_ndp.sh
diff -u src/tests/net/ndp/t_ndp.sh:1.22 src/tests/net/ndp/t_ndp.sh:1.23
--- src/tests/net/ndp/t_ndp.sh:1.22	Wed Jun 21 09:05:31 2017
+++ src/tests/net/ndp/t_ndp.sh	Thu Jun 22 09:05:02 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ndp.sh,v 1.22 2017/06/21 09:05:31 ozaki-r Exp $
+#	$NetBSD: t_ndp.sh,v 1.23 2017/06/22 09:05:02 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -398,7 +398,7 @@ atf_test_case ndp_rtm cleanup
 ndp_rtm_head()
 {
 
-	atf_set "descr" "Tests for routing messages on operations of ARP entries"
+	atf_set "descr" "Tests for routing messages on operations of NDP entries"
 	atf_set "require.progs" "rump_server"
 }
 



CVS commit: src/sys/kern

2017-06-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 22 09:05:09 UTC 2017

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

Log Message:
Unwrap two lines. NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.189 -r1.190 src/sys/kern/kern_lwp.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/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.189 src/sys/kern/kern_lwp.c:1.190
--- src/sys/kern/kern_lwp.c:1.189	Thu Jun  1 02:45:13 2017
+++ src/sys/kern/kern_lwp.c	Thu Jun 22 09:05:09 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.189 2017/06/01 02:45:13 chs Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.190 2017/06/22 09:05:09 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.189 2017/06/01 02:45:13 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.190 2017/06/22 09:05:09 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -887,8 +887,7 @@ lwp_create(lwp_t *l1, proc_t *p2, vaddr_
 	pcu_save_all(l1);
 
 	uvm_lwp_setuarea(l2, uaddr);
-	uvm_lwp_fork(l1, l2, stack, stacksize, func,
-	(arg != NULL) ? arg : l2);
+	uvm_lwp_fork(l1, l2, stack, stacksize, func, (arg != NULL) ? arg : l2);
 
 	if ((flags & LWP_PIDLID) != 0) {
 		lid = proc_alloc_pid(p2);



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

2017-06-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 22 08:44:21 UTC 2017

Modified Files:
src/sys/arch/arm/include/arm32: frame.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/include/arm32/frame.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/arm/include/arm32/frame.h
diff -u src/sys/arch/arm/include/arm32/frame.h:1.42 src/sys/arch/arm/include/arm32/frame.h:1.43
--- src/sys/arch/arm/include/arm32/frame.h:1.42	Fri Apr 17 17:28:33 2015
+++ src/sys/arch/arm/include/arm32/frame.h	Thu Jun 22 08:44:21 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.42 2015/04/17 17:28:33 matt Exp $	*/
+/*	$NetBSD: frame.h,v 1.43 2017/06/22 08:44:21 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -64,7 +64,7 @@ struct switchframe {
 	u_int	sf_sp;
 	u_int	sf_pc;
 };
- 
+
 /*
  * System stack frames.
  */
@@ -240,7 +240,7 @@ void validate_trapframe(trapframe_t *, i
 #define	ENABLE_ALIGNMENT_FAULTS		\
 	and	r7, r0, #(PSR_MODE)	/* Test for USR32 mode */	;\
 	GET_CURCPU(r4)			/* r4 = cpuinfo */
-	
+
 
 #define	DO_AST_AND_RESTORE_ALIGNMENT_FAULTS\
 	DO_PENDING_SOFTINTS		;\
@@ -423,7 +423,7 @@ LOCK_CAS_DEBUG_LOCALS
  * This should only be used if the processor is not currently in SVC32
  * mode. The processor mode is switched to SVC mode and the trap frame is
  * stored. The SVC lr field is used to store the previous value of
- * lr in SVC mode.  
+ * lr in SVC mode.
  *
  * NOTE: r13 and r14 are stored separately as a work around for the
  * SA110 rev 2 STM^ bug



CVS commit: src/sys/net

2017-06-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 22 08:31:54 UTC 2017

Modified Files:
src/sys/net: route.c

Log Message:
Fix locking in rtalloc1 (affected only if NET_MPSAFE)


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/sys/net/route.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/route.c
diff -u src/sys/net/route.c:1.194 src/sys/net/route.c:1.195
--- src/sys/net/route.c:1.194	Fri Mar 24 03:45:02 2017
+++ src/sys/net/route.c	Thu Jun 22 08:31:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.194 2017/03/24 03:45:02 ozaki-r Exp $	*/
+/*	$NetBSD: route.c,v 1.195 2017/06/22 08:31:54 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.194 2017/03/24 03:45:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.195 2017/06/22 08:31:54 ozaki-r Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -280,7 +280,7 @@ static void rtcache_invalidate(struct do
 static void rt_ref(struct rtentry *);
 
 static struct rtentry *
-rtalloc1_locked(const struct sockaddr *, int, bool);
+rtalloc1_locked(const struct sockaddr *, int, bool, bool);
 static struct rtentry *
 rtcache_validate_locked(struct route *);
 static void rtcache_free_locked(struct route *);
@@ -557,7 +557,8 @@ dump_rt(const struct rtentry *rt)
  * will be incremented. The caller has to rtfree it by itself.
  */
 struct rtentry *
-rtalloc1_locked(const struct sockaddr *dst, int report, bool wait_ok)
+rtalloc1_locked(const struct sockaddr *dst, int report, bool wait_ok,
+bool wlock)
 {
 	rtbl_t *rtbl;
 	struct rtentry *rt;
@@ -599,6 +600,10 @@ retry:
 
 		if (need_lock)
 			RTCACHE_WLOCK();
+		if (wlock)
+			RT_WLOCK();
+		else
+			RT_RLOCK();
 		goto retry;
 	}
 #endif /* NET_MPSAFE */
@@ -627,7 +632,7 @@ rtalloc1(const struct sockaddr *dst, int
 	struct rtentry *rt;
 
 	RT_RLOCK();
-	rt = rtalloc1_locked(dst, report, true);
+	rt = rtalloc1_locked(dst, report, true, false);
 	RT_UNLOCK();
 
 	return rt;
@@ -1026,7 +1031,7 @@ ifa_ifwithroute_psref(int flags, const s
 
 		/* XXX we cannot call rtalloc1 if holding the rt lock */
 		if (RT_LOCKED())
-			rt = rtalloc1_locked(gateway, 0, true);
+			rt = rtalloc1_locked(gateway, 0, true, true);
 		else
 			rt = rtalloc1(gateway, 0);
 		if (rt == NULL)
@@ -1387,7 +1392,7 @@ rt_setgate(struct rtentry *rt, const str
 
 		/* XXX we cannot call rtalloc1 if holding the rt lock */
 		if (RT_LOCKED())
-			gwrt = rtalloc1_locked(gate, 1, false);
+			gwrt = rtalloc1_locked(gate, 1, false, true);
 		else
 			gwrt = rtalloc1(gate, 1);
 		/*



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

2017-06-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 22 08:10:29 UTC 2017

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
If we see GICC_IAR_IRQ_SSPURIOUS we should also stop looking for irqs


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/cortex/gic.c

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

Modified files:

Index: src/sys/arch/arm/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.27 src/sys/arch/arm/cortex/gic.c:1.28
--- src/sys/arch/arm/cortex/gic.c:1.27	Thu Jun 22 08:04:32 2017
+++ src/sys/arch/arm/cortex/gic.c	Thu Jun 22 08:10:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.27 2017/06/22 08:04:32 skrll Exp $	*/
+/*	$NetBSD: gic.c,v 1.28 2017/06/22 08:10:29 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.27 2017/06/22 08:04:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.28 2017/06/22 08:10:29 skrll Exp $");
 
 #include 
 #include 
@@ -293,11 +293,15 @@ armgic_irq_handler(void *arg)
 		uint32_t irq = __SHIFTOUT(iar, GICC_IAR_IRQ);
 
 		KERNHIST_LOG(armgichist, "iar %#x (irq %d)", iar, irq, 0, 0);
-		if (irq == GICC_IAR_IRQ_SPURIOUS) {
+		if (irq == GICC_IAR_IRQ_SPURIOUS ||
+		irq == GICC_IAR_IRQ_SSPURIOUS) {
 			iar = gicc_read(sc, GICC_IAR);
 			irq = __SHIFTOUT(iar, GICC_IAR_IRQ);
 			if (irq == GICC_IAR_IRQ_SPURIOUS)
 break;
+			if (irq == GICC_IAR_IRQ_SSPURIOUS) {
+break;
+			}
 		}
 
 		//const uint32_t cpuid = __SHIFTOUT(iar, GICC_IAR_CPUID_MASK);



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

2017-06-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 22 08:04:32 UTC 2017

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
Wrap long line


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/cortex/gic.c

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

Modified files:

Index: src/sys/arch/arm/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.26 src/sys/arch/arm/cortex/gic.c:1.27
--- src/sys/arch/arm/cortex/gic.c:1.26	Thu Jun 22 07:56:40 2017
+++ src/sys/arch/arm/cortex/gic.c	Thu Jun 22 08:04:32 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.26 2017/06/22 07:56:40 skrll Exp $	*/
+/*	$NetBSD: gic.c,v 1.27 2017/06/22 08:04:32 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.26 2017/06/22 07:56:40 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.27 2017/06/22 08:04:32 skrll Exp $");
 
 #include 
 #include 
@@ -686,8 +686,9 @@ armgic_attach(device_t parent, device_t 
 
 	const u_int ppis = popcount32(sc->sc_gic_valid_lines[0] >> 16);
 	const u_int sgis = popcount32(sc->sc_gic_valid_lines[0] & 0x);
-	aprint_normal_dev(sc->sc_dev, "%u Priorities, %zu SPIs, %u PPIs, %u SGIs\n",
-	priorities, sc->sc_gic_lines - ppis - sgis, ppis, sgis);
+	aprint_normal_dev(sc->sc_dev, "%u Priorities, %zu SPIs, %u PPIs, "
+	"%u SGIs\n",  priorities, sc->sc_gic_lines - ppis - sgis, ppis,
+	sgis);
 }
 
 CFATTACH_DECL_NEW(armgic, 0,



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

2017-06-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 22 07:56:40 UTC 2017

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
Print the GICC_IIDR when AB_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/cortex/gic.c

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

Modified files:

Index: src/sys/arch/arm/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.25 src/sys/arch/arm/cortex/gic.c:1.26
--- src/sys/arch/arm/cortex/gic.c:1.25	Thu Jun 22 06:51:30 2017
+++ src/sys/arch/arm/cortex/gic.c	Thu Jun 22 07:56:40 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.25 2017/06/22 06:51:30 skrll Exp $	*/
+/*	$NetBSD: gic.c,v 1.26 2017/06/22 07:56:40 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.25 2017/06/22 06:51:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.26 2017/06/22 07:56:40 skrll Exp $");
 
 #include 
 #include 
@@ -577,6 +577,12 @@ armgic_attach(device_t parent, device_t 
 	uint32_t pmr = gicc_read(sc, GICC_PMR);
 	u_int priorities = 1 << popcount32(pmr);
 
+	const uint32_t iidr = gicc_read(sc, GICC_IIDR);
+	const int iidr_prod = __SHIFTOUT(iidr, GICC_IIDR_ProductID);
+	const int iidr_arch = __SHIFTOUT(iidr, GICC_IIDR_ArchVersion);
+	const int iidr_rev = __SHIFTOUT(iidr, GICC_IIDR_Revision);
+	const int iidr_imp = __SHIFTOUT(iidr, GICC_IIDR_Implementer);
+
 	/*
 	 * Find the boot processor's CPU interface number.
 	 */
@@ -611,6 +617,9 @@ armgic_attach(device_t parent, device_t 
 	aprint_normal(": Generic Interrupt Controller, "
 	"%zu sources (%zu valid)\n",
 	sc->sc_pic.pic_maxsources, sc->sc_gic_lines);
+	aprint_debug_dev(sc->sc_dev, "Architecture version %d"
+	" (0x%x:%d rev %d)\n", iidr_arch, iidr_imp, iidr_prod,
+	iidr_rev);
 
 #ifdef MULTIPROCESSOR
 	sc->sc_pic.pic_cpus = kcpuset_running;



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

2017-06-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 22 07:02:15 UTC 2017

Modified Files:
src/sys/arch/arm/cortex: gic_reg.h

Log Message:
Naming consistency for (as yet) unused register


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/cortex/gic_reg.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/arm/cortex/gic_reg.h
diff -u src/sys/arch/arm/cortex/gic_reg.h:1.5 src/sys/arch/arm/cortex/gic_reg.h:1.6
--- src/sys/arch/arm/cortex/gic_reg.h:1.5	Tue Jun  9 10:22:15 2015
+++ src/sys/arch/arm/cortex/gic_reg.h	Thu Jun 22 07:02:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic_reg.h,v 1.5 2015/06/09 10:22:15 skrll Exp $	*/
+/*	$NetBSD: gic_reg.h,v 1.6 2017/06/22 07:02:14 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -146,7 +146,7 @@
 #define	GICD_TYPER_ITLinesNumber	__BITS(4,0)	// 32*(N+1)
 #define	GICD_TYPER_LINES(n)		MIN(32*(__SHIFTOUT((n), GICD_TYPER_ITLinesNumber) + 1), 1020)
 
-#define	GICD_IIDR_ProductId		__BITS(31,24)
+#define	GICD_IIDR_ProductID		__BITS(31,24)
 #define	GICD_IIDR_Variant		__BITS(19,16)
 #define	GICD_IIDR_Revision		__BITS(15,12)
 #define	GICD_IIDR_Implementer		__BITS(11,0)



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

2017-06-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 22 06:51:30 UTC 2017

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
Add 'armgichist' KERNHIST for (future) debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/cortex/gic.c

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

Modified files:

Index: src/sys/arch/arm/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.24 src/sys/arch/arm/cortex/gic.c:1.25
--- src/sys/arch/arm/cortex/gic.c:1.24	Sun Jun 18 22:11:50 2017
+++ src/sys/arch/arm/cortex/gic.c	Thu Jun 22 06:51:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.24 2017/06/18 22:11:50 jmcneill Exp $	*/
+/*	$NetBSD: gic.c,v 1.25 2017/06/22 06:51:30 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,19 +29,22 @@
  */
 
 #include "opt_ddb.h"
+#include "opt_kernhist.h"
 #include "opt_multiprocessor.h"
 
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.24 2017/06/18 22:11:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.25 2017/06/22 06:51:30 skrll Exp $");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
 #include 
 
 #include 
@@ -71,6 +74,16 @@ static void armgic_cpu_init(struct pic_s
 static void armgic_ipi_send(struct pic_softc *, const kcpuset_t *, u_long);
 #endif
 
+#ifdef KERNHIST
+static int armgichist_init(void);
+
+#ifndef ARMGICHIST_SIZE
+#define ARMGICHIST_SIZE 200
+#endif
+
+KERNHIST_DEFINE(armgichist);
+#endif
+
 static const struct pic_ops armgic_picops = {
 	.pic_unblock_irqs = armgic_unblock_irqs,
 	.pic_block_irqs = armgic_block_irqs,
@@ -238,12 +251,27 @@ softint_trigger(uintptr_t machdep)
 }
 #endif
 
+
+#ifdef KERNHIST
+int
+armgichist_init(void)
+{
+
+	KERNHIST_INIT(armgichist, ARMGICHIST_SIZE);
+
+	return 0;
+}
+#endif
+
 void
-armgic_irq_handler(void *tf)
+armgic_irq_handler(void *arg)
 {
+	KERNHIST_FUNC(__func__); KERNHIST_CALLED(armgichist);
 	struct cpu_info * const ci = curcpu();
 	struct armgic_softc * const sc = _softc;
 	const int old_ipl = ci->ci_cpl;
+	struct trapframe * const tf = arg;
+	
 #ifdef DIAGNOSTIC
 	const int old_mtx_count = ci->ci_mtx_count;
 	const int old_l_biglocks = ci->ci_curlwp->l_biglocks;
@@ -257,9 +285,14 @@ armgic_irq_handler(void *tf)
 	KASSERTMSG(old_ipl != IPL_HIGH, "old_ipl %d pmr %#x hppir %#x",
 	old_ipl, gicc_read(sc, GICC_PMR), gicc_read(sc, GICC_HPPIR));
 
+	KERNHIST_LOG(armgichist, "old_ipl %d pmr %u hppir %u", old_ipl,
+	gicc_read(sc, GICC_PMR), gicc_read(sc, GICC_HPPIR), 0);
+
 	for (;;) {
 		uint32_t iar = gicc_read(sc, GICC_IAR);
 		uint32_t irq = __SHIFTOUT(iar, GICC_IAR_IRQ);
+
+		KERNHIST_LOG(armgichist, "iar %#x (irq %d)", iar, irq, 0, 0);
 		if (irq == GICC_IAR_IRQ_SPURIOUS) {
 			iar = gicc_read(sc, GICC_IAR);
 			irq = __SHIFTOUT(iar, GICC_IAR_IRQ);
@@ -284,6 +317,9 @@ armgic_irq_handler(void *tf)
 		 * However, if are just raising ipl, we can just update ci_cpl.
 		 */
 		const int ipl = is->is_ipl;
+
+		KERNHIST_LOG(armgichist, "ipl %d vs ci_cpl %d pmr %#x", ipl,
+		ci->ci_cpl, gicc_read(sc, GICC_PMR), 0);
 		if (__predict_false(ipl < ci->ci_cpl)) {
 			pic_do_pending_ints(I32_bit, ipl, tf);
 			KASSERT(ci->ci_cpl == ipl);
@@ -310,14 +346,18 @@ armgic_irq_handler(void *tf)
 	 */
 	KASSERT(old_ipl != IPL_HIGH);
 	pic_do_pending_ints(I32_bit, old_ipl, tf);
-	KASSERTMSG(ci->ci_cpl == old_ipl, "ci_cpl %d old_ipl %d", ci->ci_cpl, old_ipl);
+	KASSERTMSG(ci->ci_cpl == old_ipl, "ci_cpl %d old_ipl %d", ci->ci_cpl,
+	old_ipl);
 	KASSERT(old_mtx_count == ci->ci_mtx_count);
 	KASSERT(old_l_biglocks == ci->ci_curlwp->l_biglocks);
+
+	KERNHIST_LOG(armgichist, "... done", 0, 0, 0, 0);
 }
 
 void
 armgic_establish_irq(struct pic_softc *pic, struct intrsource *is)
 {
+	KERNHIST_FUNC(__func__); KERNHIST_CALLED(armgichist);
 	struct armgic_softc * const sc = PICTOSOFTC(pic);
 	const size_t group = is->is_irq / 32;
 	const u_int irq = is->is_irq & 31;
@@ -365,6 +405,9 @@ armgic_establish_irq(struct pic_softc *p
 		}
 		if (new_cfg != cfg) {
 			gicd_write(sc, cfg_reg, new_cfg);
+
+			KERNHIST_LOG(armgichist, "irq %u: cfg changed from %#x "
+			"to %#x", is->is_irq, cfg, new_cfg, 0);
 		}
 #ifdef MULTIPROCESSOR
 	} else {
@@ -462,6 +505,7 @@ armgic_cpu_init(struct pic_softc *pic, s
 void
 armgic_ipi_send(struct pic_softc *pic, const kcpuset_t *kcp, u_long ipi)
 {
+	KERNHIST_FUNC(__func__); KERNHIST_CALLED(armgichist);
 	struct armgic_softc * const sc = PICTOSOFTC(pic);
 
 #if 0
@@ -484,6 +528,7 @@ armgic_ipi_send(struct pic_softc *pic, c
 	}
 
 	gicd_write(sc, GICD_SGIR, sgir);
+	KERNHIST_LOG(armgichist, "... done (%#x)", sgir, 0, 0, 0);
 }
 #endif
 
@@ -505,6 +550,13 @@ armgic_attach(device_t parent, device_t 
 {
 	struct armgic_softc * const sc = _softc;
 	struct mpcore_attach_args * const mpcaa = aux;
+#ifdef KERNHIST
+	static 

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

2017-06-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 22 06:42:38 UTC 2017

Modified Files:
src/sys/arch/arm/samsung: exynos_dwcmmc.c exynos_pinctrl.c

Log Message:
Add some compat strings


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/samsung/exynos_dwcmmc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/samsung/exynos_pinctrl.c

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

Modified files:

Index: src/sys/arch/arm/samsung/exynos_dwcmmc.c
diff -u src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.4 src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.5
--- src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.4	Mon Jun 19 22:03:50 2017
+++ src/sys/arch/arm/samsung/exynos_dwcmmc.c	Thu Jun 22 06:42:38 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_dwcmmc.c,v 1.4 2017/06/19 22:03:50 jmcneill Exp $ */
+/* $NetBSD: exynos_dwcmmc.c,v 1.5 2017/06/22 06:42:38 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.4 2017/06/19 22:03:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.5 2017/06/22 06:42:38 skrll Exp $");
 
 #include 
 #include 
@@ -68,6 +68,7 @@ CFATTACH_DECL_NEW(exynos_dwcmmc, sizeof(
 	exynos_dwcmmc_match, exynos_dwcmmc_attach, NULL, NULL);
 
 static const char * const exynos_dwcmmc_compat[] = {
+	"samsung,exynos5250-dw-mshc",
 	"samsung,exynos5420-dw-mshc-smu",
 	"samsung,exynos5420-dw-mshc",
 	NULL

Index: src/sys/arch/arm/samsung/exynos_pinctrl.c
diff -u src/sys/arch/arm/samsung/exynos_pinctrl.c:1.9 src/sys/arch/arm/samsung/exynos_pinctrl.c:1.10
--- src/sys/arch/arm/samsung/exynos_pinctrl.c:1.9	Fri Jan  1 22:37:07 2016
+++ src/sys/arch/arm/samsung/exynos_pinctrl.c	Thu Jun 22 06:42:38 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_pinctrl.c,v 1.9 2016/01/01 22:37:07 marty Exp $ */
+/*	$NetBSD: exynos_pinctrl.c,v 1.10 2017/06/22 06:42:38 skrll Exp $ */
 
 /*-
 * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_pinctrl.c,v 1.9 2016/01/01 22:37:07 marty Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_pinctrl.c,v 1.10 2017/06/22 06:42:38 skrll Exp $");
 
 #include 
 #include 
@@ -76,8 +76,10 @@ CFATTACH_DECL_NEW(exynos_pinctrl, sizeof
 static int
 exynos_pinctrl_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "samsung,exynos5420-pinctrl",
-	NULL };
+	const char * const compatible[] = {
+	"samsung,exynos5410-pinctrl",
+	"samsung,exynos5420-pinctrl",
+	NULL };
 	struct fdt_attach_args * const faa = aux;
 	return of_match_compatible(faa->faa_phandle, compatible);
 }