CVS commit: src/tools/gdb

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:30:58 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
gdb/mknative: Preset yes to rename(2) checks

It must be better to have this workaround here, rather than in external.
(Thanks uwe@ for suggestion!)

Confirmed that the same files generated as before.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tools/gdb/Makefile

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

Modified files:

Index: src/tools/gdb/Makefile
diff -u src/tools/gdb/Makefile:1.48 src/tools/gdb/Makefile:1.49
--- src/tools/gdb/Makefile:1.48	Thu Aug 17 07:54:10 2023
+++ src/tools/gdb/Makefile	Sun Aug 20 02:30:58 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.48 2023/08/17 07:54:10 rin Exp $
+#	$NetBSD: Makefile,v 1.49 2023/08/20 02:30:58 rin Exp $
 
 .include 
 
@@ -77,7 +77,11 @@ MKNATIVE_CONFIGURE_PRESET= \
 	bash_cv_func_ctype_nonascii=yes \
 	bash_cv_func_sigsetjmp=present \
 	bash_cv_func_strcoll_broken=no \
-	bash_cv_must_reinstall_sighandlers=no
+	bash_cv_must_reinstall_sighandlers=no \
+	gl_cv_func_rename_slash_dst_works=yes \
+	gl_cv_func_rename_slash_src_works=yes \
+	gl_cv_func_rename_link_works=yes \
+	gl_cv_func_rename_dest_works=yes
 
 CONFIGURE_ENV+=	am_cv_func_iconv=no
 



CVS commit: src/tools/gdb

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:30:58 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
gdb/mknative: Preset yes to rename(2) checks

It must be better to have this workaround here, rather than in external.
(Thanks uwe@ for suggestion!)

Confirmed that the same files generated as before.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tools/gdb/Makefile

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



CVS commit: src/external/gpl3/gdb/dist/gnulib

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:28:23 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gnulib: configure
src/external/gpl3/gdb/dist/gnulib/import/m4: rename.m4

Log Message:
gdb/gnulib: Revert rename(2) workaround for now


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gnulib/configure
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4

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

Modified files:

Index: src/external/gpl3/gdb/dist/gnulib/configure
diff -u src/external/gpl3/gdb/dist/gnulib/configure:1.4 src/external/gpl3/gdb/dist/gnulib/configure:1.5
--- src/external/gpl3/gdb/dist/gnulib/configure:1.4	Sun Aug 20 02:02:40 2023
+++ src/external/gpl3/gdb/dist/gnulib/configure	Sun Aug 20 02:28:22 2023
@@ -31797,8 +31797,6 @@ else
  *-gnu*)  gl_cv_func_rename_slash_dst_works="guessing yes" ;;
   # Guess no on native Windows.
  mingw*)  gl_cv_func_rename_slash_dst_works="guessing no" ;;
-  # Guess yes on NetBSD systems.
- netbsd*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
esac
@@ -31872,8 +31870,6 @@ else
  *-gnu*)  gl_cv_func_rename_slash_src_works="guessing yes" ;;
   # Guess yes on native Windows.
  mingw*)  gl_cv_func_rename_slash_src_works="guessing yes" ;;
-  # Guess yes on NetBSD systems.
- netbsd*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
esac
@@ -32000,8 +31996,6 @@ fi
*-gnu*)  gl_cv_func_rename_link_works="guessing yes" ;;
 # Guess yes on native Windows.
mingw*)  gl_cv_func_rename_link_works="guessing yes" ;;
-# Guess yes on NetBSD systems.
-   netbsd*) gl_cv_func_rename_link_works="guessing yes" ;;
 # If we don't know, obey --enable-cross-guesses.
*)   gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
  esac
@@ -32039,8 +32033,6 @@ else
  *-gnu*)  gl_cv_func_rename_dest_works="guessing yes" ;;
   # Guess no on native Windows.
  mingw*)  gl_cv_func_rename_dest_works="guessing no" ;;
-  # Guess yes on NetBSD systems.
- netbsd*) gl_cv_func_rename_dest_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
esac

Index: src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4
diff -u src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4:1.4 src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4:1.5
--- src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4:1.4	Sun Aug 20 02:02:40 2023
+++ src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4	Sun Aug 20 02:28:22 2023
@@ -61,8 +61,6 @@ AC_DEFUN([gl_FUNC_RENAME],
  *-gnu*)  gl_cv_func_rename_slash_dst_works="guessing yes" ;;
   # Guess no on native Windows.
  mingw*)  gl_cv_func_rename_slash_dst_works="guessing no" ;;
-  # Guess yes on NetBSD systems.
- netbsd*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
esac
@@ -119,8 +117,6 @@ AC_DEFUN([gl_FUNC_RENAME],
  *-gnu*)  gl_cv_func_rename_slash_src_works="guessing yes" ;;
   # Guess yes on native Windows.
  mingw*)  gl_cv_func_rename_slash_src_works="guessing yes" ;;
-  # Guess yes on NetBSD systems.
- netbsd*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
esac
@@ -192,8 +188,6 @@ AC_DEFUN([gl_FUNC_RENAME],
*-gnu*)  gl_cv_func_rename_link_works="guessing yes" ;;
 # Guess yes on native Windows.
mingw*)  gl_cv_func_rename_link_works="guessing yes" ;;
-# Guess yes on NetBSD systems.
-   netbsd*) 

Re: CVS commit: src/external/gpl3/gdb/dist/gnulib

2023-08-19 Thread Rin Okuyama
Ah, it must be better. Thank you for useful comment as always :)

I've confirmed the same files are generated. I will commit soon, but
commit mail seems to be delayed for some reasons...

Thanks,
rin

On Sun, Aug 20, 2023 at 11:17 AM Valery Ushakov  wrote:
>
> On Sun, Aug 20, 2023 at 02:02:40 +, Rin Okuyama wrote:
>
> > Modified Files:
> >   src/external/gpl3/gdb/dist/gnulib: configure
> >   src/external/gpl3/gdb/dist/gnulib/import/m4: rename.m4
> >
> > Log Message:
> > gdb/gnulib: ``guess yes'' to rename(2) checks for NetBSD
>
> Can't we just set gl_cv_func_rename_slash_dst_works in the environment
> when running configure.  I'm pretty sure we are already doing that
> somewhere to force some misdetected features, and that's in our
> makefiles, not in the imported code, so it's unlikely to get lost in a
> merge on new imports later.
>
> -uwe
>


CVS commit: src/external/gpl3/gdb/dist/gnulib

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:28:23 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gnulib: configure
src/external/gpl3/gdb/dist/gnulib/import/m4: rename.m4

Log Message:
gdb/gnulib: Revert rename(2) workaround for now


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gnulib/configure
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4

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



Re: CVS commit: src/external/gpl3/gdb/dist/gnulib

2023-08-19 Thread Valery Ushakov
On Sun, Aug 20, 2023 at 02:02:40 +, Rin Okuyama wrote:

> Modified Files:
>   src/external/gpl3/gdb/dist/gnulib: configure
>   src/external/gpl3/gdb/dist/gnulib/import/m4: rename.m4
> 
> Log Message:
> gdb/gnulib: ``guess yes'' to rename(2) checks for NetBSD

Can't we just set gl_cv_func_rename_slash_dst_works in the environment
when running configure.  I'm pretty sure we are already doing that
somewhere to force some misdetected features, and that's in our
makefiles, not in the imported code, so it's unlikely to get lost in a
merge on new imports later.

-uwe


CVS commit: src/share/mk

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:11:21 UTC 2023

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
bsd.own.mk: Put gdb back for m68000

However, unfortunately, it does not work even if MAXTSIZ is bumped.
It seems to be too large for 24-bit address space.

This is not a regression; gdb.old does not work also.


To generate a diff of this commit:
cvs rdiff -u -r1.1357 -r1.1358 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.



CVS commit: src/share/mk

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:11:21 UTC 2023

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
bsd.own.mk: Put gdb back for m68000

However, unfortunately, it does not work even if MAXTSIZ is bumped.
It seems to be too large for 24-bit address space.

This is not a regression; gdb.old does not work also.


To generate a diff of this commit:
cvs rdiff -u -r1.1357 -r1.1358 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.1357 src/share/mk/bsd.own.mk:1.1358
--- src/share/mk/bsd.own.mk:1.1357	Sat Aug 19 22:58:15 2023
+++ src/share/mk/bsd.own.mk	Sun Aug 20 02:11:21 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1357 2023/08/19 22:58:15 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1358 2023/08/20 02:11:21 rin Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -81,7 +81,6 @@ HAVE_GCC?=	10
 # Platforms that can't run a modern GCC natively
 .if ${MACHINE_ARCH} == "m68000"
 MKGCCCMDS?=	no
-MKGDB?=		no
 .endif
 
 #



CVS commit: src/external/gpl3/gdb/lib

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:08:46 UTC 2023

Modified Files:
src/external/gpl3/gdb/lib/libbfd/arch/m68000: bfd-in3.h bfd.h bfdver.h
config.h defs.mk targmatch.h
src/external/gpl3/gdb/lib/libctf/arch/m68000: config.h defs.mk
src/external/gpl3/gdb/lib/libdecnumber/arch/m68000: gstdint.h
src/external/gpl3/gdb/lib/libgdb/arch/m68000: config.h defs.mk init.c
jit-reader.h version.c xml-builtin.c
src/external/gpl3/gdb/lib/libgdbsupport/arch/m68000: defs.mk
src/external/gpl3/gdb/lib/libgdbsupport/arch/m68000/gdbsupport:
config.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68000: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import: alloca.h
ctype.h dirent.h fcntl.h fnmatch.h glob.h inttypes.h limits.h
locale.h math.h signal.h stdint.h stdio.h stdlib.h string.h time.h
unistd.h wchar.h wctype.h
src/external/gpl3/gdb/lib/libiberty/arch/m68000: defs.mk
src/external/gpl3/gdb/lib/libopcodes/arch/m68000: config.h
src/external/gpl3/gdb/lib/libreadline/arch/m68000: defs.mk
Added Files:
src/external/gpl3/gdb/lib/libbacktrace/arch/m68000:
backtrace-supported.h config.h defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import:
glob-libc.gl.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/malloc:
scratch_buffer.gl.h
src/external/gpl3/gdb/lib/libsframe/arch/m68000: defs.mk

Log Message:
gdb: mknative m68000


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gdb/lib/libbacktrace/arch/m68000/backtrace-supported.h \
src/external/gpl3/gdb/lib/libbacktrace/arch/m68000/config.h \
src/external/gpl3/gdb/lib/libbacktrace/arch/m68000/defs.mk
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gdb/lib/libbfd/arch/m68000/bfd-in3.h \
src/external/gpl3/gdb/lib/libbfd/arch/m68000/bfd.h \
src/external/gpl3/gdb/lib/libbfd/arch/m68000/bfdver.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gdb/lib/libbfd/arch/m68000/config.h
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/lib/libbfd/arch/m68000/defs.mk
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gdb/lib/libbfd/arch/m68000/targmatch.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libctf/arch/m68000/config.h \
src/external/gpl3/gdb/lib/libctf/arch/m68000/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gdb/lib/libdecnumber/arch/m68000/gstdint.h
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gdb/lib/libgdb/arch/m68000/config.h
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gdb/lib/libgdb/arch/m68000/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/m68000/init.c
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gdb/lib/libgdb/arch/m68000/jit-reader.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gdb/lib/libgdb/arch/m68000/version.c \
src/external/gpl3/gdb/lib/libgdb/arch/m68000/xml-builtin.c
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgdbsupport/arch/m68000/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgdbsupport/arch/m68000/gdbsupport/config.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/alloca.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/ctype.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/dirent.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/fcntl.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/fnmatch.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/glob.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/inttypes.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/limits.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/locale.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/math.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/signal.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/stdint.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/stdio.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/stdlib.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/string.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/time.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/wchar.h \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/wctype.h
cvs rdiff -u -r0 -r1.1 \

CVS commit: src/lib

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:07:54 UTC 2023

Modified Files:
src/lib: Makefile

Log Message:
lib/Makefile: Hook libgmp also for MKGDB=yes build

Now, gdb 13 can be built by clang, at least on amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/lib/Makefile

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



CVS commit: src/lib

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:07:54 UTC 2023

Modified Files:
src/lib: Makefile

Log Message:
lib/Makefile: Hook libgmp also for MKGDB=yes build

Now, gdb 13 can be built by clang, at least on amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/lib/Makefile

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

Modified files:

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.295 src/lib/Makefile:1.296
--- src/lib/Makefile:1.295	Sat Jun 17 15:47:31 2023
+++ src/lib/Makefile	Sun Aug 20 02:07:54 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.295 2023/06/17 15:47:31 christos Exp $
+#	$NetBSD: Makefile,v 1.296 2023/08/20 02:07:54 rin Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -100,12 +100,17 @@ SUBDIR+=	../external/gpl3/${EXTERNAL_GCC
 # specific build area, but we get better parallelism this way.
 # We don't build compat versions of these.
 . if !defined(MLIBDIR) && (${MKGCCCMDS} != "no")
-SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
 SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
 SUBDIR+=	../external/lgpl3/mpc/lib/libmpc
 . endif
 .endif
 
+# GCC and GDB >= 13 require GMP.
+.if !defined(MLIBDIR) && (${MKGCCCMDS} != "no" || \
+(${MKGDB} != "no" && ${HAVE_GDB:U0} >= 1320))
+SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
+.endif
+
 #
 # Libraries that depend upon any listed previously
 # (and those that depend upon these [and ...])



CVS commit: src/external/gpl3/gdb/lib/libgnulib/arch

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:04:21 UTC 2023

Modified Files:
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64eb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64eb/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/alpha: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/arm: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/arm/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/arm/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/armeb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/hppa: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/i386: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/i386/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/i386/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/ia64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/ia64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/ia64/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68k: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/m68k/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68k/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64eb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mips64eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64eb/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsel: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipsel/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsel/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64eb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64eb/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64el: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64el/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64el/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc64/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/riscv32: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/riscv32/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/riscv32/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/riscv64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/riscv64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/riscv64/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/sh3eb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/sh3eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/sh3eb/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/sh3el: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/sh3el/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/sh3el/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/sparc: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/sparc/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/sparc/gnulib/import: stdio.h

CVS commit: src/external/gpl3/gdb/lib/libgnulib/arch

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:04:21 UTC 2023

Modified Files:
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64eb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64eb/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/alpha: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/arm: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/arm/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/arm/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/armeb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/hppa: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/i386: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/i386/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/i386/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/ia64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/ia64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/ia64/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68k: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/m68k/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68k/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64eb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mips64eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64eb/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsel: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipsel/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsel/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64eb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64eb/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64el: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64el/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsn64el/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc64/gnulib/import:
stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/riscv32: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/riscv32/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/riscv32/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/riscv64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/riscv64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/riscv64/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/sh3eb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/sh3eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/sh3eb/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/sh3el: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/sh3el/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/sh3el/gnulib/import: stdio.h
src/external/gpl3/gdb/lib/libgnulib/arch/sparc: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/sparc/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/sparc/gnulib/import: stdio.h

CVS commit: src/external/gpl3/gdb/dist/gnulib

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:02:40 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gnulib: configure
src/external/gpl3/gdb/dist/gnulib/import/m4: rename.m4

Log Message:
gdb/gnulib: ``guess yes'' to rename(2) checks for NetBSD

Otherwise, rename(2) gets replaced by gnulib version for mknative
(i.e., cross compile), which results build failure for clang.

Confirmed that all rename(2) tests successfully passed at least on
amd64. Even if they will fail, it is our responsibility to fix them,
not gdb, anyway.

XXX
Edit configure by hand, rather than regen it, in order to avoid
subtle huge diffs from upstream, which come from autoconf version
mismatch.

XXX XXX
For gcc, replacement for rename(2) lost by cstdio, which forcibly
undefs all stdio functions. This should be an unintended behavior.

One of cstdio comes from our local change for c++locale.h, but
even if it is dropped, cstdio is included from elsewhere.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gnulib/configure
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4

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



CVS commit: src/external/gpl3/gdb/dist/gnulib

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:02:40 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gnulib: configure
src/external/gpl3/gdb/dist/gnulib/import/m4: rename.m4

Log Message:
gdb/gnulib: ``guess yes'' to rename(2) checks for NetBSD

Otherwise, rename(2) gets replaced by gnulib version for mknative
(i.e., cross compile), which results build failure for clang.

Confirmed that all rename(2) tests successfully passed at least on
amd64. Even if they will fail, it is our responsibility to fix them,
not gdb, anyway.

XXX
Edit configure by hand, rather than regen it, in order to avoid
subtle huge diffs from upstream, which come from autoconf version
mismatch.

XXX XXX
For gcc, replacement for rename(2) lost by cstdio, which forcibly
undefs all stdio functions. This should be an unintended behavior.

One of cstdio comes from our local change for c++locale.h, but
even if it is dropped, cstdio is included from elsewhere.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gnulib/configure
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4

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

Modified files:

Index: src/external/gpl3/gdb/dist/gnulib/configure
diff -u src/external/gpl3/gdb/dist/gnulib/configure:1.3 src/external/gpl3/gdb/dist/gnulib/configure:1.4
--- src/external/gpl3/gdb/dist/gnulib/configure:1.3	Mon Jul 31 17:00:53 2023
+++ src/external/gpl3/gdb/dist/gnulib/configure	Sun Aug 20 02:02:40 2023
@@ -31797,6 +31797,8 @@ else
  *-gnu*)  gl_cv_func_rename_slash_dst_works="guessing yes" ;;
   # Guess no on native Windows.
  mingw*)  gl_cv_func_rename_slash_dst_works="guessing no" ;;
+  # Guess yes on NetBSD systems.
+ netbsd*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
esac
@@ -31870,6 +31872,8 @@ else
  *-gnu*)  gl_cv_func_rename_slash_src_works="guessing yes" ;;
   # Guess yes on native Windows.
  mingw*)  gl_cv_func_rename_slash_src_works="guessing yes" ;;
+  # Guess yes on NetBSD systems.
+ netbsd*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
esac
@@ -31996,6 +32000,8 @@ fi
*-gnu*)  gl_cv_func_rename_link_works="guessing yes" ;;
 # Guess yes on native Windows.
mingw*)  gl_cv_func_rename_link_works="guessing yes" ;;
+# Guess yes on NetBSD systems.
+   netbsd*) gl_cv_func_rename_link_works="guessing yes" ;;
 # If we don't know, obey --enable-cross-guesses.
*)   gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
  esac
@@ -32033,6 +32039,8 @@ else
  *-gnu*)  gl_cv_func_rename_dest_works="guessing yes" ;;
   # Guess no on native Windows.
  mingw*)  gl_cv_func_rename_dest_works="guessing no" ;;
+  # Guess yes on NetBSD systems.
+ netbsd*) gl_cv_func_rename_dest_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
esac

Index: src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4
diff -u src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4:1.3 src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4:1.4
--- src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4:1.3	Mon Jul 31 17:00:53 2023
+++ src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4	Sun Aug 20 02:02:40 2023
@@ -61,6 +61,8 @@ AC_DEFUN([gl_FUNC_RENAME],
  *-gnu*)  gl_cv_func_rename_slash_dst_works="guessing yes" ;;
   # Guess no on native Windows.
  mingw*)  gl_cv_func_rename_slash_dst_works="guessing no" ;;
+  # Guess yes on NetBSD systems.
+ netbsd*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
   # If we don't know, obey --enable-cross-guesses.
  *)   gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
esac
@@ -117,6 +119,8 @@ AC_DEFUN([gl_FUNC_RENAME],
  *-gnu*)  gl_cv_func_rename_slash_src_works="guessing yes" ;;
   # Guess yes on native Windows.
  mingw*)  

CVS commit: src/share/mk

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 22:58:15 UTC 2023

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Add elfedit (needed to tag binaries as linux) from GSoC 2023 (Theodore Preduta)


To generate a diff of this commit:
cvs rdiff -u -r1.1356 -r1.1357 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.



CVS commit: src/share/mk

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 22:58:15 UTC 2023

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Add elfedit (needed to tag binaries as linux) from GSoC 2023 (Theodore Preduta)


To generate a diff of this commit:
cvs rdiff -u -r1.1356 -r1.1357 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.1356 src/share/mk/bsd.own.mk:1.1357
--- src/share/mk/bsd.own.mk:1.1356	Sun Aug 13 17:52:32 2023
+++ src/share/mk/bsd.own.mk	Sat Aug 19 18:58:15 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1356 2023/08/13 21:52:32 wiz Exp $
+#	$NetBSD: bsd.own.mk,v 1.1357 2023/08/19 22:58:15 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -327,6 +327,7 @@ _TOOL_PREFIX?=	nb
 .if defined(EXTERNAL_TOOLCHAIN)		# {
 AR=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
 AS=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
+ELFEDIT=	${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-elfedit
 LD=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
 NM=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
 OBJCOPY=	${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
@@ -352,6 +353,7 @@ TOOL_OBJC.clang=	${EXTERNAL_TOOLCHAIN}/b
 .if ${USETOOLS_BINUTILS:Uyes} == "yes"	#  {
 AR=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
 AS=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
+ELFEDIT=	${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-elfedit
 LD=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
 NM=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
 OBJCOPY=	${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy



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

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 22:57:09 UTC 2023

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add inotify tests


To generate a diff of this commit:
cvs rdiff -u -r1.1287 -r1.1288 src/distrib/sets/lists/tests/mi

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



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

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 22:57:09 UTC 2023

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add inotify tests


To generate a diff of this commit:
cvs rdiff -u -r1.1287 -r1.1288 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1287 src/distrib/sets/lists/tests/mi:1.1288
--- src/distrib/sets/lists/tests/mi:1.1287	Mon Aug  7 18:30:38 2023
+++ src/distrib/sets/lists/tests/mi	Sat Aug 19 18:57:09 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1287 2023/08/07 22:30:38 rillig Exp $
+# $NetBSD: mi,v 1.1288 2023/08/19 22:57:09 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1324,6 +1324,15 @@
 ./usr/tests/bin/tar/Atffiletests-bin-tests		compattestfile,atf
 ./usr/tests/bin/tar/Kyuafiletests-bin-tests		compattestfile,atf,kyua
 ./usr/tests/bin/tar/t_tartests-bin-tests		compattestfile,atf
+./usr/tests/compat	tests-compat-tests	compattestfile,atf
+./usr/tests/compat/Atffiletests-compat-tests	compattestfile,atf
+./usr/tests/compat/linuxtests-compat-tests	compattestfile,atf
+./usr/tests/compat/linux/Atffile			tests-compat-tests	compattestfile,atf
+./usr/tests/compat/linux/t_inotify			tests-compat-tests	compattestfile,atf
+./usr/tests/compat/linux/h_inotify_init			tests-compat-tests	compattestfile,atf
+./usr/tests/compat/linux/h_inotify_directory		tests-compat-tests	compattestfile,atf
+./usr/tests/compat/linux/h_inotify_single_file		tests-compat-tests	compattestfile,atf
+./usr/tests/compat/linux/h_inotify_watch_change		tests-compat-tests	compattestfile,atf
 ./usr/tests/crypto	tests-crypto-tests	compattestfile,atf
 ./usr/tests/crypto/Atffiletests-crypto-tests	compattestfile,atf
 ./usr/tests/crypto/Kyuafiletests-crypto-tests	compattestfile,atf,kyua



CVS commit: src/tests

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 22:56:44 UTC 2023

Modified Files:
src/tests: Makefile
Added Files:
src/tests/compat: Makefile
src/tests/compat/linux: Makefile h_common.sh h_inotify_directory.c
h_inotify_init.c h_inotify_single_file.c h_inotify_watch_change.c
h_linux.c h_linux.h h_not_supported.sh t_inotify.sh
src/tests/compat/linux/arch/x86_64: h_syscall.c

Log Message:
Tests for the compat_linux inotify framework from GSoC 2023 (Theodore Preduta)


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/compat/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/compat/linux/Makefile \
src/tests/compat/linux/h_common.sh \
src/tests/compat/linux/h_inotify_directory.c \
src/tests/compat/linux/h_inotify_init.c \
src/tests/compat/linux/h_inotify_single_file.c \
src/tests/compat/linux/h_inotify_watch_change.c \
src/tests/compat/linux/h_linux.c src/tests/compat/linux/h_linux.h \
src/tests/compat/linux/h_not_supported.sh \
src/tests/compat/linux/t_inotify.sh
cvs rdiff -u -r0 -r1.1 src/tests/compat/linux/arch/x86_64/h_syscall.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/Makefile
diff -u src/tests/Makefile:1.46 src/tests/Makefile:1.47
--- src/tests/Makefile:1.46	Sun May 21 11:28:42 2017
+++ src/tests/Makefile	Sat Aug 19 18:56:43 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2017/05/21 15:28:42 riastradh Exp $
+# $NetBSD: Makefile,v 1.47 2023/08/19 22:56:43 christos Exp $
 
 .include 
 
@@ -6,7 +6,7 @@
 
 TESTSDIR=	${TESTSBASE}
 
-TESTS_SUBDIRS=		bin dev games include kernel lib libexec net
+TESTS_SUBDIRS=		bin compat dev games include kernel lib libexec net
 TESTS_SUBDIRS+=		sbin sys usr.bin usr.sbin
 
 . if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE)

Added files:

Index: src/tests/compat/Makefile
diff -u /dev/null src/tests/compat/Makefile:1.1
--- /dev/null	Sat Aug 19 18:56:44 2023
+++ src/tests/compat/Makefile	Sat Aug 19 18:56:44 2023
@@ -0,0 +1,7 @@
+.include 
+
+TESTSDIR=		${TESTSBASE}/compat
+
+TESTS_SUBDIRS=		linux
+
+.include 

Index: src/tests/compat/linux/Makefile
diff -u /dev/null src/tests/compat/linux/Makefile:1.1
--- /dev/null	Sat Aug 19 18:56:44 2023
+++ src/tests/compat/linux/Makefile	Sat Aug 19 18:56:44 2023
@@ -0,0 +1,61 @@
+#	$NetBSD: Makefile,v 1.1 2023/08/19 22:56:44 christos Exp $
+
+.include 
+
+TESTSDIR=	${TESTSBASE}/compat/linux
+TESTS_SH=	t_inotify
+
+TC_PROGS=	h_inotify_init
+TC_PROGS+=	h_inotify_directory
+TC_PROGS+=	h_inotify_single_file
+TC_PROGS+=	h_inotify_watch_change
+
+.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
+
+LDFLAGS+=	-nostartfiles -static
+CFLAGS+=	-I${.CURDIR}/../../../sys
+CFLAGS+=	-I${.CURDIR}
+CFLAGS+=	-D_STANDALONE
+
+FILESDIR=	${TESTSDIR}
+
+.for _P in ${TESTS_SH}
+.if ${MACHINE_ARCH} == "x86_64"
+TESTS_SH_SRC_${_P}=	h_common.sh
+.else
+TESTS_SH_SRC_${_P}=	h_not_supported.sh
+.endif
+TESTS_SH_SRC_${_P}+=	${_P}.sh
+.endfor
+
+.for _P in ${TC_PROGS}
+CLEANFILES+=		${_P}
+FILES+=			${_P}
+
+.if ${MACHINE_ARCH} == "x86_64"
+PROGS+=			${_P}.out
+SRCS.${_P}.out=		${_P}.c
+SRCS.${_P}.out+=	h_linux.c
+SRCS.${_P}.out+=	h_syscall.c
+MAN.${_P}.out=		# empty
+FILESMODE_${_P}=	${BINMODE}
+
+proginstall-${_P}.out:
+	# Do not install
+
+${_P}: ${_P}.out
+	${_MKTARGET_CREATE}
+	cp ${.ALLSRC} ${.TARGET}
+	${ELFEDIT} --output-osabi Linux ${.TARGET}
+.else
+${_P}:
+	echo '' > ${.TARGET}
+.endif
+
+realall: ${_P}
+.endfor
+
+CLEANFILES+=	${TESTS_SH}
+CLEANFILES+=	Atffile
+
+.include 
Index: src/tests/compat/linux/h_common.sh
diff -u /dev/null src/tests/compat/linux/h_common.sh:1.1
--- /dev/null	Sat Aug 19 18:56:44 2023
+++ src/tests/compat/linux/h_common.sh	Sat Aug 19 18:56:44 2023
@@ -0,0 +1,34 @@
+# $NetBSD: h_common.sh,v 1.1 2023/08/19 22:56:44 christos Exp $
+#
+# Copyright (c) 2023 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Theodore Preduta.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 

CVS commit: src/tests

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 22:56:44 UTC 2023

Modified Files:
src/tests: Makefile
Added Files:
src/tests/compat: Makefile
src/tests/compat/linux: Makefile h_common.sh h_inotify_directory.c
h_inotify_init.c h_inotify_single_file.c h_inotify_watch_change.c
h_linux.c h_linux.h h_not_supported.sh t_inotify.sh
src/tests/compat/linux/arch/x86_64: h_syscall.c

Log Message:
Tests for the compat_linux inotify framework from GSoC 2023 (Theodore Preduta)


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/compat/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/compat/linux/Makefile \
src/tests/compat/linux/h_common.sh \
src/tests/compat/linux/h_inotify_directory.c \
src/tests/compat/linux/h_inotify_init.c \
src/tests/compat/linux/h_inotify_single_file.c \
src/tests/compat/linux/h_inotify_watch_change.c \
src/tests/compat/linux/h_linux.c src/tests/compat/linux/h_linux.h \
src/tests/compat/linux/h_not_supported.sh \
src/tests/compat/linux/t_inotify.sh
cvs rdiff -u -r0 -r1.1 src/tests/compat/linux/arch/x86_64/h_syscall.c

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



CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 19:59:17 UTC 2023

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: only work around wrong strftime if actually necessary

The workaround is only needed if the time format contains '%s', in all
other cases there is no need to preserve, set and restore the TZ
environment variable.  Suggested by sjg@.

Only check for 's' in the format string, not for '%s', to allow for
optional modifiers of the conversion specifier.


To generate a diff of this commit:
cvs rdiff -u -r1.1063 -r1.1064 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1063 src/usr.bin/make/var.c:1.1064
--- src/usr.bin/make/var.c:1.1063	Sat Aug 19 11:53:10 2023
+++ src/usr.bin/make/var.c	Sat Aug 19 19:59:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1063 2023/08/19 11:53:10 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1064 2023/08/19 19:59:17 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1063 2023/08/19 11:53:10 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1064 2023/08/19 19:59:17 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1886,8 +1886,8 @@ FormatTime(const char *fmt, time_t t, bo
 		time();
 	if (*fmt == '\0')
 		fmt = "%c";
-	if (gmt) {
-		/* strftime only works with localtime, not with gmtime. */
+	if (gmt && strchr(fmt, 's') != NULL) {
+		/* strftime "%s" only works with localtime, not with gmtime. */
 		const char *prev_tz_env = getenv("TZ");
 		char *prev_tz = prev_tz_env != NULL
 		? bmake_strdup(prev_tz_env) : NULL;
@@ -1899,7 +1899,7 @@ FormatTime(const char *fmt, time_t t, bo
 		} else
 			unsetenv("TZ");
 	} else
-		strftime(buf, sizeof buf, fmt, localtime());
+		strftime(buf, sizeof buf, fmt, (gmt ? gmtime : localtime)());
 
 	buf[sizeof buf - 1] = '\0';
 	return bmake_strdup(buf);



CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 19:59:17 UTC 2023

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: only work around wrong strftime if actually necessary

The workaround is only needed if the time format contains '%s', in all
other cases there is no need to preserve, set and restore the TZ
environment variable.  Suggested by sjg@.

Only check for 's' in the format string, not for '%s', to allow for
optional modifiers of the conversion specifier.


To generate a diff of this commit:
cvs rdiff -u -r1.1063 -r1.1064 src/usr.bin/make/var.c

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



CVS commit: src/sys/dev/dec

2023-08-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Aug 19 19:21:34 UTC 2023

Modified Files:
src/sys/dev/dec: files.dec

Log Message:
remove likely accidental part of the comment.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/dec/files.dec

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/dec/files.dec
diff -u src/sys/dev/dec/files.dec:1.9 src/sys/dev/dec/files.dec:1.10
--- src/sys/dev/dec/files.dec:1.9	Fri Dec 27 09:47:55 2019
+++ src/sys/dev/dec/files.dec	Sat Aug 19 19:21:34 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: files.dec,v 1.9 2019/12/27 09:47:55 msaitoh Exp $
+#	$NetBSD: files.dec,v 1.10 2023/08/19 19:21:34 andvar Exp $
 #
 # Config file and device description for  machine-independent
 # code for devices for Digital Equipment Corp. systems.
@@ -8,7 +8,7 @@
 # which need it should specify the le_dec_subr attribute.
 define	le_dec_subr
 
-#  DMA copy functions.  Lance attachments qhich Decices
+#  DMA copy functions.
 file	dev/dec/if_le_dec.c		le_dec_subr
 
 #  LK201 keyboard



CVS commit: src/sys/dev/dec

2023-08-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Aug 19 19:21:34 UTC 2023

Modified Files:
src/sys/dev/dec: files.dec

Log Message:
remove likely accidental part of the comment.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/dec/files.dec

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



CVS commit: src/sys/compat/linux/common

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 17:57:55 UTC 2023

Modified Files:
src/sys/compat/linux/common: linux_fcntl.h linux_mod.c
Added Files:
src/sys/compat/linux/common: linux_inotify.c linux_inotify.h

Log Message:
new inotify support GSoC 2023 (Theodore Preduta)


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/compat/linux/common/linux_fcntl.h
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/common/linux_inotify.c \
src/sys/compat/linux/common/linux_inotify.h
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/linux/common/linux_mod.c

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



CVS commit: src/sys/compat/linux/common

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 17:57:55 UTC 2023

Modified Files:
src/sys/compat/linux/common: linux_fcntl.h linux_mod.c
Added Files:
src/sys/compat/linux/common: linux_inotify.c linux_inotify.h

Log Message:
new inotify support GSoC 2023 (Theodore Preduta)


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/compat/linux/common/linux_fcntl.h
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/common/linux_inotify.c \
src/sys/compat/linux/common/linux_inotify.h
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/linux/common/linux_mod.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/compat/linux/common/linux_fcntl.h
diff -u src/sys/compat/linux/common/linux_fcntl.h:1.21 src/sys/compat/linux/common/linux_fcntl.h:1.22
--- src/sys/compat/linux/common/linux_fcntl.h:1.21	Sun Jul  9 22:31:55 2023
+++ src/sys/compat/linux/common/linux_fcntl.h	Sat Aug 19 13:57:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_fcntl.h,v 1.21 2023/07/10 02:31:55 christos Exp $	*/
+/*	$NetBSD: linux_fcntl.h,v 1.22 2023/08/19 17:57:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -32,6 +32,11 @@
 #ifndef _LINUX_FCNTL_H
 #define _LINUX_FCNTL_H
 
+#ifdef _KERNEL
+#include  /* For linux_off_t */
+struct stat;
+#endif
+
 /*
  * The arguments in the flock structure have a different order from the
  * BSD structure.
@@ -50,6 +55,7 @@
 #define LINUX_AT_NO_AUTOMOUNT		0x0800
 #define LINUX_AT_EMPTY_PATH		0x1000
 
+#ifdef _KERNEL
 int linux_to_bsd_ioflags(int);
 int linux_to_bsd_atflags(int);
 int bsd_to_linux_statx(struct stat *, struct linux_statx *, unsigned int);
@@ -70,6 +76,7 @@ struct linux_flock64 {
 	off_t	l_len;
 	linux_pid_t l_pid;
 };
+#endif /* _KERNEL */
 
 #if defined(__i386__)
 #include 
@@ -103,6 +110,7 @@ struct linux_flock64 {
 #define	LINUX_F_ADD_SEALS	(LINUX_F_SPECIFIC_BASE + 9)
 #define	LINUX_F_GET_SEALS	(LINUX_F_SPECIFIC_BASE + 10)
 
+#ifdef _KERNEL
 /*
  * We have to have 4 copies of the code that converts linux fcntl() file
  * locking to native form because there are 4 layouts for the structures.
@@ -171,6 +179,6 @@ LINUX##_to_bsd_##FLOCK(struct flock *bfp
 	LINUX##_to_bsd_##FLOCK(, ); \
 	return do_fcntl_lock(fd, cmd == setlk ? F_SETLK : F_SETLKW, ); \
 } while (0)
-
+#endif /* _KERNEL */
 
 #endif /* !_LINUX_FCNTL_H */

Index: src/sys/compat/linux/common/linux_mod.c
diff -u src/sys/compat/linux/common/linux_mod.c:1.14 src/sys/compat/linux/common/linux_mod.c:1.15
--- src/sys/compat/linux/common/linux_mod.c:1.14	Sun Apr 26 14:53:33 2020
+++ src/sys/compat/linux/common/linux_mod.c	Sat Aug 19 13:57:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mod.c,v 1.14 2020/04/26 18:53:33 thorpej Exp $	*/
+/*	$NetBSD: linux_mod.c,v 1.15 2023/08/19 17:57:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.14 2020/04/26 18:53:33 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.15 2023/08/19 17:57:54 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mod.c,
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -162,7 +163,12 @@ compat_linux_modcmd(modcmd_t cmd, void *
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+		error = linux_inotify_init();
+		if (error != 0)
+			return error;
 		error = exec_add(linux_execsw, __arraycount(linux_execsw));
+		if (error)
+			linux_inotify_fini();
 		return error;
 
 	case MODULE_CMD_FINI:
@@ -170,6 +176,7 @@ compat_linux_modcmd(modcmd_t cmd, void *
 		if (error)
 			return error;
 		linux_sysctl_fini();
+		linux_inotify_fini();
 		return 0;
 
 	default:

Added files:

Index: src/sys/compat/linux/common/linux_inotify.c
diff -u /dev/null src/sys/compat/linux/common/linux_inotify.c:1.1
--- /dev/null	Sat Aug 19 13:57:55 2023
+++ src/sys/compat/linux/common/linux_inotify.c	Sat Aug 19 13:57:54 2023
@@ -0,0 +1,1317 @@
+/*	$NetBSD: linux_inotify.c,v 1.1 2023/08/19 17:57:54 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2023 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Theodore Preduta.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 

CVS commit: src/share/man/man4

2023-08-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Aug 19 17:55:42 UTC 2023

Modified Files:
src/share/man/man4: atw.4

Log Message:
s/devicdes/devices/.

The question if those links should stay at all in see also section
(some irrelevant today).


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/atw.4

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

Modified files:

Index: src/share/man/man4/atw.4
diff -u src/share/man/man4/atw.4:1.12 src/share/man/man4/atw.4:1.13
--- src/share/man/man4/atw.4:1.12	Fri Jan 15 19:24:49 2010
+++ src/share/man/man4/atw.4	Sat Aug 19 17:55:42 2023
@@ -1,4 +1,4 @@
-.\" $NetBSD: atw.4,v 1.12 2010/01/15 19:24:49 joerg Exp $
+.\" $NetBSD: atw.4,v 1.13 2023/08/19 17:55:42 andvar Exp $
 .\"
 .\" Copyright (c) 2003
 .\"	David Young . All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\"	$Id: atw.4,v 1.12 2010/01/15 19:24:49 joerg Exp $
+.\"	$Id: atw.4,v 1.13 2023/08/19 17:55:42 andvar Exp $
 .\"
 .Dd June 5, 2004
 .Dt ATW 4
@@ -138,7 +138,7 @@ command.
 .%U http://www.silabs.com
 .Re
 .Rs
-.%T RF Microdevicdes
+.%T RF Microdevices
 .%U http://www.rfmd.com
 .Re
 .Sh HISTORY



CVS commit: src/share/man/man4

2023-08-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Aug 19 17:55:42 UTC 2023

Modified Files:
src/share/man/man4: atw.4

Log Message:
s/devicdes/devices/.

The question if those links should stay at all in see also section
(some irrelevant today).


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/atw.4

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



CVS commit: src/sys/compat/linux/arch

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 17:50:25 UTC 2023

Modified Files:
src/sys/compat/linux/arch/aarch64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/linux/arch/aarch64/linux_syscall.h \
src/sys/compat/linux/arch/aarch64/linux_syscallargs.h \
src/sys/compat/linux/arch/aarch64/linux_syscalls.c \
src/sys/compat/linux/arch/aarch64/linux_sysent.c \
src/sys/compat/linux/arch/aarch64/linux_systrace_args.c
cvs rdiff -u -r1.118 -r1.119 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.117 -r1.118 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.119 -r1.120 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.80 -r1.81 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.24 -r1.25 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.24 -r1.25 \
src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.125 -r1.126 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.126 -r1.127 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.20 -r1.21 \
src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.116 -r1.117 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.115 -r1.116 \
src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.94 -r1.95 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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/compat/linux/arch/aarch64/linux_syscall.h
diff -u src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.9 src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.10
--- src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.9	Fri Aug 18 15:42:05 2023
+++ src/sys/compat/linux/arch/aarch64/linux_syscall.h	Sat Aug 19 13:50:24 2023
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.9 2023/08/18 19:42:05 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.10 2023/08/19 17:50:24 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.10 2023/08/18 19:41:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.11 2023/08/19 17:49:49 christos Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -72,6 +72,15 @@
 /* syscall: "fcntl" ret: "int" args: "int" "int" "void *" */
 #define	LINUX_SYS_fcntl	25
 
+/* syscall: "inotify_init1" ret: "int" args: "int" */
+#define	LINUX_SYS_inotify_init1	26
+
+/* syscall: "inotify_add_watch" ret: "int" args: "int" "const char *" "uint32_t" */
+#define	LINUX_SYS_inotify_add_watch	27
+
+/* syscall: "inotify_rm_watch" ret: "int" args: "int" "int" */
+#define	LINUX_SYS_inotify_rm_watch	28
+
 /* syscall: "ioctl" 

CVS commit: src/sys/compat/linux/arch

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 17:50:25 UTC 2023

Modified Files:
src/sys/compat/linux/arch/aarch64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/linux/arch/aarch64/linux_syscall.h \
src/sys/compat/linux/arch/aarch64/linux_syscallargs.h \
src/sys/compat/linux/arch/aarch64/linux_syscalls.c \
src/sys/compat/linux/arch/aarch64/linux_sysent.c \
src/sys/compat/linux/arch/aarch64/linux_systrace_args.c
cvs rdiff -u -r1.118 -r1.119 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.117 -r1.118 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.119 -r1.120 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.80 -r1.81 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.24 -r1.25 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.24 -r1.25 \
src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.125 -r1.126 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.126 -r1.127 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.20 -r1.21 \
src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.116 -r1.117 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.115 -r1.116 \
src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.94 -r1.95 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.c

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



CVS commit: src/sys/compat/linux/arch

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 17:49:50 UTC 2023

Modified Files:
src/sys/compat/linux/arch/aarch64: syscalls.master
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master

Log Message:
Add inotify* syscalls GSoC 2023 (Theodore Preduta)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/compat/linux/arch/aarch64/syscalls.master
cvs rdiff -u -r1.105 -r1.106 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.71 -r1.72 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.78 -r1.79 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.133 -r1.134 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.103 -r1.104 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.78 -r1.79 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.83 -r1.84 src/sys/compat/linux/arch/powerpc/syscalls.master

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

Modified files:

Index: src/sys/compat/linux/arch/aarch64/syscalls.master
diff -u src/sys/compat/linux/arch/aarch64/syscalls.master:1.10 src/sys/compat/linux/arch/aarch64/syscalls.master:1.11
--- src/sys/compat/linux/arch/aarch64/syscalls.master:1.10	Fri Aug 18 15:41:19 2023
+++ src/sys/compat/linux/arch/aarch64/syscalls.master	Sat Aug 19 13:49:49 2023
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.10 2023/08/18 19:41:19 christos Exp $
+	$NetBSD: syscalls.master,v 1.11 2023/08/19 17:49:49 christos Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -106,9 +106,10 @@
 23	NOARGS		{ int|sys||dup(int fd); }
 24	STD		{ int|linux_sys||dup3(int from, int to, int flags); }
 25	STD		{ int|linux_sys||fcntl(int fd, int cmd, void *arg); }
-26	UNIMPL		inotify_init1
-27	UNIMPL		inotify_add_watch
-28	UNIMPL		inotify_rm_watch
+26	STD		{ int|linux_sys||inotify_init1(int flags); }
+27	STD	{ int|linux_sys||inotify_add_watch(int fd, \
+			const char *pathname, uint32_t mask); }
+28	STD		{ int|linux_sys||inotify_rm_watch(int fd, int wd); }
 29	STD		{ int|linux_sys||ioctl(int fd, u_long com, \
 			void *data); }
 30	UNIMPL		ioprio_set
@@ -216,7 +217,7 @@
 92	STD		{ int|linux_sys||personality(unsigned long per); }
 93	STD		{ int|linux_sys||exit(int rval); }
 94	STD		{ int|linux_sys||exit_group(int error_code); }
-95  STD		{ int|linux_sys||waitid(int idtype, id_t id, \
+95	STD		{ int|linux_sys||waitid(int idtype, id_t id, \
 			linux_siginfo_t *infop, int options, \
 			struct rusage50 *rusage); }
 96	STD		{ int|linux_sys||set_tid_address(int *tid); }

Index: src/sys/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.105 src/sys/compat/linux/arch/alpha/syscalls.master:1.106
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.105	Fri Aug 18 15:41:19 2023
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Sat Aug 19 13:49:49 2023
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.105 2023/08/18 19:41:19 christos Exp $
+	$NetBSD: syscalls.master,v 1.106 2023/08/19 17:49:49 christos Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -703,7 +703,7 @@
 435	UNIMPL		mq_timedreceive
 436	UNIMPL		mq_notify
 437	UNIMPL		mq_getsetattr
-438 STD		{ int|linux_sys||waitid(int idtype, id_t id, \
+438	STD		{ int|linux_sys||waitid(int idtype, id_t id, \
 			linux_siginfo_t *infop, int options, \
 			struct rusage50 *rusage); }
 439	UNIMPL		add_key
@@ -711,9 +711,10 @@
 441	UNIMPL		keyctl
 442	UNIMPL		ioprio_set
 443	UNIMPL		ioprio_get
-444	UNIMPL		inotify_init
-445	UNIMPL		inotify_add_watch
-446	UNIMPL		inotify_rm_watch
+444	STD		{ int|linux_sys||inotify_init(void); }
+445	STD		{ int|linux_sys||inotify_add_watch(int fd, \
+			const char *pathname, uint32_t mask); }
+446	STD		{ int|linux_sys||inotify_rm_watch(int fd, int wd); }
 447	UNIMPL		fdatasync
 448	UNIMPL		kexec_load
 449	UNIMPL		migrate_pages
@@ -791,7 +792,7 @@
 486	STD		{ int|linux_sys||epoll_create1(int flags); }
 487	STD		{ int|linux_sys||dup3(int from, int to, int flags); }
 488	STD		{ int|linux_sys||pipe2(int *pfds, int flags); }
-489	UNIMPL		inotify_init1
+489	STD		{ int|linux_sys||inotify_init1(int flags); }
 490	STD		{ int|linux_sys||preadv(int fd, \
 			const struct iovec *iovp, int iovcnt, \
 			unsigned long off_lo, unsigned long off_hi); }
@@ -833,7 +834,7 @@
 519	UNIMPL
 520	UNIMPL
 521	UNIMPL
-522 STD		{ int|linux_sys||statx(int fd, const char *path, \
+522	STD		{ int|linux_sys||statx(int fd, const char *path, \
 			int flag, unsigned int mask, \
 			struct linux_statx *sp); }
 523	UNIMPL

Index: 

CVS commit: src/sys/compat/linux/arch

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 17:49:50 UTC 2023

Modified Files:
src/sys/compat/linux/arch/aarch64: syscalls.master
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master

Log Message:
Add inotify* syscalls GSoC 2023 (Theodore Preduta)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/compat/linux/arch/aarch64/syscalls.master
cvs rdiff -u -r1.105 -r1.106 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.71 -r1.72 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.78 -r1.79 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.133 -r1.134 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.103 -r1.104 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.78 -r1.79 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.83 -r1.84 src/sys/compat/linux/arch/powerpc/syscalls.master

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



CVS commit: src/sys

2023-08-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Aug 19 17:32:02 UTC 2023

Modified Files:
src/sys/arch/hp300/dev: mtreg.h
src/sys/dev/gpib: mtreg.h

Log Message:
fix typos in documented error codes.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp300/dev/mtreg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/gpib/mtreg.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/hp300/dev/mtreg.h
diff -u src/sys/arch/hp300/dev/mtreg.h:1.8 src/sys/arch/hp300/dev/mtreg.h:1.9
--- src/sys/arch/hp300/dev/mtreg.h:1.8	Sat Nov 26 00:25:36 2022
+++ src/sys/arch/hp300/dev/mtreg.h	Sat Aug 19 17:32:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mtreg.h,v 1.8 2022/11/26 00:25:36 tsutsui Exp $	*/
+/*	$NetBSD: mtreg.h,v 1.9 2023/08/19 17:32:02 andvar Exp $	*/
 
 /*
  * Copyright (c) 1992, The University of Utah and
@@ -249,7 +249,7 @@ struct	mt_stat {
  *	110	Formatter <--> data buffer byte count mismatch
  * (CONTROLLER ERROR) - these are ALL internal to drive
  *	121	Transaction ID mismatch (device vs. controller)
- *	122	Devoce report has no coorepinding command
+ *	122	Device report has no corresponding command
  *	123	Invalid device report
  *	124	Repost queue overflow
  *	125	Unknown command from device
@@ -261,7 +261,7 @@ struct	mt_stat {
  *	132	Bad message type from device
  *	133	Abort between HPIB interface and channel program
  *	134	Unknown HPIB interface exception
- *	137	Illegal access to servo conntroller registers
+ *	137	Illegal access to servo controller registers
  *	138	Device program firmware error
  *	139	Hardware utilities firmware error
  *	140	Channel program firmware error

Index: src/sys/dev/gpib/mtreg.h
diff -u src/sys/dev/gpib/mtreg.h:1.6 src/sys/dev/gpib/mtreg.h:1.7
--- src/sys/dev/gpib/mtreg.h:1.6	Sun Dec  5 02:25:29 2021
+++ src/sys/dev/gpib/mtreg.h	Sat Aug 19 17:32:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mtreg.h,v 1.6 2021/12/05 02:25:29 msaitoh Exp $	*/
+/*	$NetBSD: mtreg.h,v 1.7 2023/08/19 17:32:02 andvar Exp $	*/
 
 /*
  * Copyright (c) 1992, The University of Utah and
@@ -250,7 +250,7 @@ struct	mt_stat {
  *	110	Formatter <--> data buffer byte count mismatch
  * (CONTROLLER ERROR) - these are ALL internal to drive
  *	121	Transaction ID mismatch (device vs. controller)
- *	122	Devoce report has no coorepinding command
+ *	122	Device report has no corresponding command
  *	123	Invalid device report
  *	124	Repost queue overflow
  *	125	Unknown command from device
@@ -262,7 +262,7 @@ struct	mt_stat {
  *	132	Bad message type from device
  *	133	Abort between HPIB interface and channel program
  *	134	Unknown HPIB interface exception
- *	137	Illegal access to servo conntroller registers
+ *	137	Illegal access to servo controller registers
  *	138	Device program firmware error
  *	139	Hardware utilities firmware error
  *	140	Channel program firmware error



CVS commit: src/sys

2023-08-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Aug 19 17:32:02 UTC 2023

Modified Files:
src/sys/arch/hp300/dev: mtreg.h
src/sys/dev/gpib: mtreg.h

Log Message:
fix typos in documented error codes.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp300/dev/mtreg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/gpib/mtreg.h

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



CVS commit: src/dist/pf/sbin/pflogd

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 14:56:23 UTC 2023

Modified Files:
src/dist/pf/sbin/pflogd: pflogd.c

Log Message:
Don't write random data to the header.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/dist/pf/sbin/pflogd/pflogd.c

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



CVS commit: src/dist/pf/sbin/pflogd

2023-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 19 14:56:23 UTC 2023

Modified Files:
src/dist/pf/sbin/pflogd: pflogd.c

Log Message:
Don't write random data to the header.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/dist/pf/sbin/pflogd/pflogd.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/pflogd/pflogd.c
diff -u src/dist/pf/sbin/pflogd/pflogd.c:1.11 src/dist/pf/sbin/pflogd/pflogd.c:1.12
--- src/dist/pf/sbin/pflogd/pflogd.c:1.11	Sat Aug 19 01:57:34 2023
+++ src/dist/pf/sbin/pflogd/pflogd.c	Sat Aug 19 10:56:22 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pflogd.c,v 1.11 2023/08/19 05:57:34 rjs Exp $	*/
+/*	$NetBSD: pflogd.c,v 1.12 2023/08/19 14:56:22 christos Exp $	*/
 /*	$OpenBSD: pflogd.c,v 1.45 2007/06/06 14:11:26 henning Exp $	*/
 
 /*
@@ -349,8 +349,9 @@ try_reset_dump(int nomove)
 		hdr.magic = TCPDUMP_MAGIC;
 		hdr.version_major = PCAP_VERSION_MAJOR;
 		hdr.version_minor = PCAP_VERSION_MINOR;
-		hdr.snaplen = hpcap->snapshot;
+		hdr.thiszone = 0;
 		hdr.sigfigs = 0;
+		hdr.snaplen = hpcap->snapshot;
 		hdr.linktype = hpcap->linktype;
 
 		if (fwrite((char *), sizeof(hdr), 1, fp) != 1) {



CVS commit: src/distrib/sets/lists

2023-08-19 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Sat Aug 19 14:22:41 UTC 2023

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

Log Message:
More libpcap changes.

There were two entries for /usr/lib/libpcap.so.


To generate a diff of this commit:
cvs rdiff -u -r1.962 -r1.963 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.322 -r1.323 src/distrib/sets/lists/debug/shl.mi

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



CVS commit: src/distrib/sets/lists

2023-08-19 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Sat Aug 19 14:22:41 UTC 2023

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

Log Message:
More libpcap changes.

There were two entries for /usr/lib/libpcap.so.


To generate a diff of this commit:
cvs rdiff -u -r1.962 -r1.963 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.322 -r1.323 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.962 src/distrib/sets/lists/base/shl.mi:1.963
--- src/distrib/sets/lists/base/shl.mi:1.962	Thu Aug 17 15:23:33 2023
+++ src/distrib/sets/lists/base/shl.mi	Sat Aug 19 14:22:41 2023
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.962 2023/08/17 15:23:33 christos Exp $
+# $NetBSD: shl.mi,v 1.963 2023/08/19 14:22:41 rjs Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -517,8 +517,8 @@
 ./usr/lib/libpanel.so.3base-sys-shlib		compatfile
 ./usr/lib/libpanel.so.3.0			base-sys-shlib		compatfile
 ./usr/lib/libpcap.sobase-net-shlib		compatfile
-./usr/lib/libpcap.so.8base-obsolete		obsolete
-./usr/lib/libpcap.sobase-obsolete		obsolete
+./usr/lib/libpcap.so.8base-obsolete		obsolete,compatfile
+./usr/lib/libpcap.so.8.1			base-obsolete		obsolete,compatfile
 ./usr/lib/libpcap.so.9base-net-shlib		compatfile
 ./usr/lib/libpcap.so.9.0			base-net-shlib		compatfile
 ./usr/lib/libpci.sobase-sys-shlib		compatfile

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.322 src/distrib/sets/lists/debug/shl.mi:1.323
--- src/distrib/sets/lists/debug/shl.mi:1.322	Thu Aug 17 15:23:33 2023
+++ src/distrib/sets/lists/debug/shl.mi	Sat Aug 19 14:22:41 2023
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.322 2023/08/17 15:23:33 christos Exp $
+# $NetBSD: shl.mi,v 1.323 2023/08/19 14:22:41 rjs 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
@@ -198,7 +198,7 @@
 ./usr/libdata/debug/usr/lib/libpanel.so.1.0.debug		comp-sys-debug	debug,obsolete,compatfile
 ./usr/libdata/debug/usr/lib/libpanel.so.2.0.debug		comp-sys-debug	debug,obsolete,compatfile
 ./usr/libdata/debug/usr/lib/libpanel.so.3.0.debug		comp-sys-debug	debug,compatfile
-./usr/libdata/debug/usr/lib/libpcap.so.8.1.debug		comp-obsolete	obsolete
+./usr/libdata/debug/usr/lib/libpcap.so.8.1.debug		comp-obsolete	obsolete,compatfile
 ./usr/libdata/debug/usr/lib/libpcap.so.9.0.debug		comp-net-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libpci.so.2.2.debug			comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libperfuse.so.0.0.debug		comp-perfuse-debug	debug,compatfile



CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 11:53:10 UTC 2023

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-gmtime.mk

Log Message:
make: clean up comments regarding gmtime/strftime

These two functions are not supposed to be used together, thus it is not
a bug if combining them produces unexpected results.


To generate a diff of this commit:
cvs rdiff -u -r1.1062 -r1.1063 src/usr.bin/make/var.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/varmod-gmtime.mk

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1062 src/usr.bin/make/var.c:1.1063
--- src/usr.bin/make/var.c:1.1062	Sat Aug 19 11:13:35 2023
+++ src/usr.bin/make/var.c	Sat Aug 19 11:53:10 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1062 2023/08/19 11:13:35 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1063 2023/08/19 11:53:10 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1062 2023/08/19 11:13:35 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1063 2023/08/19 11:53:10 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1887,11 +1887,7 @@ FormatTime(const char *fmt, time_t t, bo
 	if (*fmt == '\0')
 		fmt = "%c";
 	if (gmt) {
-		/*
-		 * Work around a buggy 'strftime' implementation on at least
-		 * NetBSD 10 and Linux/glibc-2.31, on which the value of '%s'
-		 * depends on the timezone from TZ; see varmod-gmtime.mk.
-		 */
+		/* strftime only works with localtime, not with gmtime. */
 		const char *prev_tz_env = getenv("TZ");
 		char *prev_tz = prev_tz_env != NULL
 		? bmake_strdup(prev_tz_env) : NULL;

Index: src/usr.bin/make/unit-tests/varmod-gmtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.18 src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.19
--- src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.18	Sat Aug 19 11:13:36 2023
+++ src/usr.bin/make/unit-tests/varmod-gmtime.mk	Sat Aug 19 11:53:10 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-gmtime.mk,v 1.18 2023/08/19 11:13:36 rillig Exp $
+# $NetBSD: varmod-gmtime.mk,v 1.19 2023/08/19 11:53:10 rillig Exp $
 #
 # Tests for the :gmtime variable modifier, which formats a timestamp
 # using strftime(3) in UTC.
@@ -147,53 +147,7 @@
 
 
 # Before var.c 1.1062 from 2023-08-19, ':gmtime' but not ':localtime' reported
-# wrong values for '%s', depending on the operating system and the timezone,
-# as demonstrated by the following test program:
-#
-#	for mod in gmtime localtime; do
-#		for tz in UTC Europe/Berlin America/Los_Angeles; do
-#			TZ=$tz ./make -r -f /dev/null -v "\${%F %T %z %s $mod $tz:L:$mod}"
-#		done
-#	done
-#
-# Cygwin:
-# 2023-08-19 07:34:06 + 1692430446 gmtime UTC
-# 2023-08-19 07:34:06 + 1692430446 gmtime Europe/Berlin
-# 2023-08-19 07:34:06 + 1692430446 gmtime America/Los_Angeles
-# 2023-08-19 07:34:06 + 1692430446 localtime UTC
-# 2023-08-19 09:34:07 +0200 1692430447 localtime Europe/Berlin
-# 2023-08-19 00:34:07 -0700 1692430447 localtime America/Los_Angeles
-#
-# Looks good:
-#	* ':gmtime' consistently reports timezone offset '+'.
-#	* '%s' is independent of the timezone.
-#
-# NetBSD 10.99:
-# 2023-08-19 07:34:37 + 1692430477 gmtime UTC
-# 2023-08-19 07:34:37 +0100 1692426877 gmtime Europe/Berlin
-# 2023-08-19 07:34:37 -0800 1692459277 gmtime America/Los_Angeles
-# 2023-08-19 07:34:37 + 1692430477 localtime UTC
-# 2023-08-19 09:34:37 +0200 1692430477 localtime Europe/Berlin
-# 2023-08-19 00:34:37 -0700 1692430477 localtime America/Los_Angeles
-#
-# Looks bad:
-#	* ':gmtime' reports different timezone offsets.
-#	* ':gmtime' reports different seconds since the Epoch.
-#	* ':gmtime' reports the timezone offset '+0100' for Europe/Berlin,
-#	  even though at 2023-08-19, DST with offset '+0200' was in place.
-#
-# Debian:
-# 2023-08-19 07:29:10 + 1692430150 gmtime UTC
-# 2023-08-19 07:29:10 + 1692426550 gmtime Europe/Berlin
-# 2023-08-19 07:29:10 + 1692458950 gmtime America/Los_Angeles
-# 2023-08-19 07:29:10 + 1692430150 localtime UTC
-# 2023-08-19 09:29:10 +0200 1692430150 localtime Europe/Berlin
-# 2023-08-19 00:29:10 -0700 1692430150 localtime America/Los_Angeles
-#
-# Looks mixed:
-#	* ':gmtime' reports the correct timezone offset '+'.
-#	* ':gmtime' reports different seconds since the Epoch, and the '%s'
-#	  value cannot be derived from the '%F %T %z' values.
+# wrong values for '%s', depending on the operating system and the timezone.
 export TZ=UTC
 .for t in ${%s:L:gmtime} ${%s:L:localtime}
 TIMESTAMPS+= $t



CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 11:53:10 UTC 2023

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-gmtime.mk

Log Message:
make: clean up comments regarding gmtime/strftime

These two functions are not supposed to be used together, thus it is not
a bug if combining them produces unexpected results.


To generate a diff of this commit:
cvs rdiff -u -r1.1062 -r1.1063 src/usr.bin/make/var.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/varmod-gmtime.mk

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



CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 11:13:36 UTC 2023

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-gmtime.mk

Log Message:
make: work around bugs in gmtime on several platforms


To generate a diff of this commit:
cvs rdiff -u -r1.1061 -r1.1062 src/usr.bin/make/var.c
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-gmtime.mk

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1061 src/usr.bin/make/var.c:1.1062
--- src/usr.bin/make/var.c:1.1061	Thu Aug 17 19:06:51 2023
+++ src/usr.bin/make/var.c	Sat Aug 19 11:13:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1061 2023/08/17 19:06:51 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1062 2023/08/19 11:13:35 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1061 2023/08/17 19:06:51 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1062 2023/08/19 11:13:35 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1886,7 +1886,24 @@ FormatTime(const char *fmt, time_t t, bo
 		time();
 	if (*fmt == '\0')
 		fmt = "%c";
-	strftime(buf, sizeof buf, fmt, gmt ? gmtime() : localtime());
+	if (gmt) {
+		/*
+		 * Work around a buggy 'strftime' implementation on at least
+		 * NetBSD 10 and Linux/glibc-2.31, on which the value of '%s'
+		 * depends on the timezone from TZ; see varmod-gmtime.mk.
+		 */
+		const char *prev_tz_env = getenv("TZ");
+		char *prev_tz = prev_tz_env != NULL
+		? bmake_strdup(prev_tz_env) : NULL;
+		setenv("TZ", "UTC", 1);
+		strftime(buf, sizeof buf, fmt, localtime());
+		if (prev_tz != NULL) {
+			setenv("TZ", prev_tz, 1);
+			free(prev_tz);
+		} else
+			unsetenv("TZ");
+	} else
+		strftime(buf, sizeof buf, fmt, localtime());
 
 	buf[sizeof buf - 1] = '\0';
 	return bmake_strdup(buf);

Index: src/usr.bin/make/unit-tests/varmod-gmtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.17 src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.18
--- src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.17	Sat Aug 19 10:33:32 2023
+++ src/usr.bin/make/unit-tests/varmod-gmtime.mk	Sat Aug 19 11:13:36 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-gmtime.mk,v 1.17 2023/08/19 10:33:32 rillig Exp $
+# $NetBSD: varmod-gmtime.mk,v 1.18 2023/08/19 11:13:36 rillig Exp $
 #
 # Tests for the :gmtime variable modifier, which formats a timestamp
 # using strftime(3) in UTC.
@@ -146,13 +146,13 @@
 .endif
 
 
-# As of 2023-08-19, ':gmtime' but not ':localtime' reports wrong values for
-# '%s', depending on the operating system and the timezone, as demonstrated by
-# the following test program:
+# Before var.c 1.1062 from 2023-08-19, ':gmtime' but not ':localtime' reported
+# wrong values for '%s', depending on the operating system and the timezone,
+# as demonstrated by the following test program:
 #
 #	for mod in gmtime localtime; do
 #		for tz in UTC Europe/Berlin America/Los_Angeles; do
-#			TZ=$tz bmake -r -v "\${%F %T %z %s $mod $tz:L:$mod}"
+#			TZ=$tz ./make -r -f /dev/null -v "\${%F %T %z %s $mod $tz:L:$mod}"
 #		done
 #	done
 #
@@ -194,33 +194,30 @@
 #	* ':gmtime' reports the correct timezone offset '+'.
 #	* ':gmtime' reports different seconds since the Epoch, and the '%s'
 #	  value cannot be derived from the '%F %T %z' values.
-.if 0			# only for reference, due to platform differences
 export TZ=UTC
-.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+.for t in ${%s:L:gmtime} ${%s:L:localtime}
 TIMESTAMPS+= $t
-.  endfor
+.endfor
 export TZ=Europe/Berlin
-.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+.for t in ${%s:L:gmtime} ${%s:L:localtime}
 TIMESTAMPS+= $t
-.  endfor
+.endfor
 export TZ=UTC
-.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+.for t in ${%s:L:gmtime} ${%s:L:localtime}
 TIMESTAMPS+= $t
-.  endfor
+.endfor
 export TZ=America/Los_Angeles
-.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+.for t in ${%s:L:gmtime} ${%s:L:localtime}
 TIMESTAMPS+= $t
-.  endfor
+.endfor
 export TZ=UTC
-.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+.for t in ${%s:L:gmtime} ${%s:L:localtime}
 TIMESTAMPS+= $t
-.  endfor
-.  info ${TIMESTAMPS:u}
-.  for a b in ${TIMESTAMPS:[1]} ${TIMESTAMPS:@t@$t $t@} ${TIMESTAMPS:[-1]}
-.if $a > $b
-.  warning timestamp $a > $b
-.endif
-.  endfor
-.endif
+.endfor
+.for a b in ${TIMESTAMPS:[1]} ${TIMESTAMPS:@t@$t $t@} ${TIMESTAMPS:[-1]}
+.  if $a > $b
+.warning timestamp $a > $b
+.  endif
+.endfor
 
 all:



CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 11:13:36 UTC 2023

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-gmtime.mk

Log Message:
make: work around bugs in gmtime on several platforms


To generate a diff of this commit:
cvs rdiff -u -r1.1061 -r1.1062 src/usr.bin/make/var.c
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-gmtime.mk

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



CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 11:09:02 UTC 2023

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: directive-export-gmake.exp
directive-export-gmake.mk directive.exp directive.mk parse.exp
parse.mk varname.exp varname.mk

Log Message:
make: show realistic invalid line in error message

Previously, the error message 'Invalid line' showed only the expanded
line, which might or might not show the actual problem.  To be more
helpful, add the unexpanded line to the error message in case they
differ.

Remove the special handling of invalid lines that result from merge
conflicts.  RCS is not commonly used anymore, and mentioning CVS was too
specific.  By echoing the whole line, the patterns '<<' and '>>'
are clear enough to hint at the problem.


To generate a diff of this commit:
cvs rdiff -u -r1.705 -r1.706 src/usr.bin/make/parse.c
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/directive-export-gmake.exp
cvs rdiff -u -r1.5 -r1.6 \
src/usr.bin/make/unit-tests/directive-export-gmake.mk \
src/usr.bin/make/unit-tests/parse.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/directive.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/directive.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/parse.mk
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/unit-tests/varname.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varname.mk

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.705 src/usr.bin/make/parse.c:1.706
--- src/usr.bin/make/parse.c:1.705	Sat Aug 19 10:52:13 2023
+++ src/usr.bin/make/parse.c	Sat Aug 19 11:09:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.705 2023/08/19 10:52:13 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.706 2023/08/19 11:09:02 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -105,7 +105,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.705 2023/08/19 10:52:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.706 2023/08/19 11:09:02 rillig Exp $");
 
 /* Detects a multiple-inclusion guard in a makefile. */
 typedef enum {
@@ -871,14 +871,10 @@ MaybeUpdateMainTarget(void)
 }
 
 static void
-InvalidLineType(const char *line)
+InvalidLineType(const char *line, const char *unexpanded_line)
 {
-	if (strncmp(line, "<<", 6) == 0 ||
-	strncmp(line, ">>", 6) == 0)
-		Parse_Error(PARSE_FATAL,
-		"Makefile appears to contain unresolved CVS/RCS/??? merge conflicts");
-	else if (line[0] == '.') {
-		const char *dirstart = line + 1;
+	if (unexpanded_line[0] == '.') {
+		const char *dirstart = unexpanded_line + 1;
 		const char *dirend;
 		cpp_skip_whitespace();
 		dirend = dirstart;
@@ -886,8 +882,11 @@ InvalidLineType(const char *line)
 			dirend++;
 		Parse_Error(PARSE_FATAL, "Unknown directive \"%.*s\"",
 		(int)(dirend - dirstart), dirstart);
-	} else
+	} else if (strcmp(line, unexpanded_line) == 0)
 		Parse_Error(PARSE_FATAL, "Invalid line '%s'", line);
+	else
+		Parse_Error(PARSE_FATAL, "Invalid line '%s', expanded to '%s'",
+		unexpanded_line, line);
 }
 
 static void
@@ -1398,7 +1397,8 @@ ParseDependencyTargets(char **pp,
 		   const char *lstart,
 		   ParseSpecial *inout_special,
 		   GNodeType *inout_targetAttr,
-		   SearchPathList **inout_paths)
+		   SearchPathList **inout_paths,
+		   const char *unexpanded_line)
 {
 	char *p = *pp;
 
@@ -1423,7 +1423,7 @@ ParseDependencyTargets(char **pp,
 		}
 
 		if (*p == '\0') {
-			InvalidLineType(lstart);
+			InvalidLineType(lstart, unexpanded_line);
 			return false;
 		}
 
@@ -1633,7 +1633,7 @@ ParseDependencySources(char *p, GNodeTyp
  * Upon return, the value of the line is unspecified.
  */
 static void
-ParseDependency(char *line)
+ParseDependency(char *line, const char *unexpanded_line)
 {
 	char *p;
 	SearchPathList *paths;	/* search paths to alter when parsing a list
@@ -1650,7 +1650,8 @@ ParseDependency(char *line)
 	targetAttr = OP_NONE;
 	special = SP_NOT;
 
-	if (!ParseDependencyTargets(, line, , , ))
+	if (!ParseDependencyTargets(, line, , , ,
+	unexpanded_line))
 		goto out;
 
 	if (!Lst_IsEmpty(targets))
@@ -1658,7 +1659,7 @@ ParseDependency(char *line)
 
 	op = ParseDependencyOp();
 	if (op == OP_NONE) {
-		InvalidLineType(line);
+		InvalidLineType(line, unexpanded_line);
 		goto out;
 	}
 	ApplyDependencyOperator(op);
@@ -2948,7 +2949,7 @@ ParseDependencyLine(char *line)
 		Lst_Free(targets);
 	targets = Lst_New();
 
-	ParseDependency(expanded_line);
+	ParseDependency(expanded_line, line);
 	free(expanded_line);
 
 	if (shellcmd != NULL)

Index: src/usr.bin/make/unit-tests/directive-export-gmake.exp
diff -u src/usr.bin/make/unit-tests/directive-export-gmake.exp:1.3 

CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 11:09:02 UTC 2023

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: directive-export-gmake.exp
directive-export-gmake.mk directive.exp directive.mk parse.exp
parse.mk varname.exp varname.mk

Log Message:
make: show realistic invalid line in error message

Previously, the error message 'Invalid line' showed only the expanded
line, which might or might not show the actual problem.  To be more
helpful, add the unexpanded line to the error message in case they
differ.

Remove the special handling of invalid lines that result from merge
conflicts.  RCS is not commonly used anymore, and mentioning CVS was too
specific.  By echoing the whole line, the patterns '<<' and '>>'
are clear enough to hint at the problem.


To generate a diff of this commit:
cvs rdiff -u -r1.705 -r1.706 src/usr.bin/make/parse.c
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/directive-export-gmake.exp
cvs rdiff -u -r1.5 -r1.6 \
src/usr.bin/make/unit-tests/directive-export-gmake.mk \
src/usr.bin/make/unit-tests/parse.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/directive.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/directive.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/parse.mk
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/unit-tests/varname.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varname.mk

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



CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 10:52:14 UTC 2023

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: dep-op-missing.exp directive-dinclude.exp
directive-dinclude.mk directive-export-gmake.exp
directive-export-gmake.mk directive-hyphen-include.exp
directive-hyphen-include.mk directive-include.exp
directive-include.mk directive-sinclude.exp directive-sinclude.mk
directive.exp directive.mk parse.exp parse.mk var-op-assign.exp
var-op-assign.mk varname.exp varname.mk

Log Message:
make: add more details to error message about invalid lines


To generate a diff of this commit:
cvs rdiff -u -r1.704 -r1.705 src/usr.bin/make/parse.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/dep-op-missing.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-dinclude.exp \
src/usr.bin/make/unit-tests/directive-dinclude.mk \
src/usr.bin/make/unit-tests/directive-export-gmake.exp \
src/usr.bin/make/unit-tests/directive-hyphen-include.exp \
src/usr.bin/make/unit-tests/directive-hyphen-include.mk \
src/usr.bin/make/unit-tests/directive-sinclude.exp
cvs rdiff -u -r1.4 -r1.5 \
src/usr.bin/make/unit-tests/directive-export-gmake.mk \
src/usr.bin/make/unit-tests/directive-sinclude.mk \
src/usr.bin/make/unit-tests/parse.exp
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/directive-include.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/directive-include.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/directive.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/directive.mk \
src/usr.bin/make/unit-tests/var-op-assign.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/parse.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/var-op-assign.mk
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/varname.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/varname.mk

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.704 src/usr.bin/make/parse.c:1.705
--- src/usr.bin/make/parse.c:1.704	Fri Jun 23 06:08:56 2023
+++ src/usr.bin/make/parse.c	Sat Aug 19 10:52:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.704 2023/06/23 06:08:56 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.705 2023/08/19 10:52:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -105,7 +105,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.704 2023/06/23 06:08:56 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.705 2023/08/19 10:52:13 rillig Exp $");
 
 /* Detects a multiple-inclusion guard in a makefile. */
 typedef enum {
@@ -887,7 +887,7 @@ InvalidLineType(const char *line)
 		Parse_Error(PARSE_FATAL, "Unknown directive \"%.*s\"",
 		(int)(dirend - dirstart), dirstart);
 	} else
-		Parse_Error(PARSE_FATAL, "Invalid line type");
+		Parse_Error(PARSE_FATAL, "Invalid line '%s'", line);
 }
 
 static void

Index: src/usr.bin/make/unit-tests/dep-op-missing.exp
diff -u src/usr.bin/make/unit-tests/dep-op-missing.exp:1.1 src/usr.bin/make/unit-tests/dep-op-missing.exp:1.2
--- src/usr.bin/make/unit-tests/dep-op-missing.exp:1.1	Tue Dec 14 00:02:57 2021
+++ src/usr.bin/make/unit-tests/dep-op-missing.exp	Sat Aug 19 10:52:13 2023
@@ -1,4 +1,4 @@
-make: "dep-op-missing.tmp" line 1: Invalid line type
+make: "dep-op-missing.tmp" line 1: Invalid line 'target'
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 0

Index: src/usr.bin/make/unit-tests/directive-dinclude.exp
diff -u src/usr.bin/make/unit-tests/directive-dinclude.exp:1.2 src/usr.bin/make/unit-tests/directive-dinclude.exp:1.3
--- src/usr.bin/make/unit-tests/directive-dinclude.exp:1.2	Sun Jan 23 21:48:59 2022
+++ src/usr.bin/make/unit-tests/directive-dinclude.exp	Sat Aug 19 10:52:13 2023
@@ -1,4 +1,4 @@
-make: "directive-dinclude-error.inc" line 1: Invalid line type
+make: "directive-dinclude-error.inc" line 1: Invalid line 'syntax error'
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1
Index: src/usr.bin/make/unit-tests/directive-dinclude.mk
diff -u src/usr.bin/make/unit-tests/directive-dinclude.mk:1.2 src/usr.bin/make/unit-tests/directive-dinclude.mk:1.3
--- src/usr.bin/make/unit-tests/directive-dinclude.mk:1.2	Sun Jan 23 21:48:59 2022
+++ src/usr.bin/make/unit-tests/directive-dinclude.mk	Sat Aug 19 10:52:13 2023
@@ -1,4 +1,4 @@
-# $NetBSD: directive-dinclude.mk,v 1.2 2022/01/23 21:48:59 rillig Exp $
+# $NetBSD: directive-dinclude.mk,v 1.3 2023/08/19 10:52:13 rillig Exp $
 #
 # Tests for the .dinclude directive, which includes another file,
 # silently skipping it if it cannot be opened.  This is primarily used for
@@ -16,7 +16,7 @@
 .dinclude "${MAKEFILE}/subdir"
 
 # Errors 

CVS commit: src/usr.bin/make

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 10:52:14 UTC 2023

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: dep-op-missing.exp directive-dinclude.exp
directive-dinclude.mk directive-export-gmake.exp
directive-export-gmake.mk directive-hyphen-include.exp
directive-hyphen-include.mk directive-include.exp
directive-include.mk directive-sinclude.exp directive-sinclude.mk
directive.exp directive.mk parse.exp parse.mk var-op-assign.exp
var-op-assign.mk varname.exp varname.mk

Log Message:
make: add more details to error message about invalid lines


To generate a diff of this commit:
cvs rdiff -u -r1.704 -r1.705 src/usr.bin/make/parse.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/dep-op-missing.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-dinclude.exp \
src/usr.bin/make/unit-tests/directive-dinclude.mk \
src/usr.bin/make/unit-tests/directive-export-gmake.exp \
src/usr.bin/make/unit-tests/directive-hyphen-include.exp \
src/usr.bin/make/unit-tests/directive-hyphen-include.mk \
src/usr.bin/make/unit-tests/directive-sinclude.exp
cvs rdiff -u -r1.4 -r1.5 \
src/usr.bin/make/unit-tests/directive-export-gmake.mk \
src/usr.bin/make/unit-tests/directive-sinclude.mk \
src/usr.bin/make/unit-tests/parse.exp
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/directive-include.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/directive-include.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/directive.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/directive.mk \
src/usr.bin/make/unit-tests/var-op-assign.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/parse.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/var-op-assign.mk
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/varname.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/varname.mk

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



CVS commit: src/usr.bin/make/unit-tests

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 10:33:32 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: directive-export-gmake.exp
directive-export-gmake.mk varmod-gmtime.mk

Log Message:
tests/make: provide instructions for reproducing bug in gmtime

The test is not enabled because its results differ too much between the
platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/usr.bin/make/unit-tests/directive-export-gmake.exp
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/directive-export-gmake.mk
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-gmtime.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/directive-export-gmake.exp
diff -u src/usr.bin/make/unit-tests/directive-export-gmake.exp:1.1 src/usr.bin/make/unit-tests/directive-export-gmake.exp:1.2
--- src/usr.bin/make/unit-tests/directive-export-gmake.exp:1.1	Fri Oct  2 20:34:59 2020
+++ src/usr.bin/make/unit-tests/directive-export-gmake.exp	Sat Aug 19 10:33:32 2023
@@ -1 +1,4 @@
-exit status 0
+make: "directive-export-gmake.mk" line 74: Invalid line type
+make: Fatal errors encountered -- cannot continue
+make: stopped in unit-tests
+exit status 1

Index: src/usr.bin/make/unit-tests/directive-export-gmake.mk
diff -u src/usr.bin/make/unit-tests/directive-export-gmake.mk:1.3 src/usr.bin/make/unit-tests/directive-export-gmake.mk:1.4
--- src/usr.bin/make/unit-tests/directive-export-gmake.mk:1.3	Tue Nov 17 20:16:44 2020
+++ src/usr.bin/make/unit-tests/directive-export-gmake.mk	Sat Aug 19 10:33:32 2023
@@ -1,4 +1,4 @@
-# $NetBSD: directive-export-gmake.mk,v 1.3 2020/11/17 20:16:44 rillig Exp $
+# $NetBSD: directive-export-gmake.mk,v 1.4 2023/08/19 10:33:32 rillig Exp $
 #
 # Tests for the export directive (without leading dot), as in GNU make.
 
@@ -60,5 +60,16 @@ export VAR=an ${UNDEF} variable
 .  error
 .endif
 
-all:
-	@:;
+
+# The body of the .for loop expands to 'export VAR=${:U1}', and the 'export'
+# directive is only recognized if the line does not contain a ':', to allow
+# 'export' to be a regular target.
+.for value in 1
+# FIXME: The below error message is missing all details.  But even if it
+# contained the text of the line, it would be confusing because at the point
+# where that error message is printed, all expressions from the line have
+# already been expanded as part of the dependency line parsing, which in this
+# case hides the ':' from the error message.
+# expect+1: Invalid line type
+export VAR=${value}
+.endfor

Index: src/usr.bin/make/unit-tests/varmod-gmtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.16 src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.17
--- src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.16	Sat Aug 19 08:19:25 2023
+++ src/usr.bin/make/unit-tests/varmod-gmtime.mk	Sat Aug 19 10:33:32 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-gmtime.mk,v 1.16 2023/08/19 08:19:25 rillig Exp $
+# $NetBSD: varmod-gmtime.mk,v 1.17 2023/08/19 10:33:32 rillig Exp $
 #
 # Tests for the :gmtime variable modifier, which formats a timestamp
 # using strftime(3) in UTC.
@@ -194,5 +194,33 @@
 #	* ':gmtime' reports the correct timezone offset '+'.
 #	* ':gmtime' reports different seconds since the Epoch, and the '%s'
 #	  value cannot be derived from the '%F %T %z' values.
+.if 0			# only for reference, due to platform differences
+export TZ=UTC
+.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+TIMESTAMPS+= $t
+.  endfor
+export TZ=Europe/Berlin
+.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+TIMESTAMPS+= $t
+.  endfor
+export TZ=UTC
+.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+TIMESTAMPS+= $t
+.  endfor
+export TZ=America/Los_Angeles
+.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+TIMESTAMPS+= $t
+.  endfor
+export TZ=UTC
+.  for t in ${%s:L:gmtime} ${%s:L:localtime}
+TIMESTAMPS+= $t
+.  endfor
+.  info ${TIMESTAMPS:u}
+.  for a b in ${TIMESTAMPS:[1]} ${TIMESTAMPS:@t@$t $t@} ${TIMESTAMPS:[-1]}
+.if $a > $b
+.  warning timestamp $a > $b
+.endif
+.  endfor
+.endif
 
 all:



CVS commit: src/usr.bin/make/unit-tests

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 10:33:32 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: directive-export-gmake.exp
directive-export-gmake.mk varmod-gmtime.mk

Log Message:
tests/make: provide instructions for reproducing bug in gmtime

The test is not enabled because its results differ too much between the
platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/usr.bin/make/unit-tests/directive-export-gmake.exp
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/directive-export-gmake.mk
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-gmtime.mk

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



CVS commit: src/include

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 08:54:36 UTC 2023

Modified Files:
src/include: time.h

Log Message:
time.h: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/include/time.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/time.h
diff -u src/include/time.h:1.48 src/include/time.h:1.49
--- src/include/time.h:1.48	Sun Oct 23 15:43:40 2022
+++ src/include/time.h	Sat Aug 19 08:54:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: time.h,v 1.48 2022/10/23 15:43:40 jschauma Exp $	*/
+/*	$NetBSD: time.h,v 1.49 2023/08/19 08:54:36 rillig Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -81,7 +81,7 @@ struct tm {
 	int	tm_year;	/* years since 1900 */
 	int	tm_wday;	/* days since Sunday [0-6] */
 	int	tm_yday;	/* days since January 1 [0-365] */
-	int	tm_isdst;	/* Daylight Savings Time flag */
+	int	tm_isdst;	/* Daylight Saving Time flag */
 	long	tm_gmtoff;	/* offset from UTC in seconds */
 	__aconst char *tm_zone;	/* timezone abbreviation */
 };



CVS commit: src/include

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 08:54:36 UTC 2023

Modified Files:
src/include: time.h

Log Message:
time.h: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/include/time.h

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



CVS commit: src/usr.bin/make/unit-tests

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 08:19:25 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: varmod-gmtime.mk varmod-mtime.mk

Log Message:
tests/make: document bug in ':gmtime' with '%s'


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-gmtime.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-mtime.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/varmod-gmtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.15 src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.16
--- src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.15	Thu Jun  1 20:56:35 2023
+++ src/usr.bin/make/unit-tests/varmod-gmtime.mk	Sat Aug 19 08:19:25 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-gmtime.mk,v 1.15 2023/06/01 20:56:35 rillig Exp $
+# $NetBSD: varmod-gmtime.mk,v 1.16 2023/08/19 08:19:25 rillig Exp $
 #
 # Tests for the :gmtime variable modifier, which formats a timestamp
 # using strftime(3) in UTC.
@@ -145,4 +145,54 @@
 .  error
 .endif
 
+
+# As of 2023-08-19, ':gmtime' but not ':localtime' reports wrong values for
+# '%s', depending on the operating system and the timezone, as demonstrated by
+# the following test program:
+#
+#	for mod in gmtime localtime; do
+#		for tz in UTC Europe/Berlin America/Los_Angeles; do
+#			TZ=$tz bmake -r -v "\${%F %T %z %s $mod $tz:L:$mod}"
+#		done
+#	done
+#
+# Cygwin:
+# 2023-08-19 07:34:06 + 1692430446 gmtime UTC
+# 2023-08-19 07:34:06 + 1692430446 gmtime Europe/Berlin
+# 2023-08-19 07:34:06 + 1692430446 gmtime America/Los_Angeles
+# 2023-08-19 07:34:06 + 1692430446 localtime UTC
+# 2023-08-19 09:34:07 +0200 1692430447 localtime Europe/Berlin
+# 2023-08-19 00:34:07 -0700 1692430447 localtime America/Los_Angeles
+#
+# Looks good:
+#	* ':gmtime' consistently reports timezone offset '+'.
+#	* '%s' is independent of the timezone.
+#
+# NetBSD 10.99:
+# 2023-08-19 07:34:37 + 1692430477 gmtime UTC
+# 2023-08-19 07:34:37 +0100 1692426877 gmtime Europe/Berlin
+# 2023-08-19 07:34:37 -0800 1692459277 gmtime America/Los_Angeles
+# 2023-08-19 07:34:37 + 1692430477 localtime UTC
+# 2023-08-19 09:34:37 +0200 1692430477 localtime Europe/Berlin
+# 2023-08-19 00:34:37 -0700 1692430477 localtime America/Los_Angeles
+#
+# Looks bad:
+#	* ':gmtime' reports different timezone offsets.
+#	* ':gmtime' reports different seconds since the Epoch.
+#	* ':gmtime' reports the timezone offset '+0100' for Europe/Berlin,
+#	  even though at 2023-08-19, DST with offset '+0200' was in place.
+#
+# Debian:
+# 2023-08-19 07:29:10 + 1692430150 gmtime UTC
+# 2023-08-19 07:29:10 + 1692426550 gmtime Europe/Berlin
+# 2023-08-19 07:29:10 + 1692458950 gmtime America/Los_Angeles
+# 2023-08-19 07:29:10 + 1692430150 localtime UTC
+# 2023-08-19 09:29:10 +0200 1692430150 localtime Europe/Berlin
+# 2023-08-19 00:29:10 -0700 1692430150 localtime America/Los_Angeles
+#
+# Looks mixed:
+#	* ':gmtime' reports the correct timezone offset '+'.
+#	* ':gmtime' reports different seconds since the Epoch, and the '%s'
+#	  value cannot be derived from the '%F %T %z' values.
+
 all:

Index: src/usr.bin/make/unit-tests/varmod-mtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-mtime.mk:1.4 src/usr.bin/make/unit-tests/varmod-mtime.mk:1.5
--- src/usr.bin/make/unit-tests/varmod-mtime.mk:1.4	Sat Aug 19 01:34:21 2023
+++ src/usr.bin/make/unit-tests/varmod-mtime.mk	Sat Aug 19 08:19:25 2023
@@ -1,11 +1,11 @@
-# $NetBSD: varmod-mtime.mk,v 1.4 2023/08/19 01:34:21 sjg Exp $
+# $NetBSD: varmod-mtime.mk,v 1.5 2023/08/19 08:19:25 rillig Exp $
 #
 # Tests for the ':mtime' variable modifier, which maps each word of the
 # expression to that file's modification time.
 
 # Note: strftime() uses mktime() for %s and mktime() assumes localtime
 # so this should match time()
-start:=	${%s:L:localtime}
+start:=	${%s:L:localtime}	# see varmod-gmtime.mk, keyword '%s'
 
 
 # Ensure that this makefile exists and has a modification time.  If the file



CVS commit: src/usr.bin/make/unit-tests

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 08:19:25 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: varmod-gmtime.mk varmod-mtime.mk

Log Message:
tests/make: document bug in ':gmtime' with '%s'


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-gmtime.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-mtime.mk

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