git: 71c92e6b94f0 - stable/14 - MFC: MFV: file 5.46.

From: Xin LI <delphij_at_FreeBSD.org>
Date: Sun, 22 Dec 2024 07:37:38 UTC
The branch stable/14 has been updated by delphij:

URL: https://cgit.FreeBSD.org/src/commit/?id=71c92e6b94f0757ba698352888e98363495b5c44

commit 71c92e6b94f0757ba698352888e98363495b5c44
Author:     Xin LI <delphij@FreeBSD.org>
AuthorDate: 2024-12-08 19:07:01 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2024-12-22 07:37:20 +0000

    MFC: MFV: file 5.46.
    
    (cherry picked from commit ae316d1d1cffd71ab7751f94e10118777a88e027)
---
 contrib/file/ChangeLog                             |   32 +
 contrib/file/Makefile.in                           |    1 +
 contrib/file/aclocal.m4                            |    4 +-
 contrib/file/config.h.in                           |  137 +-
 contrib/file/configure                             | 3017 ++++++++++++--------
 contrib/file/configure.ac                          |   35 +-
 contrib/file/doc/Makefile.in                       |    1 +
 contrib/file/doc/file.man                          |    6 +-
 contrib/file/doc/libmagic.man                      |   29 +-
 contrib/file/doc/magic.man                         |  112 +-
 contrib/file/ltmain.sh                             |  863 ++++--
 contrib/file/m4/libtool.m4                         |  227 +-
 contrib/file/m4/ltoptions.m4                       |    4 +-
 contrib/file/m4/ltsugar.m4                         |    2 +-
 contrib/file/m4/ltversion.m4                       |   13 +-
 contrib/file/m4/lt~obsolete.m4                     |    4 +-
 contrib/file/magic/Magdir/acorn                    |   35 +-
 contrib/file/magic/Magdir/adventure                |    4 +-
 contrib/file/magic/Magdir/algol68                  |    4 +-
 contrib/file/magic/Magdir/android                  |   14 +-
 contrib/file/magic/Magdir/animation                |  126 +-
 contrib/file/magic/Magdir/apple                    |   58 +-
 contrib/file/magic/Magdir/archive                  |  291 +-
 contrib/file/magic/Magdir/aria                     |    2 +
 contrib/file/magic/Magdir/arm                      |   11 +-
 contrib/file/magic/Magdir/asf                      |   14 +-
 contrib/file/magic/Magdir/audio                    |  123 +-
 contrib/file/magic/Magdir/ber                      |    3 +-
 contrib/file/magic/Magdir/biosig                   |    6 +-
 contrib/file/magic/Magdir/bsdi                     |    9 +-
 contrib/file/magic/Magdir/c64                      |  158 +-
 contrib/file/magic/Magdir/cafebabe                 |   91 +-
 contrib/file/magic/Magdir/cbor                     |    4 +-
 contrib/file/magic/Magdir/claris                   |   10 +-
 contrib/file/magic/Magdir/coff                     |  179 +-
 contrib/file/magic/Magdir/commands                 |   14 +-
 contrib/file/magic/Magdir/compress                 |   27 +-
 contrib/file/magic/Magdir/console                  |  426 ++-
 contrib/file/magic/Magdir/ctf                      |    1 +
 contrib/file/magic/Magdir/database                 |   41 +-
 contrib/file/magic/Magdir/dataone                  |   13 +-
 contrib/file/magic/Magdir/diff                     |  125 +-
 contrib/file/magic/Magdir/digital                  |   20 +-
 contrib/file/magic/Magdir/efi                      |   45 +-
 contrib/file/magic/Magdir/elf                      |   32 +-
 contrib/file/magic/Magdir/epoc                     |   37 +-
 contrib/file/magic/Magdir/espressif                |    4 +-
 contrib/file/magic/Magdir/filesystems              |  179 +-
 contrib/file/magic/Magdir/firmware                 |  146 +-
 contrib/file/magic/Magdir/fonts                    |   36 +-
 contrib/file/magic/Magdir/frame                    |  120 +-
 contrib/file/magic/Magdir/games                    |   78 +-
 contrib/file/magic/Magdir/gentoo                   |   22 +-
 contrib/file/magic/Magdir/geo                      |    6 +-
 contrib/file/magic/Magdir/geos                     |   11 +-
 contrib/file/magic/Magdir/hitachi-sh               |   18 +-
 contrib/file/magic/Magdir/hp                       |   25 +-
 contrib/file/magic/Magdir/ibm370                   |   14 +-
 contrib/file/magic/Magdir/ibm6000                  |    9 +-
 contrib/file/magic/Magdir/iff                      |   23 +-
 contrib/file/magic/Magdir/images                   |  629 +++-
 contrib/file/magic/Magdir/ispell                   |  190 +-
 contrib/file/magic/Magdir/javascript               |   29 +-
 contrib/file/magic/Magdir/jpeg                     |   55 +-
 contrib/file/magic/Magdir/keyman                   |   14 +
 contrib/file/magic/Magdir/lammps                   |    5 +-
 contrib/file/magic/Magdir/lauterbach               |    7 +
 contrib/file/magic/Magdir/linux                    |  415 ++-
 contrib/file/magic/Magdir/lisp                     |   12 +-
 contrib/file/magic/Magdir/magic                    |   47 +-
 contrib/file/magic/Magdir/mail.news                |   22 +-
 contrib/file/magic/Magdir/map                      |    3 +-
 contrib/file/magic/Magdir/meteorological           |   17 +-
 contrib/file/magic/Magdir/mips                     |  180 +-
 contrib/file/magic/Magdir/mmdf                     |   23 +-
 contrib/file/magic/Magdir/motorola                 |    8 +-
 contrib/file/magic/Magdir/msdos                    | 1309 +++++++--
 contrib/file/magic/Magdir/msooxml                  |   37 +-
 contrib/file/magic/Magdir/msvc                     |   13 +-
 contrib/file/magic/Magdir/msx                      |   31 +-
 contrib/file/magic/Magdir/music                    |    4 +-
 contrib/file/magic/Magdir/nasa                     |    3 +-
 contrib/file/magic/Magdir/ole2compounddocs         |   54 +-
 contrib/file/magic/Magdir/olf                      |   14 +-
 contrib/file/magic/Magdir/pack                     |  101 +
 contrib/file/magic/Magdir/pc88                     |   24 -
 contrib/file/magic/Magdir/pdp                      |   16 +-
 contrib/file/magic/Magdir/pgp                      |  140 +-
 contrib/file/magic/Magdir/plan9                    |    8 +-
 contrib/file/magic/Magdir/printer                  |   28 +-
 contrib/file/magic/Magdir/python                   |   33 +-
 contrib/file/magic/Magdir/revision                 |   27 +-
 contrib/file/magic/Magdir/riff                     |   89 +-
 contrib/file/magic/Magdir/rpm                      |   12 +-
 contrib/file/magic/Magdir/sgml                     |   98 +-
 contrib/file/magic/Magdir/sharc                    |    6 +-
 contrib/file/magic/Magdir/sniffer                  |    8 +-
 contrib/file/magic/Magdir/sql                      |   95 +-
 contrib/file/magic/Magdir/ssh                      |   45 +
 contrib/file/magic/Magdir/ssl                      |   22 +-
 contrib/file/magic/Magdir/sun                      |   17 +-
 contrib/file/magic/Magdir/symbos                   |    3 +-
 contrib/file/magic/Magdir/terminfo                 |   14 +-
 contrib/file/magic/Magdir/uf2                      |   40 +-
 contrib/file/magic/Magdir/uxn                      |   18 +
 contrib/file/magic/Magdir/varied.script            |    5 +-
 contrib/file/magic/Magdir/vax                      |    4 +-
 contrib/file/magic/Magdir/virtual                  |   38 +-
 contrib/file/magic/Magdir/weak                     |    1 +
 contrib/file/magic/Magdir/windows                  |  167 +-
 contrib/file/magic/Magdir/wordprocessors           |   50 +-
 contrib/file/magic/Magdir/xenix                    |  136 +-
 contrib/file/magic/Magdir/xilinx                   |   49 +-
 contrib/file/magic/Magdir/yara                     |   16 +-
 contrib/file/magic/Makefile.am                     |    7 +-
 contrib/file/magic/Makefile.in                     |    8 +-
 contrib/file/python/Makefile.in                    |    1 +
 contrib/file/src/Makefile.in                       |    1 +
 contrib/file/src/apprentice.c                      |  104 +-
 contrib/file/src/cdf.c                             |  108 +-
 contrib/file/src/cdf.h                             |  131 +-
 contrib/file/src/cdf_time.c                        |   22 +-
 contrib/file/src/compress.c                        |   77 +-
 contrib/file/src/der.c                             |   22 +-
 contrib/file/src/der.h                             |    4 +-
 contrib/file/src/encoding.c                        |    4 +-
 contrib/file/src/file.c                            |   10 +-
 contrib/file/src/file.h                            |   69 +-
 contrib/file/src/funcs.c                           |   19 +-
 contrib/file/src/is_csv.c                          |    9 +-
 contrib/file/src/magic.c                           |   27 +-
 contrib/file/src/magic.h.in                        |    5 +-
 contrib/file/src/mygetopt.h                        |    9 +-
 contrib/file/src/print.c                           |   50 +-
 contrib/file/src/readelf.c                         |  150 +-
 contrib/file/src/readelf.h                         |   31 +
 contrib/file/src/seccomp.c                         |  103 +-
 contrib/file/src/softmagic.c                       |  148 +-
 contrib/file/tests/Makefile.am                     |   21 +
 contrib/file/tests/Makefile.in                     |   22 +
 contrib/file/tests/keyman-0.result                 |    1 +
 contrib/file/tests/keyman-0.testfile               |  Bin 0 -> 1494 bytes
 contrib/file/tests/keyman-1.result                 |    1 +
 contrib/file/tests/keyman-1.testfile               |  Bin 0 -> 378 bytes
 contrib/file/tests/keyman-2.result                 |    1 +
 contrib/file/tests/keyman-2.testfile               |  Bin 0 -> 1092 bytes
 contrib/file/tests/multiple.result                 |    2 +-
 contrib/file/tests/rpm-v3.0-bin-aarch64.result     |    1 +
 contrib/file/tests/rpm-v3.0-bin-aarch64.testfile   |  Bin 0 -> 6361 bytes
 contrib/file/tests/rpm-v3.0-bin-powerpc64.result   |    1 +
 contrib/file/tests/rpm-v3.0-bin-powerpc64.testfile |  Bin 0 -> 6309 bytes
 contrib/file/tests/rpm-v3.0-bin-s390x.result       |    1 +
 contrib/file/tests/rpm-v3.0-bin-s390x.testfile     |  Bin 0 -> 6301 bytes
 contrib/file/tests/rpm-v3.0-bin-x86_64.result      |    1 +
 contrib/file/tests/rpm-v3.0-bin-x86_64.testfile    |  Bin 0 -> 6365 bytes
 contrib/file/tests/rpm-v3.0-src.result             |    1 +
 contrib/file/tests/rpm-v3.0-src.testfile           |  Bin 0 -> 6554 bytes
 contrib/file/tests/searchbug.magic                 |   12 +
 contrib/file/tests/searchbug.result                |    1 +
 contrib/file/tests/searchbug.testfile              |    1 +
 contrib/file/tests/uf2.result                      |    2 +-
 contrib/file/tests/utf16xmlsvg.result              |    1 +
 contrib/file/tests/utf16xmlsvg.testfile            |  Bin 0 -> 5564 bytes
 lib/libmagic/config.h                              |  147 +-
 164 files changed, 8963 insertions(+), 3905 deletions(-)

diff --git a/contrib/file/ChangeLog b/contrib/file/ChangeLog
index fdf1cff6e2d3..d2dfbc14b77f 100644
--- a/contrib/file/ChangeLog
+++ b/contrib/file/ChangeLog
@@ -1,3 +1,35 @@
+2024-11-27  14:44  Christos Zoulas <christos@zoulas.com>
+
+	* release 5.46
+	* Add OFFPOSITIVE
+
+2024-11-25  13:56  Christos Zoulas <christos@zoulas.com>
+	
+	* avoid leaking symbols in libmagic
+
+2024-11-10  13:56  Christos Zoulas <christos@zoulas.com>
+	
+	* PR/562: jsummers: Search/regex offsets are absolute to the
+	  beginning of the file, so adjust them by subtracting the
+	  offset that the "use" starts so that we don't double-count it.
+
+
+2024-11-09  19:30  Christos Zoulas <christos@zoulas.com>
+ 	* PR/543: matshch: bump nbuf so we can get the flags into the buffer.
+
+
+2024-11-02  14:34  Christos Zoulas <christos@zoulas.com>
+
+ 	* Add Android elf notes (enh)
+
+2023-12-29  12:55  Christos Zoulas <christos@zoulas.com>
+
+	* Add limit for number of magic warnings allowed
+
+2023-07-29  12:55  Christos Zoulas <christos@zoulas.com>
+
+	* check regex bounds (found by clusterfuzz)
+
 2023-07-27  15:45  Christos Zoulas <christos@zoulas.com>
 
 	* release 5.45
diff --git a/contrib/file/Makefile.in b/contrib/file/Makefile.in
index 4ce98d934433..8c72613f17f9 100644
--- a/contrib/file/Makefile.in
+++ b/contrib/file/Makefile.in
@@ -264,6 +264,7 @@ EGREP = @EGREP@
 ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 GREP = @GREP@
 HAVE_VISIBILITY = @HAVE_VISIBILITY@
 INSTALL = @INSTALL@
diff --git a/contrib/file/aclocal.m4 b/contrib/file/aclocal.m4
index 3ccd6030e97b..82f7c4bcaacb 100644
--- a/contrib/file/aclocal.m4
+++ b/contrib/file/aclocal.m4
@@ -14,8 +14,8 @@
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
-[m4_warning([this file was generated for autoconf 2.71.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
+[m4_warning([this file was generated for autoconf 2.72.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
diff --git a/contrib/file/config.h.in b/contrib/file/config.h.in
index 5ae30c61edd1..9391b4e7dd71 100644
--- a/contrib/file/config.h.in
+++ b/contrib/file/config.h.in
@@ -12,10 +12,10 @@
 /* Define for ELF core file support */
 #undef ELFCORE
 
-/* Define to 1 if you have the `asctime_r' function. */
+/* Define to 1 if you have the 'asctime_r' function. */
 #undef HAVE_ASCTIME_R
 
-/* Define to 1 if you have the `asprintf' function. */
+/* Define to 1 if you have the 'asprintf' function. */
 #undef HAVE_ASPRINTF
 
 /* Define to 1 if you have the <byteswap.h> header file. */
@@ -24,24 +24,24 @@
 /* Define to 1 if you have the <bzlib.h> header file. */
 #undef HAVE_BZLIB_H
 
-/* Define to 1 if you have the `ctime_r' function. */
+/* Define to 1 if you have the 'ctime_r' function. */
 #undef HAVE_CTIME_R
 
 /* HAVE_DAYLIGHT */
 #undef HAVE_DAYLIGHT
 
-/* Define to 1 if you have the declaration of `daylight', and to 0 if you
+/* Define to 1 if you have the declaration of 'daylight', and to 0 if you
    don't. */
 #undef HAVE_DECL_DAYLIGHT
 
-/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
+/* Define to 1 if you have the declaration of 'tzname', and to 0 if you don't.
    */
 #undef HAVE_DECL_TZNAME
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the `dprintf' function. */
+/* Define to 1 if you have the 'dprintf' function. */
 #undef HAVE_DPRINTF
 
 /* Define to 1 if you have the <err.h> header file. */
@@ -50,63 +50,69 @@
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
-/* Define to 1 if you have the `fmtcheck' function. */
+/* Define to 1 if you have the 'fmtcheck' function. */
 #undef HAVE_FMTCHECK
 
-/* Define to 1 if you have the `fork' function. */
+/* Define to 1 if you have the 'fork' function. */
 #undef HAVE_FORK
 
-/* Define to 1 if you have the `freelocale' function. */
+/* Define to 1 if you have the 'freelocale' function. */
 #undef HAVE_FREELOCALE
 
-/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+/* Define to 1 if fseeko (and ftello) are declared in stdio.h. */
 #undef HAVE_FSEEKO
 
-/* Define to 1 if you have the `getline' function. */
+/* Define to 1 if you have the 'getline' function. */
 #undef HAVE_GETLINE
 
 /* Define to 1 if you have the <getopt.h> header file. */
 #undef HAVE_GETOPT_H
 
-/* Define to 1 if you have the `getopt_long' function. */
+/* Define to 1 if you have the 'getopt_long' function. */
 #undef HAVE_GETOPT_LONG
 
-/* Define to 1 if you have the `getpagesize' function. */
+/* Define to 1 if you have the 'getpagesize' function. */
 #undef HAVE_GETPAGESIZE
 
-/* Define to 1 if you have the `gmtime_r' function. */
+/* Define to 1 if you have the 'gmtime_r' function. */
 #undef HAVE_GMTIME_R
 
-/* Define to 1 if the system has the type `intptr_t'. */
+/* Define to 1 if the system has the type 'intptr_t'. */
 #undef HAVE_INTPTR_T
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the `bz2' library (-lbz2). */
+/* Define to 1 if you have the 'bz2' library (-lbz2). */
 #undef HAVE_LIBBZ2
 
-/* Define to 1 if you have the `gnurx' library (-lgnurx). */
+/* Define to 1 if you have the 'gnurx' library (-lgnurx). */
 #undef HAVE_LIBGNURX
 
-/* Define to 1 if you have the `lz' library (-llz). */
+/* Define to 1 if you have the 'lrzip' library (-llrzip). */
+#undef HAVE_LIBLRZIP
+
+/* Define to 1 if you have the 'lz' library (-llz). */
 #undef HAVE_LIBLZ
 
-/* Define to 1 if you have the `lzma' library (-llzma). */
+/* Define to 1 if you have the 'lzma' library (-llzma). */
 #undef HAVE_LIBLZMA
 
-/* Define to 1 if you have the `seccomp' library (-lseccomp). */
+/* Define to 1 if you have the 'seccomp' library (-lseccomp). */
 #undef HAVE_LIBSECCOMP
 
-/* Define to 1 if you have the `z' library (-lz). */
+/* Define to 1 if you have the 'z' library (-lz). */
 #undef HAVE_LIBZ
 
-/* Define to 1 if you have the `zstd' library (-lzstd). */
+/* Define to 1 if you have the 'zstd' library (-lzstd). */
 #undef HAVE_LIBZSTD
 
-/* Define to 1 if you have the `localtime_r' function. */
+/* Define to 1 if you have the 'localtime_r' function. */
 #undef HAVE_LOCALTIME_R
 
+/* Define to 1 if you have the <Lrzip.h> header file. */
+#undef HAVE_LRZIP_H
+
 /* Define to 1 if you have the <lzlib.h> header file. */
 #undef HAVE_LZLIB_H
 
@@ -119,31 +125,31 @@
 /* Define to 1 if <wchar.h> declares mbstate_t. */
 #undef HAVE_MBSTATE_T
 
-/* Define to 1 if you have the `memmem' function. */
+/* Define to 1 if you have the 'memmem' function. */
 #undef HAVE_MEMMEM
 
 /* Define to 1 if you have the <minix/config.h> header file. */
 #undef HAVE_MINIX_CONFIG_H
 
-/* Define to 1 if you have the `mkostemp' function. */
+/* Define to 1 if you have the 'mkostemp' function. */
 #undef HAVE_MKOSTEMP
 
-/* Define to 1 if you have the `mkstemp' function. */
+/* Define to 1 if you have the 'mkstemp' function. */
 #undef HAVE_MKSTEMP
 
-/* Define to 1 if you have a working `mmap' system call. */
+/* Define to 1 if you have a working 'mmap' system call. */
 #undef HAVE_MMAP
 
-/* Define to 1 if you have the `newlocale' function. */
+/* Define to 1 if you have the 'newlocale' function. */
 #undef HAVE_NEWLOCALE
 
-/* Define to 1 if you have the `pipe2' function. */
+/* Define to 1 if you have the 'pipe2' function. */
 #undef HAVE_PIPE2
 
-/* Define to 1 if you have the `posix_spawnp' function. */
+/* Define to 1 if you have the 'posix_spawnp' function. */
 #undef HAVE_POSIX_SPAWNP
 
-/* Define to 1 if you have the `pread' function. */
+/* Define to 1 if you have the 'pread' function. */
 #undef HAVE_PREAD
 
 /* Have sig_t type */
@@ -161,7 +167,7 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define to 1 if you have the `strcasestr' function. */
+/* Define to 1 if you have the 'strcasestr' function. */
 #undef HAVE_STRCASESTR
 
 /* Define to 1 if you have the <strings.h> header file. */
@@ -170,28 +176,28 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
-/* Define to 1 if you have the `strlcat' function. */
+/* Define to 1 if you have the 'strlcat' function. */
 #undef HAVE_STRLCAT
 
-/* Define to 1 if you have the `strlcpy' function. */
+/* Define to 1 if you have the 'strlcpy' function. */
 #undef HAVE_STRLCPY
 
-/* Define to 1 if you have the `strndup' function. */
+/* Define to 1 if you have the 'strndup' function. */
 #undef HAVE_STRNDUP
 
-/* Define to 1 if you have the `strtof' function. */
+/* Define to 1 if you have the 'strtof' function. */
 #undef HAVE_STRTOF
 
 /* HAVE_STRUCT_OPTION */
 #undef HAVE_STRUCT_OPTION
 
-/* Define to 1 if `st_rdev' is a member of `struct stat'. */
+/* Define to 1 if 'st_rdev' is a member of 'struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_RDEV
 
-/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */
+/* Define to 1 if 'tm_gmtoff' is a member of 'struct tm'. */
 #undef HAVE_STRUCT_TM_TM_GMTOFF
 
-/* Define to 1 if `tm_zone' is a member of `struct tm'. */
+/* Define to 1 if 'tm_zone' is a member of 'struct tm'. */
 #undef HAVE_STRUCT_TM_TM_ZONE
 
 /* Define to 1 if you have the <sys/bswap.h> header file. */
@@ -233,28 +239,28 @@
 /* HAVE_TZNAME */
 #undef HAVE_TZNAME
 
-/* Define to 1 if the system has the type `uintptr_t'. */
+/* Define to 1 if the system has the type 'uintptr_t'. */
 #undef HAVE_UINTPTR_T
 
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to 1 if you have the `uselocale' function. */
+/* Define to 1 if you have the 'uselocale' function. */
 #undef HAVE_USELOCALE
 
-/* Define to 1 if you have the `utime' function. */
+/* Define to 1 if you have the 'utime' function. */
 #undef HAVE_UTIME
 
-/* Define to 1 if you have the `utimes' function. */
+/* Define to 1 if you have the 'utimes' function. */
 #undef HAVE_UTIMES
 
 /* Define to 1 if you have the <utime.h> header file. */
 #undef HAVE_UTIME_H
 
-/* Define to 1 if you have the `vasprintf' function. */
+/* Define to 1 if you have the 'vasprintf' function. */
 #undef HAVE_VASPRINTF
 
-/* Define to 1 if you have the `vfork' function. */
+/* Define to 1 if you have the 'vfork' function. */
 #undef HAVE_VFORK
 
 /* Define to 1 if you have the <vfork.h> header file. */
@@ -270,13 +276,13 @@
 /* Define to 1 if you have the <wctype.h> header file. */
 #undef HAVE_WCTYPE_H
 
-/* Define to 1 if you have the `wcwidth' function. */
+/* Define to 1 if you have the 'wcwidth' function. */
 #undef HAVE_WCWIDTH
 
-/* Define to 1 if `fork' works. */
+/* Define to 1 if 'fork' works. */
 #undef HAVE_WORKING_FORK
 
-/* Define to 1 if `vfork' works. */
+/* Define to 1 if 'vfork' works. */
 #undef HAVE_WORKING_VFORK
 
 /* Define to 1 if you have the <xlocale.h> header file. */
@@ -291,17 +297,20 @@
 /* Define to 1 if you have the <zstd.h> header file. */
 #undef HAVE_ZSTD_H
 
+/* Enable lrziplib compression support */
+#undef LRZIPLIBSUPPORT
+
 /* Define to the sub-directory where libtool stores uninstalled libraries. */
 #undef LT_OBJDIR
 
 /* Enable lzlib compression support */
 #undef LZLIBSUPPORT
 
-/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
+/* Define to 1 if 'major', 'minor', and 'makedev' are declared in <mkdev.h>.
    */
 #undef MAJOR_IN_MKDEV
 
-/* Define to 1 if `major', `minor', and `makedev' are declared in
+/* Define to 1 if 'major', 'minor', and 'makedev' are declared in
    <sysmacros.h>. */
 #undef MAJOR_IN_SYSMACROS
 
@@ -326,15 +335,15 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Define to 1 if all of the C90 standard headers exist (not just the ones
+/* Define to 1 if all of the C89 standard headers exist (not just the ones
    required in a freestanding environment). This macro is provided for
    backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* Define to 1 if your <sys/time.h> declares 'struct tm'. */
 #undef TM_IN_SYS_TIME
 
-/* Enable extensions on AIX 3, Interix.  */
+/* Enable extensions on AIX, Interix, z/OS.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
@@ -395,11 +404,15 @@
 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
 # undef __STDC_WANT_IEC_60559_DFP_EXT__
 #endif
+/* Enable extensions specified by C23 Annex F.  */
+#ifndef __STDC_WANT_IEC_60559_EXT__
+# undef __STDC_WANT_IEC_60559_EXT__
+#endif
 /* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
 # undef __STDC_WANT_IEC_60559_FUNCS_EXT__
 #endif
-/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015.  */
 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
 # undef __STDC_WANT_IEC_60559_TYPES_EXT__
 #endif
@@ -449,12 +462,15 @@
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
-/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+/* Define to 1 if necessary to make fseeko visible. */
 #undef _LARGEFILE_SOURCE
 
-/* Define for large files, on AIX-style hosts. */
+/* Define to 1 on platforms where this makes off_t a 64-bit type. */
 #undef _LARGE_FILES
 
+/* Number of bits in time_t, on hosts where this is settable. */
+#undef _TIME_BITS
+
 /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
    <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
    #define below would cause a syntax error. */
@@ -470,6 +486,9 @@
    #define below would cause a syntax error. */
 #undef _UINT8_T
 
+/* Define to 1 on platforms where this makes time_t a 64-bit type. */
+#undef __MINGW_USE_VC2005_COMPAT
+
 /* Define to the type of a signed integer type of width exactly 32 bits if
    such a type exists and the standard includes do not define it. */
 #undef int32_t
@@ -485,13 +504,13 @@
 /* Define to a type if <wchar.h> does not define. */
 #undef mbstate_t
 
-/* Define to `long int' if <sys/types.h> does not define. */
+/* Define to 'long int' if <sys/types.h> does not define. */
 #undef off_t
 
 /* Define as a signed integer type capable of holding a process identifier. */
 #undef pid_t
 
-/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* Define as 'unsigned int' if <stddef.h> doesn't define. */
 #undef size_t
 
 /* Define to the type of an unsigned integer type of width exactly 16 bits if
@@ -514,5 +533,5 @@
    pointer, if such a type exists, and if the system does not define it. */
 #undef uintptr_t
 
-/* Define as `fork' if `vfork' does not work. */
+/* Define as 'fork' if 'vfork' does not work. */
 #undef vfork
diff --git a/contrib/file/configure b/contrib/file/configure
index 8043072f56f7..cdcdd746f562 100755
--- a/contrib/file/configure
+++ b/contrib/file/configure
@@ -1,11 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for file 5.45.
+# Generated by GNU Autoconf 2.72 for file 5.46.
 #
 # Report bugs to <christos@astron.com>.
 #
 #
-# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
 # Inc.
 #
 #
@@ -17,7 +17,6 @@
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
 then :
   emulate sh
@@ -26,12 +25,13 @@ then :
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else $as_nop
-  case `(set -o) 2>/dev/null` in #(
+else case e in #(
+  e) case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
   *) :
      ;;
+esac ;;
 esac
 fi
 
@@ -103,7 +103,7 @@ IFS=$as_save_IFS
 
      ;;
 esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
 # in which case we are not to be found in the path.
 if test "x$as_myself" = x; then
   as_myself=$0
@@ -133,15 +133,14 @@ case $- in # ((((
 esac
 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
 exit 255
   fi
   # We don't want this to propagate to other subprocesses.
           { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="as_nop=:
-if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+  as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
 then :
   emulate sh
   NULLCMD=:
@@ -149,12 +148,13 @@ then :
   # is contrary to our usage.  Disable this feature.
   alias -g '\${1+\"\$@\"}'='\"\$@\"'
   setopt NO_GLOB_SUBST
-else \$as_nop
-  case \`(set -o) 2>/dev/null\` in #(
+else case e in #(
+  e) case \`(set -o) 2>/dev/null\` in #(
   *posix*) :
     set -o posix ;; #(
   *) :
      ;;
+esac ;;
 esac
 fi
 "
@@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
 then :
 
-else \$as_nop
-  exitcode=1; echo positional parameters were not saved.
+else case e in #(
+  e) exitcode=1; echo positional parameters were not saved. ;;
+esac
 fi
 test x\$exitcode = x0 || exit 1
 blah=\$(echo \$(echo blah))
@@ -195,14 +196,15 @@ test \$(( 1 + 1 )) = 2 || exit 1"
   if (eval "$as_required") 2>/dev/null
 then :
   as_have_required=yes
-else $as_nop
-  as_have_required=no
+else case e in #(
+  e) as_have_required=no ;;
+esac
 fi
   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
 then :
 
-else $as_nop
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+  e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
@@ -235,12 +237,13 @@ IFS=$as_save_IFS
 if $as_found
 then :
 
-else $as_nop
-  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+else case e in #(
+  e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
 then :
   CONFIG_SHELL=$SHELL as_have_required=yes
-fi
+fi ;;
+esac
 fi
 
 
@@ -262,7 +265,7 @@ case $- in # ((((
 esac
 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
 exit 255
 fi
@@ -282,7 +285,8 @@ $0: a modern shell, or manually run the script under such a
 $0: shell if you do have one."
   fi
   exit 1
-fi
+fi ;;
+esac
 fi
 fi
 SHELL=${CONFIG_SHELL-/bin/sh}
@@ -321,14 +325,6 @@ as_fn_exit ()
   as_fn_set_status $1
   exit $1
 } # as_fn_exit
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
-  return $?
-}
-as_nop=as_fn_nop
 
 # as_fn_mkdir_p
 # -------------
@@ -397,11 +393,12 @@ then :
   {
     eval $1+=\$2
   }'
-else $as_nop
-  as_fn_append ()
+else case e in #(
+  e) as_fn_append ()
   {
     eval $1=\$$1\$2
-  }
+  } ;;
+esac
 fi # as_fn_append
 
 # as_fn_arith ARG...
@@ -415,21 +412,14 @@ then :
   {
     as_val=$(( $* ))
   }'
-else $as_nop
-  as_fn_arith ()
+else case e in #(
+  e) as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
-  }
+  } ;;
+esac
 fi # as_fn_arith
 
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
-  return $?
-}
-as_nop=as_fn_nop
 
 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 # ----------------------------------------
@@ -503,6 +493,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
     /[$]LINENO/=
   ' <$as_myself |
     sed '
+      t clear
+      :clear
       s/[$]LINENO.*/&-/
       t lineno
       b
@@ -551,7 +543,6 @@ esac
 as_echo='printf %s\n'
 as_echo_n='printf %s'
 
-
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
@@ -563,9 +554,9 @@ if (echo >conf$$.file) 2>/dev/null; then
   if ln -s conf$$.file conf$$ 2>/dev/null; then
     as_ln_s='ln -s'
     # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
+    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
+    # In both cases, we have to default to 'cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
       as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
@@ -590,10 +581,12 @@ as_test_x='test -x'
 as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
 
 # Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
 
 SHELL=${CONFIG_SHELL-/bin/sh}
 
@@ -621,8 +614,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='file'
 PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.45'
-PACKAGE_STRING='file 5.45'
+PACKAGE_VERSION='5.46'
+PACKAGE_STRING='file 5.46'
 PACKAGE_BUGREPORT='christos@astron.com'
 PACKAGE_URL=''
 
@@ -659,6 +652,7 @@ ac_includes_default="\
 
 ac_header_c_list=
 ac_func_c_list=
+enable_year2038=yes
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
@@ -679,6 +673,7 @@ ac_ct_AR
 AR
 DLLTOOL
 OBJDUMP
+FILECMD
 NM
 ac_ct_DUMPBIN
 DUMPBIN
@@ -802,6 +797,7 @@ enable_bzlib
 enable_xzlib
 enable_zstdlib
 enable_lzlib
+enable_lrziplib
 enable_libseccomp
 enable_fsect_man5
 enable_dependency_tracking
@@ -815,6 +811,7 @@ with_sysroot
 enable_libtool_lock
 enable_largefile
 enable_warnings
+enable_year2038
 '
       ac_precious_vars='build_alias
 host_alias
@@ -933,7 +930,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: \`$ac_useropt'"
+      as_fn_error $? "invalid feature name: '$ac_useropt'"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -959,7 +956,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: \`$ac_useropt'"
+      as_fn_error $? "invalid feature name: '$ac_useropt'"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1172,7 +1169,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: \`$ac_useropt'"
+      as_fn_error $? "invalid package name: '$ac_useropt'"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1188,7 +1185,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: \`$ac_useropt'"
+      as_fn_error $? "invalid package name: '$ac_useropt'"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1218,8 +1215,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+  -*) as_fn_error $? "unrecognized option: '$ac_option'
+Try '$0 --help' for more information"
     ;;
 
   *=*)
@@ -1227,7 +1224,7 @@ Try \`$0 --help' for more information"
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1277,7 +1274,7 @@ do
   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
-# There might be people who depend on the old broken behavior: `$host'
+# There might be people who depend on the old broken behavior: '$host'
*** 23372 LINES SKIPPED ***