CVS commit: src
Module Name:src Committed By: rillig Date: Wed Jun 23 07:11:41 UTC 2021 Modified Files: src/doc: HACKS src/usr.bin/xlint/lint1: Makefile Log Message: lint1: add bug report for internal GCC compiler error To generate a diff of this commit: cvs rdiff -u -r1.219 -r1.220 src/doc/HACKS cvs rdiff -u -r1.71 -r1.72 src/usr.bin/xlint/lint1/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.219 src/doc/HACKS:1.220 --- src/doc/HACKS:1.219 Tue Jun 22 13:02:52 2021 +++ src/doc/HACKS Wed Jun 23 07:11:41 2021 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.219 2021/06/22 13:02:52 martin Exp $ +# $NetBSD: HACKS,v 1.220 2021/06/23 07:11:41 rillig Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -1010,4 +1010,5 @@ port sh3 The in-tree gcc 9 crashes with an internal invalid opcode exception when using any kind of optimization on the lex.c file. Force -O0 for this file. + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101177 kcah Index: src/usr.bin/xlint/lint1/Makefile diff -u src/usr.bin/xlint/lint1/Makefile:1.71 src/usr.bin/xlint/lint1/Makefile:1.72 --- src/usr.bin/xlint/lint1/Makefile:1.71 Tue Jun 22 12:58:28 2021 +++ src/usr.bin/xlint/lint1/Makefile Wed Jun 23 07:11:41 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.71 2021/06/22 12:58:28 martin Exp $ +# $NetBSD: Makefile,v 1.72 2021/06/23 07:11:41 rillig Exp $ .include @@ -27,6 +27,7 @@ CPPFLAGS+= ${DEBUG:D-DDEBUG} COPTS.err.c+= ${${ACTIVE_CC} == "clang":? -Wno-format-nonliteral :} +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101177 .if ${HAVE_GCC} == 9 && \ (${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb") COPTS.lex.c+= -O0
CVS commit: src/sbin/restore
Module Name:src Committed By: riastradh Date: Wed Jun 23 14:22:08 UTC 2021 Modified Files: src/sbin/restore: dirs.c Log Message: restore(8): Mark fail_dirtmp __dead to fix clang build. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sbin/restore/dirs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/restore/dirs.c diff -u src/sbin/restore/dirs.c:1.52 src/sbin/restore/dirs.c:1.53 --- src/sbin/restore/dirs.c:1.52 Sat Jun 19 13:56:35 2021 +++ src/sbin/restore/dirs.c Wed Jun 23 14:22:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dirs.c,v 1.52 2021/06/19 13:56:35 christos Exp $ */ +/* $NetBSD: dirs.c,v 1.53 2021/06/23 14:22:08 riastradh Exp $ */ /* * Copyright (c) 1983, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: dirs.c,v 1.52 2021/06/19 13:56:35 christos Exp $"); +__RCSID("$NetBSD: dirs.c,v 1.53 2021/06/23 14:22:08 riastradh Exp $"); #endif #endif /* not lint */ @@ -135,7 +135,7 @@ static void putent(struct direct *); static void rst_seekdir(RST_DIR *, long, long); static long rst_telldir(RST_DIR *); static struct direct *searchdir(ino_t, char *); -static void fail_dirtmp(char *); +static void fail_dirtmp(char *) __dead; /* * Extract directory contents, building up a directory structure @@ -833,7 +833,7 @@ cleanup(void) * Print out information about the failure to save directory, * extended attribute, and mode information. */ -static void +static void __dead fail_dirtmp(char *filename) { warn("%s: cannot write directory database", filename);
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Wed Jun 23 15:11:40 UTC 2021 Modified Files: src/sys/arch/mips/include: vmparam.h Log Message: Remove an unused #define. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/mips/include/vmparam.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/mips/include/vmparam.h diff -u src/sys/arch/mips/include/vmparam.h:1.65 src/sys/arch/mips/include/vmparam.h:1.66 --- src/sys/arch/mips/include/vmparam.h:1.65 Fri Feb 26 02:18:29 2021 +++ src/sys/arch/mips/include/vmparam.h Wed Jun 23 15:11:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.65 2021/02/26 02:18:29 simonb Exp $ */ +/* $NetBSD: vmparam.h,v 1.66 2021/06/23 15:11:40 simonb Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -198,7 +198,6 @@ /* VM_PHYSSEG_MAX defined by platform-dependent code. */ #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH -#define VM_PHYSSEG_NOADD /* can add RAM after vm_mem_init */ #ifndef VM_NFREELIST #define VM_NFREELIST 16 /* 16 distinct memory segments */
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Wed Jun 23 18:30:33 UTC 2021 Modified Files: src/distrib/sets/lists/base: md.amd64 src/distrib/sets/lists/debug: md.amd64 Log Message: build gdbserver only when we build gdb (from adam) To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.114 -r1.115 src/distrib/sets/lists/debug/md.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/md.amd64 diff -u src/distrib/sets/lists/base/md.amd64:1.284 src/distrib/sets/lists/base/md.amd64:1.285 --- src/distrib/sets/lists/base/md.amd64:1.284 Mon Jun 7 10:24:42 2021 +++ src/distrib/sets/lists/base/md.amd64 Wed Jun 23 14:30:32 2021 @@ -1,9 +1,9 @@ -# $NetBSD: md.amd64,v 1.284 2021/06/07 14:24:42 christos Exp $ +# $NetBSD: md.amd64,v 1.285 2021/06/23 18:30:32 christos Exp $ ./dev/lms0 base-obsolete obsolete ./dev/mms0 base-obsolete obsolete ./libexec/ld.elf_so-i386 base-sys-shlib compat,pic ./usr/bin/fdformatbase-util-bin -./usr/bin/gdbserverbase-util-bin +./usr/bin/gdbserverbase-util-bin gdb ./usr/bin/pmc base-obsolete obsolete ./usr/lib/i386/libi386.so.2 base-compat-shlib compat,pic ./usr/lib/i386/libi386.so.2.0 base-compat-shlib compat,pic Index: src/distrib/sets/lists/debug/md.amd64 diff -u src/distrib/sets/lists/debug/md.amd64:1.114 src/distrib/sets/lists/debug/md.amd64:1.115 --- src/distrib/sets/lists/debug/md.amd64:1.114 Mon Jun 7 10:24:42 2021 +++ src/distrib/sets/lists/debug/md.amd64 Wed Jun 23 14:30:33 2021 @@ -1,5 +1,5 @@ -# $NetBSD: md.amd64,v 1.114 2021/06/07 14:24:42 christos Exp $ -./usr/libdata/debug/usr/bin/gdbserver.debug base-util-debug debug +# $NetBSD: md.amd64,v 1.115 2021/06/23 18:30:33 christos Exp $ +./usr/libdata/debug/usr/bin/gdbserver.debug base-util-debug gdb,debug ./usr/lib/i386/12.202++_g.a comp-c-debuglib debuglib,compat,12.202xx ./usr/lib/i386/libi386_g.a comp-c-debuglib debuglib,compat ./usr/lib/i386/libiberty_g.a comp-obsolete obsolete
CVS commit: src/sys/arch/macppc/stand/fixcoff
Module Name:src Committed By: cjep Date: Wed Jun 23 20:20:44 UTC 2021 Modified Files: src/sys/arch/macppc/stand/fixcoff: fixcoff.c Log Message: nbmacppc-fixcoff did not cross-build correctly on OpenBSD because fixcoff.c had its own definition of htobe16. The toolchain already handles this. Now builds on OpenBSD. Checked on NetBSD, Darwin & Linux. Discussed with uwe@ To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/macppc/stand/fixcoff/fixcoff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/stand/fixcoff/fixcoff.c diff -u src/sys/arch/macppc/stand/fixcoff/fixcoff.c:1.11 src/sys/arch/macppc/stand/fixcoff/fixcoff.c:1.12 --- src/sys/arch/macppc/stand/fixcoff/fixcoff.c:1.11 Sat Mar 14 15:36:09 2009 +++ src/sys/arch/macppc/stand/fixcoff/fixcoff.c Wed Jun 23 20:20:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fixcoff.c,v 1.11 2009/03/14 15:36:09 dsl Exp $ */ +/* $NetBSD: fixcoff.c,v 1.12 2021/06/23 20:20:44 cjep Exp $ */ /* * Copyright (c) 1999 National Aeronautics & Space Administration @@ -43,30 +43,15 @@ #if HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h" -#endif +#else /* HAVE_NBTOOL_CONFIG_H */ +#include +#endif /* HAVE_NBTOOL_CONFIG_H */ #include #include #include #include -#if HAVE_NBTOOL_CONFIG_H - -#if WORDS_BIGENDIAN -#define htobe16(x) (x) -#else -static unsigned short -__htobe16(unsigned short x) -{ - return (((x & 0xff00) >> 8) | ((x & 0x00ff) << 8)); -} -#define htobe16(x) __htobe16(x) -#endif /* WORDS_BIGENDIAN */ - -#else /* HAVE_NBTOOL_CONFIG_H */ -#include -#endif /* HAVE_NBTOOL_CONFIG_H */ - struct filehdr { #define U802WRMAGIC 0730 #define U802ROMAGIC 0735
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Wed Jun 23 20:55:50 UTC 2021 Modified Files: src/sys/stand/efiboot: efiblock.c Log Message: Fix buffer size for alignment adjusted block I/O reads. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/stand/efiboot/efiblock.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/stand/efiboot/efiblock.c diff -u src/sys/stand/efiboot/efiblock.c:1.15 src/sys/stand/efiboot/efiblock.c:1.16 --- src/sys/stand/efiboot/efiblock.c:1.15 Tue Jun 22 21:56:51 2021 +++ src/sys/stand/efiboot/efiblock.c Wed Jun 23 20:55:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: efiblock.c,v 1.15 2021/06/22 21:56:51 jmcneill Exp $ */ +/* $NetBSD: efiblock.c,v 1.16 2021/06/23 20:55:50 jmcneill Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -133,7 +133,9 @@ efi_block_do_read_blockio(struct efi_blo blkbuf_offset = off % bdev->bio->Media->BlockSize; blkbuf_size = (lba_end - lba_start) * bdev->bio->Media->BlockSize; if (bdev->bio->Media->IoAlign > 1) { - blkbuf_size += bdev->bio->Media->IoAlign - 1; + blkbuf_size = (blkbuf_size + bdev->bio-Media->IoAlign - 1) / + bdev->bio->Media->IoAlign * + bdev->bio->Media->IoAlign; } blkbuf = AllocatePool(blkbuf_size);
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Wed Jun 23 21:42:43 UTC 2021 Modified Files: src/sys/stand/efiboot: efiblock.c Log Message: fix typo To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/stand/efiboot/efiblock.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/stand/efiboot/efiblock.c diff -u src/sys/stand/efiboot/efiblock.c:1.16 src/sys/stand/efiboot/efiblock.c:1.17 --- src/sys/stand/efiboot/efiblock.c:1.16 Wed Jun 23 20:55:50 2021 +++ src/sys/stand/efiboot/efiblock.c Wed Jun 23 21:42:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: efiblock.c,v 1.16 2021/06/23 20:55:50 jmcneill Exp $ */ +/* $NetBSD: efiblock.c,v 1.17 2021/06/23 21:42:43 jmcneill Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -133,7 +133,7 @@ efi_block_do_read_blockio(struct efi_blo blkbuf_offset = off % bdev->bio->Media->BlockSize; blkbuf_size = (lba_end - lba_start) * bdev->bio->Media->BlockSize; if (bdev->bio->Media->IoAlign > 1) { - blkbuf_size = (blkbuf_size + bdev->bio-Media->IoAlign - 1) / + blkbuf_size = (blkbuf_size + bdev->bio->Media->IoAlign - 1) / bdev->bio->Media->IoAlign * bdev->bio->Media->IoAlign; }
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Wed Jun 23 21:43:38 UTC 2021 Modified Files: src/sys/stand/efiboot: boot.c Log Message: When printing memory size, don't promote to next unit size unless it is at two digits. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/stand/efiboot/boot.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/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.33 src/sys/stand/efiboot/boot.c:1.34 --- src/sys/stand/efiboot/boot.c:1.33 Wed Jun 23 00:38:12 2021 +++ src/sys/stand/efiboot/boot.c Wed Jun 23 21:43:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.33 2021/06/23 00:38:12 jmcneill Exp $ */ +/* $NetBSD: boot.c,v 1.34 2021/06/23 21:43:38 jmcneill Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -479,7 +479,7 @@ format_bytes(uint64_t val, uint64_t *pdi *punit = "bytes"; *pdiv = 1; - for (n = 0; n < __arraycount(units) && val >= 1024; n++) { + for (n = 0; n < __arraycount(units) && val >= 1024 * 10; n++) { *punit = units[n]; *pdiv *= 1024; val /= 1024;
CVS commit: src/sys/arch/i386/stand/bootxx
Module Name:src Committed By: gutteridge Date: Thu Jun 24 01:23:17 UTC 2021 Modified Files: src/sys/arch/i386/stand/bootxx: boot1.c Log Message: boot1.c: remove a comment that's no longer relevant/correct In r. 1.13, a check of the return value in fd was removed, and a comment about this ("...so keep going") added. Then in r. 1.19, the fd return value check was reinstated (as the true underlying errno could be masked by the fstat() call), so there is no "keep going" happening anymore. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/stand/bootxx/boot1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/bootxx/boot1.c diff -u src/sys/arch/i386/stand/bootxx/boot1.c:1.20 src/sys/arch/i386/stand/bootxx/boot1.c:1.21 --- src/sys/arch/i386/stand/bootxx/boot1.c:1.20 Thu Jan 6 01:08:48 2011 +++ src/sys/arch/i386/stand/bootxx/boot1.c Thu Jun 24 01:23:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: boot1.c,v 1.20 2011/01/06 01:08:48 jakllsch Exp $ */ +/* $NetBSD: boot1.c,v 1.21 2021/06/24 01:23:16 gutteridge Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: boot1.c,v 1.20 2011/01/06 01:08:48 jakllsch Exp $"); +__RCSID("$NetBSD: boot1.c,v 1.21 2021/06/24 01:23:16 gutteridge Exp $"); #include #include @@ -106,7 +106,6 @@ boot1(uint32_t biosdev, uint64_t *sector fd = ob(); done: - /* if we fail here, so will fstat, so keep going */ if (fd == -1 || fstat(fd, &sb) == -1) return "Can't open /boot\r\n";
CVS commit: src/lib/libcurses
Module Name:src Committed By: blymn Date: Thu Jun 24 05:53:05 UTC 2021 Modified Files: src/lib/libcurses: slk.c Log Message: Make sure we don't use wide char routines when DISABLE_WCHAR is in effect. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/slk.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/libcurses/slk.c diff -u src/lib/libcurses/slk.c:1.9 src/lib/libcurses/slk.c:1.10 --- src/lib/libcurses/slk.c:1.9 Tue Jun 22 07:26:45 2021 +++ src/lib/libcurses/slk.c Thu Jun 24 05:53:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: slk.c,v 1.9 2021/06/22 07:26:45 blymn Exp $ */ +/* $NetBSD: slk.c,v 1.10 2021/06/24 05:53:05 blymn Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: slk.c,v 1.9 2021/06/22 07:26:45 blymn Exp $"); +__RCSID("$NetBSD: slk.c,v 1.10 2021/06/24 05:53:05 blymn Exp $"); #endif/* not lint */ #include @@ -818,9 +818,11 @@ __slk_draw(SCREEN *screen, int labnum) { const struct __slk_label *l; int retval, inc, lcnt, tx; + char ts[MB_CUR_MAX]; +#ifdef HAVE_WCHAR cchar_t cc; wchar_t wc[2]; - char ts[MB_CUR_MAX]; +#endif if (screen->slk_hidden) return OK; @@ -855,23 +857,35 @@ __slk_draw(SCREEN *screen, int labnum) __CTRACE(__CTRACE_INPUT, "__slk_draw: label len %d, wcwidth %d\n", screen->slk_label_len, wcwidth(l->label[lcnt])); #endif +#ifdef HAVE_WCHAR wc[0] = l->label[lcnt]; wc[1] = L'\0'; if (setcchar(&cc, wc, screen->slk_window->wattr, 0, NULL) == ERR) return ERR; +#endif if (l->x + wcwidth(l->label[lcnt] + tx) >= screen->slk_label_len) { /* last character that will fit * so insert it to avoid scroll */ +#ifdef HAVE_WCHAR retval = mvwins_wch(screen->slk_window, 0, l->x + tx, &cc); +#else + retval = mvwinsch(screen->slk_window, + 0, l->x + tx, l->label[lcnt]); +#endif } else { +#ifdef HAVE_WCHAR retval = mvwadd_wch(screen->slk_window, 0, l->x + tx, &cc); +#else + retval = mvwaddch(screen->slk_window, + 0, l->x + tx, l->label[lcnt]); +#endif } tx += wcwidth(l->label[lcnt]); lcnt += inc;