CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd
Module Name:xsrc Committed By: joerg Date: Wed Jun 2 00:33:22 UTC 2021 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd: ppc_video.c Log Message: Provide canonical declaration of IOPortBase for MIPS here, too. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.11 xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.12 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.11 Tue Sep 27 19:10:47 2016 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c Wed Jun 2 00:33:22 2021 @@ -59,7 +59,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) volatile unsigned char *ioBase = MAP_FAILED; /* XXX why the hell is this necessary?! */ -#ifdef __arm__ +#if defined(__arm__) || defined(__mips__) unsigned int IOPortBase = (int)MAP_FAILED; #endif
CVS commit: src/external/mit/xorg/server/drivers
Module Name:src Committed By: joerg Date: Mon May 31 21:45:41 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers: Makefile.xf86-driver src/external/mit/xorg/server/drivers/xf86-video-amdgpu: Makefile Log Message: Stop using -fcommon, xsrc should be fixed. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 \ src/external/mit/xorg/server/drivers/Makefile.xf86-driver cvs rdiff -u -r1.2 -r1.3 \ src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/Makefile.xf86-driver diff -u src/external/mit/xorg/server/drivers/Makefile.xf86-driver:1.27 src/external/mit/xorg/server/drivers/Makefile.xf86-driver:1.28 --- src/external/mit/xorg/server/drivers/Makefile.xf86-driver:1.27 Mon Apr 12 03:57:06 2021 +++ src/external/mit/xorg/server/drivers/Makefile.xf86-driver Mon May 31 21:45:41 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xf86-driver,v 1.27 2021/04/12 03:57:06 mrg Exp $ +# $NetBSD: Makefile.xf86-driver,v 1.28 2021/05/31 21:45:41 joerg Exp $ LIBISMODULE= yes SHLIB_MAJOR= ${PACKAGE_MAJOR} @@ -49,9 +49,6 @@ CPPFLAGS+= -DPACKAGE_VERSION_MINOR=${PAC CPPFLAGS+= -DPACKAGE_VERSION_PATCHLEVEL=${PACKAGE_PATCH} CPPFLAGS+= -DXORG_VERSION_CURRENT=${XORG_VERSION_CURRENT} -# IOPortBase is particularly annoying to fix -COPTS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -fcommon :} - .PATH: ${X11SRCDIR.${DRIVER}}/src .PATH: ${X11SRCDIR.${DRIVER}}/man .PATH: ${X11SRCDIR.${DRIVER}} Index: src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile:1.2 src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile:1.3 --- src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile:1.2 Sun May 30 22:24:35 2021 +++ src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile Mon May 31 21:45:41 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2021/05/30 22:24:35 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2021/05/31 21:45:41 joerg Exp $ .include @@ -26,6 +26,5 @@ CPPFLAGS+= -I${DESTDIR}${X11INCDIR}/X11 # XXX COPTS+= -Wno-error -COPTS+= -fcommon .include "../Makefile.xf86-driver"
CVS commit: xsrc/external/mit
Module Name:xsrc Committed By: joerg Date: Mon May 31 21:44:20 UTC 2021 Modified Files: xsrc/external/mit/xf86-video-amdgpu/dist/src: drmmode_display.h xsrc/external/mit/xf86-video-ati-kms/dist/src: drmmode_display.h xsrc/external/mit/xf86-video-chips/dist/util: AsmMacros.h xsrc/external/mit/xf86-video-geode/dist/src: geode.h gx_video.c lx_driver.c panel.c xsrc/external/mit/xf86-video-geode/dist/src/panel: panel.c xsrc/external/mit/xf86-video-intel-2014/dist/src/legacy/i810: i810.h xsrc/external/mit/xf86-video-intel/dist/src/legacy/i810: i810.h xsrc/external/mit/xf86-video-openchrome/dist/src: via_driver.h via_sii164.h via_vt1632.h xsrc/external/mit/xorg-server.old/dist/hw/xfree86/common: compiler.h xsrc/external/mit/xorg-server/dist/hw/xfree86/common: compiler.h Log Message: Avoid multiple definitions of the same variable. To generate a diff of this commit: cvs rdiff -u -r1.1.1.7 -r1.2 \ xsrc/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h cvs rdiff -u -r1.1.1.9 -r1.2 \ xsrc/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.h cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/xf86-video-chips/dist/util/AsmMacros.h cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xf86-video-geode/dist/src/geode.h \ xsrc/external/mit/xf86-video-geode/dist/src/lx_driver.c cvs rdiff -u -r1.2 -r1.3 \ xsrc/external/mit/xf86-video-geode/dist/src/gx_video.c \ xsrc/external/mit/xf86-video-geode/dist/src/panel.c cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/xf86-video-geode/dist/src/panel/panel.c cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xf86-video-intel-2014/dist/src/legacy/i810/i810.h cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/xf86-video-intel/dist/src/legacy/i810/i810.h cvs rdiff -u -r1.8 -r1.9 \ xsrc/external/mit/xf86-video-openchrome/dist/src/via_driver.h cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xf86-video-openchrome/dist/src/via_sii164.h cvs rdiff -u -r1.1.1.3 -r1.2 \ xsrc/external/mit/xf86-video-openchrome/dist/src/via_vt1632.h cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xorg-server.old/dist/hw/xfree86/common/compiler.h cvs rdiff -u -r1.16 -r1.17 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h diff -u xsrc/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h:1.1.1.7 xsrc/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h:1.2 --- xsrc/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h:1.1.1.7 Sat Jun 1 06:38:21 2019 +++ xsrc/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h Mon May 31 21:44:19 2021 @@ -289,7 +289,7 @@ Bool drmmode_wait_vblank(xf86CrtcPtr crt uint64_t *ust, uint32_t *result_seq); -miPointerSpriteFuncRec drmmode_sprite_funcs; +extern miPointerSpriteFuncRec drmmode_sprite_funcs; #endif Index: xsrc/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.h diff -u xsrc/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.h:1.1.1.9 xsrc/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.h:1.2 --- xsrc/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.h:1.1.1.9 Sat Jun 1 07:24:16 2019 +++ xsrc/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.h Mon May 31 21:44:19 2021 @@ -262,7 +262,7 @@ Bool drmmode_wait_vblank(xf86CrtcPtr crt uint64_t *ust, uint32_t *result_seq); -miPointerSpriteFuncRec drmmode_sprite_funcs; +extern miPointerSpriteFuncRec drmmode_sprite_funcs; #endif Index: xsrc/external/mit/xf86-video-chips/dist/util/AsmMacros.h diff -u xsrc/external/mit/xf86-video-chips/dist/util/AsmMacros.h:1.1.1.2 xsrc/external/mit/xf86-video-chips/dist/util/AsmMacros.h:1.2 --- xsrc/external/mit/xf86-video-chips/dist/util/AsmMacros.h:1.1.1.2 Wed Jun 10 00:46:36 2009 +++ xsrc/external/mit/xf86-video-chips/dist/util/AsmMacros.h Mon May 31 21:44:19 2021 @@ -129,7 +129,7 @@ unsigned long port; } #else #ifdef __arm32__ -unsigned int IOPortBase; /* Memory mapped I/O port area */ +extern unsigned int IOPortBase; /* Memory mapped I/O port area */ static __inline__ void outb(port, val) Index: xsrc/external/mit/xf86-video-geode/dist/src/geode.h diff -u xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.6 xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.7 --- xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.6 Tue Jan 1 00:34:52 2019 +++ xsrc/external/mit/xf86-video-geode/dist/src/geode.h Mon May 31 21:44:19 2021 @@ -343,7 +343,7 @@ typedef struct _geodeRec { /* option flags are self-explanatory */ #ifdef HAVE_LX -enum { +enum LX_GeodeOpts { LX_OPTION_SW_CURSOR, LX_OPTION_HW_CURSOR, LX_OPTION_NOCOMPRESSION, @@ -357,11 +357,11 @@ enum { LX_OPTION_FBSIZE, LX_OPTION_PANEL_MODE,
CVS commit: src/external/mit/xorg/server/drivers/xf86-video-geode
Module Name:src Committed By: joerg Date: Mon May 31 00:04:15 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-geode: Makefile Log Message: Use -fcommon To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile:1.6 src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile:1.7 --- src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile:1.6 Tue Jan 1 00:37:06 2019 +++ src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile Mon May 31 00:04:15 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2019/01/01 00:37:06 mrg Exp $ +# $NetBSD: Makefile,v 1.7 2021/05/31 00:04:15 joerg Exp $ DRIVER= xf86-video-geode DRIVER_NAME= geode_drv @@ -54,6 +54,8 @@ COPTS.lx_panel.c+= -Wno-error # XXX CWARNFLAGS.clang+= -Wno-empty-body +COPTS+= -fcommon + .include "../Makefile.xf86-driver" XORG_PKG_VER_PROG= ${DRIVER}
CVS commit: src/external/mit/xorg/server/drivers
Module Name:src Committed By: joerg Date: Sun May 30 22:24:36 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-amdgpu: Makefile src/external/mit/xorg/server/drivers/xf86-video-intel: Makefile src/external/mit/xorg/server/drivers/xf86-video-openchrome: Makefile src/external/mit/xorg/server/drivers/xf86-video-radeon-kms: Makefile Log Message: Various X drivers still need -fcommon, so add it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile cvs rdiff -u -r1.33 -r1.34 \ src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile cvs rdiff -u -r1.16 -r1.17 \ src/external/mit/xorg/server/drivers/xf86-video-openchrome/Makefile cvs rdiff -u -r1.12 -r1.13 \ src/external/mit/xorg/server/drivers/xf86-video-radeon-kms/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile:1.1 src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile:1.2 --- src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile:1.1 Thu Aug 18 07:49:09 2016 +++ src/external/mit/xorg/server/drivers/xf86-video-amdgpu/Makefile Sun May 30 22:24:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2016/08/18 07:49:09 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2021/05/30 22:24:35 joerg Exp $ .include @@ -25,6 +25,7 @@ CPPFLAGS+= -I${DESTDIR}${X11INCDIR}/X11 -I${X11SRCDIR.${DRIVER}}/../include # XXX -COPTS+= -Wno-error +COPTS+= -Wno-error +COPTS+= -fcommon .include "../Makefile.xf86-driver" Index: src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.33 src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.34 --- src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.33 Mon Sep 7 00:24:37 2020 +++ src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile Sun May 30 22:24:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2020/09/07 00:24:37 mrg Exp $ +# $NetBSD: Makefile,v 1.34 2021/05/30 22:24:35 joerg Exp $ .include @@ -218,6 +218,8 @@ SRCS+= i810_xaa.c CWARNFLAGS.clang+= -Wno-parentheses -Wno-tautological-compare \ -Wno-empty-body -Wno-error +COPTS+= -fcommon + COPTS.sna_display.c+= -Wno-stack-protector COPTS.sna_threads.c+= -Wno-stack-protector COPTS.sna_trapezoids.c+= -Wno-stack-protector Index: src/external/mit/xorg/server/drivers/xf86-video-openchrome/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-openchrome/Makefile:1.16 src/external/mit/xorg/server/drivers/xf86-video-openchrome/Makefile:1.17 --- src/external/mit/xorg/server/drivers/xf86-video-openchrome/Makefile:1.16 Tue Jan 1 00:37:06 2019 +++ src/external/mit/xorg/server/drivers/xf86-video-openchrome/Makefile Sun May 30 22:24:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2019/01/01 00:37:06 mrg Exp $ +# $NetBSD: Makefile,v 1.17 2021/05/30 22:24:36 joerg Exp $ DRIVER= xf86-video-openchrome DRIVER_NAME= openchrome_drv @@ -43,6 +43,8 @@ CPPFLAGS+= -I${X11SRCDIR.${DRIVER}}/src CPPFLAGS+= -DHAVE_CONFIG_H -I${X11SRCDIR.${DRIVER}}/../include CPPFLAGS+= -DHAVE_XF86_CURSOR_RESET_CURSOR +COPTS+= -fcommon + .include "../Makefile.xf86-driver" # XXX Index: src/external/mit/xorg/server/drivers/xf86-video-radeon-kms/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-radeon-kms/Makefile:1.12 src/external/mit/xorg/server/drivers/xf86-video-radeon-kms/Makefile:1.13 --- src/external/mit/xorg/server/drivers/xf86-video-radeon-kms/Makefile:1.12 Sun Feb 9 12:28:28 2020 +++ src/external/mit/xorg/server/drivers/xf86-video-radeon-kms/Makefile Sun May 30 22:24:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2020/02/09 12:28:28 jmcneill Exp $ +# $NetBSD: Makefile,v 1.13 2021/05/30 22:24:36 joerg Exp $ .include @@ -61,4 +61,6 @@ CPPFLAGS+= -I${DESTDIR}${X11INCDIR}/X11 LIBDPLIBS+= gbm ${.CURDIR}/../../../lib/libgbm${OLD_PREFIX} +COPTS+= -fcommon + .include "../Makefile.xf86-driver"
CVS commit: [LLVM] src/external/apache2/llvm/dist
Module Name:src Committed By: joerg Date: Sun May 30 02:58:42 UTC 2021 Removed Files: src/external/apache2/llvm/dist/clang [LLVM]: .arcconfig src/external/apache2/llvm/dist/clang/docs [LLVM]: AttributeReference.rst DiagnosticsReference.rst src/external/apache2/llvm/dist/clang/include/clang/Basic [LLVM]: BuiltinsLe64.def FixedPoint.h SanitizerBlacklist.h src/external/apache2/llvm/dist/clang/include/clang/Driver [LLVM]: CC1Options.td CLCompatOptions.td src/external/apache2/llvm/dist/clang/include/clang/Serialization [LLVM]: Module.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Core [LLVM]: IssueHash.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Core/PathSensitive [LLVM]: SubEngine.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Frontend [LLVM]: CheckerRegistration.h src/external/apache2/llvm/dist/clang/include/clang/Tooling/Core [LLVM]: Lookup.h src/external/apache2/llvm/dist/clang/lib/AST/Interp [LLVM]: Block.cpp Block.h src/external/apache2/llvm/dist/clang/lib/Basic [LLVM]: FixedPoint.cpp SanitizerBlacklist.cpp src/external/apache2/llvm/dist/clang/lib/Frontend [LLVM]: FrontendTiming.cpp src/external/apache2/llvm/dist/clang/lib/Headers/openmp_wrappers [LLVM]: __clang_openmp_math.h __clang_openmp_math_declares.h src/external/apache2/llvm/dist/clang/lib/Index [LLVM]: SimpleFormatContext.h src/external/apache2/llvm/dist/clang/lib/Serialization [LLVM]: Module.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Checkers [LLVM]: IteratorChecker.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Core [LLVM]: IssueHash.cpp SubEngine.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Frontend [LLVM]: CheckerRegistration.cpp src/external/apache2/llvm/dist/clang/lib/Tooling/Core [LLVM]: Lookup.cpp src/external/apache2/llvm/dist/clang/tools/scan-view/share [LLVM]: FileRadar.scpt GetRadarVersion.scpt src/external/apache2/llvm/dist/clang/utils/TableGen [LLVM]: ClangASTEmitters.h src/external/apache2/llvm/dist/llvm [LLVM]: .arcconfig LLVMBuild.txt src/external/apache2/llvm/dist/llvm/bindings [LLVM]: LLVMBuild.txt src/external/apache2/llvm/dist/llvm/cmake/modules [LLVM]: CheckLinkerFlag.cmake src/external/apache2/llvm/dist/llvm/docs [LLVM]: LLVMBuild.rst LLVMBuild.txt src/external/apache2/llvm/dist/llvm/docs/AMDGPU [LLVM]: gfx9_mad_type_dev.rst src/external/apache2/llvm/dist/llvm/docs/CommandGuide [LLVM]: llvm-build.rst src/external/apache2/llvm/dist/llvm/docs/TableGen [LLVM]: Deficiencies.rst LangIntro.rst LangRef.rst src/external/apache2/llvm/dist/llvm/docs/tutorial [LLVM]: BuildingAJIT5.rst OCamlLangImpl1.rst OCamlLangImpl2.rst OCamlLangImpl3.rst OCamlLangImpl4.rst OCamlLangImpl5.rst OCamlLangImpl6.rst OCamlLangImpl7.rst OCamlLangImpl8.rst src/external/apache2/llvm/dist/llvm/examples [LLVM]: LLVMBuild.txt src/external/apache2/llvm/dist/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5 [LLVM]: CMakeLists.txt KaleidoscopeJIT.h RemoteJITUtils.h toy.cpp src/external/apache2/llvm/dist/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server [LLVM]: CMakeLists.txt server.cpp src/external/apache2/llvm/dist/llvm/examples/LLJITExamples [LLVM]: CMakeLists.txt ExampleModules.h src/external/apache2/llvm/dist/llvm/examples/LLJITExamples/LLJITWithJITLink [LLVM]: CMakeLists.txt LLJITWithJITLink.cpp src/external/apache2/llvm/dist/llvm/examples/LLJITExamples/LLJITWithObjectCache [LLVM]: CMakeLists.txt LLJITWithObjectCache.cpp src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter2 [LLVM]: _tags ast.ml lexer.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter3 [LLVM]: _tags ast.ml codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter4 [LLVM]: _tags ast.ml bindings.c codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter5 [LLVM]: _tags ast.ml bindings.c codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml
CVS commit: src/doc
Module Name:src Committed By: joerg Date: Sun May 30 02:29:24 UTC 2021 Modified Files: src/doc: TODO.clang Log Message: Drop a number of entries that no longer apply. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/doc/TODO.clang Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.clang diff -u src/doc/TODO.clang:1.24 src/doc/TODO.clang:1.25 --- src/doc/TODO.clang:1.24 Sat Feb 6 22:00:59 2021 +++ src/doc/TODO.clang Sun May 30 02:29:24 2021 @@ -1,4 +1,4 @@ -$NetBSD: TODO.clang,v 1.24 2021/02/06 22:00:59 joerg Exp $ +$NetBSD: TODO.clang,v 1.25 2021/05/30 02:29:24 joerg Exp $ Hacks for the clang integration --- @@ -14,21 +14,8 @@ src/external/gpl3/gcc/usr.bin/backend src/external/mit/xorg/lib/pixman uses -fno-integrated-as on ARM for the macro (ab)use. -src/external/libc++/lib -Avoid clang bug on earm with SSP/FORTIFY: -rt_libelftc_dem_gnu3.c:3567:3: warning: '__builtin___memset_chk' -will always overflow destination buffer [-Wbuiltin-memcpy-chk-size] - memset(, 0, FLOAT_EXTENED_BYTES); - src/external/mit/xorg/lib/gallium has atomic alignment issues and uses unknown pragma src/external/mpl/bind/ has atomic alignment issues - -src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h -hack around tls_model("initial_exec") on powerpc - -src/tests/libexec/ld.elf_so/Makefile.inc -use -msecure-plt on powerpc for ifuncs -
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: joerg Date: Sun May 30 02:28:59 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Don't use V8 atomic instruction for AA32 mode. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/include/lock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/lock.h diff -u src/sys/arch/arm/include/lock.h:1.38 src/sys/arch/arm/include/lock.h:1.39 --- src/sys/arch/arm/include/lock.h:1.38 Tue Apr 27 06:03:09 2021 +++ src/sys/arch/arm/include/lock.h Sun May 30 02:28:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.38 2021/04/27 06:03:09 skrll Exp $ */ +/* $NetBSD: lock.h,v 1.39 2021/05/30 02:28:59 joerg Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -204,7 +204,7 @@ static __inline void __unused __cpu_simple_unlock(__cpu_simple_lock_t *__alp) { -#if defined(_ARM_ARCH_8) +#if defined(_ARM_ARCH_8) && defined(__LP64__) if (sizeof(*__alp) == 1) { __asm __volatile("stlrb\t%w0, [%1]" :: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory");
CVS commit: src/usr.sbin/bootp/common
Module Name:src Committed By: joerg Date: Sun May 30 02:28:35 UTC 2021 Modified Files: src/usr.sbin/bootp/common: Makefile Log Message: address-of-packed-member warning is no longer a problem here. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/bootp/common/Makefile 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/bootp/common/Makefile diff -u src/usr.sbin/bootp/common/Makefile:1.9 src/usr.sbin/bootp/common/Makefile:1.10 --- src/usr.sbin/bootp/common/Makefile:1.9 Sun Sep 6 07:20:31 2020 +++ src/usr.sbin/bootp/common/Makefile Sun May 30 02:28:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2020/09/06 07:20:31 mrg Exp $ +# $NetBSD: Makefile,v 1.10 2021/05/30 02:28:35 joerg Exp $ LIBISPRIVATE= yes @@ -7,7 +7,6 @@ SRCS= dovend.c dumptab.c getif.c hash.c report.c tzone.c CPPFLAGS+= -DETC_ETHERS -DSYSLOG -DDEBUG -CWARNFLAGS.clang+= -Wno-error=address-of-packed-member CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER} .include
CVS commit: src/tests/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Sun May 30 02:26:51 UTC 2021 Modified Files: src/tests/libexec/ld.elf_so: Makefile Makefile.inc Log Message: Drop explicit -msecure-plt, it's the default for both clang and gcc. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/libexec/ld.elf_so/Makefile cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/libexec/ld.elf_so/Makefile diff -u src/tests/libexec/ld.elf_so/Makefile:1.11 src/tests/libexec/ld.elf_so/Makefile:1.12 --- src/tests/libexec/ld.elf_so/Makefile:1.11 Tue Sep 22 01:09:32 2020 +++ src/tests/libexec/ld.elf_so/Makefile Sun May 30 02:26:51 2021 @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.11 2020/09/22 01:09:32 kamil Exp $ +# $NetBSD: Makefile,v 1.12 2021/05/30 02:26:51 joerg Exp $ # NOMAN= # defined -.include "Makefile.inc" .include .if ${MKPIC} != "no" Index: src/tests/libexec/ld.elf_so/Makefile.inc diff -u src/tests/libexec/ld.elf_so/Makefile.inc:1.2 src/tests/libexec/ld.elf_so/Makefile.inc:1.3 --- src/tests/libexec/ld.elf_so/Makefile.inc:1.2 Tue May 14 19:07:07 2019 +++ src/tests/libexec/ld.elf_so/Makefile.inc Sun May 30 02:26:51 2021 @@ -1,5 +1 @@ .include "../Makefile.inc" - -.if ${MACHINE_ARCH} == "powerpc" -CFLAGS += -msecure-plt -.endif
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Sun May 30 02:26:08 UTC 2021 Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: Don't use the return address hack with clang. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/libexec/ld.elf_so/rtld.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.207 src/libexec/ld.elf_so/rtld.c:1.208 --- src/libexec/ld.elf_so/rtld.c:1.207 Tue Sep 22 00:41:27 2020 +++ src/libexec/ld.elf_so/rtld.c Sun May 30 02:26:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $ */ +/* $NetBSD: rtld.c,v 1.208 2021/05/30 02:26:08 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.208 2021/05/30 02:26:08 joerg Exp $"); #endif /* not lint */ #include @@ -1118,7 +1118,7 @@ _rtld_objmain_sym(const char *name) return NULL; } -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) static __noinline void * hackish_return_address(void) { @@ -1284,7 +1284,7 @@ dlsym(void *handle, const char *name) dbg(("dlsym of %s in %p", name, handle)); -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) retaddr = hackish_return_address(); #else retaddr = __builtin_return_address(0); @@ -1309,7 +1309,7 @@ dlvsym(void *handle, const char *name, c ver_entry.flags = 0; ventry = _entry; } -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) retaddr = hackish_return_address(); #else retaddr = __builtin_return_address(0); @@ -1407,7 +1407,7 @@ dlinfo(void *handle, int req, void *v) _rtld_shared_enter(); if (handle == RTLD_SELF) { -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) retaddr = hackish_return_address(); #else retaddr = __builtin_return_address(0);
CVS commit: src/lib/libc/gmon
Module Name:src Committed By: joerg Date: Sun May 30 02:24:05 UTC 2021 Modified Files: src/lib/libc/gmon: Makefile.inc Log Message: Don't warn about frame pointer use for clang either. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gmon/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gmon/Makefile.inc diff -u src/lib/libc/gmon/Makefile.inc:1.14 src/lib/libc/gmon/Makefile.inc:1.15 --- src/lib/libc/gmon/Makefile.inc:1.14 Sun Jan 6 18:14:10 2019 +++ src/lib/libc/gmon/Makefile.inc Sun May 30 02:24:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14 2019/01/06 18:14:10 christos Exp $ +# $NetBSD: Makefile.inc,v 1.15 2021/05/30 02:24:05 joerg Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # gmon sources @@ -23,6 +23,7 @@ COPTS.mcount.c+=${${ACTIVE_CXX} == "gcc" # The usage of __builtin_frame_address(1) should be OK. COPTS.mcount.c+=${${ACTIVE_CXX} == "gcc":? -Wno-error=frame-address :} .endif +COPTS.mcount.c+=${${ACTIVE_CC} == "clang":? -Wno-error=frame-address :} # mcount and gmon cannot be compiled with profiling
CVS commit: src/external/gpl3/gdb/lib/libgdb
Module Name:src Committed By: joerg Date: Sun May 30 02:23:25 UTC 2021 Modified Files: src/external/gpl3/gdb/lib/libgdb: Makefile Log Message: Always use C++17 string_view, the emulation is just broken. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/external/gpl3/gdb/lib/libgdb/Makefile 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/gdb/lib/libgdb/Makefile diff -u src/external/gpl3/gdb/lib/libgdb/Makefile:1.29 src/external/gpl3/gdb/lib/libgdb/Makefile:1.30 --- src/external/gpl3/gdb/lib/libgdb/Makefile:1.29 Sun Dec 6 04:08:53 2020 +++ src/external/gpl3/gdb/lib/libgdb/Makefile Sun May 30 02:23:25 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2020/12/06 04:08:53 christos Exp $ +# $NetBSD: Makefile,v 1.30 2021/05/30 02:23:25 joerg Exp $ NOCTF= HOSTPROG_CXX= 1 @@ -47,7 +47,7 @@ CWARNFLAGS.clang+= -Wno-switch CWARNFLAGS.clang+= -Wno-deprecated HOST_CC:= ${HOST_CXX} CC:= ${CXX} -CFLAGS:= ${CXXFLAGS} -std=gnu++11 -Wno-error=stack-protector +CFLAGS:= ${CXXFLAGS} -std=gnu++17 -Wno-error=stack-protector .PATH: ${DIST}/gdb ${DIST}/gdb/arch ${DIST}/gdb/mi ${DIST}/gdb/cli \ ${DIST}/gdb/tui ${DIST}/gdb/python ${DIST}/gdb/common ${DIST}/gdb/target \
CVS commit: src/external/mit/xorg/server/drivers/xf86-video-pnozz
Module Name:src Committed By: joerg Date: Sun May 30 02:22:19 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-pnozz: Makefile Log Message: Ignore pointer sign cast issues with clang. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile:1.2 src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile:1.3 --- src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile:1.2 Thu May 27 04:53:44 2021 +++ src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile Sun May 30 02:22:19 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2021/05/27 04:53:44 jdc Exp $ +# $NetBSD: Makefile,v 1.3 2021/05/30 02:22:19 joerg Exp $ DRIVER= xf86-video-pnozz DRIVER_NAME= pnozz_drv @@ -14,3 +14,4 @@ MAN= pnozz.4 # XXX COPTS.pnozz_accel.c+= ${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :} COPTS.pnozz_accel.c+= ${${ACTIVE_CC} == "clang":? -Wno-error=incompatible-pointer-types-discards-qualifiers :} +COPTS.pnozz_cursor.c+= ${${ACTIVE_CC} == "clang":? -Wno-error=pointer-sign :}
CVS commit: src/external/mit/xorg/lib/libXaw
Module Name:src Committed By: joerg Date: Sun May 30 02:20:09 UTC 2021 Modified Files: src/external/mit/xorg/lib/libXaw: Makefile Makefile.common Log Message: Ignore pointer cast warnings for clang, too. Use -Wno-format more selectively. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/mit/xorg/lib/libXaw/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/lib/libXaw/Makefile.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/libXaw/Makefile diff -u src/external/mit/xorg/lib/libXaw/Makefile:1.16 src/external/mit/xorg/lib/libXaw/Makefile:1.17 --- src/external/mit/xorg/lib/libXaw/Makefile:1.16 Mon Apr 26 21:53:53 2021 +++ src/external/mit/xorg/lib/libXaw/Makefile Sun May 30 02:20:09 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2021/04/26 21:53:53 mrg Exp $ +# $NetBSD: Makefile,v 1.17 2021/05/30 02:20:09 joerg Exp $ .include @@ -66,5 +66,3 @@ X11EXTRAMANTRANSFORMS+= \ .include .include - -CWARNFLAGS.clang+= -Wno-format Index: src/external/mit/xorg/lib/libXaw/Makefile.common diff -u src/external/mit/xorg/lib/libXaw/Makefile.common:1.2 src/external/mit/xorg/lib/libXaw/Makefile.common:1.3 --- src/external/mit/xorg/lib/libXaw/Makefile.common:1.2 Tue May 4 17:47:05 2021 +++ src/external/mit/xorg/lib/libXaw/Makefile.common Sun May 30 02:20:09 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.2 2021/05/04 17:47:05 rillig Exp $ +# $NetBSD: Makefile.common,v 1.3 2021/05/30 02:20:09 joerg Exp $ CPPFLAGS+= -DHAVE_WCHAR_H \ -DHAVE_WCTYPE_H \ @@ -17,5 +17,8 @@ LIBDPLIBS=\ Xext ${.CURDIR}/../libXext \ X11 ${.CURDIR}/../libX11/dynamic +COPTS.Converters.c+= ${${ACTIVE_CC} == "clang":? -Wno-format :} COPTS.Pixmap.c+= ${${ACTIVE_CC} == "gcc":? -Wno-discarded-qualifiers :} +COPTS.Pixmap.c+= ${${ACTIVE_CC} == "clang":? -Wno-incompatible-pointer-types-discards-qualifiers :} COPTS.TextAction.c+= ${${ACTIVE_CC} == "gcc":? -Wno-discarded-qualifiers :} +COPTS.TextAction.c+= ${${ACTIVE_CC} == "clang":? -Wno-incompatible-pointer-types-discards-qualifiers :}
CVS commit: xsrc/external/mit/MesaLib/dist/src
Module Name:xsrc Committed By: joerg Date: Sun May 30 01:53:31 UTC 2021 Modified Files: xsrc/external/mit/MesaLib/dist/src/amd/common: ac_llvm_helper.cpp xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm: lp_bld_format_srgb.c lp_bld_init.c lp_bld_misc.cpp Log Message: Support LLVM 13, mostly from upstream. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c cvs rdiff -u -r1.1.1.4 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp diff -u xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp:1.2 --- xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp:1.1.1.2 Tue Sep 24 16:31:46 2019 +++ xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp Sun May 30 01:53:30 2021 @@ -34,6 +34,7 @@ #include "ac_llvm_build.h" #include +#include #include #include #include @@ -129,9 +130,15 @@ struct ac_compiler_passes *ac_create_llv llvm::TargetMachine *TM = reinterpret_cast(tm); +#if HAVE_LLVM < 0x900 if (TM->addPassesToEmitFile(p->passmgr, p->ostream, nullptr, llvm::TargetMachine::CGFT_ObjectFile)) { +#else + if (TM->addPassesToEmitFile(p->passmgr, p->ostream, +nullptr, +llvm::CGFT_ObjectFile)) { +#endif fprintf(stderr, "amd: TargetMachine can't emit a file of this type!\n"); delete p; return NULL; @@ -214,6 +221,9 @@ LLVMValueRef ac_build_atomic_rmw(struct unsigned SSID = llvm::unwrap(ctx->context)->getOrInsertSyncScopeID(sync_scope); return llvm::wrap(llvm::unwrap(ctx->builder)->CreateAtomicRMW( binop, llvm::unwrap(ptr), llvm::unwrap(val), +#if LLVM_VERSION_MAJOR >= 13 + llvm::MaybeAlign(0), +#endif llvm::AtomicOrdering::SequentiallyConsistent, SSID)); } @@ -223,6 +233,9 @@ LLVMValueRef ac_build_atomic_cmp_xchg(st unsigned SSID = llvm::unwrap(ctx->context)->getOrInsertSyncScopeID(sync_scope); return llvm::wrap(llvm::unwrap(ctx->builder)->CreateAtomicCmpXchg( llvm::unwrap(ptr), llvm::unwrap(cmp), llvm::unwrap(val), +#if LLVM_VERSION_MAJOR >= 13 + llvm::MaybeAlign(0), +#endif llvm::AtomicOrdering::SequentiallyConsistent, llvm::AtomicOrdering::SequentiallyConsistent, SSID)); } Index: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c diff -u xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:1.2 --- xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:1.1.1.2 Sun Mar 10 03:42:46 2019 +++ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c Sun May 30 01:53:30 2021 @@ -66,7 +66,7 @@ * @author Roland Scheidegger */ - +#include #include "util/u_debug.h" #include "lp_bld_type.h" Index: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c diff -u xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c:1.2 --- xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c:1.1.1.4 Tue Sep 24 16:54:21 2019 +++ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c Sun May 30 01:53:30 2021 @@ -167,7 +167,9 @@ create_pass_manager(struct gallivm_state */ LLVMAddReassociatePass(gallivm->passmgr); LLVMAddPromoteMemoryToRegisterPass(gallivm->passmgr); +#if HAVE_LLVM < 0xd00 LLVMAddConstantPropagationPass(gallivm->passmgr); +#endif LLVMAddInstructionCombiningPass(gallivm->passmgr); LLVMAddGVNPass(gallivm->passmgr); } Index: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp diff -u xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:1.2 --- xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:1.1.1.4 Tue Sep 24 16:54:24 2019 +++ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp Sun May 30 01:53:30 2021 @@ -72,7 +72,7 @@ #include -#if HAVE_LLVM >= 0x0305 +#if HAVE_LLVM >= 0x0305 && HAVE_LLVM < 0xa00 #include #endif #include
CVS import: src/external/apache2/llvm/dist/libcxx
Module Name:src Committed By: joerg Date: Sun May 30 01:29:21 UTC 2021 Update of /cvsroot/src/external/apache2/llvm/dist/libcxx In directory ivanova.netbsd.org:/tmp/cvs-serv10236 Log Message: Import libc++ 249b40b558955afe5ac2b549edcf2d7f859c8cc9 Status: Vendor Tag: LLVM Release Tags: LLVM-249b40b558955afe5ac2b549edcf2d7f859c8cc9 N src/external/apache2/llvm/dist/libcxx/CREDITS.TXT N src/external/apache2/llvm/dist/libcxx/.clang-format N src/external/apache2/llvm/dist/libcxx/LICENSE.TXT N src/external/apache2/llvm/dist/libcxx/.gitignore N src/external/apache2/llvm/dist/libcxx/TODO.TXT N src/external/apache2/llvm/dist/libcxx/appveyor-reqs-install.cmd N src/external/apache2/llvm/dist/libcxx/CMakeLists.txt N src/external/apache2/llvm/dist/libcxx/appveyor.yml N src/external/apache2/llvm/dist/libcxx/src/typeinfo.cpp N src/external/apache2/llvm/dist/libcxx/src/format.cpp N src/external/apache2/llvm/dist/libcxx/src/atomic.cpp N src/external/apache2/llvm/dist/libcxx/src/random_shuffle.cpp N src/external/apache2/llvm/dist/libcxx/src/vector.cpp N src/external/apache2/llvm/dist/libcxx/src/thread.cpp N src/external/apache2/llvm/dist/libcxx/src/mutex.cpp N src/external/apache2/llvm/dist/libcxx/src/regex.cpp N src/external/apache2/llvm/dist/libcxx/src/condition_variable.cpp N src/external/apache2/llvm/dist/libcxx/src/shared_mutex.cpp N src/external/apache2/llvm/dist/libcxx/src/string.cpp N src/external/apache2/llvm/dist/libcxx/src/ios.cpp N src/external/apache2/llvm/dist/libcxx/src/chrono.cpp N src/external/apache2/llvm/dist/libcxx/src/exception.cpp N src/external/apache2/llvm/dist/libcxx/src/algorithm.cpp N src/external/apache2/llvm/dist/libcxx/src/bind.cpp N src/external/apache2/llvm/dist/libcxx/src/valarray.cpp N src/external/apache2/llvm/dist/libcxx/src/any.cpp N src/external/apache2/llvm/dist/libcxx/src/iostream.cpp N src/external/apache2/llvm/dist/libcxx/src/optional.cpp N src/external/apache2/llvm/dist/libcxx/src/CMakeLists.txt N src/external/apache2/llvm/dist/libcxx/src/strstream.cpp N src/external/apache2/llvm/dist/libcxx/src/utility.cpp N src/external/apache2/llvm/dist/libcxx/src/functional.cpp N src/external/apache2/llvm/dist/libcxx/src/stdexcept.cpp N src/external/apache2/llvm/dist/libcxx/src/system_error.cpp N src/external/apache2/llvm/dist/libcxx/src/hash.cpp N src/external/apache2/llvm/dist/libcxx/src/condition_variable_destructor.cpp N src/external/apache2/llvm/dist/libcxx/src/debug.cpp N src/external/apache2/llvm/dist/libcxx/src/new.cpp N src/external/apache2/llvm/dist/libcxx/src/memory.cpp N src/external/apache2/llvm/dist/libcxx/src/mutex_destructor.cpp N src/external/apache2/llvm/dist/libcxx/src/charconv.cpp N src/external/apache2/llvm/dist/libcxx/src/future.cpp N src/external/apache2/llvm/dist/libcxx/src/locale.cpp N src/external/apache2/llvm/dist/libcxx/src/variant.cpp N src/external/apache2/llvm/dist/libcxx/src/random.cpp N src/external/apache2/llvm/dist/libcxx/src/ios.instantiations.cpp N src/external/apache2/llvm/dist/libcxx/src/barrier.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/operations.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/filesystem_common.h N src/external/apache2/llvm/dist/libcxx/src/filesystem/posix_compat.h N src/external/apache2/llvm/dist/libcxx/src/filesystem/directory_iterator.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/int128_builtins.cpp N src/external/apache2/llvm/dist/libcxx/src/include/atomic_support.h N src/external/apache2/llvm/dist/libcxx/src/include/refstring.h N src/external/apache2/llvm/dist/libcxx/src/include/apple_availability.h N src/external/apache2/llvm/dist/libcxx/src/include/config_elast.h N src/external/apache2/llvm/dist/libcxx/src/include/sso_allocator.h N src/external/apache2/llvm/dist/libcxx/src/experimental/memory_resource.cpp N src/external/apache2/llvm/dist/libcxx/src/support/ibm/xlocale_zos.cpp N src/external/apache2/llvm/dist/libcxx/src/support/solaris/mbsnrtowcs.inc N src/external/apache2/llvm/dist/libcxx/src/support/solaris/xlocale.cpp N src/external/apache2/llvm/dist/libcxx/src/support/solaris/wcsnrtombs.inc N src/external/apache2/llvm/dist/libcxx/src/support/solaris/README N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/stdexcept_default.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_fallback.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_glibcxx.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_msvc.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/new_handler_fallback.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_libcxxabi.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_libcxxrt.ipp N
CVS commit: src/external/bsd/libevent/dist/test
Module Name:src Committed By: joerg Date: Sun May 30 00:19:09 UTC 2021 Modified Files: src/external/bsd/libevent/dist/test: regress_ssl.c Log Message: Cast to enums via uintptr_t to avoid compiler warnings. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/test/regress_ssl.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/bsd/libevent/dist/test/regress_ssl.c diff -u src/external/bsd/libevent/dist/test/regress_ssl.c:1.5 src/external/bsd/libevent/dist/test/regress_ssl.c:1.6 --- src/external/bsd/libevent/dist/test/regress_ssl.c:1.5 Wed Apr 7 03:36:48 2021 +++ src/external/bsd/libevent/dist/test/regress_ssl.c Sun May 30 00:19:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: regress_ssl.c,v 1.5 2021/04/07 03:36:48 christos Exp $ */ +/* $NetBSD: regress_ssl.c,v 1.6 2021/05/30 00:19:08 joerg Exp $ */ /* * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson @@ -891,7 +891,7 @@ regress_bufferevent_openssl_wm(void *arg struct sockaddr_in sin; struct sockaddr_storage ss; enum regress_openssl_type type = - (enum regress_openssl_type)data->setup_data; + (enum regress_openssl_type)(uintptr_t)data->setup_data; int bev_flags = BEV_OPT_CLOSE_ON_FREE; ev_socklen_t slen; SSL *ssl;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: joerg Date: Sun May 30 00:17:20 UTC 2021 Modified Files: src/sys/dev/pci: if_cas.c Log Message: Unindent code to match the logical structure, ignoring the commented out if. This code should be rewritten to use BUS_DMA_WAITOK, but that's a project of its own. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_cas.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_cas.c diff -u src/sys/dev/pci/if_cas.c:1.45 src/sys/dev/pci/if_cas.c:1.46 --- src/sys/dev/pci/if_cas.c:1.45 Sat May 8 00:27:02 2021 +++ src/sys/dev/pci/if_cas.c Sun May 30 00:17:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cas.c,v 1.45 2021/05/08 00:27:02 thorpej Exp $ */ +/* $NetBSD: if_cas.c,v 1.46 2021/05/30 00:17:20 joerg Exp $ */ /* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */ /* @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.45 2021/05/08 00:27:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.46 2021/05/30 00:17:20 joerg Exp $"); #ifndef _MODULE #include "opt_inet.h" @@ -783,8 +783,8 @@ cas_detach(device_t self, int flags) /* XXX need to check that bus_dmamem_alloc suceeded if (sc->sc_rxsoft[i].rxs_dmaseg != NULL) */ -bus_dmamem_free(sc->sc_dmatag, -&(sc->sc_rxsoft[i].rxs_dmaseg), 1); + bus_dmamem_free(sc->sc_dmatag, + &(sc->sc_rxsoft[i].rxs_dmaseg), 1); } bus_dmamap_unload(sc->sc_dmatag, sc->sc_cddmamap); /*FALLTHROUGH*/
CVS commit: src/external/bsd/libc++/dist/libcxxrt/src
Module Name:src Committed By: joerg Date: Sun May 30 00:12:31 UTC 2021 Modified Files: src/external/bsd/libc++/dist/libcxxrt/src: exception.cc libelftc_dem_gnu3.c unwind-itanium.h Log Message: Merge 47661d00cd4d6cd728ae31b0bb29a49a6c06272a To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libc++/dist/libcxxrt/src/exception.cc \ src/external/bsd/libc++/dist/libcxxrt/src/libelftc_dem_gnu3.c \ src/external/bsd/libc++/dist/libcxxrt/src/unwind-itanium.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/bsd/libc++/dist/libcxxrt/src/exception.cc diff -u src/external/bsd/libc++/dist/libcxxrt/src/exception.cc:1.2 src/external/bsd/libc++/dist/libcxxrt/src/exception.cc:1.3 --- src/external/bsd/libc++/dist/libcxxrt/src/exception.cc:1.2 Fri Jun 26 00:50:39 2015 +++ src/external/bsd/libc++/dist/libcxxrt/src/exception.cc Sun May 30 00:12:31 2021 @@ -304,13 +304,17 @@ static pthread_key_t eh_key; static void exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_exception(static_cast(ex)); + // Exception layout: + // [__cxa_exception [_Unwind_Exception]] [exception object] + // + // __cxa_free_exception expects a pointer to the exception object + __cxa_free_exception(static_cast(ex + 1)); } static void dependent_exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_dependent_exception(static_cast(ex)); + __cxa_free_dependent_exception(static_cast(ex + 1)); } /** @@ -340,7 +344,8 @@ static void thread_cleanup(void* thread_ if (info->foreign_exception_state != __cxa_thread_info::none) { _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(info->globals.caughtExceptions); - e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); + if (e->exception_cleanup) +e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } else { @@ -516,7 +521,7 @@ static void emergency_malloc_free(char * break; } } - assert(buffer > 0 && + assert(buffer >= 0 && "Trying to free something that is not an emergency buffer!"); // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will @@ -556,7 +561,7 @@ static void free_exception(char *e) { // If this allocation is within the address range of the emergency buffer, // don't call free() because it was not allocated with malloc() - if ((e > emergency_buffer) && + if ((e >= emergency_buffer) && (e < (emergency_buffer + sizeof(emergency_buffer { emergency_malloc_free(e); @@ -854,6 +859,13 @@ extern "C" void __cxa_rethrow() assert(ex->handlerCount > 0 && "Rethrowing uncaught exception!"); + // `globals->uncaughtExceptions` was decremented by `__cxa_begin_catch`. + // It's normally incremented by `throw_exception`, but this path invokes + // `_Unwind_Resume_or_Rethrow` directly to rethrow the exception. + // This path is only reachable if we're rethrowing a C++ exception - + // foreign exceptions don't adjust any of this state. + globals->uncaughtExceptions++; + // ex->handlerCount will be decremented in __cxa_end_catch in enclosing // catch block @@ -1199,11 +1211,13 @@ extern "C" void *__cxa_begin_catch(void // we see is a foreign exception then we won't have called it yet. __cxa_thread_info *ti = thread_info(); __cxa_eh_globals *globals = >globals; - globals->uncaughtExceptions--; _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(e); if (isCXXException(exceptionObject->exception_class)) { + // Only exceptions thrown with a C++ exception throwing function will + // increment this, so don't decrement it here. + globals->uncaughtExceptions--; __cxa_exception *ex = exceptionFromPointer(exceptionObject); if (ex->handlerCount == 0) @@ -1280,12 +1294,13 @@ extern "C" void __cxa_end_catch() if (ti->foreign_exception_state != __cxa_thread_info::none) { - globals->caughtExceptions = 0; if (ti->foreign_exception_state != __cxa_thread_info::rethrown) { _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ti->globals.caughtExceptions); - e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); + if (e->exception_cleanup) +e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } + globals->caughtExceptions = 0; ti->foreign_exception_state = __cxa_thread_info::none; return; } @@ -1339,6 +1354,14 @@ extern "C" std::type_info *__cxa_current } /** + * Cleanup, ensures that `__cxa_end_catch` is called to balance an explicit + * `__cxa_begin_catch` call. + */ +static void end_catch(char *) +{ + __cxa_end_catch(); +} +/** * ABI function, called when an exception specification is violated. * * This function does not return. @@
CVS import: src/external/bsd/libc++/dist/libcxxrt
Module Name:src Committed By: joerg Date: Sun May 30 00:08:20 UTC 2021 Update of /cvsroot/src/external/bsd/libc++/dist/libcxxrt In directory ivanova.netbsd.org:/tmp/cvs-serv13048 Log Message: Import libcxxrt 47661d00cd4d6cd728ae31b0bb29a49a6c06272a The repository moved to https://github.com/libcxxrt/libcxxrt in the mean time, but keep it on the same branch as before. This primarily brings C++14 support. Status: Vendor Tag: PATHSCALE Release Tags: libcxxrt-47661d00cd4d6cd728ae31b0bb29a49a6c06272a U src/external/bsd/libc++/dist/libcxxrt/README U src/external/bsd/libc++/dist/libcxxrt/LICENSE U src/external/bsd/libc++/dist/libcxxrt/COPYRIGHT U src/external/bsd/libc++/dist/libcxxrt/AUTHORS N src/external/bsd/libc++/dist/libcxxrt/test/test_foreign_exceptions.cc N src/external/bsd/libc++/dist/libcxxrt/test/test_demangle.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_typeinfo.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_guard.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_exception.cc U src/external/bsd/libc++/dist/libcxxrt/test/test.h U src/external/bsd/libc++/dist/libcxxrt/test/test.cc U src/external/bsd/libc++/dist/libcxxrt/test/run_test.sh U src/external/bsd/libc++/dist/libcxxrt/src/unwind.h C src/external/bsd/libc++/dist/libcxxrt/src/unwind-itanium.h U src/external/bsd/libc++/dist/libcxxrt/src/unwind-arm.h U src/external/bsd/libc++/dist/libcxxrt/src/typeinfo.h U src/external/bsd/libc++/dist/libcxxrt/src/typeinfo.cc U src/external/bsd/libc++/dist/libcxxrt/src/terminate.cc U src/external/bsd/libc++/dist/libcxxrt/src/stdexcept.h U src/external/bsd/libc++/dist/libcxxrt/src/stdexcept.cc U src/external/bsd/libc++/dist/libcxxrt/src/memory.cc C src/external/bsd/libc++/dist/libcxxrt/src/libelftc_dem_gnu3.c U src/external/bsd/libc++/dist/libcxxrt/src/guard.cc C src/external/bsd/libc++/dist/libcxxrt/src/exception.cc U src/external/bsd/libc++/dist/libcxxrt/src/dynamic_cast.cc U src/external/bsd/libc++/dist/libcxxrt/src/dwarf_eh.h U src/external/bsd/libc++/dist/libcxxrt/src/cxxabi.h U src/external/bsd/libc++/dist/libcxxrt/src/cxa_finalize.c U src/external/bsd/libc++/dist/libcxxrt/src/cxa_atexit.c U src/external/bsd/libc++/dist/libcxxrt/src/auxhelper.cc U src/external/bsd/libc++/dist/libcxxrt/src/atomic.h U src/external/bsd/libc++/dist/libcxxrt/src/abi_namespace.h 3 conflicts created by this import. Use the following command to help the merge: cvs checkout -jPATHSCALE:yesterday -jPATHSCALE src/external/bsd/libc++/dist/libcxxrt
CVS commit: xsrc/external/mit/xf86-video-pnozz/dist/src
Module Name:xsrc Committed By: joerg Date: Thu May 27 20:20:43 UTC 2021 Modified Files: xsrc/external/mit/xf86-video-pnozz/dist/src: pnozz_exa.c Log Message: Don't nest comments. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c diff -u xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c:1.2 xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c:1.3 --- xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c:1.2 Thu May 27 20:20:22 2021 +++ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c Thu May 27 20:20:43 2021 @@ -1,6 +1,6 @@ /* * SBus Weitek P9100 EXA support - * + */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. * All rights reserved.
CVS commit: xsrc/external/mit/xf86-video-pnozz/dist/src
Module Name:xsrc Committed By: joerg Date: Thu May 27 20:20:22 UTC 2021 Modified Files: xsrc/external/mit/xf86-video-pnozz/dist/src: pnozz_exa.c Log Message: Don't define MaxClip and junk twice, fixing build with -fno-common. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c diff -u xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c:1.1 xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c:1.2 --- xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c:1.1 Thu May 27 04:48:10 2021 +++ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c Thu May 27 20:20:22 2021 @@ -82,7 +82,7 @@ static CARD32 PnozzDrawROP[] = { void PnozzInitEngine(PnozzPtr); void pnozz_write_colour(PnozzPtr pPnozz, int reg, CARD32 colour); -CARD32 MaxClip, junk; +extern CARD32 MaxClip, junk; static void PnozzWaitMarker(ScreenPtr pScreen, int Marker)
CVS commit: src/sys/lib/libunwind
Module Name:src Committed By: joerg Date: Sun Feb 28 23:12:37 UTC 2021 Modified Files: src/sys/lib/libunwind: AddressSpace.hpp Log Message: Defer acquiring the FDE lock until after the allocation. This can avoid nesting issues between malloc and backtrace when using LSan. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libunwind/AddressSpace.hpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libunwind/AddressSpace.hpp diff -u src/sys/lib/libunwind/AddressSpace.hpp:1.9 src/sys/lib/libunwind/AddressSpace.hpp:1.10 --- src/sys/lib/libunwind/AddressSpace.hpp:1.9 Thu Nov 2 16:09:33 2017 +++ src/sys/lib/libunwind/AddressSpace.hpp Sun Feb 28 23:12:37 2021 @@ -283,7 +283,6 @@ public: } bool addFDE(pint_t pcStart, pint_t pcEnd, pint_t fde) { -pthread_rwlock_wrlock(); Range *n = (Range *)malloc(sizeof(*n)); n->hdr_base = fde; n->hdr_start = 0; @@ -292,6 +291,7 @@ public: n->last_pc = pcEnd; n->data_base = 0; n->ehframe_base = 0; +pthread_rwlock_wrlock(); if (static_cast(rb_tree_insert_node(, n)) == n) { pthread_rwlock_unlock(); return true;
CVS commit: src/external/mit/xorg/lib/gallium
Module Name:src Committed By: joerg Date: Tue Feb 23 15:16:43 UTC 2021 Modified Files: src/external/mit/xorg/lib/gallium: Makefile Log Message: Don't hard-code LLVM version, but pick it up from build glue. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/external/mit/xorg/lib/gallium/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/gallium/Makefile diff -u src/external/mit/xorg/lib/gallium/Makefile:1.44 src/external/mit/xorg/lib/gallium/Makefile:1.45 --- src/external/mit/xorg/lib/gallium/Makefile:1.44 Sat Apr 4 03:04:58 2020 +++ src/external/mit/xorg/lib/gallium/Makefile Tue Feb 23 15:16:43 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.44 2020/04/04 03:04:58 christos Exp $ +# $NetBSD: Makefile,v 1.45 2021/02/23 15:16:43 joerg Exp $ # Link the gallium mega driver. @@ -1114,8 +1114,8 @@ CPPFLAGS.streaming-load-memcpy.c+= -msse CPPFLAGS.i386+= -march=i586 CPPFLAGS+= ${CPPFLAGS.${XORG_MACHINE_ARCH:U${MACHINE_ARCH}}} -CPPFLAGS.r600_pipe_common.c+= -DMESA_LLVM_VERSION_STRING=\"9.0.0\" -CPPFLAGS.si_get.c+= -DMESA_LLVM_VERSION_STRING=\"9.0.0\" +CPPFLAGS.r600_pipe_common.c+= -DMESA_LLVM_VERSION_STRING=\"${LLVM_VERSION}\" +CPPFLAGS.si_get.c+= -DMESA_LLVM_VERSION_STRING=\"${LLVM_VERSION}\" .include "../driver.mk"
CVS commit: src/sys/lib/libunwind
Module Name:src Committed By: joerg Date: Tue Feb 23 15:09:27 UTC 2021 Modified Files: src/sys/lib/libunwind: Registers.hpp unwind_registers.S Log Message: Redo the aarch64 support in libunwind. This included a number of bugs starting from returning the wrong value from the constructor to completely bogus offset computations. Drop the ELR support for now. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/lib/libunwind/Registers.hpp cvs rdiff -u -r1.17 -r1.18 src/sys/lib/libunwind/unwind_registers.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libunwind/Registers.hpp diff -u src/sys/lib/libunwind/Registers.hpp:1.20 src/sys/lib/libunwind/Registers.hpp:1.21 --- src/sys/lib/libunwind/Registers.hpp:1.20 Thu Jul 13 15:13:19 2017 +++ src/sys/lib/libunwind/Registers.hpp Tue Feb 23 15:09:27 2021 @@ -244,16 +244,14 @@ enum { DWARF_AARCH64_X0 = 0, DWARF_AARCH64_X30 = 30, DWARF_AARCH64_SP = 31, - DWARF_AARCH64_ELR_MODE = 33, DWARF_AARCH64_V0 = 64, DWARF_AARCH64_V31 = 95, REGNO_AARCH64_X0 = 0, REGNO_AARCH64_X30 = 30, REGNO_AARCH64_SP = 31, - REGNO_AARCH64_ELR_MODE = 32, - REGNO_AARCH64_V0 = 33, - REGNO_AARCH64_V31 = 64, + REGNO_AARCH64_V0 = 32, + REGNO_AARCH64_V31 = 63, }; class Registers_aarch64 { @@ -272,8 +270,6 @@ public: return REGNO_AARCH64_X0 + (num - DWARF_AARCH64_X0); if (num == DWARF_AARCH64_SP) return REGNO_AARCH64_SP; -if (num == DWARF_AARCH64_ELR_MODE) - return REGNO_AARCH64_ELR_MODE; if (num >= DWARF_AARCH64_V0 && num <= DWARF_AARCH64_V31) return REGNO_AARCH64_V0 + (num - DWARF_AARCH64_V0); return LAST_REGISTER + 1; @@ -307,17 +303,14 @@ public: void copyFloatVectorRegister(int num, uint64_t addr_) { const void *addr = reinterpret_cast(addr_); -memcpy(vecreg + (num - REGNO_AARCH64_V0), addr, sizeof(vecreg[0])); +memcpy(vecreg + (num - REGNO_AARCH64_V0), addr, 16); } __dso_hidden void jumpto() const __dead; private: - struct vecreg_t { -uint64_t low, high; - }; - uint64_t reg[REGNO_AARCH64_ELR_MODE + 1]; - vecreg_t vecreg[32]; + uint64_t reg[REGNO_AARCH64_SP + 1]; + uint64_t vecreg[64]; }; enum { Index: src/sys/lib/libunwind/unwind_registers.S diff -u src/sys/lib/libunwind/unwind_registers.S:1.17 src/sys/lib/libunwind/unwind_registers.S:1.18 --- src/sys/lib/libunwind/unwind_registers.S:1.17 Mon May 25 18:41:08 2015 +++ src/sys/lib/libunwind/unwind_registers.S Tue Feb 23 15:09:27 2021 @@ -272,68 +272,81 @@ ENTRY(_ZNK7_Unwind15Registers_ppc326jump #ifdef __aarch64__ .hidden _ZN7_Unwind17Registers_aarch64C1Ev ENTRY(_ZN7_Unwind17Registers_aarch64C1Ev) - stp x0, x1, [x0] - add x0, x0, #16 - stp x2, x3, [x0], #16 - stp x4, x5, [x0], #16 - stp x6, x7, [x0], #16 - stp x8, x9, [x0], #16 - stp x10, x11, [x0], #16 - stp x12, x13, [x0], #16 - stp x14, x15, [x0], #16 - stp x16, x17, [x0], #16 - stp x18, x19, [x0], #16 - stp x20, x22, [x0], #16 - stp x22, x24, [x0], #16 - stp x24, x26, [x0], #16 - stp x26, x27, [x0], #16 - stp x28, x29, [x0], #16 - mov x1, sp - stp x30, x1, [x0], #16 - - add x0, x0, #8 - str xzr, [x0], #8 - - stp q0, q1, [x0], #64 - stp q2, q3, [x0], #64 - stp q4, q5, [x0], #64 - stp q6, q7, [x0], #64 - stp q8, q9, [x0], #64 - stp q10, q11, [x0], #64 - stp q12, q13, [x0], #64 - stp q14, q15, [x0], #64 - stp q16, q17, [x0], #64 - stp q18, q19, [x0], #64 - stp q20, q21, [x0], #64 - stp q22, q23, [x0], #64 - stp q24, q25, [x0], #64 - stp q26, q27, [x0], #64 - stp q28, q29, [x0], #64 - stp q30, q31, [x0], #64 + stp x0, x1, [x0, #0x000] + stp x2, x3, [x0, #0x010] + stp x4, x5, [x0, #0x020] + stp x6, x7, [x0, #0x030] + stp x8, x9, [x0, #0x040] + stp x10,x11, [x0, #0x050] + stp x12,x13, [x0, #0x060] + stp x14,x15, [x0, #0x070] + stp x16,x17, [x0, #0x080] + stp x18,x19, [x0, #0x090] + stp x20,x21, [x0, #0x0A0] + stp x22,x23, [x0, #0x0B0] + stp x24,x25, [x0, #0x0C0] + stp x26,x27, [x0, #0x0D0] + stp x28,x29, [x0, #0x0E0] + mov x1,sp + stp x30,x1, [x0, #0x0F0] + + stp q0, q1, [x0, #0x100] + stp q2, q3, [x0, #0x120] + stp q4, q5, [x0, #0x140] + stp q6, q7, [x0, #0x160] + stp q8, q9, [x0, #0x180] + stp q10, q11, [x0, #0x1a0] + stp q12, q13, [x0, #0x1c0] + stp q14, q15, [x0, #0x1e0] + stp q16, q17, [x0, #0x200] + stp q18, q19, [x0, #0x220] + stp q20, q21, [x0, #0x240] + stp q22, q23, [x0, #0x260] + stp q24, q25, [x0, #0x280] + stp q26, q27, [x0, #0x2a0] + stp q28, q29, [x0, #0x2c0] + stp q30, q31, [x0, #0x2e0] ret END(_ZN7_Unwind17Registers_aarch64C1Ev) .hidden _ZNK7_Unwind17Registers_aarch646jumptoEv ENTRY(_ZNK7_Unwind17Registers_aarch646jumptoEv) - ldp x2, x3, [x0, #16] - ldp x4, x6, [x0, #32] - ldp x6, x7, [x0, #48] - ldp x8, x9, [x0, #64] - ldp x10, x11, [x0, #80] - ldp x12, x13, [x0, #96] - ldp x14, x16, [x0, #112] - ldp x16, x17, [x0, #128] - ldp x18, x19, [x0, #144] - ldp x20, x21, [x0, #160] - ldp x22,
CVS commit: src/sys/lib/libunwind
Module Name:src Committed By: joerg Date: Tue Feb 23 15:07:32 UTC 2021 Modified Files: src/sys/lib/libunwind: DwarfParser.hpp Log Message: The return address register entry is the DWARF register. On PowerPC, this is not the same as the internal encoding, since the Link Register is deliberately non-continous from the other general purpose register values. To handle this, always translate the value into the internal format. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libunwind/DwarfParser.hpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libunwind/DwarfParser.hpp diff -u src/sys/lib/libunwind/DwarfParser.hpp:1.5 src/sys/lib/libunwind/DwarfParser.hpp:1.6 --- src/sys/lib/libunwind/DwarfParser.hpp:1.5 Sat May 3 23:19:56 2014 +++ src/sys/lib/libunwind/DwarfParser.hpp Tue Feb 23 15:07:32 2021 @@ -239,7 +239,7 @@ bool CFI_Parser::parseCIE(A // Parse data alignment factor cieInfo->dataAlignFactor = addressSpace.getSLEB128(p, cieContentEnd); // Parse return address register - cieInfo->returnAddressRegister = (uint8_t)addressSpace.getULEB128(p, cieContentEnd); + cieInfo->returnAddressRegister = R::dwarf2regno((uint8_t)addressSpace.getULEB128(p, cieContentEnd)); // Parse augmentation data based on augmentation string. if (addressSpace.get8(strStart) == 'z') { // parse augmentation data length
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: joerg Date: Tue Feb 23 15:05:09 UTC 2021 Modified Files: src/usr.sbin/ldpd: Makefile Log Message: Make use of packed member addreses non-fatal for clang, too To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/ldpd/Makefile 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/ldpd/Makefile diff -u src/usr.sbin/ldpd/Makefile:1.6 src/usr.sbin/ldpd/Makefile:1.7 --- src/usr.sbin/ldpd/Makefile:1.6 Wed Feb 3 06:46:27 2021 +++ src/usr.sbin/ldpd/Makefile Tue Feb 23 15:05:08 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2021/02/03 06:46:27 roy Exp $ +# $NetBSD: Makefile,v 1.7 2021/02/23 15:05:08 joerg Exp $ .include @@ -26,6 +26,7 @@ LDADD+= -lcrypt CPPFLAGS+=-DINET6 .endif +CWARNFLAGS.clang+= -Wno-error=address-of-packed-member CWARNFLAGS.gcc+=${GCC_NO_ADDR_OF_PACKED_MEMBER} .include
CVS commit: src/tests/lib/libcurses/director
Module Name:src Committed By: joerg Date: Mon Feb 15 15:55:51 UTC 2021 Modified Files: src/tests/lib/libcurses/director: testlang_parse.y Log Message: Simplify to avoid copy based on the size of the source. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/tests/lib/libcurses/director/testlang_parse.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/director/testlang_parse.y diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.48 src/tests/lib/libcurses/director/testlang_parse.y:1.49 --- src/tests/lib/libcurses/director/testlang_parse.y:1.48 Mon Feb 15 07:06:27 2021 +++ src/tests/lib/libcurses/director/testlang_parse.y Mon Feb 15 15:55:50 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: testlang_parse.y,v 1.48 2021/02/15 07:06:27 rillig Exp $ */ +/* $NetBSD: testlang_parse.y,v 1.49 2021/02/15 15:55:50 joerg Exp $ */ /*- * Copyright 2009 Brett Lymn @@ -1388,10 +1388,8 @@ do_input(const char *s) free(input_str); } - if ((input_str = malloc(strlen(s) + 1)) == NULL) + if ((input_str = strdup(s)) == NULL) err(2, "Cannot allocate memory for input string"); - - strlcpy(input_str, s, strlen(s) + 1); } static void
CVS commit: src/tests/usr.bin/nbperf
Module Name:src Committed By: joerg Date: Sun Feb 14 01:27:33 UTC 2021 Modified Files: src/tests/usr.bin/nbperf: t_nbperf.sh Log Message: Adjust test cases to hit the fudge case after the changes in nbperf itself. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/nbperf/t_nbperf.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/nbperf/t_nbperf.sh diff -u src/tests/usr.bin/nbperf/t_nbperf.sh:1.4 src/tests/usr.bin/nbperf/t_nbperf.sh:1.5 --- src/tests/usr.bin/nbperf/t_nbperf.sh:1.4 Thu Jan 7 16:03:08 2021 +++ src/tests/usr.bin/nbperf/t_nbperf.sh Sun Feb 14 01:27:33 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_nbperf.sh,v 1.4 2021/01/07 16:03:08 joerg Exp $ +# $NetBSD: t_nbperf.sh,v 1.5 2021/02/14 01:27:33 joerg Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -62,17 +62,17 @@ chm_fudged_head() } chm_fudged_body() { - seq 0 9 > reference.txt - seq 1 10 > input.txt + seq 0 11 > reference.txt + seq 1 12 > input.txt atf_check -o file:reference.txt \ $(atf_get_srcdir)/h_nbperf input.txt "chm -p" cat \ - 10 $(atf_get_srcdir)/hash_driver.c + 12 $(atf_get_srcdir)/hash_driver.c atf_check -s exit:1 fgrep -q '^=' hash.c atf_check -o file:reference.txt \ $(atf_get_srcdir)/h_nbperf input.txt "chm -f -p" cat \ - 10 $(atf_get_srcdir)/hash_driver.c + 12 $(atf_get_srcdir)/hash_driver.c atf_check -s exit:0 fgrep -q '^=' hash.c } chm_fudged_clean() @@ -163,17 +163,17 @@ bpz_fudged_head() } bpz_fudged_body() { - seq 0 9 > reference.txt - seq 1 10 > input.txt + seq 0 11 > reference.txt + seq 1 12 > input.txt atf_check -o file:reference.txt \ $(atf_get_srcdir)/h_nbperf input.txt "bpz -p" "sort -n" \ - 10 $(atf_get_srcdir)/hash_driver.c + 12 $(atf_get_srcdir)/hash_driver.c atf_check -s exit:1 fgrep -q '^=' hash.c atf_check -o file:reference.txt \ $(atf_get_srcdir)/h_nbperf input.txt "bpz -f -p" "sort -n" \ - 10 $(atf_get_srcdir)/hash_driver.c + 12 $(atf_get_srcdir)/hash_driver.c atf_check -s exit:0 fgrep -q '^= (' hash.c atf_check -s exit:0 fgrep -q '^= 2' hash.c }
CVS commit: src/tests/lib/libc/arch/sparc64
Module Name:src Committed By: joerg Date: Mon Feb 8 23:50:25 UTC 2021 Modified Files: src/tests/lib/libc/arch/sparc64: return_one.S Log Message: Don't define a label twice. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/arch/sparc64/return_one.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/arch/sparc64/return_one.S diff -u src/tests/lib/libc/arch/sparc64/return_one.S:1.2 src/tests/lib/libc/arch/sparc64/return_one.S:1.3 --- src/tests/lib/libc/arch/sparc64/return_one.S:1.2 Sat Dec 31 11:51:20 2016 +++ src/tests/lib/libc/arch/sparc64/return_one.S Mon Feb 8 23:50:25 2021 @@ -1,11 +1,10 @@ -/* $NetBSD: return_one.S,v 1.2 2016/12/31 11:51:20 martin Exp $ */ +/* $NetBSD: return_one.S,v 1.3 2021/02/08 23:50:25 joerg Exp $ */ #include .global return_one_end ENTRY(return_one) -return_one: retl mov 1, %o0 return_one_end:
CVS commit: src/doc
Module Name:src Committed By: joerg Date: Sat Feb 6 22:00:59 UTC 2021 Modified Files: src/doc: TODO.clang Log Message: Drop acorn32 entry, fixed. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/doc/TODO.clang Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.clang diff -u src/doc/TODO.clang:1.23 src/doc/TODO.clang:1.24 --- src/doc/TODO.clang:1.23 Fri Aug 2 12:06:20 2019 +++ src/doc/TODO.clang Sat Feb 6 22:00:59 2021 @@ -1,11 +1,8 @@ -$NetBSD: TODO.clang,v 1.23 2019/08/02 12:06:20 joerg Exp $ +$NetBSD: TODO.clang,v 1.24 2021/02/06 22:00:59 joerg Exp $ Hacks for the clang integration --- -src/sys/arch/acorn32/stand -"-fno-integrated-as" is used for pre-unified ARM assembler. - src/sys/arch/i386/stand "-no-integrated-as" is used to compensate for the incomplete explicit positioning support in LLVM MC.
CVS commit: src/sys/arch/acorn32/stand
Module Name:src Committed By: joerg Date: Sat Feb 6 21:45:38 UTC 2021 Modified Files: src/sys/arch/acorn32/stand/boot32: Makefile start.S src/sys/arch/acorn32/stand/nbfs: Makefile rmheader.S Log Message: Modernize acorn32 boot code to work directly with LLVM's assembler. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/acorn32/stand/boot32/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/acorn32/stand/boot32/start.S cvs rdiff -u -r1.4 -r1.5 src/sys/arch/acorn32/stand/nbfs/Makefile \ src/sys/arch/acorn32/stand/nbfs/rmheader.S 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/acorn32/stand/boot32/Makefile diff -u src/sys/arch/acorn32/stand/boot32/Makefile:1.6 src/sys/arch/acorn32/stand/boot32/Makefile:1.7 --- src/sys/arch/acorn32/stand/boot32/Makefile:1.6 Fri Aug 2 12:06:20 2019 +++ src/sys/arch/acorn32/stand/boot32/Makefile Sat Feb 6 21:45:38 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2019/08/02 12:06:20 joerg Exp $ +# $NetBSD: Makefile,v 1.7 2021/02/06 21:45:38 joerg Exp $ PROG= boot32 PROGSOURCE= rmheader.S rmvers.c srt0.S boot32.c start.S @@ -17,6 +17,4 @@ rmvers.c: ${.CURDIR}/version CLEANFILES+= rmvers.c -AFLAGS.start.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} - .include "../Makefile.buildboot" Index: src/sys/arch/acorn32/stand/boot32/start.S diff -u src/sys/arch/acorn32/stand/boot32/start.S:1.3 src/sys/arch/acorn32/stand/boot32/start.S:1.4 --- src/sys/arch/acorn32/stand/boot32/start.S:1.3 Sun Feb 3 14:59:16 2008 +++ src/sys/arch/acorn32/stand/boot32/start.S Sat Feb 6 21:45:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: start.S,v 1.3 2008/02/03 14:59:16 chris Exp $ */ +/* $NetBSD: start.S,v 1.4 2021/02/06 21:45:38 joerg Exp $ */ /* * Copyright (c) 2002 Reinoud Zandijk @@ -50,7 +50,7 @@ ENTRY(relocate_code) * determine processor architecture version. This is nessisary for the * correct coprocessor instruction. */ - mrc 15, 0, r0, c0, c0, 0 /* read CPU id in r0 */ + mrc p15, 0, r0, c0, c0, 0 /* read CPU id in r0 */ mov r3, r0 /* store in r3*/ /* assume its ARMv4 instruction set */ @@ -77,23 +77,23 @@ ENTRY(relocate_code) /* flush ID cache */ mov r0, #0 cmp r14, #0 - mcreq 15, 0, r0, c7, c0, 0 /* flush v3 ID cache */ - mcrne 15, 0, r0, c7, c7, 0 /* flush v4 ID cache */ - mcrne 15, 0, r0, c7, c10, 4 /* drain WB (v4) */ + mcreq p15, 0, r0, c7, c0, 0 /* flush v3 ID cache */ + mcrne p15, 0, r0, c7, c7, 0 /* flush v4 ID cache */ + mcrne p15, 0, r0, c7, c10, 4 /* drain WB (v4) */ /* flush TLB*/ - mcr 15, 0, r0, c5, c0, 0 /* flush TLB for v3 and v4 */ + mcr p15, 0, r0, c5, c0, 0 /* flush TLB for v3 and v4 */ /* switch off MMU, IDcache and WB and branch to physical code space */ cmp r14, #0 - mrcne 15, 0, r0, c1, c0, 0 /* read processor control register if v4*/ + mrcne p15, 0, r0, c1, c0, 0 /* read processor control register if v4*/ bic r0, r0, #0x3f /* clear only known bits */ moveq r0, #0 /* for v3 just set to zero */ orr r0, r0, #CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_32BP_ENABLE mov r13, r0 /* save this control value in r13 */ cmp r14, #0 - mcr 15, 0, r0, c1, c0, 0 /* write control register! */ -/*1*/ mcrne 15, 0, r1, c7, c5, 0 /* write zero in ARMv4 MMU disable */ + mcr p15, 0, r0, c1, c0, 0 /* write control register! */ +/*1*/ mcrne p15, 0, r1, c7, c5, 0 /* write zero in ARMv4 MMU disable */ /*2*/ mov pc, r9 /* branch to physical address */ relocate_code_physical_restart: @@ -132,25 +132,25 @@ loop_one_page: /* flush ID cache */ mov r0, #0 cmp r14, #0 - mcreq 15, 0, r0, c7, c0, 0 /* flush v3 ID cache */ - mcrne 15, 0, r0, c7, c7, 0 /* flush v4 ID cache */ + mcreq p15, 0, r0, c7, c0, 0 /* flush v3 ID cache */ + mcrne p15, 0, r0, c7, c7, 0 /* flush v4 ID cache */ /* drain write buffer (v4) */ mov r0, #0 cmp r14, #0 - mcrne 15, 0, r0, c7, c10, 4 /* drain WB (v4) */ + mcrne p15, 0, r0, c7, c10, 4 /* drain WB (v4) */ /* flush TLB*/ - mcr 15, 0, r0, c5, c0, 0 /* flush TLB for v3 and v4 */ + mcr p15, 0, r0, c5, c0, 0 /* flush TLB for v3 and v4 */ /* set new TLB address */ mov r0, r11 - mcr 15, 0, r0, c2, c0, 0 /* write TLB address */ + mcr p15, 0, r0, c2, c0, 0 /* write TLB address */ /* Switch on MMU, IDCache and WB and keep on running on flat translated memory*/ orr r0, r13, #CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_32BP_ENABLE orr r0, r0, #CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_DC_ENABLE | CPU_CONTROL_MMU_ENABLE - mcr 15, 0, r0, c1, c0, 0 /* write register !!! */ + mcr p15, 0, r0, c1, c0, 0 /* write register !!! */ mov r0, r0 /*
CVS commit: src/sys/kern
Module Name:src Committed By: joerg Date: Sat Feb 6 13:54:48 UTC 2021 Modified Files: src/sys/kern: subr_kmem.c Log Message: Do not cast memcpy arguments when the intention is unaligned access. The standard is pretty explicit that misaligned pointers is UB and LLVM does exploit the promised alignment on SPARC, resulting in kernel crashes during early boot. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/kern/subr_kmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_kmem.c diff -u src/sys/kern/subr_kmem.c:1.81 src/sys/kern/subr_kmem.c:1.82 --- src/sys/kern/subr_kmem.c:1.81 Sun Jan 24 17:29:11 2021 +++ src/sys/kern/subr_kmem.c Sat Feb 6 13:54:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_kmem.c,v 1.81 2021/01/24 17:29:11 thorpej Exp $ */ +/* $NetBSD: subr_kmem.c,v 1.82 2021/02/06 13:54:48 joerg Exp $ */ /* * Copyright (c) 2009-2020 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.81 2021/01/24 17:29:11 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.82 2021/02/06 13:54:48 joerg Exp $"); #ifdef _KERNEL_OPT #include "opt_kmem.h" @@ -505,7 +505,7 @@ kmem_tmpbuf_free(void *buf, size_t size, static void kmem_size_set(void *p, size_t sz) { - memcpy((size_t *)((uintptr_t)p + sz), , sizeof(size_t)); + memcpy((char *)p + sz, , sizeof(size_t)); } static void @@ -513,13 +513,13 @@ kmem_size_check(void *p, size_t sz) { size_t hsz; - memcpy(, (size_t *)((uintptr_t)p + sz), sizeof(size_t)); + memcpy(, (char *)p + sz, sizeof(size_t)); if (hsz != sz) { panic("kmem_free(%p, %zu) != allocated size %zu; overwrote?", p, sz, hsz); } - memset((size_t *)((uintptr_t)p + sz), 0xff, sizeof(size_t)); + memset((char *)p + sz, 0xff, sizeof(size_t)); } #endif /* defined(KMEM_SIZE) */
CVS commit: src/external/public-domain/sqlite
Module Name:src Committed By: joerg Date: Fri Feb 5 21:48:52 UTC 2021 Modified Files: src/external/public-domain/sqlite: Makefile.inc Log Message: Reenable threadsafe sqlite. Do it properly and only enable thread-safety, but not the worker thread support. The latter is what requires the whole libpthread dependency. A potential compromis would be to use a weak pthread_create and only enable worker threads if it is provided, but given that it is only really used for large sorts, don't bother for now. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/public-domain/sqlite/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/public-domain/sqlite/Makefile.inc diff -u src/external/public-domain/sqlite/Makefile.inc:1.10 src/external/public-domain/sqlite/Makefile.inc:1.11 --- src/external/public-domain/sqlite/Makefile.inc:1.10 Thu Nov 12 17:53:43 2020 +++ src/external/public-domain/sqlite/Makefile.inc Fri Feb 5 21:48:52 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.10 2020/11/12 17:53:43 nia Exp $ +# $NetBSD: Makefile.inc,v 1.11 2021/02/05 21:48:52 joerg Exp $ WARNS= 2 @@ -15,6 +15,7 @@ CPPFLAGS+= \ -DHAVE_STRERROR_R=1 \ -DHAVE_USLEEP=1 \ -DHAVE_SYS_ENDIAN_H=1 \ + -DSQLITE_THREADSAFE \ -DSQLITE_MAX_WORKER_THREADS=0 \ -DSQLITE_ENABLE_COLUMN_METADATA \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \
CVS commit: src/external/ibm-public/postfix/dist/src/xsasl
Module Name:src Committed By: joerg Date: Fri Feb 5 21:45:24 UTC 2021 Modified Files: src/external/ibm-public/postfix/dist/src/xsasl: xsasl_saslc_client.c Log Message: Pass strings to %s arguments, not void *. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/ibm-public/postfix/dist/src/xsasl/xsasl_saslc_client.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/ibm-public/postfix/dist/src/xsasl/xsasl_saslc_client.c diff -u src/external/ibm-public/postfix/dist/src/xsasl/xsasl_saslc_client.c:1.1 src/external/ibm-public/postfix/dist/src/xsasl/xsasl_saslc_client.c:1.2 --- src/external/ibm-public/postfix/dist/src/xsasl/xsasl_saslc_client.c:1.1 Sat Feb 12 19:07:09 2011 +++ src/external/ibm-public/postfix/dist/src/xsasl/xsasl_saslc_client.c Fri Feb 5 21:45:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: xsasl_saslc_client.c,v 1.1 2011/02/12 19:07:09 christos Exp $ */ +/* $NetBSD: xsasl_saslc_client.c,v 1.2 2021/02/05 21:45:24 joerg Exp $ */ /*++ /* NAME @@ -167,8 +167,10 @@ xsasl_saslc_client_first( return XSASL_AUTH_FAIL; } vstring_strcpy(init_resp, outlen ? out : ""); - if (msg_verbose) - msg_info("%s: client_reply='%s'", __func__, outlen ? out : ""); + if (msg_verbose) { + msg_info("%s: client_reply='%s'", __func__, + outlen ? (const char *)out : ""); + } if (outlen > 0) memset(out, 0, outlen); /* XXX: silly? */ @@ -201,9 +203,10 @@ xsasl_saslc_client_next(XSASL_CLIENT *xp return XSASL_AUTH_FAIL; } vstring_strcpy(client_reply, outlen ? out : ""); - if (msg_verbose) + if (msg_verbose) { msg_info("%s: client_reply='%s'", __func__, - outlen ? out : ""); + outlen ? (const char *) out : ""); + } if (outlen > 0) memset(out, 0, outlen); /* XXX: silly? */
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: joerg Date: Fri Feb 5 21:44:34 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: db_interface.c db_machdep.c Log Message: Avoid duplicate definition of ddb_regs in crash(8). To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/aarch64/db_interface.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/aarch64/aarch64/db_machdep.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/aarch64/aarch64/db_interface.c diff -u src/sys/arch/aarch64/aarch64/db_interface.c:1.11 src/sys/arch/aarch64/aarch64/db_interface.c:1.12 --- src/sys/arch/aarch64/aarch64/db_interface.c:1.11 Fri Dec 11 18:03:33 2020 +++ src/sys/arch/aarch64/aarch64/db_interface.c Fri Feb 5 21:44:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.11 2020/12/11 18:03:33 skrll Exp $ */ +/* $NetBSD: db_interface.c,v 1.12 2021/02/05 21:44:34 joerg Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.11 2020/12/11 18:03:33 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.12 2021/02/05 21:44:34 joerg Exp $"); #include #include @@ -51,6 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface #include +db_regs_t ddb_regs; + void db_read_bytes(vaddr_t addr, size_t size, char *data) { Index: src/sys/arch/aarch64/aarch64/db_machdep.c diff -u src/sys/arch/aarch64/aarch64/db_machdep.c:1.32 src/sys/arch/aarch64/aarch64/db_machdep.c:1.33 --- src/sys/arch/aarch64/aarch64/db_machdep.c:1.32 Mon Jan 18 01:38:44 2021 +++ src/sys/arch/aarch64/aarch64/db_machdep.c Fri Feb 5 21:44:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.c,v 1.32 2021/01/18 01:38:44 rin Exp $ */ +/* $NetBSD: db_machdep.c,v 1.33 2021/02/05 21:44:34 joerg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.32 2021/01/18 01:38:44 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.33 2021/02/05 21:44:34 joerg Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd32.h" @@ -207,9 +207,7 @@ const struct db_variable db_regs[] = { }; const struct db_variable * const db_eregs = db_regs + __arraycount(db_regs); - int db_active; -db_regs_t ddb_regs; void
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc
Module Name:src Committed By: joerg Date: Fri Feb 5 21:43:21 UTC 2021 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: aes.inc Log Message: Allow v9 assembly for AES code for 32bit compat build with clang. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.6 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.5 Tue Sep 15 09:22:32 2020 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc Fri Feb 5 21:43:20 2021 @@ -4,5 +4,6 @@ AES_SRCS = aes_core.c aes_cbc.c aes-spar AESCPPFLAGS = -DAES_ASM AFLAGS.aes-sparcv9.S+= -Wa,-Av9 AFLAGS.aest4-sparcv9.S+= -Wa,-Av9 +AFLAGS.aesfx-sparcv9.S+= -Wa,-Av9 .endif .include "../../aes.inc"
CVS commit: src/sys/arch/arm/amlogic
Module Name:src Committed By: joerg Date: Thu Feb 4 22:55:36 UTC 2021 Modified Files: src/sys/arch/arm/amlogic: mesong12_clkc.c Log Message: Fix C error in G12_CLK_vid_pll To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/amlogic/mesong12_clkc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/amlogic/mesong12_clkc.c diff -u src/sys/arch/arm/amlogic/mesong12_clkc.c:1.5 src/sys/arch/arm/amlogic/mesong12_clkc.c:1.6 --- src/sys/arch/arm/amlogic/mesong12_clkc.c:1.5 Wed Jan 27 03:10:18 2021 +++ src/sys/arch/arm/amlogic/mesong12_clkc.c Thu Feb 4 22:55:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mesong12_clkc.c,v 1.5 2021/01/27 03:10:18 thorpej Exp $ */ +/* $NetBSD: mesong12_clkc.c,v 1.6 2021/02/04 22:55:36 joerg Exp $ */ /*- * Copyright (c) 2019 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mesong12_clkc.c,v 1.5 2021/01/27 03:10:18 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mesong12_clkc.c,v 1.6 2021/02/04 22:55:36 joerg Exp $"); #include #include @@ -939,7 +939,7 @@ struct mesong12_clkc_config { __BIT(18), /* sel */ \ 0) #define G12_CLK_vid_pll \ - MESON_CLK_GATE(MESONG12_CLOCK_VID_PLL_DIV, "vid_pll", \ + MESON_CLK_GATE(MESONG12_CLOCK_VID_PLL, "vid_pll", \ "vid_pll_sel", /* parent */ \ HHI_VID_PLL_CLK_DIV, /* reg */ \ 19)/* bit */
CVS commit: src/usr.sbin/fstyp
Module Name:src Committed By: joerg Date: Tue Feb 2 21:31:11 UTC 2021 Modified Files: src/usr.sbin/fstyp: Makefile Log Message: Ignore address of packed-member for clang too To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/fstyp/Makefile 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/fstyp/Makefile diff -u src/usr.sbin/fstyp/Makefile:1.10 src/usr.sbin/fstyp/Makefile:1.11 --- src/usr.sbin/fstyp/Makefile:1.10 Sun Sep 6 07:20:31 2020 +++ src/usr.sbin/fstyp/Makefile Tue Feb 2 21:31:11 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2020/09/06 07:20:31 mrg Exp $ +# $NetBSD: Makefile,v 1.11 2021/02/02 21:31:11 joerg Exp $ .include @@ -29,7 +29,7 @@ COPTS.zfs.c+= -I${NETBSDSRCDIR}/external LDADD+= -lnvpair -lzfs .endif -CWARNFLAGS.clang+= -Wno-unknown-pragmas +CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-error=address-of-packed-member CWARNFLAGS.gcc+=${GCC_NO_ADDR_OF_PACKED_MEMBER} .include
CVS commit: src/usr.bin/nbperf
Module Name:src Committed By: joerg Date: Thu Jan 28 18:52:43 UTC 2021 Modified Files: src/usr.bin/nbperf: graph2.c Log Message: Fix sanity check to match the fixed off-by-one logic in the sizing logic. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/nbperf/graph2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/nbperf/graph2.c diff -u src/usr.bin/nbperf/graph2.c:1.5 src/usr.bin/nbperf/graph2.c:1.6 --- src/usr.bin/nbperf/graph2.c:1.5 Thu Jan 7 16:03:08 2021 +++ src/usr.bin/nbperf/graph2.c Thu Jan 28 18:52:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: graph2.c,v 1.5 2021/01/07 16:03:08 joerg Exp $ */ +/* $NetBSD: graph2.c,v 1.6 2021/01/28 18:52:43 joerg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #endif #include -__RCSID("$NetBSD: graph2.c,v 1.5 2021/01/07 16:03:08 joerg Exp $"); +__RCSID("$NetBSD: graph2.c,v 1.6 2021/01/28 18:52:43 joerg Exp $"); #include #include @@ -180,11 +180,11 @@ SIZED2(_hash)(struct nbperf *nbperf, str size_t i, j; #if GRAPH_SIZE == 2 - if (nbperf->allow_hash_fudging && (graph->v & 1) != 1) - errx(1, "vertex count must have lowest bit set"); + if (nbperf->allow_hash_fudging && (graph->v & 1) != 0) + errx(1, "vertex count must have lowest bit clear"); #else - if (nbperf->allow_hash_fudging && (graph->v & 3) != 3) - errx(1, "vertex count must have lowest 2 bits set"); + if (nbperf->allow_hash_fudging && (graph->v & 3) != 0) + errx(1, "vertex count must have lowest 2 bits clear"); #endif
CVS commit: src/usr.bin/nbperf
Module Name:src Committed By: joerg Date: Tue Jan 26 21:25:55 UTC 2021 Modified Files: src/usr.bin/nbperf: nbperf-bdz.c nbperf-chm.c Log Message: Fix potential off-by-one error when using hash fudging. It needs to round up to 2/4 and not one less to guarantee that the adjusted hash fits into array. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/nbperf/nbperf-bdz.c cvs rdiff -u -r1.4 -r1.5 src/usr.bin/nbperf/nbperf-chm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/nbperf/nbperf-bdz.c diff -u src/usr.bin/nbperf/nbperf-bdz.c:1.10 src/usr.bin/nbperf/nbperf-bdz.c:1.11 --- src/usr.bin/nbperf/nbperf-bdz.c:1.10 Thu Jan 7 16:03:08 2021 +++ src/usr.bin/nbperf/nbperf-bdz.c Tue Jan 26 21:25:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nbperf-bdz.c,v 1.10 2021/01/07 16:03:08 joerg Exp $ */ +/* $NetBSD: nbperf-bdz.c,v 1.11 2021/01/26 21:25:55 joerg Exp $ */ /*- * Copyright (c) 2009, 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #endif #include -__RCSID("$NetBSD: nbperf-bdz.c,v 1.10 2021/01/07 16:03:08 joerg Exp $"); +__RCSID("$NetBSD: nbperf-bdz.c,v 1.11 2021/01/26 21:25:55 joerg Exp $"); #include #include @@ -285,7 +285,7 @@ bpz_compute(struct nbperf *nbperf) if (v < 10) v = 10; if (nbperf->allow_hash_fudging) - v |= 3; + v = (v + 3) & ~3; graph3_setup(, v, e); Index: src/usr.bin/nbperf/nbperf-chm.c diff -u src/usr.bin/nbperf/nbperf-chm.c:1.4 src/usr.bin/nbperf/nbperf-chm.c:1.5 --- src/usr.bin/nbperf/nbperf-chm.c:1.4 Thu Jan 7 16:03:08 2021 +++ src/usr.bin/nbperf/nbperf-chm.c Tue Jan 26 21:25:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nbperf-chm.c,v 1.4 2021/01/07 16:03:08 joerg Exp $ */ +/* $NetBSD: nbperf-chm.c,v 1.5 2021/01/26 21:25:55 joerg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. @@ -35,7 +35,7 @@ #endif #include -__RCSID("$NetBSD: nbperf-chm.c,v 1.4 2021/01/07 16:03:08 joerg Exp $"); +__RCSID("$NetBSD: nbperf-chm.c,v 1.5 2021/01/26 21:25:55 joerg Exp $"); #include #include @@ -262,12 +262,12 @@ chm_compute(struct nbperf *nbperf) if (v < 10) v = 10; if (nbperf->allow_hash_fudging) - v |= 3; + v = (v + 3) & ~3; #else if (v == 2 * nbperf->n) ++v; if (nbperf->allow_hash_fudging) - v |= 1; + v = (v + 1) & ~1; #endif state.g = calloc(sizeof(uint32_t), v);
CVS commit: src/usr.bin/nbperf
Module Name:src Committed By: joerg Date: Tue Jan 12 14:21:18 UTC 2021 Modified Files: src/usr.bin/nbperf: nbperf.c Log Message: Don't use arc4random for the tools build on NetBSD either. compat_defs.h explicitly forces _POSIX_SOURCE and this hides the prototype in stdlib.h. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/nbperf/nbperf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/nbperf/nbperf.c diff -u src/usr.bin/nbperf/nbperf.c:1.6 src/usr.bin/nbperf/nbperf.c:1.7 --- src/usr.bin/nbperf/nbperf.c:1.6 Thu Jan 7 16:03:08 2021 +++ src/usr.bin/nbperf/nbperf.c Tue Jan 12 14:21:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nbperf.c,v 1.6 2021/01/07 16:03:08 joerg Exp $ */ +/* $NetBSD: nbperf.c,v 1.7 2021/01/12 14:21:18 joerg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #endif #include -__RCSID("$NetBSD: nbperf.c,v 1.6 2021/01/07 16:03:08 joerg Exp $"); +__RCSID("$NetBSD: nbperf.c,v 1.7 2021/01/12 14:21:18 joerg Exp $"); #include #include @@ -62,7 +62,7 @@ void usage(void) exit(1); } -#if HAVE_NBTOOL_CONFIG_H && !defined(__NetBSD__) +#if HAVE_NBTOOL_CONFIG_H #define arc4random() rand() #endif
CVS commit: src
+e->vertices[2] ^= 2 * (e->vertices[0] == e->vertices[2] || +e->vertices[1] == e->vertices[2]); + } +#endif } + } + + for (i = 0; i < graph->e; ++i) + SIZED2(_add_edge)(graph, i); - graph->output_order[--graph->output_index] = e - graph->edges; + if (nbperf->check_duplicates) { + nbperf->check_duplicates = 0; + return SIZED2(_check_duplicates)(nbperf, graph); } + + return 0; } int -graph2_output_order(struct graph2 *graph) +SIZED2(_output_order)(struct SIZED(graph) *graph) { - size_t i; + size_t i, j; + struct SIZED(edge) *e2; graph->output_index = graph->e; for (i = 0; i < graph->v; ++i) - graph2_remove_vertex(graph, >verts[i]); + SIZED2(_remove_vertex)(graph, i); - if (graph->output_index != 0) + for (i = graph->e; graph->output_index > 0 && i > graph->output_index;) { + e2 = graph->edges + graph->output_order[--i]; + for (j = 0; j < GRAPH_SIZE; ++j) + SIZED2(_remove_vertex)(graph, e2->vertices[j]); + } + + if (graph->output_index != 0) { return -1; + } return 0; } Index: src/usr.bin/nbperf/graph3.c diff -u src/usr.bin/nbperf/graph3.c:1.4 src/usr.bin/nbperf/graph3.c:1.5 --- src/usr.bin/nbperf/graph3.c:1.4 Fri Oct 21 23:47:11 2011 +++ src/usr.bin/nbperf/graph3.c Thu Jan 7 16:03:08 2021 @@ -1,250 +1,4 @@ -/* $NetBSD: graph3.c,v 1.4 2011/10/21 23:47:11 joerg Exp $ */ -/*- - * Copyright (c) 2009 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Joerg Sonnenberger. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in - *the documentation and/or other materials provided with the - *distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ +/* $NetBSD*/ -#if HAVE_NBTOOL_CONFIG_H -#include "nbtool_config.h" -#endif - -#include -__RCSID("$NetBSD: graph3.c,v 1.4 2011/10/21 23:47:11 joerg Exp $"); - -#include -#include -#include -#include -#include - -#include "nbperf.h" -#include "graph3.h" - -static const uint32_t unused = 0xU; - -void -graph3_setup(struct graph3 *graph, uint32_t v, uint32_t e) -{ - graph->v = v; - graph->e = e; - - graph->verts = calloc(sizeof(struct vertex3), v); - graph->edges = calloc(sizeof(struct edge3), e); - graph->output_order = calloc(sizeof(uint32_t), e); - - if (graph->verts == NULL || graph->edges == NULL || - graph->output_order == NULL) - err(1, "malloc failed"); -} - -void -graph3_free(struct graph3 *graph) -{ - free(graph->verts); - free(graph->edges); - free(graph->output_order); - - graph->verts = NULL; - graph->edges = NULL; - graph->output_order = NULL; -} - -static int -graph3_check_duplicates(struct nbperf *nbperf, struct graph3 *graph) -{ - struct vertex3 *v; - struct edge3 *e, *e2; - uint32_t i, j; - - for (i = 0; i < graph->e; ++i) { - e = >edges[i]; - v = >verts[e->left]; - j = v->l_edge; - e2 = >edges[j]; - for (;;) { - if (i < j && e->middle == e2->middle && - e->right == e2->right && - nbperf->keylens[i] == nbperf->keylens[j] && - memcmp(nbperf->keys[i], nbperf->keys[j], - nbperf->keylens[i]) == 0) { -nbperf->has_duplicates = 1; -return -1; - } - if (e2->l_next == unused) -break; - j = e2->l_next; - e2 = >edges[j]; - } - } - return 0; -} - -int -graph3_hash(struct nbperf *nbperf, struct graph3 *graph) -{ - struct vertex3 *v; - uint32_t hashes[NBPERF_MAX_HASH_SIZE]; - size_t i; - - for (i = 0; i < graph->e; ++i) { - (*nbperf->compute_hash)(nbperf, - nbperf->keys[i], nbperf->keylens[i], hashes); - graph->e
CVS commit: src/lib/libc/cdb
Module Name:src Committed By: joerg Date: Thu Jan 7 14:41:50 UTC 2021 Modified Files: src/lib/libc/cdb: cdbw.c Log Message: Optimize CPU and memory use of cdbw(3) Reduce memory footprint and processing time by dropping the vertex parts of the edges kept during the peeling. Hook up the division-by-multiplication logic to help older platforms. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/cdb/cdbw.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/cdb/cdbw.c diff -u src/lib/libc/cdb/cdbw.c:1.6 src/lib/libc/cdb/cdbw.c:1.7 --- src/lib/libc/cdb/cdbw.c:1.6 Sat Nov 11 18:05:31 2017 +++ src/lib/libc/cdb/cdbw.c Thu Jan 7 14:41:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cdbw.c,v 1.6 2017/11/11 18:05:31 alnsn Exp $ */ +/* $NetBSD: cdbw.c,v 1.7 2021/01/07 14:41:50 joerg Exp $ */ /*- * Copyright (c) 2009, 2010, 2015 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #endif #include -__RCSID("$NetBSD: cdbw.c,v 1.6 2017/11/11 18:05:31 alnsn Exp $"); +__RCSID("$NetBSD: cdbw.c,v 1.7 2021/01/07 14:41:50 joerg Exp $"); #include "namespace.h" @@ -49,6 +49,74 @@ __RCSID("$NetBSD: cdbw.c,v 1.6 2017/11/1 #include #include +#if !HAVE_NBTOOL_CONFIG_H +#include +#else +static inline int +my_fls32(uint32_t n) +{ + int v; + + if (!n) + return 0; + + v = 32; + if ((n & 0xU) == 0) { + n <<= 16; + v -= 16; + } + if ((n & 0xFF00U) == 0) { + n <<= 8; + v -= 8; + } + if ((n & 0xF000U) == 0) { + n <<= 4; + v -= 4; + } + if ((n & 0xC000U) == 0) { + n <<= 2; + v -= 2; + } + if ((n & 0x8000U) == 0) { + n <<= 1; + v -= 1; + } + return v; +} + +static inline void +fast_divide32_prepare(uint32_t div, uint32_t * m, +uint8_t *s1, uint8_t *s2) +{ + uint64_t mt; + int l; + + l = my_fls32(div - 1); + mt = (uint64_t)(0x1ULL * ((1ULL << l) - div)); + *m = (uint32_t)(mt / div + 1); + *s1 = (l > 1) ? 1U : (uint8_t)l; + *s2 = (l == 0) ? 0 : (uint8_t)(l - 1); +} + +static inline uint32_t +fast_divide32(uint32_t v, uint32_t div, uint32_t m, uint8_t s1, +uint8_t s2) +{ + uint32_t t; + + t = (uint32_t)(((uint64_t)v * m) >> 32); + return (t + ((v - t) >> s1)) >> s2; +} + +static inline uint32_t +fast_remainder32(uint32_t v, uint32_t div, uint32_t m, uint8_t s1, +uint8_t s2) +{ + + return v - div * fast_divide32(v, div, m, s1, s2); +} +#endif + #ifdef __weak_alias __weak_alias(cdbw_close,_cdbw_close) __weak_alias(cdbw_open,_cdbw_open) @@ -279,30 +347,29 @@ cdbw_stable_seeder(void) } /* - * The algorithm below is based on paper - * Cache-Oblivious Peeling of Random Hypergraphs by Djamal Belazzougui, - * Paolo Boldi, Giuseppe Ottaviano, Rossano Venturini, and Sebastiano - * Vigna. - * http://zola.di.unipi.it/rossano/wp-content/papercite-data/pdf/dcc14.pdf - */ - -/* - * Data type for a valid oriented edge (v0, v1, v2), v1 < v2. - * The first vertex v0 is implicit and is determined by an index - * of the corresponding element in the state->oedges array. - * If the degree of v0 is greater than 1, other members don't - * make sense because they're a result of XORing multiple values. + * For each vertex in the 3-graph, the incidence lists needs to be kept. + * Avoid storing the full list by just XORing the indices of the still + * incident edges and remember the number of such edges as that's all + * the peeling computation needs. This is inspired by: + * Cache-Oblivious Peeling of Random Hypergraphs by Djamal Belazzougui, + * Paolo Boldi, Giuseppe Ottaviano, Rossano Venturini, and Sebastiano + * Vigna. https://arxiv.org/abs/1312.0526 + * + * Unlike in the paper, we don't care about external storage and have + * the edge list at hand all the time. As such, no ordering is necessary + * and the vertices of the edge don't have to be copied. + * + * The core observation of the paper above is that for a degree of one, + * the incident edge can be obtained directly. */ -struct oedge { - uint32_t degree; /* Degree of v0. */ - uint32_t verts[2]; /* v1 and v2 */ - uint32_t edge; +struct vertex { + uint32_t degree; + uint32_t edges; }; struct edge { + uint32_t vertices[3]; uint32_t idx; - - uint32_t left, middle, right; }; struct state { @@ -314,48 +381,40 @@ struct state { uint32_t *g; char *visited; - struct oedge *oedges; + struct vertex *vertices; struct edge *edges; uint32_t output_index; uint32_t *output_order; }; /* - * Add (delta == 1) or remove (delta == -1) the edge e from vertex v0. + * Add (delta == 1) or remove (delta == -1) the edge e + * from the incidence lists. */ static inline void -add_remove_edge(struct oedge *o, int delta, uint32_t e, -uint32_t v0, uint32_t v1, uint32_t v2) -{ - - o[v0].verts[v1 < v2 ? 0 : 1] ^= v1; - o[v0].verts[v1 < v2 ? 1 : 0] ^= v2; - o[v0].degree += delta; - o[v0].edge ^= e; -} - -static inline void -add_edge(struct oedge *o, uint32_t e, -
CVS commit: src/games/warp
Module Name:src Committed By: joerg Date: Thu Nov 12 22:23:16 UTC 2020 Modified Files: src/games/warp: intrp.c score.h sig.h util.c util.h Log Message: Avoid common symbols. Use __dead. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/games/warp/intrp.c cvs rdiff -u -r1.4 -r1.5 src/games/warp/score.h src/games/warp/sig.h cvs rdiff -u -r1.5 -r1.6 src/games/warp/util.c src/games/warp/util.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/intrp.c diff -u src/games/warp/intrp.c:1.6 src/games/warp/intrp.c:1.7 --- src/games/warp/intrp.c:1.6 Wed Nov 11 19:55:33 2020 +++ src/games/warp/intrp.c Thu Nov 12 22:23:16 2020 @@ -32,7 +32,7 @@ static char *getrealname(uid_t); static char *skipinterp(const char *, const char *); #endif -static void abort_interp(void); +__dead static void abort_interp(void); void intrp_init(char *tcbuf) Index: src/games/warp/score.h diff -u src/games/warp/score.h:1.4 src/games/warp/score.h:1.5 --- src/games/warp/score.h:1.4 Wed Nov 11 19:55:33 2020 +++ src/games/warp/score.h Thu Nov 12 22:23:16 2020 @@ -42,7 +42,7 @@ EXT char longlognam[128]; EXT char c INIT(' '); void score_init(void); -void wscore(void); +__dead void wscore(void); void display_status(void); void wavescore(void); void score(void); Index: src/games/warp/sig.h diff -u src/games/warp/sig.h:1.4 src/games/warp/sig.h:1.5 --- src/games/warp/sig.h:1.4 Tue Nov 10 22:42:19 2020 +++ src/games/warp/sig.h Thu Nov 12 22:23:16 2020 @@ -8,8 +8,8 @@ void sig_init(void); void mytstp(void); -void finalize(int status); -void sig_catcher(int signo); +__dead void finalize(int status); +__dead void sig_catcher(int signo); #ifdef SIGTSTP void cont_catcher(int x); void stop_catcher(int sig); Index: src/games/warp/util.c diff -u src/games/warp/util.c:1.5 src/games/warp/util.c:1.6 --- src/games/warp/util.c:1.5 Tue Nov 10 23:03:22 2020 +++ src/games/warp/util.c Thu Nov 12 22:23:16 2020 @@ -21,6 +21,8 @@ #include "INTERN.h" #include "util.h" +struct timespec timebuf; + void util_init(void) { Index: src/games/warp/util.h diff -u src/games/warp/util.h:1.5 src/games/warp/util.h:1.6 --- src/games/warp/util.h:1.5 Wed Nov 11 19:55:33 2020 +++ src/games/warp/util.h Thu Nov 12 22:23:16 2020 @@ -17,7 +17,7 @@ /* we get fractions of seconds from calling ftime on timebuf */ -EXT struct timespec timebuf; +extern struct timespec timebuf; #define roundsleep(x) (clock_gettime(CLOCK_REALTIME, ),sleep(timebuf.tv_nsec > 50 ?x+1:x)) #define waiting 0 @@ -37,7 +37,7 @@ EXT int len_last_line_got INIT(0); void util_init(void); void movc3(int, char *, char *); -void no_can_do(const char *); +__dead void no_can_do(const char *); int exdis(int); void *safemalloc(size_t size); char *safecpy(char *, const char *, size_t); @@ -46,6 +46,6 @@ char *instr(const char *, const char *); #ifdef SETUIDGID int eaccess(const char *, mode_t); #endif -void prexit(const char *); +__dead void prexit(const char *); char *savestr(const char *); char *getval(const char *, const char *);
CVS commit: src/libexec/ld.elf_so/arch/arm
Module Name:src Committed By: joerg Date: Tue Jun 16 21:02:20 UTC 2020 Modified Files: src/libexec/ld.elf_so/arch/arm: mdreloc.c Log Message: R_ARM_TLS_TPOFF32 needs to adjust the existing value, not blindly overwrite it. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/libexec/ld.elf_so/arch/arm/mdreloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/arm/mdreloc.c diff -u src/libexec/ld.elf_so/arch/arm/mdreloc.c:1.44 src/libexec/ld.elf_so/arch/arm/mdreloc.c:1.45 --- src/libexec/ld.elf_so/arch/arm/mdreloc.c:1.44 Tue Apr 3 21:10:27 2018 +++ src/libexec/ld.elf_so/arch/arm/mdreloc.c Tue Jun 16 21:02:20 2020 @@ -1,8 +1,8 @@ -/* $NetBSD: mdreloc.c,v 1.44 2018/04/03 21:10:27 joerg Exp $ */ +/* $NetBSD: mdreloc.c,v 1.45 2020/06/16 21:02:20 joerg Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.44 2018/04/03 21:10:27 joerg Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.45 2020/06/16 21:02:20 joerg Exp $"); #endif /* not lint */ #include @@ -232,8 +232,11 @@ _rtld_relocate_nonplt_objects(Obj_Entry _rtld_tls_offset_allocate(obj)) return -1; - tmp = (Elf_Addr)def->st_value + defobj->tlsoffset + - sizeof(struct tls_tcb); + if (__predict_true(RELOC_ALIGNED_P(where))) +tmp = *where; + else +tmp = load_ptr(where); + tmp += (Elf_Addr)def->st_value + defobj->tlsoffset + sizeof(struct tls_tcb); if (__predict_true(RELOC_ALIGNED_P(where))) *where = tmp; else
CVS commit: src/libexec/ld.elf_so/arch/aarch64
Module Name:src Committed By: joerg Date: Tue Jun 16 21:01:30 UTC 2020 Modified Files: src/libexec/ld.elf_so/arch/aarch64: mdreloc.c Log Message: Honor addend for R_AARCH64_TLS_TPREL relocation. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/aarch64/mdreloc.c diff -u src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.13 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.14 --- src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.13 Fri Jan 18 11:59:03 2019 +++ src/libexec/ld.elf_so/arch/aarch64/mdreloc.c Tue Jun 16 21:01:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.13 2019/01/18 11:59:03 skrll Exp $ */ +/* $NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.13 2019/01/18 11:59:03 skrll Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $"); #endif /* not lint */ #include @@ -296,8 +296,9 @@ _rtld_relocate_nonplt_objects(Obj_Entry _rtld_tls_offset_allocate(obj)) return -1; - *where = (Elf_Addr)def->st_value + defobj->tlsoffset + - sizeof(struct tls_tcb); + *where = (Elf_Addr)(def->st_value + defobj->tlsoffset + + rela->r_addend + sizeof(struct tls_tcb)); + rdbg(("TLS_TPREL %s in %s --> %p in %s", obj->strtab + obj->symtab[symnum].st_name, obj->path, (void *)*where, defobj->path));
CVS commit: src/common/lib/libprop
Module Name:src Committed By: joerg Date: Thu Jun 11 22:25:44 UTC 2020 Modified Files: src/common/lib/libprop: prop_object_impl.h Log Message: Unbreak clang builds by removing questionable linker warning sections trggered all over the place. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/common/lib/libprop/prop_object_impl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_object_impl.h diff -u src/common/lib/libprop/prop_object_impl.h:1.34 src/common/lib/libprop/prop_object_impl.h:1.35 --- src/common/lib/libprop/prop_object_impl.h:1.34 Sat Jun 6 21:25:59 2020 +++ src/common/lib/libprop/prop_object_impl.h Thu Jun 11 22:25:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_object_impl.h,v 1.34 2020/06/06 21:25:59 thorpej Exp $ */ +/* $NetBSD: prop_object_impl.h,v 1.35 2020/06/11 22:25:44 joerg Exp $ */ /*- * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc. @@ -492,7 +492,7 @@ do { \ #if defined(__NetBSD__) #include #define _PROP_ARG_UNUSED __unused -#define _PROP_DEPRECATED(s, m) __warn_references(s, m) +#define _PROP_DEPRECATED(s, m) #else #define _PROP_ARG_UNUSED /* delete */ #define _PROP_DEPRECATED(s, m) /* delete */
CVS commit: src/share/mk
Module Name:src Committed By: joerg Date: Sat Jun 6 22:06:42 UTC 2020 Modified Files: src/share/mk: bsd.own.mk Log Message: sun2 and vax have no native TLS support, so avoid using modern jemalloc as it has a couple of nasty race conditions when using TSD. To generate a diff of this commit: cvs rdiff -u -r1.1198 -r1.1199 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1198 src/share/mk/bsd.own.mk:1.1199 --- src/share/mk/bsd.own.mk:1.1198 Tue Jun 2 14:26:01 2020 +++ src/share/mk/bsd.own.mk Sat Jun 6 22:06:42 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1198 2020/06/02 14:26:01 jmcneill Exp $ +# $NetBSD: bsd.own.mk,v 1.1199 2020/06/06 22:06:42 joerg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -181,7 +181,11 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # What version of jemalloc we use (100 is the one # built-in to libc from 2005 (pre version 3). # +.if ${MACHINE_ARCH} == "vax" || ${MACHINE} == "sun2" +HAVE_JEMALLOC?= 100 +.else HAVE_JEMALLOC?= 510 +.endif .if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*) .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
CVS commit: src
Module Name:src Committed By: joerg Date: Thu Jun 4 00:45:32 UTC 2020 Modified Files: src/external/bsd/jemalloc/dist/src: tsd.c src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h src/lib/libpthread: pthread.c Log Message: If _malloc_thread_cleanup is implement, call it from libpthread. Provide the hook from modern jemalloc to avoid using TSD for the thread destruction cleanup as it can result in reentrancy crashes if fork is called from a thread that never called malloc as it will result in a late malloc from the pre-fork synchronisation handler. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/jemalloc/dist/src/tsd.c cvs rdiff -u -r1.12 -r1.13 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h cvs rdiff -u -r1.173 -r1.174 src/lib/libpthread/pthread.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/bsd/jemalloc/dist/src/tsd.c diff -u src/external/bsd/jemalloc/dist/src/tsd.c:1.2 src/external/bsd/jemalloc/dist/src/tsd.c:1.3 --- src/external/bsd/jemalloc/dist/src/tsd.c:1.2 Wed Apr 24 14:34:21 2019 +++ src/external/bsd/jemalloc/dist/src/tsd.c Thu Jun 4 00:45:32 2020 @@ -169,6 +169,10 @@ malloc_tsd_dalloc(void *wrapper) { a0dalloc(wrapper); } +__BEGIN_DECLS +void _malloc_thread_cleanup(void); +__END_DECLS + #if defined(JEMALLOC_MALLOC_THREAD_CLEANUP) || defined(_WIN32) #ifndef _WIN32 JEMALLOC_EXPORT Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.12 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.13 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.12 Tue Apr 21 22:27:09 2020 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Thu Jun 4 00:45:32 2020 @@ -138,7 +138,7 @@ * _malloc_thread_cleanup() exists, use it as the basis for thread cleanup in * malloc_tsd. */ -/* #undef JEMALLOC_MALLOC_THREAD_CLEANUP */ +#define JEMALLOC_MALLOC_THREAD_CLEANUP /* * Defined if threaded initialization is known to be safe on this platform. Index: src/lib/libpthread/pthread.c diff -u src/lib/libpthread/pthread.c:1.173 src/lib/libpthread/pthread.c:1.174 --- src/lib/libpthread/pthread.c:1.173 Wed Jun 3 22:10:24 2020 +++ src/lib/libpthread/pthread.c Thu Jun 4 00:45:32 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.173 2020/06/03 22:10:24 ad Exp $ */ +/* $NetBSD: pthread.c,v 1.174 2020/06/04 00:45:32 joerg Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020 @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: pthread.c,v 1.173 2020/06/03 22:10:24 ad Exp $"); +__RCSID("$NetBSD: pthread.c,v 1.174 2020/06/04 00:45:32 joerg Exp $"); #define __EXPOSE_STACK 1 @@ -66,6 +66,10 @@ __RCSID("$NetBSD: pthread.c,v 1.173 2020 #include "pthread_makelwp.h" #include "reentrant.h" +__BEGIN_DECLS +void _malloc_thread_cleanup(void) __weak; +__END_DECLS + pthread_rwlock_t pthread__alltree_lock = PTHREAD_RWLOCK_INITIALIZER; static rb_tree_t pthread__alltree; @@ -677,6 +681,9 @@ pthread_exit(void *retval) /* Perform cleanup of thread-specific data */ pthread__destroy_tsd(self); + if (_malloc_thread_cleanup) + _malloc_thread_cleanup(); + /* * Signal our exit. Our stack and pthread_t won't be reused until * pthread_create() can see from kernel info that this LWP is gone.
CVS commit: src/lib/libc
Module Name:src Committed By: joerg Date: Tue Jun 2 01:30:31 UTC 2020 Modified Files: src/lib/libc/citrus: citrus_ctype_template.h src/lib/libc/locale: multibyte.h Log Message: Don't overalign _RuneStatePriv, it must share the alignment of mbstate_t it aliased with. Assert that the alignment actually used reflects the alignment required by existing implementation and for newly build modules assert that it is at most the guaranteed alignment. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/libc/citrus/citrus_ctype_template.h cvs rdiff -u -r1.6 -r1.7 src/lib/libc/locale/multibyte.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/citrus/citrus_ctype_template.h diff -u src/lib/libc/citrus/citrus_ctype_template.h:1.37 src/lib/libc/citrus/citrus_ctype_template.h:1.38 --- src/lib/libc/citrus/citrus_ctype_template.h:1.37 Sun Jul 28 14:26:08 2019 +++ src/lib/libc/citrus/citrus_ctype_template.h Tue Jun 2 01:30:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: citrus_ctype_template.h,v 1.37 2019/07/28 14:26:08 christos Exp $ */ +/* $NetBSD: citrus_ctype_template.h,v 1.38 2020/06/02 01:30:31 joerg Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -118,6 +118,7 @@ * */ +#include /* prototypes */ @@ -506,6 +507,10 @@ _FUNCNAME(ctype_getops)(_citrus_ctype_op return (0); } +/* Ensure alignment matches guarantees from locale/multibyte.h */ +__CTASSERT(alignof(_ENCODING_STATE) <= alignof(int) || + alignof(_ENCODING_STATE) <= alignof(void *)); + static int _FUNCNAME(ctype_init)(void ** __restrict cl, void * __restrict var, size_t lenvar, size_t lenps) Index: src/lib/libc/locale/multibyte.h diff -u src/lib/libc/locale/multibyte.h:1.6 src/lib/libc/locale/multibyte.h:1.7 --- src/lib/libc/locale/multibyte.h:1.6 Sun Aug 18 20:03:48 2013 +++ src/lib/libc/locale/multibyte.h Tue Jun 2 01:30:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: multibyte.h,v 1.6 2013/08/18 20:03:48 joerg Exp $ */ +/* $NetBSD: multibyte.h,v 1.7 2020/06/02 01:30:31 joerg Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -29,6 +29,8 @@ #ifndef _MULTIBYTE_H_ #define _MULTIBYTE_H_ +#include + /* mbstate_t private */ #ifdef _BSD_MBSTATE_T_ @@ -38,9 +40,14 @@ typedef _BSD_MBSTATE_T_ mbstate_t; typedef struct _RuneStatePriv { _RuneLocale *__runelocale; - char __private __attribute__((__aligned__)); + char __private[]; } _RuneStatePriv; +__CTASSERT(alignof(struct _RuneStatePriv) >= alignof(void *)); +__CTASSERT(sizeof(_RuneStatePriv) % alignof(void *) == 0); +__CTASSERT(alignof(struct _RuneStatePriv) >= alignof(int)); +__CTASSERT(sizeof(_RuneStatePriv) % alignof(int) == 0); + typedef union _RuneState { mbstate_t __pad; struct _RuneStatePriv __priv; @@ -91,7 +98,7 @@ _ps_to_private(mbstate_t *ps) { if (ps == NULL) return NULL; - return (void *)&_ps_to_runestate(ps)->rs_private; + return _ps_to_runestate(ps)->rs_private; } static __inline void const * @@ -99,7 +106,7 @@ _ps_to_private_const(mbstate_t const *ps { if (ps == NULL) return NULL; - return (void const *)&_ps_to_runestate_const(ps)->rs_private; + return _ps_to_runestate_const(ps)->rs_private; } static __inline void
CVS commit: src/lib/libpthread
Module Name:src Committed By: joerg Date: Tue Jun 2 00:29:53 UTC 2020 Modified Files: src/lib/libpthread: pthread.c pthread_int.h pthread_rwlock.c Log Message: Pass down errno when calling pthread__errorfunc after a system call. Allow format arguments for that reason and use (v)snprintf_ss in pthread_errorfunc to avoid race conditions and the like. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/lib/libpthread/pthread.c cvs rdiff -u -r1.105 -r1.106 src/lib/libpthread/pthread_int.h cvs rdiff -u -r1.41 -r1.42 src/lib/libpthread/pthread_rwlock.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/libpthread/pthread.c diff -u src/lib/libpthread/pthread.c:1.171 src/lib/libpthread/pthread.c:1.172 --- src/lib/libpthread/pthread.c:1.171 Mon Jun 1 11:44:59 2020 +++ src/lib/libpthread/pthread.c Tue Jun 2 00:29:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.171 2020/06/01 11:44:59 ad Exp $ */ +/* $NetBSD: pthread.c,v 1.172 2020/06/02 00:29:53 joerg Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020 @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: pthread.c,v 1.171 2020/06/01 11:44:59 ad Exp $"); +__RCSID("$NetBSD: pthread.c,v 1.172 2020/06/02 00:29:53 joerg Exp $"); #define __EXPOSE_STACK 1 @@ -622,7 +622,7 @@ pthread__clear_waiters(pthread_t self) self->pt_nwaiters = 0; if (rv != 0) { pthread__errorfunc(__FILE__, __LINE__, __func__, - "_lwp_unpark failed"); + "_lwp_unpark failed: %d", errno); } break; default: @@ -631,7 +631,7 @@ pthread__clear_waiters(pthread_t self) self->pt_nwaiters = 0; if (rv != 0) { pthread__errorfunc(__FILE__, __LINE__, __func__, - "_lwp_unpark_all failed"); + "_lwp_unpark_all failed: %d", errno); } break; } @@ -1102,23 +1102,29 @@ pthread__assertfunc(const char *file, in void pthread__errorfunc(const char *file, int line, const char *function, - const char *msg) + const char *msg, ...) { char buf[1024]; + char buf2[1024]; size_t len; + va_list ap; if (pthread__diagassert == 0) return; + va_start(ap, msg); + vsnprintf_ss(buf2, sizeof(buf2), msg, ap); + va_end(ap); + /* * snprintf should not acquire any locks, or we could * end up deadlocked if the assert caller held locks. */ - len = snprintf(buf, 1024, + len = snprintf_ss(buf, sizeof(buf), "%s: Error detected by libpthread: %s.\n" "Detected by file \"%s\", line %d%s%s%s.\n" "See pthread(3) for information.\n", - getprogname(), msg, file, line, + getprogname(), buf2, file, line, function ? ", function \"" : "", function ? function : "", function ? "\"" : ""); @@ -1195,7 +1201,7 @@ pthread__park(pthread_t self, pthread_mu break; default: pthread__errorfunc(__FILE__, __LINE__, -__func__, "_lwp_park failed"); +__func__, "_lwp_park failed: %d", errno); break; } } Index: src/lib/libpthread/pthread_int.h diff -u src/lib/libpthread/pthread_int.h:1.105 src/lib/libpthread/pthread_int.h:1.106 --- src/lib/libpthread/pthread_int.h:1.105 Mon Jun 1 11:44:59 2020 +++ src/lib/libpthread/pthread_int.h Tue Jun 2 00:29:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_int.h,v 1.105 2020/06/01 11:44:59 ad Exp $ */ +/* $NetBSD: pthread_int.h,v 1.106 2020/06/02 00:29:53 joerg Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020 @@ -300,8 +300,8 @@ void pthread__copy_tsd(pthread_t) PTHREA __dead void pthread__assertfunc(const char *, int, const char *, const char *) PTHREAD_HIDE; -void pthread__errorfunc(const char *, int, const char *, const char *) - PTHREAD_HIDE; +void pthread__errorfunc(const char *, int, const char *, const char *, ...) + __printflike(4, 5) PTHREAD_HIDE; char *pthread__getenv(const char *) PTHREAD_HIDE; __dead void pthread__cancelled(void) PTHREAD_HIDE; void pthread__mutex_deferwake(pthread_t, pthread_mutex_t *) PTHREAD_HIDE; Index: src/lib/libpthread/pthread_rwlock.c diff -u src/lib/libpthread/pthread_rwlock.c:1.41 src/lib/libpthread/pthread_rwlock.c:1.42 --- src/lib/libpthread/pthread_rwlock.c:1.41 Mon Jun 1 11:44:59 2020 +++ src/lib/libpthread/pthread_rwlock.c Tue Jun 2 00:29:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_rwlock.c,v 1.41 2020/06/01 11:44:59 ad Exp $ */ +/* $NetBSD: pthread_rwlock.c,v 1.42 2020/06/02 00:29:53 joerg Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: pthread_rwlock.c,v 1.41 2020/06/01 11:44:59 ad Exp $"); +__RCSID("$NetBSD: pthread_rwlock.c,v 1.42 2020/06/02 00:29:53 joerg Exp $"); #include #include @@ -361,7 +361,7 @@ pthread__rwlock_wrlock(pthread_rwlock_t return error; pthread__errorfunc(__FILE__, __LINE__, __func__, - "direct handoff failure"); + "direct handoff failure: %d",
CVS commit: src/external/bsd/ntp/dist
Module Name:src Committed By: joerg Date: Sat May 30 23:52:10 UTC 2020 Modified Files: src/external/bsd/ntp/dist/include: ntp_config.h src/external/bsd/ntp/dist/ntpd: ntp_config.c Log Message: Don't define psl as common symbol, move it into the only file using it. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/external/bsd/ntp/dist/include/ntp_config.h cvs rdiff -u -r1.23 -r1.24 src/external/bsd/ntp/dist/ntpd/ntp_config.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/bsd/ntp/dist/include/ntp_config.h diff -u src/external/bsd/ntp/dist/include/ntp_config.h:1.12 src/external/bsd/ntp/dist/include/ntp_config.h:1.13 --- src/external/bsd/ntp/dist/include/ntp_config.h:1.12 Mon May 25 20:47:19 2020 +++ src/external/bsd/ntp/dist/include/ntp_config.h Sat May 30 23:52:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ntp_config.h,v 1.12 2020/05/25 20:47:19 christos Exp $ */ +/* $NetBSD: ntp_config.h,v 1.13 2020/05/30 23:52:09 joerg Exp $ */ #ifndef NTP_CONFIG_H #define NTP_CONFIG_H @@ -277,17 +277,6 @@ typedef struct settrap_parms_tag { int ifaddr_nonnull; } settrap_parms; - -/* - * Poll Skew List - */ - -psl_item psl[17-3+1]; /* values for polls 3-17 */ -/* To simplify the runtime code we */ -/* don't want to have to special-case */ -/* dealing with a default */ - - /* ** Data Minimization Items */ Index: src/external/bsd/ntp/dist/ntpd/ntp_config.c diff -u src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.23 src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.24 --- src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.23 Wed May 27 23:52:19 2020 +++ src/external/bsd/ntp/dist/ntpd/ntp_config.c Sat May 30 23:52:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ntp_config.c,v 1.23 2020/05/27 23:52:19 christos Exp $ */ +/* $NetBSD: ntp_config.c,v 1.24 2020/05/30 23:52:09 joerg Exp $ */ /* ntp_config.c * @@ -69,6 +69,16 @@ extern int yyparse(void); # include #endif +/* + * Poll Skew List + */ + +static psl_item psl[17-3+1]; /* values for polls 3-17 */ +/* To simplify the runtime code we */ +/* don't want to have to special-case */ +/* dealing with a default */ + + /* list of servers from command line for config_peers() */ int cmdline_server_count; char ** cmdline_servers;
CVS commit: src/include
Module Name:src Committed By: joerg Date: Tue May 26 21:49:30 UTC 2020 Modified Files: src/include: stdlib.h Log Message: Avoid depending on namespace pollution in stdlib.h. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/include/stdlib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/stdlib.h diff -u src/include/stdlib.h:1.121 src/include/stdlib.h:1.122 --- src/include/stdlib.h:1.121 Sat Jan 5 09:16:46 2019 +++ src/include/stdlib.h Tue May 26 21:49:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: stdlib.h,v 1.121 2019/01/05 09:16:46 maya Exp $ */ +/* $NetBSD: stdlib.h,v 1.122 2020/05/26 21:49:29 joerg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -272,7 +272,7 @@ uint32_t arc4random(void); void arc4random_stir(void); void arc4random_buf(void *, size_t); uint32_t arc4random_uniform(uint32_t); -void arc4random_addrandom(u_char *, int); +void arc4random_addrandom(unsigned char *, int); char *getbsize(int *, long *); char *cgetcap(char *, const char *, int); int cgetclose(void);
CVS commit: src/bin/setfacl
Module Name:src Committed By: joerg Date: Fri May 22 01:28:45 UTC 2020 Modified Files: src/bin/setfacl: setfacl.c Log Message: Mark usage as dead To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/bin/setfacl/setfacl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/setfacl/setfacl.c diff -u src/bin/setfacl/setfacl.c:1.1 src/bin/setfacl/setfacl.c:1.2 --- src/bin/setfacl/setfacl.c:1.1 Sat May 16 18:31:45 2020 +++ src/bin/setfacl/setfacl.c Fri May 22 01:28:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: setfacl.c,v 1.1 2020/05/16 18:31:45 christos Exp $ */ +/* $NetBSD: setfacl.c,v 1.2 2020/05/22 01:28:44 joerg Exp $ */ /*- * Copyright (c) 2001 Chris D. Faulhaber @@ -30,7 +30,7 @@ #if 0 __FBSDID("$FreeBSD: head/bin/setfacl/setfacl.c 339793 2018-10-26 21:17:06Z markj $"); #else -__RCSID("$NetBSD: setfacl.c,v 1.1 2020/05/16 18:31:45 christos Exp $"); +__RCSID("$NetBSD: setfacl.c,v 1.2 2020/05/22 01:28:44 joerg Exp $"); #endif #include @@ -79,7 +79,7 @@ static acl_type_t acl_type = ACL_TYPE_AC static int handle_file(FTS *ftsp, FTSENT *file); static acl_t clear_inheritance_flags(acl_t acl); static char **stdin_files(void); -static void usage(void); +static __dead void usage(void); static void usage(void)
CVS commit: src/bin/getfacl
Module Name:src Committed By: joerg Date: Fri May 22 01:28:00 UTC 2020 Modified Files: src/bin/getfacl: getfacl.c Log Message: Don't return from dead functions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/bin/getfacl/getfacl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/getfacl/getfacl.c diff -u src/bin/getfacl/getfacl.c:1.1 src/bin/getfacl/getfacl.c:1.2 --- src/bin/getfacl/getfacl.c:1.1 Sat May 16 18:31:45 2020 +++ src/bin/getfacl/getfacl.c Fri May 22 01:28:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: getfacl.c,v 1.1 2020/05/16 18:31:45 christos Exp $ */ +/* $NetBSD: getfacl.c,v 1.2 2020/05/22 01:28:00 joerg Exp $ */ /*- * Copyright (c) 1999, 2001, 2002 Robert N M Watson @@ -37,7 +37,7 @@ #if 0 __FBSDID("$FreeBSD: head/bin/getfacl/getfacl.c 340014 2018-11-01 17:45:29Z markj $"); #else -__RCSID("$NetBSD: getfacl.c,v 1.1 2020/05/16 18:31:45 christos Exp $"); +__RCSID("$NetBSD: getfacl.c,v 1.2 2020/05/22 01:28:00 joerg Exp $"); #endif #include @@ -61,6 +61,7 @@ usage(void) { fprintf(stderr, "Usage: %s [-dhnqv] [file ...]\n", getprogname()); + exit(1); } static char * @@ -319,7 +320,6 @@ main(int argc, char *argv[]) break; default: usage(); - return(-1); } argc -= optind; argv += optind;
CVS commit: src
Module Name:src Committed By: joerg Date: Fri May 15 14:57:33 UTC 2020 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi src/lib/libc: shlib_version Log Message: Bump libc minor version for malloc lock change To generate a diff of this commit: cvs rdiff -u -r1.884 -r1.885 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.245 -r1.246 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.286 -r1.287 src/lib/libc/shlib_version 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/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.884 src/distrib/sets/lists/base/shl.mi:1.885 --- src/distrib/sets/lists/base/shl.mi:1.884 Sat Apr 4 19:26:51 2020 +++ src/distrib/sets/lists/base/shl.mi Fri May 15 14:57:33 2020 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.884 2020/04/04 19:26:51 christos Exp $ +# $NetBSD: shl.mi,v 1.885 2020/05/15 14:57:33 joerg Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -21,7 +21,7 @@ ./lib/libblacklist.so.0.0 base-sys-shlib dynamicroot ./lib/libc.so base-sys-shlib dynamicroot ./lib/libc.so.12base-sys-shlib dynamicroot -./lib/libc.so.12.215base-sys-shlib dynamicroot +./lib/libc.so.12.216base-sys-shlib dynamicroot ./lib/libcrypt.sobase-sys-shlib dynamicroot ./lib/libcrypt.so.1base-sys-shlib dynamicroot ./lib/libcrypt.so.1.0base-sys-shlib dynamicroot @@ -249,7 +249,7 @@ ./usr/lib/libc++.so.1.0base-sys-shlib compatfile,libcxx ./usr/lib/libc.sobase-sys-shlib compatfile ./usr/lib/libc.so.12base-sys-shlib compatfile -./usr/lib/libc.so.12.215 base-sys-shlib compatfile +./usr/lib/libc.so.12.216 base-sys-shlib compatfile ./usr/lib/libcbor.sobase-sys-shlib compatfile ./usr/lib/libcbor.so.0base-sys-shlib compatfile ./usr/lib/libcbor.so.0.5 base-sys-shlib compatfile Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.245 src/distrib/sets/lists/debug/shl.mi:1.246 --- src/distrib/sets/lists/debug/shl.mi:1.245 Sat Apr 4 19:26:51 2020 +++ src/distrib/sets/lists/debug/shl.mi Fri May 15 14:57:33 2020 @@ -1,9 +1,9 @@ -# $NetBSD: shl.mi,v 1.245 2020/04/04 19:26:51 christos Exp $ +# $NetBSD: shl.mi,v 1.246 2020/05/15 14:57:33 joerg Exp $ ./usr/lib/libbfd_g.a comp-c-debuglib debuglib,compatfile,binutils ./usr/libdata/debug/lib base-sys-usr debug,dynamicroot,compatdir ./usr/libdata/debug/lib/libavl.so.0.0.debug comp-zfs-debug debug,dynamicroot,zfs ./usr/libdata/debug/lib/libblacklist.so.0.0.debug comp-sys-debug debug,dynamicroot -./usr/libdata/debug/lib/libc.so.12.215.debug comp-sys-debug debug,dynamicroot +./usr/libdata/debug/lib/libc.so.12.216.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libcrypt.so.1.0.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libcrypto.so.12.0.debug comp-sys-debug debug,dynamicroot,openssl=10 ./usr/libdata/debug/lib/libcrypto.so.14.0.debug comp-sys-debug debug,dynamicroot,openssl=11 @@ -82,7 +82,7 @@ ./usr/libdata/debug/usr/lib/libbsdmalloc.so.0.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libbz2.so.1.1.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libc++.so.1.0.debug comp-sys-debug debug,compatfile,libcxx -./usr/libdata/debug/usr/lib/libc.so.12.215.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/libc.so.12.216.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libcbor.so.0.5.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libcom_err.so.8.0.debug comp-krb5-debug debug,compatfile,kerberos ./usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug comp-sys-debug debug,compatfile Index: src/lib/libc/shlib_version diff -u src/lib/libc/shlib_version:1.286 src/lib/libc/shlib_version:1.287 --- src/lib/libc/shlib_version:1.286 Sun Mar 8 22:27:38 2020 +++ src/lib/libc/shlib_version Fri May 15 14:57:33 2020 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.286 2020/03/08 22:27:38 mgorny Exp $ +# $NetBSD: shlib_version,v 1.287 2020/05/15 14:57:33 joerg Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -54,4 +54,4 @@ # - move statfs() to libcompat since we have statvfs() # - the syscall stubs for the (obsolete) lfs syscalls should be removed major=12 -minor=215 +minor=216
CVS commit: src/external/lgpl3/mpfr/lib/libmpfr
Module Name:src Committed By: joerg Date: Fri May 15 14:44:05 UTC 2020 Modified Files: src/external/lgpl3/mpfr/lib/libmpfr: Makefile Log Message: Ignore warnings for tautological compares for clang. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/lgpl3/mpfr/lib/libmpfr/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/mpfr/lib/libmpfr/Makefile diff -u src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.19 src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.20 --- src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.19 Sat Jun 1 08:29:16 2019 +++ src/external/lgpl3/mpfr/lib/libmpfr/Makefile Fri May 15 14:44:05 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2019/06/01 08:29:16 mrg Exp $ +# $NetBSD: Makefile,v 1.20 2020/05/15 14:44:05 joerg Exp $ .include @@ -310,6 +310,7 @@ CPPFLAGS+= -DHAVE_DOUBLE_IEEE_BIG_ENDIAN CPPFLAGS+= -DHAVE_LITTLE_ENDIAN=1 .endif +CWARNFLAGS.clang+= -Wno-error=tautological-constant-out-of-range-compare WITHOUT_MAN= yes
CVS commit: src
Module Name:src Committed By: joerg Date: Fri May 15 14:37:21 UTC 2020 Modified Files: src/external/bsd/jemalloc/dist/src: jemalloc.c src/lib/libc/gen: pthread_atfork.c src/lib/libc/include: extern.h src/lib/libc/stdlib: jemalloc.c malloc.c Log Message: Hook up proper fork lock handling for malloc: - lock all relevant mutexes just before fork - unlock all mutexes just after fork in the parent - full reinit non-spinlocks in the child This is not using the normal pthread_atfork interface to ensure order of operation, malloc is used as implementation detail too often. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/jemalloc/dist/src/jemalloc.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/pthread_atfork.c cvs rdiff -u -r1.25 -r1.26 src/lib/libc/include/extern.h cvs rdiff -u -r1.52 -r1.53 src/lib/libc/stdlib/jemalloc.c cvs rdiff -u -r1.59 -r1.60 src/lib/libc/stdlib/malloc.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/bsd/jemalloc/dist/src/jemalloc.c diff -u src/external/bsd/jemalloc/dist/src/jemalloc.c:1.8 src/external/bsd/jemalloc/dist/src/jemalloc.c:1.9 --- src/external/bsd/jemalloc/dist/src/jemalloc.c:1.8 Thu Oct 3 16:10:23 2019 +++ src/external/bsd/jemalloc/dist/src/jemalloc.c Fri May 15 14:37:21 2020 @@ -1,5 +1,9 @@ #include +#ifdef __NetBSD__ +#include "extern.h" +#endif + #define JEMALLOC_C_ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" @@ -1383,7 +1387,7 @@ malloc_init_hard_recursible(void) { #if (defined(JEMALLOC_HAVE_PTHREAD_ATFORK) && !defined(JEMALLOC_MUTEX_INIT_CB) \ && !defined(JEMALLOC_ZONE) && !defined(_WIN32) && \ -!defined(__native_client__)) +!defined(__native_client__) && !defined(__NetBSD__)) /* LinuxThreads' pthread_atfork() allocates. */ if (pthread_atfork(jemalloc_prefork, jemalloc_postfork_parent, jemalloc_postfork_child) != 0) { @@ -3221,7 +3225,7 @@ jemalloc_constructor(void) { } #endif -#ifndef JEMALLOC_MUTEX_INIT_CB +#if !defined(JEMALLOC_MUTEX_INIT_CB) && !defined(__NetBSD__) void jemalloc_prefork(void) #else @@ -3294,7 +3298,7 @@ _malloc_prefork(void) prof_prefork1(tsd_tsdn(tsd)); } -#ifndef JEMALLOC_MUTEX_INIT_CB +#if !defined(JEMALLOC_MUTEX_INIT_CB) && !defined(__NetBSD__) void jemalloc_postfork_parent(void) #else @@ -3332,8 +3336,14 @@ _malloc_postfork(void) ctl_postfork_parent(tsd_tsdn(tsd)); } +#if !defined(__NetBSD__) void -jemalloc_postfork_child(void) { +jemalloc_postfork_child(void) +#else +JEMALLOC_EXPORT void +_malloc_postfork_child(void) +#endif +{ tsd_t *tsd; unsigned i, narenas; Index: src/lib/libc/gen/pthread_atfork.c diff -u src/lib/libc/gen/pthread_atfork.c:1.14 src/lib/libc/gen/pthread_atfork.c:1.15 --- src/lib/libc/gen/pthread_atfork.c:1.14 Sun Apr 19 01:06:15 2020 +++ src/lib/libc/gen/pthread_atfork.c Fri May 15 14:37:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_atfork.c,v 1.14 2020/04/19 01:06:15 joerg Exp $ */ +/* $NetBSD: pthread_atfork.c,v 1.15 2020/05/15 14:37:21 joerg Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: pthread_atfork.c,v 1.14 2020/04/19 01:06:15 joerg Exp $"); +__RCSID("$NetBSD: pthread_atfork.c,v 1.15 2020/05/15 14:37:21 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -40,6 +40,7 @@ __RCSID("$NetBSD: pthread_atfork.c,v 1.1 #include #include #include +#include "extern.h" #include "reentrant.h" #ifdef __weak_alias @@ -163,6 +164,7 @@ fork(void) mutex_lock(_lock); SIMPLEQ_FOREACH(iter, , next) (*iter->fn)(); + _malloc_prefork(); ret = __locked_fork(); @@ -171,11 +173,13 @@ fork(void) * We are the parent. It doesn't matter here whether * the fork call succeeded or failed. */ + _malloc_postfork(); SIMPLEQ_FOREACH(iter, , next) (*iter->fn)(); mutex_unlock(_lock); } else { /* We are the child */ + _malloc_postfork_child(); SIMPLEQ_FOREACH(iter, , next) (*iter->fn)(); /* Index: src/lib/libc/include/extern.h diff -u src/lib/libc/include/extern.h:1.25 src/lib/libc/include/extern.h:1.26 --- src/lib/libc/include/extern.h:1.25 Thu Jan 12 00:43:55 2017 +++ src/lib/libc/include/extern.h Fri May 15 14:37:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.25 2017/01/12 00:43:55 christos Exp $ */ +/* $NetBSD: extern.h,v 1.26 2020/05/15 14:37:21 joerg Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -69,6 +69,7 @@ void vsyslogp_ss(int, struct syslog_data void _malloc_prefork(void); void _malloc_postfork(void); +void _malloc_postfork_child(void); int _sys_setcontext(const ucontext_t *); Index: src/lib/libc/stdlib/jemalloc.c diff -u src/lib/libc/stdlib/jemalloc.c:1.52 src/lib/libc/stdlib/jemalloc.c:1.53 ---
CVS commit: src/external/bsd/jemalloc/dist/src
Module Name:src Committed By: joerg Date: Fri May 15 14:34:42 UTC 2020 Modified Files: src/external/bsd/jemalloc/dist/src: mutex.c Log Message: When using default mutex types, don't setup attributes for init. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/jemalloc/dist/src/mutex.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/bsd/jemalloc/dist/src/mutex.c diff -u src/external/bsd/jemalloc/dist/src/mutex.c:1.2 src/external/bsd/jemalloc/dist/src/mutex.c:1.3 --- src/external/bsd/jemalloc/dist/src/mutex.c:1.2 Mon Mar 4 17:16:46 2019 +++ src/external/bsd/jemalloc/dist/src/mutex.c Fri May 15 14:34:41 2020 @@ -157,6 +157,9 @@ malloc_mutex_init(malloc_mutex_t *mutex, return true; } } +#elif MALLOC_MUTEX_TYPE == PTHREAD_MUTEX_DEFAULT + if (pthread_mutex_init(>lock, NULL) == -1) + return true; #else pthread_mutexattr_t attr;
CVS commit: src/lib/libpthread
Module Name:src Committed By: joerg Date: Fri May 15 14:30:23 UTC 2020 Modified Files: src/lib/libpthread: pthread.c Log Message: Lock/unlock/reinit pthread__deadqueue_lock over fork. To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/lib/libpthread/pthread.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/libpthread/pthread.c diff -u src/lib/libpthread/pthread.c:1.168 src/lib/libpthread/pthread.c:1.169 --- src/lib/libpthread/pthread.c:1.168 Tue Apr 14 23:35:07 2020 +++ src/lib/libpthread/pthread.c Fri May 15 14:30:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.168 2020/04/14 23:35:07 joerg Exp $ */ +/* $NetBSD: pthread.c,v 1.169 2020/05/15 14:30:23 joerg Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020 @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: pthread.c,v 1.168 2020/04/14 23:35:07 joerg Exp $"); +__RCSID("$NetBSD: pthread.c,v 1.169 2020/05/15 14:30:23 joerg Exp $"); #define __EXPOSE_STACK 1 @@ -82,7 +82,6 @@ static void pthread__create_tramp(void * static void pthread__initthread(pthread_t); static void pthread__scrubthread(pthread_t, char *, int); static void pthread__initmain(pthread_t *); -static void pthread__fork_callback(void); static void pthread__reap(pthread_t); void pthread__init(void); @@ -155,6 +154,32 @@ static union hashlock { char pad[64]; } hashlocks[NHASHLOCK] __aligned(64); +static void +pthread__prefork(void) +{ + pthread_mutex_lock(__deadqueue_lock); +} + +static void +pthread__fork_parent(void) +{ + pthread_mutex_unlock(__deadqueue_lock); +} + +static void +pthread__fork_child(void) +{ + struct __pthread_st *self = pthread__self(); + + pthread_mutex_init(__deadqueue_lock, NULL); + + /* lwpctl state is not copied across fork. */ + if (_lwp_ctl(LWPCTL_FEATURE_CURCPU, >pt_lwpctl)) { + err(EXIT_FAILURE, "_lwp_ctl"); + } + self->pt_lid = _lwp_self(); +} + /* * This needs to be started by the library loading code, before main() * gets to run, for various things that use the state of the initial thread @@ -256,22 +281,10 @@ pthread__init(void) } /* Tell libc that we're here and it should role-play accordingly. */ - pthread_atfork(NULL, NULL, pthread__fork_callback); + pthread_atfork(pthread__prefork, pthread__fork_parent, pthread__fork_child); __isthreaded = 1; } -static void -pthread__fork_callback(void) -{ - struct __pthread_st *self = pthread__self(); - - /* lwpctl state is not copied across fork. */ - if (_lwp_ctl(LWPCTL_FEATURE_CURCPU, >pt_lwpctl)) { - err(EXIT_FAILURE, "_lwp_ctl"); - } - self->pt_lid = _lwp_self(); -} - /* General-purpose thread data structure sanitization. */ /* ARGSUSED */ static void
CVS commit: src/external/gpl3/gcc/lib/libgomp
Module Name:src Committed By: joerg Date: Fri May 15 14:29:29 UTC 2020 Modified Files: src/external/gpl3/gcc/lib/libgomp: Makefile Log Message: Don't allow building with clang, uses GCC-specific attributes. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/external/gpl3/gcc/lib/libgomp/Makefile 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/lib/libgomp/Makefile diff -u src/external/gpl3/gcc/lib/libgomp/Makefile:1.24 src/external/gpl3/gcc/lib/libgomp/Makefile:1.25 --- src/external/gpl3/gcc/lib/libgomp/Makefile:1.24 Sat Feb 9 00:48:59 2019 +++ src/external/gpl3/gcc/lib/libgomp/Makefile Fri May 15 14:29:29 2020 @@ -1,10 +1,12 @@ -# $NetBSD: Makefile,v 1.24 2019/02/09 00:48:59 mrg Exp $ +# $NetBSD: Makefile,v 1.25 2020/05/15 14:29:29 joerg Exp $ # build GCC's libgomp, so that -fopenmp works. # XXX NOLINT= # defined +UNSUPPORTED_COMPILER.clang= # defined + .include .if !defined(NO_LIBGOMP) # { @@ -29,8 +31,6 @@ CPPFLAGS+= \ -I${ARCHDIR} CFLAGS+=-pthread -CWARNFLAGS.clang+= -Wno-conversion - SHLIB_MAJOR= 2 SHLIB_MINOR= 0
CVS commit: src/external/gpl3/gcc/lib/liblsan
Module Name:src Committed By: joerg Date: Fri May 15 14:29:53 UTC 2020 Modified Files: src/external/gpl3/gcc/lib/liblsan: Makefile Log Message: Ignore unused private fields when building with clang To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/lib/liblsan/Makefile 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/lib/liblsan/Makefile diff -u src/external/gpl3/gcc/lib/liblsan/Makefile:1.6 src/external/gpl3/gcc/lib/liblsan/Makefile:1.7 --- src/external/gpl3/gcc/lib/liblsan/Makefile:1.6 Mon Oct 28 16:25:05 2019 +++ src/external/gpl3/gcc/lib/liblsan/Makefile Fri May 15 14:29:53 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2019/10/28 16:25:05 christos Exp $ +# $NetBSD: Makefile,v 1.7 2020/05/15 14:29:53 joerg Exp $ .include @@ -25,4 +25,6 @@ LIB= lsan SRCS+= ${LSAN_SRCS} LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt +CWARNFLAGS.clang+= -Wno-error=unused-private-field + .include
CVS commit: src/include
Module Name:src Committed By: joerg Date: Wed May 13 14:00:58 UTC 2020 Modified Files: src/include: stddef.h Log Message: Remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/include/stddef.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/stddef.h diff -u src/include/stddef.h:1.23 src/include/stddef.h:1.24 --- src/include/stddef.h:1.23 Sun Mar 1 22:08:17 2020 +++ src/include/stddef.h Wed May 13 14:00:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: stddef.h,v 1.23 2020/03/01 22:08:17 kamil Exp $ */ +/* $NetBSD: stddef.h,v 1.24 2020/05/13 14:00:58 joerg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -65,7 +65,7 @@ typedef _BSD_WCHAR_T_ wchar_t; #endif #define offsetof(type, member) __offsetof__((reinterpret_cast \ (_cast(static_cast(0)->member -#endif +#endif #if (__STDC_VERSION__ - 0) >= 201112L || (__cplusplus - 0) >= 201103L typedef union { @@ -74,5 +74,5 @@ typedef union { long long int _ll; } max_align_t; #endif - + #endif /* _STDDEF_H_ */
CVS commit: src/sys/arch
Module Name:src Committed By: joerg Date: Mon May 11 15:15:15 UTC 2020 Modified Files: src/sys/arch/amd64/conf: Makefile.amd64 src/sys/arch/i386/conf: Makefile.i386 Log Message: Fix GCC flags for Spectre mitigation to really only apply to GCC. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/arch/amd64/conf/Makefile.amd64 cvs rdiff -u -r1.195 -r1.196 src/sys/arch/i386/conf/Makefile.i386 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/Makefile.amd64 diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.84 src/sys/arch/amd64/conf/Makefile.amd64:1.85 --- src/sys/arch/amd64/conf/Makefile.amd64:1.84 Sat Apr 25 15:26:16 2020 +++ src/sys/arch/amd64/conf/Makefile.amd64 Mon May 11 15:15:15 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.84 2020/04/25 15:26:16 bouyer Exp $ +# $NetBSD: Makefile.amd64,v 1.85 2020/05/11 15:15:15 joerg Exp $ # Makefile for NetBSD # @@ -44,9 +44,9 @@ CFLAGS+= -msoft-float # For gcc we might need this, but other compilers barf # CFLAGS+= -mno-fp-ret-in-387 -.if ${SPECTRE_V2_GCC_MITIGATION:U0} > 0 && ${HAVE_GCC:U0} > 0 -CFLAGS+= -mindirect-branch=thunk-inline -CFLAGS+= -mindirect-branch-register +.if ${SPECTRE_V2_GCC_MITIGATION:U0} > 0 +CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -mindirect-branch=thunk :} +CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -mindirect-branch-register :} .endif .if ${KASAN:U0} > 0 Index: src/sys/arch/i386/conf/Makefile.i386 diff -u src/sys/arch/i386/conf/Makefile.i386:1.195 src/sys/arch/i386/conf/Makefile.i386:1.196 --- src/sys/arch/i386/conf/Makefile.i386:1.195 Sat Apr 25 15:26:16 2020 +++ src/sys/arch/i386/conf/Makefile.i386 Mon May 11 15:15:15 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.i386,v 1.195 2020/04/25 15:26:16 bouyer Exp $ +# $NetBSD: Makefile.i386,v 1.196 2020/05/11 15:15:15 joerg Exp $ # Makefile for NetBSD # @@ -40,9 +40,9 @@ CFLAGS+= -msoft-float ## no-sse implies no-sse2 but not no-avx CFLAGS+= -mno-mmx -mno-sse -mno-avx -.if ${SPECTRE_V2_GCC_MITIGATION:U0} > 0 && ${HAVE_GCC:U0} > 0 -CFLAGS+= -mindirect-branch=thunk -CFLAGS+= -mindirect-branch-register +.if ${SPECTRE_V2_GCC_MITIGATION:U0} > 0 +CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -mindirect-branch=thunk :} +CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -mindirect-branch-register :} .endif EXTRA_INCLUDES= -I$S/external/mit/xen-include-public/dist/
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: joerg Date: Mon May 4 18:36:24 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pte.h Log Message: Prevent double definition of pt_entry_t from machine/param.h To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/arm32/pte.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/arm32/pte.h diff -u src/sys/arch/arm/include/arm32/pte.h:1.22 src/sys/arch/arm/include/arm32/pte.h:1.23 --- src/sys/arch/arm/include/arm32/pte.h:1.22 Sun Feb 2 09:19:48 2020 +++ src/sys/arch/arm/include/arm32/pte.h Mon May 4 18:36:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.22 2020/02/02 09:19:48 skrll Exp $ */ +/* $NetBSD: pte.h,v 1.23 2020/05/04 18:36:24 joerg Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -89,7 +89,11 @@ #ifndef _LOCORE typedef uint32_t pd_entry_t; /* L1 table entry */ -typedef uint32_t pt_entry_t; /* L2 table entry */ +#ifndef __BSD_PTENTRY_T__ +#define __BSD_PTENTRY_T__ +typedef uint32_t pt_entry_t; +#define PRIxPTE PRIx32 +#endif #endif /* _LOCORE */ #define L1_SS_SIZE 0x0100 /* 16M */
CVS commit: src/usr.sbin/sysinst/arch/evbarm
Module Name:src Committed By: joerg Date: Mon May 4 18:19:34 UTC 2020 Modified Files: src/usr.sbin/sysinst/arch/evbarm: md.h Log Message: boardype should not be common. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/evbarm/md.h 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/sysinst/arch/evbarm/md.h diff -u src/usr.sbin/sysinst/arch/evbarm/md.h:1.5 src/usr.sbin/sysinst/arch/evbarm/md.h:1.6 --- src/usr.sbin/sysinst/arch/evbarm/md.h:1.5 Mon Jan 20 21:26:35 2020 +++ src/usr.sbin/sysinst/arch/evbarm/md.h Mon May 4 18:19:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: md.h,v 1.5 2020/01/20 21:26:35 martin Exp $ */ +/* $NetBSD: md.h,v 1.6 2020/05/04 18:19:34 joerg Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -96,7 +96,7 @@ #define BOARD_TYPE_NORMAL 0 /* assume u-boot */ #define BOARD_TYPE_RPI 1 /* RPi firmware booted us */ #define BOARD_TYPE_ACPI 2 /* generic SBSA machine */ -int boardtype; +extern int boardtype; /* * Size limit for the initial GPT part, in bytes. This allows us to
CVS commit: src/sys/arch/zaurus/stand/zboot
Module Name:src Committed By: joerg Date: Sun May 3 21:02:24 UTC 2020 Modified Files: src/sys/arch/zaurus/stand/zboot: boot.h Log Message: Avoid common symbol declarations. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/stand/zboot/boot.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/zaurus/stand/zboot/boot.h diff -u src/sys/arch/zaurus/stand/zboot/boot.h:1.3 src/sys/arch/zaurus/stand/zboot/boot.h:1.4 --- src/sys/arch/zaurus/stand/zboot/boot.h:1.3 Sat Jun 28 09:16:18 2014 +++ src/sys/arch/zaurus/stand/zboot/boot.h Sun May 3 21:02:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.h,v 1.3 2014/06/28 09:16:18 rtr Exp $ */ +/* $NetBSD: boot.h,v 1.4 2020/05/03 21:02:24 joerg Exp $ */ /* * Copyright (c) 2009 NONAKA Kimihiro @@ -37,9 +37,9 @@ extern int debug; /* boot.c */ -char *default_devname; -uint default_unit, default_partition; -const char *default_filename; +extern char *default_devname; +extern uint default_unit, default_partition; +extern const char *default_filename; extern int default_timeout; void boot(dev_t);
CVS commit: src/sys/sys
Module Name:src Committed By: joerg Date: Thu Apr 30 14:32:05 UTC 2020 Modified Files: src/sys/sys: cdefs_elf.h Log Message: GNU as on ARM silently accepts @progbits, but interpretes it as comment internally. LLVM bails out on the other hand. So conditionally this properly. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/sys/cdefs_elf.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/cdefs_elf.h diff -u src/sys/sys/cdefs_elf.h:1.56 src/sys/sys/cdefs_elf.h:1.57 --- src/sys/sys/cdefs_elf.h:1.56 Fri Apr 17 14:19:44 2020 +++ src/sys/sys/cdefs_elf.h Thu Apr 30 14:32:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs_elf.h,v 1.56 2020/04/17 14:19:44 joerg Exp $ */ +/* $NetBSD: cdefs_elf.h,v 1.57 2020/04/30 14:32:05 joerg Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -134,16 +134,30 @@ _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver)) #endif +#ifdef __arm__ #if __STDC__ -#define __SECTIONSTRING(_sec, _str) \ - __asm(".pushsection " #_sec ",\"MS\",@progbits,1\n" \ +# define __SECTIONSTRING(_sec, _str) \ + __asm(".pushsection " #_sec ",\"MS\",%progbits,1\n" \ + ".asciz \"" _str "\"\n" \ + ".popsection") +#else +# define __SECTIONSTRING(_sec, _str) \ + __asm(".pushsection " _sec ",\"MS\",%progbits,1\n" \ ".asciz \"" _str "\"\n" \ ".popsection") +# endif #else -#define __SECTIONSTRING(_sec, _str) \ +# if __STDC__ +# define __SECTIONSTRING(_sec, _str) \ + __asm(".pushsection " #_sec ",\"MS\",@progbits,1\n" \ + ".asciz \"" _str "\"\n" \ + ".popsection") +# else +# define __SECTIONSTRING(_sec, _str) \ __asm(".pushsection " _sec ",\"MS\",@progbits,1\n" \ ".asciz \"" _str "\"\n" \ ".popsection") +# endif #endif #define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s)
CVS commit: src/external/bsd/flex/dist/src
Module Name:src Committed By: joerg Date: Sat Apr 25 18:56:26 UTC 2020 Modified Files: src/external/bsd/flex/dist/src: flex.skl Log Message: Fix misindentations in the flex skeleton triggered by dtrace's dt_lex.l. Upstream committed as a631f5da8d4fd60fbde7b06bcf43bc9a155c27d5 To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/bsd/flex/dist/src/flex.skl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/flex/dist/src/flex.skl diff -u src/external/bsd/flex/dist/src/flex.skl:1.13 src/external/bsd/flex/dist/src/flex.skl:1.14 --- src/external/bsd/flex/dist/src/flex.skl:1.13 Sun Dec 23 22:14:29 2018 +++ src/external/bsd/flex/dist/src/flex.skl Sat Apr 25 18:56:26 2020 @@ -1216,11 +1216,11 @@ m4_ifdef( [[]], m4_ifdef( [[M4_YY_USES_REJECT]], [[ -/* Create the reject buffer large enough to save one state per allowed character. */ -if ( ! YY_G(yy_state_buf) ) -YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE M4_YY_CALL_LAST_ARG); -if ( ! YY_G(yy_state_buf) ) -YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); + /* Create the reject buffer large enough to save one state per allowed character. */ + if ( ! YY_G(yy_state_buf) ) + YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE M4_YY_CALL_LAST_ARG); + if ( ! YY_G(yy_state_buf) ) + YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); ]]) if ( ! YY_G(yy_start) ) @@ -1749,7 +1749,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]], %% [17.0] code to find the next state, and perhaps do backing up, goes here M4_YY_NOOP_GUTS_VAR(); - return yy_is_jam ? 0 : yy_current_state; +return yy_is_jam ? 0 : yy_current_state; }
CVS commit: src/usr.bin/tip
Module Name:src Committed By: joerg Date: Thu Apr 23 00:35:14 UTC 2020 Modified Files: src/usr.bin/tip: tip.c tip.h Log Message: Avoid using common symbol definitions. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/usr.bin/tip/tip.c cvs rdiff -u -r1.33 -r1.34 src/usr.bin/tip/tip.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tip/tip.c diff -u src/usr.bin/tip/tip.c:1.62 src/usr.bin/tip/tip.c:1.63 --- src/usr.bin/tip/tip.c:1.62 Thu Feb 28 17:41:27 2019 +++ src/usr.bin/tip/tip.c Thu Apr 23 00:35:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tip.c,v 1.62 2019/02/28 17:41:27 gson Exp $ */ +/* $NetBSD: tip.c,v 1.63 2020/04/23 00:35:14 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: tip.c,v 1.62 2019/02/28 17:41:27 gson Exp $"); +__RCSID("$NetBSD: tip.c,v 1.63 2020/04/23 00:35:14 joerg Exp $"); #endif /* not lint */ /* @@ -54,6 +54,70 @@ __RCSID("$NetBSD: tip.c,v 1.62 2019/02/2 #include "tip.h" #include "pathnames.h" +struct termios term; +struct termios defterm; +struct termios defchars; + +FILE *fscript; + +int attndes[2]; +int fildes[2]; +int repdes[2]; +int FD; +#ifndef __lint__ /* not used by hayes.c, but used by some other dialers */ +int AC; +#endif /*__lint__*/ +int sfd; +int pid; +uid_t uid, euid; +gid_t gid, egid; +int stop; +int quit; +int stoprompt; +int timedout; +int cumode; +int bits8; +#define STRIP_PAR (bits8 ? 0377 : 0177) + +char fname[80]; +char copyname[80]; +char ccc; + +int odisc; +int vflag; + +char *DV; +char *EL; +char *CM; +char *IE; +char *OE; +char *CU; +char *AT; +char *PN; +char *DI; +char *PA; + +char *PH; +char *RM; +char *HO; + +long BR; +long FS; + +long DU; +long HW; +char *ES; +char *EX; +char *FO; +char *RC; +char *RE; +char *PR; +long DL; +long CL; +long ET; +long HD; +char DC; + __dead static void tipusage(void); int escape(void); Index: src/usr.bin/tip/tip.h diff -u src/usr.bin/tip/tip.h:1.33 src/usr.bin/tip/tip.h:1.34 --- src/usr.bin/tip/tip.h:1.33 Mon Oct 21 14:47:46 2013 +++ src/usr.bin/tip/tip.h Thu Apr 23 00:35:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tip.h,v 1.33 2013/10/21 14:47:46 christos Exp $ */ +/* $NetBSD: tip.h,v 1.34 2020/04/23 00:35:14 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -59,37 +59,37 @@ /* * Remote host attributes */ -char *DV; /* UNIX device(s) to open */ -char *EL; /* chars marking an EOL */ -char *CM; /* initial connection message */ -char *IE; /* EOT to expect on input */ -char *OE; /* EOT to send to complete FT */ -char *CU; /* call unit if making a phone call */ -char *AT; /* acu type */ -char *PN; /* phone number(s) */ -char *DI; /* disconnect string */ -char *PA; /* parity to be generated */ - -char *PH; /* phone number file */ -char *RM; /* remote file name */ -char *HO; /* host name */ - -long BR; /* line speed for conversation */ -long FS; /* frame size for transfers */ - -long DU; /* this host is dialed up */ -long HW; /* this device is hardwired, see hunt.c */ -char *ES; /* escape character */ -char *EX; /* exceptions */ -char *FO; /* force (literal next) char*/ -char *RC; /* raise character */ -char *RE; /* script record file */ -char *PR; /* remote prompt */ -long DL; /* line delay for file transfers to remote */ -long CL; /* char delay for file transfers to remote */ -long ET; /* echocheck timeout */ -long HD; /* this host is half duplex - do local echo */ -char DC; /* this host is directly connected. */ +extern char *DV; /* UNIX device(s) to open */ +extern char *EL; /* chars marking an EOL */ +extern char *CM; /* initial connection message */ +extern char *IE; /* EOT to expect on input */ +extern char *OE; /* EOT to send to complete FT */ +extern char *CU; /* call unit if making a phone call */ +extern char *AT; /* acu type */ +extern char *PN; /* phone number(s) */ +extern char *DI; /* disconnect string */ +extern char *PA; /* parity to be generated */ + +extern char *PH; /* phone number file */ +extern char *RM; /* remote file name */ +extern char *HO; /* host name */ + +extern long BR; /* line speed for conversation */ +extern long FS; /* frame size for transfers */ + +extern long DU; /* this host is dialed up */ +extern long HW; /* this device is hardwired, see hunt.c */ +extern char *ES; /* escape character */ +extern char *EX; /* exceptions */ +extern char *FO; /* force (literal next) char*/ +extern char *RC; /* raise character */ +extern char *RE; /* script record file */ +extern char *PR; /* remote prompt */ +extern long DL; /* line delay for file transfers to remote */ +extern long CL; /* char delay for file transfers to remote */ +extern long ET; /* echocheck timeout */ +extern long HD; /* this
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: joerg Date: Thu Apr 23 00:34:29 UTC 2020 Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: rump doesn't own pnbuf_cache, externalize it To generate a diff of this commit: cvs rdiff -u -r1.344 -r1.345 src/sys/rump/librump/rumpkern/rump.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/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.344 src/sys/rump/librump/rumpkern/rump.c:1.345 --- src/sys/rump/librump/rumpkern/rump.c:1.344 Mon Mar 23 14:49:50 2020 +++ src/sys/rump/librump/rumpkern/rump.c Thu Apr 23 00:34:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.344 2020/03/23 14:49:50 pgoyette Exp $ */ +/* $NetBSD: rump.c,v 1.345 2020/04/23 00:34:29 joerg Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.344 2020/03/23 14:49:50 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.345 2020/04/23 00:34:29 joerg Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -114,7 +114,7 @@ static char rump_msgbuf[16*1024] __alig bool rump_ttycomponent = false; -pool_cache_t pnbuf_cache; +extern pool_cache_t pnbuf_cache; static int rump_inited;
CVS commit: src/tests
Module Name:src Committed By: joerg Date: Thu Apr 23 00:31:52 UTC 2020 Modified Files: src/tests/fs/nfs/nfsservice: rumpnfsd.c src/tests/net/config: netconfig.c Log Message: Replace noatf global with conditional compilation To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/fs/nfs/nfsservice/rumpnfsd.c cvs rdiff -u -r1.9 -r1.10 src/tests/net/config/netconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/rumpnfsd.c diff -u src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.9 src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.10 --- src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.9 Sun Nov 8 02:45:16 2015 +++ src/tests/fs/nfs/nfsservice/rumpnfsd.c Thu Apr 23 00:31:51 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpnfsd.c,v 1.9 2015/11/08 02:45:16 christos Exp $ */ +/* $NetBSD: rumpnfsd.c,v 1.10 2020/04/23 00:31:51 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -45,6 +45,7 @@ int nfsd_main(int, char **); sem_t gensem; +#define RUMPNFSD_NOATF #include "../../../net/config/netconfig.c" #include "../../common/h_fsmacros.h" #include "svc_fdset.h" @@ -65,9 +66,6 @@ main(int argc, char *argv[]) pthread_t t; int rv; - /* for netcfg */ - noatf = 1; - /* use defaults? */ if (argc == 1) { ethername = "etherbus"; Index: src/tests/net/config/netconfig.c diff -u src/tests/net/config/netconfig.c:1.9 src/tests/net/config/netconfig.c:1.10 --- src/tests/net/config/netconfig.c:1.9 Fri Jan 13 21:30:42 2017 +++ src/tests/net/config/netconfig.c Thu Apr 23 00:31:51 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: netconfig.c,v 1.9 2017/01/13 21:30:42 christos Exp $ */ +/* $NetBSD: netconfig.c,v 1.10 2020/04/23 00:31:51 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: netconfig.c,v 1.9 2017/01/13 21:30:42 christos Exp $"); +__RCSID("$NetBSD: netconfig.c,v 1.10 2020/04/23 00:31:51 joerg Exp $"); #endif /* not lint */ #include @@ -55,7 +55,6 @@ __RCSID("$NetBSD: netconfig.c,v 1.9 2017 #include "h_macros.h" -int noatf; static void __unused netcfg_rump_makeshmif(const char *busname, char *ifname) @@ -63,10 +62,11 @@ netcfg_rump_makeshmif(const char *busnam int rv, ifnum; if ((rv = rump_pub_shmif_create(busname, )) != 0) { - if (noatf) - err(1, "makeshmif: rump_pub_shmif_create %d", rv); - else - atf_tc_fail("makeshmif: rump_pub_shmif_create %d", rv); +#ifdef RUMPNFSD_NOATF + err(1, "makeshmif: rump_pub_shmif_create %d", rv); +#else + atf_tc_fail("makeshmif: rump_pub_shmif_create %d", rv); +#endif } sprintf(ifname, "shmif%d", ifnum); } @@ -81,10 +81,11 @@ netcfg_rump_if(const char *ifname, const s = -1; if ((s = rump_sys_socket(PF_INET, SOCK_DGRAM, 0)) < 0) { - if (noatf) - err(1, "if config socket"); - else - atf_tc_fail_errno("if config socket"); +#ifdef RUMPNFSD_NOATF + err(1, "if config socket"); +#else + atf_tc_fail_errno("if config socket"); +#endif } inaddr = inet_addr(addr); @@ -112,10 +113,11 @@ netcfg_rump_if(const char *ifname, const rv = rump_sys_ioctl(s, SIOCAIFADDR, ); if (rv == -1) { - if (noatf) - err(1, "SIOCAIFADDR"); - else - atf_tc_fail_errno("SIOCAIFADDR"); +#ifdef RUMPNFSD_NOATF + err(1, "SIOCAIFADDR"); +#else + atf_tc_fail_errno("SIOCAIFADDR"); +#endif } rump_sys_close(s); } @@ -135,10 +137,11 @@ netcfg_rump_route(const char *dst, const s = rump_sys_socket(PF_ROUTE, SOCK_RAW, 0); if (s == -1) { - if (noatf) - err(1, "routing socket"); - else - atf_tc_fail_errno("routing socket"); +#ifdef RUMPNFSD_NOATF + err(1, "routing socket"); +#else + atf_tc_fail_errno("routing socket"); +#endif } memset(_rtmsg, 0, sizeof(m_rtmsg)); @@ -177,10 +180,11 @@ netcfg_rump_route(const char *dst, const rv = rump_sys_write(s, _rtmsg, len); if (rv != (int)len) { - if (noatf) - err(1, "write routing message"); - else - atf_tc_fail_errno("write routing message"); +#ifdef RUMPNFSD_NOATF + err(1, "write routing message"); +#else + atf_tc_fail_errno("write routing message"); +#endif } rump_sys_close(s); }
CVS commit: src/tests/lib/libcurses/director
Module Name:src Committed By: joerg Date: Thu Apr 23 00:30:09 UTC 2020 Modified Files: src/tests/lib/libcurses/director: testlang_parse.y Log Message: saved_output is owned by director.c To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libcurses/director/testlang_parse.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/director/testlang_parse.y diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.16 src/tests/lib/libcurses/director/testlang_parse.y:1.17 --- src/tests/lib/libcurses/director/testlang_parse.y:1.16 Thu Sep 19 11:31:57 2019 +++ src/tests/lib/libcurses/director/testlang_parse.y Thu Apr 23 00:30:08 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: testlang_parse.y,v 1.16 2019/09/19 11:31:57 blymn Exp $ */ +/* $NetBSD: testlang_parse.y,v 1.17 2020/04/23 00:30:08 joerg Exp $ */ /*- * Copyright 2009 Brett Lymn @@ -152,7 +152,7 @@ static const char *input_functions[] = { static const unsigned ninput_functions = sizeof(input_functions) / sizeof(char *); -saved_data_t saved_output; +extern saved_data_t saved_output; %}
CVS commit: src/usr.sbin/pf/pfs
Module Name:src Committed By: joerg Date: Thu Apr 23 00:29:00 UTC 2020 Modified Files: src/usr.sbin/pf/pfs: parse.y parser.h Log Message: lineno, states and allocated should be owned by the parser To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/pf/pfs/parse.y \ src/usr.sbin/pf/pfs/parser.h 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/pf/pfs/parse.y diff -u src/usr.sbin/pf/pfs/parse.y:1.2 src/usr.sbin/pf/pfs/parse.y:1.3 --- src/usr.sbin/pf/pfs/parse.y:1.2 Sat Oct 19 17:16:38 2013 +++ src/usr.sbin/pf/pfs/parse.y Thu Apr 23 00:29:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.y,v 1.2 2013/10/19 17:16:38 christos Exp $ */ +/* $NetBSD: parse.y,v 1.3 2020/04/23 00:29:00 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ #include #ifndef lint -__RCSID("$NetBSD: parse.y,v 1.2 2013/10/19 17:16:38 christos Exp $"); +__RCSID("$NetBSD: parse.y,v 1.3 2020/04/23 00:29:00 joerg Exp $"); #endif #include @@ -50,6 +50,11 @@ __RCSID("$NetBSD: parse.y,v 1.2 2013/10/ #include "parser.h" +int lineno; + +struct pfioc_states* states; +size_t allocated; + // XXX it is really correct ? extern const char * const tcpstates[]; Index: src/usr.sbin/pf/pfs/parser.h diff -u src/usr.sbin/pf/pfs/parser.h:1.2 src/usr.sbin/pf/pfs/parser.h:1.3 --- src/usr.sbin/pf/pfs/parser.h:1.2 Wed Aug 31 13:32:39 2011 +++ src/usr.sbin/pf/pfs/parser.h Thu Apr 23 00:29:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.h,v 1.2 2011/08/31 13:32:39 joerg Exp $ */ +/* $NetBSD: parser.h,v 1.3 2020/04/23 00:29:00 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -34,9 +34,9 @@ __dead void yyfatal(const char*); int parse(FILE*, struct pfioc_states*); int yyparse(void); -int lineno; +extern int lineno; -struct pfioc_states* states; -size_t allocated; +extern struct pfioc_states* states; +extern size_t allocated; #endif /* _PARSER_H_*/
CVS commit: src/usr.sbin/npf/npftest/libnpftest
Module Name:src Committed By: joerg Date: Thu Apr 23 00:27:45 UTC 2020 Modified Files: src/usr.sbin/npf/npftest/libnpftest: npf_test.h Log Message: npftest_mbufops and npftest_ifops are owned by npf_mbuf_subr.c To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/npf/npftest/libnpftest/npf_test.h 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/npf/npftest/libnpftest/npf_test.h diff -u src/usr.sbin/npf/npftest/libnpftest/npf_test.h:1.19 src/usr.sbin/npf/npftest/libnpftest/npf_test.h:1.20 --- src/usr.sbin/npf/npftest/libnpftest/npf_test.h:1.19 Tue Jul 23 00:52:02 2019 +++ src/usr.sbin/npf/npftest/libnpftest/npf_test.h Thu Apr 23 00:27:45 2020 @@ -84,8 +84,8 @@ struct mbuf { #define CHECK_TRUE(x) \ if (!(x)) { printf("FAIL: %s line %d\n", __func__, __LINE__); return 0; } -const npf_mbufops_t npftest_mbufops; -const npf_ifops_t npftest_ifops; +extern const npf_mbufops_t npftest_mbufops; +extern const npf_ifops_t npftest_ifops; struct mbuf * npfkern_m_get(int, int); size_t npfkern_m_length(const struct mbuf *);
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: joerg Date: Thu Apr 23 00:24:50 UTC 2020 Modified Files: src/usr.bin/netstat: main.c netstat.h Log Message: Avoid common symbol definitions. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/usr.bin/netstat/main.c cvs rdiff -u -r1.51 -r1.52 src/usr.bin/netstat/netstat.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/main.c diff -u src/usr.bin/netstat/main.c:1.99 src/usr.bin/netstat/main.c:1.100 --- src/usr.bin/netstat/main.c:1.99 Thu Jul 14 20:13:10 2016 +++ src/usr.bin/netstat/main.c Thu Apr 23 00:24:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.99 2016/07/14 20:13:10 christos Exp $ */ +/* $NetBSD: main.c,v 1.100 2020/04/23 00:24:50 joerg Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; #else -__RCSID("$NetBSD: main.c,v 1.99 2016/07/14 20:13:10 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.100 2020/04/23 00:24:50 joerg Exp $"); #endif #endif /* not lint */ @@ -67,6 +67,38 @@ __RCSID("$NetBSD: main.c,v 1.99 2016/07/ #include "rtutil.h" #include "prog_ops.h" +int Aflag; +int aflag; +int Bflag; +int bflag; +int dflag; +#ifndef SMALL +int gflag; +#endif +int hflag; +int iflag; +int Lflag; +int lflag; +int mflag; +int numeric_addr; +int numeric_port; +int nflag; +int Pflag; +int pflag; +int qflag; +int rflag; +int sflag; +int tagflag; +int tflag; +int Vflag; +int vflag; + +char *interface; + +int af; +int use_sysctl; +int force_sysctl; + struct nlist nl[] = { #define N_MBSTAT 0 { "_mbstat", 0, 0, 0, 0 }, Index: src/usr.bin/netstat/netstat.h diff -u src/usr.bin/netstat/netstat.h:1.51 src/usr.bin/netstat/netstat.h:1.52 --- src/usr.bin/netstat/netstat.h:1.51 Thu Nov 6 21:30:09 2014 +++ src/usr.bin/netstat/netstat.h Thu Apr 23 00:24:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: netstat.h,v 1.51 2014/11/06 21:30:09 christos Exp $ */ +/* $NetBSD: netstat.h,v 1.52 2020/04/23 00:24:50 joerg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -34,37 +34,37 @@ #include #include -int Aflag; /* show addresses of protocol control block */ -int aflag; /* show all sockets (including servers) */ -int Bflag; /* show Berkeley Packet Filter information */ -int bflag; /* show i/f byte stats */ -int dflag; /* show i/f dropped packets */ +extern int Aflag; /* show addresses of protocol control block */ +extern int aflag; /* show all sockets (including servers) */ +extern int Bflag; /* show Berkeley Packet Filter information */ +extern int bflag; /* show i/f byte stats */ +extern int dflag; /* show i/f dropped packets */ #ifndef SMALL -int gflag; /* show group (multicast) routing or stats */ +extern int gflag; /* show group (multicast) routing or stats */ #endif -int hflag; /* humanize byte counts */ -int iflag; /* show interfaces */ -int Lflag; /* don't show LLINFO entries */ -int lflag; /* show routing table with use and ref */ -int mflag; /* show memory stats */ -int numeric_addr; /* show addresses numerically */ -int numeric_port; /* show ports numerically */ -int nflag; /* same as above, for show.c compat */ -int Pflag; /* dump a PCB */ -int pflag; /* show given protocol */ -int qflag; /* show softintrq */ -int rflag; /* show routing tables (or routing stats) */ -int sflag; /* show protocol statistics */ -int tagflag; /* show route tags */ -int tflag; /* show i/f watchdog timers */ -int Vflag; /* show Vestigial TIME_WAIT (VTW) information */ -int vflag; /* verbose route information or don't truncate names */ - -char *interface; /* desired i/f for stats, or NULL for all i/fs */ - -int af; /* address family */ -int use_sysctl; /* use sysctl instead of kmem */ -int force_sysctl; /* force use of sysctl (or exit) - for testing */ +extern int hflag; /* humanize byte counts */ +extern int iflag; /* show interfaces */ +extern int Lflag; /* don't show LLINFO entries */ +extern int lflag; /* show routing table with use and ref */ +extern int mflag; /* show memory stats */ +extern int numeric_addr; /* show addresses numerically */ +extern int numeric_port; /* show ports numerically */ +extern int nflag; /* same as above, for show.c compat */ +extern int Pflag; /* dump a PCB */ +extern int pflag; /* show given protocol */ +extern int qflag; /* show softintrq */ +extern int rflag; /* show routing tables (or routing stats) */ +extern int sflag; /* show protocol statistics */ +extern int tagflag; /* show route tags */ +extern int tflag; /* show i/f watchdog timers */ +extern int Vflag; /* show Vestigial TIME_WAIT (VTW) information */ +extern int vflag; /* verbose route information or don't truncate names */ + +extern char *interface; /* desired i/f for stats, or NULL for all i/fs */ + +extern int af; /* address family */ +extern int use_sysctl; /* use sysctl instead of kmem
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: joerg Date: Thu Apr 23 00:23:31 UTC 2020 Modified Files: src/usr.bin/netstat: atalk.c Log Message: Avoid global scope for variables only used locally To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/netstat/atalk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/atalk.c diff -u src/usr.bin/netstat/atalk.c:1.17 src/usr.bin/netstat/atalk.c:1.18 --- src/usr.bin/netstat/atalk.c:1.17 Sun Aug 18 04:14:40 2019 +++ src/usr.bin/netstat/atalk.c Thu Apr 23 00:23:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: atalk.c,v 1.17 2019/08/18 04:14:40 kamil Exp $ */ +/* $NetBSD: atalk.c,v 1.18 2020/04/23 00:23:31 joerg Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from @(#)atalk.c 1.1 (Whistle) 6/6/96"; #else -__RCSID("$NetBSD: atalk.c,v 1.17 2019/08/18 04:14:40 kamil Exp $"); +__RCSID("$NetBSD: atalk.c,v 1.18 2020/04/23 00:23:31 joerg Exp $"); #endif #endif /* not lint */ @@ -63,9 +63,6 @@ __RCSID("$NetBSD: atalk.c,v 1.17 2019/08 #include "netstat.h" #include "prog_ops.h" -struct ddpcbddpcb; -struct socket sockb; - static int first = 1; /* @@ -230,6 +227,8 @@ atalk_print2(const struct sockaddr *sa, void atalkprotopr(u_long off, const char *name) { + struct ddpcb ddpcb; + struct socket sockb; struct ddpcb *next; struct ddpcb *initial; int width = 22;
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: joerg Date: Thu Apr 23 00:24:16 UTC 2020 Modified Files: src/usr.bin/netstat: inet6.c Log Message: sockb is only used locally, so move it into the function To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/usr.bin/netstat/inet6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/inet6.c diff -u src/usr.bin/netstat/inet6.c:1.73 src/usr.bin/netstat/inet6.c:1.74 --- src/usr.bin/netstat/inet6.c:1.73 Sun Aug 18 04:14:40 2019 +++ src/usr.bin/netstat/inet6.c Thu Apr 23 00:24:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: inet6.c,v 1.73 2019/08/18 04:14:40 kamil Exp $ */ +/* $NetBSD: inet6.c,v 1.74 2020/04/23 00:24:16 joerg Exp $ */ /* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ /* @@ -64,7 +64,7 @@ #if 0 static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: inet6.c,v 1.73 2019/08/18 04:14:40 kamil Exp $"); +__RCSID("$NetBSD: inet6.c,v 1.74 2020/04/23 00:24:16 joerg Exp $"); #endif #endif /* not lint */ @@ -147,7 +147,6 @@ struct tcp6cb tcp6cb; #else struct tcpcb tcpcb; #endif -struct socket sockb; char *inet6name(const struct in6_addr *); void inet6print(const struct in6_addr *, int, const char *); @@ -283,8 +282,9 @@ print_vtw_v6(const vtw_t *vtw) static struct kinfo_pcb * -getpcblist_kmem(u_long off, const char *name, size_t *len) { - +getpcblist_kmem(u_long off, const char *name, size_t *len) +{ + struct socket sockb; struct inpcbtable table; struct inpcb_hdr *next, *prev; int istcp = strcmp(name, "tcp6") == 0;
CVS commit: src/usr.sbin/mountd
Module Name:src Committed By: joerg Date: Thu Apr 23 00:22:01 UTC 2020 Modified Files: src/usr.sbin/mountd: get_net.c mountd.c mountd.h Log Message: Rename debug to mountd_debug to avoid overlap in rump tests To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/mountd/get_net.c cvs rdiff -u -r1.130 -r1.131 src/usr.sbin/mountd/mountd.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/mountd/mountd.h 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/mountd/get_net.c diff -u src/usr.sbin/mountd/get_net.c:1.2 src/usr.sbin/mountd/get_net.c:1.3 --- src/usr.sbin/mountd/get_net.c:1.2 Thu Dec 24 01:41:19 2015 +++ src/usr.sbin/mountd/get_net.c Thu Apr 23 00:22:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: get_net.c,v 1.2 2015/12/24 01:41:19 christos Exp $ */ +/* $NetBSD: get_net.c,v 1.3 2020/04/23 00:22:01 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -33,7 +33,7 @@ */ #include -__RCSID("$NetBSD: get_net.c,v 1.2 2015/12/24 01:41:19 christos Exp $"); +__RCSID("$NetBSD: get_net.c,v 1.3 2020/04/23 00:22:01 joerg Exp $"); #include #include @@ -52,7 +52,7 @@ __RCSID("$NetBSD: get_net.c,v 1.2 2015/1 #ifdef TEST int opt_flags; const int ninumeric = NI_NUMERICHOST; -int debug = 1; +int mountd_debug = 1; #endif static int @@ -145,7 +145,7 @@ get_net(char *cp, struct netmsk *net, in sin.sin_family = AF_INET; sin.sin_len = sizeof sin; sin.sin_addr = inet_makeaddr(inet_network(cp), 0); - if (debug) + if (mountd_debug) fprintf(stderr, "get_net: '%s' v4 addr %x\n", cp, sin.sin_addr.s_addr); sa = (struct sockaddr *) Index: src/usr.sbin/mountd/mountd.c diff -u src/usr.sbin/mountd/mountd.c:1.130 src/usr.sbin/mountd/mountd.c:1.131 --- src/usr.sbin/mountd/mountd.c:1.130 Tue Jan 9 03:31:13 2018 +++ src/usr.sbin/mountd/mountd.c Thu Apr 23 00:22:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.130 2018/01/09 03:31:13 christos Exp $ */ +/* $NetBSD: mountd.c,v 1.131 2020/04/23 00:22:01 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.130 2018/01/09 03:31:13 christos Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.131 2020/04/23 00:22:01 joerg Exp $"); #endif #endif/* not lint */ @@ -238,7 +238,7 @@ int opt_flags; static int have_v6 = 1; const int ninumeric = NI_NUMERICHOST; -int debug = DEBUGGING; +int mountd_debug = DEBUGGING; #if 0 static void SYSLOG(int, const char *,...); #endif @@ -369,7 +369,7 @@ main(int argc, char **argv) forcedport = atoi(optarg); break; case 'd': - debug = 1; + mountd_debug = 1; break; case 'N': noprivports = 1; @@ -414,16 +414,16 @@ main(int argc, char **argv) grphead = NULL; exphead = NULL; mlhead = NULL; - openlog("mountd", LOG_PID | (debug ? LOG_PERROR : 0), LOG_DAEMON); + openlog("mountd", LOG_PID | (mountd_debug ? LOG_PERROR : 0), LOG_DAEMON); (void)signal(SIGSYS, no_nfs); - if (debug) + if (mountd_debug) (void)fprintf(stderr, "Getting export list.\n"); get_exportlist(0); - if (debug) + if (mountd_debug) (void)fprintf(stderr, "Getting mount list.\n"); get_mountlist(); - if (debug) + if (mountd_debug) (void)fprintf(stderr, "Here we go.\n"); (void)signal(SIGTERM, send_umntall); @@ -547,7 +547,7 @@ main(int argc, char **argv) exit(1); } - if (debug == 0) { + if (mountd_debug == 0) { daemon(0, 0); (void)signal(SIGINT, SIG_IGN); (void)signal(SIGQUIT, SIG_IGN); @@ -612,16 +612,16 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t syslog(LOG_ERR, "Can't send reply"); return; case MOUNTPROC_MNT: - if (debug) + if (mountd_debug) fprintf(stderr, "got mount request from %s\n", numerichost); if (!svc_getargs(transp, xdr_dir, rpcpath)) { - if (debug) + if (mountd_debug) fprintf(stderr, "-> garbage args\n"); svcerr_decode(transp); return; } - if (debug) + if (mountd_debug) fprintf(stderr, "-> rpcpath: %s\n", rpcpath); /* @@ -638,14 +638,14 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t (!S_ISDIR(stb.st_mode) && !S_ISREG(stb.st_mode)) || statvfs1(rdirpath, , ST_WAIT) < 0) { (void)chdir("/"); /* Just in case realpath doesn't */ - if (debug) + if (mountd_debug) (void)fprintf(stderr, "-> stat failed on %s\n", rdirpath); if (!svc_sendreply(transp, (xdrproc_t)xdr_long, (caddr_t) )) syslog(LOG_ERR, "Can't send reply"); return; } - if (debug) + if (mountd_debug) fprintf(stderr, "-> dirpath: %s\n", rdirpath); /* Check in the exports list */ @@ -696,7 +696,7 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t add_mlist(host, rdirpath, hostset); else add_mlist(numerichost, rdirpath, hostset); - if (debug) + if (mountd_debug)
CVS commit: src/usr.bin/indent
Module Name:src Committed By: joerg Date: Thu Apr 23 00:17:34 UTC 2020 Modified Files: src/usr.bin/indent: indent.c indent_globs.h Log Message: Avoid common symbol declarations To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/indent/indent.c cvs rdiff -u -r1.11 -r1.12 src/usr.bin/indent/indent_globs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/indent/indent.c diff -u src/usr.bin/indent/indent.c:1.26 src/usr.bin/indent/indent.c:1.27 --- src/usr.bin/indent/indent.c:1.26 Sat Oct 19 15:44:31 2019 +++ src/usr.bin/indent/indent.c Thu Apr 23 00:17:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: indent.c,v 1.26 2019/10/19 15:44:31 christos Exp $ */ +/* $NetBSD: indent.c,v 1.27 2020/04/23 00:17:34 joerg Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -46,7 +46,7 @@ static char sccsid[] = "@(#)indent.c 5.1 #include #ifndef lint #if defined(__NetBSD__) -__RCSID("$NetBSD: indent.c,v 1.26 2019/10/19 15:44:31 christos Exp $"); +__RCSID("$NetBSD: indent.c,v 1.27 2020/04/23 00:17:34 joerg Exp $"); #elif defined(__FreeBSD__) __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $"); #endif @@ -69,6 +69,60 @@ __FBSDID("$FreeBSD: head/usr.bin/indent/ #include "indent_codes.h" #include "indent.h" +struct options opt; +struct parser_state ps; + +char *labbuf; +char *s_lab; +char *e_lab; +char *l_lab; + +char *codebuf; +char *s_code; +char *e_code; +char *l_code; + +char *combuf; +char *s_com; +char *e_com; +char *l_com; + +char *tokenbuf; +char *s_token; +char *e_token; +char *l_token; + +char *in_buffer; +char *in_buffer_limit; +char *buf_ptr; +char *buf_end; + +charsc_buf[sc_size]; +char *save_com; +char *sc_end; + +char *bp_save; +char *be_save; + +int found_err; +int n_real_blanklines; +int prefix_blankline_requested; +int postfix_blankline_requested; +int break_comma; +float case_ind; +int code_lines; +int had_eof; +int line_no; +int inhibit_formatting; +int suppress_blanklines; + +int ifdef_level; +struct parser_state state_stack[5]; +struct parser_state match_state[5]; + +FILE *input; +FILE *output; + static void bakcopy(void); static void indent_declaration(int, int); Index: src/usr.bin/indent/indent_globs.h diff -u src/usr.bin/indent/indent_globs.h:1.11 src/usr.bin/indent/indent_globs.h:1.12 --- src/usr.bin/indent/indent_globs.h:1.11 Thu Apr 4 15:22:13 2019 +++ src/usr.bin/indent/indent_globs.h Thu Apr 23 00:17:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: indent_globs.h,v 1.11 2019/04/04 15:22:13 kamil Exp $ */ +/* $NetBSD: indent_globs.h,v 1.12 2020/04/23 00:17:34 joerg Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -51,8 +51,8 @@ #define true 1 -FILE *input; /* the fid for the input file */ -FILE *output; /* the output file */ +extern FILE *input; /* the fid for the input file */ +extern FILE *output; /* the output file */ #define CHECK_SIZE_CODE(desired_size) \ if (e_code + (desired_size) >= l_code) { \ @@ -106,44 +106,44 @@ FILE *output; /* the output file s_token = tokenbuf + 1; \ } -char *labbuf; /* buffer for label */ -char *s_lab; /* start ... */ -char *e_lab; /* .. and end of stored label */ -char *l_lab; /* limit of label buffer */ - -char *codebuf; /* buffer for code section */ -char *s_code; /* start ... */ -char *e_code; /* .. and end of stored code */ -char *l_code; /* limit of code section */ - -char *combuf; /* buffer for comments */ -char *s_com; /* start ... */ -char *e_com; /* ... and end of stored comments */ -char *l_com; /* limit of comment buffer */ +extern char *labbuf; /* buffer for label */ +extern char *s_lab; /* start ... */ +extern char *e_lab; /* .. and end of stored label */ +extern char *l_lab; /* limit of label buffer */ + +extern char *codebuf; /* buffer for code section */ +extern char *s_code; /* start ... */ +extern char *e_code; /* .. and end of stored code */ +extern char *l_code; /* limit of code section */ + +extern char *combuf; /* buffer for comments */ +extern char *s_com; /* start ... */ +extern char *e_com; /* ... and end of stored comments */ +extern char *l_com; /* limit of comment buffer */ #define token s_token -char *tokenbuf; /* the last token scanned */ -char *s_token; -char *e_token; -char *l_token; - -char *in_buffer; /* input buffer */ -char *in_buffer_limit; /* the end of the input buffer */ -char *buf_ptr; /* ptr to next character to be taken
CVS commit: src/sys/arch/macppc/stand/ofwboot
Module Name:src Committed By: joerg Date: Thu Apr 23 00:12:28 UTC 2020 Modified Files: src/sys/arch/macppc/stand/ofwboot: boot.c Log Message: bootfile is owned by libsa To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/macppc/stand/ofwboot/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/arch/macppc/stand/ofwboot/boot.c diff -u src/sys/arch/macppc/stand/ofwboot/boot.c:1.29 src/sys/arch/macppc/stand/ofwboot/boot.c:1.30 --- src/sys/arch/macppc/stand/ofwboot/boot.c:1.29 Wed Jun 6 22:56:25 2018 +++ src/sys/arch/macppc/stand/ofwboot/boot.c Thu Apr 23 00:12:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.29 2018/06/06 22:56:25 uwe Exp $ */ +/* $NetBSD: boot.c,v 1.30 2020/04/23 00:12:28 joerg Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -93,7 +93,7 @@ extern void __syncicache(void *, size_t) #endif char bootdev[MAXBOOTPATHLEN]; -char bootfile[MAXBOOTPATHLEN]; +extern char bootfile[MAXBOOTPATHLEN]; int boothowto; bool floppyboot; int ofw_version = 0;
CVS commit: src/sys/arch/sparc/stand/bootxx
Module Name:src Committed By: joerg Date: Thu Apr 23 00:11:29 UTC 2020 Modified Files: src/sys/arch/sparc/stand/bootxx: Makefile Log Message: Uses LFS boot code To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc/stand/bootxx/Makefile 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/sparc/stand/bootxx/Makefile diff -u src/sys/arch/sparc/stand/bootxx/Makefile:1.17 src/sys/arch/sparc/stand/bootxx/Makefile:1.18 --- src/sys/arch/sparc/stand/bootxx/Makefile:1.17 Sun Jan 12 15:26:31 2014 +++ src/sys/arch/sparc/stand/bootxx/Makefile Thu Apr 23 00:11:29 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2014/01/12 15:26:31 tsutsui Exp $ +# $NetBSD: Makefile,v 1.18 2020/04/23 00:11:29 joerg Exp $ PROG= bootxx PROGSOURCE= bootxx.c @@ -10,6 +10,11 @@ STRIPFLAG= LINKFLAGS= -N -Ttext ${RELOC_BOOTXX} -e start CLEANFILES+= ${PROG}.sym +# Follow the suit of Makefile.kern.inc; needed for the lfs64 union +# accessors -- they don't actually dereference the resulting pointer, +# just use it for type-checking. +CWARNFLAGS.clang+= -Wno-error=address-of-packed-member + # XXX SHOULD NOT NEED TO DEFINE THESE! LIBCRT0= LIBCRTI=
CVS commit: src/sys/arch
Module Name:src Committed By: joerg Date: Thu Apr 23 00:09:26 UTC 2020 Modified Files: src/sys/arch/macppc/stand/ofwboot: net.c src/sys/arch/sparc/stand/common: net.c src/sys/arch/sparc/stand/ofwboot: net.c Log Message: rootpath is owned by libsa To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/macppc/stand/ofwboot/net.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/stand/common/net.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc/stand/ofwboot/net.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/ofwboot/net.c diff -u src/sys/arch/macppc/stand/ofwboot/net.c:1.8 src/sys/arch/macppc/stand/ofwboot/net.c:1.9 --- src/sys/arch/macppc/stand/ofwboot/net.c:1.8 Fri Jan 27 03:58:27 2006 +++ src/sys/arch/macppc/stand/ofwboot/net.c Thu Apr 23 00:09:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.8 2006/01/27 03:58:27 uwe Exp $ */ +/* $NetBSD: net.c,v 1.9 2020/04/23 00:09:26 joerg Exp $ */ /* * Copyright (C) 1995 Wolfgang Solfrank. @@ -69,7 +69,7 @@ #include "ofdev.h" #include "netif_of.h" -char rootpath[FNAME_SIZE]; +extern char rootpath[FNAME_SIZE]; static int netdev_sock = -1; static int open_count; Index: src/sys/arch/sparc/stand/common/net.c diff -u src/sys/arch/sparc/stand/common/net.c:1.9 src/sys/arch/sparc/stand/common/net.c:1.10 --- src/sys/arch/sparc/stand/common/net.c:1.9 Wed Oct 21 23:12:09 2009 +++ src/sys/arch/sparc/stand/common/net.c Thu Apr 23 00:09:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.9 2009/10/21 23:12:09 snj Exp $ */ +/* $NetBSD: net.c,v 1.10 2020/04/23 00:09:26 joerg Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -60,7 +60,7 @@ #include -char rootpath[FNAME_SIZE]; +extern char rootpath[FNAME_SIZE]; int netdev_sock = -1; static int open_count; Index: src/sys/arch/sparc/stand/ofwboot/net.c diff -u src/sys/arch/sparc/stand/ofwboot/net.c:1.8 src/sys/arch/sparc/stand/ofwboot/net.c:1.9 --- src/sys/arch/sparc/stand/ofwboot/net.c:1.8 Mon Jul 16 11:26:27 2012 +++ src/sys/arch/sparc/stand/ofwboot/net.c Thu Apr 23 00:09:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.8 2012/07/16 11:26:27 tsutsui Exp $ */ +/* $NetBSD: net.c,v 1.9 2020/04/23 00:09:26 joerg Exp $ */ /* * Copyright (C) 1995 Wolfgang Solfrank. @@ -73,7 +73,7 @@ static int net_mountroot_bootparams(void); static int net_mountroot_bootp(void); -char rootpath[FNAME_SIZE]; +extern char rootpath[FNAME_SIZE]; static int netdev_sock = -1; static int open_count;
CVS commit: src/libexec/telnetd
Module Name:src Committed By: joerg Date: Thu Apr 23 00:03:41 UTC 2020 Modified Files: src/libexec/telnetd: ext.h global.c Log Message: Don't play #define games with extern, just have a separate list to avoid commons To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/libexec/telnetd/ext.h cvs rdiff -u -r1.8 -r1.9 src/libexec/telnetd/global.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/telnetd/ext.h diff -u src/libexec/telnetd/ext.h:1.22 src/libexec/telnetd/ext.h:1.23 --- src/libexec/telnetd/ext.h:1.22 Tue Jan 10 23:39:11 2012 +++ src/libexec/telnetd/ext.h Thu Apr 23 00:03:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ext.h,v 1.22 2012/01/10 23:39:11 joerg Exp $ */ +/* $NetBSD: ext.h,v 1.23 2020/04/23 00:03:40 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -179,7 +179,7 @@ extern char *nclearto; * The following are some clocks used to decide how to interpret * the relationship between various variables. */ -extern struct { +extern struct clockstate { int system, /* what the current time is */ echotoggle, /* last time user entered echo character */ Index: src/libexec/telnetd/global.c diff -u src/libexec/telnetd/global.c:1.8 src/libexec/telnetd/global.c:1.9 --- src/libexec/telnetd/global.c:1.8 Thu Aug 7 09:46:51 2003 +++ src/libexec/telnetd/global.c Thu Apr 23 00:03:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: global.c,v 1.8 2003/08/07 09:46:51 agc Exp $ */ +/* $NetBSD: global.c,v 1.9 2020/04/23 00:03:40 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)global.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: global.c,v 1.8 2003/08/07 09:46:51 agc Exp $"); +__RCSID("$NetBSD: global.c,v 1.9 2020/04/23 00:03:40 joerg Exp $"); #endif #endif /* not lint */ @@ -47,5 +47,50 @@ __RCSID("$NetBSD: global.c,v 1.8 2003/08 */ #include -#define extern #include + +char options[256]; +char do_dont_resp[256]; +char will_wont_resp[256]; +int linemode; /* linemode on/off */ +#ifdef LINEMODE +int uselinemode; /* what linemode to use (on/off) */ +int editmode; /* edit modes in use */ +int useeditmode; /* edit modes to use */ +int alwayslinemode; /* command line option */ +# ifdef KLUDGELINEMODE +int lmodetype; /* Client support for linemode */ +# endif /* KLUDGELINEMODE */ +#endif /* LINEMODE */ +int flowmode; /* current flow control state */ +int restartany; /* restart output on any character state */ +#ifdef DIAGNOSTICS +int diagnostic; /* telnet diagnostic capabilities */ +#endif /* DIAGNOSTICS */ +#ifdef SECURELOGIN +int require_secure_login; +#endif +#ifdef AUTHENTICATION +int auth_level; +#endif + +slcfun slctab[NSLC + 1]; /* slc mapping table */ +char terminaltype[41]; + +/* + * I/O data buffers, pointers, and counters. + */ +char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp; +char netibuf[BUFSIZ], *netip; +char netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp; +char *neturg; /* one past last bye of urgent data */ +int pcc, ncc; +int pty, net; +char *line; +int SYNCHing; /* we are in TELNET SYNCH mode */ + +#ifdef ENCRYPTION +char *nclearto; +#endif /* ENCRYPTION */ + +struct clockstate clocks;
CVS commit: src/usr.sbin/mopd
Module Name:src Committed By: joerg Date: Wed Apr 22 23:57:56 UTC 2020 Modified Files: src/usr.sbin/mopd/mopchk: mopchk.c src/usr.sbin/mopd/mopd: mopd.c src/usr.sbin/mopd/mopprobe: mopprobe.c src/usr.sbin/mopd/moptrace: moptrace.c Log Message: loop.c owns iflist To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/mopd/mopchk/mopchk.c cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/mopd/mopd/mopd.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/mopd/mopprobe/mopprobe.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/mopd/moptrace/moptrace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mopd/mopchk/mopchk.c diff -u src/usr.sbin/mopd/mopchk/mopchk.c:1.14 src/usr.sbin/mopd/mopchk/mopchk.c:1.15 --- src/usr.sbin/mopd/mopchk/mopchk.c:1.14 Wed Jun 8 01:15:26 2016 +++ src/usr.sbin/mopd/mopchk/mopchk.c Wed Apr 22 23:57:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mopchk.c,v 1.14 2016/06/08 01:15:26 christos Exp $ */ +/* $NetBSD: mopchk.c,v 1.15 2020/04/22 23:57:56 joerg Exp $ */ /* * Copyright (c) 1995-96 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: mopchk.c,v 1.14 2016/06/08 01:15:26 christos Exp $"); +__RCSID("$NetBSD: mopchk.c,v 1.15 2020/04/22 23:57:56 joerg Exp $"); #endif /* @@ -47,7 +47,7 @@ __RCSID("$NetBSD: mopchk.c,v 1.14 2016/0 * The list of all interfaces that are being listened to. rarp_loop() * "selects" on the descriptors in this list. */ -struct if_info *iflist; +extern struct if_info *iflist; __dead static void Usage(void); void mopProcess(struct if_info *, u_char *); Index: src/usr.sbin/mopd/mopd/mopd.c diff -u src/usr.sbin/mopd/mopd/mopd.c:1.15 src/usr.sbin/mopd/mopd/mopd.c:1.16 --- src/usr.sbin/mopd/mopd/mopd.c:1.15 Wed Jun 8 01:11:49 2016 +++ src/usr.sbin/mopd/mopd/mopd.c Wed Apr 22 23:57:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mopd.c,v 1.15 2016/06/08 01:11:49 christos Exp $ */ +/* $NetBSD: mopd.c,v 1.16 2020/04/22 23:57:56 joerg Exp $ */ /* * Copyright (c) 1993-96 Mats O Jansson. All rights reserved. @@ -25,7 +25,7 @@ */ #include "port.h" #ifndef lint -__RCSID("$NetBSD: mopd.c,v 1.15 2016/06/08 01:11:49 christos Exp $"); +__RCSID("$NetBSD: mopd.c,v 1.16 2020/04/22 23:57:56 joerg Exp $"); #endif /* @@ -51,7 +51,7 @@ __RCSID("$NetBSD: mopd.c,v 1.15 2016/06/ * The list of all interfaces that are being listened to. * "selects" on the descriptors in this list. */ -struct if_info *iflist; +extern struct if_info *iflist; __dead static void Usage(void); void mopProcess(struct if_info *, u_char *); Index: src/usr.sbin/mopd/mopprobe/mopprobe.c diff -u src/usr.sbin/mopd/mopprobe/mopprobe.c:1.13 src/usr.sbin/mopd/mopprobe/mopprobe.c:1.14 --- src/usr.sbin/mopd/mopprobe/mopprobe.c:1.13 Wed Jun 8 01:17:54 2016 +++ src/usr.sbin/mopd/mopprobe/mopprobe.c Wed Apr 22 23:57:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mopprobe.c,v 1.13 2016/06/08 01:17:54 christos Exp $ */ +/* $NetBSD: mopprobe.c,v 1.14 2020/04/22 23:57:56 joerg Exp $ */ /* * Copyright (c) 1993-96 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: mopprobe.c,v 1.13 2016/06/08 01:17:54 christos Exp $"); +__RCSID("$NetBSD: mopprobe.c,v 1.14 2020/04/22 23:57:56 joerg Exp $"); #endif /* @@ -51,7 +51,7 @@ __RCSID("$NetBSD: mopprobe.c,v 1.13 2016 * The list of all interfaces that are being listened to. rarp_loop() * "selects" on the descriptors in this list. */ -struct if_info *iflist; +extern struct if_info *iflist; __dead static void Usage(void); void mopProcess(struct if_info *, u_char *); Index: src/usr.sbin/mopd/moptrace/moptrace.c diff -u src/usr.sbin/mopd/moptrace/moptrace.c:1.12 src/usr.sbin/mopd/moptrace/moptrace.c:1.13 --- src/usr.sbin/mopd/moptrace/moptrace.c:1.12 Wed Jun 8 01:19:05 2016 +++ src/usr.sbin/mopd/moptrace/moptrace.c Wed Apr 22 23:57:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: moptrace.c,v 1.12 2016/06/08 01:19:05 christos Exp $ */ +/* $NetBSD: moptrace.c,v 1.13 2020/04/22 23:57:56 joerg Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: moptrace.c,v 1.12 2016/06/08 01:19:05 christos Exp $"); +__RCSID("$NetBSD: moptrace.c,v 1.13 2020/04/22 23:57:56 joerg Exp $"); #endif /* @@ -51,7 +51,7 @@ __RCSID("$NetBSD: moptrace.c,v 1.12 2016 * The list of all interfaces that are being listened to. * "selects" on the descriptors in this list. */ -struct if_info *iflist; +extern struct if_info *iflist; __dead static void Usage(void); void mopProcess(struct if_info *, u_char *);
CVS commit: src/usr.sbin/mopd/common
Module Name:src Committed By: joerg Date: Wed Apr 22 23:55:29 UTC 2020 Modified Files: src/usr.sbin/mopd/common: loop-bsd.c loop-linux2.c Log Message: Let loop.c own iflist To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/mopd/common/loop-bsd.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/mopd/common/loop-linux2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mopd/common/loop-bsd.c diff -u src/usr.sbin/mopd/common/loop-bsd.c:1.12 src/usr.sbin/mopd/common/loop-bsd.c:1.13 --- src/usr.sbin/mopd/common/loop-bsd.c:1.12 Wed Jun 8 01:11:49 2016 +++ src/usr.sbin/mopd/common/loop-bsd.c Wed Apr 22 23:55:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: loop-bsd.c,v 1.12 2016/06/08 01:11:49 christos Exp $ */ +/* $NetBSD: loop-bsd.c,v 1.13 2020/04/22 23:55:29 joerg Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: loop-bsd.c,v 1.12 2016/06/08 01:11:49 christos Exp $"); +__RCSID("$NetBSD: loop-bsd.c,v 1.13 2020/04/22 23:55:29 joerg Exp $"); #endif #include @@ -87,7 +87,7 @@ mopReadDL(void) * The list of all interfaces that are being listened to. loop() * "polls" on the descriptors in this list. */ -struct if_info *iflist; +extern struct if_info *iflist; void mopProcess(struct if_info *, u_char *); Index: src/usr.sbin/mopd/common/loop-linux2.c diff -u src/usr.sbin/mopd/common/loop-linux2.c:1.2 src/usr.sbin/mopd/common/loop-linux2.c:1.3 --- src/usr.sbin/mopd/common/loop-linux2.c:1.2 Sat Dec 7 04:55:01 2019 +++ src/usr.sbin/mopd/common/loop-linux2.c Wed Apr 22 23:55:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: loop-linux2.c,v 1.2 2019/12/07 04:55:01 christos Exp $ */ +/* $NetBSD: loop-linux2.c,v 1.3 2020/04/22 23:55:29 joerg Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: loop-linux2.c,v 1.2 2019/12/07 04:55:01 christos Exp $"); +__RCSID("$NetBSD: loop-linux2.c,v 1.3 2020/04/22 23:55:29 joerg Exp $"); #endif #include @@ -82,7 +82,7 @@ mopReadDL(void) * The list of all interfaces that are being listened to. loop() * "selects" on the descriptors in this list. */ -struct if_info *iflist; +extern struct if_info *iflist; void mopProcess(struct if_info *, u_char *);
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Wed Apr 22 23:54:32 UTC 2020 Modified Files: src/libexec/ld.elf_so: search.c Log Message: Mark _rtld_invalid_paths static as ldd can end up with two copies To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/libexec/ld.elf_so/search.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/search.c diff -u src/libexec/ld.elf_so/search.c:1.26 src/libexec/ld.elf_so/search.c:1.27 --- src/libexec/ld.elf_so/search.c:1.26 Sun Oct 13 20:18:42 2019 +++ src/libexec/ld.elf_so/search.c Wed Apr 22 23:54:32 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: search.c,v 1.26 2019/10/13 20:18:42 mrg Exp $ */ +/* $NetBSD: search.c,v 1.27 2020/04/22 23:54:32 joerg Exp $ */ /* * Copyright 1996 Matt Thomas @@ -38,7 +38,7 @@ #include #ifndef lint -__RCSID("$NetBSD: search.c,v 1.26 2019/10/13 20:18:42 mrg Exp $"); +__RCSID("$NetBSD: search.c,v 1.27 2020/04/22 23:54:32 joerg Exp $"); #endif /* not lint */ #include @@ -60,7 +60,7 @@ __RCSID("$NetBSD: search.c,v 1.26 2019/1 /* * Data declarations. */ -Search_Path*_rtld_invalid_paths; +static Search_Path*_rtld_invalid_paths; static Obj_Entry *_rtld_search_library_path(const char *, size_t, const char *, size_t, int);
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: joerg Date: Wed Apr 22 23:53:27 UTC 2020 Modified Files: src/usr.sbin/ldpd: conffile.c conffile.h ldp_peer.c ldp_peer.h socketops.c socketops.h Log Message: Avoid common symbol definitions To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/ldpd/conffile.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/ldpd/conffile.h cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/ldpd/ldp_peer.c cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/ldpd/ldp_peer.h cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/ldpd/socketops.c cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/ldpd/socketops.h 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/ldpd/conffile.c diff -u src/usr.sbin/ldpd/conffile.c:1.12 src/usr.sbin/ldpd/conffile.c:1.13 --- src/usr.sbin/ldpd/conffile.c:1.12 Tue Jan 10 21:02:38 2017 +++ src/usr.sbin/ldpd/conffile.c Wed Apr 22 23:53:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: conffile.c,v 1.12 2017/01/10 21:02:38 christos Exp $ */ +/* $NetBSD: conffile.c,v 1.13 2020/04/22 23:53:27 joerg Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -47,6 +47,9 @@ #define NextCommand(x) strsep(, " ") #define LINEMAXSIZE 1024 +struct coifs_head coifs_head; +struct conei_head conei_head; + char *mapped, *nextline; size_t mapsize; Index: src/usr.sbin/ldpd/conffile.h diff -u src/usr.sbin/ldpd/conffile.h:1.4 src/usr.sbin/ldpd/conffile.h:1.5 --- src/usr.sbin/ldpd/conffile.h:1.4 Thu Oct 17 18:10:23 2013 +++ src/usr.sbin/ldpd/conffile.h Wed Apr 22 23:53:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: conffile.h,v 1.4 2013/10/17 18:10:23 kefren Exp $ */ +/* $NetBSD: conffile.h,v 1.5 2020/04/22 23:53:27 joerg Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ struct conf_neighbour { int authenticate; /* RFC 2385 */ SLIST_ENTRY(conf_neighbour) neilist; }; -SLIST_HEAD(,conf_neighbour) conei_head; +extern SLIST_HEAD(conei_head,conf_neighbour) conei_head; struct conf_interface { char if_name[IF_NAMESIZE]; @@ -57,7 +57,7 @@ struct conf_interface { int passive; SLIST_ENTRY(conf_interface) iflist; }; -SLIST_HEAD(,conf_interface) coifs_head; +extern SLIST_HEAD(coifs_head,conf_interface) coifs_head; int conf_parsefile(const char *fname); Index: src/usr.sbin/ldpd/ldp_peer.c diff -u src/usr.sbin/ldpd/ldp_peer.c:1.16 src/usr.sbin/ldpd/ldp_peer.c:1.17 --- src/usr.sbin/ldpd/ldp_peer.c:1.16 Fri Aug 2 07:29:56 2013 +++ src/usr.sbin/ldpd/ldp_peer.c Wed Apr 22 23:53:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ldp_peer.c,v 1.16 2013/08/02 07:29:56 kefren Exp $ */ +/* $NetBSD: ldp_peer.c,v 1.17 2020/04/22 23:53:27 joerg Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -55,6 +55,7 @@ #include "ldp_peer.h" extern int ldp_holddown_time; +struct ldp_peer_head ldp_peer_head; static struct label_mapping *ldp_peer_get_lm(struct ldp_peer *, const struct sockaddr *, uint); Index: src/usr.sbin/ldpd/ldp_peer.h diff -u src/usr.sbin/ldpd/ldp_peer.h:1.8 src/usr.sbin/ldpd/ldp_peer.h:1.9 --- src/usr.sbin/ldpd/ldp_peer.h:1.8 Fri Aug 2 07:29:56 2013 +++ src/usr.sbin/ldpd/ldp_peer.h Wed Apr 22 23:53:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ldp_peer.h,v 1.8 2013/08/02 07:29:56 kefren Exp $ */ +/* $NetBSD: ldp_peer.h,v 1.9 2020/04/22 23:53:27 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ struct ldp_peer { SLIST_ENTRY(ldp_peer) peers; }; -SLIST_HEAD(,ldp_peer) ldp_peer_head; +extern SLIST_HEAD(ldp_peer_head,ldp_peer) ldp_peer_head; struct peer_map { struct ldp_peer *peer; Index: src/usr.sbin/ldpd/socketops.c diff -u src/usr.sbin/ldpd/socketops.c:1.34 src/usr.sbin/ldpd/socketops.c:1.35 --- src/usr.sbin/ldpd/socketops.c:1.34 Wed Apr 12 17:02:51 2017 +++ src/usr.sbin/ldpd/socketops.c Wed Apr 22 23:53:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: socketops.c,v 1.34 2017/04/12 17:02:51 roy Exp $ */ +/* $NetBSD: socketops.c,v 1.35 2020/04/22 23:53:27 joerg Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -61,6 +61,9 @@ #include "ldp_errors.h" #include "socketops.h" +struct hello_info_head hello_info_head; +static SLIST_HEAD(,hello_socket) hello_socket_head; + int ls;/* TCP listening socket on port 646 */ int route_socket; /* used to see when a route is added/deleted */ int command_socket; /* Listening socket for interface command */ Index: src/usr.sbin/ldpd/socketops.h diff -u src/usr.sbin/ldpd/socketops.h:1.6 src/usr.sbin/ldpd/socketops.h:1.7 --- src/usr.sbin/ldpd/socketops.h:1.6 Thu Jul 11 05:45:23 2013 +++ src/usr.sbin/ldpd/socketops.h Wed Apr 22 23:53:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: socketops.h,v 1.6 2013/07/11 05:45:23 kefren Exp $ */ +/* $NetBSD: socketops.h,v 1.7 2020/04/22 23:53:27 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -62,12 +62,11 @@ struct hello_info { int keepalive; SLIST_ENTRY(hello_info) infos; };
CVS commit: src/usr.sbin/envstat
Module Name:src Committed By: joerg Date: Wed Apr 22 23:51:34 UTC 2020 Modified Files: src/usr.sbin/envstat: config_yacc.y Log Message: Externalize yytext, it belongs to the lexer To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/envstat/config_yacc.y 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/envstat/config_yacc.y diff -u src/usr.sbin/envstat/config_yacc.y:1.5 src/usr.sbin/envstat/config_yacc.y:1.6 --- src/usr.sbin/envstat/config_yacc.y:1.5 Thu Mar 15 02:02:23 2012 +++ src/usr.sbin/envstat/config_yacc.y Wed Apr 22 23:51:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: config_yacc.y,v 1.5 2012/03/15 02:02:23 joerg Exp $ */ +/* $NetBSD: config_yacc.y,v 1.6 2020/04/22 23:51:34 joerg Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: config_yacc.y,v 1.5 2012/03/15 02:02:23 joerg Exp $"); +__RCSID("$NetBSD: config_yacc.y,v 1.6 2020/04/22 23:51:34 joerg Exp $"); #endif /* not lint */ #include @@ -50,7 +50,7 @@ int yyerror(const char *, ...) __printfl void yyrestart(FILE *); int yyline; -char *yytext; +extern char *yytext; static prop_dictionary_t kdict; %}
CVS commit: src/usr.sbin/rpc.bootparamd
Module Name:src Committed By: joerg Date: Wed Apr 22 23:47:02 UTC 2020 Modified Files: src/usr.sbin/rpc.bootparamd: bootparamd.c Log Message: _rpcpmstart is defined by rpcgen, so externalize it here To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/rpc.bootparamd/bootparamd.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/rpc.bootparamd/bootparamd.c diff -u src/usr.sbin/rpc.bootparamd/bootparamd.c:1.47 src/usr.sbin/rpc.bootparamd/bootparamd.c:1.48 --- src/usr.sbin/rpc.bootparamd/bootparamd.c:1.47 Thu Aug 15 08:34:19 2019 +++ src/usr.sbin/rpc.bootparamd/bootparamd.c Wed Apr 22 23:47:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bootparamd.c,v 1.47 2019/08/15 08:34:19 kamil Exp $ */ +/* $NetBSD: bootparamd.c,v 1.48 2020/04/22 23:47:02 joerg Exp $ */ /* * This code is not copyright, and is placed in the public domain. @@ -11,7 +11,7 @@ #include #ifndef lint -__RCSID("$NetBSD: bootparamd.c,v 1.47 2019/08/15 08:34:19 kamil Exp $"); +__RCSID("$NetBSD: bootparamd.c,v 1.48 2020/04/22 23:47:02 joerg Exp $"); #endif #include @@ -56,7 +56,7 @@ static char domain_name[MAX_MACHINE_NAME extern void bootparamprog_1(struct svc_req *, SVCXPRT *); extern int _rpcsvcdirty; -int _rpcpmstart = 0; +extern int _rpcpmstart; int debug = 0; int dolog = 0; struct in_addr route_addr;
CVS commit: src/usr.sbin/rpc.pcnfsd
Module Name:src Committed By: joerg Date: Wed Apr 22 23:46:03 UTC 2020 Modified Files: src/usr.sbin/rpc.pcnfsd: pcnfsd_misc.c pcnfsd_print.c Log Message: tempstr is only used in one file, make it static To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/rpc.pcnfsd/pcnfsd_print.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/rpc.pcnfsd/pcnfsd_misc.c diff -u src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c:1.16 src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c:1.17 --- src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c:1.16 Tue Jan 23 21:06:25 2018 +++ src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c Wed Apr 22 23:46:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_misc.c,v 1.16 2018/01/23 21:06:25 sevan Exp $ */ +/* $NetBSD: pcnfsd_misc.c,v 1.17 2020/04/22 23:46:02 joerg Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_misc.c 1.5 92/01/24 19:59:13 SMI */ /* @@ -65,8 +65,6 @@ int wtmp_enabled = 1; #define zchar 0x5b -chartempstr[256]; - char *mapfont(char, char, char); void myhandler(int); void start_watchdog(int); Index: src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c diff -u src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c:1.15 src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c:1.16 --- src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c:1.15 Fri Dec 27 10:20:02 2019 +++ src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c Wed Apr 22 23:46:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_print.c,v 1.15 2019/12/27 10:20:02 msaitoh Exp $ */ +/* $NetBSD: pcnfsd_print.c,v 1.16 2020/04/22 23:46:02 joerg Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_print.c 1.7 92/01/24 19:58:58 SMI */ /* @@ -92,7 +92,7 @@ struct stat statbuf; charpathname[MAXPATHLEN]; charnew_pathname[MAXPATHLEN]; charsp_name[MAXPATHLEN] = SPOOLDIR; -chartempstr[256]; +static char tempstr[256]; chardelims[] = " \t\r\n:()"; pr_list printers = NULL;
CVS commit: src/dist/pf/sbin/pfctl
Module Name:src Committed By: joerg Date: Wed Apr 22 23:40:40 UTC 2020 Modified Files: src/dist/pf/sbin/pfctl: pfctl.c Log Message: Externalize variables owned logically by pf_ruleset.c To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/dist/pf/sbin/pfctl/pfctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/pf/sbin/pfctl/pfctl.c diff -u src/dist/pf/sbin/pfctl/pfctl.c:1.5 src/dist/pf/sbin/pfctl/pfctl.c:1.6 --- src/dist/pf/sbin/pfctl/pfctl.c:1.5 Wed Jun 18 09:06:26 2008 +++ src/dist/pf/sbin/pfctl/pfctl.c Wed Apr 22 23:40:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pfctl.c,v 1.5 2008/06/18 09:06:26 yamt Exp $ */ +/* $NetBSD: pfctl.c,v 1.6 2020/04/22 23:40:40 joerg Exp $ */ /* $OpenBSD: pfctl.c,v 1.268 2007/06/30 18:25:08 henning Exp $ */ /* @@ -96,8 +96,8 @@ int pfctl_load_ruleset(struct pfctl *, int pfctl_load_rule(struct pfctl *, char *, struct pf_rule *, int); const char *pfctl_lookup_option(char *, const char **); -struct pf_anchor_global pf_anchors; -struct pf_anchor pf_main_anchor; +extern struct pf_anchor_global pf_anchors; +extern struct pf_anchor pf_main_anchor; const char *clearopt; char *rulesopt;
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: joerg Date: Wed Apr 22 23:43:12 UTC 2020 Modified Files: src/usr.sbin/sysinst: defs.h main.c mbr.c mbr.h Log Message: Don't depend on common symbol definitions. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sysinst/main.c cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/sysinst/mbr.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/mbr.h 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/sysinst/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.57 src/usr.sbin/sysinst/defs.h:1.58 --- src/usr.sbin/sysinst/defs.h:1.57 Mon Mar 16 06:48:17 2020 +++ src/usr.sbin/sysinst/defs.h Wed Apr 22 23:43:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.57 2020/03/16 06:48:17 martin Exp $ */ +/* $NetBSD: defs.h,v 1.58 2020/04/22 23:43:12 joerg Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -360,31 +360,31 @@ struct install_partition_desc { /* variables */ -int debug; /* set by -D option */ +extern int debug; /* set by -D option */ -char machine[SSTRSIZE]; +extern char machine[SSTRSIZE]; -int ignorerror; -int ttysig_ignore; -pid_t ttysig_forward; -uint sizemult; +extern int ignorerror; +extern int ttysig_ignore; +extern pid_t ttysig_forward; +extern uint sizemult; extern const char *multname; extern const char *err_outofmem; -int partman_go; /* run extended partition manager */ +extern int partman_go; /* run extended partition manager */ /* logging variables */ -FILE *logfp; -FILE *script; +extern FILE *logfp; +extern FILE *script; #define MAX_DISKS 15 -daddr_t root_limit;/* BIOS (etc) read limit */ +extern daddr_t root_limit;/* BIOS (etc) read limit */ enum SHRED_T { SHRED_NONE=0, SHRED_ZEROS, SHRED_RANDOM }; /* All information that is unique for each drive */ -SLIST_HEAD(pm_head_t, pm_devs) pm_head; +extern SLIST_HEAD(pm_head_t, pm_devs) pm_head; struct pm_devs { /* @@ -453,8 +453,8 @@ struct pm_devs { SLIST_ENTRY(pm_devs) l; }; -struct pm_devs *pm; /* Pointer to current device with which we work */ -struct pm_devs *pm_new; /* Pointer for next allocating device in find_disks() */ +extern struct pm_devs *pm; /* Pointer to current device with which we work */ +extern struct pm_devs *pm_new; /* Pointer for next allocating device in find_disks() */ /* Generic structure for partman */ struct part_entry { @@ -469,8 +469,8 @@ struct part_entry { }; /* Relative file name for storing a distribution. */ -char xfer_dir[STRSIZE]; -int clean_xfer_dir; +extern char xfer_dir[STRSIZE]; +extern int clean_xfer_dir; #if !defined(SYSINST_FTP_HOST) #define SYSINST_FTP_HOST "ftp.NetBSD.org" @@ -530,28 +530,28 @@ int clean_xfer_dir; #endif /* Abs. path we extract binary sets from */ -char ext_dir_bin[STRSIZE]; +extern char ext_dir_bin[STRSIZE]; /* Abs. path we extract source sets from */ -char ext_dir_src[STRSIZE]; +extern char ext_dir_src[STRSIZE]; /* Abs. path we extract pkgsrc from */ -char ext_dir_pkgsrc[STRSIZE]; +extern char ext_dir_pkgsrc[STRSIZE]; /* Place we look for binary sets in all fs types */ -char set_dir_bin[STRSIZE]; +extern char set_dir_bin[STRSIZE]; /* Place we look for source sets in all fs types */ -char set_dir_src[STRSIZE]; +extern char set_dir_src[STRSIZE]; /* Place we look for pkgs in all fs types */ -char pkg_dir[STRSIZE]; +extern char pkg_dir[STRSIZE]; /* Place we look for pkgsrc in all fs types */ -char pkgsrc_dir[STRSIZE]; +extern char pkgsrc_dir[STRSIZE]; /* User shell */ -const char *ushell; +extern const char *ushell; #define XFER_FTP 0 #define XFER_HTTP 1 @@ -567,26 +567,26 @@ struct ftpinfo { }; /* use the same struct for sets ftp and to build pkgpath */ -struct ftpinfo ftp, pkg, pkgsrc; +extern struct ftpinfo ftp, pkg, pkgsrc; -int (*fetch_fn)(const char *); -char nfs_host[STRSIZE]; -char nfs_dir[STRSIZE]; +extern int (*fetch_fn)(const char *); +extern char nfs_host[STRSIZE]; +extern char nfs_dir[STRSIZE]; -char cdrom_dev[SSTRSIZE]; /* Typically "cd0a" */ -char fd_dev[SSTRSIZE]; /* Typically "/dev/fd0a" */ -const char *fd_type; /* "msdos", "ffs" or maybe "ados" */ +extern char cdrom_dev[SSTRSIZE]; /* Typically "cd0a" */ +extern char fd_dev[SSTRSIZE]; /* Typically "/dev/fd0a" */ +extern const char *fd_type; /* "msdos", "ffs" or maybe "ados" */ -char localfs_dev[SSTRSIZE]; -char localfs_fs[SSTRSIZE]; -char localfs_dir[STRSIZE]; +extern char localfs_dev[SSTRSIZE]; +extern char localfs_fs[SSTRSIZE]; +extern char localfs_dir[STRSIZE]; -char targetroot_mnt[SSTRSIZE]; +extern char targetroot_mnt[SSTRSIZE]; -int mnt2_mounted; +extern int mnt2_mounted; -char dist_postfix[SSTRSIZE]; -char dist_tgz_postfix[SSTRSIZE]; +extern char dist_postfix[SSTRSIZE]; +extern char dist_tgz_postfix[SSTRSIZE]; /* needed prototypes */ void set_menu_numopts(int, int); @@
CVS commit: src/games/backgammon/common_source
Module Name:src Committed By: joerg Date: Wed Apr 22 23:36:26 UTC 2020 Modified Files: src/games/backgammon/common_source: back.h fancy.c Log Message: buffnum is shared between subs.c and fancy.c To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/games/backgammon/common_source/back.h cvs rdiff -u -r1.14 -r1.15 src/games/backgammon/common_source/fancy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/backgammon/common_source/back.h diff -u src/games/backgammon/common_source/back.h:1.20 src/games/backgammon/common_source/back.h:1.21 --- src/games/backgammon/common_source/back.h:1.20 Sat Oct 13 19:19:39 2012 +++ src/games/backgammon/common_source/back.h Wed Apr 22 23:36:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: back.h,v 1.20 2012/10/13 19:19:39 dholland Exp $ */ +/* $NetBSD: back.h,v 1.21 2020/04/22 23:36:26 joerg Exp $ */ /* * Copyright (c) 1980, 1993 @@ -124,6 +124,8 @@ extern const char *const *colorptr; /* c extern const char *const *Colorptr; /* color of current player, capitalized */ extern int colen; /* length of color of current player */ +extern int buffnum; + extern struct termios old, noech, raw;/* original tty status */ extern int curr; /* row position of cursor */ Index: src/games/backgammon/common_source/fancy.c diff -u src/games/backgammon/common_source/fancy.c:1.14 src/games/backgammon/common_source/fancy.c:1.15 --- src/games/backgammon/common_source/fancy.c:1.14 Wed Aug 12 05:17:57 2009 +++ src/games/backgammon/common_source/fancy.c Wed Apr 22 23:36:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fancy.c,v 1.14 2009/08/12 05:17:57 dholland Exp $ */ +/* $NetBSD: fancy.c,v 1.15 2020/04/22 23:36:26 joerg Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)fancy.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fancy.c,v 1.14 2009/08/12 05:17:57 dholland Exp $"); +__RCSID("$NetBSD: fancy.c,v 1.15 2020/04/22 23:36:26 joerg Exp $"); #endif #endif /* not lint */ @@ -78,8 +78,6 @@ static char tcap[] = "bccdceclcmhomcmlnd /* corresponding strings */ static char **tstr[] = {, , , , , , , , , }; -int buffnum; /* pointer to output buffer */ - static char tbuf[1024]; /* buffer for decoded termcap entries */ static int oldb[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
CVS commit: src/lib
Module Name:src Committed By: joerg Date: Wed Apr 22 23:32:25 UTC 2020 Modified Files: src/lib/csu: Makefile src/lib/libc/gen: Makefile.inc src/lib/libc/misc: Makefile.inc Log Message: Explicitly use -fcommon for globals shared between libc and CSU. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/lib/csu/Makefile cvs rdiff -u -r1.200 -r1.201 src/lib/libc/gen/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/lib/libc/misc/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/csu/Makefile diff -u src/lib/csu/Makefile:1.39 src/lib/csu/Makefile:1.40 --- src/lib/csu/Makefile:1.39 Sun Jan 27 04:35:25 2019 +++ src/lib/csu/Makefile Wed Apr 22 23:32:25 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2019/01/27 04:35:25 dholland Exp $ +# $NetBSD: Makefile,v 1.40 2020/04/22 23:32:25 joerg Exp $ NOLIBCSANITIZER= # defined NOSANITIZER= # defined @@ -18,6 +18,8 @@ ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_ .error Architecture (${CSU_MACHINE_ARCH} or ${CSU_MACHINE_CPU}) unsupported .endif +# Ownership of globals from crt0.o is shared with libc for historic reasons +COPTS+= -fcommon .PATH: ${ARCHDIR} .include "${ARCHDIR}/Makefile.inc" Index: src/lib/libc/gen/Makefile.inc diff -u src/lib/libc/gen/Makefile.inc:1.200 src/lib/libc/gen/Makefile.inc:1.201 --- src/lib/libc/gen/Makefile.inc:1.200 Sat Sep 9 18:18:28 2017 +++ src/lib/libc/gen/Makefile.inc Wed Apr 22 23:32:25 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.200 2017/09/09 18:18:28 kamil Exp $ +# $NetBSD: Makefile.inc,v 1.201 2020/04/22 23:32:25 joerg Exp $ # from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 # gen sources @@ -203,3 +203,7 @@ errlist.c: errlist.awk ${NETBSDSRCDIR}/s ${TOOL_AWK} -f ${.ALLSRC} > ${.TARGET} CLEANFILES+= errlist.c + +# Ownership of globals from crt0.o is shared with libc for historic reasons. +# __progname is also necessary as global here for the nbcompat case. +COPTS.getprogname.c+= -fcommon Index: src/lib/libc/misc/Makefile.inc diff -u src/lib/libc/misc/Makefile.inc:1.3 src/lib/libc/misc/Makefile.inc:1.4 --- src/lib/libc/misc/Makefile.inc:1.3 Fri Aug 3 04:29:35 2018 +++ src/lib/libc/misc/Makefile.inc Wed Apr 22 23:32:25 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.3 2018/08/03 04:29:35 kamil Exp $ +# $NetBSD: Makefile.inc,v 1.4 2020/04/22 23:32:25 joerg Exp $ # @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 .PATH: ${ARCHDIR}/misc ${.CURDIR}/misc @@ -13,3 +13,6 @@ SRCS+= initfini.c # for -fstack-protector SRCS+= stack_protector.c + +# Ownership of globals from crt0.o is shared with libc for historic reasons +COPTS.initfini.c+= -fcommon
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: joerg Date: Tue Apr 21 22:27:09 UTC 2020 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: Drop obsolete special case for clang/ppc. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.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/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.11 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.12 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.11 Fri Aug 9 08:10:39 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Tue Apr 21 22:27:09 2020 @@ -156,15 +156,7 @@ /* Non-empty if the tls_model attribute is supported. */ #if !defined(__vax__) && !defined(__mc68010__) -# if defined(__clang__) && defined(__ppc__) && defined(__pic__) -/* - * XXX: In pic mode clang generates PPC32_GOT instead of PPC32_PICGOT for - * tls model initial-exec. It shouldn't; see PPCISelLowering.h - */ -# define JEMALLOC_TLS_MODEL __attribute__((tls_model("global-dynamic"))) -# else # define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) -# endif #endif /*
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: joerg Date: Tue Apr 21 22:22:55 UTC 2020 Modified Files: src/lib/libc/stdlib: jemalloc.c Log Message: Switch to using TLS in old jemalloc for everywhere but VAX and sun2. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/lib/libc/stdlib/jemalloc.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/stdlib/jemalloc.c diff -u src/lib/libc/stdlib/jemalloc.c:1.48 src/lib/libc/stdlib/jemalloc.c:1.49 --- src/lib/libc/stdlib/jemalloc.c:1.48 Mon Jan 13 19:14:37 2020 +++ src/lib/libc/stdlib/jemalloc.c Tue Apr 21 22:22:55 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: jemalloc.c,v 1.48 2020/01/13 19:14:37 joerg Exp $ */ +/* $NetBSD: jemalloc.c,v 1.49 2020/04/21 22:22:55 joerg Exp $ */ /*- * Copyright (C) 2006,2007 Jason Evans . @@ -100,7 +100,6 @@ #ifdef __NetBSD__ # define xutrace(a, b) utrace("malloc", (a), (b)) # define __DECONST(x, y) ((x)__UNCONST(y)) -# define NO_TLS #else # define xutrace(a, b) utrace((a), (b)) #endif /* __NetBSD__ */ @@ -118,7 +117,7 @@ #include /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */ -__RCSID("$NetBSD: jemalloc.c,v 1.48 2020/01/13 19:14:37 joerg Exp $"); +__RCSID("$NetBSD: jemalloc.c,v 1.49 2020/04/21 22:22:55 joerg Exp $"); #ifdef __FreeBSD__ #include "libc_private.h" @@ -222,13 +221,11 @@ __RCSID("$NetBSD: jemalloc.c,v 1.48 2020 # define QUANTUM_2POW_MIN 4 # define SIZEOF_PTR_2POW 3 # define TINY_MIN_2POW 3 -# define NO_TLS #endif #ifdef __sparc64__ # define QUANTUM_2POW_MIN 4 # define SIZEOF_PTR_2POW 3 # define TINY_MIN_2POW 3 -# define NO_TLS #endif #ifdef __amd64__ # define QUANTUM_2POW_MIN 4 @@ -242,7 +239,6 @@ __RCSID("$NetBSD: jemalloc.c,v 1.48 2020 # ifdef __ARM_EABI__ #define TINY_MIN_2POW 3 # endif -# define NO_TLS #endif #ifdef __powerpc__ # define QUANTUM_2POW_MIN 4 @@ -264,6 +260,7 @@ __RCSID("$NetBSD: jemalloc.c,v 1.48 2020 # define QUANTUM_2POW_MIN 4 # define SIZEOF_PTR_2POW 2 # define USE_BRK +# define NO_TLS #endif #ifdef __sh__ # define QUANTUM_2POW_MIN 4 @@ -274,6 +271,9 @@ __RCSID("$NetBSD: jemalloc.c,v 1.48 2020 # define QUANTUM_2POW_MIN 4 # define SIZEOF_PTR_2POW 2 # define USE_BRK +# ifdef __mc68000__ +# define NO_TLS +# endif #endif #if defined(__mips__) || defined(__riscv__) # ifdef _LP64 @@ -771,9 +771,11 @@ static malloc_mutex_t arenas_mtx; /* Pro * for allocations. */ #ifndef NO_TLS -static __thread arena_t **arenas_map; +static __attribute__((tls_model("initial-exec"))) +__thread arena_t **arenas_map; #else static arena_t **arenas_map; +static thread_key_t arenas_map_key = -1; #endif #if !defined(NO_TLS) || !defined(_REENTRANT) @@ -781,7 +783,6 @@ static arena_t **arenas_map; # define set_arenas_map(x) (arenas_map = x) #else -static thread_key_t arenas_map_key = -1; static inline arena_t ** get_arenas_map(void) @@ -809,14 +810,18 @@ set_arenas_map(arena_t **a) } if (arenas_map_key == -1) { +#ifndef NO_TLS (void)thr_keycreate(_map_key, NULL); +#endif if (arenas_map != NULL) { _DIAGASSERT(arenas_map == a); arenas_map = NULL; } } +#ifndef NO_TLS thr_setspecific(arenas_map_key, a); +#endif } #endif
CVS commit: src/sys/arch
Module Name:src Committed By: joerg Date: Tue Apr 21 21:39:07 UTC 2020 Modified Files: src/sys/arch/macppc/stand: Makefile.inc src/sys/arch/zaurus/stand: Makefile.inc Log Message: Use -Wno-error=address-of-packed-member for a number of more boot loaders. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/macppc/stand/Makefile.inc cvs rdiff -u -r1.5 -r1.6 src/sys/arch/zaurus/stand/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/stand/Makefile.inc diff -u src/sys/arch/macppc/stand/Makefile.inc:1.4 src/sys/arch/macppc/stand/Makefile.inc:1.5 --- src/sys/arch/macppc/stand/Makefile.inc:1.4 Thu Apr 20 19:09:29 2017 +++ src/sys/arch/macppc/stand/Makefile.inc Tue Apr 21 21:39:07 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.4 2017/04/20 19:09:29 uwe Exp $ +# $NetBSD: Makefile.inc,v 1.5 2020/04/21 21:39:07 joerg Exp $ BINDIR= /usr/mdec @@ -6,3 +6,10 @@ CFLAGS_UNWIND.gcc= -fno-unwind-tables -f CFLAGS_UNWIND.clang= -fno-unwind-tables LINKFLAGS_UNWIND= --no-ld-generated-unwind-info + +# Follow the suit of Makefile.kern.inc; needed for the lfs64 union +# accessors -- they don't actually dereference the resulting pointer, +# just use it for type-checking. +CWARNFLAGS.clang+= -Wno-error=address-of-packed-member + +COPTS+= -fcommon Index: src/sys/arch/zaurus/stand/Makefile.inc diff -u src/sys/arch/zaurus/stand/Makefile.inc:1.5 src/sys/arch/zaurus/stand/Makefile.inc:1.6 --- src/sys/arch/zaurus/stand/Makefile.inc:1.5 Sat Jan 23 22:28:09 2016 +++ src/sys/arch/zaurus/stand/Makefile.inc Tue Apr 21 21:39:07 2020 @@ -1,4 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.5 2016/01/23 22:28:09 christos Exp $ +# $NetBSD: Makefile.inc,v 1.6 2020/04/21 21:39:07 joerg Exp $ BINDIR= /usr/mdec KLINK_MACHINE= zaurus + +# Follow the suit of Makefile.kern.inc; needed for the lfs64 union +# accessors -- they don't actually dereference the resulting pointer, +# just use it for type-checking. +CWARNFLAGS.clang+= -Wno-error=address-of-packed-member + +COPTS+= -fcommon