CVS commit: src/games/fortune/datfiles
Module Name:src Committed By: simonb Date: Fri Oct 30 04:56:32 UTC 2020 Modified Files: src/games/fortune/datfiles: fortunes Log Message: Add one. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/games/fortune/datfiles/fortunes Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/datfiles/fortunes diff -u src/games/fortune/datfiles/fortunes:1.92 src/games/fortune/datfiles/fortunes:1.93 --- src/games/fortune/datfiles/fortunes:1.92 Wed Aug 19 02:19:06 2020 +++ src/games/fortune/datfiles/fortunes Fri Oct 30 04:56:32 2020 @@ -16304,3 +16304,6 @@ b) on "typo" ! -- John Lions, Australian UNIX Users Group Newsletter, Oct 1978 % The purpose of computing numbers is not yet in sight +% +Iamonthemoonandthereisnowheretogetabeer. +Thereisnospacebar.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Oct 29 20:37:47 UTC 2020 Modified Files: src/usr.bin/make: parse.c Log Message: make(1): move comment from Parse_DoVar to Parse_IsVar To generate a diff of this commit: cvs rdiff -u -r1.409 -r1.410 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.409 src/usr.bin/make/parse.c:1.410 --- src/usr.bin/make/parse.c:1.409 Wed Oct 28 03:21:25 2020 +++ src/usr.bin/make/parse.c Thu Oct 29 20:37:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.409 2020/10/28 03:21:25 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.410 2020/10/29 20:37:47 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -117,7 +117,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.409 2020/10/28 03:21:25 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.410 2020/10/29 20:37:47 rillig Exp $"); /* types and constants */ @@ -1810,6 +1810,12 @@ AdjustVarassignOp(const VarAssignParsed * optional whitespace, an assignment operator, optional whitespace and the * variable value. * + * Note: There is a lexical ambiguity with assignment modifier characters + * in variable names. This routine interprets the character before the = + * as a modifier. Therefore, an assignment like + * C++=/usr/bin/CC + * is interpreted as "C+ +=" instead of "C++ =". + * * Used for both lines in a file and command line arguments. */ Boolean Parse_IsVar(const char *p, VarAssign *out_var) @@ -2017,19 +2023,7 @@ VarAssignSpecial(const char *name, const } } -/* Take the variable assignment in the passed line and execute it. - * - * Note: There is a lexical ambiguity with assignment modifier characters - * in variable names. This routine interprets the character before the = - * as a modifier. Therefore, an assignment like - * C++=/usr/bin/CC - * is interpreted as "C+ +=" instead of "C++ =". - * - * Input: - * p A line guaranteed to be a variable assignment - * (see Parse_IsVar). - * ctxt Context in which to do the assignment - */ +/* Perform the variable variable assignment in the given context. */ void Parse_DoVar(VarAssign *var, GNode *ctxt) {
CVS commit: src
Module Name:src Committed By: uwe Date: Thu Oct 29 20:26:24 UTC 2020 Modified Files: src: Makefile Log Message: G/c spurious whitespace. To generate a diff of this commit: cvs rdiff -u -r1.332 -r1.333 src/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/Makefile diff -u src/Makefile:1.332 src/Makefile:1.333 --- src/Makefile:1.332 Fri May 15 16:34:44 2020 +++ src/Makefile Thu Oct 29 20:26:24 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.332 2020/05/15 16:34:44 christos Exp $ +# $NetBSD: Makefile,v 1.333 2020/10/29 20:26:24 uwe Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -140,7 +140,7 @@ _SUBDIR= tools .WAIT lib .if ${MKLLVM} != "no" _SUBDIR+= external/bsd/compiler_rt .endif -_SUBDIR+= include external crypto/external bin +_SUBDIR+= include external crypto/external bin _SUBDIR+= games libexec sbin usr.bin _SUBDIR+= usr.sbin share sys etc tests compat _SUBDIR+= .WAIT rescue .WAIT distrib regress
CVS commit: src/lib
Module Name:src Committed By: nia Date: Thu Oct 29 20:11:18 UTC 2020 Modified Files: src/lib: Makefile Log Message: lib: Move sqlite, since it depends on libm To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/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/lib/Makefile diff -u src/lib/Makefile:1.285 src/lib/Makefile:1.286 --- src/lib/Makefile:1.285 Sat Sep 26 17:49:50 2020 +++ src/lib/Makefile Thu Oct 29 20:11:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.285 2020/09/26 17:49:50 jmcneill Exp $ +# $NetBSD: Makefile,v 1.286 2020/10/29 20:11:17 nia Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include @@ -54,8 +54,6 @@ SUBDIR+= libskey SUBDIR+= libnvmm .endif -SUBDIR+= ../external/public-domain/sqlite/lib - .if (${MKMDNS} != "no") SUBDIR+= ../external/apache2/mDNSResponder/lib .endif @@ -122,6 +120,7 @@ SUBDIR+= ../crypto/external/bsd/netpgp/l SUBDIR+= ../external/bsd/blocklist/lib # depends on libpthread SUBDIR+= ../external/bsd/elftoolchain/lib/libdwarf # depends on libelf SUBDIR+= ../external/mit/lua/lib # depends on libm +SUBDIR+= ../external/public-domain/sqlite/lib # depends on libm SUBDIR+= libcurses # depends on libterminfo SUBDIR+= libdm # depends on libprop SUBDIR+= libedit # depends on libterminfo
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Thu Oct 29 19:07:45 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: varmod-quote.mk Log Message: make(1): add test for the :Q modifier To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-quote.mk 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/unit-tests/varmod-quote.mk diff -u src/usr.bin/make/unit-tests/varmod-quote.mk:1.2 src/usr.bin/make/unit-tests/varmod-quote.mk:1.3 --- src/usr.bin/make/unit-tests/varmod-quote.mk:1.2 Sun Aug 16 14:25:16 2020 +++ src/usr.bin/make/unit-tests/varmod-quote.mk Thu Oct 29 19:07:45 2020 @@ -1,9 +1,21 @@ -# $NetBSD: varmod-quote.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ +# $NetBSD: varmod-quote.mk,v 1.3 2020/10/29 19:07:45 rillig Exp $ # # Tests for the :Q variable modifier, which quotes the variable value # to be used in a shell program. -# TODO: Implementation +# Any characters that might be interpreted by the shell are escaped. +# The set of escaped characters is the same, no matter which shell (sh, csh, +# ksh) is in effect. +.if ${:Ua b c:Q} != "a\\ b\\ c" +. error +.endif + +# The quote modifier only applies if the whole modifier name is "Q". +# There is no "Qshell" or "Qawk" or "Qregex" or even "Qhtml" variant. +# All strings except the plain "Q" are interpreted as SysV modifier. +.if ${:Ua.Qshell:Qshell=replaced} != "a.replaced" +. error +.endif all: @:;
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Thu Oct 29 19:01:11 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: varmod-localtime.mk Log Message: make(1): add test for default format of the :localtime modifier To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-localtime.mk 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/unit-tests/varmod-localtime.mk diff -u src/usr.bin/make/unit-tests/varmod-localtime.mk:1.3 src/usr.bin/make/unit-tests/varmod-localtime.mk:1.4 --- src/usr.bin/make/unit-tests/varmod-localtime.mk:1.3 Sun Aug 23 15:13:21 2020 +++ src/usr.bin/make/unit-tests/varmod-localtime.mk Thu Oct 29 19:01:10 2020 @@ -1,8 +1,16 @@ -# $NetBSD: varmod-localtime.mk,v 1.3 2020/08/23 15:13:21 rillig Exp $ +# $NetBSD: varmod-localtime.mk,v 1.4 2020/10/29 19:01:10 rillig Exp $ # # Tests for the :localtime variable modifier, which returns the given time, # formatted as a local timestamp. +# Test for the default time format, %c. Since the time always varies, it's +# only possible to check for the general format here. The names of the +# month and weekday are always in English, independent from the locale. +# Example: Thu Oct 29 18:56:41 2020 +.if ${:U:localtime:tW:M??? ??? ?? ??\:??\:?? } == "" +. error +.endif + all: @echo ${%Y:L:localtim=1593536400} # modifier name too short @echo ${%Y:L:localtime=1593536400} # 2020-07-01T00:00:00Z
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Thu Oct 29 18:59:43 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: varmod-gmtime.mk Log Message: make(1): add test for default time format of the :gmtime modifier To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-gmtime.mk 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/unit-tests/varmod-gmtime.mk diff -u src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.2 src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.3 --- src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.2 Sun Aug 16 12:48:55 2020 +++ src/usr.bin/make/unit-tests/varmod-gmtime.mk Thu Oct 29 18:59:43 2020 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-gmtime.mk,v 1.2 2020/08/16 12:48:55 rillig Exp $ +# $NetBSD: varmod-gmtime.mk,v 1.3 2020/10/29 18:59:43 rillig Exp $ # # Tests for the :gmtime variable modifier, which formats a timestamp # using strftime(3). @@ -6,6 +6,14 @@ all: mod-gmtime all: mod-gmtime-indirect +# Test for the default time format, %c. Since the time always varies, it's +# only possible to check for the general format here. The names of the +# month and weekday are always in English, independent from the locale. +# Example: Thu Oct 29 18:56:41 2020 +.if ${:U:gmtime:tW:M??? ??? ?? ??\:??\:?? } == "" +. error +.endif + mod-gmtime: @echo $@: @echo ${%Y:L:gmtim=1593536400} # modifier name too short
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Thu Oct 29 18:38:24 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: vardebug.exp vardebug.mk Log Message: make(1): add test for ignoring assignment to read-only variable To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/vardebug.exp cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/vardebug.mk 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/unit-tests/vardebug.exp diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.10 src/usr.bin/make/unit-tests/vardebug.exp:1.11 --- src/usr.bin/make/unit-tests/vardebug.exp:1.10 Thu Oct 29 18:19:41 2020 +++ src/usr.bin/make/unit-tests/vardebug.exp Thu Oct 29 18:38:24 2020 @@ -78,6 +78,9 @@ Result of ${:unknown} is error (VARE_UND make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown}) Var_Parse: ${UNDEFINED} with VARE_UNDEFERR|VARE_WANTRES make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED}) +Global:delete .SHELL (not found) +Command:.SHELL = /bin/sh +Command:.SHELL = overwritten ignored (read-only) Global:.MAKEFLAGS = -r -k -d v -d Global:.MAKEFLAGS = -r -k -d v -d 0 make: Fatal errors encountered -- cannot continue Index: src/usr.bin/make/unit-tests/vardebug.mk diff -u src/usr.bin/make/unit-tests/vardebug.mk:1.4 src/usr.bin/make/unit-tests/vardebug.mk:1.5 --- src/usr.bin/make/unit-tests/vardebug.mk:1.4 Thu Oct 29 18:19:41 2020 +++ src/usr.bin/make/unit-tests/vardebug.mk Thu Oct 29 18:38:24 2020 @@ -1,4 +1,4 @@ -# $NetBSD: vardebug.mk,v 1.4 2020/10/29 18:19:41 rillig Exp $ +# $NetBSD: vardebug.mk,v 1.5 2020/10/29 18:38:24 rillig Exp $ # # Demonstrates the debugging output for var.c. @@ -53,6 +53,11 @@ VAR+= 3 .if ${UNDEFINED} .endif +# By default, .SHELL is not defined and thus can be set. As soon as it is +# accessed, it is initialized in the command line context (during VarFind), +# where it is set to read-only. Assigning to it is ignored. +.MAKEFLAGS: .SHELL=overwritten + .MAKEFLAGS: -d0 all:
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Thu Oct 29 18:19:41 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: Makefile vardebug.exp vardebug.mk Log Message: make(1): move MAKEFLAGS handling in vardebug test to the test itself To generate a diff of this commit: cvs rdiff -u -r1.175 -r1.176 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/vardebug.exp cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/vardebug.mk 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/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.175 src/usr.bin/make/unit-tests/Makefile:1.176 --- src/usr.bin/make/unit-tests/Makefile:1.175 Sat Oct 24 02:25:02 2020 +++ src/usr.bin/make/unit-tests/Makefile Thu Oct 29 18:19:41 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.175 2020/10/24 02:25:02 rillig Exp $ +# $NetBSD: Makefile,v 1.176 2020/10/29 18:19:41 rillig Exp $ # # Unit tests for make(1) # @@ -397,7 +397,6 @@ FLAGS.opt-warnings-as-errors= -W FLAGS.order= -j1 FLAGS.recursive= -dL FLAGS.sh-leading-plus= -n -FLAGS.vardebug= -k -dv FROM_CMDLINE= FLAGS.varmod-match-escape= -dv FLAGS.varname-dot-shell= -dpv FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' @@ -439,7 +438,6 @@ SED_CMDS.varname-dot-shell+= -e 's,\[/[^ # Some tests need an additional round of postprocessing. POSTPROC.deptgt-suffixes= \ ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' -POSTPROC.vardebug= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p' POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p' POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p' POSTPROC.varname-dot-shell= \ Index: src/usr.bin/make/unit-tests/vardebug.exp diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.9 src/usr.bin/make/unit-tests/vardebug.exp:1.10 --- src/usr.bin/make/unit-tests/vardebug.exp:1.9 Wed Sep 30 05:58:22 2020 +++ src/usr.bin/make/unit-tests/vardebug.exp Thu Oct 29 18:19:41 2020 @@ -1,4 +1,6 @@ -Global:RELEVANT = yes +Global:delete FROM_CMDLINE (not found) +Command:FROM_CMDLINE = +Global:.MAKEOVERRIDES = FROM_CMDLINE Global:VAR = added Global:VAR = overwritten Global:delete VAR @@ -76,5 +78,8 @@ Result of ${:unknown} is error (VARE_UND make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown}) Var_Parse: ${UNDEFINED} with VARE_UNDEFERR|VARE_WANTRES make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED}) -Global:RELEVANT = no +Global:.MAKEFLAGS = -r -k -d v -d +Global:.MAKEFLAGS = -r -k -d v -d 0 +make: Fatal errors encountered -- cannot continue +make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/vardebug.mk diff -u src/usr.bin/make/unit-tests/vardebug.mk:1.3 src/usr.bin/make/unit-tests/vardebug.mk:1.4 --- src/usr.bin/make/unit-tests/vardebug.mk:1.3 Sat Aug 8 14:28:46 2020 +++ src/usr.bin/make/unit-tests/vardebug.mk Thu Oct 29 18:19:41 2020 @@ -1,8 +1,8 @@ -# $NetBSD: vardebug.mk,v 1.3 2020/08/08 14:28:46 rillig Exp $ +# $NetBSD: vardebug.mk,v 1.4 2020/10/29 18:19:41 rillig Exp $ # # Demonstrates the debugging output for var.c. -RELEVANT= yes +.MAKEFLAGS: -dv FROM_CMDLINE= VAR= added # VarAdd VAR= overwritten # Var_Set @@ -53,7 +53,7 @@ VAR+= 3 .if ${UNDEFINED} .endif -RELEVANT= no +.MAKEFLAGS: -d0 all: @:
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Thu Oct 29 17:27:12 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: directive-export.mk Log Message: make(1): add test for .export and Var_Delete To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-export.mk 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/unit-tests/directive-export.mk diff -u src/usr.bin/make/unit-tests/directive-export.mk:1.2 src/usr.bin/make/unit-tests/directive-export.mk:1.3 --- src/usr.bin/make/unit-tests/directive-export.mk:1.2 Sun Aug 16 14:25:16 2020 +++ src/usr.bin/make/unit-tests/directive-export.mk Thu Oct 29 17:27:12 2020 @@ -1,8 +1,25 @@ -# $NetBSD: directive-export.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ +# $NetBSD: directive-export.mk,v 1.3 2020/10/29 17:27:12 rillig Exp $ # # Tests for the .export directive. # TODO: Implementation +INDIRECT= indirect +VAR= value $$ ${INDIRECT} + +# A variable is exported using the .export directive. +# During that, its value is expanded, just like almost everywhere else. +.export VAR +.if ${:!env | grep '^VAR'!} != "VAR=value \$ indirect" +. error +.endif + +# Undefining a variable that has been exported implicitly removes it from +# the environment of all child processes. +.undef VAR +.if ${:!env | grep '^VAR' || true!} != "" +. error +.endif + all: @:;
CVS commit: src/external/public-domain/sqlite/lib
Module Name:src Committed By: nia Date: Thu Oct 29 16:35:33 UTC 2020 Modified Files: src/external/public-domain/sqlite/lib: Makefile sqlite3.pc.in Log Message: sqlite: fts5 extension requires we link with -lm To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/public-domain/sqlite/lib/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/public-domain/sqlite/lib/sqlite3.pc.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/public-domain/sqlite/lib/Makefile diff -u src/external/public-domain/sqlite/lib/Makefile:1.10 src/external/public-domain/sqlite/lib/Makefile:1.11 --- src/external/public-domain/sqlite/lib/Makefile:1.10 Mon Nov 11 22:45:26 2019 +++ src/external/public-domain/sqlite/lib/Makefile Thu Oct 29 16:35:33 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2019/11/11 22:45:26 joerg Exp $ +# $NetBSD: Makefile,v 1.11 2020/10/29 16:35:33 nia Exp $ LIB= sqlite3 INCS= sqlite3.h sqlite3ext.h @@ -8,6 +8,9 @@ SRCS= sqlite3.c CFLAGS+= -DNDEBUG +LDADD+= -lm +DPADD+= ${LIBM} + FILES+= sqlite3.pc FILESOWN_sqlite3.pc= ${BINOWN} FILESGRP_sqlite3.pc= ${BINGRP} Index: src/external/public-domain/sqlite/lib/sqlite3.pc.in diff -u src/external/public-domain/sqlite/lib/sqlite3.pc.in:1.1 src/external/public-domain/sqlite/lib/sqlite3.pc.in:1.2 --- src/external/public-domain/sqlite/lib/sqlite3.pc.in:1.1 Mon Feb 17 20:08:53 2014 +++ src/external/public-domain/sqlite/lib/sqlite3.pc.in Thu Oct 29 16:35:33 2020 @@ -2,3 +2,4 @@ Name: SQLite Description: SQL database engine Version: @VERSION@ Libs: -lsqlite3 +Libs.private: -lm
CVS commit: src/external/public-domain/sqlite
Module Name:src Committed By: nia Date: Thu Oct 29 12:38:06 UTC 2020 Modified Files: src/external/public-domain/sqlite: Makefile.inc Log Message: sqlite3: Turn on extensions that default-on using the configure script Includes json1 and fts5, which are both needed by various things in pkgsrc To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/public-domain/sqlite/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/public-domain/sqlite/Makefile.inc diff -u src/external/public-domain/sqlite/Makefile.inc:1.7 src/external/public-domain/sqlite/Makefile.inc:1.8 --- src/external/public-domain/sqlite/Makefile.inc:1.7 Thu Oct 13 18:11:19 2016 +++ src/external/public-domain/sqlite/Makefile.inc Thu Oct 29 12:38:06 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.7 2016/10/13 18:11:19 martin Exp $ +# $NetBSD: Makefile.inc,v 1.8 2020/10/29 12:38:06 nia Exp $ WARNS= 2 @@ -18,6 +18,10 @@ CPPFLAGS+= \ -DSQLITE_ENABLE_COLUMN_METADATA \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_FTS4 \ + -DSQLITE_ENABLE_FTS5 \ + -DSQLITE_ENABLE_JSON1 \ + -DSQLITE_ENABLE_RTREE \ + -DSQLITE_ENABLE_GEOPOLY \ -DSQLITE_ENABLE_LOAD_EXTENSION \ -DSQLITE_ENABLE_UNLOCK_NOTIFY \ -DSQLITE_HAVE_ISNAN \
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: nia Date: Thu Oct 29 09:08:35 UTC 2020 Modified Files: src/sys/dev/wscons: wsconsio.h Log Message: wscons(4): WSKBD_TYPE_PC_AT is automatically translated to WSKBD_TYPE_PC_XT in modern kernels To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/dev/wscons/wsconsio.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/wscons/wsconsio.h diff -u src/sys/dev/wscons/wsconsio.h:1.123 src/sys/dev/wscons/wsconsio.h:1.124 --- src/sys/dev/wscons/wsconsio.h:1.123 Fri May 24 14:28:48 2019 +++ src/sys/dev/wscons/wsconsio.h Thu Oct 29 09:08:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: wsconsio.h,v 1.123 2019/05/24 14:28:48 nonaka Exp $ */ +/* $NetBSD: wsconsio.h,v 1.124 2020/10/29 09:08:35 nia Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -87,7 +87,7 @@ struct wscons_event { #define WSKBD_TYPE_LK201 1 /* lk-201 */ #define WSKBD_TYPE_LK401 2 /* lk-401 */ #define WSKBD_TYPE_PC_XT 3 /* PC-ish, XT scancode */ -#define WSKBD_TYPE_PC_AT 4 /* PC-ish, AT scancode */ +#define WSKBD_TYPE_PC_AT 4 /* PC-ish, AT scancode, not used by modern kernels */ #define WSKBD_TYPE_USB 5 /* USB, XT scancode */ #define WSKBD_TYPE_NEXT 6 /* NeXT keyboard */ #define WSKBD_TYPE_HPC_KBD 7 /* HPC bultin keyboard */
CVS commit: src/usr.sbin/mopd/mopcopy
Module Name:src Committed By: martin Date: Thu Oct 29 08:50:42 UTC 2020 Modified Files: src/usr.sbin/mopd/mopcopy: mopcopy.c Log Message: Fix obvious copy To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/mopd/mopcopy/mopcopy.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/mopd/mopcopy/mopcopy.c diff -u src/usr.sbin/mopd/mopcopy/mopcopy.c:1.8 src/usr.sbin/mopd/mopcopy/mopcopy.c:1.9 --- src/usr.sbin/mopd/mopcopy/mopcopy.c:1.8 Tue Oct 27 17:16:24 2020 +++ src/usr.sbin/mopd/mopcopy/mopcopy.c Thu Oct 29 08:50:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mopcopy.c,v 1.8 2020/10/27 17:16:24 abs Exp $ */ +/* $NetBSD: mopcopy.c,v 1.9 2020/10/29 08:50:42 martin Exp $ */ /* mopcopy - Convert a Unix format kernel into something that * can be transferred via MOP. @@ -49,7 +49,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: mopcopy.c,v 1.8 2020/10/27 17:16:24 abs Exp $"); +__RCSID("$NetBSD: mopcopy.c,v 1.9 2020/10/29 08:50:42 martin Exp $"); #endif #include "os.h" @@ -72,7 +72,7 @@ __RCSID("$NetBSD: mopcopy.c,v 1.8 2020/1 #define MID_VAX 150 #endif #if !defined(MID_VAX1K) -#define MID_VAX 140 +#define MID_VAX1K 140 #endif #ifndef NOELF
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jdc Date: Thu Oct 29 06:55:51 UTC 2020 Modified Files: src/sys/dev/i2c: files.i2c Added Files: src/sys/dev/i2c: pcf8574.c Log Message: Add a driver for the PCF8574 I/O expander, used as a GPIO in some sparc64 hardware. The driver currently handles pins configured as LED or INDICATOR and adds them to the LED and sysmon_envsys subsystems, respectively. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/i2c/files.i2c cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/pcf8574.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/i2c/files.i2c diff -u src/sys/dev/i2c/files.i2c:1.111 src/sys/dev/i2c/files.i2c:1.112 --- src/sys/dev/i2c/files.i2c:1.111 Fri Apr 24 12:38:31 2020 +++ src/sys/dev/i2c/files.i2c Thu Oct 29 06:55:51 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.i2c,v 1.111 2020/04/24 12:38:31 macallan Exp $ +# $NetBSD: files.i2c,v 1.112 2020/10/29 06:55:51 jdc Exp $ obsolete defflag opt_i2cbus.h I2C_SCAN define i2cbus { } @@ -395,3 +395,8 @@ file dev/i2c/cwfg.ccwfg device pcagpio: leds attach pcagpio at iic file dev/i2c/pcagpio.c pcagpio + +# Philips PCF8574 IO expander +device pcf8574io: leds, sysmon_envsys +attach pcf8574io at iic +file dev/i2c/pcf8574.c pcf8574io Added files: Index: src/sys/dev/i2c/pcf8574.c diff -u /dev/null src/sys/dev/i2c/pcf8574.c:1.1 --- /dev/null Thu Oct 29 06:55:51 2020 +++ src/sys/dev/i2c/pcf8574.c Thu Oct 29 06:55:51 2020 @@ -0,0 +1,328 @@ +/*- + * Copyright (c) 2020 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Julian Coleman. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * A driver for Philips Semiconductor (NXP) PCF8574/PCF857A GPIO's. + * Uses device properties to connect pins to the appropriate subsystem. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: pcf8574.c,v 1.1 2020/10/29 06:55:51 jdc Exp $"); + +#include +#include +#include +#include + +#include + +#include +#include + +#ifdef PCF8574_DEBUG +#define DPRINTF printf +#else +#define DPRINTF if (0) printf +#endif + +struct pcf8574_led { + void *cookie; + uint8_t mask, v_on, v_off; +}; + +#define PCF8574_NPINS 8 +struct pcf8574_softc { + device_t sc_dev; + i2c_tag_t sc_tag; + i2c_addr_t sc_addr; + uint8_t sc_state; + uint8_t sc_mask; + + int sc_nleds; + struct pcf8574_led sc_leds[PCF8574_NPINS]; + + struct sysmon_envsys *sc_sme; + envsys_data_t sc_sensor[PCF8574_NPINS]; + int sc_pin_sensor[PCF8574_NPINS]; + int sc_pin_active[PCF8574_NPINS]; + +#ifdef PCF8574_DEBUG + callout_t sc_timer; +#endif +}; + +static int pcf8574_match(device_t, cfdata_t, void *); +static void pcf8574_attach(device_t, device_t, void *); +static int pcf8574_detach(device_t, int); + +static int pcf8574_read(struct pcf8574_softc *sc, uint8_t *val); +static int pcf8574_write(struct pcf8574_softc *sc, uint8_t val); +static void pcf8574_attach_led( + struct pcf8574_softc *, char *, int, int, int); +void pcf8574_refresh(struct sysmon_envsys *, envsys_data_t *); +int pcf8574_get_led(void *); +void pcf8574_set_led(void *, int); + +#ifdef PCF8574_DEBUG +static void pcf8574_timeout(void *); +#endif + +CFATTACH_DECL_NEW(pcf8574io, sizeof(struct pcf8574_softc), + pcf8574_match, pcf8574_attach, pcf8574_detach, NULL); + +static const struct device_compatible_entry compat_data[] = { + { "i2c-pcf8574", 0 }, + { NULL,0 } +}; + +static int +pcf8574_match(device_t parent, cfdata_t cf, void *aux) +{ + struct i2c_attach_args *ia = aux; + int match_result; + + if (iic_use_direct_match(ia, cf,
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jdc Date: Thu Oct 29 06:50:53 UTC 2020 Modified Files: src/sys/dev/i2c: pcagpio.c Log Message: Handle the change in the sparc64 OFW patching, where we now encode the GPIO pin type in the pin name (only LED types are currently handled). To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/pcagpio.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/i2c/pcagpio.c diff -u src/sys/dev/i2c/pcagpio.c:1.4 src/sys/dev/i2c/pcagpio.c:1.5 --- src/sys/dev/i2c/pcagpio.c:1.4 Tue Oct 27 20:13:21 2020 +++ src/sys/dev/i2c/pcagpio.c Thu Oct 29 06:50:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pcagpio.c,v 1.4 2020/10/27 20:13:21 jdc Exp $ */ +/* $NetBSD: pcagpio.c,v 1.5 2020/10/29 06:50:53 jdc Exp $ */ /*- * Copyright (c) 2020 Michael Lorenz @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcagpio.c,v 1.4 2020/10/27 20:13:21 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcagpio.c,v 1.5 2020/10/29 06:50:53 jdc Exp $"); #include #include @@ -184,7 +184,7 @@ pcagpio_attach(device_t parent, device_t if (pins != NULL) { int i, num, def; char name[32]; - const char *nptr; + const char *spptr, *nptr; bool ok = TRUE, act; for (i = 0; i < prop_array_count(pins); i++) { @@ -192,16 +192,22 @@ pcagpio_attach(device_t parent, device_t pin = prop_array_get(pins, i); ok &= prop_dictionary_get_cstring_nocopy(pin, "name", ); - strncpy(name, nptr, 31); ok &= prop_dictionary_get_uint32(pin, "pin", ); - ok &= prop_dictionary_get_bool( - pin, "active_high", ); + ok &= prop_dictionary_get_bool( pin, "active_high", + ); /* optional default state */ def = -1; prop_dictionary_get_int32(pin, "default_state", ); - if (ok) { + if (!ok) +continue; + /* Extract pin type from the name */ + spptr = strstr(nptr, " "); + if (spptr == NULL) +continue; + spptr += 1; + strncpy(name, spptr, 31); + if (!strncmp(nptr, "LED ", 4)) pcagpio_attach_led(sc, name, num, act, def); - } } } }
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: jdc Date: Thu Oct 29 06:47:39 UTC 2020 Modified Files: src/sys/arch/sparc64/sparc64: autoconf.c ofw_patch.c ofw_patch.h Log Message: Add information about GPIO pin assignments and drive bays in the E250 and v240. Consolidate common code for v210/v240 and E250. Modify the GPIO pin names to include a type (currently LED or INDICATOR) which we can then handle in the driver. To generate a diff of this commit: cvs rdiff -u -r1.226 -r1.227 src/sys/arch/sparc64/sparc64/autoconf.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc64/sparc64/ofw_patch.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/sparc64/ofw_patch.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/sparc64/sparc64/autoconf.c diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.226 src/sys/arch/sparc64/sparc64/autoconf.c:1.227 --- src/sys/arch/sparc64/sparc64/autoconf.c:1.226 Fri Oct 23 15:18:10 2020 +++ src/sys/arch/sparc64/sparc64/autoconf.c Thu Oct 29 06:47:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.226 2020/10/23 15:18:10 jdc Exp $ */ +/* $NetBSD: autoconf.c,v 1.227 2020/10/29 06:47:38 jdc Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.226 2020/10/23 15:18:10 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.227 2020/10/29 06:47:38 jdc Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -1089,6 +1089,11 @@ device_register(device_t dev, void *aux) add_gpio_props_v210(dev, aux); } } + if (device_is_a(dev, "pcf8574io")) { + if (!strcmp(machine_model, "SUNW,Ultra-250")) { +add_gpio_props_e250(dev, aux); + } + } } else if (device_is_a(dev, "sd") || device_is_a(dev, "cd")) { struct scsipibus_attach_args *sa = aux; struct scsipi_periph *periph = sa->sa_periph; @@ -1117,9 +1122,7 @@ device_register(device_t dev, void *aux) 0, periph->periph_lun); if (device_is_a(busdev, "scsibus")) { /* see if we're in a known SCA drivebay */ - if (strcmp(machine_model, "SUNW,Sun-Fire-V210") == 0) { -add_drivebay_props_v210(dev, ofnode, aux); - } + add_drivebay_props(dev, ofnode, aux); } return; } else if (device_is_a(dev, "wd")) { Index: src/sys/arch/sparc64/sparc64/ofw_patch.c diff -u src/sys/arch/sparc64/sparc64/ofw_patch.c:1.5 src/sys/arch/sparc64/sparc64/ofw_patch.c:1.6 --- src/sys/arch/sparc64/sparc64/ofw_patch.c:1.5 Sun Oct 25 07:46:53 2020 +++ src/sys/arch/sparc64/sparc64/ofw_patch.c Thu Oct 29 06:47:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_patch.c,v 1.5 2020/10/25 07:46:53 jdc Exp $ */ +/* $NetBSD: ofw_patch.c,v 1.6 2020/10/29 06:47:38 jdc Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: ofw_patch.c,v 1.5 2020/10/25 07:46:53 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw_patch.c,v 1.6 2020/10/29 06:47:38 jdc Exp $"); #include @@ -42,11 +42,10 @@ __KERNEL_RCSID(0, "$NetBSD: ofw_patch.c, #include static void -add_gpio_LED(prop_array_t pins, const char *name, int num, int act, int def) +add_gpio_pin(prop_array_t pins, const char *name, int num, int act, int def) { prop_dictionary_t pin = prop_dictionary_create(); prop_dictionary_set_string(pin, "name", name); - prop_dictionary_set_uint32(pin, "type", 0); /* 0 for LED, for now */ prop_dictionary_set_uint32(pin, "pin", num); prop_dictionary_set_bool(pin, "active_high", act); if (def != -1) @@ -62,7 +61,7 @@ create_i2c_dict(device_t busdev) prop_array_t cfg = NULL; cfg = prop_dictionary_get(props, "i2c-child-devices"); - if (!cfg) { + if (!cfg) { DPRINTF(ACDB_PROBE, ("\nCreating new i2c-child-devices\n")); cfg = prop_array_create(); prop_dictionary_set(props, "i2c-child-devices", cfg); @@ -100,18 +99,89 @@ add_gpio_props_v210(device_t dev, void * switch (ia->ia_addr) { case 0x38: /* front panel LEDs */ pins = prop_array_create(); - add_gpio_LED(pins, "indicator", 7, 0, -1); - add_gpio_LED(pins, "fault", 5, 0, 0); - add_gpio_LED(pins, "power", 4, 0, 1); + add_gpio_pin(pins, "LED indicator", 7, 0, -1); + add_gpio_pin(pins, "LED fault", 5, 0, 0); + add_gpio_pin(pins, "LED power", 4, 0, 1); prop_dictionary_set(dict, "pins", pins); prop_object_release(pins); break; - case 0x23: /* drive bay LEDs */ + case 0x23: /* drive bay O/1 LEDs */ pins = prop_array_create(); - add_gpio_LED(pins, "bay0_fault", 10, 0, 0); - add_gpio_LED(pins, "bay1_fault", 11, 0, 0); - add_gpio_LED(pins, "bay0_remove", 12, 0, 0); - add_gpio_LED(pins, "bay1_remove", 13, 0, 0); + add_gpio_pin(pins, "LED bay0_fault", 10, 0, 0); + add_gpio_pin(pins, "LED bay1_fault", 11, 0, 0); + add_gpio_pin(pins, "LED bay0_remove", 12, 0, 0); + add_gpio_pin(pins, "LED bay1_remove", 13, 0, 0); + prop_dictionary_set(dict, "pins", pins); +