I was very surprised to see GNU patch 2.7.6 fail almost every test.

m$
m$ uname -a
NetBSD mimas.genunix.com 9.3 NetBSD 9.3 (GENERIC) #0: Thu Aug 4 15:30:37 UTC 2022 mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
m$
m$ uptime
 2:16PM  up 72 days,  1:35, 2 users, load averages: 0.00, 0.02, 0.00
m$
m$ which gcc
/opt/bw/gcc12/bin/gcc
m$
m$ gcc --version
gcc (GENUNIX Fri Aug 26 16:41:30 UTC 2022) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

m$
m$ echo $CFLAGS
-Wl,-rpath=/opt/bw/lib,--enable-new-dtags -m64 -g -O0 -fno-fast-math -fno-builtin -malign-double -march=k8 -mtune=k8 -mieee-fp -mhard-float -mno-fancy-math-387 -m128bit-long-double -mlong-double-80 -mstackrealign -mpreferred-stack-boundary=8
m$


m$ pwd
/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002
m$ ./configure --prefix=/opt/bw --program-prefix=g \
> --disable-silent-rules --enable-dependency-tracking
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... /opt/bw/gcc12/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /opt/bw/gcc12/bin/gcc accepts -g... yes
checking for /opt/bw/gcc12/bin/gcc option to accept ISO C89... none needed
checking whether /opt/bw/gcc12/bin/gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of /opt/bw/gcc12/bin/gcc... gcc3
checking for /opt/bw/gcc12/bin/gcc option to accept ISO C99... none needed
checking for /opt/bw/gcc12/bin/gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... /opt/bw/gcc12/bin/gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for Minix Amsterdam compiler... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking for ar... (cached) ar
checking for ranlib... ranlib
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for ANSI C header files... (cached) yes
checking for size_t... yes
checking for working alloca.h... no
checking for alloca... yes
checking build system type... x86_64-unknown-netbsd9.3
checking host system type... x86_64-unknown-netbsd9.3
checking for d_ino member in directory struct... yes
checking for long file names... yes
checking for pathconf... yes
checking for canonicalize_file_name... no
checking for getcwd... yes
checking for readlink... yes
checking for realpath... yes
checking for chown... yes
checking for fchown... yes
checking for _set_invalid_parameter_handler... no
checking for fchdir... yes
checking for fdopendir... yes
checking for faccessat... yes
checking for fchmodat... yes
checking for lchmod... yes
checking for fcntl... yes
checking for symlink... yes
checking for mempcpy... no
checking for fstatat... yes
checking for getdtablesize... yes
checking for getprogname... yes
checking for getexecname... no
checking for gettimeofday... yes
checking for nanotime... no
checking for lstat... yes
checking for mbsinit... yes
checking for mbrtowc... yes
checking for mprotect... yes
checking for mkdirat... yes
checking for tzset... yes
checking for openat... yes
checking for readlinkat... yes
checking for link... yes
checking for renameat... yes
checking for setenv... yes
checking for strdup... yes
checking for strndup... yes
checking for symlinkat... yes
checking for localtime_r... yes
checking for timegm... yes
checking for pipe... yes
checking for unlinkat... yes
checking for utime... yes
checking for futimes... yes
checking for futimesat... no
checking for futimens... yes
checking for utimensat... yes
checking for lutimes... yes
checking for vasnprintf... no
checking for snprintf... yes
checking for iswcntrl... yes
checking whether // is distinct from /... no
checking whether realpath works... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking for sys/socket.h... yes
checking for dirent.h... yes
checking for sys/stat.h... (cached) yes
checking for getopt.h... yes
checking for sys/cdefs.h... yes
checking for sys/time.h... yes
checking for limits.h... yes
checking for wchar.h... yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for sys/mman.h... yes
checking for utime.h... yes
checking for features.h... no
checking for crtdefs.h... no
checking for wctype.h... yes
checking for uid_t in sys/types.h... yes
checking for unistd.h... (cached) yes
checking for working chown... yes
checking whether chown dereferences symlinks... yes
checking whether chown honors trailing slash... yes
checking whether chown always updates ctime... yes
checking whether the preprocessor supports include_next... no
checking whether system header files limit the line length... no
checking if environ is properly declared... no
checking for complete errno.h... no
checking absolute name of <errno.h>... "///usr/include/errno.h"
checking for EMULTIHOP value... yes
checking for ENOLINK value... yes
checking for EOVERFLOW value... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking type of array argument to getgroups... gid_t
checking whether lstat correctly handles trailing slash... yes
checking whether fchdir is declared... yes
checking for working fcntl.h... no (bad O_NOATIME)
checking for pid_t... yes
checking for mode_t... yes
checking whether stat file-mode macros are broken... no
checking absolute name of <sys/stat.h>... "///usr/include/sys/stat.h"
checking for nlink_t... yes
checking whether fchmodat is declared without a macro... yes
checking whether fstat is declared without a macro... yes
checking whether fstatat is declared without a macro... yes
checking whether futimens is declared without a macro... yes
checking whether lchmod is declared without a macro... yes
checking whether lstat is declared without a macro... yes
checking whether mkdirat is declared without a macro... yes
checking whether mkfifo is declared without a macro... yes
checking whether mkfifoat is declared without a macro... yes
checking whether mknod is declared without a macro... yes
checking whether mknodat is declared without a macro... yes
checking whether stat is declared without a macro... yes
checking whether utimensat is declared without a macro... yes
checking whether getcwd (NULL, 0) allocates memory for result... yes
checking for getcwd with POSIX signature... yes
checking whether getdtablesize is declared... yes
checking absolute name of <getopt.h>... "///usr/include/getopt.h"
checking for getopt.h... (cached) yes
checking for getopt_long_only... no
checking for C/C++ restrict keyword... __restrict
checking absolute name of <sys/time.h>... "///usr/include/sys/time.h"
checking for struct timeval... yes
checking for wide-enough struct timeval.tv_sec member... yes
checking whether gettimeofday is declared without a macro... yes
checking absolute name of <limits.h>... "///opt/bw/gcc12/lib/gcc/x86_64--netbsd/12.2.0/include-fixed/limits.h"
checking whether limits.h has ULLONG_WIDTH etc.... yes
checking for wint_t... yes
checking whether wint_t is too small... no
checking for unsigned long long int... yes
checking for long long int... yes
checking absolute name of <stdint.h>... "///opt/bw/gcc12/lib/gcc/x86_64--netbsd/12.2.0/include/stdint.h"
checking whether stdint.h conforms to C99... yes
checking whether stdint.h predates C++11... no
checking whether stdint.h has UINTMAX_WIDTH etc.... no
checking absolute name of <inttypes.h>... "///usr/include/inttypes.h"
checking whether imaxabs is declared without a macro... yes
checking whether imaxdiv is declared without a macro... yes
checking whether strtoimax is declared without a macro... yes
checking whether strtoumax is declared without a macro... yes
checking for inttypes.h... (cached) yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking for nl_langinfo and CODESET... yes
checking whether getc_unlocked is declared... yes
checking whether we are using the GNU C Library >= 2.1 or uClibc... no
checking for a sed that does not truncate output... /usr/pkg/bin/gsed
checking whether malloc, realloc, calloc are POSIX compliant... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for mbstate_t... yes
checking for a traditional japanese locale... ja_JP.eucJP
checking for a transitional chinese locale... zh_CN.GB18030
checking for a french Unicode locale... fr_FR.UTF-8
checking for mmap... yes
checking for MAP_ANONYMOUS... yes
checking whether memchr works... yes
checking whether memrchr is declared... yes
checking whether <limits.h> defines MIN and MAX... no
checking whether <sys/param.h> defines MIN and MAX... yes
checking whether time_t is signed... yes
checking whether alarm is declared... yes
checking for working mktime... no
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct tm.tm_gmtoff... yes
checking for O_CLOEXEC... yes
checking for promoted mode_t type... mode_t
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for compound literals... yes
checking for ssize_t... yes
checking whether setenv is declared... yes
checking search.h usability... yes
checking search.h presence... yes
checking for search.h... yes
checking for tsearch... yes
checking for sigset_t... yes
checking for wchar_t... yes
checking whether strdup is declared... yes
checking whether strerror(0) succeeds... no
checking absolute name of <string.h>... "///usr/include/string.h"
checking whether ffsl is declared without a macro... no
checking whether ffsll is declared without a macro... no
checking whether memmem is declared without a macro... yes
checking whether mempcpy is declared without a macro... no
checking whether memrchr is declared without a macro... yes
checking whether rawmemchr is declared without a macro... no
checking whether stpcpy is declared without a macro... yes
checking whether stpncpy is declared without a macro... yes
checking whether strchrnul is declared without a macro... yes
checking whether strdup is declared without a macro... yes
checking whether strncat is declared without a macro... yes
checking whether strndup is declared without a macro... yes
checking whether strnlen is declared without a macro... yes
checking whether strpbrk is declared without a macro... yes
checking whether strsep is declared without a macro... yes
checking whether strcasestr is declared without a macro... yes
checking whether strtok_r is declared without a macro... yes
checking whether strerror_r is declared without a macro... yes
checking whether strsignal is declared without a macro... yes
checking whether strverscmp is declared without a macro... no
checking whether strndup is declared... (cached) yes
checking whether strnlen is declared... (cached) yes
checking absolute name of <sys/types.h>... "///opt/bw/gcc12/lib/gcc/x86_64--netbsd/12.2.0/include-fixed/sys/types.h"
checking for struct timespec in <time.h>... yes
checking absolute name of <time.h>... "///usr/include/time.h"
checking whether unsetenv is declared... yes
checking whether the utimes function works... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for intmax_t... yes
checking where to find the exponent in a 'double'... word 1 bit 20
checking whether snprintf returns a byte count as in C99... yes
checking for snprintf... (cached) yes
checking for strnlen... yes
checking for wcslen... yes
checking for wcsnlen... yes
checking for mbrtowc... (cached) yes
checking for wcrtomb... yes
checking whether _snprintf is declared... no
checking whether <wchar.h> uses 'inline' correctly... yes
checking whether this system has an arbitrary file name length limit... yes
checking for library containing clock_gettime... none required
checking for clock_gettime... yes
checking for clock_settime... yes
checking for closedir... yes
checking for d_ino member in directory struct... (cached) yes
checking absolute name of <dirent.h>... "///usr/include/dirent.h"
checking whether alphasort is declared without a macro... yes
checking whether closedir is declared without a macro... yes
checking whether dirfd is declared without a macro... no
checking whether fdopendir is declared without a macro... yes
checking whether opendir is declared without a macro... yes
checking whether readdir is declared without a macro... yes
checking whether rewinddir is declared without a macro... yes
checking whether scandir is declared without a macro... yes
checking for dirfd... no
checking whether dirfd is declared... yes
checking whether dirfd is a macro... yes
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... no
checking for euidaccess... no
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for getgroups... yes
checking for working getgroups... yes
checking for library containing eaccess... no
checking for eaccess... no
checking for fchownat... yes
checking whether fchownat works with AT_SYMLINK_NOFOLLOW... yes
checking whether fchownat works with an empty file name... no
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... yes
checking absolute name of <fcntl.h>... "///usr/include/fcntl.h"
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking for flexible array member... yes
checking whether conversion from 'int' to 'long double' works... yes
checking whether fstatat (..., 0) works... yes
checking whether getdtablesize works... yes
checking for getgroups... (cached) yes
checking for working getgroups... (cached) yes
checking whether getgroups handles negative values... yes
checking whether program_invocation_name is declared... no
checking whether program_invocation_short_name is declared... no
checking whether __argv is declared... no
checking whether __progname is defined in default libraries... yes
checking whether gettimeofday clobbers localtime buffer... no
checking for gettimeofday with POSIX signature... yes
checking for group_member... no
checking whether INT32_MAX < INTMAX_MAX... yes
checking whether INT64_MAX == LONG_MAX... yes
checking whether UINT32_MAX < UINTMAX_MAX... yes
checking whether UINT64_MAX == ULONG_MAX... yes
checking for lchown... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... (cached) yes
checking whether mbrtowc handles incomplete characters... yes
checking whether mbrtowc works as well as mbtowc... yes
checking whether mbrtowc handles a NULL pwc argument... yes
checking whether mbrtowc handles a NULL string argument... yes
checking whether mbrtowc has a correct return value... yes
checking whether mbrtowc returns 0 when parsing a NUL character... yes
checking whether mbrtowc works on empty input... yes
checking whether the C locale is free of encoding errors... yes
checking whether mbrtowc handles incomplete characters... (cached) yes
checking whether mbrtowc works as well as mbtowc... (cached) yes
checking for mempcpy... (cached) no
checking for memrchr... yes
checking whether mkdir handles trailing slash... yes
checking whether mkdir handles trailing dot... yes
checking for __mktime_internal... no
checking whether open recognizes a trailing slash... yes
checking for opendir... yes
checking for struct tm.tm_zone... (cached) yes
checking whether program_invocation_name is declared... (cached) no
checking whether program_invocation_short_name is declared... (cached) no
checking for raise... yes
checking for readdir... yes
checking whether readlink signature is correct... yes
checking whether readlink handles trailing slash correctly... yes
checking whether readlinkat signature is correct... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking whether rename honors trailing slash on destination... yes
checking whether rename honors trailing slash on source... yes
checking whether rename manages hard links correctly... yes
checking whether rename manages existing destinations correctly... yes
checking linux/fs.h usability... no
checking linux/fs.h presence... no
checking for linux/fs.h... no
checking for linux/fs.h... (cached) no
checking whether rmdir works... yes
checking whether setenv validates arguments... yes
checking absolute name of <signal.h>... "///usr/include/signal.h"
checking for volatile sig_atomic_t... yes
checking for sighandler_t... no
checking whether pthread_sigmask is declared without a macro... yes
checking whether sigaction is declared without a macro... yes
checking whether sigaddset is declared without a macro... yes
checking whether sigdelset is declared without a macro... yes
checking whether sigemptyset is declared without a macro... yes
checking whether sigfillset is declared without a macro... yes
checking whether sigismember is declared without a macro... yes
checking whether sigpending is declared without a macro... yes
checking whether sigprocmask is declared without a macro... yes
checking for stdint.h... (cached) yes
checking for SIZE_MAX... yes
checking for ssize_t... (cached) yes
checking whether stat handles trailing slashes on files... yes
checking for struct stat.st_atim.tv_nsec... yes
checking whether struct stat.st_atim is of type struct timespec... yes
checking for struct stat.st_birthtimespec.tv_nsec... yes
checking for va_copy... yes
checking for max_align_t... no
checking whether NULL can be used in arbitrary expressions... yes
checking absolute name of <stddef.h>... "///opt/bw/gcc12/lib/gcc/x86_64--netbsd/12.2.0/include/stddef.h" checking absolute name of <stdio.h>... "///opt/bw/gcc12/lib/gcc/x86_64--netbsd/12.2.0/include-fixed/stdio.h"
checking which flavor of printf attribute matches inttypes macros... system
checking whether dprintf is declared without a macro... yes
checking whether fpurge is declared without a macro... yes
checking whether fseeko is declared without a macro... yes
checking whether ftello is declared without a macro... yes
checking whether getdelim is declared without a macro... yes
checking whether getline is declared without a macro... yes
checking whether gets is declared without a macro... yes
checking whether pclose is declared without a macro... yes
checking whether popen is declared without a macro... yes
checking whether renameat is declared without a macro... no
checking whether snprintf is declared without a macro... yes
checking whether tmpfile is declared without a macro... yes
checking whether vdprintf is declared without a macro... yes
checking whether vsnprintf is declared without a macro... yes
checking absolute name of <stdlib.h>... "///opt/bw/gcc12/lib/gcc/x86_64--netbsd/12.2.0/include-fixed/stdlib.h"
checking whether _Exit is declared without a macro... yes
checking whether atoll is declared without a macro... yes
checking whether canonicalize_file_name is declared without a macro... no
checking whether getloadavg is declared without a macro... yes
checking whether getsubopt is declared without a macro... yes
checking whether grantpt is declared without a macro... yes
checking whether initstate is declared without a macro... yes
checking whether initstate_r is declared without a macro... no
checking whether mkdtemp is declared without a macro... yes
checking whether mkostemp is declared without a macro... yes
checking whether mkostemps is declared without a macro... yes
checking whether mkstemp is declared without a macro... yes
checking whether mkstemps is declared without a macro... no
checking whether posix_openpt is declared without a macro... yes
checking whether ptsname is declared without a macro... yes
checking whether ptsname_r is declared without a macro... yes
checking whether qsort_r is declared without a macro... no
checking whether random is declared without a macro... yes
checking whether random_r is declared without a macro... no
checking whether reallocarray is declared without a macro... yes
checking whether realpath is declared without a macro... yes
checking whether rpmatch is declared without a macro... no
checking whether secure_getenv is declared without a macro... no
checking whether setenv is declared without a macro... yes
checking whether setstate is declared without a macro... yes
checking whether setstate_r is declared without a macro... no
checking whether srandom is declared without a macro... yes
checking whether srandom_r is declared without a macro... no
checking whether strtod is declared without a macro... yes
checking whether strtoll is declared without a macro... yes
checking whether strtoull is declared without a macro... yes
checking whether unlockpt is declared without a macro... yes
checking whether unsetenv is declared without a macro... yes
checking for working strndup... yes
checking for working strnlen... yes
checking whether symlink handles trailing slash correctly... yes
checking whether symlinkat handles trailing slash correctly... yes
checking absolute name of <sys/stat.h>... (cached) "///usr/include/sys/stat.h"
checking for nlink_t... (cached) yes
checking whether fchmodat is declared without a macro... (cached) yes
checking whether fstat is declared without a macro... (cached) yes
checking whether fstatat is declared without a macro... (cached) yes
checking whether futimens is declared without a macro... (cached) yes
checking whether lchmod is declared without a macro... (cached) yes
checking whether lstat is declared without a macro... (cached) yes
checking whether mkdirat is declared without a macro... (cached) yes
checking whether mkfifo is declared without a macro... (cached) yes
checking whether mkfifoat is declared without a macro... (cached) yes
checking whether mknod is declared without a macro... (cached) yes
checking whether mknodat is declared without a macro... (cached) yes
checking whether stat is declared without a macro... (cached) yes
checking whether utimensat is declared without a macro... (cached) yes
checking whether localtime_r is declared... yes
checking whether localtime_r is compatible with its POSIX signature... yes
checking for timezone_t... yes
checking whether tzset clobbers localtime buffer... no
checking absolute name of <unistd.h>... "///usr/include/unistd.h"
checking whether chdir is declared without a macro... yes
checking whether chown is declared without a macro... yes
checking whether dup is declared without a macro... yes
checking whether dup2 is declared without a macro... yes
checking whether dup3 is declared without a macro... yes
checking whether environ is declared without a macro... no
checking whether euidaccess is declared without a macro... no
checking whether faccessat is declared without a macro... yes
checking whether fchdir is declared without a macro... yes
checking whether fchownat is declared without a macro... yes
checking whether fdatasync is declared without a macro... yes
checking whether fsync is declared without a macro... yes
checking whether ftruncate is declared without a macro... yes
checking whether getcwd is declared without a macro... yes
checking whether getdomainname is declared without a macro... yes
checking whether getdtablesize is declared without a macro... yes
checking whether getgroups is declared without a macro... yes
checking whether gethostname is declared without a macro... yes
checking whether getlogin is declared without a macro... yes
checking whether getlogin_r is declared without a macro... yes
checking whether getpagesize is declared without a macro... yes
checking whether getusershell is declared without a macro... yes
checking whether setusershell is declared without a macro... yes
checking whether endusershell is declared without a macro... yes
checking whether group_member is declared without a macro... no
checking whether isatty is declared without a macro... yes
checking whether lchown is declared without a macro... yes
checking whether link is declared without a macro... yes
checking whether linkat is declared without a macro... yes
checking whether lseek is declared without a macro... yes
checking whether pipe is declared without a macro... yes
checking whether pipe2 is declared without a macro... yes
checking whether pread is declared without a macro... yes
checking whether pwrite is declared without a macro... yes
checking whether readlink is declared without a macro... yes
checking whether readlinkat is declared without a macro... yes
checking whether rmdir is declared without a macro... yes
checking whether sethostname is declared without a macro... yes
checking whether sleep is declared without a macro... yes
checking whether symlink is declared without a macro... yes
checking whether symlinkat is declared without a macro... yes
checking whether truncate is declared without a macro... yes
checking whether ttyname_r is declared without a macro... yes
checking whether unlink is declared without a macro... yes
checking whether unlinkat is declared without a macro... yes
checking whether usleep is declared without a macro... yes
checking whether unlink honors trailing slashes... yes
checking whether unlink of a parent directory fails as it should... guessing yes
checking for unsetenv... yes
checking for unsetenv() return type... int
checking whether unsetenv obeys POSIX... yes
checking absolute name of <utime.h>... "///usr/include/utime.h"
checking whether utime is declared without a macro... yes
checking whether utimensat works... no
checking for ptrdiff_t... yes
checking for vasprintf... yes
checking absolute name of <wchar.h>... "///opt/bw/gcc12/lib/gcc/x86_64--netbsd/12.2.0/include-fixed/wchar.h"
checking whether btowc is declared without a macro... yes
checking whether wctob is declared without a macro... yes
checking whether mbsinit is declared without a macro... yes
checking whether mbrtowc is declared without a macro... yes
checking whether mbrlen is declared without a macro... yes
checking whether mbsrtowcs is declared without a macro... yes
checking whether mbsnrtowcs is declared without a macro... yes
checking whether wcrtomb is declared without a macro... yes
checking whether wcsrtombs is declared without a macro... yes
checking whether wcsnrtombs is declared without a macro... yes
checking whether wcwidth is declared without a macro... yes
checking whether wmemchr is declared without a macro... yes
checking whether wmemcmp is declared without a macro... yes
checking whether wmemcpy is declared without a macro... yes
checking whether wmemmove is declared without a macro... yes
checking whether wmemset is declared without a macro... yes
checking whether wcslen is declared without a macro... yes
checking whether wcsnlen is declared without a macro... yes
checking whether wcscpy is declared without a macro... yes
checking whether wcpcpy is declared without a macro... no
checking whether wcsncpy is declared without a macro... yes
checking whether wcpncpy is declared without a macro... no
checking whether wcscat is declared without a macro... yes
checking whether wcsncat is declared without a macro... yes
checking whether wcscmp is declared without a macro... yes
checking whether wcsncmp is declared without a macro... yes
checking whether wcscasecmp is declared without a macro... yes
checking whether wcsncasecmp is declared without a macro... yes
checking whether wcscoll is declared without a macro... yes
checking whether wcsxfrm is declared without a macro... yes
checking whether wcsdup is declared without a macro... yes
checking whether wcschr is declared without a macro... yes
checking whether wcsrchr is declared without a macro... yes
checking whether wcscspn is declared without a macro... yes
checking whether wcsspn is declared without a macro... yes
checking whether wcspbrk is declared without a macro... yes
checking whether wcsstr is declared without a macro... yes
checking whether wcstok is declared without a macro... yes
checking whether wcswidth is declared without a macro... yes
checking whether wcsftime is declared without a macro... yes
checking absolute name of <wctype.h>... "///usr/include/wctype.h"
checking whether iswcntrl works... yes
checking for towlower... yes
checking for wctype_t... yes
checking for wctrans_t... yes
checking whether wctype is declared without a macro... yes
checking whether iswctype is declared without a macro... yes
checking whether wctrans is declared without a macro... yes
checking whether towctrans is declared without a macro... yes
checking for stdint.h... (cached) yes
checking the archiver (ar) interface... (cached) ar
checking for mode_t... (cached) yes
checking for off_t... yes
checking for stdint.h... (cached) yes
checking for SIZE_MAX... (cached) yes
checking attr/error_context.h usability... no
checking attr/error_context.h presence... no
checking for attr/error_context.h... no
checking attr/libattr.h usability... no
checking attr/libattr.h presence... no
checking for attr/libattr.h... no
configure: WARNING: libattr development library was not found or not usable.
configure: WARNING: GNU patch will be built without xattr support.
checking for geteuid... yes
checking for getuid... yes
checking for raise... (cached) yes
checking for sigaction... yes
checking for sigprocmask... yes
checking for sigsetmask... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for DOS-style setmode... no
checking for ed... /bin/ed
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
m$

Compile is fine and then ALL tests fail horrifically :

if test -d ./.git                               \
        && git --version >/dev/null 2>&1; then                  \
  cd . &&                                               \
  git submodule --quiet foreach                                 \
      'test "$(git rev-parse "$sha1")"                  \
          = "$(git merge-base origin "$sha1")"'         \
    || { echo 'maint.mk: found non-public submodule commit' >&2;        \
         exit 1; };                                             \
else                                                            \
  : ;                                                           \
fi
/usr/pkg/bin/gmake  check-recursive
gmake[1]: Entering directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002'
Making check in lib
gmake[2]: Entering directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/lib'
/usr/pkg/bin/gmake  check-am
gmake[3]: Entering directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/lib'
gmake[3]: Nothing to be done for 'check-am'.
gmake[3]: Leaving directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/lib' gmake[2]: Leaving directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/lib'
Making check in src
gmake[2]: Entering directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/src'
gmake[2]: Nothing to be done for 'check'.
gmake[2]: Leaving directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/src'
Making check in tests
gmake[2]: Entering directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/tests'
/usr/pkg/bin/gmake  check-TESTS
gmake[3]: Entering directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/tests' gmake[4]: Entering directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/tests'
FAIL: asymmetric-hunks
FAIL: backup-prefix-suffix
FAIL: bad-filenames
FAIL: bad-usage
FAIL: concat-git-diff
XFAIL: context-format
FAIL: copy-rename
FAIL: corrupt-patch
FAIL: corrupt-reject-files
FAIL: create-delete
FAIL: create-directory
FAIL: criss-cross
FAIL: crlf-handling
XFAIL: dash-o-append
FAIL: deep-directories
FAIL: empty-files
FAIL: false-match
FAIL: fifo
FAIL: file-create-modes
FAIL: file-modes
FAIL: filename-choice
FAIL: git-binary-diff
FAIL: git-cleanup
FAIL: garbage
FAIL: global-reject-files
FAIL: inname
FAIL: line-numbers
FAIL: merge
FAIL: mangled-numbers-abort
FAIL: mixed-patch-types
FAIL: munged-context-format
FAIL: need-filename
FAIL: no-mode-change-git-diff
FAIL: no-newline-triggers-assert
FAIL: preserve-c-function-names
FAIL: preserve-mode-and-timestamp
FAIL: quoted-filenames
FAIL: read-only-files
FAIL: reject-format
FAIL: remember-backup-files
FAIL: remember-reject-files
FAIL: remove-directories
FAIL: symlinks
FAIL: unmodified-files
============================================================================
Testsuite summary for GNU patch 2.7.6
============================================================================
# TOTAL: 44
# PASS:  0
# SKIP:  0
# XFAIL: 2
# FAIL:  42
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
Please report to bug-patch@gnu.org
============================================================================
gmake[4]: *** [Makefile:1412: test-suite.log] Error 1
gmake[4]: Leaving directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/tests'
gmake[3]: *** [Makefile:1520: check-TESTS] Error 2
gmake[3]: Leaving directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/tests'
gmake[2]: *** [Makefile:1891: check-am] Error 2
gmake[2]: Leaving directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002/tests'
gmake[1]: *** [Makefile:1325: check-recursive] Error 1
gmake[1]: Leaving directory '/opt/bw/build/patch-2.7.6_NetBSD_9.3_AMD64.002'
gmake: *** [Makefile:1615: check] Error 2


Looks like some bashisms are the problem :

m$ find . | grep '\.log$'
./tests/asymmetric-hunks.log
./tests/backup-prefix-suffix.log
./tests/bad-filenames.log
./tests/bad-usage.log
./tests/concat-git-diff.log
./tests/context-format.log
./tests/copy-rename.log
./tests/corrupt-patch.log
./tests/corrupt-reject-files.log
./tests/create-delete.log
./tests/create-directory.log
./tests/criss-cross.log
./tests/crlf-handling.log
./tests/dash-o-append.log
./tests/deep-directories.log
./tests/empty-files.log
./tests/false-match.log
./tests/fifo.log
./tests/file-create-modes.log
./tests/file-modes.log
./tests/filename-choice.log
./tests/git-binary-diff.log
./tests/git-cleanup.log
./tests/garbage.log
./tests/global-reject-files.log
./tests/inname.log
./tests/line-numbers.log
./tests/merge.log
./tests/mangled-numbers-abort.log
./tests/mixed-patch-types.log
./tests/munged-context-format.log
./tests/need-filename.log
./tests/no-mode-change-git-diff.log
./tests/no-newline-triggers-assert.log
./tests/preserve-c-function-names.log
./tests/preserve-mode-and-timestamp.log
./tests/quoted-filenames.log
./tests/read-only-files.log
./tests/reject-format.log
./tests/remember-backup-files.log
./tests/symlinks.log
./tests/remember-reject-files.log
./tests/remove-directories.log
./tests/unmodified-files.log
./tests/test-suite.log
./config.log
m$
m$
m$
m$
m$ ls -l ./tests/test-suite.log
-rw-r--r--  1 dclarke  devl  5776 May  7 22:48 ./tests/test-suite.log
m$
m$
m$
m$ cat ./tests/test-suite.log
===========================================
   GNU patch 2.7.6: tests/test-suite.log
===========================================

# TOTAL: 44
# PASS:  0
# SKIP:  0
# XFAIL: 2
# FAIL:  42
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: asymmetric-hunks
======================

eval: 117: Syntax error: Bad substitution
FAIL asymmetric-hunks (exit status: 2)

FAIL: backup-prefix-suffix
==========================

eval: 117: Syntax error: Bad substitution
FAIL backup-prefix-suffix (exit status: 2)

FAIL: bad-filenames
===================

eval: 117: Syntax error: Bad substitution
FAIL bad-filenames (exit status: 2)

FAIL: bad-usage
===============

eval: 117: Syntax error: Bad substitution
FAIL bad-usage (exit status: 2)

FAIL: concat-git-diff
=====================

eval: 117: Syntax error: Bad substitution
FAIL concat-git-diff (exit status: 2)

XFAIL: context-format
=====================

eval: 117: Syntax error: Bad substitution
XFAIL context-format (exit status: 2)

FAIL: copy-rename
=================

eval: 117: Syntax error: Bad substitution
FAIL copy-rename (exit status: 2)

FAIL: corrupt-patch
===================

eval: 117: Syntax error: Bad substitution
FAIL corrupt-patch (exit status: 2)

FAIL: corrupt-reject-files
==========================

eval: 117: Syntax error: Bad substitution
FAIL corrupt-reject-files (exit status: 2)

FAIL: create-delete
===================

eval: 117: Syntax error: Bad substitution
FAIL create-delete (exit status: 2)

FAIL: create-directory
======================

eval: 117: Syntax error: Bad substitution
FAIL create-directory (exit status: 2)

FAIL: criss-cross
=================

eval: 117: Syntax error: Bad substitution
FAIL criss-cross (exit status: 2)

FAIL: crlf-handling
===================

eval: 117: Syntax error: Bad substitution
FAIL crlf-handling (exit status: 2)

XFAIL: dash-o-append
====================

eval: 117: Syntax error: Bad substitution
XFAIL dash-o-append (exit status: 2)

FAIL: deep-directories
======================

eval: 117: Syntax error: Bad substitution
FAIL deep-directories (exit status: 2)

FAIL: empty-files
=================

eval: 117: Syntax error: Bad substitution
FAIL empty-files (exit status: 2)

FAIL: false-match
=================

eval: 117: Syntax error: Bad substitution
FAIL false-match (exit status: 2)

FAIL: fifo
==========

eval: 117: Syntax error: Bad substitution
FAIL fifo (exit status: 2)

FAIL: file-create-modes
=======================

eval: 117: Syntax error: Bad substitution
FAIL file-create-modes (exit status: 2)

FAIL: file-modes
================

eval: 117: Syntax error: Bad substitution
FAIL file-modes (exit status: 2)

FAIL: filename-choice
=====================

eval: 117: Syntax error: Bad substitution
FAIL filename-choice (exit status: 2)

FAIL: git-binary-diff
=====================

eval: 117: Syntax error: Bad substitution
FAIL git-binary-diff (exit status: 2)

FAIL: git-cleanup
=================

eval: 117: Syntax error: Bad substitution
FAIL git-cleanup (exit status: 2)

FAIL: garbage
=============

eval: 117: Syntax error: Bad substitution
FAIL garbage (exit status: 2)

FAIL: global-reject-files
=========================

eval: 117: Syntax error: Bad substitution
FAIL global-reject-files (exit status: 2)

FAIL: inname
============

eval: 117: Syntax error: Bad substitution
FAIL inname (exit status: 2)

FAIL: line-numbers
==================

eval: 117: Syntax error: Bad substitution
FAIL line-numbers (exit status: 2)

FAIL: merge
===========

eval: 117: Syntax error: Bad substitution
FAIL merge (exit status: 2)

FAIL: mangled-numbers-abort
===========================

eval: 117: Syntax error: Bad substitution
FAIL mangled-numbers-abort (exit status: 2)

FAIL: mixed-patch-types
=======================

eval: 117: Syntax error: Bad substitution
FAIL mixed-patch-types (exit status: 2)

FAIL: munged-context-format
===========================

eval: 117: Syntax error: Bad substitution
FAIL munged-context-format (exit status: 2)

FAIL: need-filename
===================

eval: 117: Syntax error: Bad substitution
FAIL need-filename (exit status: 2)

FAIL: no-mode-change-git-diff
=============================

eval: 117: Syntax error: Bad substitution
FAIL no-mode-change-git-diff (exit status: 2)

FAIL: no-newline-triggers-assert
================================

eval: 117: Syntax error: Bad substitution
FAIL no-newline-triggers-assert (exit status: 2)

FAIL: preserve-c-function-names
===============================

eval: 117: Syntax error: Bad substitution
FAIL preserve-c-function-names (exit status: 2)

FAIL: preserve-mode-and-timestamp
=================================

eval: 117: Syntax error: Bad substitution
FAIL preserve-mode-and-timestamp (exit status: 2)

FAIL: quoted-filenames
======================

eval: 117: Syntax error: Bad substitution
FAIL quoted-filenames (exit status: 2)

FAIL: read-only-files
=====================

eval: 117: Syntax error: Bad substitution
FAIL read-only-files (exit status: 2)

FAIL: reject-format
===================

eval: 117: Syntax error: Bad substitution
FAIL reject-format (exit status: 2)

FAIL: remember-backup-files
===========================

eval: 117: Syntax error: Bad substitution
FAIL remember-backup-files (exit status: 2)

FAIL: remember-reject-files
===========================

eval: 117: Syntax error: Bad substitution
FAIL remember-reject-files (exit status: 2)

FAIL: remove-directories
========================

eval: 117: Syntax error: Bad substitution
FAIL remove-directories (exit status: 2)

FAIL: symlinks
==============

eval: 117: Syntax error: Bad substitution
FAIL symlinks (exit status: 2)

FAIL: unmodified-files
======================

eval: 117: Syntax error: Bad substitution
FAIL unmodified-files (exit status: 2)

m$

Seems to be a problem where a trivial Bourne shell for the user is not good enough?


--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
Four decades in production systems.


  • bizarre failur... Bug reports, suggestions, general discussion for GNU patch.
    • Re: bizar... Bruno Haible
      • Re: b... Bug reports, suggestions, general discussion for GNU patch.
        • R... Bug reports, suggestions, general discussion for GNU patch.
          • ... Bruno Haible
            • ... Bug reports, suggestions, general discussion for GNU patch.
              • ... Bruno Haible

Reply via email to