CVS commit: src/usr.bin/man

2022-03-07 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Mar  7 22:43:39 UTC 2022

Modified Files:
src/usr.bin/man: man.c

Log Message:
man.c: fix -m option so it works as documented

Refactoring work in man.c r. 1.40 from twelve years ago introduced a
regression where input from the -m option was appended rather than
prepended to the search paths. Problem reported by C. Chapman on
netbsd-users.


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

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

Modified files:

Index: src/usr.bin/man/man.c
diff -u src/usr.bin/man/man.c:1.68 src/usr.bin/man/man.c:1.69
--- src/usr.bin/man/man.c:1.68	Mon Apr  6 19:53:22 2020
+++ src/usr.bin/man/man.c	Mon Mar  7 22:43:39 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: man.c,v 1.68 2020/04/06 19:53:22 maya Exp $	*/
+/*	$NetBSD: man.c,v 1.69 2022/03/07 22:43:39 gutteridge Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)man.c	8.17 (Berkeley) 1/31/95";
 #else
-__RCSID("$NetBSD: man.c,v 1.68 2020/04/06 19:53:22 maya Exp $");
+__RCSID("$NetBSD: man.c,v 1.69 2022/03/07 22:43:39 gutteridge Exp $");
 #endif
 #endif /* not lint */
 
@@ -69,6 +69,11 @@ __RCSID("$NetBSD: man.c,v 1.68 2020/04/0
 #define MAN_DEBUG 0		/* debug path output */
 #endif
 
+enum inserttype {
+	INS_TAIL,
+	INS_HEAD
+} instype;
+
 /*
  * manstate: structure collecting the current global state so we can 
  * easily identify it and pass it to helper functions in one arg.
@@ -117,7 +122,7 @@ static void	 jump(char **, const char *,
 static int	 manual(char *, struct manstate *, glob_t *);
 static void	 onsig(int) __dead;
 static void	 usage(void) __dead;
-static void	 addpath(struct manstate *, const char *, size_t, const char *);
+static void	 addpath(struct manstate *, const char *, size_t, const char *, int);
 static const char *getclass(const char *);
 static void printmanpath(struct manstate *);
 
@@ -327,7 +332,7 @@ main(int argc, char **argv)
 			if (len < 1)
 continue;
 			TAILQ_FOREACH(esubd, >entrylist, q)
-addpath(, p, len, esubd->s);
+addpath(, p, len, esubd->s, INS_TAIL);
 		}
 
 	} else {
@@ -335,12 +340,12 @@ main(int argc, char **argv)
 		TAILQ_FOREACH(epath, >entrylist, q) {
 			/* handle trailing "/" magic here ... */
 		  	if (abs_section && epath->s[epath->len - 1] != '/') {
-addpath(, "", 1, epath->s);
+addpath(, "", 1, epath->s, INS_TAIL);
 continue;
 			}
 
 			TAILQ_FOREACH(esubd, >entrylist, q)
-addpath(, epath->s, epath->len, esubd->s);
+addpath(, epath->s, epath->len, esubd->s, INS_TAIL);
 		}
 
 	}
@@ -358,7 +363,7 @@ main(int argc, char **argv)
 			if (len < 1)
 continue;
 			TAILQ_FOREACH(esubd, >entrylist, q)
-addpath(, p, len, esubd->s);
+addpath(, p, len, esubd->s, INS_HEAD); /* Add to front */
 		}
 
 	}
@@ -1012,14 +1017,15 @@ getclass(const char *machine)
 }
 
 static void
-addpath(struct manstate *m, const char *dir, size_t len, const char *sub)
+addpath(struct manstate *m, const char *dir, size_t len, const char *sub,
+	int ishead)
 {
 	char buf[2 * MAXPATHLEN + 1];
 	(void)snprintf(buf, sizeof(buf), "%s%s%s{/%s,%s%s%s}",
 	 dir, (dir[len - 1] == '/') ? "" : "/", sub, m->machine,
 	 m->machclass ? "/" : "", m->machclass ? m->machclass : "",
 	 m->machclass ? "," : "");
-	if (addentry(m->mymanpath, buf, 0) < 0)
+	if (addentry(m->mymanpath, buf, ishead) < 0)
 		errx(EXIT_FAILURE, "malloc failed");
 }
 



CVS commit: src/usr.bin/man

2022-03-07 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Mar  7 22:43:39 UTC 2022

Modified Files:
src/usr.bin/man: man.c

Log Message:
man.c: fix -m option so it works as documented

Refactoring work in man.c r. 1.40 from twelve years ago introduced a
regression where input from the -m option was appended rather than
prepended to the search paths. Problem reported by C. Chapman on
netbsd-users.


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

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



Re: CVS commit: src/usr.sbin/makefs/ffs

2022-03-07 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: hgutch
> Date: Sun Mar  6 08:31:54 UTC 2022
> 
> Modified Files:
>   src/usr.sbin/makefs/ffs: buf.h newfs_extern.h
> Added Files:
>   src/usr.sbin/makefs/ffs: namespace.h
> 
> Log Message:
> Make sure daddr_t is a 64 bit type when building tools.
> (see also PR sw-bug/56742 ).

I wonder this target type definition should rather be defined in
src/tools/compat/compat_defs.h (and src/tools/compat/configure.ac).

---
Izumi Tsutsui


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

2022-03-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar  7 09:45:02 UTC 2022

Modified Files:
src/distrib/sets/lists/base: mi shl.mi

Log Message:
disable compatfile for filter-.so.


To generate a diff of this commit:
cvs rdiff -u -r1.1291 -r1.1292 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.932 -r1.933 src/distrib/sets/lists/base/shl.mi

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



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

2022-03-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar  7 09:45:02 UTC 2022

Modified Files:
src/distrib/sets/lists/base: mi shl.mi

Log Message:
disable compatfile for filter-.so.


To generate a diff of this commit:
cvs rdiff -u -r1.1291 -r1.1292 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.932 -r1.933 src/distrib/sets/lists/base/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1291 src/distrib/sets/lists/base/mi:1.1292
--- src/distrib/sets/lists/base/mi:1.1291	Mon Mar  7 07:07:55 2022
+++ src/distrib/sets/lists/base/mi	Mon Mar  7 09:45:02 2022
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1291 2022/03/07 07:07:55 mrg Exp $
+# $NetBSD: mi,v 1.1292 2022/03/07 09:45:02 mrg Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1204,7 +1204,7 @@
 ./usr/lib/lua	base-sys-usr		compatfile
 ./usr/lib/lua/5.1base-obsolete		obsolete
 ./usr/lib/lua/5.3base-sys-usr		compatfile
-./usr/lib/named	base-sys-usr		compatfile
+./usr/lib/named	base-sys-usr
 ./usr/lib/npf	base-obsolete		obsolete
 ./usr/lib/postfixbase-postfix-usr
 ./usr/lib/runemodulebase-obsolete		obsolete
@@ -1250,7 +1250,7 @@
 ./usr/libdata/debug/usr/games			base-sys-usr
 ./usr/libdata/debug/usr/lib			base-sys-usr		compatdir
 ./usr/libdata/debug/usr/lib/i18n		base-i18n-root		compatfile
-./usr/libdata/debug/usr/lib/named		base-sys-usr		compatdir
+./usr/libdata/debug/usr/lib/named		base-sys-usr
 ./usr/libdata/debug/usr/lib/npf			base-obsolete		obsolete
 ./usr/libdata/debug/usr/libexec			base-sys-usr
 ./usr/libdata/debug/usr/libexec/ching		base-sys-usr

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.932 src/distrib/sets/lists/base/shl.mi:1.933
--- src/distrib/sets/lists/base/shl.mi:1.932	Sun Mar  6 17:54:52 2022
+++ src/distrib/sets/lists/base/shl.mi	Mon Mar  7 09:45:02 2022
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.932 2022/03/06 17:54:52 christos Exp $
+# $NetBSD: shl.mi,v 1.933 2022/03/07 09:45:02 mrg Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -966,7 +966,7 @@
 ./usr/lib/lua/5.3/netpgp.so 			base-sys-shlib		compatfile
 ./usr/lib/lua/5.3/sqlite.so	base-sys-shlib		compatfile
 ./usr/lib/lua/5.3/syslog.so	base-sys-shlib		compatfile
-./usr/lib/named/filter-.so.0		base-sys-shlib		compatfile
+./usr/lib/named/filter-.so.0		base-sys-shlib
 ./usr/lib/npf/ext_log.so			base-obsolete		obsolete
 ./usr/lib/npf/ext_log.so.0			base-obsolete		obsolete
 ./usr/lib/npf/ext_log.so.0.0			base-obsolete		obsolete



CVS commit: src

2022-03-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar  7 09:23:20 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: shl.mi
src/external/mpl/bind/lib: Makefile

Log Message:
comment filter-.so.debug for now.  it's not installed normally
and will need a special rule, left as an exercise to the reader.

make plugins .WAIT on everything else.


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/bind/lib/Makefile

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



CVS commit: src

2022-03-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar  7 09:23:20 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: shl.mi
src/external/mpl/bind/lib: Makefile

Log Message:
comment filter-.so.debug for now.  it's not installed normally
and will need a special rule, left as an exercise to the reader.

make plugins .WAIT on everything else.


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/bind/lib/Makefile

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

Modified files:

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.289 src/distrib/sets/lists/debug/shl.mi:1.290
--- src/distrib/sets/lists/debug/shl.mi:1.289	Sun Mar  6 17:54:53 2022
+++ src/distrib/sets/lists/debug/shl.mi	Mon Mar  7 09:23:20 2022
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.289 2022/03/06 17:54:53 christos Exp $
+# $NetBSD: shl.mi,v 1.290 2022/03/07 09:23:20 mrg Exp $
 ./usr/lib/libbfd_g.a		comp-c-debuglib	debuglib,compatfile,binutils
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libavl.so.0.0.debug			comp-zfs-debug	debug,dynamicroot,zfs
@@ -334,7 +334,7 @@
 ./usr/libdata/debug/usr/lib/libzfs.so.0.0.debug			comp-zfs-debug	debug,compatfile,zfs
 ./usr/libdata/debug/usr/lib/libzfs_core.so.0.0.debug		comp-zfs-debug	debug,compatfile,zfs
 ./usr/libdata/debug/usr/lib/libzpool.so.0.0.debug		comp-zfs-debug	debug,compatfile,zfs
-./usr/libdata/debug/usr/lib/named/filter-.so.0.debug	comp-sys-debug	debug,compatfile
+#./usr/libdata/debug/usr/lib/named/filter-.so.0.debug	comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/npf/ext_log.so.0.0.debug		comp-obsolete	debug,compatfile,npf,obsolete
 ./usr/libdata/debug/usr/lib/npf/ext_normalise.so.0.0.debug	comp-obsolete	debug,compatfile,npf,obsolete
 ./usr/libdata/debug/usr/lib/npf/ext_rndblock.so.0.0.debug	comp-obsolete	debug,compatfile,npf,obsolete

Index: src/external/mpl/bind/lib/Makefile
diff -u src/external/mpl/bind/lib/Makefile:1.3 src/external/mpl/bind/lib/Makefile:1.4
--- src/external/mpl/bind/lib/Makefile:1.3	Mon Mar  7 07:07:55 2022
+++ src/external/mpl/bind/lib/Makefile	Mon Mar  7 09:23:20 2022
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile,v 1.3 2022/03/07 07:07:55 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2022/03/07 09:23:20 mrg Exp $
 
 SUBDIR+= libisc .WAIT libdns libisccc .WAIT libisccfg .WAIT libbind9 libirs
-SUBDIR+= libns plugins
+SUBDIR+= libns .WAIT plugins
 
+.include 
 .include