svn commit: r323678 - in vendor/file/dist: . doc magic magic/Magdir python src tests
Gordon Tetlow
gordon at FreeBSD.org
Sun Sep 17 15:57:08 UTC 2017
Author: gordon
Date: Sun Sep 17 15:57:06 2017
New Revision: 323678
URL: https://svnweb.freebsd.org/changeset/base/323678
Log:
Vendor import of file 5.32.
Added:
vendor/file/dist/magic/Magdir/apache (contents, props changed)
vendor/file/dist/magic/Magdir/bhl
vendor/file/dist/magic/Magdir/gconv
vendor/file/dist/magic/Magdir/gpu
vendor/file/dist/magic/Magdir/webassembly
vendor/file/dist/magic/Magdir/yara
vendor/file/dist/tests/hddrawcopytool.result
vendor/file/dist/tests/hddrawcopytool.testfile (contents, props changed)
Modified:
vendor/file/dist/ChangeLog
vendor/file/dist/aclocal.m4
vendor/file/dist/config.guess
vendor/file/dist/config.sub
vendor/file/dist/configure
vendor/file/dist/configure.ac
vendor/file/dist/doc/file.man
vendor/file/dist/doc/libmagic.man
vendor/file/dist/doc/magic.man
vendor/file/dist/magic/Localstuff
vendor/file/dist/magic/Magdir/adventure
vendor/file/dist/magic/Magdir/amanda
vendor/file/dist/magic/Magdir/amigaos
vendor/file/dist/magic/Magdir/android
vendor/file/dist/magic/Magdir/animation
vendor/file/dist/magic/Magdir/apple
vendor/file/dist/magic/Magdir/archive
vendor/file/dist/magic/Magdir/att3b
vendor/file/dist/magic/Magdir/audio
vendor/file/dist/magic/Magdir/blackberry
vendor/file/dist/magic/Magdir/blender
vendor/file/dist/magic/Magdir/c-lang
vendor/file/dist/magic/Magdir/cad
vendor/file/dist/magic/Magdir/cafebabe
vendor/file/dist/magic/Magdir/clipper
vendor/file/dist/magic/Magdir/coff
vendor/file/dist/magic/Magdir/commands
vendor/file/dist/magic/Magdir/compress
vendor/file/dist/magic/Magdir/console
vendor/file/dist/magic/Magdir/cups
vendor/file/dist/magic/Magdir/database
vendor/file/dist/magic/Magdir/der
vendor/file/dist/magic/Magdir/diff
vendor/file/dist/magic/Magdir/dolby
vendor/file/dist/magic/Magdir/dump
vendor/file/dist/magic/Magdir/dyadic
vendor/file/dist/magic/Magdir/editors
vendor/file/dist/magic/Magdir/filesystems
vendor/file/dist/magic/Magdir/flash
vendor/file/dist/magic/Magdir/fonts
vendor/file/dist/magic/Magdir/fsav
vendor/file/dist/magic/Magdir/games
vendor/file/dist/magic/Magdir/geo
vendor/file/dist/magic/Magdir/gnu
vendor/file/dist/magic/Magdir/gpt
vendor/file/dist/magic/Magdir/gringotts
vendor/file/dist/magic/Magdir/hitachi-sh
vendor/file/dist/magic/Magdir/ibm370
vendor/file/dist/magic/Magdir/ibm6000
vendor/file/dist/magic/Magdir/icc
vendor/file/dist/magic/Magdir/images
vendor/file/dist/magic/Magdir/intel
vendor/file/dist/magic/Magdir/isz
vendor/file/dist/magic/Magdir/jpeg
vendor/file/dist/magic/Magdir/kerberos
vendor/file/dist/magic/Magdir/kml
vendor/file/dist/magic/Magdir/linux
vendor/file/dist/magic/Magdir/lisp
vendor/file/dist/magic/Magdir/m4
vendor/file/dist/magic/Magdir/macintosh
vendor/file/dist/magic/Magdir/make
vendor/file/dist/magic/Magdir/maple
vendor/file/dist/magic/Magdir/marc21
vendor/file/dist/magic/Magdir/mathematica
vendor/file/dist/magic/Magdir/metastore
vendor/file/dist/magic/Magdir/meteorological
vendor/file/dist/magic/Magdir/microfocus
vendor/file/dist/magic/Magdir/mime
vendor/file/dist/magic/Magdir/misctools
vendor/file/dist/magic/Magdir/modem
vendor/file/dist/magic/Magdir/mozilla
vendor/file/dist/magic/Magdir/msdos
vendor/file/dist/magic/Magdir/msvc
vendor/file/dist/magic/Magdir/msx
vendor/file/dist/magic/Magdir/mup
vendor/file/dist/magic/Magdir/nasa
vendor/file/dist/magic/Magdir/netbsd
vendor/file/dist/magic/Magdir/netscape
vendor/file/dist/magic/Magdir/nitpicker
vendor/file/dist/magic/Magdir/os2
vendor/file/dist/magic/Magdir/os9
vendor/file/dist/magic/Magdir/pbf
vendor/file/dist/magic/Magdir/pc88
vendor/file/dist/magic/Magdir/pc98
vendor/file/dist/magic/Magdir/pdf
vendor/file/dist/magic/Magdir/pdp
vendor/file/dist/magic/Magdir/perl
vendor/file/dist/magic/Magdir/pgf
vendor/file/dist/magic/Magdir/pgp
vendor/file/dist/magic/Magdir/printer
vendor/file/dist/magic/Magdir/project
vendor/file/dist/magic/Magdir/psdbms
vendor/file/dist/magic/Magdir/python
vendor/file/dist/magic/Magdir/riff
vendor/file/dist/magic/Magdir/ruby
vendor/file/dist/magic/Magdir/sccs
vendor/file/dist/magic/Magdir/scientific
vendor/file/dist/magic/Magdir/sendmail
vendor/file/dist/magic/Magdir/sequent
vendor/file/dist/magic/Magdir/sgml
vendor/file/dist/magic/Magdir/sharc
vendor/file/dist/magic/Magdir/sketch
vendor/file/dist/magic/Magdir/sql
vendor/file/dist/magic/Magdir/ssl
vendor/file/dist/magic/Magdir/sysex
vendor/file/dist/magic/Magdir/terminfo
vendor/file/dist/magic/Magdir/vms
vendor/file/dist/magic/Magdir/vmware
vendor/file/dist/magic/Magdir/vorbis
vendor/file/dist/magic/Magdir/windows
vendor/file/dist/magic/Magdir/xenix
vendor/file/dist/magic/Magdir/xilinx
vendor/file/dist/magic/Magdir/xwindows
vendor/file/dist/magic/Makefile.am
vendor/file/dist/magic/Makefile.in
vendor/file/dist/python/magic.py
vendor/file/dist/src/apprentice.c
vendor/file/dist/src/cdf.c
vendor/file/dist/src/cdf.h
vendor/file/dist/src/cdf_time.c
vendor/file/dist/src/compress.c
vendor/file/dist/src/der.c
vendor/file/dist/src/file.h
vendor/file/dist/src/fsmagic.c
vendor/file/dist/src/funcs.c
vendor/file/dist/src/is_tar.c
vendor/file/dist/src/magic.c
vendor/file/dist/src/magic.h.in
vendor/file/dist/src/print.c
vendor/file/dist/src/readcdf.c
vendor/file/dist/src/readelf.c
vendor/file/dist/src/readelf.h
vendor/file/dist/src/softmagic.c
vendor/file/dist/src/vasprintf.c
vendor/file/dist/tests/Makefile.am
vendor/file/dist/tests/Makefile.in
vendor/file/dist/tests/test.c
Modified: vendor/file/dist/ChangeLog
==============================================================================
--- vendor/file/dist/ChangeLog Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/ChangeLog Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,6 +1,60 @@
+2017-09-02 11:53 Christos Zoulas <christos at zoulas.com>
+
+ * release 5.32
+
+2017-08-28 16:37 Christos Zoulas <christos at zoulas.com>
+
+ * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)
+
+2017-08-27 03:55 Christos Zoulas <christos at zoulas.com>
+
+ * Fix always true condition (Thomas Jarosch)
+
+2017-05-24 17:30 Christos Zoulas <christos at zoulas.com>
+
+ * pickier parsing of numeric values in magic files.
+
+2017-05-23 17:55 Christos Zoulas <christos at zoulas.com>
+
+ * PR/615 add magic_getflags()
+
+2017-05-23 13:55 Christos Zoulas <christos at zoulas.com>
+
+ * release 5.31
+
+2017-03-17 20:32 Christos Zoulas <christos at zoulas.com>
+
+ * remove trailing spaces from magic files
+ * refactor is_tar
+ * better bounds checks for cdf
+
+2017-02-10 12:24 Christos Zoulas <christos at zoulas.com>
+
+ * release 5.30
+
+2017-02-07 23:27 Christos Zoulas <christos at zoulas.com>
+
+ * If we exceeded the offset in a search return no match
+ (Christoph Biedl)
+ * Be more lenient on corrupt CDF files (Christoph Biedl)
+
+2017-02-04 16:46 Christos Zoulas <christos at zoulas.com>
+
+ * pacify ubsan sign extension (oss-fuzz/524)
+
+2017-02-01 12:42 Christos Zoulas <christos at zoulas.com>
+
+ * off by one in cdf parsing (PR/593)
+ * report debugging sections in elf (PR/591)
+
+2016-11-06 10:52 Christos Zoulas <christos at zoulas.com>
+
+ * Allow @@@ in extensions
+ * Add missing overflow check in der magic (Jonas Wagner)
+
2016-10-25 10:40 Christos Zoulas <christos at zoulas.com>
- * release 5.28
+ * release 5.29
2016-10-24 11:20 Christos Zoulas <christos at zoulas.com>
@@ -387,7 +441,7 @@
`
2013-11-06 14:40 Christos Zoulas <christos at zoulas.com>
- * fix erroneous non-zero exit code from non-existant file and message
+ * fix erroneous non-zero exit code from non-existent file and message
2013-10-29 14:25 Christos Zoulas <christos at zoulas.com>
Modified: vendor/file/dist/aclocal.m4
==============================================================================
--- vendor/file/dist/aclocal.m4 Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/aclocal.m4 Sun Sep 17 15:57:06 2017 (r323678)
@@ -21,7 +21,7 @@ If you have problems, you may need to regenerate the b
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# visibility.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
Modified: vendor/file/dist/config.guess
==============================================================================
--- vendor/file/dist/config.guess Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/config.guess Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2015-03-04'
+timestamp='2017-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ timestamp='2015-03-04'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches at gnu.org>.
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2017 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."
@@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
+ # to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
- arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
@@ -221,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
@@ -237,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
@@ -249,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -265,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
@@ -373,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
- SUN_ARCH="i386"
+ SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH="x86_64"
+ SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -407,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
@@ -632,13 +642,13 @@ EOF
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
@@ -677,11 +687,11 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
+ if [ ${HP_ARCH} = hppa2.0w ]
then
eval $set_cc_for_build
@@ -694,12 +704,12 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -804,14 +814,14 @@ EOF
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -893,7 +903,7 @@ EOF
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
@@ -916,7 +926,7 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
@@ -962,6 +972,9 @@ EOF
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
+ k1om:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
@@ -987,6 +1000,9 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ mips64el:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
@@ -1019,6 +1035,9 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
@@ -1038,7 +1057,7 @@ EOF
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -1117,7 +1136,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@@ -1266,6 +1285,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1279,9 +1301,9 @@ EOF
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
@@ -1303,7 +1325,7 @@ EOF
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
@@ -1334,7 +1356,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
@@ -1376,7 +1398,7 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
@@ -1387,23 +1409,25 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
esac
cat >&2 <<EOF
$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches at gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
Modified: vendor/file/dist/config.sub
==============================================================================
--- vendor/file/dist/config.sub Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/config.sub Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2015-03-08'
+timestamp='2017-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ timestamp='2015-03-08'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -53,8 +53,7 @@ timestamp='2015-03-08'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches at gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2017 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."
@@ -118,7 +117,7 @@ case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
- kopensolaris*-gnu* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -255,6 +254,7 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
+ | ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
@@ -301,11 +301,12 @@ case $basic_machine in
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -376,6 +377,7 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
@@ -427,13 +429,15 @@ case $basic_machine in
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
+ | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@@ -518,7 +522,7 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
- asmjs)
+ asmjs)
basic_machine=asmjs-unknown
;;
aux)
@@ -641,6 +645,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@@ -1020,7 +1032,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
@@ -1030,7 +1042,7 @@ case $basic_machine in
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
@@ -1376,18 +1388,18 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@@ -1396,7 +1408,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1528,6 +1541,8 @@ case $os in
;;
-nacl*)
;;
+ -ios)
+ ;;
-none)
;;
*)
@@ -1622,6 +1637,9 @@ case $basic_machine in
;;
sparc-* | *-sun)
os=-sunos4.1.1
+ ;;
+ pru-*)
+ os=-elf
;;
*-be)
os=-beos
Modified: vendor/file/dist/configure
==============================================================================
--- vendor/file/dist/configure Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/configure Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for file 5.29.
+# Generated by GNU Autoconf 2.69 for file 5.32.
#
# Report bugs to <christos at astron.com>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='file'
PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.29'
-PACKAGE_STRING='file 5.29'
+PACKAGE_VERSION='5.32'
+PACKAGE_STRING='file 5.32'
PACKAGE_BUGREPORT='christos at astron.com'
PACKAGE_URL=''
@@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures file 5.29 to adapt to many kinds of systems.
+\`configure' configures file 5.32 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1398,7 +1398,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of file 5.29:";;
+ short | recursive ) echo "Configuration of file 5.32:";;
esac
cat <<\_ACEOF
@@ -1509,7 +1509,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-file configure 5.29
+file configure 5.32
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2165,7 +2165,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by file $as_me 5.29, which was
+It was created by file $as_me 5.32, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3031,7 +3031,7 @@ fi
# Define the identity of the package.
PACKAGE='file'
- VERSION='5.29'
+ VERSION='5.32'
cat >>confdefs.h <<_ACEOF
@@ -15075,7 +15075,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by file $as_me 5.29, which was
+This file was extended by file $as_me 5.32, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15141,7 +15141,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-file config.status 5.29
+file config.status 5.32
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Modified: vendor/file/dist/configure.ac
==============================================================================
--- vendor/file/dist/configure.ac Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/configure.ac Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([file],[5.29],[christos at astron.com])
+AC_INIT([file],[5.32],[christos at astron.com])
AM_INIT_AUTOMAKE([subdir-objects foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Modified: vendor/file/dist/doc/file.man
==============================================================================
--- vendor/file/dist/doc/file.man Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/doc/file.man Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,4 +1,4 @@
-.\" $File: file.man,v 1.124 2016/10/19 20:52:45 christos Exp $
+.\" $File: file.man,v 1.125 2017/01/03 11:24:46 christos Exp $
.Dd October 19, 2016
.Dt FILE __CSECTION__
.Os
@@ -238,8 +238,8 @@ or at least one filename argument must be present;
to test the standard input, use
.Sq -
as a filename argument.
-Please note that
-.Ar namefile
+Please note that
+.Ar namefile
is unwrapped and the enclosed filenames are processed when this option is
encountered and before any further options processing is done.
This allows one to process multiple lists of files with different command line
@@ -411,10 +411,10 @@ and
.Fl h
options.
.Sh SEE ALSO
-.Xr magic __FSECTION__ ,
.Xr hexdump 1 ,
.Xr od 1 ,
.Xr strings 1 ,
+.Xr magic __FSECTION__
.Sh STANDARDS CONFORMANCE
This program is believed to exceed the System V Interface Definition
of FILE(CMD), as near as one can determine from the vague language
@@ -530,16 +530,15 @@ John Gilmore revised the code extensively, making it b
the first version.
Geoff Collyer found several inadequacies
and provided some magic file entries.
-Contributions by the
+Contributions of the
.Sq \*[Am]
operator by Rob McMahon,
.Aq cudcv at warwick.ac.uk ,
1989.
.Pp
-Guy Harris,
+Guy Harris,
.Aq guy at netapp.com ,
made many changes from 1993 to the present.
-1989.
.Pp
Primary development and maintenance from 1990 to the present by
Christos Zoulas
@@ -587,7 +586,6 @@ program, and are not covered by the above license.
.Nm
returns 0 on success, and non-zero on error.
.Sh BUGS
-.Pp
Please report bugs and send patches to the bug tracker at
.Pa http://bugs.gw.com/
or the mailing list at
@@ -596,7 +594,6 @@ or the mailing list at
.Pa http://mx.gw.com/mailman/listinfo/file
first to subscribe).
.Sh TODO
-.Pp
Fix output so that tests for MIME and APPLE flags are not needed all
over the place, and actual output is only done in one place.
This needs a design.
@@ -645,16 +642,16 @@ Fix
.Dq name
and
.Dq use
-to check for consistency at compile time (duplicate
+to check for consistency at compile time (duplicate
.Dq name ,
.Dq use
pointing to undefined
.Dq name
).
-Make
+Make
.Dq name
/
-.Dq use
+.Dq use
more efficient by keeping a sorted list of names.
Special-case ^ to flip endianness in the parser so that it does not
have to be escaped, and document it.
Modified: vendor/file/dist/doc/libmagic.man
==============================================================================
--- vendor/file/dist/doc/libmagic.man Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/doc/libmagic.man Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,4 +1,4 @@
-.\" $File: libmagic.man,v 1.40 2016/03/31 17:51:12 christos Exp $
+.\" $File: libmagic.man,v 1.41 2017/05/23 21:54:07 christos Exp $
.\"
.\" Copyright (c) Christos Zoulas 2003.
.\" All Rights Reserved.
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 11, 2015
+.Dd May 23, 2017
.Dt LIBMAGIC 3
.Os
.Sh NAME
@@ -35,6 +35,7 @@
.Nm magic_errno ,
.Nm magic_descriptor ,
.Nm magic_buffer ,
+.Nm magic_getflags ,
.Nm magic_setflags ,
.Nm magic_check ,
.Nm magic_compile ,
@@ -64,6 +65,8 @@
.Ft const char *
.Fn magic_buffer "magic_t cookie" "const void *buffer" "size_t length"
.Ft int
+.Fn magic_getflags "magic_t cookie"
+.Ft int
.Fn magic_setflags "magic_t cookie" "int flags"
.Ft int
.Fn magic_check "magic_t cookie" "const char *filename"
@@ -204,6 +207,12 @@ function returns a textual description of the contents
argument with
.Ar length
bytes size.
+.Pp
+The
+.Fn magic_getflags
+functions returns a value representing current
+.Ar flags
+set.
.Pp
The
.Fn magic_setflags
Modified: vendor/file/dist/doc/magic.man
==============================================================================
--- vendor/file/dist/doc/magic.man Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/doc/magic.man Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,5 +1,5 @@
-.\" $File: magic.man,v 1.88 2016/07/27 09:42:49 rrt Exp $
-.Dd July 20, 2016
+.\" $File: magic.man,v 1.91 2017/02/12 15:30:08 christos Exp $
+.Dd February 12, 2017
.Dt MAGIC __FSECTION__
.Os
.\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems.
@@ -7,7 +7,7 @@
.Nm magic
.Nd file command's magic pattern file
.Sh DESCRIPTION
-This manual page documents the format of the magic file as
+This manual page documents the format of magic files as
used by the
.Xr file __CSECTION__
command, version __VERSION__.
@@ -17,13 +17,19 @@ command identifies the type of a file using,
among other tests,
a test for whether the file contains certain
.Dq "magic patterns" .
-The file
-.Pa __MAGIC__
-specifies what patterns are to be tested for, what message or
+The database of these
+.Dq "magic patterns"
+is usually located in a binary file in
+.Pa __MAGIC__.mgc
+or a directory of source text magic pattern fragment files in
+.Pa __MAGIC__ .
+The database specifies what patterns are to be tested for, what message or
MIME type to print if a particular pattern is found,
and additional information to extract from the file.
.Pp
-Each line of the file specifies a test to be performed.
+The format of the source fragment files that are used to build this database
+is as follows:
+Each line of a fragment file specifies a test to be performed.
A test compares the data starting at a particular offset
in the file with a byte value, a string or a numeric value.
If the test succeeds, a message is printed.
@@ -98,13 +104,13 @@ The following modifiers are supported:
.It B
A byte length (default).
.It H
-A 2 byte big endian length.
+A 4 byte big endian length.
.It h
-A 2 byte big little length.
+A 2 byte big endian length.
.It L
-A 4 byte big endian length.
+A 4 byte little endian length.
.It l
-A 4 byte big little length.
+A 2 byte little endian length.
.It J
The length includes itself in its count.
.El
@@ -651,7 +657,7 @@ start of the main indirect offset.
\*[Gt]\*[Gt]\*[Gt]\*[Gt](\*[Am]0xe.l+(-4)) string PK\e3\e4 \eb, ZIP self-extracting archive
.Ed
.Pp
-If you have a list of known avalues at a particular continuation level,
+If you have a list of known values at a particular continuation level,
and you want to provide a switch-like default case:
.Bd -literal -offset indent
# clear that continuation level match
Modified: vendor/file/dist/magic/Localstuff
==============================================================================
--- vendor/file/dist/magic/Localstuff Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/magic/Localstuff Sun Sep 17 15:57:06 2017 (r323678)
@@ -2,6 +2,6 @@
#------------------------------------------------------------------------------
# Localstuff: file(1) magic for locally observed files
#
-# $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $
+# $File: Localstuff,v 1.5 2007/01/12 17:38:27 christos Exp $
# Add any locally observed files here. Remember:
# text if readable, executable if runnable binary, data if unreadable.
Modified: vendor/file/dist/magic/Magdir/adventure
==============================================================================
--- vendor/file/dist/magic/Magdir/adventure Sun Sep 17 15:45:39 2017 (r323677)
+++ vendor/file/dist/magic/Magdir/adventure Sun Sep 17 15:57:06 2017 (r323678)
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: adventure,v 1.15 2015/09/07 10:03:21 christos Exp $
+# $File: adventure,v 1.17 2017/07/03 16:03:40 christos Exp $
# adventure: file(1) magic for Adventure game files
#
# from Allen Garvin <earendil at faeryland.tamu-commerce.edu>
@@ -36,11 +36,12 @@
>0 ubyte <9
>>16 belong&0xfe00f0f0 0x3030
>>>0 ubyte < 10
->>>>2 ubeshort < 10
+>>>>2 ubeshort x
>>>>>18 regex [0-9][0-9][0-9][0-9][0-9][0-9]
->>>>>>0 ubyte < 10 Infocom (Z-machine %d,
->>>>>>>2 ubeshort < 10 Release %d /
->>>>>>>>18 string >\0 Serial %.6s)
+>>>>>>0 ubyte < 10 Infocom (Z-machine %d
+>>>>>>>2 ubeshort x \b, Release %d
+>>>>>>>>18 string >\0 \b, Serial %.6s
+>>>>>>>>18 string x \b)
!:strength + 40
!:mime application/x-zmachine
@@ -78,7 +79,7 @@
!:mime application/x-tads
# Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
# 2-byte length N, the N-char name of the game file *without* a NUL (darn!),
-# "TADS2 save\n\r\032\0" and the interpreter version.
+# "TADS2 save\n\r\032\0" and the interpreter version.
0 string TADS2\ save/g TADS
>12 belong !0x0A0D1A00 saved game data, CORRUPTED
>12 belong 0x0A0D1A00
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list