CVS commit: src
Module Name:src Committed By: mrg Date: Wed Jul 31 09:13:17 UTC 2019 Modified Files: src/distrib/sets/lists/modules: mi src/sys/dev/usb: files.usb if_axen.c if_axenreg.h if_cdce.c src/sys/modules: Makefile Added Files: src/sys/dev/usb: usbnet.c usbnet.h src/sys/modules/usbnet: Makefile Log Message: introduce a library of common code / backends to share code between USB ethernet drivers. usbnet.h introduces a new set of APIs to provide common solutions for these driver features: - USB endpoint pipe handling - rx and tx chain handling - generic handlers or support for several struct ifnet callbacks - MII bus locking - interrupt handling - partial autoconf handling: much of attach, and detach/activate can use common versions directly. currently, only axen(4) and cdce(4) are converted. the reductions in these drivers are quite significant: if_cdce.c is reduced from 1000 lines to 320 lines, and if_axen is reduced from 1902 lines to 1021 lines. add a "usbnet" module and make the if_axen module depend upon it. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.156 -r1.157 src/sys/dev/usb/files.usb cvs rdiff -u -r1.50 -r1.51 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_axenreg.h cvs rdiff -u -r1.53 -r1.54 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/usbnet.c src/sys/dev/usb/usbnet.h cvs rdiff -u -r1.222 -r1.223 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/usbnet/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: mrg Date: Wed Jul 31 09:13:17 UTC 2019 Modified Files: src/distrib/sets/lists/modules: mi src/sys/dev/usb: files.usb if_axen.c if_axenreg.h if_cdce.c src/sys/modules: Makefile Added Files: src/sys/dev/usb: usbnet.c usbnet.h src/sys/modules/usbnet: Makefile Log Message: introduce a library of common code / backends to share code between USB ethernet drivers. usbnet.h introduces a new set of APIs to provide common solutions for these driver features: - USB endpoint pipe handling - rx and tx chain handling - generic handlers or support for several struct ifnet callbacks - MII bus locking - interrupt handling - partial autoconf handling: much of attach, and detach/activate can use common versions directly. currently, only axen(4) and cdce(4) are converted. the reductions in these drivers are quite significant: if_cdce.c is reduced from 1000 lines to 320 lines, and if_axen is reduced from 1902 lines to 1021 lines. add a "usbnet" module and make the if_axen module depend upon it. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.156 -r1.157 src/sys/dev/usb/files.usb cvs rdiff -u -r1.50 -r1.51 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_axenreg.h cvs rdiff -u -r1.53 -r1.54 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/usbnet.c src/sys/dev/usb/usbnet.h cvs rdiff -u -r1.222 -r1.223 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/usbnet/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/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.122 src/distrib/sets/lists/modules/mi:1.123 --- src/distrib/sets/lists/modules/mi:1.122 Thu Jun 20 03:31:55 2019 +++ src/distrib/sets/lists/modules/mi Wed Jul 31 09:13:16 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.122 2019/06/20 03:31:55 pgoyette Exp $ +# $NetBSD: mi,v 1.123 2019/07/31 09:13:16 mrg Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -440,6 +440,8 @@ ./@MODULEDIR@/umap/umap.kmod base-kernel-modules kmod ./@MODULEDIR@/unionbase-kernel-modules kmod ./@MODULEDIR@/union/union.kmod base-kernel-modules kmod +./@MODULEDIR@/usbnetbase-kernel-modules kmod +./@MODULEDIR@/usbnet/usbnet.kmod base-kernel-modules kmod ./@MODULEDIR@/usbverbose base-kernel-modules kmod ./@MODULEDIR@/usbverbose/usbverbose.kmod base-kernel-modules kmod ./@MODULEDIR@/v7fsbase-kernel-modules kmod Index: src/sys/dev/usb/files.usb diff -u src/sys/dev/usb/files.usb:1.156 src/sys/dev/usb/files.usb:1.157 --- src/sys/dev/usb/files.usb:1.156 Wed May 8 13:40:19 2019 +++ src/sys/dev/usb/files.usb Wed Jul 31 09:13:16 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.156 2019/05/08 13:40:19 isaki Exp $ +# $NetBSD: files.usb,v 1.157 2019/07/31 09:13:16 mrg Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -103,6 +103,9 @@ file dev/usb/usb_quirks.c usb define usb_dma: usb file dev/usb/usb_mem.c usb_dma needs-flag +define usbnet: usb +file dev/usb/usbnet.c usbnet + file dev/usb/usb_verbose.c usbverbose & usb # Hub driver @@ -365,7 +368,7 @@ attach axe at usbdevif file dev/usb/if_axe.c axe # ASIX AX88178a and AX88179 -device axen: arp, ether, ifnet, mii +device axen: arp, ether, ifnet, mii, usbnet attach axen at usbdevif file dev/usb/if_axen.c axen Index: src/sys/dev/usb/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.50 src/sys/dev/usb/if_axen.c:1.51 --- src/sys/dev/usb/if_axen.c:1.50 Mon Jul 15 03:14:22 2019 +++ src/sys/dev/usb/if_axen.c Wed Jul 31 09:13:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.50 2019/07/15 03:14:22 mrg Exp $ */ +/* $NetBSD: if_axen.c,v 1.51 2019/07/31 09:13:16 mrg Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,43 +23,19 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.50 2019/07/15 03:14:22 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.51 2019/07/31 09:13:16 mrg Exp $"); #ifdef _KERNEL_OPT -#include "opt_inet.h" #include "opt_usb.h" #endif #include -#include -#include -#include -#include #include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include #include /* XXX for netinet/ip.h */ #include /* XXX for IP_MAXPACKET */ -#include -#include - -#include -#include -#include -#include -#include +#include #include @@ -72,70 +48,13 @@ int axendebug = 0; #define DPRINTFN(n, x) #endif -struct axen_softc; - -struct axen_chain { - struct axen_softc *axen_sc; - struct usbd_xfer *axen_xfer; - uint8_t *axen_buf; -}; - -struct axen_cdata { - struct axen_chain axen_tx_chain[AXEN_TX_LIST_CNT]; - struct axen_chain axen_rx_
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Jul 31 10:19:55 UTC 2019 Modified Files: src/sys/dev/usb: files.usb Log Message: Make cdce depend on usbnet too To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/dev/usb/files.usb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Jul 31 10:19:55 UTC 2019 Modified Files: src/sys/dev/usb: files.usb Log Message: Make cdce depend on usbnet too To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/dev/usb/files.usb 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/files.usb diff -u src/sys/dev/usb/files.usb:1.157 src/sys/dev/usb/files.usb:1.158 --- src/sys/dev/usb/files.usb:1.157 Wed Jul 31 09:13:16 2019 +++ src/sys/dev/usb/files.usb Wed Jul 31 10:19:55 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.157 2019/07/31 09:13:16 mrg Exp $ +# $NetBSD: files.usb,v 1.158 2019/07/31 10:19:55 martin Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -338,7 +338,7 @@ attach aue at usbdevif file dev/usb/if_aue.c aue # CDC Ethernet -device cdce: arp, ether, ifnet +device cdce: arp, ether, ifnet, usbnet attach cdce at usbifif file dev/usb/if_cdce.c cdce
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Wed Jul 31 11:02:49 UTC 2019 Modified Files: src/sys/dev/usb: TODO.usbmp Log Message: if_axe.c has been updated for modern times. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/TODO.usbmp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Wed Jul 31 11:02:49 UTC 2019 Modified Files: src/sys/dev/usb: TODO.usbmp Log Message: if_axe.c has been updated for modern times. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/TODO.usbmp 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/TODO.usbmp diff -u src/sys/dev/usb/TODO.usbmp:1.13 src/sys/dev/usb/TODO.usbmp:1.14 --- src/sys/dev/usb/TODO.usbmp:1.13 Sun Jun 30 22:19:55 2019 +++ src/sys/dev/usb/TODO.usbmp Wed Jul 31 11:02:49 2019 @@ -1,4 +1,4 @@ -$NetBSD: TODO.usbmp,v 1.13 2019/06/30 22:19:55 mrg Exp $ +$NetBSD: TODO.usbmp,v 1.14 2019/07/31 11:02:49 mrg Exp $ the majority of the USB MP device interface is documented in usbdivar.h. @@ -66,7 +66,6 @@ splusb drivers: - emdtv_dtv.c - if_athn_usb.c - if_aue.c - - if_axe.c - if_cue.c - if_kue.c - if_otus.c @@ -115,7 +114,6 @@ missing D_MPSAFE drivers: missing CALLOUT_MPSAFE drivers: - if_aue.c - - if_axe.c - if_cue.c - if_otus.c - if_rum.c
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: rin Date: Wed Jul 31 14:29:54 UTC 2019 Modified Files: src/sys/dev/wscons: wsdisplay_vcons.c Log Message: When font is switched, not only putchar, but also other ri_ops can be changed by backend driver, e.g., see rasops1.c: https://nxr.netbsd.org/xref/src/sys/dev/rasops/rasops1.c#58 To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/wscons/wsdisplay_vcons.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: rin Date: Wed Jul 31 14:29:54 UTC 2019 Modified Files: src/sys/dev/wscons: wsdisplay_vcons.c Log Message: When font is switched, not only putchar, but also other ri_ops can be changed by backend driver, e.g., see rasops1.c: https://nxr.netbsd.org/xref/src/sys/dev/rasops/rasops1.c#58 To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/wscons/wsdisplay_vcons.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/wscons/wsdisplay_vcons.c diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.39 src/sys/dev/wscons/wsdisplay_vcons.c:1.40 --- src/sys/dev/wscons/wsdisplay_vcons.c:1.39 Sat Dec 1 00:28:45 2018 +++ src/sys/dev/wscons/wsdisplay_vcons.c Wed Jul 31 14:29:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_vcons.c,v 1.39 2018/12/01 00:28:45 msaitoh Exp $ */ +/* $NetBSD: wsdisplay_vcons.c,v 1.40 2019/07/31 14:29:54 rin Exp $ */ /*- * Copyright (c) 2005, 2006 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.39 2018/12/01 00:28:45 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.40 2019/07/31 14:29:54 rin Exp $"); #include #include @@ -430,8 +430,23 @@ vcons_load_font(void *v, void *cookie, s /* allocate new buffers */ vcons_alloc_buffers(vd, scr); - /* save the potentially changed putchar */ + /* save the potentially changed ri_ops */ + vd->eraserows = ri->ri_ops.eraserows; + vd->erasecols = ri->ri_ops.erasecols; scr->putchar = ri->ri_ops.putchar; + vd->cursor= ri->ri_ops.cursor; + + if (scr->scr_flags & VCONS_NO_COPYCOLS) { + vd->copycols = vcons_copycols_noread; + } else { + vd->copycols = ri->ri_ops.copycols; + } + + if (scr->scr_flags & VCONS_NO_COPYROWS) { + vd->copyrows = vcons_copyrows_noread; + } else { + vd->copyrows = ri->ri_ops.copyrows; + } /* and put our wrappers back */ ri->ri_ops.eraserows = vcons_eraserows;
CVS commit: src/sys/sys
Module Name:src Committed By: rin Date: Wed Jul 31 14:35:25 UTC 2019 Modified Files: src/sys/sys: param.h Log Message: Bump for recent changes to struct rasops_info. Welcome to NetBSD 9.99.2! To generate a diff of this commit: cvs rdiff -u -r1.600 -r1.601 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: rin Date: Wed Jul 31 14:35:25 UTC 2019 Modified Files: src/sys/sys: param.h Log Message: Bump for recent changes to struct rasops_info. Welcome to NetBSD 9.99.2! To generate a diff of this commit: cvs rdiff -u -r1.600 -r1.601 src/sys/sys/param.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/sys/param.h diff -u src/sys/sys/param.h:1.600 src/sys/sys/param.h:1.601 --- src/sys/sys/param.h:1.600 Tue Jul 30 15:56:53 2019 +++ src/sys/sys/param.h Wed Jul 31 14:35:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.600 2019/07/30 15:56:53 martin Exp $ */ +/* $NetBSD: param.h,v 1.601 2019/07/31 14:35:25 rin Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 999000100 /* NetBSD 9.99.1 */ +#define __NetBSD_Version__ 999000200 /* NetBSD 9.99.2 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: alnsn Date: Wed Jul 31 15:02:39 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.8 veriexecgen.c Log Message: Add an option to read entries from a file. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/veriexecgen/veriexecgen.8 cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/veriexecgen/veriexecgen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: alnsn Date: Wed Jul 31 15:02:39 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.8 veriexecgen.c Log Message: Add an option to read entries from a file. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/veriexecgen/veriexecgen.8 cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/veriexecgen/veriexecgen.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/veriexecgen/veriexecgen.8 diff -u src/usr.sbin/veriexecgen/veriexecgen.8:1.20 src/usr.sbin/veriexecgen/veriexecgen.8:1.21 --- src/usr.sbin/veriexecgen/veriexecgen.8:1.20 Tue Jan 8 01:31:49 2019 +++ src/usr.sbin/veriexecgen/veriexecgen.8 Wed Jul 31 15:02:39 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: veriexecgen.8,v 1.20 2019/01/08 01:31:49 gutteridge Exp $ +.\" $NetBSD: veriexecgen.8,v 1.21 2019/07/31 15:02:39 alnsn Exp $ .\" .\" Copyright (c) 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 8, 2019 +.Dd July 31, 2019 .Dt VERIEXECGEN 8 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm .Op Fl AaDrSTvW .Op Fl d Pa dir +.Op Fl f Pa file .Op Fl o Pa fingerprintdb .Op Fl p Pa prefix .Op Fl t Ar algorithm @@ -81,6 +82,13 @@ Scan for files in Multiple uses of this flag can specify more than one directory. .\" .It Fl F .\" Try to guess the correct flags for every file. +.It Fl f Ar file +Read files from +.Ar file, +or if +.Ar file +is "-" read from +.Ar stdin. .It Fl h Display the help screen. .It Fl o Ar fingerprintdb Index: src/usr.sbin/veriexecgen/veriexecgen.c diff -u src/usr.sbin/veriexecgen/veriexecgen.c:1.19 src/usr.sbin/veriexecgen/veriexecgen.c:1.20 --- src/usr.sbin/veriexecgen/veriexecgen.c:1.19 Tue Apr 23 22:35:42 2019 +++ src/usr.sbin/veriexecgen/veriexecgen.c Wed Jul 31 15:02:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: veriexecgen.c,v 1.19 2019/04/23 22:35:42 sevan Exp $ */ +/* $NetBSD: veriexecgen.c,v 1.20 2019/07/31 15:02:39 alnsn Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #ifndef lint #ifdef __RCSID -__RCSID("$NetBSD: veriexecgen.c,v 1.19 2019/04/23 22:35:42 sevan Exp $"); +__RCSID("$NetBSD: veriexecgen.c,v 1.20 2019/07/31 15:02:39 alnsn Exp $"); #endif #endif /* not lint */ @@ -84,6 +84,8 @@ typedef struct veriexecgen_t { int scan_system_dirs; /* just scan system directories */ int verbose; /* verbosity level */ int stamp; /* put a timestamp */ + FILE *from_file; /* read from a file or stdin */ + char *from_filename; } veriexecgen_t; /* this struct describes a directory entry to generate a hash for */ @@ -123,7 +125,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: %s [-AaDrSTvW] [-d dir] [-o fingerprintdb] [-p prefix]\n" + "usage: %s [-AaDrSTvW] [-d dir] [-f file] [-o fingerprintdb] [-p prefix]\n" "\t\t[-t algorithm]\n" "\t%s [-h]\n", getprogname(), getprogname()); } @@ -136,8 +138,15 @@ banner(veriexecgen_t *vp, hash_t *hash_t (void)printf("Fingerprinting "); - for (j = 0; search_path[j] != NULL; j++) - (void)printf("%s ", search_path[j]); + if (search_path) { + for (j = 0; search_path[j] != NULL; j++) + (void)printf("%s ", search_path[j]); + } else if (vp->from_file == stdin) { + (void)printf("files from stdin "); + } else { + (void)printf("files from %s ", + vp->from_filename ? vp->from_filename : "???"); + } (void)printf("(%s) (%s) using %s\n", vp->all_files ? "all files" : "executables only", @@ -194,7 +203,41 @@ check_dup(char *filename) /* add a new entry to the list for `file' */ static void -add_new_entry(veriexecgen_t *vp, FTSENT *file, hash_t *hash) +add_new_path_entry(veriexecgen_t *vp, const char *file, hash_t *hash) +{ + struct stat sb; + struct fentry *e; + + if (stat(file, &sb) == -1) { + gripe(vp, "Cannot stat file `%s'", file); + return; + } + + if (!vp->all_files && !IS_EXEC(sb.st_mode)) + return; + + e = ecalloc(1UL, sizeof(*e)); + + if (realpath(file, e->filename) == NULL) { + gripe(vp, "Cannot find absolute path `%s'", file); + return; + } + if (check_dup(e->filename)) { + free(e); + return; + } + if ((e->hash_val = do_hash(e->filename, hash)) == NULL) { + gripe(vp, "Cannot calculate hash `%s'", e->filename); + return; + } + e->flags = figure_flags(e->filename, sb.st_mode); + + TAILQ_INSERT_TAIL(&fehead, e, f); +} + +/* add a new entry to the list for `file' */ +static void +add_new_ftsent_entry(veriexecgen_t *vp, FTSENT *file, hash_t *hash) { struct fentry *e; struct stat sb; @@ -263,13 +306,33 @@ walk_dir(veriexecgen_t *vp, char **searc strerror(file->fts_errno)); } } else { - add_new_entry(vp, file, hash); + add_new_ftsent_entry(vp, file, hash); } } fts_close(fh); } +/* read files from `file' */ +static void +read_fro
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jul 31 16:08:23 UTC 2019 Modified Files: src/sys/dev/pci: if_et.c Log Message: Add missing ifioctl_common() for SIOCSIFFLAGS to make if_flags controllable. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/if_et.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jul 31 16:08:23 UTC 2019 Modified Files: src/sys/dev/pci: if_et.c Log Message: Add missing ifioctl_common() for SIOCSIFFLAGS to make if_flags controllable. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/if_et.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/if_et.c diff -u src/sys/dev/pci/if_et.c:1.24 src/sys/dev/pci/if_et.c:1.25 --- src/sys/dev/pci/if_et.c:1.24 Tue May 28 07:41:49 2019 +++ src/sys/dev/pci/if_et.c Wed Jul 31 16:08:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_et.c,v 1.24 2019/05/28 07:41:49 msaitoh Exp $ */ +/* $NetBSD: if_et.c,v 1.25 2019/07/31 16:08:23 msaitoh Exp $ */ /* $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.24 2019/05/28 07:41:49 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.25 2019/07/31 16:08:23 msaitoh Exp $"); #include "opt_inet.h" #include "vlan.h" @@ -1038,6 +1038,8 @@ et_ioctl(struct ifnet *ifp, u_long cmd, switch (cmd) { case SIOCSIFFLAGS: + if ((error = ifioctl_common(ifp, cmd, data)) != 0) + break; if (ifp->if_flags & IFF_UP) { /* * If only the PROMISC or ALLMULTI flag changes, then
CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3
Module Name:src Committed By: christos Date: Wed Jul 31 16:39:02 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/libstdc++-v3: acinclude.m4 Log Message: Use the dragonfly locale code for NetBSD too. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3
Module Name:src Committed By: christos Date: Wed Jul 31 16:39:02 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/libstdc++-v3: acinclude.m4 Log Message: Use the dragonfly locale code for NetBSD too. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4 diff -u src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4:1.6 src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4:1.7 --- src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4:1.6 Sat Jan 19 07:10:12 2019 +++ src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4 Wed Jul 31 12:39:02 2019 @@ -2416,7 +2416,7 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ darwin*) enable_clocale_flag=darwin ;; - dragonfly* | freebsd*) + dragonfly* | freebsd* | netbsd*) enable_clocale_flag=dragonfly ;; openbsd*) @@ -2512,7 +2512,7 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ ;; dragonfly) - AC_MSG_RESULT(dragonfly or freebsd) + AC_MSG_RESULT(dragonfly or freebsd or netbsd) CLOCALE_H=config/locale/dragonfly/c_locale.h CLOCALE_CC=config/locale/dragonfly/c_locale.cc
CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3
Module Name:src Committed By: christos Date: Wed Jul 31 16:40:26 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/libstdc++-v3: configure Log Message: Manually patch the locale configuration to use the dragonfly code instead of generic. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/libstdc++-v3/configure Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libstdc++-v3/configure diff -u src/external/gpl3/gcc/dist/libstdc++-v3/configure:1.11 src/external/gpl3/gcc/dist/libstdc++-v3/configure:1.12 --- src/external/gpl3/gcc/dist/libstdc++-v3/configure:1.11 Sat Jan 19 07:10:12 2019 +++ src/external/gpl3/gcc/dist/libstdc++-v3/configure Wed Jul 31 12:40:25 2019 @@ -15848,7 +15848,7 @@ fi darwin*) enable_clocale_flag=darwin ;; - dragonfly* | freebsd*) + dragonfly* | freebsd* | netbsd*) enable_clocale_flag=dragonfly ;; openbsd*) @@ -15997,8 +15997,8 @@ $as_echo "darwin" >&6; } ;; dragonfly) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: dragonfly or freebsd" >&5 -$as_echo "dragonfly or freebsd" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dragonfly or freebsd or netbsd" >&5 +$as_echo "dragonfly or freebsd or netbsd" >&6; } CLOCALE_H=config/locale/dragonfly/c_locale.h CLOCALE_CC=config/locale/dragonfly/c_locale.cc
CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3
Module Name:src Committed By: christos Date: Wed Jul 31 16:40:26 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/libstdc++-v3: configure Log Message: Manually patch the locale configuration to use the dragonfly code instead of generic. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/libstdc++-v3/configure Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: martin Date: Wed Jul 31 18:35:58 UTC 2019 Modified Files: src/etc: Makefile Log Message: PR kern/53590: remove -U DEBUG from config(1) invocation (that is: revert r1.413). DTrace needs the full symbol information. To generate a diff of this commit: cvs rdiff -u -r1.438 -r1.439 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: martin Date: Wed Jul 31 18:35:58 UTC 2019 Modified Files: src/etc: Makefile Log Message: PR kern/53590: remove -U DEBUG from config(1) invocation (that is: revert r1.413). DTrace needs the full symbol information. To generate a diff of this commit: cvs rdiff -u -r1.438 -r1.439 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.438 src/etc/Makefile:1.439 --- src/etc/Makefile:1.438 Sat Jan 12 17:25:09 2019 +++ src/etc/Makefile Wed Jul 31 18:35:58 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.438 2019/01/12 17:25:09 roy Exp $ +# $NetBSD: Makefile,v 1.439 2019/07/31 18:35:58 martin Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -590,7 +590,7 @@ build_kernels: .PHONY build_kernels: kern-${configfile} kern-${configfile}: .PHONY .MAKE cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \ - -U DEBUG -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} + -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} .if ${MKUPDATE} == "no" ${MAKE} -C ${KERNOBJDIR}/${configfile:C/.*\///} distclean .endif
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maxv Date: Wed Jul 31 19:40:59 UTC 2019 Modified Files: src/sys/dev/usb: usb_subr.c usbdi_util.c Log Message: 1) Make sure we have a complete endpoint descriptor header, otherwise small overflow. 2) Make sure the total length of the bos descriptor did not change in the meantime, otherwise severe memory corruption. 3) Make sure we have a complete hid descriptor header, otherwise small overflow. 4) Error out if the report descriptor is zero-sized, otherwise panic. ok skrll@ mrg@ To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/sys/dev/usb/usb_subr.c cvs rdiff -u -r1.73 -r1.74 src/sys/dev/usb/usbdi_util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maxv Date: Wed Jul 31 19:40:59 UTC 2019 Modified Files: src/sys/dev/usb: usb_subr.c usbdi_util.c Log Message: 1) Make sure we have a complete endpoint descriptor header, otherwise small overflow. 2) Make sure the total length of the bos descriptor did not change in the meantime, otherwise severe memory corruption. 3) Make sure we have a complete hid descriptor header, otherwise small overflow. 4) Error out if the report descriptor is zero-sized, otherwise panic. ok skrll@ mrg@ To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/sys/dev/usb/usb_subr.c cvs rdiff -u -r1.73 -r1.74 src/sys/dev/usb/usbdi_util.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/usb_subr.c diff -u src/sys/dev/usb/usb_subr.c:1.235 src/sys/dev/usb/usb_subr.c:1.236 --- src/sys/dev/usb/usb_subr.c:1.235 Tue Jul 23 17:21:33 2019 +++ src/sys/dev/usb/usb_subr.c Wed Jul 31 19:40:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.235 2019/07/23 17:21:33 maxv Exp $ */ +/* $NetBSD: usb_subr.c,v 1.236 2019/07/31 19:40:59 maxv Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.235 2019/07/23 17:21:33 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.236 2019/07/31 19:40:59 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -452,7 +452,8 @@ usbd_fill_iface_data(struct usbd_device DPRINTFN(10, "p=%#jx end=%#jx len=%jd type=%jd", (uintptr_t)p, (uintptr_t)end, ed->bLength, ed->bDescriptorType); - if (p + ed->bLength <= end && ed->bLength != 0 && + if (p + ed->bLength <= end && + ed->bLength >= USB_ENDPOINT_DESCRIPTOR_SIZE && ed->bDescriptorType == UDESC_ENDPOINT) goto found; if (ed->bLength == 0 || @@ -659,7 +660,8 @@ usbd_set_config_index(struct usbd_device break; usbd_delay_ms(dev, 200); } - if (err || bdp->bDescriptorType != UDESC_BOS) { + if (err || bdp->bDescriptorType != UDESC_BOS || + UGETW(bdp->wTotalLength) != UGETW(bd.wTotalLength)) { DPRINTF("error %jd or bad desc %jd", err, bdp->bDescriptorType, 0, 0); kmem_free(bdp, blen); Index: src/sys/dev/usb/usbdi_util.c diff -u src/sys/dev/usb/usbdi_util.c:1.73 src/sys/dev/usb/usbdi_util.c:1.74 --- src/sys/dev/usb/usbdi_util.c:1.73 Thu Feb 7 13:20:41 2019 +++ src/sys/dev/usb/usbdi_util.c Wed Jul 31 19:40:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.c,v 1.73 2019/02/07 13:20:41 skrll Exp $ */ +/* $NetBSD: usbdi_util.c,v 1.74 2019/07/31 19:40:59 maxv Exp $ */ /* * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.73 2019/02/07 13:20:41 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.74 2019/07/31 19:40:59 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -470,7 +470,9 @@ usbd_get_hid_descriptor(struct usbd_inte for (; p < end; p += hd->bLength) { hd = (usb_hid_descriptor_t *)p; - if (p + hd->bLength <= end && hd->bDescriptorType == UDESC_HID) + if (p + hd->bLength <= end && + hd->bLength >= USB_HID_DESCRIPTOR_SIZE(0) && + hd->bDescriptorType == UDESC_HID) return hd; if (hd->bDescriptorType == UDESC_INTERFACE) break; @@ -494,6 +496,8 @@ usbd_read_report_desc(struct usbd_interf if (hid == NULL) return USBD_IOERROR; *sizep = UGETW(hid->descrs[0].wDescriptorLength); + if (*sizep == 0) + return USBD_INVAL; *descp = kmem_alloc(*sizep, KM_SLEEP); err = usbd_get_report_descriptor(dev, id->bInterfaceNumber, *sizep, *descp);
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: wiz Date: Wed Jul 31 21:50:26 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.8 Log Message: Fix punctuation formatting nits. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/veriexecgen/veriexecgen.8 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/veriexecgen/veriexecgen.8 diff -u src/usr.sbin/veriexecgen/veriexecgen.8:1.21 src/usr.sbin/veriexecgen/veriexecgen.8:1.22 --- src/usr.sbin/veriexecgen/veriexecgen.8:1.21 Wed Jul 31 15:02:39 2019 +++ src/usr.sbin/veriexecgen/veriexecgen.8 Wed Jul 31 21:50:25 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: veriexecgen.8,v 1.21 2019/07/31 15:02:39 alnsn Exp $ +.\" $NetBSD: veriexecgen.8,v 1.22 2019/07/31 21:50:25 wiz Exp $ .\" .\" Copyright (c) 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -84,11 +84,11 @@ Multiple uses of this flag can specify m .\" Try to guess the correct flags for every file. .It Fl f Ar file Read files from -.Ar file, +.Ar file , or if .Ar file is "-" read from -.Ar stdin. +.Ar stdin . .It Fl h Display the help screen. .It Fl o Ar fingerprintdb
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: wiz Date: Wed Jul 31 21:50:26 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.8 Log Message: Fix punctuation formatting nits. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/veriexecgen/veriexecgen.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Wed Jul 31 23:47:16 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c if_cdce.c usbnet.c usbnet.h Log Message: couple of minor API updates: - change the read/write register callbacks to have the same phy/reg order as the MII code. - add "mii_flags" param to usbnet_attach_ifp(). axe(4) wants it. also: - add usbnet debug code, sysctl node support - remove commented DPRINTF()s accidentally left in place - add usbnet_softc() - reorder some attach code to be consistent - re-add USBD_FORCE_SHORT_XFER for axen rx chain ride 9.99.2 bump. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.54 -r1.55 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/usbnet.c src/sys/dev/usb/usbnet.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/usb/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.51 src/sys/dev/usb/if_axen.c:1.52 --- src/sys/dev/usb/if_axen.c:1.51 Wed Jul 31 09:13:16 2019 +++ src/sys/dev/usb/if_axen.c Wed Jul 31 23:47:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.51 2019/07/31 09:13:16 mrg Exp $ */ +/* $NetBSD: if_axen.c,v 1.52 2019/07/31 23:47:16 mrg Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.51 2019/07/31 09:13:16 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.52 2019/07/31 23:47:16 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -127,9 +127,9 @@ axen_cmd(struct axen_softc *sc, int cmd, } static usbd_status -axen_mii_read_reg(struct usbnet *un, int reg, int phy, uint16_t *val) +axen_mii_read_reg(struct usbnet *un, int phy, int reg, uint16_t *val) { - struct axen_softc * const sc = un->un_sc; + struct axen_softc * const sc = usbnet_softc(un); uint16_t data; usbd_status err = axen_cmd(sc, AXEN_CMD_MII_READ_REG, reg, phy, &data); @@ -144,9 +144,9 @@ axen_mii_read_reg(struct usbnet *un, int } static usbd_status -axen_mii_write_reg(struct usbnet *un, int reg, int phy, uint16_t val) +axen_mii_write_reg(struct usbnet *un, int phy, int reg, uint16_t val) { - struct axen_softc * const sc = un->un_sc; + struct axen_softc * const sc = usbnet_softc(un); uint16_t uval = htole16(val); return axen_cmd(sc, AXEN_CMD_MII_WRITE_REG, reg, phy, &uval); @@ -156,7 +156,7 @@ static void axen_miibus_statchg(struct ifnet *ifp) { struct usbnet * const un = ifp->if_softc; - struct axen_softc * const sc = un->un_sc; + struct axen_softc * const sc = usbnet_softc(un); struct mii_data * const mii = usbnet_mii(un); int err; uint16_t val; @@ -215,7 +215,7 @@ axen_miibus_statchg(struct ifnet *ifp) static void axen_setiff_locked(struct usbnet *un) { - struct axen_softc * const sc = un->un_sc; + struct axen_softc * const sc = usbnet_softc(un); struct ifnet * const ifp = usbnet_ifp(un); struct ethercom *ec = &un->un_ec; struct ether_multi *enm; @@ -519,7 +519,7 @@ axen_ax88179_init(struct axen_softc *sc) static void axen_setoe_locked(struct usbnet *un) { - struct axen_softc * const sc = un->un_sc; + struct axen_softc * const sc = usbnet_softc(un); struct ifnet * const ifp = usbnet_ifp(un); uint64_t enabled = ifp->if_capenable; uint8_t val; @@ -612,6 +612,9 @@ axen_attach(device_t parent, device_t se aprint_naive("\n"); aprint_normal("\n"); + devinfop = usbd_devinfo_alloc(dev, 0); + aprint_normal_dev(self, "%s\n", devinfop); + usbd_devinfo_free(devinfop); un->un_dev = self; un->un_udev = dev; @@ -626,10 +629,6 @@ axen_attach(device_t parent, device_t se un->un_init_cb = axen_init; un->un_rx_xfer_flags = USBD_SHORT_XFER_OK; un->un_tx_xfer_flags = USBD_FORCE_SHORT_XFER; - - devinfop = usbd_devinfo_alloc(dev, 0); - aprint_normal_dev(self, "%s\n", devinfop); - usbd_devinfo_free(devinfop); err = usbd_set_config_no(dev, AXEN_CONFIG_NO, 1); if (err) { @@ -724,7 +723,7 @@ axen_attach(device_t parent, device_t se IFCAP_CSUM_UDPv6_Rx | IFCAP_CSUM_UDPv6_Tx; usbnet_attach_ifp(un, true, IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST, - 0); + 0, 0); } static int @@ -916,7 +915,7 @@ static int axen_init_locked(struct ifnet *ifp) { struct usbnet * const un = ifp->if_softc; - struct axen_softc * const sc = un->un_sc; + struct axen_softc * const sc = usbnet_softc(un); uint16_t rxmode; uint16_t wval; uint8_t bval; @@ -953,7 +952,7 @@ axen_init_locked(struct ifnet *ifp) usbnet_unlock_mii_un_locked(un); - return usbnet_init_rx_tx(un, 0, 0); + return usbnet_init_rx_tx(un, 0, USBD_FORCE_SHORT_XFER); } static int @@ -968,15 +967,11 @@ axen_init(struct ifnet *ifp) return ret; } -/* - * Stop the adapter and free any mbufs allocated to the - * RX and TX lists. - */ static void axen_stop_cb(struct ifnet *ifp, int disable) { struct usbnet * const un = ifp->if_softc; - struct axen_s
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Wed Jul 31 23:47:16 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c if_cdce.c usbnet.c usbnet.h Log Message: couple of minor API updates: - change the read/write register callbacks to have the same phy/reg order as the MII code. - add "mii_flags" param to usbnet_attach_ifp(). axe(4) wants it. also: - add usbnet debug code, sysctl node support - remove commented DPRINTF()s accidentally left in place - add usbnet_softc() - reorder some attach code to be consistent - re-add USBD_FORCE_SHORT_XFER for axen rx chain ride 9.99.2 bump. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.54 -r1.55 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/usbnet.c src/sys/dev/usb/usbnet.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: pgoyette Date: Wed Jul 31 23:53:25 UTC 2019 Modified Files: src/lib/libc/sys: _lwp_park.2 Log Message: Fix a couple of typos To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/sys/_lwp_park.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/_lwp_park.2 diff -u src/lib/libc/sys/_lwp_park.2:1.11 src/lib/libc/sys/_lwp_park.2:1.12 --- src/lib/libc/sys/_lwp_park.2:1.11 Fri Dec 8 09:14:36 2017 +++ src/lib/libc/sys/_lwp_park.2 Wed Jul 31 23:53:25 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: _lwp_park.2,v 1.11 2017/12/08 09:14:36 wiz Exp $ +.\" $NetBSD: _lwp_park.2,v 1.12 2019/07/31 23:53:25 pgoyette Exp $ .\" .\" Copyright (c) 2003, 2007, 2017 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 7, 2017 +.Dd July 30, 2019 .Dt _LWP_PARK 2 .Os .Sh NAME @@ -54,7 +54,7 @@ argument is and the time it specifies has passed. The .Fa ts -time can be an relative interval to wait if the +time can be a relative interval to wait if the .Ar flags argument does not contain .Dv TIMER_ABSTIME @@ -102,7 +102,7 @@ to execute. .Pp The optional .Fa hint -argument specifies the address of object upon which the LWP is +argument specifies the address of an object upon which the LWP is synchronizing. When the .Fa hint
CVS commit: src/lib/libc/sys
Module Name:src Committed By: pgoyette Date: Wed Jul 31 23:53:25 UTC 2019 Modified Files: src/lib/libc/sys: _lwp_park.2 Log Message: Fix a couple of typos To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/sys/_lwp_park.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Thu Aug 1 00:10:22 UTC 2019 Modified Files: src/sys/dev/usb: if_aue.c if_auereg.h if_kue.c if_kuereg.h if_mue.c if_smsc.c if_smscvar.h if_udav.c if_udavreg.h if_url.c if_urndis.c Log Message: remove unused code and use common ethernet media code where equivalent. To generate a diff of this commit: cvs rdiff -u -r1.154 -r1.155 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/if_auereg.h cvs rdiff -u -r1.96 -r1.97 src/sys/dev/usb/if_kue.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/if_kuereg.h cvs rdiff -u -r1.50 -r1.51 src/sys/dev/usb/if_mue.c cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/if_smsc.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/if_smscvar.h cvs rdiff -u -r1.59 -r1.60 src/sys/dev/usb/if_udav.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/if_udavreg.h cvs rdiff -u -r1.66 -r1.67 src/sys/dev/usb/if_url.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/if_urndis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Thu Aug 1 00:10:22 UTC 2019 Modified Files: src/sys/dev/usb: if_aue.c if_auereg.h if_kue.c if_kuereg.h if_mue.c if_smsc.c if_smscvar.h if_udav.c if_udavreg.h if_url.c if_urndis.c Log Message: remove unused code and use common ethernet media code where equivalent. To generate a diff of this commit: cvs rdiff -u -r1.154 -r1.155 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/if_auereg.h cvs rdiff -u -r1.96 -r1.97 src/sys/dev/usb/if_kue.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/if_kuereg.h cvs rdiff -u -r1.50 -r1.51 src/sys/dev/usb/if_mue.c cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/if_smsc.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/if_smscvar.h cvs rdiff -u -r1.59 -r1.60 src/sys/dev/usb/if_udav.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/if_udavreg.h cvs rdiff -u -r1.66 -r1.67 src/sys/dev/usb/if_url.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/if_urndis.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/if_aue.c diff -u src/sys/dev/usb/if_aue.c:1.154 src/sys/dev/usb/if_aue.c:1.155 --- src/sys/dev/usb/if_aue.c:1.154 Tue May 28 07:41:50 2019 +++ src/sys/dev/usb/if_aue.c Thu Aug 1 00:10:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_aue.c,v 1.154 2019/05/28 07:41:50 msaitoh Exp $ */ +/* $NetBSD: if_aue.c,v 1.155 2019/08/01 00:10:22 mrg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.154 2019/05/28 07:41:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.155 2019/08/01 00:10:22 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1028,7 +1028,6 @@ aue_rx_list_init(struct aue_softc *sc) for (i = 0; i < AUE_RX_LIST_CNT; i++) { c = &cd->aue_rx_chain[i]; c->aue_sc = sc; - c->aue_idx = i; if (aue_newbuf(sc, c, NULL) == ENOBUFS) return ENOBUFS; if (c->aue_xfer == NULL) { @@ -1057,7 +1056,6 @@ aue_tx_list_init(struct aue_softc *sc) for (i = 0; i < AUE_TX_LIST_CNT; i++) { c = &cd->aue_tx_chain[i]; c->aue_sc = sc; - c->aue_idx = i; c->aue_mbuf = NULL; if (c->aue_xfer == NULL) { int err = usbd_create_xfer(sc->aue_ep[AUE_ENDPT_TX], @@ -1520,19 +1518,13 @@ Static int aue_ifmedia_upd(struct ifnet *ifp) { struct aue_softc *sc = ifp->if_softc; - struct mii_data *mii = GET_MII(sc); - int rc; DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__)); if (sc->aue_dying) return 0; - sc->aue_link = 0; - - if ((rc = mii_mediachg(mii)) == ENXIO) - return 0; - return rc; + return ether_mediachange(ifp); } Static int Index: src/sys/dev/usb/if_auereg.h diff -u src/sys/dev/usb/if_auereg.h:1.29 src/sys/dev/usb/if_auereg.h:1.30 --- src/sys/dev/usb/if_auereg.h:1.29 Sun Jul 21 10:27:56 2019 +++ src/sys/dev/usb/if_auereg.h Thu Aug 1 00:10:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_auereg.h,v 1.29 2019/07/21 10:27:56 mrg Exp $ */ +/* $NetBSD: if_auereg.h,v 1.30 2019/08/01 00:10:22 mrg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -212,7 +212,6 @@ struct aue_chain { struct usbd_xfer *aue_xfer; char *aue_buf; struct mbuf *aue_mbuf; - int aue_idx; }; struct aue_cdata { Index: src/sys/dev/usb/if_kue.c diff -u src/sys/dev/usb/if_kue.c:1.96 src/sys/dev/usb/if_kue.c:1.97 --- src/sys/dev/usb/if_kue.c:1.96 Tue May 28 07:41:50 2019 +++ src/sys/dev/usb/if_kue.c Thu Aug 1 00:10:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_kue.c,v 1.96 2019/05/28 07:41:50 msaitoh Exp $ */ +/* $NetBSD: if_kue.c,v 1.97 2019/08/01 00:10:22 mrg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.96 2019/05/28 07:41:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.97 2019/08/01 00:10:22 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -591,7 +591,6 @@ kue_rx_list_init(struct kue_softc *sc) for (i = 0; i < KUE_RX_LIST_CNT; i++) { c = &cd->kue_rx_chain[i]; c->kue_sc = sc; - c->kue_idx = i; if (c->kue_xfer == NULL) { int error = usbd_create_xfer(sc->kue_ep[KUE_ENDPT_RX], KUE_BUFSZ, 0, 0, &c->kue_xfer); @@ -617,7 +616,6 @@ kue_tx_list_init(struct kue_softc *sc) for (i = 0; i < KUE_TX_LIST_CNT; i++) { c = &cd->kue_tx_chain[i]; c->kue_sc = sc; - c->kue_idx = i; if (c->kue_xfer == NULL) { int error = usbd_create_xfer(sc->kue_ep[KUE_ENDPT_TX], KUE_BUFSZ, 0, 0, &c->kue_xfer); Index: src/sys/dev/usb/if_kuereg.h diff -u src/sys/dev/usb/if_kuereg.h:1.22 src/sys/dev/usb/if_kuereg.h:1.23 --- src/sys/dev/usb/if_kuereg.h:1.22 Sun Jul 21 10:27:56 2019 +++ src/sys/dev/usb/if_kuereg.h Thu Aug 1 00:10:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_kuereg.h,v 1.22 2019/07/21 10:27:56 mrg Exp $ */ +/* $NetBSD: if_kuereg.h,v 1.23 2019/08/01 00:10:22 mrg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All
Re: CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3
Hi, "Christos Zoulas" writes: > Module Name: src > Committed By: christos > Date: Wed Jul 31 16:40:26 UTC 2019 > > Modified Files: > src/external/gpl3/gcc/dist/libstdc++-v3: configure > > Log Message: > Manually patch the locale configuration to use the dragonfly code instead > of generic. > > > To generate a diff of this commit: > cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/libstdc++-v3/configure > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. Some other changes in your g++locale.diff are required to enable DragonFly code. Are there any plans to commit the others? Thanks for your great works. -- Ryo ONODERA // r...@tetera.org PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Thu Aug 1 01:19:21 UTC 2019 Modified Files: src/sys/dev/usb: if_axe.c Log Message: fix locking botch. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/dev/usb/if_axe.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/if_axe.c diff -u src/sys/dev/usb/if_axe.c:1.102 src/sys/dev/usb/if_axe.c:1.103 --- src/sys/dev/usb/if_axe.c:1.102 Sun Jul 21 10:27:56 2019 +++ src/sys/dev/usb/if_axe.c Thu Aug 1 01:19:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axe.c,v 1.102 2019/07/21 10:27:56 mrg Exp $ */ +/* $NetBSD: if_axe.c,v 1.103 2019/08/01 01:19:21 mrg Exp $ */ /* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */ /* @@ -87,7 +87,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.102 2019/07/21 10:27:56 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.103 2019/08/01 01:19:21 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -716,11 +716,11 @@ axe_reset(struct axe_softc *sc) /* Wait a little while for the chip to get its brains in order. */ DELAY(1000); #else - axe_lock_mii(sc); + axe_lock_mii_sc_locked(sc); axe_ax_init(sc); - axe_unlock_mii(sc); + axe_unlock_mii_sc_locked(sc); #endif }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Thu Aug 1 01:19:21 UTC 2019 Modified Files: src/sys/dev/usb: if_axe.c Log Message: fix locking botch. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/dev/usb/if_axe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gdtoa
Module Name:src Committed By: riastradh Date: Thu Aug 1 02:06:31 UTC 2019 Modified Files: src/lib/libc/gdtoa: Makefile.inc gdtoa_fltrnds.h gdtoaimp.h Log Message: Honour the floating-point rounding mode in floating-point formatting. C99, Sec. 7.19.6.1 `The fprintf function', paragraph 13, p. 281: (Recommended practice) For e, E, f, F, g, and G conversions, if the number of significant decimal digits is at most DECIMAL_DIG, then the result should be correctly rounded. If the number of significant decimal digits is more than DECIMAL_DIG but the source value is exactly representable with DECIMAL_DIG digits, then the result should be an exact representation with trailing zeros. Otherwise, the source value is bounded by two adjacent decimal strings L < U, both having DECIMAL_DIG significant idgits; the value of the resultant decimal string D should satisfy L <= D <= U, _with the extra stipulation that the error should have a correct sign for the current rounding direction_. [emphasis added] The gdtoa code base already supports respecting the floating-point rounding mode, as long as we compile it with Honor_FLT_ROUNDS defined. However, for this to work, fegetround must be available in libc, which it is not currently -- the fenv logic is in libm. Fortunately, we don't have to move all of fenv from libm to libc -- programs that do not link against libm don't have fesetround, so the rounding mode is always the default (barring asm shenanigans that bypass the API -- tough). So use a weak reference to fegetround; by default, assume FE_TONEAREST if it is not defined. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/gdtoa/Makefile.inc cvs rdiff -u -r1.1.1.1 -r1.2 src/lib/libc/gdtoa/gdtoa_fltrnds.h cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gdtoa/gdtoaimp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gdtoa/Makefile.inc diff -u src/lib/libc/gdtoa/Makefile.inc:1.10 src/lib/libc/gdtoa/Makefile.inc:1.11 --- src/lib/libc/gdtoa/Makefile.inc:1.10 Thu Jan 16 20:31:42 2014 +++ src/lib/libc/gdtoa/Makefile.inc Thu Aug 1 02:06:31 2019 @@ -1,10 +1,14 @@ -# $NetBSD: Makefile.inc,v 1.10 2014/01/16 20:31:42 christos Exp $ +# $NetBSD: Makefile.inc,v 1.11 2019/08/01 02:06:31 riastradh Exp $ # gdtoa sources .PATH: ${.CURDIR}/gdtoa CPPFLAGS+=-I${.CURDIR}/gdtoa -I${.CURDIR}/locale +.if ${MACHINE_ARCH} == "vax" CPPFLAGS+=-DNO_FENV_H +.else +CPPFLAGS+=-DHonor_FLT_ROUNDS +.endif # machine-dependent directory must provide the following: # arith.h gd_qnan.h Index: src/lib/libc/gdtoa/gdtoa_fltrnds.h diff -u src/lib/libc/gdtoa/gdtoa_fltrnds.h:1.1.1.1 src/lib/libc/gdtoa/gdtoa_fltrnds.h:1.2 --- src/lib/libc/gdtoa/gdtoa_fltrnds.h:1.1.1.1 Sat Mar 19 16:26:37 2011 +++ src/lib/libc/gdtoa/gdtoa_fltrnds.h Thu Aug 1 02:06:31 2019 @@ -1,4 +1,5 @@ - FPI *fpi, fpi1; + CONST FPI *fpi; + FPI fpi1; int Rounding; #ifdef Trust_FLT_ROUNDS /*{{ only define this if FLT_ROUNDS really works! */ Rounding = Flt_Rounds; Index: src/lib/libc/gdtoa/gdtoaimp.h diff -u src/lib/libc/gdtoa/gdtoaimp.h:1.14 src/lib/libc/gdtoa/gdtoaimp.h:1.15 --- src/lib/libc/gdtoa/gdtoaimp.h:1.14 Fri Apr 19 10:41:53 2013 +++ src/lib/libc/gdtoa/gdtoaimp.h Thu Aug 1 02:06:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gdtoaimp.h,v 1.14 2013/04/19 10:41:53 joerg Exp $ */ +/* $NetBSD: gdtoaimp.h,v 1.15 2019/08/01 02:06:31 riastradh Exp $ */ / @@ -200,6 +200,9 @@ THIS SOFTWARE. #include "gd_qnan.h" #ifdef Honor_FLT_ROUNDS #include +__weakref_visible int __libc_fegetround_ref(void) __weak_reference(fegetround); +#define fegetround() \ + (__libc_fegetround_ref ? __libc_fegetround_ref() : FE_TONEAREST) #endif #ifdef DEBUG
CVS commit: src/lib/libc/gdtoa
Module Name:src Committed By: riastradh Date: Thu Aug 1 02:06:31 UTC 2019 Modified Files: src/lib/libc/gdtoa: Makefile.inc gdtoa_fltrnds.h gdtoaimp.h Log Message: Honour the floating-point rounding mode in floating-point formatting. C99, Sec. 7.19.6.1 `The fprintf function', paragraph 13, p. 281: (Recommended practice) For e, E, f, F, g, and G conversions, if the number of significant decimal digits is at most DECIMAL_DIG, then the result should be correctly rounded. If the number of significant decimal digits is more than DECIMAL_DIG but the source value is exactly representable with DECIMAL_DIG digits, then the result should be an exact representation with trailing zeros. Otherwise, the source value is bounded by two adjacent decimal strings L < U, both having DECIMAL_DIG significant idgits; the value of the resultant decimal string D should satisfy L <= D <= U, _with the extra stipulation that the error should have a correct sign for the current rounding direction_. [emphasis added] The gdtoa code base already supports respecting the floating-point rounding mode, as long as we compile it with Honor_FLT_ROUNDS defined. However, for this to work, fegetround must be available in libc, which it is not currently -- the fenv logic is in libm. Fortunately, we don't have to move all of fenv from libm to libc -- programs that do not link against libm don't have fesetround, so the rounding mode is always the default (barring asm shenanigans that bypass the API -- tough). So use a weak reference to fegetround; by default, assume FE_TONEAREST if it is not defined. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/gdtoa/Makefile.inc cvs rdiff -u -r1.1.1.1 -r1.2 src/lib/libc/gdtoa/gdtoa_fltrnds.h cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gdtoa/gdtoaimp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gdtoa
Module Name:src Committed By: riastradh Date: Thu Aug 1 02:27:43 UTC 2019 Modified Files: src/lib/libc/gdtoa: g_Qfmt.c g_dfmt.c g_ffmt.c g_xLfmt.c g_xfmt.c gdtoa.c gdtoa.h gdtoaimp.h ldtoa.c strtoIQ.c strtoId.c strtoIdd.c strtoIf.c strtoIg.c strtoIx.c strtoIxL.c strtod.c strtodI.c strtopd.c strtopdd.c strtopf.c strtorQ.c Log Message: Sprinkle some more const in. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/gdtoa/g_Qfmt.c \ src/lib/libc/gdtoa/g_xLfmt.c src/lib/libc/gdtoa/g_xfmt.c \ src/lib/libc/gdtoa/strtorQ.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/gdtoa/g_dfmt.c \ src/lib/libc/gdtoa/g_ffmt.c src/lib/libc/gdtoa/strtoIg.c \ src/lib/libc/gdtoa/strtodI.c src/lib/libc/gdtoa/strtopd.c \ src/lib/libc/gdtoa/strtopdd.c src/lib/libc/gdtoa/strtopf.c cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gdtoa/gdtoa.c cvs rdiff -u -r1.10 -r1.11 src/lib/libc/gdtoa/gdtoa.h cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gdtoa/gdtoaimp.h cvs rdiff -u -r1.5 -r1.6 src/lib/libc/gdtoa/ldtoa.c cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gdtoa/strtoIQ.c \ src/lib/libc/gdtoa/strtoId.c src/lib/libc/gdtoa/strtoIdd.c \ src/lib/libc/gdtoa/strtoIf.c src/lib/libc/gdtoa/strtoIx.c \ src/lib/libc/gdtoa/strtoIxL.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gdtoa/strtod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gdtoa
Module Name:src Committed By: riastradh Date: Thu Aug 1 02:27:43 UTC 2019 Modified Files: src/lib/libc/gdtoa: g_Qfmt.c g_dfmt.c g_ffmt.c g_xLfmt.c g_xfmt.c gdtoa.c gdtoa.h gdtoaimp.h ldtoa.c strtoIQ.c strtoId.c strtoIdd.c strtoIf.c strtoIg.c strtoIx.c strtoIxL.c strtod.c strtodI.c strtopd.c strtopdd.c strtopf.c strtorQ.c Log Message: Sprinkle some more const in. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/gdtoa/g_Qfmt.c \ src/lib/libc/gdtoa/g_xLfmt.c src/lib/libc/gdtoa/g_xfmt.c \ src/lib/libc/gdtoa/strtorQ.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/gdtoa/g_dfmt.c \ src/lib/libc/gdtoa/g_ffmt.c src/lib/libc/gdtoa/strtoIg.c \ src/lib/libc/gdtoa/strtodI.c src/lib/libc/gdtoa/strtopd.c \ src/lib/libc/gdtoa/strtopdd.c src/lib/libc/gdtoa/strtopf.c cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gdtoa/gdtoa.c cvs rdiff -u -r1.10 -r1.11 src/lib/libc/gdtoa/gdtoa.h cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gdtoa/gdtoaimp.h cvs rdiff -u -r1.5 -r1.6 src/lib/libc/gdtoa/ldtoa.c cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gdtoa/strtoIQ.c \ src/lib/libc/gdtoa/strtoId.c src/lib/libc/gdtoa/strtoIdd.c \ src/lib/libc/gdtoa/strtoIf.c src/lib/libc/gdtoa/strtoIx.c \ src/lib/libc/gdtoa/strtoIxL.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gdtoa/strtod.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/libc/gdtoa/g_Qfmt.c diff -u src/lib/libc/gdtoa/g_Qfmt.c:1.4 src/lib/libc/gdtoa/g_Qfmt.c:1.5 --- src/lib/libc/gdtoa/g_Qfmt.c:1.4 Sun Mar 20 23:15:35 2011 +++ src/lib/libc/gdtoa/g_Qfmt.c Thu Aug 1 02:27:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: g_Qfmt.c,v 1.4 2011/03/20 23:15:35 christos Exp $ */ +/* $NetBSD: g_Qfmt.c,v 1.5 2019/08/01 02:27:43 riastradh Exp $ */ / @@ -58,7 +58,7 @@ g_Qfmt(buf, V, ndig, bufsize) char *buf; g_Qfmt(char *buf, void *V, int ndig, size_t bufsize) #endif { - static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 }; + static CONST FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 }; char *b, *s, *se; ULong bits[4], *L, sign; int decpt, ex, i, mode; Index: src/lib/libc/gdtoa/g_xLfmt.c diff -u src/lib/libc/gdtoa/g_xLfmt.c:1.4 src/lib/libc/gdtoa/g_xLfmt.c:1.5 --- src/lib/libc/gdtoa/g_xLfmt.c:1.4 Sun Mar 20 23:15:35 2011 +++ src/lib/libc/gdtoa/g_xLfmt.c Thu Aug 1 02:27:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: g_xLfmt.c,v 1.4 2011/03/20 23:15:35 christos Exp $ */ +/* $NetBSD: g_xLfmt.c,v 1.5 2019/08/01 02:27:43 riastradh Exp $ */ / @@ -56,7 +56,7 @@ g_xLfmt(buf, V, ndig, bufsize) char *buf g_xLfmt(char *buf, void *V, int ndig, size_t bufsize) #endif { - static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; + static CONST FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; char *b, *s, *se; ULong bits[2], *L, sign; int decpt, ex, i, mode; Index: src/lib/libc/gdtoa/g_xfmt.c diff -u src/lib/libc/gdtoa/g_xfmt.c:1.4 src/lib/libc/gdtoa/g_xfmt.c:1.5 --- src/lib/libc/gdtoa/g_xfmt.c:1.4 Sun Mar 20 23:15:35 2011 +++ src/lib/libc/gdtoa/g_xfmt.c Thu Aug 1 02:27:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: g_xfmt.c,v 1.4 2011/03/20 23:15:35 christos Exp $ */ +/* $NetBSD: g_xfmt.c,v 1.5 2019/08/01 02:27:43 riastradh Exp $ */ / @@ -60,7 +60,7 @@ g_xfmt(buf, V, ndig, bufsize) char *buf; g_xfmt(char *buf, void *V, int ndig, size_t bufsize) #endif { - static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; + static CONST FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; char *b, *s, *se; ULong bits[2], sign; UShort *L; Index: src/lib/libc/gdtoa/strtorQ.c diff -u src/lib/libc/gdtoa/strtorQ.c:1.4 src/lib/libc/gdtoa/strtorQ.c:1.5 --- src/lib/libc/gdtoa/strtorQ.c:1.4 Sun Mar 20 23:15:35 2011 +++ src/lib/libc/gdtoa/strtorQ.c Thu Aug 1 02:27:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: strtorQ.c,v 1.4 2011/03/20 23:15:35 christos Exp $ */ +/* $NetBSD: strtorQ.c,v 1.5 2019/08/01 02:27:43 riastradh Exp $ */ / @@ -101,8 +101,9 @@ strtorQ(s, sp, rounding, L) CONST char * strtorQ(CONST char *s, char **sp, int rounding, void *L) #endif { - static FPI fpi0 = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI }; - FPI *fpi, fpi1; + static CONST FPI fpi0 = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI }; + CONST FPI *fpi; + FPI fpi1; ULong bits[4]; Long expt; int k; Index: src/lib/libc/gdtoa/g_dfmt.c diff -u src/lib/libc/gdtoa/g_dfmt.c:1.3 src/lib/libc/gdtoa/g_dfmt.c:1.4 --- src/lib/libc/gdtoa/g_dfmt.c:1.3 Sun Mar 20 23:15:35 2011 +++ src/lib/libc/gdtoa/g_dfmt.c Thu Aug 1 02:27:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: g_dfmt.c,v 1.3 2011/03/20 23:15:35 christos Exp $ */ +/* $NetBSD: g_dfmt.c,v
CVS commit: src/sys/uvm
Module Name:src Committed By: riastradh Date: Thu Aug 1 02:28:55 UTC 2019 Modified Files: src/sys/uvm: uvm_map.c uvm_map.h Log Message: Remove last trace of never-used map_attrib. To generate a diff of this commit: cvs rdiff -u -r1.362 -r1.363 src/sys/uvm/uvm_map.c cvs rdiff -u -r1.74 -r1.75 src/sys/uvm/uvm_map.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm
Module Name:src Committed By: riastradh Date: Thu Aug 1 02:28:55 UTC 2019 Modified Files: src/sys/uvm: uvm_map.c uvm_map.h Log Message: Remove last trace of never-used map_attrib. To generate a diff of this commit: cvs rdiff -u -r1.362 -r1.363 src/sys/uvm/uvm_map.c cvs rdiff -u -r1.74 -r1.75 src/sys/uvm/uvm_map.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.362 src/sys/uvm/uvm_map.c:1.363 --- src/sys/uvm/uvm_map.c:1.362 Fri Jul 12 06:27:13 2019 +++ src/sys/uvm/uvm_map.c Thu Aug 1 02:28:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.362 2019/07/12 06:27:13 mlelstv Exp $ */ +/* $NetBSD: uvm_map.c,v 1.363 2019/08/01 02:28:55 riastradh Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.362 2019/07/12 06:27:13 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.363 2019/08/01 02:28:55 riastradh Exp $"); #include "opt_ddb.h" #include "opt_pax.h" @@ -4948,7 +4948,7 @@ fill_vmentry(struct lwp *l, struct proc kve->kve_offset = e->offset; kve->kve_wired_count = e->wired_count; kve->kve_inheritance = e->inheritance; - kve->kve_attributes = 0; /* e->map_attrib */ + kve->kve_attributes = 0; /* unused */ kve->kve_advice = e->advice; #define PROT(p) (((p) & VM_PROT_READ) ? KVME_PROT_READ : 0) | \ (((p) & VM_PROT_WRITE) ? KVME_PROT_WRITE : 0) | \ Index: src/sys/uvm/uvm_map.h diff -u src/sys/uvm/uvm_map.h:1.74 src/sys/uvm/uvm_map.h:1.75 --- src/sys/uvm/uvm_map.h:1.74 Thu May 18 02:21:05 2017 +++ src/sys/uvm/uvm_map.h Thu Aug 1 02:28:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.h,v 1.74 2017/05/18 02:21:05 christos Exp $ */ +/* $NetBSD: uvm_map.h,v 1.75 2019/08/01 02:28:55 riastradh Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -146,7 +146,6 @@ struct vm_map_entry { int wired_count; /* can be paged if == 0 */ struct vm_aref aref; /* anonymous overlay */ int advice; /* madvise advice */ - uint32_t map_attrib; /* uvm-external map attributes */ #define uvm_map_entry_stop_copy flags u_int8_t flags; /* flags */
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Aug 1 03:38:12 UTC 2019 Modified Files: src/sys/dev/rasops: rasops4.c Log Message: 4 is 1 << 2, not 1 << 3... To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/rasops/rasops4.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Aug 1 03:38:12 UTC 2019 Modified Files: src/sys/dev/rasops: rasops4.c Log Message: 4 is 1 << 2, not 1 << 3... To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/rasops/rasops4.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/rasops/rasops4.c diff -u src/sys/dev/rasops/rasops4.c:1.22 src/sys/dev/rasops/rasops4.c:1.23 --- src/sys/dev/rasops/rasops4.c:1.22 Wed Jul 31 02:04:14 2019 +++ src/sys/dev/rasops/rasops4.c Thu Aug 1 03:38:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops4.c,v 1.22 2019/07/31 02:04:14 rin Exp $ */ +/* $NetBSD: rasops4.c,v 1.23 2019/08/01 03:38:12 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops4.c,v 1.22 2019/07/31 02:04:14 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops4.c,v 1.23 2019/08/01 03:38:12 rin Exp $"); #include "opt_rasops.h" @@ -167,6 +167,6 @@ rasops4_makestamp(struct rasops_info *ri * Grab routines common to depths where (bpp < 8) */ #define NAME(ident) rasops4_##ident -#define PIXEL_SHIFT 3 +#define PIXEL_SHIFT 2 #include
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Aug 1 03:43:54 UTC 2019 Modified Files: src/sys/dev/rasops: rasops_bitops.h Log Message: Fix erasecols and do_cursor for font width >= 32 bits. Also, some cosmetic clean-up's. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/rasops/rasops_bitops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Aug 1 03:43:54 UTC 2019 Modified Files: src/sys/dev/rasops: rasops_bitops.h Log Message: Fix erasecols and do_cursor for font width >= 32 bits. Also, some cosmetic clean-up's. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/rasops/rasops_bitops.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/rasops/rasops_bitops.h diff -u src/sys/dev/rasops/rasops_bitops.h:1.18 src/sys/dev/rasops/rasops_bitops.h:1.19 --- src/sys/dev/rasops/rasops_bitops.h:1.18 Tue Jul 30 15:29:40 2019 +++ src/sys/dev/rasops/rasops_bitops.h Thu Aug 1 03:43:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops_bitops.h,v 1.18 2019/07/30 15:29:40 rin Exp $ */ +/* $NetBSD: rasops_bitops.h,v 1.19 2019/08/01 03:43:54 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -38,14 +38,13 @@ static void NAME(erasecols)(void *cookie, int row, int col, int num, long attr) { - int lclr, rclr, clr; - struct rasops_info *ri; + struct rasops_info *ri = (struct rasops_info *)cookie; + uint32_t lclr, rclr, clr; uint32_t *dp, *rp, *hp, tmp, lmask, rmask; int height, cnt; hp = NULL; /* XXX GCC */ - ri = (struct rasops_info *)cookie; #ifdef RASOPS_CLIPPING if ((unsigned)row >= (unsigned)ri->ri_rows) @@ -56,7 +55,7 @@ NAME(erasecols)(void *cookie, int row, i col = 0; } - if ((col + num) > ri->ri_cols) + if (col + num > ri->ri_cols) num = ri->ri_cols - col; if (num <= 0) @@ -70,8 +69,10 @@ NAME(erasecols)(void *cookie, int row, i if (ri->ri_hwbits) hp = (uint32_t *)(ri->ri_hwbits + row*ri->ri_yscale + ((col >> 3) & ~3)); - if ((col & 31) + num <= 32) { - lmask = ~rasops_pmask[col & 31][num]; + col &= 31; + + if (col + num <= 32) { + lmask = ~rasops_pmask[col][num & 31]; lclr = clr & ~lmask; while (height--) { @@ -86,11 +87,11 @@ NAME(erasecols)(void *cookie, int row, i } } } else { - lmask = rasops_rmask[col & 31]; + lmask = rasops_rmask[col]; rmask = rasops_lmask[(col + num) & 31]; if (lmask) - num = (num - (32 - (col & 31))) >> 5; + num = (num - (32 - col)) >> 5; else num = num >> 5; @@ -127,10 +128,10 @@ NAME(erasecols)(void *cookie, int row, i static void NAME(do_cursor)(struct rasops_info *ri) { - int height, row, col, num; - uint32_t *dp, *rp, *hrp, *hp, tmp, lmask, rmask; + int height, row, col, num, cnt; + uint32_t *dp, *rp, *hp, tmp, lmask, rmask; - hrp = hp = NULL; /* XXX GCC */ + hp = NULL; /* XXX GCC */ row = ri->ri_crow; col = ri->ri_ccol * ri->ri_font->fontwidth << PIXEL_SHIFT; @@ -139,49 +140,53 @@ NAME(do_cursor)(struct rasops_info *ri) rp = (uint32_t *)(ri->ri_bits + row * ri->ri_yscale + ((col >> 3) & ~3)); if (ri->ri_hwbits) - hrp = (uint32_t *)(ri->ri_hwbits + row * ri->ri_yscale + + hp = (uint32_t *)(ri->ri_hwbits + row * ri->ri_yscale + ((col >> 3) & ~3)); + col &= 31; - if ((col & 31) + num <= 32) { - lmask = rasops_pmask[col & 31][num]; + if (col + num <= 32) { + lmask = rasops_pmask[col][num & 31]; while (height--) { tmp = *rp ^ lmask; *rp = tmp; if (ri->ri_hwbits) { -*hrp = tmp; -DELTA(hrp, ri->ri_stride, uint32_t *); +*hp = tmp; +DELTA(hp, ri->ri_stride, uint32_t *); } DELTA(rp, ri->ri_stride, uint32_t *); } } else { - lmask = ~rasops_rmask[col & 31]; + lmask = ~rasops_rmask[col]; rmask = ~rasops_lmask[(col + num) & 31]; + if (lmask != -1) + num = (num - (32 - col)) >> 5; + else + num = num >> 5; + while (height--) { dp = rp; - DELTA(rp, ri->ri_stride, uint32_t *); - if (ri->ri_hwbits) { -hp = hrp; -DELTA(hrp, ri->ri_stride, uint32_t *); - } if (lmask != -1) { -tmp = *dp ^ lmask; -*dp = tmp; +*dp = *dp ^ lmask; dp++; -if (ri->ri_hwbits) { - *hp = tmp; - hp++; -} } - if (rmask != -1) { -tmp = *dp ^ rmask; -*dp = tmp; -if (ri->ri_hwbits) - *hp = tmp; + for (cnt = num; cnt; cnt--) { +*dp = ~*dp; +dp++; } + + if (rmask != -1) +*dp = *dp ^ rmask; + + if (ri->ri_hwbits) { +memcpy(hp, rp, ((lmask != -1) + num + +(rmask != -1)) << 2); +DELTA(hp, ri->ri_stride, uint32_t *); + } + DELTA(rp, ri->ri_stride, uint32_t *); } } }
Re: CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3
Thank you. What's left now is to re-run mknative to regenerate the defs.mk file for libstdc++. mrg@ is going to do it for all archs at once because it will require an UPDATING entry to mention to clean in /usr/src/external/gpl3/lib/libstdc++. Once that is done and all the archs are building, I will issue pull-ups for -9. Best, christos > On Aug 1, 2019, at 3:30 AM, Ryo ONODERA wrote: > > Hi, > > "Christos Zoulas" writes: > >> Module Name: src >> Committed By:christos >> Date:Wed Jul 31 16:40:26 UTC 2019 >> >> Modified Files: >> src/external/gpl3/gcc/dist/libstdc++-v3: configure >> >> Log Message: >> Manually patch the locale configuration to use the dragonfly code instead >> of generic. >> >> >> To generate a diff of this commit: >> cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/libstdc++-v3/configure >> >> Please note that diffs are not public domain; they are subject to the >> copyright notices on the relevant files. > > Some other changes in your g++locale.diff are required to > enable DragonFly code. > Are there any plans to commit the others? > > Thanks for your great works. > > -- > Ryo ONODERA // r...@tetera.org > PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Thu Aug 1 06:14:45 UTC 2019 Modified Files: src/external/historical/nawk/dist: FIXES awk.1 awk.h b.c lex.c lib.c main.c proto.h run.c tran.c ytab.c Log Message: remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/historical/nawk/dist/FIXES cvs rdiff -u -r1.1.1.1 -r1.2 src/external/historical/nawk/dist/awk.1 \ src/external/historical/nawk/dist/ytab.c cvs rdiff -u -r1.2 -r1.3 src/external/historical/nawk/dist/awk.h cvs rdiff -u -r1.6 -r1.7 src/external/historical/nawk/dist/b.c cvs rdiff -u -r1.4 -r1.5 src/external/historical/nawk/dist/lex.c cvs rdiff -u -r1.8 -r1.9 src/external/historical/nawk/dist/lib.c \ src/external/historical/nawk/dist/main.c \ src/external/historical/nawk/dist/tran.c cvs rdiff -u -r1.7 -r1.8 src/external/historical/nawk/dist/proto.h cvs rdiff -u -r1.9 -r1.10 src/external/historical/nawk/dist/run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/historical/nawk/dist/FIXES diff -u src/external/historical/nawk/dist/FIXES:1.1.1.2 src/external/historical/nawk/dist/FIXES:1.2 --- src/external/historical/nawk/dist/FIXES:1.1.1.2 Fri Dec 28 21:14:51 2012 +++ src/external/historical/nawk/dist/FIXES Thu Aug 1 02:14:45 2019 @@ -52,10 +52,10 @@ Jun 12, 2011: /pat/, \n /pat/ {...} is now legal, though bad style to use. added checks to new -v code that permits -vnospace; thanks to - ruslan ermilov for spotting this and providing the patch. + ruslan ermilov for spotting this and providing the patch. removed fixed limit on number of open files; thanks to aleksey - cheusov and christos zoulos. + cheusov and christos zoulos. fixed day 1 bug that resurrected deleted elements of ARGV when used as filenames (in lib.c). @@ -73,10 +73,10 @@ May 1, 2011: and arnold robbins, changed srand() to return the previous seed (which is 1 on the first call of srand). the seed is an Awkfloat internally though converted to unsigned int to - pass to the library srand(). thanks, everyone. + pass to the library srand(). thanks, everyone. fixed a subtle (and i hope low-probability) overflow error - in fldbld, by adding space for one extra \0. thanks to + in fldbld, by adding space for one extra \0. thanks to robert bassett for spotting this one and providing a fix. removed the files related to compilation on windows. i no @@ -113,7 +113,7 @@ Oct 8, 2008: Oct 23, 2007: minor fix in lib.c: increase inputFS to 100, change malloc - for fields to n+1. + for fields to n+1. fixed memory fault caused by out of order test in setsval. @@ -160,7 +160,7 @@ Jan 17, 2006: core dump on linux with BEGIN {nextfile}, now fixed. - removed some #ifdef's in run.c and lex.c that appear to no + removed some #ifdef's in run.c and lex.c that appear to no longer be necessary. Apr 24, 2005: @@ -174,8 +174,8 @@ Jan 14, 2005: rethinking it. Dec 31, 2004: - prevent overflow of -f array in main, head off potential error in - call of SYNTAX(), test malloc return in lib.c, all with thanks to + prevent overflow of -f array in main, head off potential error in + call of SYNTAX(), test malloc return in lib.c, all with thanks to todd miller. Dec 22, 2004: @@ -203,8 +203,8 @@ Nov 22, 2003: code known to man. fixed a storage leak in call() that appears to have been there since - 1983 or so -- a function without an explicit return that assigns a - string to a parameter leaked a Cell. thanks to moinak ghosh for + 1983 or so -- a function without an explicit return that assigns a + string to a parameter leaked a Cell. thanks to moinak ghosh for spotting this very subtle one. Jul 31, 2003: @@ -226,7 +226,7 @@ Jul 28, 2003: radix character in programs and command line arguments regardless of the locale; otherwise, the locale should prevail for input and output of numbers. so it's intended to work that way. - + i have rescinded the attempt to use strcoll in expanding shorthands in regular expressions (cclenter). its properties are much too surprising; for example [a-c] matches aAbBc in locale en_US but abBcC @@ -290,7 +290,7 @@ Nov 29, 2002: Jun 28, 2002: modified run/format() and tran/getsval() to do a slightly better job on using OFMT for output from print and CONVFMT for other - number->string conversions, as promised by posix and done by + number->string conversions, as promised by posix and done by gawk and mawk. there are still places where it doesn't work right if CONVFMT is changed; by then the STR attribute of the variable has been irrevocably set. thanks to arnold robbins for @@ -322,7 +322,7 @@ Feb 10, 2002: Jan 1, 2002: fflush() or fflush("") flushes all files and pipes. - length(arrayname) returns number of elements; thanks to + length(arrayname) returns number of elements; thanks to
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Thu Aug 1 06:14:45 UTC 2019 Modified Files: src/external/historical/nawk/dist: FIXES awk.1 awk.h b.c lex.c lib.c main.c proto.h run.c tran.c ytab.c Log Message: remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/historical/nawk/dist/FIXES cvs rdiff -u -r1.1.1.1 -r1.2 src/external/historical/nawk/dist/awk.1 \ src/external/historical/nawk/dist/ytab.c cvs rdiff -u -r1.2 -r1.3 src/external/historical/nawk/dist/awk.h cvs rdiff -u -r1.6 -r1.7 src/external/historical/nawk/dist/b.c cvs rdiff -u -r1.4 -r1.5 src/external/historical/nawk/dist/lex.c cvs rdiff -u -r1.8 -r1.9 src/external/historical/nawk/dist/lib.c \ src/external/historical/nawk/dist/main.c \ src/external/historical/nawk/dist/tran.c cvs rdiff -u -r1.7 -r1.8 src/external/historical/nawk/dist/proto.h cvs rdiff -u -r1.9 -r1.10 src/external/historical/nawk/dist/run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Thu Aug 1 06:22:52 UTC 2019 Modified Files: src/external/historical/nawk/dist: b.c Log Message: PR/54424: Martijn Dekker: awk: broken character classes in UTF-8 locale: only the first matches Pick up some of the fixes from upstream: - posix paren matching - print \v \a - some more fatal handling - init all the character range. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/historical/nawk/dist/b.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Thu Aug 1 06:22:52 UTC 2019 Modified Files: src/external/historical/nawk/dist: b.c Log Message: PR/54424: Martijn Dekker: awk: broken character classes in UTF-8 locale: only the first matches Pick up some of the fixes from upstream: - posix paren matching - print \v \a - some more fatal handling - init all the character range. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/historical/nawk/dist/b.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/historical/nawk/dist/b.c diff -u src/external/historical/nawk/dist/b.c:1.7 src/external/historical/nawk/dist/b.c:1.8 --- src/external/historical/nawk/dist/b.c:1.7 Thu Aug 1 02:14:45 2019 +++ src/external/historical/nawk/dist/b.c Thu Aug 1 02:22:52 2019 @@ -31,6 +31,7 @@ THIS SOFTWARE. #define DEBUG #include +#include #include #include #include @@ -333,6 +334,10 @@ int quoted(const uschar **pp) /* pick up c = '\r'; else if (c == 'b') c = '\b'; + else if (c == 'v') + c = '\v'; + else if (c == 'a') + c = '\a'; else if (c == '\\') c = '\\'; else if (c == 'x') { /* hexadecimal goo follows */ @@ -978,6 +983,7 @@ static int repeat(const uschar *reptok, if (secondnum < 0) { /* means {n,} -> repeat n-1 times followed by PLUS */ if (firstnum < 2) { /* 0 or 1: should be handled before you get here */ + FATAL("internal error"); } else { return replace_repeat(reptok, reptoklen, atom, atomlen, firstnum, secondnum, REPEAT_PLUS_APPENDED); @@ -998,6 +1004,7 @@ static int repeat(const uschar *reptok, return replace_repeat(reptok, reptoklen, atom, atomlen, firstnum, secondnum, REPEAT_WITH_Q); } else { /* Error - shouldn't be here (n>m) */ + FATAL("internal error"); } return 0; } @@ -1013,6 +1020,7 @@ int relex(void) /* lexical analyzer for int i; int num, m, commafound, digitfound; const uschar *startreptok; + static int parens = 0; rescan: starttok = prestr; @@ -1026,9 +1034,18 @@ rescan: case '\0': prestr--; return '\0'; case '^': case '$': + return c; case '(': + parens++; + return c; case ')': - return c; + if (parens) { + parens--; + return c; + } + /* unmatched close parenthesis; per POSIX, treat as literal */ + rlxval = c; + return CHAR; case '\\': rlxval = quoted(&prestr); return CHAR; @@ -1064,7 +1081,15 @@ rescan: if (cc->cc_name != NULL && prestr[1 + cc->cc_namelen] == ':' && prestr[2 + cc->cc_namelen] == ']') { prestr += cc->cc_namelen + 3; - for (i = 1; i < NCHARS; i++) { + /* + * BUG: We begin at 1, instead of 0, since we + * would otherwise prematurely terminate the + * string for classes like [[:cntrl:]]. This + * means that we can't match the NUL character, + * not without first adapting the entire + * program to track each string's length. + */ + for (i = 1; i <= UCHAR_MAX; i++) { if (!adjbuf(&buf, &bufsz, bp-buf+1, 100, &bp, "relex2")) FATAL("out of space for reg expr %.10s...", lastre); if (cc->cc_func(i)) {
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Thu Aug 1 06:33:58 UTC 2019 Modified Files: src/external/historical/nawk/dist: proto.h Log Message: remove ### error output accidentally committed. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/historical/nawk/dist/proto.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/historical/nawk/dist/proto.h diff -u src/external/historical/nawk/dist/proto.h:1.8 src/external/historical/nawk/dist/proto.h:1.9 --- src/external/historical/nawk/dist/proto.h:1.8 Thu Aug 1 02:14:45 2019 +++ src/external/historical/nawk/dist/proto.h Thu Aug 1 02:33:58 2019 @@ -149,8 +149,6 @@ extern double errcheck(double, const cha extern int isclvar(const char *); extern int is_number(const char *); -/*###152 [cc] note: expected 'uschar ** {aka unsigned char **}' but argument is of type 'char **'%%%*/ -/*###152 [cc] note: expected 'uschar ** {aka unsigned char **}' but argument is of type 'char **'%%%*/ extern int adjbuf(uschar **, int *, int, int, uschar **, const char *); extern void run(Node *); extern Cell *execute(Node *);
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Thu Aug 1 06:33:58 UTC 2019 Modified Files: src/external/historical/nawk/dist: proto.h Log Message: remove ### error output accidentally committed. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/historical/nawk/dist/proto.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.