This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libarchive configure 3.7.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ ./configure --target=powerpc64le-buildroot-linux-gnu --host=powerpc64le-buildroot-linux-gnu --build=aarch64-unknown-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix= --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-dependency-tracking --enable-ipv6 --disable-nls --enable-static --enable-shared --disable-bsdtar --disable-bsdcpio --disable-bsdcat --disable-acl --disable-xattr --with-bz2lib --without-libiconv-prefix --without-xml2 --with-lz4 --without-lzo2 --without-mbedtls --without-nettle --without-openssl --with-lzma --without-zstd ## --------- ## ## Platform. ## ## --------- ## hostname = asahi-mini uname -m = aarch64 uname -r = 6.4.0-asahi-10-1-ARCH uname -s = Linux uname -v = #1 SMP PREEMPT_DYNAMIC Sat, 02 Sep 2023 14:11:37 +0000 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /home/autobuild/autobuild/instance-10/output-1/host/bin/ PATH: /home/autobuild/autobuild/instance-10/output-1/host/sbin/ PATH: /home/autobuild/make/ PATH: /usr/local/sbin/ PATH: /usr/local/bin/ PATH: /usr/bin/ PATH: /usr/lib/jvm/default/bin/ PATH: /usr/bin/site_perl/ PATH: /usr/bin/vendor_perl/ PATH: /usr/bin/core_perl/ ## ----------- ## ## Core tests. ## ## ----------- ## configure:3081: looking for aux files: config.rpath ltmain.sh compile config.guess config.sub missing install-sh configure:3094: trying ./build/autoconf/ configure:3123: ./build/autoconf/config.rpath found configure:3123: ./build/autoconf/ltmain.sh found configure:3123: ./build/autoconf/compile found configure:3123: ./build/autoconf/config.guess found configure:3123: ./build/autoconf/config.sub found configure:3123: ./build/autoconf/missing found configure:3105: ./build/autoconf/install-sh found configure:3259: checking for a BSD-compatible install configure:3332: result: /usr/bin/install -c configure:3343: checking whether build environment is sane configure:3398: result: yes configure:3454: checking for powerpc64le-buildroot-linux-gnu-strip configure:3486: result: /bin/true configure:3557: checking for a race-free mkdir -p configure:3601: result: /usr/bin/mkdir -p configure:3608: checking for gawk configure:3629: found /home/autobuild/autobuild/instance-10/output-1/host/bin/gawk configure:3640: result: gawk configure:3651: checking whether make sets $(MAKE) configure:3674: result: yes configure:3704: checking whether make supports nested variables configure:3722: result: yes configure:3859: checking whether to enable maintainer-specific portions of Makefiles configure:3869: result: yes configure:3894: checking whether make supports nested variables configure:3912: result: yes configure:3993: checking build system type configure:4008: result: aarch64-unknown-linux-gnu configure:4028: checking host system type configure:4042: result: powerpc64le-buildroot-linux-gnu configure:4110: checking for powerpc64le-buildroot-linux-gnu-gcc configure:4142: result: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc configure:4540: checking for C compiler version configure:4549: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc --version >&5 powerpc64le-buildroot-linux-gnu-gcc.br_real (Buildroot 2023.08-297-gab4f3fafaa) 12.3.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. configure:4560: $? = 0 configure:4549: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -v >&5 Using built-in specs. COLLECT_GCC=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc.br_real COLLECT_LTO_WRAPPER=/home/autobuild/autobuild/instance-10/output-1/host/libexec/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/lto-wrapper Target: powerpc64le-buildroot-linux-gnu Configured with: ./configure --prefix=/home/autobuild/autobuild/instance-10/output-1/host --sysconfdir=/home/autobuild/autobuild/instance-10/output-1/host/etc --enable-static --target=powerpc64le-buildroot-linux-gnu --with-sysroot=/home/autobuild/autobuild/instance-10/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --enable-plugins --enable-lto --with-gmp=/home/autobuild/autobuild/instance-10/output-1/host --with-mpc=/home/autobuild/autobuild/instance-10/output-1/host --with-mpfr=/home/autobuild/autobuild/instance-10/output-1/host --with-pkgversion='Buildroot 2023.08-297-gab4f3fafaa' --with-bugurl=http://bugs.buildroot.net/ --without-zstd --enable-libquadmath --enable-libquadmath-support --enable-tls --enable-threads --without-isl --without-cloog --with-cpu=power8 --with-long-double-128 --enable-languages=c --with-build-time-tools=/home/autobuild/autobuild/instance-10/output-1/host/powerpc64le-buildroot-linux-gnu/bin --enable-shared --disable-libgomp Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.3.0 (Buildroot 2023.08-297-gab4f3fafaa) configure:4560: $? = 0 configure:4549: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -V >&5 powerpc64le-buildroot-linux-gnu-gcc.br_real: error: unrecognized command-line option '-V' powerpc64le-buildroot-linux-gnu-gcc.br_real: fatal error: no input files compilation terminated. configure:4560: $? = 1 configure:4549: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -qversion >&5 powerpc64le-buildroot-linux-gnu-gcc.br_real: error: unrecognized command-line option '-qversion'; did you mean '--version'? powerpc64le-buildroot-linux-gnu-gcc.br_real: fatal error: no input files compilation terminated. configure:4560: $? = 1 configure:4549: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -version >&5 powerpc64le-buildroot-linux-gnu-gcc.br_real: error: unrecognized command-line option '-version' powerpc64le-buildroot-linux-gnu-gcc.br_real: fatal error: no input files compilation terminated. configure:4560: $? = 1 configure:4580: checking whether the C compiler works configure:4602: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:4606: $? = 0 configure:4656: result: yes configure:4659: checking for C compiler default output file name configure:4661: result: a.out configure:4667: checking for suffix of executables configure:4674: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:4678: $? = 0 configure:4701: result: configure:4723: checking whether we are cross compiling configure:4761: result: yes configure:4766: checking for suffix of object files configure:4789: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:4793: $? = 0 configure:4815: result: o configure:4819: checking whether the compiler supports GNU C configure:4839: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:4839: $? = 0 configure:4849: result: yes configure:4860: checking whether /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc accepts -g configure:4881: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:4881: $? = 0 configure:4925: result: yes configure:4945: checking for /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc option to enable C11 features configure:4960: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:4960: $? = 0 configure:4978: result: none needed configure:5094: checking whether /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc understands -c and -o together configure:5117: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c conftest.c -o conftest2.o configure:5120: $? = 0 configure:5117: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c conftest.c -o conftest2.o configure:5120: $? = 0 configure:5132: result: yes configure:5152: checking whether make supports the include directive configure:5167: make -f confmf.GNU && cat confinc.out make[1]: Entering directory '/home/autobuild/autobuild/instance-10/output-1/build/libarchive-3.7.1' make[1]: Leaving directory '/home/autobuild/autobuild/instance-10/output-1/build/libarchive-3.7.1' this is the am__doit target configure:5170: $? = 0 configure:5189: result: yes (GNU style) configure:5215: checking dependency style of /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc configure:5327: result: none configure:5348: checking how to run the C preprocessor configure:5416: result: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-cpp configure:5430: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-cpp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c configure:5430: $? = 0 configure:5445: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-cpp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c conftest.c:17:10: fatal error: ac_nonexistent.h: No such file or directory 17 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. configure:5445: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | /* end confdefs.h. */ | #include configure:5480: checking for stdio.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for stdlib.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for string.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for inttypes.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for stdint.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for strings.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for sys/stat.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for sys/types.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for unistd.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for wchar.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5480: checking for minix/config.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:55:10: fatal error: minix/config.h: No such file or directory 55 | #include | ^~~~~~~~~~~~~~~~ compilation terminated. configure:5480: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:5480: result: no configure:5480: checking for sys/time.h configure:5480: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5480: $? = 0 configure:5480: result: yes configure:5511: checking whether it is safe to define __EXTENSIONS__ configure:5530: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5530: $? = 0 configure:5538: result: yes configure:5541: checking whether _XOPEN_SOURCE should be defined configure:5563: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:5563: $? = 0 configure:5590: result: no configure:6026: checking how to print strings configure:6053: result: printf configure:6074: checking for a sed that does not truncate output configure:6144: result: /usr/bin/sed configure:6162: checking for grep that handles long lines and -e configure:6226: result: /usr/bin/grep configure:6231: checking for egrep configure:6299: result: /usr/bin/grep -E configure:6304: checking for fgrep configure:6372: result: /usr/bin/grep -F configure:6408: checking for ld used by /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc configure:6476: result: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld configure:6483: checking if the linker (/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld) is GNU ld configure:6499: result: yes configure:6511: checking for BSD- or MS-compatible name lister (nm) configure:6566: result: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-nm configure:6706: checking the name lister (/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-nm) interface configure:6714: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:6717: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-nm "conftest.o" configure:6720: output 0000000000000000 B some_variable configure:6727: result: BSD nm configure:6730: checking whether ln -s works configure:6734: result: yes configure:6742: checking the maximum length of command line arguments configure:6874: result: 1572864 configure:6922: checking how to convert aarch64-unknown-linux-gnu file names to powerpc64le-buildroot-linux-gnu format configure:6963: result: func_convert_file_noop configure:6970: checking how to convert aarch64-unknown-linux-gnu file names to toolchain format configure:6991: result: func_convert_file_noop configure:6998: checking for /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld option to reload object files configure:7006: result: -r configure:7040: checking for powerpc64le-buildroot-linux-gnu-objdump configure:7072: result: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-objdump configure:7146: checking how to recognize dependent libraries configure:7347: result: pass_all configure:7392: checking for powerpc64le-buildroot-linux-gnu-dlltool configure:7424: result: dlltool configure:7499: checking how to associate runtime and link libraries configure:7527: result: printf %s\n configure:7543: checking for powerpc64le-buildroot-linux-gnu-ar configure:7575: result: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-ar configure:7661: checking for archiver @FILE support configure:7679: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:7679: $? = 0 configure:7683: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-ar cr libconftest.a @conftest.lst >&5 configure:7686: $? = 0 configure:7691: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-ar cr libconftest.a @conftest.lst >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ar: conftest.o: No such file or directory configure:7694: $? = 1 configure:7706: result: @ configure:7724: checking for powerpc64le-buildroot-linux-gnu-strip configure:7756: result: /bin/true configure:7833: checking for powerpc64le-buildroot-linux-gnu-ranlib configure:7865: result: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-ranlib configure:8012: checking command to parse /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-nm output from /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc object configure:8166: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:8169: $? = 0 configure:8173: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-nm conftest.o | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' > conftest.nm configure:8239: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c conftstm.o >&5 configure:8242: $? = 0 configure:8280: result: ok configure:8327: checking for sysroot configure:8358: result: no configure:8365: checking for a working dd configure:8409: result: /usr/bin/dd configure:8413: checking how to truncate binary pipes configure:8429: result: /usr/bin/dd bs=4096 count=1 configure:8566: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:8569: $? = 0 configure:8721: checking for powerpc64le-buildroot-linux-gnu-mt configure:8756: result: no configure:8766: checking for mt configure:8801: result: no configure:8821: checking if : is a manifest tool configure:8828: : '-?' configure:8836: result: no configure:9562: checking for dlfcn.h configure:9562: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:9562: $? = 0 configure:9562: result: yes configure:9819: checking for objdir configure:9835: result: .libs configure:10095: checking if /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc supports -fno-rtti -fno-exceptions configure:10114: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-rtti -fno-exceptions conftest.c >&5 cc1: warning: command-line option '-fno-rtti' is valid for C++/D/ObjC++ but not for C configure:10118: $? = 0 configure:10131: result: no configure:10495: checking for /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc option to produce PIC configure:10503: result: -fPIC -DPIC configure:10511: checking if /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc PIC flag -fPIC -DPIC works configure:10530: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DPIC -DPIC conftest.c >&5 configure:10534: $? = 0 configure:10547: result: yes configure:10576: checking if /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc static flag -static works configure:10605: result: yes configure:10620: checking if /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc supports -c -o file.o configure:10642: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o out/conftest2.o conftest.c >&5 configure:10646: $? = 0 configure:10668: result: yes configure:10676: checking if /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc supports -c -o file.o configure:10724: result: yes configure:10757: checking whether the /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc linker (/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld) supports shared libraries configure:12027: result: yes configure:12064: checking whether -lc should be explicitly linked in configure:12073: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:12076: $? = 0 configure:12091: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -shared -fPIC -DPIC conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep -lc \>/dev/null 2\>\&1 configure:12094: $? = 0 configure:12108: result: no configure:12268: checking dynamic linker characteristics configure:12850: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,-rpath -Wl,/foo conftest.c >&5 configure:12850: $? = 0 configure:13101: result: GNU/Linux ld.so configure:13223: checking how to hardcode library paths into programs configure:13248: result: immediate configure:13800: checking whether stripping libraries is possible configure:13822: result: no configure:13840: checking if libtool supports shared libraries configure:13842: result: yes configure:13845: checking whether to build shared libraries configure:13870: result: yes configure:13873: checking whether to build static libraries configure:13877: result: yes configure:13917: checking for powerpc64le-buildroot-linux-gnu-strip configure:13949: result: /bin/true configure:14351: checking for dirent.h that defines DIR configure:14371: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14371: $? = 0 configure:14380: result: yes configure:14394: checking for library containing opendir configure:14424: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14424: $? = 0 configure:14444: result: none required configure:14515: checking for sys/wait.h that is POSIX.1 compatible configure:14542: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14542: $? = 0 configure:14550: result: yes configure:14558: checking for acl/libacl.h configure:14558: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:77:10: fatal error: acl/libacl.h: No such file or directory 77 | #include | ^~~~~~~~~~~~~~ compilation terminated. configure:14558: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14558: result: no configure:14564: checking for attr/xattr.h configure:14564: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:77:10: fatal error: attr/xattr.h: No such file or directory 77 | #include | ^~~~~~~~~~~~~~ compilation terminated. configure:14564: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14564: result: no configure:14571: checking for copyfile.h configure:14571: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:77:10: fatal error: copyfile.h: No such file or directory 77 | #include | ^~~~~~~~~~~~ compilation terminated. configure:14571: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14571: result: no configure:14577: checking for ctype.h configure:14577: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14577: $? = 0 configure:14577: result: yes configure:14584: checking for errno.h configure:14584: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14584: $? = 0 configure:14584: result: yes configure:14590: checking for ext2fs/ext2_fs.h configure:14590: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:79:10: fatal error: ext2fs/ext2_fs.h: No such file or directory 79 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. configure:14590: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14590: result: no configure:14596: checking for fcntl.h configure:14596: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14596: $? = 0 configure:14596: result: yes configure:14602: checking for fnmatch.h configure:14602: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14602: $? = 0 configure:14602: result: yes configure:14608: checking for grp.h configure:14608: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14608: $? = 0 configure:14608: result: yes configure:14616: checking whether EXT2_IOC_GETFLAGS is usable configure:14634: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:55:10: fatal error: ext2fs/ext2_fs.h: No such file or directory 55 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. configure:14634: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | /* end confdefs.h. */ | #include | #include | int | main (void) | { | int x = EXT2_IOC_GETFLAGS | ; | return 0; | } configure:14642: result: no configure:14652: checking for inttypes.h configure:14652: result: yes configure:14658: checking for io.h configure:14658: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:83:10: fatal error: io.h: No such file or directory 83 | #include | ^~~~~~ compilation terminated. configure:14658: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14658: result: no configure:14664: checking for langinfo.h configure:14664: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14664: $? = 0 configure:14664: result: yes configure:14670: checking for limits.h configure:14670: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14670: $? = 0 configure:14670: result: yes configure:14677: checking for linux/fiemap.h configure:14677: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14677: $? = 0 configure:14677: result: yes configure:14683: checking for linux/fs.h configure:14683: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14683: $? = 0 configure:14683: result: yes configure:14689: checking for linux/magic.h configure:14689: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14689: $? = 0 configure:14689: result: yes configure:14695: checking for linux/types.h configure:14695: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14695: $? = 0 configure:14695: result: yes configure:14703: checking whether FS_IOC_GETFLAGS is usable configure:14721: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14721: $? = 0 configure:14729: result: yes configure:14739: checking for locale.h configure:14739: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14739: $? = 0 configure:14739: result: yes configure:14745: checking for membership.h configure:14745: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:91:10: fatal error: membership.h: No such file or directory 91 | #include | ^~~~~~~~~~~~~~ compilation terminated. configure:14745: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14745: result: no configure:14751: checking for paths.h configure:14751: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14751: $? = 0 configure:14751: result: yes configure:14757: checking for poll.h configure:14757: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14757: $? = 0 configure:14757: result: yes configure:14763: checking for pthread.h configure:14763: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14763: $? = 0 configure:14763: result: yes configure:14769: checking for pwd.h configure:14769: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14769: $? = 0 configure:14769: result: yes configure:14776: checking for readpassphrase.h configure:14776: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:95:10: fatal error: readpassphrase.h: No such file or directory 95 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. configure:14776: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14776: result: no configure:14782: checking for signal.h configure:14782: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14782: $? = 0 configure:14782: result: yes configure:14788: checking for spawn.h configure:14788: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14788: $? = 0 configure:14788: result: yes configure:14795: checking for stdarg.h configure:14795: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14795: $? = 0 configure:14795: result: yes configure:14801: checking for stdint.h configure:14801: result: yes configure:14807: checking for stdlib.h configure:14807: result: yes configure:14813: checking for string.h configure:14813: result: yes configure:14820: checking for sys/acl.h configure:14820: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:101:10: fatal error: sys/acl.h: No such file or directory 101 | #include | ^~~~~~~~~~~ compilation terminated. configure:14820: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14820: result: no configure:14826: checking for sys/cdefs.h configure:14826: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14826: $? = 0 configure:14826: result: yes configure:14832: checking for sys/ea.h configure:14832: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:102:10: fatal error: sys/ea.h: No such file or directory 102 | #include | ^~~~~~~~~~ compilation terminated. configure:14832: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14832: result: no configure:14838: checking for sys/extattr.h configure:14838: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:102:10: fatal error: sys/extattr.h: No such file or directory 102 | #include | ^~~~~~~~~~~~~~~ compilation terminated. configure:14838: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14838: result: no configure:14845: checking for sys/ioctl.h configure:14845: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14845: $? = 0 configure:14845: result: yes configure:14851: checking for sys/mkdev.h configure:14851: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:103:10: fatal error: sys/mkdev.h: No such file or directory 103 | #include | ^~~~~~~~~~~~~ compilation terminated. configure:14851: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14851: result: no configure:14857: checking for sys/mount.h configure:14857: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14857: $? = 0 configure:14857: result: yes configure:14863: checking for sys/queue.h configure:14863: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14863: $? = 0 configure:14863: result: yes configure:14870: checking for sys/param.h configure:14870: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14870: $? = 0 configure:14870: result: yes configure:14876: checking for sys/poll.h configure:14876: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14876: $? = 0 configure:14876: result: yes configure:14882: checking for sys/richacl.h configure:14882: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:107:10: fatal error: sys/richacl.h: No such file or directory 107 | #include | ^~~~~~~~~~~~~~~ compilation terminated. configure:14882: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14882: result: no configure:14889: checking for sys/select.h configure:14889: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14889: $? = 0 configure:14889: result: yes configure:14895: checking for sys/statfs.h configure:14895: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14895: $? = 0 configure:14895: result: yes configure:14901: checking for sys/statvfs.h configure:14901: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14901: $? = 0 configure:14901: result: yes configure:14907: checking for sys/sysmacros.h configure:14907: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14907: $? = 0 configure:14907: result: yes configure:14914: checking for sys/time.h configure:14914: result: yes configure:14920: checking for sys/utime.h configure:14920: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:112:10: fatal error: sys/utime.h: No such file or directory 112 | #include | ^~~~~~~~~~~~~ compilation terminated. configure:14920: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14920: result: no configure:14926: checking for sys/utsname.h configure:14926: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14926: $? = 0 configure:14926: result: yes configure:14932: checking for sys/vfs.h configure:14932: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14932: $? = 0 configure:14932: result: yes configure:14938: checking for sys/xattr.h configure:14938: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14938: $? = 0 configure:14938: result: yes configure:14945: checking for time.h configure:14945: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14945: $? = 0 configure:14945: result: yes configure:14951: checking for unistd.h configure:14951: result: yes configure:14957: checking for utime.h configure:14957: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14957: $? = 0 configure:14957: result: yes configure:14963: checking for wchar.h configure:14963: result: yes configure:14969: checking for wctype.h configure:14969: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:14969: $? = 0 configure:14969: result: yes configure:14976: checking for windows.h configure:14976: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:120:10: fatal error: windows.h: No such file or directory 120 | #include | ^~~~~~~~~~~ compilation terminated. configure:14976: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:14976: result: no configure:14984: checking for wincrypt.h configure:14984: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:97:10: fatal error: wincrypt.h: No such file or directory 97 | #include | ^~~~~~~~~~~~ compilation terminated. configure:14984: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | /* end confdefs.h. */ | #ifdef HAVE_WINDOWS_H | # include | #endif | | | #include configure:14984: result: no configure:14994: checking for winioctl.h configure:14994: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:97:10: fatal error: winioctl.h: No such file or directory 97 | #include | ^~~~~~~~~~~~ compilation terminated. configure:14994: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | /* end confdefs.h. */ | #ifdef HAVE_WINDOWS_H | # include | #endif | | | #include configure:14994: result: no configure:15016: checking for zlib.h configure:15016: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:15016: $? = 0 configure:15016: result: yes configure:15023: checking for inflate in -lz configure:15046: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lz >&5 configure:15046: $? = 0 configure:15056: result: yes configure:15077: checking for bzlib.h configure:15077: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:15077: $? = 0 configure:15077: result: yes configure:15114: checking for BZ2_bzDecompressInit in -lbz2 configure:15137: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lbz2 -lz >&5 configure:15137: $? = 0 configure:15147: result: yes configure:15170: checking for blake2.h configure:15170: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:124:10: fatal error: blake2.h: No such file or directory 124 | #include | ^~~~~~~~~~ compilation terminated. configure:15170: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:15170: result: no configure:15177: checking for blake2sp_init in -lb2 configure:15200: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lb2 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: cannot find -lb2: No such file or directory collect2: error: ld returned 1 exit status configure:15200: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | char blake2sp_init (); | int | main (void) | { | return blake2sp_init (); | ; | return 0; | } configure:15210: result: no configure:15280: checking for ld used by GCC configure:15345: result: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld configure:15352: checking if the linker (/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld) is GNU ld configure:15366: result: yes configure:15374: checking for shared library run path origin configure:15388: result: done configure:15970: checking for iconv configure:15995: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lbz2 -lz >&5 configure:15995: $? = 0 configure:16031: result: yes configure:16034: checking for working iconv configure:16178: result: guessing yes configure:16206: checking for iconv declaration configure:16236: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:16236: $? = 0 configure:16247: result: extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); configure:16257: checking for iconv.h configure:16257: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:16257: $? = 0 configure:16257: result: yes configure:16266: checking for localcharset.h configure:16266: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:127:10: fatal error: localcharset.h: No such file or directory 127 | #include | ^~~~~~~~~~~~~~~~ compilation terminated. configure:16266: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:16266: result: no configure:16278: checking for locale_charset configure:16278: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /tmp/ccBLlge0.o: in function `main': conftest.c:(.text.startup+0x14): undefined reference to `locale_charset' collect2: error: ld returned 1 exit status configure:16278: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | /* end confdefs.h. */ | /* Define locale_charset to an innocuous variant, in case declares locale_charset. | For example, HP-UX 11i declares gettimeofday. */ | #define locale_charset innocuous_locale_charset | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char locale_charset (); below. */ | | #include | #undef locale_charset | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char locale_charset (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub_locale_charset || defined __stub___locale_charset | choke me | #endif | | int | main (void) | { | return locale_charset (); | ; | return 0; | } configure:16278: result: no configure:16288: checking for locale_charset in -lcharset configure:16311: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lcharset -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: cannot find -lcharset: No such file or directory collect2: error: ld returned 1 exit status configure:16311: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | char locale_charset (); | int | main (void) | { | return locale_charset (); | ; | return 0; | } configure:16321: result: no configure:16344: checking for lz4.h configure:16344: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:16344: $? = 0 configure:16344: result: yes configure:16350: checking for lz4hc.h configure:16350: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:16350: $? = 0 configure:16350: result: yes configure:16357: checking for LZ4_decompress_safe in -llz4 configure:16380: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -llz4 -lbz2 -lz >&5 configure:16380: $? = 0 configure:16390: result: yes configure:16514: checking for lzma.h configure:16514: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:16514: $? = 0 configure:16514: result: yes configure:16521: checking for lzma_stream_decoder in -llzma configure:16544: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -llzma -llz4 -lbz2 -lz >&5 configure:16544: $? = 0 configure:16554: result: yes configure:16568: checking whether we have multithread support in lzma configure:16589: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -llzma -llz4 -lbz2 -lz >&5 conftest.c: In function 'main': conftest.c:112:1: warning: ignoring return value of 'lzma_stream_encoder_mt' declared with attribute 'warn_unused_result' [-Wunused-result] 112 | lzma_stream_encoder_mt(0, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ configure:16589: $? = 0 configure:16598: result: yes configure:16606: checking whether we have ARM64 filter support in lzma configure:16627: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -llzma -llz4 -lbz2 -lz >&5 configure:16627: $? = 0 configure:16636: result: yes configure:17114: checking for expat.h configure:17114: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17114: $? = 0 configure:17114: result: yes configure:17121: checking for XML_ParserCreate in -lexpat configure:17144: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:17144: $? = 0 configure:17154: result: yes configure:17178: checking for regex.h configure:17178: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17178: $? = 0 configure:17178: result: yes configure:17186: checking for regcomp configure:17186: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:17186: $? = 0 configure:17186: result: yes configure:17446: checking whether C compiler accepts -Wall configure:17466: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17466: $? = 0 configure:17476: result: yes configure:17494: : CFLAGS="$CFLAGS" configure:17497: $? = 0 configure:17446: checking whether C compiler accepts -Wformat configure:17466: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17466: $? = 0 configure:17476: result: yes configure:17494: : CFLAGS="$CFLAGS" configure:17497: $? = 0 configure:17446: checking whether C compiler accepts -Wformat-security configure:17466: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17466: $? = 0 configure:17476: result: yes configure:17494: : CFLAGS="$CFLAGS" configure:17497: $? = 0 configure:17524: checking whether ld supports --gc-sections configure:17530: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,--gc-sections conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:109:13: warning: 'UnusedFunc' defined but not used [-Wunused-function] 109 | static char UnusedFunc() { return 5; } int main() { return 0;} | ^~~~~~~~~~ configure:17530: $? = 0 configure:17532: result: yes configure:17541: checking whether C compiler accepts -ffunction-sections configure:17561: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17561: $? = 0 configure:17571: result: yes configure:17589: : CFLAGS="$CFLAGS" configure:17592: $? = 0 configure:17541: checking whether C compiler accepts -fdata-sections configure:17561: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17561: $? = 0 configure:17571: result: yes configure:17589: : CFLAGS="$CFLAGS" configure:17592: $? = 0 configure:17626: checking for an ANSI C-conforming const configure:17693: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17693: $? = 0 configure:17701: result: yes configure:17711: checking for uid_t in sys/types.h configure:17732: result: yes configure:17747: checking for mode_t configure:17747: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17747: $? = 0 configure:17747: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:140:21: error: expected expression before ')' token 140 | if (sizeof ((mode_t))) | ^ configure:17747: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((mode_t))) | return 0; | ; | return 0; | } configure:17747: result: yes configure:17759: checking for off_t configure:17759: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17759: $? = 0 configure:17759: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:140:20: error: expected expression before ')' token 140 | if (sizeof ((off_t))) | ^ configure:17759: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((off_t))) | return 0; | ; | return 0; | } configure:17759: result: yes configure:17769: checking for size_t configure:17769: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17769: $? = 0 configure:17769: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:140:21: error: expected expression before ')' token 140 | if (sizeof ((size_t))) | ^ configure:17769: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((size_t))) | return 0; | ; | return 0; | } configure:17769: result: yes configure:17779: checking for id_t configure:17779: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17779: $? = 0 configure:17779: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:140:19: error: expected expression before ')' token 140 | if (sizeof ((id_t))) | ^ configure:17779: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((id_t))) | return 0; | ; | return 0; | } configure:17779: result: yes configure:17789: checking for uintptr_t configure:17789: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17789: $? = 0 configure:17789: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:140:24: error: expected expression before ')' token 140 | if (sizeof ((uintptr_t))) | ^ configure:17789: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((uintptr_t))) | return 0; | ; | return 0; | } configure:17789: result: yes configure:17801: checking for struct tm.tm_gmtoff configure:17801: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17801: $? = 0 configure:17801: result: yes configure:17812: checking for struct tm.__tm_gmtoff configure:17812: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:118:13: error: 'struct tm' has no member named '__tm_gmtoff'; did you mean 'tm_gmtoff'? 118 | if (ac_aggr.__tm_gmtoff) | ^~~~~~~~~~~ | tm_gmtoff conftest.c:117:18: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 117 | static struct tm ac_aggr; | ^~~~~~~ configure:17812: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | | #include | | | int | main (void) | { | static struct tm ac_aggr; | if (ac_aggr.__tm_gmtoff) | return 0; | ; | return 0; | } configure:17812: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:118:20: error: 'struct tm' has no member named '__tm_gmtoff'; did you mean 'tm_gmtoff'? 118 | if (sizeof ac_aggr.__tm_gmtoff) | ^~~~~~~~~~~ | tm_gmtoff conftest.c:117:18: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 117 | static struct tm ac_aggr; | ^~~~~~~ configure:17812: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | | #include | | | int | main (void) | { | static struct tm ac_aggr; | if (sizeof ac_aggr.__tm_gmtoff) | return 0; | ; | return 0; | } configure:17812: result: no configure:17826: checking for struct statfs.f_namemax configure:17826: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:118:22: error: storage size of 'ac_aggr' isn't known 118 | static struct statfs ac_aggr; | ^~~~~~~ conftest.c:118:22: warning: unused variable 'ac_aggr' [-Wunused-variable] configure:17826: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | | #include | #include | | | int | main (void) | { | static struct statfs ac_aggr; | if (ac_aggr.f_namemax) | return 0; | ; | return 0; | } configure:17826: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:118:22: error: storage size of 'ac_aggr' isn't known 118 | static struct statfs ac_aggr; | ^~~~~~~ conftest.c:118:22: warning: unused variable 'ac_aggr' [-Wunused-variable] configure:17826: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | | #include | #include | | | int | main (void) | { | static struct statfs ac_aggr; | if (sizeof ac_aggr.f_namemax) | return 0; | ; | return 0; | } configure:17826: result: no configure:17841: checking for struct statfs.f_iosize configure:17841: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:118:22: error: storage size of 'ac_aggr' isn't known 118 | static struct statfs ac_aggr; | ^~~~~~~ conftest.c:118:22: warning: unused variable 'ac_aggr' [-Wunused-variable] configure:17841: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | | #include | #include | | | int | main (void) | { | static struct statfs ac_aggr; | if (ac_aggr.f_iosize) | return 0; | ; | return 0; | } configure:17841: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:118:22: error: storage size of 'ac_aggr' isn't known 118 | static struct statfs ac_aggr; | ^~~~~~~ conftest.c:118:22: warning: unused variable 'ac_aggr' [-Wunused-variable] configure:17841: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | | #include | #include | | | int | main (void) | { | static struct statfs ac_aggr; | if (sizeof ac_aggr.f_iosize) | return 0; | ; | return 0; | } configure:17841: result: no configure:17856: checking for struct statvfs.f_iosize configure:17856: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:118:13: error: 'struct statvfs' has no member named 'f_iosize'; did you mean 'f_bsize'? 118 | if (ac_aggr.f_iosize) | ^~~~~~~~ | f_bsize conftest.c:117:23: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 117 | static struct statvfs ac_aggr; | ^~~~~~~ configure:17856: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | | #include | | | int | main (void) | { | static struct statvfs ac_aggr; | if (ac_aggr.f_iosize) | return 0; | ; | return 0; | } configure:17856: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:118:20: error: 'struct statvfs' has no member named 'f_iosize'; did you mean 'f_bsize'? 118 | if (sizeof ac_aggr.f_iosize) | ^~~~~~~~ | f_bsize conftest.c:117:23: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 117 | static struct statvfs ac_aggr; | ^~~~~~~ configure:17856: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | | #include | | | int | main (void) | { | static struct statvfs ac_aggr; | if (sizeof ac_aggr.f_iosize) | return 0; | ; | return 0; | } configure:17856: result: no configure:17870: checking for struct stat.st_birthtime configure:17870: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:142:12: error: 'struct stat' has no member named 'st_birthtime' 142 | if (ac_aggr.st_birthtime) | ^ conftest.c:141:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 141 | static struct stat ac_aggr; | ^~~~~~~ configure:17870: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (ac_aggr.st_birthtime) | return 0; | ; | return 0; | } configure:17870: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:142:19: error: 'struct stat' has no member named 'st_birthtime' 142 | if (sizeof ac_aggr.st_birthtime) | ^ conftest.c:141:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 141 | static struct stat ac_aggr; | ^~~~~~~ configure:17870: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (sizeof ac_aggr.st_birthtime) | return 0; | ; | return 0; | } configure:17870: result: no configure:17881: checking for struct stat.st_birthtimespec.tv_nsec configure:17881: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:142:12: error: 'struct stat' has no member named 'st_birthtimespec' 142 | if (ac_aggr.st_birthtimespec.tv_nsec) | ^ conftest.c:141:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 141 | static struct stat ac_aggr; | ^~~~~~~ configure:17881: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (ac_aggr.st_birthtimespec.tv_nsec) | return 0; | ; | return 0; | } configure:17881: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:142:19: error: 'struct stat' has no member named 'st_birthtimespec' 142 | if (sizeof ac_aggr.st_birthtimespec.tv_nsec) | ^ conftest.c:141:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 141 | static struct stat ac_aggr; | ^~~~~~~ configure:17881: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (sizeof ac_aggr.st_birthtimespec.tv_nsec) | return 0; | ; | return 0; | } configure:17881: result: no configure:17890: checking for struct stat.st_mtimespec.tv_nsec configure:17890: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:142:12: error: 'struct stat' has no member named 'st_mtimespec' 142 | if (ac_aggr.st_mtimespec.tv_nsec) | ^ conftest.c:141:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 141 | static struct stat ac_aggr; | ^~~~~~~ configure:17890: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (ac_aggr.st_mtimespec.tv_nsec) | return 0; | ; | return 0; | } configure:17890: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:142:19: error: 'struct stat' has no member named 'st_mtimespec' 142 | if (sizeof ac_aggr.st_mtimespec.tv_nsec) | ^ conftest.c:141:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 141 | static struct stat ac_aggr; | ^~~~~~~ configure:17890: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (sizeof ac_aggr.st_mtimespec.tv_nsec) | return 0; | ; | return 0; | } configure:17890: result: no configure:17899: checking for struct stat.st_mtim.tv_nsec configure:17899: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17899: $? = 0 configure:17899: result: yes configure:17908: checking for struct stat.st_mtime_n configure:17908: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:143:13: error: 'struct stat' has no member named 'st_mtime_n'; did you mean 'st_mtim'? 143 | if (ac_aggr.st_mtime_n) | ^~~~~~~~~~ | st_mtim conftest.c:142:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 142 | static struct stat ac_aggr; | ^~~~~~~ configure:17908: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (ac_aggr.st_mtime_n) | return 0; | ; | return 0; | } configure:17908: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:143:20: error: 'struct stat' has no member named 'st_mtime_n'; did you mean 'st_mtim'? 143 | if (sizeof ac_aggr.st_mtime_n) | ^~~~~~~~~~ | st_mtim conftest.c:142:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 142 | static struct stat ac_aggr; | ^~~~~~~ configure:17908: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (sizeof ac_aggr.st_mtime_n) | return 0; | ; | return 0; | } configure:17908: result: no configure:17917: checking for struct stat.st_umtime configure:17917: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:143:13: error: 'struct stat' has no member named 'st_umtime'; did you mean 'st_mtim'? 143 | if (ac_aggr.st_umtime) | ^~~~~~~~~ | st_mtim conftest.c:142:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 142 | static struct stat ac_aggr; | ^~~~~~~ configure:17917: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (ac_aggr.st_umtime) | return 0; | ; | return 0; | } configure:17917: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:143:20: error: 'struct stat' has no member named 'st_umtime'; did you mean 'st_mtim'? 143 | if (sizeof ac_aggr.st_umtime) | ^~~~~~~~~ | st_mtim conftest.c:142:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 142 | static struct stat ac_aggr; | ^~~~~~~ configure:17917: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (sizeof ac_aggr.st_umtime) | return 0; | ; | return 0; | } configure:17917: result: no configure:17926: checking for struct stat.st_mtime_usec configure:17926: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:143:12: error: 'struct stat' has no member named 'st_mtime_usec' 143 | if (ac_aggr.st_mtime_usec) | ^ conftest.c:142:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 142 | static struct stat ac_aggr; | ^~~~~~~ configure:17926: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (ac_aggr.st_mtime_usec) | return 0; | ; | return 0; | } configure:17926: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:143:19: error: 'struct stat' has no member named 'st_mtime_usec' 143 | if (sizeof ac_aggr.st_mtime_usec) | ^ conftest.c:142:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 142 | static struct stat ac_aggr; | ^~~~~~~ configure:17926: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (sizeof ac_aggr.st_mtime_usec) | return 0; | ; | return 0; | } configure:17926: result: no configure:17936: checking for struct stat.st_blksize configure:17936: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17936: $? = 0 configure:17936: result: yes configure:17946: checking for struct stat.st_flags configure:17946: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:144:12: error: 'struct stat' has no member named 'st_flags' 144 | if (ac_aggr.st_flags) | ^ conftest.c:143:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 143 | static struct stat ac_aggr; | ^~~~~~~ configure:17946: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (ac_aggr.st_flags) | return 0; | ; | return 0; | } configure:17946: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:144:19: error: 'struct stat' has no member named 'st_flags' 144 | if (sizeof ac_aggr.st_flags) | ^ conftest.c:143:20: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 143 | static struct stat ac_aggr; | ^~~~~~~ configure:17946: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static struct stat ac_aggr; | if (sizeof ac_aggr.st_flags) | return 0; | ; | return 0; | } configure:17946: result: no configure:17959: checking for uintmax_t configure:17959: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17959: $? = 0 configure:17959: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:143:24: error: expected expression before ')' token 143 | if (sizeof ((uintmax_t))) | ^ configure:17959: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((uintmax_t))) | return 0; | ; | return 0; | } configure:17959: result: yes configure:17967: checking for unsigned long long configure:17967: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:17967: $? = 0 configure:17967: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:144:33: error: expected expression before ')' token 144 | if (sizeof ((unsigned long long))) | ^ configure:17967: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((unsigned long long))) | return 0; | ; | return 0; | } configure:17967: result: yes configure:17980: checking for unsigned long long int configure:18022: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:18022: $? = 0 configure:18032: result: yes configure:18042: checking for long long int configure:18097: result: yes configure:18107: checking for intmax_t configure:18107: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18107: $? = 0 configure:18107: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:147:23: error: expected expression before ')' token 147 | if (sizeof ((intmax_t))) | ^ configure:18107: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((intmax_t))) | return 0; | ; | return 0; | } configure:18107: result: yes configure:18125: checking for uintmax_t configure:18125: result: yes configure:18141: checking for int64_t configure:18141: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18141: $? = 0 configure:18141: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:151:67: warning: integer overflow in expression of type 'long int' results in '-9223372036854775808' [-Woverflow] 151 | < (int64_t) (((((int64_t) 1 << N) << N) - 1) * 2 + 2))]; | ^ conftest.c:150:12: error: storage size of 'test_array' isn't constant 150 | static int test_array [1 - 2 * !((int64_t) (((((int64_t) 1 << N) << N) - 1) * 2 + 1) | ^~~~~~~~~~ conftest.c:150:12: warning: unused variable 'test_array' [-Wunused-variable] configure:18141: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | enum { N = 64 / 2 - 1 }; | int | main (void) | { | static int test_array [1 - 2 * !((int64_t) (((((int64_t) 1 << N) << N) - 1) * 2 + 1) | < (int64_t) (((((int64_t) 1 << N) << N) - 1) * 2 + 2))]; | test_array [0] = 0; | return test_array [0]; | | ; | return 0; | } configure:18141: result: yes configure:18150: checking for uint64_t configure:18150: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18150: $? = 0 configure:18150: result: yes configure:18162: checking for int32_t configure:18162: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18162: $? = 0 configure:18162: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:151:67: warning: integer overflow in expression of type 'int' results in '-2147483648' [-Woverflow] 151 | < (int32_t) (((((int32_t) 1 << N) << N) - 1) * 2 + 2))]; | ^ conftest.c:150:12: error: storage size of 'test_array' isn't constant 150 | static int test_array [1 - 2 * !((int32_t) (((((int32_t) 1 << N) << N) - 1) * 2 + 1) | ^~~~~~~~~~ conftest.c:150:12: warning: unused variable 'test_array' [-Wunused-variable] configure:18162: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | enum { N = 32 / 2 - 1 }; | int | main (void) | { | static int test_array [1 - 2 * !((int32_t) (((((int32_t) 1 << N) << N) - 1) * 2 + 1) | < (int32_t) (((((int32_t) 1 << N) << N) - 1) * 2 + 2))]; | test_array [0] = 0; | return test_array [0]; | | ; | return 0; | } configure:18162: result: yes configure:18171: checking for uint32_t configure:18171: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18171: $? = 0 configure:18171: result: yes configure:18183: checking for int16_t configure:18183: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18183: $? = 0 configure:18183: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:150:12: error: size of array 'test_array' is negative 150 | static int test_array [1 - 2 * !((int16_t) (((((int16_t) 1 << N) << N) - 1) * 2 + 1) | ^~~~~~~~~~ configure:18183: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | enum { N = 16 / 2 - 1 }; | int | main (void) | { | static int test_array [1 - 2 * !((int16_t) (((((int16_t) 1 << N) << N) - 1) * 2 + 1) | < (int16_t) (((((int16_t) 1 << N) << N) - 1) * 2 + 2))]; | test_array [0] = 0; | return test_array [0]; | | ; | return 0; | } configure:18183: result: yes configure:18192: checking for uint16_t configure:18192: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18192: $? = 0 configure:18192: result: yes configure:18202: checking for uint8_t configure:18202: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18202: $? = 0 configure:18202: result: yes configure:18215: checking for /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc options needed to detect all undeclared functions configure:18237: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:122:8: error: 'strchr' undeclared (first use in this function) 122 | (void) strchr; | ^~~~~~ conftest.c:1:1: note: 'strchr' is defined in header ''; did you forget to '#include '? 1 | /* confdefs.h */ conftest.c:122:8: note: each undeclared identifier is reported only once for each function it appears in 122 | (void) strchr; | ^~~~~~ configure:18237: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | /* end confdefs.h. */ | | int | main (void) | { | (void) strchr; | ; | return 0; | } configure:18264: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18264: $? = 0 configure:18281: result: none needed configure:18295: checking whether SIZE_MAX is declared configure:18295: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18295: $? = 0 configure:18295: result: yes configure:18303: checking whether INT32_MAX is declared configure:18303: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18303: $? = 0 configure:18303: result: yes configure:18311: checking whether INT32_MIN is declared configure:18311: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18311: $? = 0 configure:18311: result: yes configure:18320: checking whether INT64_MAX is declared configure:18320: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18320: $? = 0 configure:18320: result: yes configure:18328: checking whether INT64_MIN is declared configure:18328: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18328: $? = 0 configure:18328: result: yes configure:18336: checking whether UINT64_MAX is declared configure:18336: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18336: $? = 0 configure:18336: result: yes configure:18344: checking whether UINT32_MAX is declared configure:18344: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18344: $? = 0 configure:18344: result: yes configure:18353: checking whether INTMAX_MAX is declared configure:18353: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18353: $? = 0 configure:18353: result: yes configure:18361: checking whether INTMAX_MIN is declared configure:18361: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18361: $? = 0 configure:18361: result: yes configure:18369: checking whether UINTMAX_MAX is declared configure:18369: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18369: $? = 0 configure:18369: result: yes configure:18379: checking whether SSIZE_MAX is declared configure:18379: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18379: $? = 0 configure:18379: result: yes configure:18388: checking whether EFTYPE is declared configure:18388: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:138:10: error: 'EFTYPE' undeclared (first use in this function) 138 | (void) EFTYPE; | ^~~~~~ conftest.c:138:10: note: each undeclared identifier is reported only once for each function it appears in configure:18388: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | /* end confdefs.h. */ | #include | | int | main (void) | { | #ifndef EFTYPE | #ifdef __cplusplus | (void) EFTYPE; | #else | (void) EFTYPE; | #endif | #endif | | ; | return 0; | } configure:18388: result: no configure:18396: checking whether EILSEQ is declared configure:18396: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18396: $? = 0 configure:18396: result: yes configure:18404: checking for wchar_t configure:18404: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18404: $? = 0 configure:18404: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:161:22: error: expected expression before ')' token 161 | if (sizeof ((wchar_t))) | ^ configure:18404: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | if (sizeof ((wchar_t))) | return 0; | ; | return 0; | } configure:18404: result: yes configure:18413: checking size of wchar_t configure:18419: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18419: $? = 0 configure:18419: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:162:12: error: size of array 'test_array' is negative 162 | static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= 0)]; | ^~~~~~~~~~ configure:18419: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= 0)]; | test_array [0] = 0; | return test_array [0]; | | ; | return 0; | } configure:18419: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:162:12: error: size of array 'test_array' is negative 162 | static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= 1)]; | ^~~~~~~~~~ configure:18419: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= 1)]; | test_array [0] = 0; | return test_array [0]; | | ; | return 0; | } configure:18419: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:162:12: error: size of array 'test_array' is negative 162 | static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= 3)]; | ^~~~~~~~~~ configure:18419: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | int | main (void) | { | static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= 3)]; | test_array [0] = 0; | return test_array [0]; | | ; | return 0; | } configure:18419: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18419: $? = 0 configure:18419: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18419: $? = 0 configure:18419: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18419: $? = 0 configure:18434: result: 4 configure:18445: checking size of int configure:18466: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18466: $? = 0 configure:18479: result: 4 configure:18485: checking size of long configure:18506: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:140:20: error: duplicate case value 140 | switch (0) case 0: case (sizeof (long) == 4):; | ^~~~ conftest.c:140:12: note: previously used here 140 | switch (0) case 0: case (sizeof (long) == 4):; | ^~~~ configure:18506: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | /* end confdefs.h. */ | | #include | | | int | main (void) | { | switch (0) case 0: case (sizeof (long) == 4):; | ; | return 0; | } configure:18506: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18506: $? = 0 configure:18519: result: 8 configure:18531: checking whether /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc needs -traditional configure:18568: result: no configure:18576: checking for sys/mkdev.h configure:18576: result: no configure:18585: checking for sys/sysmacros.h configure:18585: result: yes configure:18595: checking for _LARGEFILE_SOURCE value needed for large files configure:18615: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:18615: $? = 0 configure:18645: result: no configure:18664: checking for working memcmp configure:18720: result: yes configure:18729: checking whether lstat correctly handles trailing slash configure:18780: result: yes configure:18797: checking whether lstat accepts an empty string configure:18830: result: yes configure:18844: checking whether stat accepts an empty string configure:18877: result: yes configure:18891: checking whether strerror_r is declared configure:18891: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18891: $? = 0 configure:18891: result: yes configure:18910: checking whether strerror_r returns char * configure:18935: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:18935: $? = 0 configure:18944: result: yes configure:18955: checking for strftime configure:18955: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:158:6: warning: conflicting types for built-in function 'strftime'; expected 'long unsigned int(char *, long unsigned int, const char *, const void *)' [-Wbuiltin-declaration-mismatch] 158 | char strftime (); | ^~~~~~~~ conftest.c:150:1: note: 'strftime' is declared in header '' 149 | #include 150 | #undef strftime configure:18955: $? = 0 configure:18955: result: yes configure:19011: checking for vprintf configure:19011: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:159:6: warning: conflicting types for built-in function 'vprintf'; expected 'int(const char *, char *)' [-Wbuiltin-declaration-mismatch] 159 | char vprintf (); | ^~~~~~~ conftest.c:151:1: note: 'vprintf' is declared in header '' 150 | #include 151 | #undef vprintf configure:19011: $? = 0 configure:19011: result: yes configure:19036: checking for CreateHardLinkA configure:19072: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:153:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CreateHardLinkA' 153 | char __stdcall CreateHardLinkA ( const char *, const char *, void * ); | ^~~~~~~~~~~~~~~ conftest.c: In function 'main': conftest.c:165:5: error: 'CreateHardLinkA' undeclared (first use in this function) 165 | f = CreateHardLinkA; | ^~~~~~~~~~~~~~~ conftest.c:165:5: note: each undeclared identifier is reported only once for each function it appears in configure:19072: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | /* end confdefs.h. */ | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char __stdcall CreateHardLinkA ( const char *, const char *, void * ) below. */ | #include | /* Override any gcc2 internal prototype to avoid an error. */ | #ifdef __cplusplus | extern "C" | #endif | /* We use char because int might match the return type of a gcc2 | builtin and then its argument prototype would still apply. */ | char __stdcall CreateHardLinkA ( const char *, const char *, void * ); | char (*f) ( const char *, const char *, void * ); | | int | main (void) | { | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined (__stub_CreateHardLinkA) || defined (__stub___CreateHardLinkA) | choke me | #else | f = CreateHardLinkA; | #endif | | ; | return 0; | } configure:19081: result: no configure:19087: checking for arc4random_buf configure:19087: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19087: $? = 0 configure:19087: result: yes configure:19093: checking for chflags configure:19093: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:166:1: error: unknown type name 'choke' 166 | choke me | ^~~~~ conftest.c:166:9: error: expected ';' before 'int' 166 | choke me | ^ | ; ...... 169 | int | ~~~ configure:19093: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | /* end confdefs.h. */ | /* Define chflags to an innocuous variant, in case declares chflags. | For example, HP-UX 11i declares gettimeofday. */ | #define chflags innocuous_chflags | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char chflags (); below. */ | | #include | #undef chflags | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char chflags (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub_chflags || defined __stub___chflags | choke me | #endif | | int | main (void) | { | return chflags (); | ; | return 0; | } configure:19093: result: no configure:19099: checking for chown configure:19099: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19099: $? = 0 configure:19099: result: yes configure:19105: checking for chroot configure:19105: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19105: $? = 0 configure:19105: result: yes configure:19111: checking for ctime_r configure:19111: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19111: $? = 0 configure:19111: result: yes configure:19118: checking for fchdir configure:19118: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19118: $? = 0 configure:19118: result: yes configure:19124: checking for fchflags configure:19124: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:170:1: error: unknown type name 'choke' 170 | choke me | ^~~~~ conftest.c:170:9: error: expected ';' before 'int' 170 | choke me | ^ | ; ...... 173 | int | ~~~ configure:19124: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | /* end confdefs.h. */ | /* Define fchflags to an innocuous variant, in case declares fchflags. | For example, HP-UX 11i declares gettimeofday. */ | #define fchflags innocuous_fchflags | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char fchflags (); below. */ | | #include | #undef fchflags | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char fchflags (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub_fchflags || defined __stub___fchflags | choke me | #endif | | int | main (void) | { | return fchflags (); | ; | return 0; | } configure:19124: result: no configure:19130: checking for fchmod configure:19130: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19130: $? = 0 configure:19130: result: yes configure:19136: checking for fchown configure:19136: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19136: $? = 0 configure:19136: result: yes configure:19142: checking for fcntl configure:19142: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19142: $? = 0 configure:19142: result: yes configure:19148: checking for fdopendir configure:19148: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19148: $? = 0 configure:19148: result: yes configure:19154: checking for fnmatch configure:19154: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19154: $? = 0 configure:19154: result: yes configure:19160: checking for fork configure:19160: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:170:6: warning: conflicting types for built-in function 'fork'; expected 'int(void)' [-Wbuiltin-declaration-mismatch] 170 | char fork (); | ^~~~ configure:19160: $? = 0 configure:19160: result: yes configure:19167: checking for fstat configure:19167: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19167: $? = 0 configure:19167: result: yes configure:19173: checking for fstatat configure:19173: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19173: $? = 0 configure:19173: result: yes configure:19179: checking for fstatfs configure:19179: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19179: $? = 0 configure:19179: result: yes configure:19185: checking for fstatvfs configure:19185: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19185: $? = 0 configure:19185: result: yes configure:19191: checking for ftruncate configure:19191: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19191: $? = 0 configure:19191: result: yes configure:19198: checking for futimens configure:19198: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19198: $? = 0 configure:19198: result: yes configure:19204: checking for futimes configure:19204: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19204: $? = 0 configure:19204: result: yes configure:19210: checking for futimesat configure:19210: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19210: $? = 0 configure:19210: result: yes configure:19217: checking for geteuid configure:19217: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19217: $? = 0 configure:19217: result: yes configure:19223: checking for getline configure:19223: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19223: $? = 0 configure:19223: result: yes configure:19229: checking for getpid configure:19229: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19229: $? = 0 configure:19229: result: yes configure:19235: checking for getgrgid_r configure:19235: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19235: $? = 0 configure:19235: result: yes configure:19241: checking for getgrnam_r configure:19241: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19241: $? = 0 configure:19241: result: yes configure:19248: checking for getpwnam_r configure:19248: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19248: $? = 0 configure:19248: result: yes configure:19254: checking for getpwuid_r configure:19254: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19254: $? = 0 configure:19254: result: yes configure:19260: checking for getvfsbyname configure:19260: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /tmp/ccaBGLkx.o: in function `main': conftest.c:(.text.startup.main+0x14): undefined reference to `getvfsbyname' collect2: error: ld returned 1 exit status configure:19260: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | /* end confdefs.h. */ | /* Define getvfsbyname to an innocuous variant, in case declares getvfsbyname. | For example, HP-UX 11i declares gettimeofday. */ | #define getvfsbyname innocuous_getvfsbyname | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char getvfsbyname (); below. */ | | #include | #undef getvfsbyname | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char getvfsbyname (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub_getvfsbyname || defined __stub___getvfsbyname | choke me | #endif | | int | main (void) | { | return getvfsbyname (); | ; | return 0; | } configure:19260: result: no configure:19266: checking for gmtime_r configure:19266: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19266: $? = 0 configure:19266: result: yes configure:19273: checking for lchflags configure:19273: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /tmp/ccl8dqAa.o: in function `main': conftest.c:(.text.startup.main+0x14): undefined reference to `lchflags' collect2: error: ld returned 1 exit status configure:19273: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | /* end confdefs.h. */ | /* Define lchflags to an innocuous variant, in case declares lchflags. | For example, HP-UX 11i declares gettimeofday. */ | #define lchflags innocuous_lchflags | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char lchflags (); below. */ | | #include | #undef lchflags | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char lchflags (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub_lchflags || defined __stub___lchflags | choke me | #endif | | int | main (void) | { | return lchflags (); | ; | return 0; | } configure:19273: result: no configure:19279: checking for lchmod configure:19279: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19279: $? = 0 configure:19279: result: yes configure:19285: checking for lchown configure:19285: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19285: $? = 0 configure:19285: result: yes configure:19291: checking for link configure:19291: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19291: $? = 0 configure:19291: result: yes configure:19297: checking for linkat configure:19297: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19297: $? = 0 configure:19297: result: yes configure:19303: checking for localtime_r configure:19303: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19303: $? = 0 configure:19303: result: yes configure:19309: checking for lstat configure:19309: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19309: $? = 0 configure:19309: result: yes configure:19315: checking for lutimes configure:19315: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19315: $? = 0 configure:19315: result: yes configure:19322: checking for mbrtowc configure:19322: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19322: $? = 0 configure:19322: result: yes configure:19328: checking for memmove configure:19328: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:195:6: warning: conflicting types for built-in function 'memmove'; expected 'void *(void *, const void *, long unsigned int)' [-Wbuiltin-declaration-mismatch] 195 | char memmove (); | ^~~~~~~ conftest.c:187:1: note: 'memmove' is declared in header '' 186 | #include 187 | #undef memmove configure:19328: $? = 0 configure:19328: result: yes configure:19334: checking for memset configure:19334: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:196:6: warning: conflicting types for built-in function 'memset'; expected 'void *(void *, int, long unsigned int)' [-Wbuiltin-declaration-mismatch] 196 | char memset (); | ^~~~~~ conftest.c:188:1: note: 'memset' is declared in header '' 187 | #include 188 | #undef memset configure:19334: $? = 0 configure:19334: result: yes configure:19341: checking for mkdir configure:19341: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19341: $? = 0 configure:19341: result: yes configure:19347: checking for mkfifo configure:19347: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19347: $? = 0 configure:19347: result: yes configure:19353: checking for mknod configure:19353: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19353: $? = 0 configure:19353: result: yes configure:19359: checking for mkstemp configure:19359: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19359: $? = 0 configure:19359: result: yes configure:19366: checking for nl_langinfo configure:19366: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19366: $? = 0 configure:19366: result: yes configure:19372: checking for openat configure:19372: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19372: $? = 0 configure:19372: result: yes configure:19378: checking for pipe configure:19378: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19378: $? = 0 configure:19378: result: yes configure:19384: checking for poll configure:19384: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19384: $? = 0 configure:19384: result: yes configure:19390: checking for posix_spawnp configure:19390: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19390: $? = 0 configure:19390: result: yes configure:19396: checking for readlink configure:19396: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19396: $? = 0 configure:19396: result: yes configure:19402: checking for readlinkat configure:19402: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19402: $? = 0 configure:19402: result: yes configure:19409: checking for readpassphrase configure:19409: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /tmp/ccYwYfMQ.o: in function `main': conftest.c:(.text.startup.main+0x14): undefined reference to `readpassphrase' collect2: error: ld returned 1 exit status configure:19409: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | /* end confdefs.h. */ | /* Define readpassphrase to an innocuous variant, in case declares readpassphrase. | For example, HP-UX 11i declares gettimeofday. */ | #define readpassphrase innocuous_readpassphrase | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char readpassphrase (); below. */ | | #include | #undef readpassphrase | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char readpassphrase (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub_readpassphrase || defined __stub___readpassphrase | choke me | #endif | | int | main (void) | { | return readpassphrase (); | ; | return 0; | } configure:19409: result: no configure:19416: checking for select configure:19416: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19416: $? = 0 configure:19416: result: yes configure:19422: checking for setenv configure:19422: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19422: $? = 0 configure:19422: result: yes configure:19428: checking for setlocale configure:19428: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19428: $? = 0 configure:19428: result: yes configure:19434: checking for sigaction configure:19434: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19434: $? = 0 configure:19434: result: yes configure:19440: checking for statfs configure:19440: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19440: $? = 0 configure:19440: result: yes configure:19446: checking for statvfs configure:19446: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19446: $? = 0 configure:19446: result: yes configure:19453: checking for strchr configure:19453: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:214:6: warning: conflicting types for built-in function 'strchr'; expected 'char *(const char *, int)' [-Wbuiltin-declaration-mismatch] 214 | char strchr (); | ^~~~~~ conftest.c:206:1: note: 'strchr' is declared in header '' 205 | #include 206 | #undef strchr configure:19453: $? = 0 configure:19453: result: yes configure:19459: checking for strdup configure:19459: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:215:6: warning: conflicting types for built-in function 'strdup'; expected 'char *(const char *)' [-Wbuiltin-declaration-mismatch] 215 | char strdup (); | ^~~~~~ configure:19459: $? = 0 configure:19459: result: yes configure:19465: checking for strerror configure:19465: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19465: $? = 0 configure:19465: result: yes configure:19471: checking for strncpy_s configure:19471: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /tmp/cc84EREJ.o: in function `main': conftest.c:(.text.startup.main+0x14): undefined reference to `strncpy_s' collect2: error: ld returned 1 exit status configure:19471: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | /* end confdefs.h. */ | /* Define strncpy_s to an innocuous variant, in case declares strncpy_s. | For example, HP-UX 11i declares gettimeofday. */ | #define strncpy_s innocuous_strncpy_s | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char strncpy_s (); below. */ | | #include | #undef strncpy_s | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char strncpy_s (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub_strncpy_s || defined __stub___strncpy_s | choke me | #endif | | int | main (void) | { | return strncpy_s (); | ; | return 0; | } configure:19471: result: no configure:19477: checking for strnlen configure:19477: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:217:6: warning: conflicting types for built-in function 'strnlen'; expected 'long unsigned int(const char *, long unsigned int)' [-Wbuiltin-declaration-mismatch] 217 | char strnlen (); | ^~~~~~~ configure:19477: $? = 0 configure:19477: result: yes configure:19483: checking for strrchr configure:19483: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c:218:6: warning: conflicting types for built-in function 'strrchr'; expected 'char *(const char *, int)' [-Wbuiltin-declaration-mismatch] 218 | char strrchr (); | ^~~~~~~ conftest.c:210:1: note: 'strrchr' is declared in header '' 209 | #include 210 | #undef strrchr configure:19483: $? = 0 configure:19483: result: yes configure:19489: checking for symlink configure:19489: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19489: $? = 0 configure:19489: result: yes configure:19496: checking for timegm configure:19496: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19496: $? = 0 configure:19496: result: yes configure:19502: checking for tzset configure:19502: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19502: $? = 0 configure:19502: result: yes configure:19508: checking for unlinkat configure:19508: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19508: $? = 0 configure:19508: result: yes configure:19514: checking for unsetenv configure:19514: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19514: $? = 0 configure:19514: result: yes configure:19520: checking for utime configure:19520: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19520: $? = 0 configure:19520: result: yes configure:19526: checking for utimensat configure:19526: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19526: $? = 0 configure:19526: result: yes configure:19532: checking for utimes configure:19532: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19532: $? = 0 configure:19532: result: yes configure:19538: checking for vfork configure:19538: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19538: $? = 0 configure:19538: result: yes configure:19545: checking for wcrtomb configure:19545: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19545: $? = 0 configure:19545: result: yes configure:19551: checking for wcscmp configure:19551: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19551: $? = 0 configure:19551: result: yes configure:19557: checking for wcscpy configure:19557: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19557: $? = 0 configure:19557: result: yes configure:19563: checking for wcslen configure:19563: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19563: $? = 0 configure:19563: result: yes configure:19569: checking for wctomb configure:19569: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19569: $? = 0 configure:19569: result: yes configure:19575: checking for wmemcmp configure:19575: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19575: $? = 0 configure:19575: result: yes configure:19581: checking for wmemcpy configure:19581: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19581: $? = 0 configure:19581: result: yes configure:19587: checking for wmemmove configure:19587: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19587: $? = 0 configure:19587: result: yes configure:19594: checking for _fseeki64 configure:19594: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /tmp/ccnzMElP.o: in function `main': conftest.c:(.text.startup.main+0x14): undefined reference to `_fseeki64' collect2: error: ld returned 1 exit status configure:19594: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | /* Define _fseeki64 to an innocuous variant, in case declares _fseeki64. | For example, HP-UX 11i declares gettimeofday. */ | #define _fseeki64 innocuous__fseeki64 | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char _fseeki64 (); below. */ | | #include | #undef _fseeki64 | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char _fseeki64 (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub__fseeki64 || defined __stub____fseeki64 | choke me | #endif | | int | main (void) | { | return _fseeki64 (); | ; | return 0; | } configure:19594: result: no configure:19600: checking for _get_timezone configure:19600: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /tmp/cczdlxuV.o: in function `main': conftest.c:(.text.startup.main+0x14): undefined reference to `_get_timezone' collect2: error: ld returned 1 exit status configure:19600: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | /* Define _get_timezone to an innocuous variant, in case declares _get_timezone. | For example, HP-UX 11i declares gettimeofday. */ | #define _get_timezone innocuous__get_timezone | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char _get_timezone (); below. */ | | #include | #undef _get_timezone | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char _get_timezone (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub__get_timezone || defined __stub____get_timezone | choke me | #endif | | int | main (void) | { | return _get_timezone (); | ; | return 0; | } configure:19600: result: no configure:19607: checking whether cmtime_s is declared configure:19607: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:229:10: error: 'cmtime_s' undeclared (first use in this function); did you mean 'ctime_r'? 229 | (void) cmtime_s; | ^~~~~~~~ | ctime_r conftest.c:229:10: note: each undeclared identifier is reported only once for each function it appears in configure:19607: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | #include | | int | main (void) | { | #ifndef cmtime_s | #ifdef __cplusplus | (void) cmtime_s; | #else | (void) cmtime_s; | #endif | #endif | | ; | return 0; | } configure:19607: result: no configure:19615: checking whether gmtime_s is declared configure:19615: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:229:10: error: 'gmtime_s' undeclared (first use in this function); did you mean 'gmtime_r'? 229 | (void) gmtime_s; | ^~~~~~~~ | gmtime_r conftest.c:229:10: note: each undeclared identifier is reported only once for each function it appears in configure:19615: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | #include | | int | main (void) | { | #ifndef gmtime_s | #ifdef __cplusplus | (void) gmtime_s; | #else | (void) gmtime_s; | #endif | #endif | | ; | return 0; | } configure:19615: result: no configure:19623: checking for localtime_s configure:19623: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:225:13: error: 'localtime_s' undeclared (first use in this function); did you mean 'localtime_r'? 225 | if (sizeof (localtime_s)) | ^~~~~~~~~~~ | localtime_r conftest.c:225:13: note: each undeclared identifier is reported only once for each function it appears in configure:19623: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | #include | | int | main (void) | { | if (sizeof (localtime_s)) | return 0; | ; | return 0; | } configure:19623: result: no configure:19632: checking whether _mkgmtime is declared configure:19632: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:229:10: error: '_mkgmtime' undeclared (first use in this function); did you mean 'gmtime'? 229 | (void) _mkgmtime; | ^~~~~~~~~ | gmtime conftest.c:229:10: note: each undeclared identifier is reported only once for each function it appears in configure:19632: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | #include | | int | main (void) | { | #ifndef _mkgmtime | #ifdef __cplusplus | (void) _mkgmtime; | #else | (void) _mkgmtime; | #endif | #endif | | ; | return 0; | } configure:19632: result: no configure:19642: checking for cygwin_conv_path configure:19642: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /tmp/ccjLVIuw.o: in function `main': conftest.c:(.text.startup.main+0x14): undefined reference to `cygwin_conv_path' collect2: error: ld returned 1 exit status configure:19642: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | /* Define cygwin_conv_path to an innocuous variant, in case declares cygwin_conv_path. | For example, HP-UX 11i declares gettimeofday. */ | #define cygwin_conv_path innocuous_cygwin_conv_path | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char cygwin_conv_path (); below. */ | | #include | #undef cygwin_conv_path | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char cygwin_conv_path (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined __stub_cygwin_conv_path || defined __stub___cygwin_conv_path | choke me | #endif | | int | main (void) | { | return cygwin_conv_path (); | ; | return 0; | } configure:19642: result: no configure:19651: checking for struct vfsconf configure:19651: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:229:13: error: invalid application of 'sizeof' to incomplete type 'struct vfsconf' 229 | if (sizeof (struct vfsconf)) | ^~~~~~ configure:19651: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | #if HAVE_SYS_TYPES_H | #include | #endif | #include | | | int | main (void) | { | if (sizeof (struct vfsconf)) | return 0; | ; | return 0; | } configure:19651: result: no configure:19666: checking for struct xvfsconf configure:19666: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:229:13: error: invalid application of 'sizeof' to incomplete type 'struct xvfsconf' 229 | if (sizeof (struct xvfsconf)) | ^~~~~~ configure:19666: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | #if HAVE_SYS_TYPES_H | #include | #endif | #include | | | int | main (void) | { | if (sizeof (struct xvfsconf)) | return 0; | ; | return 0; | } configure:19666: result: no configure:19681: checking for struct statfs configure:19681: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:229:13: error: invalid application of 'sizeof' to incomplete type 'struct statfs' 229 | if (sizeof (struct statfs)) | ^~~~~~ configure:19681: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | /* end confdefs.h. */ | #if HAVE_SYS_TYPES_H | #include | #endif | #include | | | int | main (void) | { | if (sizeof (struct statfs)) | return 0; | ; | return 0; | } configure:19681: result: no configure:19710: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 conftest.c: In function 'main': conftest.c:225:21: warning: 'readdir_r' is deprecated [-Wdeprecated-declarations] 225 | return(readdir_r(dir, &e, &r)); | ^~~~~~ In file included from /home/autobuild/autobuild/instance-10/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/include/features.h:491, from /home/autobuild/autobuild/instance-10/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/include/dirent.h:25, from conftest.c:220: /home/autobuild/autobuild/instance-10/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/include/dirent.h:191:12: note: declared here 191 | extern int __REDIRECT (readdir_r, | ^~~~~~~~~~ conftest.c:225:28: warning: 'dir' is used uninitialized [-Wuninitialized] 225 | return(readdir_r(dir, &e, &r)); | ~^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:224:6: note: 'dir' was declared here 224 | DIR *dir; struct dirent e, *r; | ^~~ configure:19710: $? = 0 configure:19732: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:19732: $? = 0 configure:19745: checking whether D_MD_ORDER is declared configure:19745: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:234:10: error: 'D_MD_ORDER' undeclared (first use in this function) 234 | (void) D_MD_ORDER; | ^~~~~~~~~~ conftest.c:234:10: note: each undeclared identifier is reported only once for each function it appears in configure:19745: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #if HAVE_LANGINFO_H | #include | #endif | | | int | main (void) | { | #ifndef D_MD_ORDER | #ifdef __cplusplus | (void) D_MD_ORDER; | #else | (void) D_MD_ORDER; | #endif | #endif | | ; | return 0; | } configure:19745: result: no configure:19760: checking for struct dirent.d_namlen configure:19760: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:231:13: error: 'struct dirent' has no member named 'd_namlen'; did you mean 'd_name'? 231 | if (ac_aggr.d_namlen) | ^~~~~~~~ | d_name conftest.c:230:22: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 230 | static struct dirent ac_aggr; | ^~~~~~~ configure:19760: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #if HAVE_DIRENT_H | #include | #endif | | | int | main (void) | { | static struct dirent ac_aggr; | if (ac_aggr.d_namlen) | return 0; | ; | return 0; | } configure:19760: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:231:20: error: 'struct dirent' has no member named 'd_namlen'; did you mean 'd_name'? 231 | if (sizeof ac_aggr.d_namlen) | ^~~~~~~~ | d_name conftest.c:230:22: warning: variable 'ac_aggr' set but not used [-Wunused-but-set-variable] 230 | static struct dirent ac_aggr; | ^~~~~~~ configure:19760: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #if HAVE_DIRENT_H | #include | #endif | | | int | main (void) | { | static struct dirent ac_aggr; | if (sizeof ac_aggr.d_namlen) | return 0; | ; | return 0; | } configure:19760: result: no configure:19771: checking whether optreset is declared configure:19771: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c: In function 'main': conftest.c:231:10: error: 'optreset' undeclared (first use in this function) 231 | (void) optreset; | ^~~~~~~~ conftest.c:231:10: note: each undeclared identifier is reported only once for each function it appears in configure:19771: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #include | | int | main (void) | { | #ifndef optreset | #ifdef __cplusplus | (void) optreset; | #else | (void) optreset; | #endif | #endif | | ; | return 0; | } configure:19771: result: no configure:20730: checking for special C compiler options needed for large files configure:20778: result: no configure:20784: checking for _FILE_OFFSET_BITS value needed for large files configure:20810: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 configure:20810: $? = 0 configure:20844: result: no configure:20940: checking support for ARCHIVE_CRYPTO_MD5_LIBC configure:20962: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:64:10: fatal error: md5.h: No such file or directory 64 | #include | ^~~~~~~ compilation terminated. configure:20962: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_MD5_COMPILE_TEST | #define ARCHIVE_CRYPTO_MD5_LIBC | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_md5_ctx ctx; | archive_md5_init(&ctx); | archive_md5_update(&ctx, *argv, argc); | archive_md5_final(&ctx, NULL); | return 0; | } | configure:20973: result: no configure:20987: checking support for ARCHIVE_CRYPTO_MD5_LIBSYSTEM configure:21009: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:115:10: fatal error: CommonCrypto/CommonDigest.h: No such file or directory 115 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. configure:21009: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_MD5_COMPILE_TEST | #define ARCHIVE_CRYPTO_MD5_LIBSYSTEM | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_md5_ctx ctx; | archive_md5_init(&ctx); | archive_md5_update(&ctx, *argv, argc); | archive_md5_final(&ctx, NULL); | return 0; | } | configure:21020: result: no configure:21034: checking support for ARCHIVE_CRYPTO_RMD160_LIBC configure:21056: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:67:10: fatal error: rmd160.h: No such file or directory 67 | #include | ^~~~~~~~~~ compilation terminated. configure:21056: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_RMD160_COMPILE_TEST | #define ARCHIVE_CRYPTO_RMD160_LIBC | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_rmd160_ctx ctx; | archive_rmd160_init(&ctx); | archive_rmd160_update(&ctx, *argv, argc); | archive_rmd160_final(&ctx, NULL); | return 0; | } | configure:21067: result: no configure:21081: checking support for ARCHIVE_CRYPTO_SHA1_LIBC configure:21103: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:70:10: fatal error: sha1.h: No such file or directory 70 | #include | ^~~~~~~~ compilation terminated. configure:21103: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA1_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA1_LIBC | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha1_ctx ctx; | archive_sha1_init(&ctx); | archive_sha1_update(&ctx, *argv, argc); | archive_sha1_final(&ctx, NULL); | return 0; | } | configure:21114: result: no configure:21128: checking support for ARCHIVE_CRYPTO_SHA1_LIBSYSTEM configure:21150: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:115:10: fatal error: CommonCrypto/CommonDigest.h: No such file or directory 115 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. configure:21150: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA1_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA1_LIBSYSTEM | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha1_ctx ctx; | archive_sha1_init(&ctx); | archive_sha1_update(&ctx, *argv, argc); | archive_sha1_final(&ctx, NULL); | return 0; | } | configure:21161: result: no configure:21175: checking support for ARCHIVE_CRYPTO_SHA256_LIBC configure:21197: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21197: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA256_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA256_LIBC | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha256_ctx ctx; | archive_sha256_init(&ctx); | archive_sha256_update(&ctx, *argv, argc); | archive_sha256_final(&ctx, NULL); | return 0; | } | configure:21208: result: no configure:21222: checking support for ARCHIVE_CRYPTO_SHA256_LIBC2 configure:21244: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21244: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA256_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA256_LIBC2 | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha256_ctx ctx; | archive_sha256_init(&ctx); | archive_sha256_update(&ctx, *argv, argc); | archive_sha256_final(&ctx, NULL); | return 0; | } | configure:21255: result: no configure:21269: checking support for ARCHIVE_CRYPTO_SHA256_LIBC3 configure:21291: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21291: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA256_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA256_LIBC3 | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha256_ctx ctx; | archive_sha256_init(&ctx); | archive_sha256_update(&ctx, *argv, argc); | archive_sha256_final(&ctx, NULL); | return 0; | } | configure:21302: result: no configure:21316: checking support for ARCHIVE_CRYPTO_SHA256_LIBSYSTEM configure:21338: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:115:10: fatal error: CommonCrypto/CommonDigest.h: No such file or directory 115 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. configure:21338: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA256_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA256_LIBSYSTEM | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha256_ctx ctx; | archive_sha256_init(&ctx); | archive_sha256_update(&ctx, *argv, argc); | archive_sha256_final(&ctx, NULL); | return 0; | } | configure:21349: result: no configure:21363: checking support for ARCHIVE_CRYPTO_SHA384_LIBC configure:21385: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21385: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA384_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA384_LIBC | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha384_ctx ctx; | archive_sha384_init(&ctx); | archive_sha384_update(&ctx, *argv, argc); | archive_sha384_final(&ctx, NULL); | return 0; | } | configure:21396: result: no configure:21410: checking support for ARCHIVE_CRYPTO_SHA384_LIBC2 configure:21432: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21432: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA384_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA384_LIBC2 | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha384_ctx ctx; | archive_sha384_init(&ctx); | archive_sha384_update(&ctx, *argv, argc); | archive_sha384_final(&ctx, NULL); | return 0; | } | configure:21443: result: no configure:21457: checking support for ARCHIVE_CRYPTO_SHA384_LIBC3 configure:21479: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21479: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA384_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA384_LIBC3 | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha384_ctx ctx; | archive_sha384_init(&ctx); | archive_sha384_update(&ctx, *argv, argc); | archive_sha384_final(&ctx, NULL); | return 0; | } | configure:21490: result: no configure:21504: checking support for ARCHIVE_CRYPTO_SHA384_LIBSYSTEM configure:21526: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:115:10: fatal error: CommonCrypto/CommonDigest.h: No such file or directory 115 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. configure:21526: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA384_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA384_LIBSYSTEM | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha384_ctx ctx; | archive_sha384_init(&ctx); | archive_sha384_update(&ctx, *argv, argc); | archive_sha384_final(&ctx, NULL); | return 0; | } | configure:21537: result: no configure:21551: checking support for ARCHIVE_CRYPTO_SHA512_LIBC configure:21573: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21573: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA512_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA512_LIBC | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha512_ctx ctx; | archive_sha512_init(&ctx); | archive_sha512_update(&ctx, *argv, argc); | archive_sha512_final(&ctx, NULL); | return 0; | } | configure:21584: result: no configure:21598: checking support for ARCHIVE_CRYPTO_SHA512_LIBC2 configure:21620: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21620: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA512_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA512_LIBC2 | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha512_ctx ctx; | archive_sha512_init(&ctx); | archive_sha512_update(&ctx, *argv, argc); | archive_sha512_final(&ctx, NULL); | return 0; | } | configure:21631: result: no configure:21645: checking support for ARCHIVE_CRYPTO_SHA512_LIBC3 configure:21667: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:81:10: fatal error: sha2.h: No such file or directory 81 | #include | ^~~~~~~~ compilation terminated. configure:21667: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA512_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA512_LIBC3 | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha512_ctx ctx; | archive_sha512_init(&ctx); | archive_sha512_update(&ctx, *argv, argc); | archive_sha512_final(&ctx, NULL); | return 0; | } | configure:21678: result: no configure:21692: checking support for ARCHIVE_CRYPTO_SHA512_LIBSYSTEM configure:21714: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:115:10: fatal error: CommonCrypto/CommonDigest.h: No such file or directory 115 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. configure:21714: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA512_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA512_LIBSYSTEM | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha512_ctx ctx; | archive_sha512_init(&ctx); | archive_sha512_update(&ctx, *argv, argc); | archive_sha512_final(&ctx, NULL); | return 0; | } | configure:21725: result: no configure:21740: checking for bcrypt.h configure:21740: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:227:10: fatal error: bcrypt.h: No such file or directory 227 | #include | ^~~~~~~~~~ compilation terminated. configure:21740: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #ifdef HAVE_WINDOWS_H | # include | #endif | | | #include configure:21740: result: no configure:22825: checking for md5.h configure:22825: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:250:10: fatal error: md5.h: No such file or directory 250 | #include | ^~~~~~~ compilation terminated. configure:22825: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:22825: result: no configure:22831: checking for ripemd.h configure:22831: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:250:10: fatal error: ripemd.h: No such file or directory 250 | #include | ^~~~~~~~~~ compilation terminated. configure:22831: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:22831: result: no configure:22837: checking for sha.h configure:22837: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:250:10: fatal error: sha.h: No such file or directory 250 | #include | ^~~~~~~ compilation terminated. configure:22837: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:22837: result: no configure:22843: checking for sha256.h configure:22843: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:250:10: fatal error: sha256.h: No such file or directory 250 | #include | ^~~~~~~~~~ compilation terminated. configure:22843: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:22843: result: no configure:22849: checking for sha512.h configure:22849: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5 conftest.c:250:10: fatal error: sha512.h: No such file or directory 250 | #include | ^~~~~~~~~~ compilation terminated. configure:22849: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | #include | #ifdef HAVE_STDIO_H | # include | #endif | #ifdef HAVE_STDLIB_H | # include | #endif | #ifdef HAVE_STRING_H | # include | #endif | #ifdef HAVE_INTTYPES_H | # include | #endif | #ifdef HAVE_STDINT_H | # include | #endif | #ifdef HAVE_STRINGS_H | # include | #endif | #ifdef HAVE_SYS_TYPES_H | # include | #endif | #ifdef HAVE_SYS_STAT_H | # include | #endif | #ifdef HAVE_UNISTD_H | # include | #endif | #include configure:22849: result: no configure:22857: checking for MD5Init in -lmd configure:22880: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lmd -lexpat -llzma -llz4 -lbz2 -lz >&5 /home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/12.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: cannot find -lmd: No such file or directory collect2: error: ld returned 1 exit status configure:22880: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | char MD5Init (); | int | main (void) | { | return MD5Init (); | ; | return 0; | } configure:22890: result: no configure:22905: checking support for ARCHIVE_CRYPTO_MD5_LIBMD configure:22927: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:94:10: fatal error: md5.h: No such file or directory 94 | #include | ^~~~~~~ compilation terminated. configure:22927: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_MD5_COMPILE_TEST | #define ARCHIVE_CRYPTO_MD5_LIBMD | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_md5_ctx ctx; | archive_md5_init(&ctx); | archive_md5_update(&ctx, *argv, argc); | archive_md5_final(&ctx, NULL); | return 0; | } | configure:22938: result: no configure:22952: checking support for ARCHIVE_CRYPTO_RMD160_LIBMD configure:22974: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:97:10: fatal error: ripemd.h: No such file or directory 97 | #include | ^~~~~~~~~~ compilation terminated. configure:22974: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_RMD160_COMPILE_TEST | #define ARCHIVE_CRYPTO_RMD160_LIBMD | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_rmd160_ctx ctx; | archive_rmd160_init(&ctx); | archive_rmd160_update(&ctx, *argv, argc); | archive_rmd160_final(&ctx, NULL); | return 0; | } | configure:22985: result: no configure:22999: checking support for ARCHIVE_CRYPTO_SHA1_LIBMD configure:23021: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:100:10: fatal error: sha.h: No such file or directory 100 | #include | ^~~~~~~ compilation terminated. configure:23021: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA1_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA1_LIBMD | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha1_ctx ctx; | archive_sha1_init(&ctx); | archive_sha1_update(&ctx, *argv, argc); | archive_sha1_final(&ctx, NULL); | return 0; | } | configure:23032: result: no configure:23046: checking support for ARCHIVE_CRYPTO_SHA256_LIBMD configure:23068: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:103:10: fatal error: sha256.h: No such file or directory 103 | #include | ^~~~~~~~~~ compilation terminated. configure:23068: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA256_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA256_LIBMD | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha256_ctx ctx; | archive_sha256_init(&ctx); | archive_sha256_update(&ctx, *argv, argc); | archive_sha256_final(&ctx, NULL); | return 0; | } | configure:23079: result: no configure:23093: checking support for ARCHIVE_CRYPTO_SHA512_LIBMD configure:23115: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I. -I./libarchive conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 In file included from conftest.c:257: ./libarchive/archive_digest_private.h:106:10: fatal error: sha512.h: No such file or directory 106 | #include | ^~~~~~~~~~ compilation terminated. configure:23115: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libarchive" | #define PACKAGE_TARNAME "libarchive" | #define PACKAGE_VERSION "3.7.1" | #define PACKAGE_STRING "libarchive 3.7.1" | #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" | #define PACKAGE_URL "" | #define PACKAGE "libarchive" | #define VERSION "3.7.1" | #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 | #define LIBARCHIVE_VERSION_STRING "3.7.1" | #define LIBARCHIVE_VERSION_NUMBER "3007001" | #define BSDCPIO_VERSION_STRING "3.7.1" | #define BSDTAR_VERSION_STRING "3.7.1" | #define BSDCAT_VERSION_STRING "3.7.1" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_SYS_TIME_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_DIRENT_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_CTYPE_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_FNMATCH_H 1 | #define HAVE_GRP_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_LIMITS_H 1 | #define HAVE_LINUX_FIEMAP_H 1 | #define HAVE_LINUX_FS_H 1 | #define HAVE_LINUX_MAGIC_H 1 | #define HAVE_LINUX_TYPES_H 1 | #define HAVE_WORKING_FS_IOC_GETFLAGS 1 | #define HAVE_LOCALE_H 1 | #define HAVE_PATHS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_MOUNT_H 1 | #define HAVE_SYS_QUEUE_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_SYS_STATVFS_H 1 | #define HAVE_SYS_SYSMACROS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_XATTR_H 1 | #define HAVE_TIME_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_ZLIB_H 1 | #define HAVE_LIBZ 1 | #define HAVE_BZLIB_H 1 | #define HAVE_LIBBZ2 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_ICONV_H 1 | #define HAVE_LZ4_H 1 | #define HAVE_LZ4HC_H 1 | #define HAVE_LIBLZ4 1 | #define HAVE_LZMA_H 1 | #define HAVE_LIBLZMA 1 | #define HAVE_LZMA_STREAM_ENCODER_MT 1 | #define HAVE_LZMA_FILTER_ARM64 1 | #define HAVE_EXPAT_H 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_REGEX_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_UNSIGNED_LONG_LONG 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define HAVE_INTMAX_T 1 | #define HAVE_UINTMAX_T 1 | #define HAVE_DECL_SIZE_MAX 1 | #define HAVE_DECL_INT32_MAX 1 | #define HAVE_DECL_INT32_MIN 1 | #define HAVE_DECL_INT64_MAX 1 | #define HAVE_DECL_INT64_MIN 1 | #define HAVE_DECL_UINT64_MAX 1 | #define HAVE_DECL_UINT32_MAX 1 | #define HAVE_DECL_INTMAX_MAX 1 | #define HAVE_DECL_INTMAX_MIN 1 | #define HAVE_DECL_UINTMAX_MAX 1 | #define HAVE_DECL_SSIZE_MAX 1 | #define HAVE_EILSEQ 1 | #define HAVE_WCHAR_T 1 | #define SIZEOF_WCHAR_T 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 8 | #define MAJOR_IN_SYSMACROS 1 | #define HAVE_FSEEKO 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define HAVE_LSTAT_EMPTY_STRING_BUG 1 | #define HAVE_STAT_EMPTY_STRING_BUG 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_STRFTIME 1 | #define HAVE_VPRINTF 1 | #define HAVE_ARC4RANDOM_BUF 1 | #define HAVE_CHOWN 1 | #define HAVE_CHROOT 1 | #define HAVE_CTIME_R 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHMOD 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCNTL 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_FNMATCH 1 | #define HAVE_FORK 1 | #define HAVE_FSTAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_FSTATFS 1 | #define HAVE_FSTATVFS 1 | #define HAVE_FTRUNCATE 1 | #define HAVE_FUTIMENS 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_GETEUID 1 | #define HAVE_GETLINE 1 | #define HAVE_GETPID 1 | #define HAVE_GETGRGID_R 1 | #define HAVE_GETGRNAM_R 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETPWUID_R 1 | #define HAVE_GMTIME_R 1 | #define HAVE_LCHMOD 1 | #define HAVE_LCHOWN 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_LSTAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MEMMOVE 1 | #define HAVE_MEMSET 1 | #define HAVE_MKDIR 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKNOD 1 | #define HAVE_MKSTEMP 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OPENAT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_POSIX_SPAWNP 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETLOCALE 1 | #define HAVE_SIGACTION 1 | #define HAVE_STATFS 1 | #define HAVE_STATVFS 1 | #define HAVE_STRCHR 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRNLEN 1 | #define HAVE_STRRCHR 1 | #define HAVE_SYMLINK 1 | #define HAVE_TIMEGM 1 | #define HAVE_TZSET 1 | #define HAVE_UNLINKAT 1 | #define HAVE_UNSETENV 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_UTIMES 1 | #define HAVE_VFORK 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCTOMB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_READDIR_R 1 | #define HAVE_DIRFD 1 | /* end confdefs.h. */ | | #define ARCHIVE_SHA512_COMPILE_TEST | #define ARCHIVE_CRYPTO_SHA512_LIBMD | #define PLATFORM_CONFIG_H "check_crypto_md.h" | | /*- | * Copyright (c) 2003-2007 Tim Kientzle | * Copyright (c) 2011 Andres Mejia | * Copyright (c) 2011 Michihiro NAKAJIMA | * All rights reserved. | * | * Redistribution and use in source and binary forms, with or without | * modification, are permitted provided that the following conditions | * are met: | * 1. Redistributions of source code must retain the above copyright | * notice, this list of conditions and the following disclaimer. | * 2. Redistributions in binary form must reproduce the above copyright | * notice, this list of conditions and the following disclaimer in the | * documentation and/or other materials provided with the distribution. | * | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | */ | | #include "archive_platform.h" | | #include "archive.h" | #include "archive_digest_private.h" | | /* In particular, force the configure probe to break if it tries | * to test a combination of OpenSSL and libmd. */ | #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD) | #error Cannot use both OpenSSL and libmd. | #endif | | /* Common in other bcrypt implementations, but missing from VS2008. */ | #ifndef BCRYPT_SUCCESS | #define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) | #endif | | /* | * Message digest functions for Windows platform. | */ | #if defined(ARCHIVE_CRYPTO_MD5_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA1_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ | defined(ARCHIVE_CRYPTO_SHA512_WIN) | | /* | * Initialize a Message digest. | */ | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | static int | win_crypto_init(Digest_CTX *ctx, const WCHAR *algo) | { | NTSTATUS status; | ctx->valid = 0; | | status = BCryptOpenAlgorithmProvider(&ctx->hAlg, algo, NULL, 0); | if (!BCRYPT_SUCCESS(status)) | return (ARCHIVE_FAILED); | status = BCryptCreateHash(ctx->hAlg, &ctx->hHash, NULL, 0, NULL, 0, 0); | if (!BCRYPT_SUCCESS(status)) { | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #else | static int | win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId) | { | | ctx->valid = 0; | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_VERIFYCONTEXT)) { | if (GetLastError() != (DWORD)NTE_BAD_KEYSET) | return (ARCHIVE_FAILED); | if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, | prov, CRYPT_NEWKEYSET)) | return (ARCHIVE_FAILED); | } | | if (!CryptCreateHash(ctx->cryptProv, algId, 0, 0, &ctx->hash)) { | CryptReleaseContext(ctx->cryptProv, 0); | return (ARCHIVE_FAILED); | } | | ctx->valid = 1; | return (ARCHIVE_OK); | } | #endif | | /* | * Update a Message digest. | */ | static int | win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len) | { | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptHashData(ctx->hHash, | (PUCHAR)(uintptr_t)buf, | len, 0); | #else | CryptHashData(ctx->hash, | (unsigned char *)(uintptr_t)buf, | (DWORD)len, 0); | #endif | return (ARCHIVE_OK); | } | | static int | win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) | { | #if !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA) | DWORD siglen = (DWORD)bufsize; | #endif | | if (!ctx->valid) | return (ARCHIVE_FAILED); | | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | BCryptFinishHash(ctx->hHash, buf, (ULONG)bufsize, 0); | BCryptDestroyHash(ctx->hHash); | BCryptCloseAlgorithmProvider(ctx->hAlg, 0); | #else | CryptGetHashParam(ctx->hash, HP_HASHVAL, buf, &siglen, 0); | CryptDestroyHash(ctx->hash); | CryptReleaseContext(ctx->cryptProv, 0); | #endif | ctx->valid = 0; | return (ARCHIVE_OK); | } | | #endif /* defined(ARCHIVE_CRYPTO_*_WIN) */ | | | /* MD5 implementations */ | #if defined(ARCHIVE_CRYPTO_MD5_LIBC) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | MD5Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | MD5Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | MD5Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | CC_MD5_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | CC_MD5_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | CC_MD5_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | mbedtls_md5_init(ctx); | if (mbedtls_md5_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | if (mbedtls_md5_finish_ret(ctx, md) == 0) { | mbedtls_md5_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_md5_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | md5_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | md5_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | md5_digest(ctx, MD5_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_md5())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_MD5_WIN) | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5)); | #endif | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 16, ctx)); | } | | #else | | static int | __archive_md5init(archive_md5_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5update(archive_md5_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_md5final(archive_md5_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* RIPEMD160 implementations */ | #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RMD160Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RMD160Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RMD160Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | RIPEMD160_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | RIPEMD160_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | RIPEMD160_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | mbedtls_ripemd160_init(ctx); | if (mbedtls_ripemd160_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_ripemd160_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | ripemd160_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | ripemd160_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_ripemd160())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #else | | static int | __archive_ripemd160init(archive_rmd160_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA1 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | CC_SHA1_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA1_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | CC_SHA1_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | mbedtls_sha1_init(ctx); | if (mbedtls_sha1_starts_ret(ctx) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | if (mbedtls_sha1_finish_ret(ctx, md) == 0) { | mbedtls_sha1_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha1_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | sha1_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | sha1_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | sha1_digest(ctx, SHA1_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha1())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so | * this is meant to cope with that. Real fix is probably to fix | * archive_write_set_format_xar.c | */ | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1)); | #endif | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 20, ctx)); | } | | #else | | static int | __archive_sha1init(archive_sha1_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1update(archive_sha1_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha1final(archive_sha1_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA256 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | CC_SHA256_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA256_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | CC_SHA256_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | mbedtls_sha256_init(ctx); | if (mbedtls_sha256_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (mbedtls_sha256_finish_ret(ctx, md) == 0) { | mbedtls_sha256_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha256_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | sha256_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | sha256_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | sha256_digest(ctx, SHA256_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha256())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256)); | #endif | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 32, ctx)); | } | | #else | | static int | __archive_sha256init(archive_sha256_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256update(archive_sha256_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha256final(archive_sha256_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA384 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | SHA384Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | SHA384Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | SHA384Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | CC_SHA384_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA384_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | CC_SHA384_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 1) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | sha384_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | sha384_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | sha384_digest(ctx, SHA384_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha384())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384)); | #endif | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 48, ctx)); | } | | #else | | static int | __archive_sha384init(archive_sha384_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384update(archive_sha384_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha384final(archive_sha384_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* SHA512 implementations */ | #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | CC_SHA512_Init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | CC_SHA512_Update(ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | CC_SHA512_Final(md, ctx); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | mbedtls_sha512_init(ctx); | if (mbedtls_sha512_starts_ret(ctx, 0) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) | return (ARCHIVE_OK); | else | return (ARCHIVE_FATAL); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (mbedtls_sha512_finish_ret(ctx, md) == 0) { | mbedtls_sha512_free(ctx); | return (ARCHIVE_OK); | } else { | mbedtls_sha512_free(ctx); | return (ARCHIVE_FATAL); | } | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | sha512_init(ctx); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | sha512_update(ctx, insize, indata); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | sha512_digest(ctx, SHA512_DIGEST_SIZE, md); | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | if ((*ctx = EVP_MD_CTX_new()) == NULL) | return (ARCHIVE_FAILED); | if (!EVP_DigestInit(*ctx, EVP_sha512())) | return (ARCHIVE_FAILED); | return (ARCHIVE_OK); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | EVP_DigestUpdate(*ctx, indata, insize); | return (ARCHIVE_OK); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | if (*ctx) { | EVP_DigestFinal(*ctx, md, NULL); | EVP_MD_CTX_free(*ctx); | *ctx = NULL; | } | return (ARCHIVE_OK); | } | | #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM)); | #else | return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512)); | #endif | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | return (win_crypto_Update(ctx, indata, insize)); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | return (win_crypto_Final(md, 64, ctx)); | } | | #else | | static int | __archive_sha512init(archive_sha512_ctx *ctx) | { | (void)ctx; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512update(archive_sha512_ctx *ctx, const void *indata, | size_t insize) | { | (void)ctx; /* UNUSED */ | (void)indata; /* UNUSED */ | (void)insize; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | static int | __archive_sha512final(archive_sha512_ctx *ctx, void *md) | { | (void)ctx; /* UNUSED */ | (void)md; /* UNUSED */ | return (ARCHIVE_FAILED); | } | | #endif | | /* NOTE: Message Digest functions are set based on availability and by the | * following order of preference. | * 1. libc | * 2. libc2 | * 3. libc3 | * 4. libSystem | * 5. Nettle | * 6. OpenSSL | * 7. libmd | * 8. Windows API | */ | const struct archive_digest __archive_digest = | { | /* MD5 */ | &__archive_md5init, | &__archive_md5update, | &__archive_md5final, | | /* RIPEMD160 */ | &__archive_ripemd160init, | &__archive_ripemd160update, | &__archive_ripemd160final, | | /* SHA1 */ | &__archive_sha1init, | &__archive_sha1update, | &__archive_sha1final, | | /* SHA256 */ | &__archive_sha256init, | &__archive_sha256update, | &__archive_sha256final, | | /* SHA384 */ | &__archive_sha384init, | &__archive_sha384update, | &__archive_sha384final, | | /* SHA512 */ | &__archive_sha512init, | &__archive_sha512update, | &__archive_sha512final | }; | | int | main(int argc, char **argv) | { | archive_sha512_ctx ctx; | archive_sha512_init(&ctx); | archive_sha512_update(&ctx, *argv, argc); | archive_sha512_final(&ctx, NULL); | return 0; | } | configure:23126: result: no configure:23341: checking whether compiler supports visibility annotations configure:23356: /home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -fvisibility=hidden -Werror -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lexpat -llzma -llz4 -lbz2 -lz >&5 configure:23356: $? = 0 configure:23359: result: yes configure:23474: checking that generated files are newer than configure configure:23480: result: done configure:23567: creating ./config.status ## ---------------------- ## ## Running config.status. ## ## ---------------------- ## This file was extended by libarchive config.status 3.7.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = CONFIG_HEADERS = CONFIG_LINKS = CONFIG_COMMANDS = $ ./config.status on asahi-mini config.status:1333: creating Makefile config.status:1333: creating build/pkgconfig/libarchive.pc config.status:1333: creating config.h config.status:1562: executing depfiles commands config.status:1562: executing libtool commands config.status:1562: executing mkdirs commands configure:25712: WARNING: unrecognized options: --disable-gtk-doc, --disable-gtk-doc-html, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop, --enable-ipv6, --disable-nls ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=aarch64-unknown-linux-gnu ac_cv_c_bigendian=no ac_cv_c_compiler_gnu=yes ac_cv_c_const=yes ac_cv_c_int16_t=yes ac_cv_c_int32_t=yes ac_cv_c_int64_t=yes ac_cv_c_uint16_t=yes ac_cv_c_uint32_t=yes ac_cv_c_uint64_t=yes ac_cv_c_uint8_t=yes ac_cv_c_undeclared_builtin_options='none needed' ac_cv_env_CC_set=set ac_cv_env_CC_value=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value='-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1' ac_cv_env_CPPFLAGS_set=set ac_cv_env_CPPFLAGS_value='-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ac_cv_env_CPP_set=set ac_cv_env_CPP_value=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-cpp ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_LIBXML2_PC_CFLAGS_set= ac_cv_env_LIBXML2_PC_CFLAGS_value= ac_cv_env_LIBXML2_PC_LIBS_set= ac_cv_env_LIBXML2_PC_LIBS_value= ac_cv_env_LT_SYS_LIBRARY_PATH_set= ac_cv_env_LT_SYS_LIBRARY_PATH_value= ac_cv_env_PKG_CONFIG_LIBDIR_set= ac_cv_env_PKG_CONFIG_LIBDIR_value= ac_cv_env_PKG_CONFIG_PATH_set= ac_cv_env_PKG_CONFIG_PATH_value= ac_cv_env_PKG_CONFIG_set=set ac_cv_env_PKG_CONFIG_value=/home/autobuild/autobuild/instance-10/output-1/host/bin/pkg-config ac_cv_env_build_alias_set=set ac_cv_env_build_alias_value=aarch64-unknown-linux-gnu ac_cv_env_host_alias_set=set ac_cv_env_host_alias_value=powerpc64le-buildroot-linux-gnu ac_cv_env_target_alias_set=set ac_cv_env_target_alias_value=powerpc64le-buildroot-linux-gnu ac_cv_func_CreateHardLinkA=no ac_cv_func__fseeki64=no ac_cv_func__get_timezone=no ac_cv_func_arc4random_buf=yes ac_cv_func_calloc_0_nonnull=yes ac_cv_func_chflags=no ac_cv_func_chown=yes ac_cv_func_chroot=yes ac_cv_func_ctime_r=yes ac_cv_func_cygwin_conv_path=no ac_cv_func_fchdir=yes ac_cv_func_fchflags=no ac_cv_func_fchmod=yes ac_cv_func_fchown=yes ac_cv_func_fcntl=yes ac_cv_func_fdopendir=yes ac_cv_func_fnmatch=yes ac_cv_func_fork=yes ac_cv_func_fstat=yes ac_cv_func_fstatat=yes ac_cv_func_fstatfs=yes ac_cv_func_fstatvfs=yes ac_cv_func_ftruncate=yes ac_cv_func_futimens=yes ac_cv_func_futimes=yes ac_cv_func_futimesat=yes ac_cv_func_geteuid=yes ac_cv_func_getgrgid_r=yes ac_cv_func_getgrnam_r=yes ac_cv_func_getline=yes ac_cv_func_getpid=yes ac_cv_func_getpwnam_r=yes ac_cv_func_getpwuid_r=yes ac_cv_func_getvfsbyname=no ac_cv_func_gmtime_r=yes ac_cv_func_lchflags=no ac_cv_func_lchmod=yes ac_cv_func_lchown=yes ac_cv_func_link=yes ac_cv_func_linkat=yes ac_cv_func_locale_charset=no ac_cv_func_localtime_r=yes ac_cv_func_lstat=yes ac_cv_func_lstat_dereferences_slashed_symlink=yes ac_cv_func_lstat_empty_string_bug=yes ac_cv_func_lutimes=yes ac_cv_func_malloc_0_nonnull=yes ac_cv_func_mbrtowc=yes ac_cv_func_memcmp_working=yes ac_cv_func_memmove=yes ac_cv_func_memset=yes ac_cv_func_mkdir=yes ac_cv_func_mkfifo=yes ac_cv_func_mknod=yes ac_cv_func_mkstemp=yes ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_nl_langinfo=yes ac_cv_func_openat=yes ac_cv_func_pipe=yes ac_cv_func_poll=yes ac_cv_func_posix_spawnp=yes ac_cv_func_readlink=yes ac_cv_func_readlinkat=yes ac_cv_func_readpassphrase=no ac_cv_func_realloc_0_nonnull=yes ac_cv_func_regcomp=yes ac_cv_func_select=yes ac_cv_func_setenv=yes ac_cv_func_setlocale=yes ac_cv_func_sigaction=yes ac_cv_func_stat_empty_string_bug=yes ac_cv_func_statfs=yes ac_cv_func_statvfs=yes ac_cv_func_strchr=yes ac_cv_func_strdup=yes ac_cv_func_strerror=yes ac_cv_func_strerror_r_char_p=yes ac_cv_func_strftime=yes ac_cv_func_strncpy_s=no ac_cv_func_strnlen=yes ac_cv_func_strrchr=yes ac_cv_func_symlink=yes ac_cv_func_timegm=yes ac_cv_func_tzset=yes ac_cv_func_unlinkat=yes ac_cv_func_unsetenv=yes ac_cv_func_utime=yes ac_cv_func_utimensat=yes ac_cv_func_utimes=yes ac_cv_func_vfork=yes ac_cv_func_vprintf=yes ac_cv_func_wcrtomb=yes ac_cv_func_wcscmp=yes ac_cv_func_wcscpy=yes ac_cv_func_wcslen=yes ac_cv_func_wctomb=yes ac_cv_func_wmemcmp=yes ac_cv_func_wmemcpy=yes ac_cv_func_wmemmove=yes ac_cv_have_decl_D_MD_ORDER=no ac_cv_have_decl_EFTYPE=no ac_cv_have_decl_EILSEQ=yes ac_cv_have_decl_EXT2_IOC_GETFLAGS=no ac_cv_have_decl_FS_IOC_GETFLAGS=yes ac_cv_have_decl_INT32_MAX=yes ac_cv_have_decl_INT32_MIN=yes ac_cv_have_decl_INT64_MAX=yes ac_cv_have_decl_INT64_MIN=yes ac_cv_have_decl_INTMAX_MAX=yes ac_cv_have_decl_INTMAX_MIN=yes ac_cv_have_decl_SIZE_MAX=yes ac_cv_have_decl_SSIZE_MAX=yes ac_cv_have_decl_UINT32_MAX=yes ac_cv_have_decl_UINT64_MAX=yes ac_cv_have_decl_UINTMAX_MAX=yes ac_cv_have_decl__mkgmtime=no ac_cv_have_decl_cmtime_s=no ac_cv_have_decl_gmtime_s=no ac_cv_have_decl_malloc=yes ac_cv_have_decl_optreset=no ac_cv_have_decl_strerror_r=yes ac_cv_header_acl_libacl_h=no ac_cv_header_attr_xattr_h=no ac_cv_header_bcrypt_h=no ac_cv_header_blake2_h=no ac_cv_header_bzlib_h=yes ac_cv_header_copyfile_h=no ac_cv_header_ctype_h=yes ac_cv_header_dirent_dirent_h=yes ac_cv_header_dlfcn_h=yes ac_cv_header_errno_h=yes ac_cv_header_expat_h=yes ac_cv_header_ext2fs_ext2_fs_h=no ac_cv_header_fcntl_h=yes ac_cv_header_fnmatch_h=yes ac_cv_header_grp_h=yes ac_cv_header_iconv_h=yes ac_cv_header_inttypes_h=yes ac_cv_header_io_h=no ac_cv_header_langinfo_h=yes ac_cv_header_limits_h=yes ac_cv_header_linux_fiemap_h=yes ac_cv_header_linux_fs_h=yes ac_cv_header_linux_magic_h=yes ac_cv_header_linux_types_h=yes ac_cv_header_localcharset_h=no ac_cv_header_locale_h=yes ac_cv_header_lz4_h=yes ac_cv_header_lz4hc_h=yes ac_cv_header_lzma_h=yes ac_cv_header_md5_h=no ac_cv_header_membership_h=no ac_cv_header_minix_config_h=no ac_cv_header_paths_h=yes ac_cv_header_poll_h=yes ac_cv_header_pthread_h=yes ac_cv_header_pwd_h=yes ac_cv_header_readpassphrase_h=no ac_cv_header_regex_h=yes ac_cv_header_ripemd_h=no ac_cv_header_sha256_h=no ac_cv_header_sha512_h=no ac_cv_header_sha_h=no ac_cv_header_signal_h=yes ac_cv_header_spawn_h=yes ac_cv_header_stdarg_h=yes ac_cv_header_stdint_h=yes ac_cv_header_stdio_h=yes ac_cv_header_stdlib_h=yes ac_cv_header_string_h=yes ac_cv_header_strings_h=yes ac_cv_header_sys_acl_h=no ac_cv_header_sys_cdefs_h=yes ac_cv_header_sys_ea_h=no ac_cv_header_sys_extattr_h=no ac_cv_header_sys_ioctl_h=yes ac_cv_header_sys_mkdev_h=no ac_cv_header_sys_mount_h=yes ac_cv_header_sys_param_h=yes ac_cv_header_sys_poll_h=yes ac_cv_header_sys_queue_h=yes ac_cv_header_sys_richacl_h=no ac_cv_header_sys_select_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_statfs_h=yes ac_cv_header_sys_statvfs_h=yes ac_cv_header_sys_sysmacros_h=yes ac_cv_header_sys_time_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_sys_utime_h=no ac_cv_header_sys_utsname_h=yes ac_cv_header_sys_vfs_h=yes ac_cv_header_sys_wait_h=yes ac_cv_header_sys_xattr_h=yes ac_cv_header_time_h=yes ac_cv_header_unistd_h=yes ac_cv_header_utime_h=yes ac_cv_header_wchar_h=yes ac_cv_header_wctype_h=yes ac_cv_header_wincrypt_h=no ac_cv_header_windows_h=no ac_cv_header_winioctl_h=no ac_cv_header_zlib_h=yes ac_cv_host=powerpc64le-buildroot-linux-gnu ac_cv_lbl_unaligned_fail=no ac_cv_lib_b2_blake2sp_init=no ac_cv_lib_bz2_BZ2_bzDecompressInit=yes ac_cv_lib_charset_locale_charset=no ac_cv_lib_expat_XML_ParserCreate=yes ac_cv_lib_lz4_LZ4_decompress_safe=yes ac_cv_lib_lzma_lzma_stream_decoder=yes ac_cv_lib_md_MD5Init=no ac_cv_lib_z_inflate=yes ac_cv_lzma_has_arm64=yes ac_cv_lzma_has_mt=yes ac_cv_member_struct_dirent_d_namlen=no ac_cv_member_struct_stat_st_birthtime=no ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=no ac_cv_member_struct_stat_st_blksize=yes ac_cv_member_struct_stat_st_flags=no ac_cv_member_struct_stat_st_mtim_tv_nsec=yes ac_cv_member_struct_stat_st_mtime_n=no ac_cv_member_struct_stat_st_mtime_usec=no ac_cv_member_struct_stat_st_mtimespec_tv_nsec=no ac_cv_member_struct_stat_st_umtime=no ac_cv_member_struct_statfs_f_iosize=no ac_cv_member_struct_statfs_f_namemax=no ac_cv_member_struct_statvfs_f_iosize=no ac_cv_member_struct_tm___tm_gmtoff=no ac_cv_member_struct_tm_tm_gmtoff=yes ac_cv_objext=o ac_cv_path_EGREP='/usr/bin/grep -E' ac_cv_path_FGREP='/usr/bin/grep -F' ac_cv_path_GREP=/usr/bin/grep ac_cv_path_SED=/usr/bin/sed ac_cv_path_install='/usr/bin/install -c' ac_cv_path_lt_DD=/usr/bin/dd ac_cv_path_mkdir=/usr/bin/mkdir ac_cv_prog_AR=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-ar ac_cv_prog_AWK=gawk ac_cv_prog_CC=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc ac_cv_prog_CPP=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-cpp ac_cv_prog_DLLTOOL=dlltool ac_cv_prog_OBJDUMP=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-objdump ac_cv_prog_RANLIB=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-ranlib ac_cv_prog_STRIP=/bin/true ac_cv_prog_cc_c11= ac_cv_prog_cc_g=yes ac_cv_prog_cc_stdc= ac_cv_prog_gcc_traditional=no ac_cv_prog_make_make_set=yes ac_cv_safe_to_define___extensions__=yes ac_cv_search_opendir='none required' ac_cv_should_define__xopen_source=no ac_cv_sizeof_int=4 ac_cv_sizeof_long=8 ac_cv_sizeof_wchar_t=4 ac_cv_sys_file_offset_bits=no ac_cv_sys_largefile_CC=no ac_cv_sys_largefile_source=no ac_cv_type_id_t=yes ac_cv_type_intmax_t=yes ac_cv_type_localtime_s=no ac_cv_type_long_long_int=yes ac_cv_type_mode_t=yes ac_cv_type_off_t=yes ac_cv_type_size_t=yes ac_cv_type_struct_statfs=no ac_cv_type_struct_vfsconf=no ac_cv_type_struct_xvfsconf=no ac_cv_type_uintmax_t=yes ac_cv_type_uintptr_t=yes ac_cv_type_unsigned_long_long=yes ac_cv_type_unsigned_long_long_int=yes ac_cv_type_wchar_t=yes acl_cv_hardcode_direct=no acl_cv_hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' acl_cv_hardcode_libdir_separator= acl_cv_hardcode_minus_L=no acl_cv_libext=a acl_cv_libname_spec='lib$name' acl_cv_library_names_spec='$libname$shrext' acl_cv_path_LD=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld acl_cv_prog_gnu_ld=yes acl_cv_rpath=done acl_cv_shlibext=so acl_cv_wl=-Wl, am_cv_CC_dependencies_compiler_type=none am_cv_func_iconv=yes am_cv_func_iconv_works='guessing yes' am_cv_lib_iconv=no am_cv_make_support_nested_variables=yes am_cv_prog_cc_c_o=yes am_cv_proto_iconv='extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);' am_cv_proto_iconv_arg1= ax_cv_check_cflags___Wall=yes ax_cv_check_cflags___Wformat=yes ax_cv_check_cflags___Wformat_security=yes ax_cv_check_cflags___fdata_sections=yes ax_cv_check_cflags___ffunction_sections=yes gl_cv_func_malloc_0_nonnull=yes la_cv_type_uid_t=yes lt_cv_ar_at_file=@ lt_cv_archive_cmds_need_lc=no lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_ld_reload_flag=-r lt_cv_nm_interface='BSD nm' lt_cv_objdir=.libs lt_cv_path_LD=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld lt_cv_path_NM=/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-nm lt_cv_path_mainfest_tool=no lt_cv_prog_compiler_c_o=yes lt_cv_prog_compiler_pic='-fPIC -DPIC' lt_cv_prog_compiler_pic_works=yes lt_cv_prog_compiler_rtti_exceptions=no lt_cv_prog_compiler_static_works=yes lt_cv_prog_gnu_ld=yes lt_cv_sharedlib_from_linklib_cmd='printf %s\n' lt_cv_shlibpath_overrides_runpath=no lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\''' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\''' lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' lt_cv_sys_global_symbol_to_import= lt_cv_sys_lib_search_path_spec= lt_cv_sys_max_cmd_len=1572864 lt_cv_to_host_file_cmd=func_convert_file_noop lt_cv_to_tool_file_cmd=func_convert_file_noop lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' ## ----------------- ## ## Output variables. ## ## ----------------- ## ACLOCAL='${SHELL} '\''/home/autobuild/autobuild/instance-10/output-1/build/libarchive-3.7.1/build/autoconf/missing'\'' aclocal-1.16' AMDEPBACKSLASH='' AMDEP_FALSE='' AMDEP_TRUE='#' AMTAR='$${TAR-tar}' AM_BACKSLASH='\' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' AM_DEFAULT_VERBOSITY='0' AM_V='$(V)' AR='/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-ar' ARCHIVE_LIBTOOL_VERSION='20:1:7' AS='/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-as' AUTOCONF='${SHELL} '\''/home/autobuild/autobuild/instance-10/output-1/build/libarchive-3.7.1/build/autoconf/missing'\'' autoconf' AUTOHEADER='${SHELL} '\''/home/autobuild/autobuild/instance-10/output-1/build/libarchive-3.7.1/build/autoconf/missing'\'' autoheader' AUTOMAKE='${SHELL} '\''/home/autobuild/autobuild/instance-10/output-1/build/libarchive-3.7.1/build/autoconf/missing'\'' automake-1.16' AWK='gawk' BSDCAT_VERSION_STRING='3.7.1' BSDCPIO_VERSION_STRING='3.7.1' BSDTAR_VERSION_STRING='3.7.1' BUILD_BSDCAT_FALSE='' BUILD_BSDCAT_TRUE='#' BUILD_BSDCPIO_FALSE='' BUILD_BSDCPIO_TRUE='#' BUILD_BSDTAR_FALSE='' BUILD_BSDTAR_TRUE='#' BUILD_BSDUNZIP_FALSE='#' BUILD_BSDUNZIP_TRUE='' CC='/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc' CCDEPMODE='depmode=none' CFLAGS='-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Wall -Wformat -Wformat-security -ffunction-sections -fdata-sections -fvisibility=hidden -D__LIBARCHIVE_ENABLE_VISIBILITY' CPP='/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-cpp' CPPFLAGS='-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' CSCOPE='cscope' CTAGS='ctags' CYGPATH_W='echo' DEFS='-DHAVE_CONFIG_H' DEPDIR='.deps' DLLTOOL='dlltool' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='/usr/bin/grep -E' ETAGS='etags' EXEEXT='' FGREP='/usr/bin/grep -F' GC_SECTIONS='-Wl,--gc-sections' GREP='/usr/bin/grep' INC_BLAKE2_FALSE='#' INC_BLAKE2_TRUE='' INC_CYGWIN_FILES_FALSE='' INC_CYGWIN_FILES_TRUE='#' INC_DARWIN_ACL_FALSE='' INC_DARWIN_ACL_TRUE='#' INC_FREEBSD_ACL_FALSE='' INC_FREEBSD_ACL_TRUE='#' INC_LINUX_ACL_FALSE='' INC_LINUX_ACL_TRUE='#' INC_SUNOS_ACL_FALSE='' INC_SUNOS_ACL_TRUE='#' INC_WINDOWS_FILES_FALSE='' INC_WINDOWS_FILES_TRUE='#' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' LD='/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-ld' LDFLAGS='' LIBARCHIVE_VERSION_NUMBER='3007001' LIBARCHIVE_VERSION_STRING='3.7.1' LIBICONV='' LIBOBJS=' ${LIBOBJDIR}lstat$U.o ${LIBOBJDIR}stat$U.o' LIBS='-lexpat -llzma -llz4 -lbz2 -lz ' LIBSREQUIRED='' LIBTOOL='$(SHELL) $(top_builddir)/libtool' LIBXML2_PC_CFLAGS='' LIBXML2_PC_LIBS='' LIPO='' LN_S='ln -s' LTLIBICONV='' LTLIBOBJS=' ${LIBOBJDIR}lstat$U.lo ${LIBOBJDIR}stat$U.lo' LT_SYS_LIBRARY_PATH='' MAINT='' MAINTAINER_MODE_FALSE='#' MAINTAINER_MODE_TRUE='' MAKEINFO='${SHELL} '\''/home/autobuild/autobuild/instance-10/output-1/build/libarchive-3.7.1/build/autoconf/missing'\'' makeinfo' MANIFEST_TOOL=':' MKDIR_P='/usr/bin/mkdir -p' NM='/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-nm' NMEDIT='' OBJDUMP='/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-objdump' OBJEXT='o' OTOOL64='' OTOOL='' PACKAGE='libarchive' PACKAGE_BUGREPORT='libarchive-discuss@googlegroups.com' PACKAGE_NAME='libarchive' PACKAGE_STRING='libarchive 3.7.1' PACKAGE_TARNAME='libarchive' PACKAGE_URL='' PACKAGE_VERSION='3.7.1' PATH_SEPARATOR=':' PKG_CONFIG='/home/autobuild/autobuild/instance-10/output-1/host/bin/pkg-config' PKG_CONFIG_LIBDIR='' PKG_CONFIG_PATH='' PLATFORMCPPFLAGS='' RANLIB='/home/autobuild/autobuild/instance-10/output-1/host/bin/powerpc64le-buildroot-linux-gnu-gcc-ranlib' SED='/usr/bin/sed' SET_MAKE='' SHELL='/bin/sh' STATIC_BSDCAT_FALSE='' STATIC_BSDCAT_TRUE='#' STATIC_BSDCPIO_FALSE='' STATIC_BSDCPIO_TRUE='#' STATIC_BSDTAR_FALSE='' STATIC_BSDTAR_TRUE='#' STATIC_BSDUNZIP_FALSE='#' STATIC_BSDUNZIP_TRUE='' STRIP='/bin/true' VERSION='3.7.1' ac_ct_AR='' ac_ct_CC='' ac_ct_DUMPBIN='' am__EXEEXT_FALSE='' am__EXEEXT_TRUE='#' am__fastdepCC_FALSE='' am__fastdepCC_TRUE='#' am__include='include' am__isrc='' am__leading_dot='.' am__nodep='' am__quote='' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' bindir='${exec_prefix}/bin' build='aarch64-unknown-linux-gnu' build_alias='aarch64-unknown-linux-gnu' build_cpu='aarch64' build_os='linux-gnu' build_vendor='unknown' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='/usr' host='powerpc64le-buildroot-linux-gnu' host_alias='powerpc64le-buildroot-linux-gnu' host_cpu='powerpc64le' host_os='linux-gnu' host_vendor='buildroot' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='${SHELL} /home/autobuild/autobuild/instance-10/output-1/build/libarchive-3.7.1/build/autoconf/install-sh' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='/var' mandir='${datarootdir}/man' mkdir_p='$(MKDIR_P)' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='/usr' program_transform_name='s&^&&' psdir='${docdir}' runstatedir='${localstatedir}/run' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='/etc' target_alias='powerpc64le-buildroot-linux-gnu' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "libarchive" #define PACKAGE_TARNAME "libarchive" #define PACKAGE_VERSION "3.7.1" #define PACKAGE_STRING "libarchive 3.7.1" #define PACKAGE_BUGREPORT "libarchive-discuss@googlegroups.com" #define PACKAGE_URL "" #define PACKAGE "libarchive" #define VERSION "3.7.1" #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 #define LIBARCHIVE_VERSION_STRING "3.7.1" #define LIBARCHIVE_VERSION_NUMBER "3007001" #define BSDCPIO_VERSION_STRING "3.7.1" #define BSDTAR_VERSION_STRING "3.7.1" #define BSDCAT_VERSION_STRING "3.7.1" #define HAVE_STDIO_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_STRINGS_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_UNISTD_H 1 #define HAVE_WCHAR_H 1 #define HAVE_SYS_TIME_H 1 #define STDC_HEADERS 1 #define _ALL_SOURCE 1 #define _DARWIN_C_SOURCE 1 #define _GNU_SOURCE 1 #define _HPUX_ALT_XOPEN_SOCKET_API 1 #define _NETBSD_SOURCE 1 #define _OPENBSD_SOURCE 1 #define _POSIX_PTHREAD_SEMANTICS 1 #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 #define __STDC_WANT_LIB_EXT2__ 1 #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 #define _TANDEM_SOURCE 1 #define __EXTENSIONS__ 1 #define HAVE_DLFCN_H 1 #define LT_OBJDIR ".libs/" #define HAVE_DIRENT_H 1 #define HAVE_SYS_WAIT_H 1 #define HAVE_CTYPE_H 1 #define HAVE_ERRNO_H 1 #define HAVE_FCNTL_H 1 #define HAVE_FNMATCH_H 1 #define HAVE_GRP_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_LANGINFO_H 1 #define HAVE_LIMITS_H 1 #define HAVE_LINUX_FIEMAP_H 1 #define HAVE_LINUX_FS_H 1 #define HAVE_LINUX_MAGIC_H 1 #define HAVE_LINUX_TYPES_H 1 #define HAVE_WORKING_FS_IOC_GETFLAGS 1 #define HAVE_LOCALE_H 1 #define HAVE_PATHS_H 1 #define HAVE_POLL_H 1 #define HAVE_PTHREAD_H 1 #define HAVE_PWD_H 1 #define HAVE_SIGNAL_H 1 #define HAVE_SPAWN_H 1 #define HAVE_STDARG_H 1 #define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_SYS_CDEFS_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_MOUNT_H 1 #define HAVE_SYS_QUEUE_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_POLL_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_STATFS_H 1 #define HAVE_SYS_STATVFS_H 1 #define HAVE_SYS_SYSMACROS_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_UTSNAME_H 1 #define HAVE_SYS_VFS_H 1 #define HAVE_SYS_XATTR_H 1 #define HAVE_TIME_H 1 #define HAVE_UNISTD_H 1 #define HAVE_UTIME_H 1 #define HAVE_WCHAR_H 1 #define HAVE_WCTYPE_H 1 #define HAVE_ZLIB_H 1 #define HAVE_LIBZ 1 #define HAVE_BZLIB_H 1 #define HAVE_LIBBZ2 1 #define HAVE_ICONV 1 #define ICONV_CONST #define HAVE_ICONV_H 1 #define HAVE_LZ4_H 1 #define HAVE_LZ4HC_H 1 #define HAVE_LIBLZ4 1 #define HAVE_LZMA_H 1 #define HAVE_LIBLZMA 1 #define HAVE_LZMA_STREAM_ENCODER_MT 1 #define HAVE_LZMA_FILTER_ARM64 1 #define HAVE_EXPAT_H 1 #define HAVE_LIBEXPAT 1 #define HAVE_REGEX_H 1 #define HAVE_STRUCT_TM_TM_GMTOFF 1 #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 #define HAVE_UINTMAX_T 1 #define HAVE_UNSIGNED_LONG_LONG 1 #define HAVE_UNSIGNED_LONG_LONG_INT 1 #define HAVE_LONG_LONG_INT 1 #define HAVE_INTMAX_T 1 #define HAVE_UINTMAX_T 1 #define HAVE_DECL_SIZE_MAX 1 #define HAVE_DECL_INT32_MAX 1 #define HAVE_DECL_INT32_MIN 1 #define HAVE_DECL_INT64_MAX 1 #define HAVE_DECL_INT64_MIN 1 #define HAVE_DECL_UINT64_MAX 1 #define HAVE_DECL_UINT32_MAX 1 #define HAVE_DECL_INTMAX_MAX 1 #define HAVE_DECL_INTMAX_MIN 1 #define HAVE_DECL_UINTMAX_MAX 1 #define HAVE_DECL_SSIZE_MAX 1 #define HAVE_EILSEQ 1 #define HAVE_WCHAR_T 1 #define SIZEOF_WCHAR_T 4 #define SIZEOF_INT 4 #define SIZEOF_LONG 8 #define MAJOR_IN_SYSMACROS 1 #define HAVE_FSEEKO 1 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 #define HAVE_LSTAT_EMPTY_STRING_BUG 1 #define HAVE_STAT_EMPTY_STRING_BUG 1 #define HAVE_DECL_STRERROR_R 1 #define HAVE_STRERROR_R 1 #define STRERROR_R_CHAR_P 1 #define HAVE_STRFTIME 1 #define HAVE_VPRINTF 1 #define HAVE_ARC4RANDOM_BUF 1 #define HAVE_CHOWN 1 #define HAVE_CHROOT 1 #define HAVE_CTIME_R 1 #define HAVE_FCHDIR 1 #define HAVE_FCHMOD 1 #define HAVE_FCHOWN 1 #define HAVE_FCNTL 1 #define HAVE_FDOPENDIR 1 #define HAVE_FNMATCH 1 #define HAVE_FORK 1 #define HAVE_FSTAT 1 #define HAVE_FSTATAT 1 #define HAVE_FSTATFS 1 #define HAVE_FSTATVFS 1 #define HAVE_FTRUNCATE 1 #define HAVE_FUTIMENS 1 #define HAVE_FUTIMES 1 #define HAVE_FUTIMESAT 1 #define HAVE_GETEUID 1 #define HAVE_GETLINE 1 #define HAVE_GETPID 1 #define HAVE_GETGRGID_R 1 #define HAVE_GETGRNAM_R 1 #define HAVE_GETPWNAM_R 1 #define HAVE_GETPWUID_R 1 #define HAVE_GMTIME_R 1 #define HAVE_LCHMOD 1 #define HAVE_LCHOWN 1 #define HAVE_LINK 1 #define HAVE_LINKAT 1 #define HAVE_LOCALTIME_R 1 #define HAVE_LSTAT 1 #define HAVE_LUTIMES 1 #define HAVE_MBRTOWC 1 #define HAVE_MEMMOVE 1 #define HAVE_MEMSET 1 #define HAVE_MKDIR 1 #define HAVE_MKFIFO 1 #define HAVE_MKNOD 1 #define HAVE_MKSTEMP 1 #define HAVE_NL_LANGINFO 1 #define HAVE_OPENAT 1 #define HAVE_PIPE 1 #define HAVE_POLL 1 #define HAVE_POSIX_SPAWNP 1 #define HAVE_READLINK 1 #define HAVE_READLINKAT 1 #define HAVE_SELECT 1 #define HAVE_SETENV 1 #define HAVE_SETLOCALE 1 #define HAVE_SIGACTION 1 #define HAVE_STATFS 1 #define HAVE_STATVFS 1 #define HAVE_STRCHR 1 #define HAVE_STRDUP 1 #define HAVE_STRERROR 1 #define HAVE_STRNLEN 1 #define HAVE_STRRCHR 1 #define HAVE_SYMLINK 1 #define HAVE_TIMEGM 1 #define HAVE_TZSET 1 #define HAVE_UNLINKAT 1 #define HAVE_UNSETENV 1 #define HAVE_UTIME 1 #define HAVE_UTIMENSAT 1 #define HAVE_UTIMES 1 #define HAVE_VFORK 1 #define HAVE_WCRTOMB 1 #define HAVE_WCSCMP 1 #define HAVE_WCSCPY 1 #define HAVE_WCSLEN 1 #define HAVE_WCTOMB 1 #define HAVE_WMEMCMP 1 #define HAVE_WMEMCPY 1 #define HAVE_WMEMMOVE 1 #define HAVE_READDIR_R 1 #define HAVE_DIRFD 1 configure: exit 0