mirror of https://github.com/axmolengine/axmol.git
Update freetype to v2.12.1
This commit is contained in:
parent
421874a7e8
commit
0cdcf27a02
|
@ -62,7 +62,7 @@
|
|||
|
||||
## FreeType
|
||||
- Upstream: https://www.freetype.org/
|
||||
- Version: 2.12.0
|
||||
- Version: 2.12.1
|
||||
- License: BSD-style (The FreeType Project)
|
||||
|
||||
## Glad
|
||||
|
|
|
@ -163,7 +163,7 @@ project(freetype C)
|
|||
|
||||
set(VERSION_MAJOR "2")
|
||||
set(VERSION_MINOR "12")
|
||||
set(VERSION_PATCH "0")
|
||||
set(VERSION_PATCH "1")
|
||||
|
||||
# Generate LIBRARY_VERSION and LIBRARY_SOVERSION.
|
||||
set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'")
|
||||
|
@ -491,46 +491,48 @@ if (BUILD_FRAMEWORK)
|
|||
)
|
||||
set_target_properties(freetype PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist
|
||||
MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist
|
||||
PUBLIC_HEADER "${PUBLIC_HEADERS}"
|
||||
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
||||
set(PKG_CONFIG_REQUIRED_PRIVATE "")
|
||||
set(PKG_CONFIG_LIBS_PRIVATE "")
|
||||
set(PKGCONFIG_REQUIRES "")
|
||||
set(PKGCONFIG_REQUIRES_PRIVATE "")
|
||||
set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
|
||||
set(PKGCONFIG_LIBS_PRIVATE "")
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
|
||||
target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "zlib")
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
|
||||
endif ()
|
||||
if (BZIP2_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
|
||||
target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
|
||||
if (PC_BZIP2_FOUND)
|
||||
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "bzip2")
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
|
||||
else ()
|
||||
list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2")
|
||||
list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
|
||||
endif ()
|
||||
endif ()
|
||||
if (PNG_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
|
||||
target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS})
|
||||
target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
|
||||
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libpng")
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng")
|
||||
endif ()
|
||||
if (HarfBuzz_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
|
||||
target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
|
||||
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
|
||||
endif ()
|
||||
if (BROTLIDEC_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES})
|
||||
target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS})
|
||||
target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS})
|
||||
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libbrotlidec")
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec")
|
||||
endif ()
|
||||
|
||||
|
||||
|
@ -557,7 +559,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
|||
# Generate the pkg-config file
|
||||
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
|
||||
|
||||
string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}")
|
||||
string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}")
|
||||
|
||||
string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
|
@ -569,10 +571,26 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
|||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
else ()
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" ""
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" ""
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
endif ()
|
||||
|
||||
set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
|
||||
if (EXISTS "${FREETYPE2_PC_IN_NAME}")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FreeType 2.12.0
|
||||
FreeType 2.12.1
|
||||
===============
|
||||
|
||||
Homepage: https://www.freetype.org
|
||||
|
@ -30,9 +30,9 @@ sites. Go to
|
|||
|
||||
and download one of the following files.
|
||||
|
||||
freetype-doc-2.12.0.tar.xz
|
||||
freetype-doc-2.12.0.tar.gz
|
||||
ftdoc2120.zip
|
||||
freetype-doc-2.12.1.tar.xz
|
||||
freetype-doc-2.12.1.tar.gz
|
||||
ftdoc2121.zip
|
||||
|
||||
To view the documentation online, go to
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -45,7 +46,7 @@ m4_define([_LT_COPYING], [dnl
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
])
|
||||
|
||||
# serial 58 LT_INIT
|
||||
# serial 59 LT_INIT
|
||||
|
||||
|
||||
# LT_PREREQ(VERSION)
|
||||
|
@ -195,6 +196,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
|||
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
|
||||
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
|
||||
m4_require([_LT_CMD_RELOAD])dnl
|
||||
m4_require([_LT_DECL_FILECMD])dnl
|
||||
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
|
||||
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
|
||||
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
|
||||
|
@ -233,8 +235,8 @@ esac
|
|||
ofile=libtool
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
|
@ -736,6 +738,7 @@ _LT_CONFIG_SAVE_COMMANDS([
|
|||
cat <<_LT_EOF >> "$cfgfile"
|
||||
#! $SHELL
|
||||
# Generated automatically by $as_me ($PACKAGE) $VERSION
|
||||
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
|
||||
# Provide generalized library-building support services.
|
||||
|
@ -785,7 +788,7 @@ _LT_EOF
|
|||
# if finds mixed CR/LF and LF-only lines. Since sed operates in
|
||||
# text mode, it properly converts lines to CR/LF. This bash problem
|
||||
# is reportedly fixed, but why not run on old versions too?
|
||||
sed '$q' "$ltmain" >> "$cfgfile" \
|
||||
$SED '$q' "$ltmain" >> "$cfgfile" \
|
||||
|| (rm -f "$cfgfile"; exit 1)
|
||||
|
||||
mv -f "$cfgfile" "$ofile" ||
|
||||
|
@ -1047,8 +1050,8 @@ int forced_loaded() { return 2;}
|
|||
_LT_EOF
|
||||
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
|
||||
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
|
||||
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
|
||||
$AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
|
||||
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
|
||||
cat > conftest.c << _LT_EOF
|
||||
|
@ -1072,17 +1075,12 @@ _LT_EOF
|
|||
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
|
||||
darwin1.*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
darwin*) # darwin 5.x on
|
||||
# if running on 10.5 or later, the deployment target defaults
|
||||
# to the OS version, if on x86, and 10.4, the deployment
|
||||
# target defaults to 10.4. Don't you love it?
|
||||
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
|
||||
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
10.[[012]][[,.]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
10.*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
darwin*)
|
||||
case $MACOSX_DEPLOYMENT_TARGET,$host in
|
||||
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
@ -1131,12 +1129,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
|||
output_verbose_link_cmd=func_echo_all
|
||||
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
||||
m4_if([$1], [CXX],
|
||||
[ if test yes != "$lt_cv_apple_cc_single_mod"; then
|
||||
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
|
||||
fi
|
||||
],[])
|
||||
else
|
||||
|
@ -1250,7 +1248,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
|
|||
# _LT_WITH_SYSROOT
|
||||
# ----------------
|
||||
AC_DEFUN([_LT_WITH_SYSROOT],
|
||||
[AC_MSG_CHECKING([for sysroot])
|
||||
[m4_require([_LT_DECL_SED])dnl
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
AC_ARG_WITH([sysroot],
|
||||
[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
|
||||
[Search for dependent libraries within DIR (or the compiler's sysroot
|
||||
|
@ -1267,7 +1266,7 @@ case $with_sysroot in #(
|
|||
fi
|
||||
;; #(
|
||||
/*)
|
||||
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
|
||||
lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
|
||||
;; #(
|
||||
no|'')
|
||||
;; #(
|
||||
|
@ -1297,7 +1296,7 @@ ia64-*-hpux*)
|
|||
# options accordingly.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*ELF-32*)
|
||||
HPUX_IA64_MODE=32
|
||||
;;
|
||||
|
@ -1314,7 +1313,7 @@ ia64-*-hpux*)
|
|||
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
if test yes = "$lt_cv_prog_gnu_ld"; then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -melf32bsmip"
|
||||
;;
|
||||
|
@ -1326,7 +1325,7 @@ ia64-*-hpux*)
|
|||
;;
|
||||
esac
|
||||
else
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
|
@ -1348,7 +1347,7 @@ mips64*-*linux*)
|
|||
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
emul=elf
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
emul="${emul}32"
|
||||
;;
|
||||
|
@ -1356,7 +1355,7 @@ mips64*-*linux*)
|
|||
emul="${emul}64"
|
||||
;;
|
||||
esac
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*MSB*)
|
||||
emul="${emul}btsmip"
|
||||
;;
|
||||
|
@ -1364,7 +1363,7 @@ mips64*-*linux*)
|
|||
emul="${emul}ltsmip"
|
||||
;;
|
||||
esac
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*N32*)
|
||||
emul="${emul}n32"
|
||||
;;
|
||||
|
@ -1384,14 +1383,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
# not appear in the list.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*32-bit*)
|
||||
case $host in
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
;;
|
||||
|
@ -1459,7 +1458,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
# options accordingly.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*64-bit*)
|
||||
case $lt_cv_prog_gnu_ld in
|
||||
yes*)
|
||||
|
@ -1498,9 +1497,22 @@ need_locks=$enable_libtool_lock
|
|||
m4_defun([_LT_PROG_AR],
|
||||
[AC_CHECK_TOOLS(AR, [ar], false)
|
||||
: ${AR=ar}
|
||||
: ${AR_FLAGS=cru}
|
||||
_LT_DECL([], [AR], [1], [The archiver])
|
||||
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
|
||||
|
||||
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
|
||||
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
|
||||
# higher priority because thats what people were doing historically (setting
|
||||
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
|
||||
# variable obsoleted/removed.
|
||||
|
||||
test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
|
||||
lt_ar_flags=$AR_FLAGS
|
||||
_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
|
||||
|
||||
# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
|
||||
# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
|
||||
_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
|
||||
[Flags to create an archive])
|
||||
|
||||
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
|
||||
[lt_cv_ar_at_file=no
|
||||
|
@ -1719,7 +1731,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
|||
lt_cv_sys_max_cmd_len=8192;
|
||||
;;
|
||||
|
||||
bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
|
||||
bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
|
@ -1762,7 +1774,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
|||
sysv5* | sco5v6* | sysv4.2uw2*)
|
||||
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
|
||||
if test -n "$kargmax"; then
|
||||
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
|
||||
lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
|
||||
else
|
||||
lt_cv_sys_max_cmd_len=32768
|
||||
fi
|
||||
|
@ -2212,26 +2224,35 @@ m4_defun([_LT_CMD_STRIPLIB],
|
|||
striplib=
|
||||
old_striplib=
|
||||
AC_MSG_CHECKING([whether stripping libraries is possible])
|
||||
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
||||
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
|
||||
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
if test -z "$STRIP"; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
# FIXME - insert some real tests, host_os isn't really good enough
|
||||
case $host_os in
|
||||
darwin*)
|
||||
if test -n "$STRIP"; then
|
||||
if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
||||
old_striplib="$STRIP --strip-debug"
|
||||
striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
case $host_os in
|
||||
darwin*)
|
||||
# FIXME - insert some real tests, host_os isn't really good enough
|
||||
striplib="$STRIP -x"
|
||||
old_striplib="$STRIP -S"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
;;
|
||||
freebsd*)
|
||||
if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
|
||||
old_striplib="$STRIP --strip-debug"
|
||||
striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
|
||||
_LT_DECL([], [striplib], [1])
|
||||
|
@ -2554,7 +2575,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
|||
case $host_os in
|
||||
cygwin*)
|
||||
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
|
||||
soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
m4_if([$1], [],[
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
|
||||
;;
|
||||
|
@ -2564,14 +2585,14 @@ m4_if([$1], [],[
|
|||
;;
|
||||
pw32*)
|
||||
# pw32 DLLs use 'pw' prefix rather than 'lib'
|
||||
library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
;;
|
||||
esac
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
@ -2590,7 +2611,7 @@ m4_if([$1], [],[
|
|||
done
|
||||
IFS=$lt_save_ifs
|
||||
# Convert to MSYS style.
|
||||
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
|
||||
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
|
||||
;;
|
||||
cygwin*)
|
||||
# Convert to unix form, then to dos form, then back to unix form
|
||||
|
@ -2627,7 +2648,7 @@ m4_if([$1], [],[
|
|||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
@ -2660,7 +2681,7 @@ dgux*)
|
|||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
if test -x /usr/bin/objformat; then
|
||||
|
@ -3459,7 +3480,7 @@ beos*)
|
|||
|
||||
bsdi[[45]]*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
lt_cv_file_magic_cmd='$FILECMD -L'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
;;
|
||||
|
||||
|
@ -3493,14 +3514,14 @@ darwin* | rhapsody*)
|
|||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||
case $host_cpu in
|
||||
i*86 )
|
||||
# Not sure whether the presence of OpenBSD here was a mistake.
|
||||
# Let's accept both of them until this is cleared up.
|
||||
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
|
||||
;;
|
||||
esac
|
||||
|
@ -3514,7 +3535,7 @@ haiku*)
|
|||
;;
|
||||
|
||||
hpux10.20* | hpux11*)
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
|
||||
|
@ -3561,7 +3582,7 @@ netbsd*)
|
|||
|
||||
newos6*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
lt_cv_file_magic_test_file=/usr/lib/libnls.so
|
||||
;;
|
||||
|
||||
|
@ -3688,13 +3709,13 @@ else
|
|||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
|
||||
*$lt_bad_file* | *'Invalid file or object type'*)
|
||||
lt_cv_path_NM="$tmp_nm -B"
|
||||
break 2
|
||||
;;
|
||||
*)
|
||||
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
|
||||
case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
|
||||
*/dev/null*)
|
||||
lt_cv_path_NM="$tmp_nm -p"
|
||||
break 2
|
||||
|
@ -3720,7 +3741,7 @@ else
|
|||
# Let the user override the test.
|
||||
else
|
||||
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
|
||||
*COFF*)
|
||||
DUMPBIN="$DUMPBIN -symbols -headers"
|
||||
;;
|
||||
|
@ -3960,7 +3981,7 @@ esac
|
|||
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Gets list of data symbols to import.
|
||||
lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
|
||||
lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
|
||||
# Adjust the below global symbol transforms to fixup imported variables.
|
||||
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
|
||||
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
|
||||
|
@ -3978,20 +3999,20 @@ fi
|
|||
# Transform an extracted symbol line into a proper C declaration.
|
||||
# Some systems (esp. on ia64) link data and code symbols differently,
|
||||
# so use this general approach.
|
||||
lt_cv_sys_global_symbol_to_cdecl="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
|
||||
$lt_cdecl_hook\
|
||||
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
|
||||
|
||||
# Transform an extracted symbol line into symbol name and symbol address
|
||||
lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
|
||||
$lt_c_name_hook\
|
||||
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
|
||||
|
||||
# Transform an extracted symbol line into symbol name with lib prefix and
|
||||
# symbol address.
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
|
||||
$lt_c_name_lib_hook\
|
||||
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
|
||||
|
@ -4015,7 +4036,7 @@ for ac_symprfx in "" "_"; do
|
|||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# D for any global variable and I for any imported variable.
|
||||
# Also find C++ and __fastcall symbols from MSVC++,
|
||||
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
|
@ -4033,9 +4054,9 @@ for ac_symprfx in "" "_"; do
|
|||
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
|
||||
" ' prfx=^$ac_symprfx]"
|
||||
else
|
||||
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
|
||||
lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
|
||||
fi
|
||||
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
|
||||
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
pipe_works=no
|
||||
|
@ -4322,7 +4343,7 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# FreeBSD uses GNU C++
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
|
@ -4405,7 +4426,7 @@ m4_if([$1], [CXX], [
|
|||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*)
|
||||
# Sun C++ 5.9
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
|
@ -4741,7 +4762,7 @@ m4_if([$1], [CXX], [
|
|||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
|
||||
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
|
@ -4924,7 +4945,7 @@ m4_if([$1], [CXX], [
|
|||
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
|
||||
else
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
fi
|
||||
;;
|
||||
pw32*)
|
||||
|
@ -4932,7 +4953,7 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
cl* | icl*)
|
||||
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
;;
|
||||
*)
|
||||
|
@ -4989,15 +5010,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
|||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
|
@ -5049,7 +5070,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
|||
_LT_TAGVAR(whole_archive_flag_spec, $1)=
|
||||
fi
|
||||
supports_anon_versioning=no
|
||||
case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
|
||||
case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
|
||||
*GNU\ gold*) supports_anon_versioning=yes ;;
|
||||
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
|
||||
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
|
||||
|
@ -5161,6 +5182,7 @@ _LT_EOF
|
|||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
interix[[3-9]]*)
|
||||
|
@ -5175,7 +5197,7 @@ _LT_EOF
|
|||
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
|
||||
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
;;
|
||||
|
||||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
|
@ -5218,7 +5240,7 @@ _LT_EOF
|
|||
_LT_TAGVAR(compiler_needs_object, $1)=yes
|
||||
;;
|
||||
esac
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*) # Sun C 5.9
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
_LT_TAGVAR(compiler_needs_object, $1)=yes
|
||||
|
@ -5230,7 +5252,7 @@ _LT_EOF
|
|||
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
|
@ -5246,7 +5268,7 @@ _LT_EOF
|
|||
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
|
@ -5378,7 +5400,7 @@ _LT_EOF
|
|||
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
|
||||
else
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
fi
|
||||
aix_use_runtimelinking=no
|
||||
|
||||
|
@ -5561,12 +5583,12 @@ _LT_EOF
|
|||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
_LT_TAGVAR(always_export_symbols, $1)=yes
|
||||
|
@ -5607,7 +5629,7 @@ _LT_EOF
|
|||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
|
@ -5655,7 +5677,7 @@ _LT_EOF
|
|||
;;
|
||||
|
||||
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
|
@ -5866,6 +5888,7 @@ _LT_EOF
|
|||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
osf3*)
|
||||
|
@ -6632,8 +6655,8 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
case $GXX,$cc_basename in
|
||||
,cl* | no,cl*)
|
||||
# Native MSVC
|
||||
,cl* | no,cl* | ,icl* | no,icl*)
|
||||
# Native MSVC or ICC
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
|
@ -6731,6 +6754,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
|
@ -6761,7 +6785,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
|
||||
# conventions
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
|
@ -6898,7 +6922,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
|
||||
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
case $cc_basename in
|
||||
|
@ -7038,13 +7062,13 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*)
|
||||
# Sun C++ 5.9
|
||||
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
|
||||
|
@ -8182,6 +8206,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
|
|||
AC_SUBST([DLLTOOL])
|
||||
])
|
||||
|
||||
# _LT_DECL_FILECMD
|
||||
# ----------------
|
||||
# Check for a file(cmd) program that can be used to detect file type and magic
|
||||
m4_defun([_LT_DECL_FILECMD],
|
||||
[AC_CHECK_TOOL([FILECMD], [file], [:])
|
||||
_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
|
||||
])# _LD_DECL_FILECMD
|
||||
|
||||
# _LT_DECL_SED
|
||||
# ------------
|
||||
# Check for a fully-functional sed program, that truncates
|
||||
|
@ -8361,8 +8393,8 @@ _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
|
|||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -8793,7 +8825,7 @@ LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
|||
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
|
@ -8918,7 +8950,8 @@ m4_define([lt_dict_filter],
|
|||
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -8927,23 +8960,23 @@ m4_define([lt_dict_filter],
|
|||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# serial 4245 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.7])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.7])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
[macro_version='2.4.7'
|
||||
macro_revision='2.4.7'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for FreeType 2.12.
|
||||
# Generated by GNU Autoconf 2.71 for FreeType 2.12.1.
|
||||
#
|
||||
# Report bugs to <freetype@nongnu.org>.
|
||||
#
|
||||
|
@ -621,8 +621,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='FreeType'
|
||||
PACKAGE_TARNAME='freetype'
|
||||
PACKAGE_VERSION='2.12'
|
||||
PACKAGE_STRING='FreeType 2.12'
|
||||
PACKAGE_VERSION='2.12.1'
|
||||
PACKAGE_STRING='FreeType 2.12.1'
|
||||
PACKAGE_BUGREPORT='freetype@nongnu.org'
|
||||
PACKAGE_URL=''
|
||||
|
||||
|
@ -720,6 +720,7 @@ RANLIB
|
|||
STRIP
|
||||
ac_ct_AR
|
||||
AR
|
||||
FILECMD
|
||||
LN_S
|
||||
NM
|
||||
ac_ct_DUMPBIN
|
||||
|
@ -812,6 +813,7 @@ with_bzip2
|
|||
with_png
|
||||
with_harfbuzz
|
||||
with_brotli
|
||||
with_librsvg
|
||||
with_old_mac_fonts
|
||||
with_fsspec
|
||||
with_fsref
|
||||
|
@ -1392,7 +1394,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures FreeType 2.12 to adapt to many kinds of systems.
|
||||
\`configure' configures FreeType 2.12.1 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
@ -1459,7 +1461,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of FreeType 2.12:";;
|
||||
short | recursive ) echo "Configuration of FreeType 2.12.1:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
@ -1502,6 +1504,9 @@ Optional Packages:
|
|||
--with-brotli=[yes|no|auto]
|
||||
support decompression of WOFF2 streams
|
||||
[default=auto]
|
||||
--with-librsvg=[yes|no|auto]
|
||||
support OpenType SVG fonts in FreeType demo programs
|
||||
[default=auto]
|
||||
--with-old-mac-fonts allow Mac resource-based fonts to be used
|
||||
--with-fsspec use obsolete FSSpec API of MacOS, if available
|
||||
(default=yes)
|
||||
|
@ -1617,7 +1622,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
FreeType configure 2.12
|
||||
FreeType configure 2.12.1
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
|
@ -1968,7 +1973,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by FreeType $as_me 2.12, which was
|
||||
It was created by FreeType $as_me 2.12.1, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
|
@ -2730,7 +2735,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||
|
||||
# Don't forget to update `docs/VERSIONS.TXT'!
|
||||
|
||||
version_info='24:2:18'
|
||||
version_info='24:3:18'
|
||||
|
||||
ft_version=`echo $version_info | tr : .`
|
||||
|
||||
|
@ -4087,8 +4092,8 @@ esac
|
|||
|
||||
|
||||
|
||||
macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
macro_version='2.4.7'
|
||||
macro_revision='2.4.7'
|
||||
|
||||
|
||||
|
||||
|
@ -4641,13 +4646,13 @@ else
|
|||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
|
||||
*$lt_bad_file* | *'Invalid file or object type'*)
|
||||
lt_cv_path_NM="$tmp_nm -B"
|
||||
break 2
|
||||
;;
|
||||
*)
|
||||
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
|
||||
case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
|
||||
*/dev/null*)
|
||||
lt_cv_path_NM="$tmp_nm -p"
|
||||
break 2
|
||||
|
@ -4785,7 +4790,7 @@ esac
|
|||
fi
|
||||
fi
|
||||
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
|
||||
*COFF*)
|
||||
DUMPBIN="$DUMPBIN -symbols -headers"
|
||||
;;
|
||||
|
@ -4889,7 +4894,7 @@ else $as_nop
|
|||
lt_cv_sys_max_cmd_len=8192;
|
||||
;;
|
||||
|
||||
bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
|
||||
bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
|
@ -4932,7 +4937,7 @@ else $as_nop
|
|||
sysv5* | sco5v6* | sysv4.2uw2*)
|
||||
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
|
||||
if test -n "$kargmax"; then
|
||||
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
|
||||
lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'`
|
||||
else
|
||||
lt_cv_sys_max_cmd_len=32768
|
||||
fi
|
||||
|
@ -5137,6 +5142,114 @@ esac
|
|||
|
||||
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}file; ac_word=$2
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
printf %s "checking for $ac_word... " >&6; }
|
||||
if test ${ac_cv_prog_FILECMD+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
if test -n "$FILECMD"; then
|
||||
ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
case $as_dir in #(((
|
||||
'') as_dir=./ ;;
|
||||
*/) ;;
|
||||
*) as_dir=$as_dir/ ;;
|
||||
esac
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_FILECMD="${ac_tool_prefix}file"
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
FILECMD=$ac_cv_prog_FILECMD
|
||||
if test -n "$FILECMD"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
|
||||
printf "%s\n" "$FILECMD" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_FILECMD"; then
|
||||
ac_ct_FILECMD=$FILECMD
|
||||
# Extract the first word of "file", so it can be a program name with args.
|
||||
set dummy file; ac_word=$2
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
printf %s "checking for $ac_word... " >&6; }
|
||||
if test ${ac_cv_prog_ac_ct_FILECMD+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
if test -n "$ac_ct_FILECMD"; then
|
||||
ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
case $as_dir in #(((
|
||||
'') as_dir=./ ;;
|
||||
*/) ;;
|
||||
*) as_dir=$as_dir/ ;;
|
||||
esac
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_FILECMD="file"
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
|
||||
if test -n "$ac_ct_FILECMD"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
|
||||
printf "%s\n" "$ac_ct_FILECMD" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_FILECMD" = x; then
|
||||
FILECMD=":"
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
FILECMD=$ac_ct_FILECMD
|
||||
fi
|
||||
else
|
||||
FILECMD="$ac_cv_prog_FILECMD"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}objdump; ac_word=$2
|
||||
|
@ -5277,7 +5390,7 @@ beos*)
|
|||
|
||||
bsdi[45]*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
lt_cv_file_magic_cmd='$FILECMD -L'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
;;
|
||||
|
||||
|
@ -5311,14 +5424,14 @@ darwin* | rhapsody*)
|
|||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||
case $host_cpu in
|
||||
i*86 )
|
||||
# Not sure whether the presence of OpenBSD here was a mistake.
|
||||
# Let's accept both of them until this is cleared up.
|
||||
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
|
||||
;;
|
||||
esac
|
||||
|
@ -5332,7 +5445,7 @@ haiku*)
|
|||
;;
|
||||
|
||||
hpux10.20* | hpux11*)
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
|
||||
|
@ -5379,7 +5492,7 @@ netbsd*)
|
|||
|
||||
newos6*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
lt_cv_file_magic_test_file=/usr/lib/libnls.so
|
||||
;;
|
||||
|
||||
|
@ -5750,13 +5863,29 @@ esac
|
|||
fi
|
||||
|
||||
: ${AR=ar}
|
||||
: ${AR_FLAGS=cru}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
|
||||
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
|
||||
# higher priority because thats what people were doing historically (setting
|
||||
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
|
||||
# variable obsoleted/removed.
|
||||
|
||||
test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
|
||||
lt_ar_flags=$AR_FLAGS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
|
||||
# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -6220,7 +6349,7 @@ esac
|
|||
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Gets list of data symbols to import.
|
||||
lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
|
||||
lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
|
||||
# Adjust the below global symbol transforms to fixup imported variables.
|
||||
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
|
||||
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
|
||||
|
@ -6238,20 +6367,20 @@ fi
|
|||
# Transform an extracted symbol line into a proper C declaration.
|
||||
# Some systems (esp. on ia64) link data and code symbols differently,
|
||||
# so use this general approach.
|
||||
lt_cv_sys_global_symbol_to_cdecl="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
|
||||
$lt_cdecl_hook\
|
||||
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
|
||||
|
||||
# Transform an extracted symbol line into symbol name and symbol address
|
||||
lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
|
||||
$lt_c_name_hook\
|
||||
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
|
||||
|
||||
# Transform an extracted symbol line into symbol name with lib prefix and
|
||||
# symbol address.
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
|
||||
$lt_c_name_lib_hook\
|
||||
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
|
||||
|
@ -6275,7 +6404,7 @@ for ac_symprfx in "" "_"; do
|
|||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# D for any global variable and I for any imported variable.
|
||||
# Also find C++ and __fastcall symbols from MSVC++,
|
||||
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK '"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
|
@ -6293,9 +6422,9 @@ for ac_symprfx in "" "_"; do
|
|||
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
|
||||
" ' prfx=^$ac_symprfx"
|
||||
else
|
||||
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
|
||||
lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
|
||||
fi
|
||||
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
|
||||
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
pipe_works=no
|
||||
|
@ -6498,7 +6627,7 @@ case $with_sysroot in #(
|
|||
fi
|
||||
;; #(
|
||||
/*)
|
||||
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
|
||||
lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
|
||||
;; #(
|
||||
no|'')
|
||||
;; #(
|
||||
|
@ -6623,7 +6752,7 @@ ia64-*-hpux*)
|
|||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*ELF-32*)
|
||||
HPUX_IA64_MODE=32
|
||||
;;
|
||||
|
@ -6644,7 +6773,7 @@ ia64-*-hpux*)
|
|||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
if test yes = "$lt_cv_prog_gnu_ld"; then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -melf32bsmip"
|
||||
;;
|
||||
|
@ -6656,7 +6785,7 @@ ia64-*-hpux*)
|
|||
;;
|
||||
esac
|
||||
else
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
|
@ -6682,7 +6811,7 @@ mips64*-*linux*)
|
|||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
emul=elf
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
emul="${emul}32"
|
||||
;;
|
||||
|
@ -6690,7 +6819,7 @@ mips64*-*linux*)
|
|||
emul="${emul}64"
|
||||
;;
|
||||
esac
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*MSB*)
|
||||
emul="${emul}btsmip"
|
||||
;;
|
||||
|
@ -6698,7 +6827,7 @@ mips64*-*linux*)
|
|||
emul="${emul}ltsmip"
|
||||
;;
|
||||
esac
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*N32*)
|
||||
emul="${emul}n32"
|
||||
;;
|
||||
|
@ -6722,14 +6851,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*32-bit*)
|
||||
case $host in
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
;;
|
||||
|
@ -6837,7 +6966,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
|
|||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*64-bit*)
|
||||
case $lt_cv_prog_gnu_ld in
|
||||
yes*)
|
||||
|
@ -7620,8 +7749,8 @@ int forced_loaded() { return 2;}
|
|||
_LT_EOF
|
||||
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
|
||||
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
|
||||
echo "$AR cru libconftest.a conftest.o" >&5
|
||||
$AR cru libconftest.a conftest.o 2>&5
|
||||
echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
|
||||
$AR $AR_FLAGS libconftest.a conftest.o 2>&5
|
||||
echo "$RANLIB libconftest.a" >&5
|
||||
$RANLIB libconftest.a 2>&5
|
||||
cat > conftest.c << _LT_EOF
|
||||
|
@ -7648,17 +7777,12 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
|
|||
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
|
||||
darwin1.*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
darwin*) # darwin 5.x on
|
||||
# if running on 10.5 or later, the deployment target defaults
|
||||
# to the OS version, if on x86, and 10.4, the deployment
|
||||
# target defaults to 10.4. Don't you love it?
|
||||
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
|
||||
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
10.[012][,.]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
10.*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
darwin*)
|
||||
case $MACOSX_DEPLOYMENT_TARGET,$host in
|
||||
10.[012],*|,*powerpc*-darwin[5-8]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
@ -8374,8 +8498,8 @@ esac
|
|||
ofile=libtool
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
|
@ -8883,7 +9007,7 @@ lt_prog_compiler_static=
|
|||
lt_prog_compiler_static='-qstaticlink'
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
|
||||
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
||||
lt_prog_compiler_pic='-KPIC'
|
||||
|
@ -9306,15 +9430,15 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
|
|||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
|
@ -9366,7 +9490,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
|
|||
whole_archive_flag_spec=
|
||||
fi
|
||||
supports_anon_versioning=no
|
||||
case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
|
||||
case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
|
||||
*GNU\ gold*) supports_anon_versioning=yes ;;
|
||||
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
|
||||
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
|
||||
|
@ -9478,6 +9602,7 @@ _LT_EOF
|
|||
emximp -o $lib $output_objdir/$libname.def'
|
||||
old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
enable_shared_with_static_runtimes=yes
|
||||
file_list_spec='@'
|
||||
;;
|
||||
|
||||
interix[3-9]*)
|
||||
|
@ -9492,7 +9617,7 @@ _LT_EOF
|
|||
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
|
||||
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
|
||||
archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
;;
|
||||
|
||||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
|
@ -9535,7 +9660,7 @@ _LT_EOF
|
|||
compiler_needs_object=yes
|
||||
;;
|
||||
esac
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*) # Sun C 5.9
|
||||
whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
compiler_needs_object=yes
|
||||
|
@ -9547,7 +9672,7 @@ _LT_EOF
|
|||
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
|
@ -9563,7 +9688,7 @@ _LT_EOF
|
|||
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
|
@ -9695,7 +9820,7 @@ _LT_EOF
|
|||
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
|
||||
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
|
||||
else
|
||||
export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
fi
|
||||
aix_use_runtimelinking=no
|
||||
|
||||
|
@ -9966,12 +10091,12 @@ fi
|
|||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
hardcode_libdir_flag_spec=' '
|
||||
allow_undefined_flag=unsupported
|
||||
always_export_symbols=yes
|
||||
|
@ -10012,7 +10137,7 @@ fi
|
|||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
hardcode_libdir_flag_spec=' '
|
||||
allow_undefined_flag=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
|
@ -10053,8 +10178,8 @@ fi
|
|||
output_verbose_link_cmd=func_echo_all
|
||||
archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
|
||||
module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
|
||||
archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
||||
module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
||||
archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
||||
module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
||||
|
||||
else
|
||||
ld_shlibs=no
|
||||
|
@ -10088,7 +10213,7 @@ fi
|
|||
;;
|
||||
|
||||
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
|
@ -10339,6 +10464,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
|
|||
emximp -o $lib $output_objdir/$libname.def'
|
||||
old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
enable_shared_with_static_runtimes=yes
|
||||
file_list_spec='@'
|
||||
;;
|
||||
|
||||
osf3*)
|
||||
|
@ -11031,7 +11157,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
|||
case $host_os in
|
||||
cygwin*)
|
||||
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
|
||||
soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
|
||||
;;
|
||||
|
@ -11041,14 +11167,14 @@ cygwin* | mingw* | pw32* | cegcc*)
|
|||
;;
|
||||
pw32*)
|
||||
# pw32 DLLs use 'pw' prefix rather than 'lib'
|
||||
library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
;;
|
||||
esac
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
@ -11067,7 +11193,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
|||
done
|
||||
IFS=$lt_save_ifs
|
||||
# Convert to MSYS style.
|
||||
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
|
||||
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
|
||||
;;
|
||||
cygwin*)
|
||||
# Convert to unix form, then to dos form, then back to unix form
|
||||
|
@ -11104,7 +11230,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
|||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
@ -11137,7 +11263,7 @@ dgux*)
|
|||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
if test -x /usr/bin/objformat; then
|
||||
|
@ -12290,30 +12416,41 @@ striplib=
|
|||
old_striplib=
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
|
||||
printf %s "checking whether stripping libraries is possible... " >&6; }
|
||||
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
||||
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
|
||||
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
if test -z "$STRIP"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
else
|
||||
# FIXME - insert some real tests, host_os isn't really good enough
|
||||
case $host_os in
|
||||
darwin*)
|
||||
if test -n "$STRIP"; then
|
||||
if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
||||
old_striplib="$STRIP --strip-debug"
|
||||
striplib="$STRIP --strip-unneeded"
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
else
|
||||
case $host_os in
|
||||
darwin*)
|
||||
# FIXME - insert some real tests, host_os isn't really good enough
|
||||
striplib="$STRIP -x"
|
||||
old_striplib="$STRIP -S"
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
else
|
||||
;;
|
||||
freebsd*)
|
||||
if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
|
||||
old_striplib="$STRIP --strip-debug"
|
||||
striplib="$STRIP --strip-unneeded"
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
@ -14586,8 +14723,23 @@ then :
|
|||
fi
|
||||
|
||||
|
||||
FT_DEMO_CFLAGS=""
|
||||
FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME"
|
||||
|
||||
# 'librsvg' is needed to demonstrate SVG support.
|
||||
|
||||
# Check whether --with-librsvg was given.
|
||||
if test ${with_librsvg+y}
|
||||
then :
|
||||
withval=$with_librsvg;
|
||||
else $as_nop
|
||||
with_librsvg=auto
|
||||
fi
|
||||
|
||||
|
||||
have_librsvg=no
|
||||
if test x"$with_librsvg" = xyes -o x"$with_librsvg" = xauto; then
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBRSVG" >&5
|
||||
printf %s "checking for LIBRSVG... " >&6; }
|
||||
|
@ -14646,11 +14798,11 @@ fi
|
|||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$LIBRSVG_PKG_ERRORS" >&5
|
||||
|
||||
have_librsvg=no
|
||||
:
|
||||
elif test $pkg_failed = untried; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
have_librsvg=no
|
||||
:
|
||||
else
|
||||
LIBRSVG_CFLAGS=$pkg_cv_LIBRSVG_CFLAGS
|
||||
LIBRSVG_LIBS=$pkg_cv_LIBRSVG_LIBS
|
||||
|
@ -14659,12 +14811,14 @@ printf "%s\n" "yes" >&6; }
|
|||
have_librsvg="yes (pkg-config)"
|
||||
fi
|
||||
|
||||
FT_DEMO_CFLAGS=""
|
||||
FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME"
|
||||
if test "$have_librsvg" != no; then
|
||||
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG"
|
||||
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$have_librsvg" != no; then
|
||||
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG"
|
||||
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
|
||||
if test x"$with_librsvg" = xyes -a "$have_librsvg" = no; then
|
||||
as_fn_error $? "librsvg support requested but library not found" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
|
@ -16861,7 +17015,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by FreeType $as_me 2.12, which was
|
||||
This file was extended by FreeType $as_me 2.12.1, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
@ -16929,7 +17083,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
FreeType config.status 2.12
|
||||
FreeType config.status 2.12.1
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@ -17094,12 +17248,14 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q
|
|||
lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
|
||||
reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
|
||||
reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
|
||||
FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
|
||||
deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
|
||||
file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
|
||||
file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
|
||||
want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
|
||||
sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
|
||||
AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
|
||||
lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
|
||||
AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
|
||||
archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
|
||||
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
|
||||
|
@ -17265,13 +17421,13 @@ LN_S \
|
|||
lt_SP2NL \
|
||||
lt_NL2SP \
|
||||
reload_flag \
|
||||
FILECMD \
|
||||
deplibs_check_method \
|
||||
file_magic_cmd \
|
||||
file_magic_glob \
|
||||
want_nocaseglob \
|
||||
sharedlib_from_linklib_cmd \
|
||||
AR \
|
||||
AR_FLAGS \
|
||||
archiver_list_spec \
|
||||
STRIP \
|
||||
RANLIB \
|
||||
|
@ -17998,6 +18154,7 @@ printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
|
|||
cat <<_LT_EOF >> "$cfgfile"
|
||||
#! $SHELL
|
||||
# Generated automatically by $as_me ($PACKAGE) $VERSION
|
||||
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
|
||||
# Provide generalized library-building support services.
|
||||
|
@ -18126,6 +18283,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd
|
|||
# convert \$build files to toolchain format.
|
||||
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
|
||||
|
||||
# A file(cmd) program that detects file types.
|
||||
FILECMD=$lt_FILECMD
|
||||
|
||||
# Method to check whether dependent libraries are shared objects.
|
||||
deplibs_check_method=$lt_deplibs_check_method
|
||||
|
||||
|
@ -18144,8 +18304,11 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
|
|||
# The archiver.
|
||||
AR=$lt_AR
|
||||
|
||||
# Flags to create an archive (by configure).
|
||||
lt_ar_flags=$lt_ar_flags
|
||||
|
||||
# Flags to create an archive.
|
||||
AR_FLAGS=$lt_AR_FLAGS
|
||||
AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
|
||||
|
||||
# How to feed a file listing to the archiver.
|
||||
archiver_list_spec=$lt_archiver_list_spec
|
||||
|
@ -18521,7 +18684,7 @@ ltmain=$ac_aux_dir/ltmain.sh
|
|||
# if finds mixed CR/LF and LF-only lines. Since sed operates in
|
||||
# text mode, it properly converts lines to CR/LF. This bash problem
|
||||
# is reportedly fixed, but why not run on old versions too?
|
||||
sed '$q' "$ltmain" >> "$cfgfile" \
|
||||
$SED '$q' "$ltmain" >> "$cfgfile" \
|
||||
|| (rm -f "$cfgfile"; exit 1)
|
||||
|
||||
mv -f "$cfgfile" "$ofile" ||
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
AC_INIT([FreeType], [2.12], [freetype@nongnu.org], [freetype])
|
||||
AC_INIT([FreeType], [2.12.1], [freetype@nongnu.org], [freetype])
|
||||
AC_CONFIG_SRCDIR([ftconfig.h.in])
|
||||
|
||||
|
||||
# Don't forget to update `docs/VERSIONS.TXT'!
|
||||
|
||||
version_info='24:2:18'
|
||||
version_info='24:3:18'
|
||||
AC_SUBST([version_info])
|
||||
ft_version=`echo $version_info | tr : .`
|
||||
AC_SUBST([ft_version])
|
||||
|
@ -530,16 +530,28 @@ AC_SEARCH_LIBS([clock_gettime],
|
|||
[test "$ac_cv_search_clock_gettime" = "none required" \
|
||||
|| LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
|
||||
|
||||
# 'librsvg' is needed to demonstrate SVG support.
|
||||
PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0],
|
||||
[have_librsvg="yes (pkg-config)"], [have_librsvg=no])
|
||||
|
||||
FT_DEMO_CFLAGS=""
|
||||
FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME"
|
||||
|
||||
if test "$have_librsvg" != no; then
|
||||
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG"
|
||||
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
|
||||
# 'librsvg' is needed to demonstrate SVG support.
|
||||
AC_ARG_WITH([librsvg],
|
||||
[AS_HELP_STRING([--with-librsvg=@<:@yes|no|auto@:>@],
|
||||
[support OpenType SVG fonts in FreeType demo programs @<:@default=auto@:>@])],
|
||||
[], [with_librsvg=auto])
|
||||
|
||||
have_librsvg=no
|
||||
if test x"$with_librsvg" = xyes -o x"$with_librsvg" = xauto; then
|
||||
PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0],
|
||||
[have_librsvg="yes (pkg-config)"], [:])
|
||||
|
||||
if test "$have_librsvg" != no; then
|
||||
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG"
|
||||
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$with_librsvg" = xyes -a "$have_librsvg" = no; then
|
||||
AC_MSG_ERROR([librsvg support requested but library not found])
|
||||
fi
|
||||
|
||||
AC_SUBST([FT_DEMO_CFLAGS])
|
||||
|
|
|
@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.h.in])
|
|||
|
||||
# Don't forget to update `docs/VERSIONS.TXT'!
|
||||
|
||||
version_info='24:2:18'
|
||||
version_info='24:3:18'
|
||||
AC_SUBST([version_info])
|
||||
ft_version=`echo $version_info | tr : .`
|
||||
AC_SUBST([ft_version])
|
||||
|
@ -530,16 +530,28 @@ AC_SEARCH_LIBS([clock_gettime],
|
|||
[test "$ac_cv_search_clock_gettime" = "none required" \
|
||||
|| LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
|
||||
|
||||
# 'librsvg' is needed to demonstrate SVG support.
|
||||
PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0],
|
||||
[have_librsvg="yes (pkg-config)"], [have_librsvg=no])
|
||||
|
||||
FT_DEMO_CFLAGS=""
|
||||
FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME"
|
||||
|
||||
if test "$have_librsvg" != no; then
|
||||
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG"
|
||||
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
|
||||
# 'librsvg' is needed to demonstrate SVG support.
|
||||
AC_ARG_WITH([librsvg],
|
||||
[AS_HELP_STRING([--with-librsvg=@<:@yes|no|auto@:>@],
|
||||
[support OpenType SVG fonts in FreeType demo programs @<:@default=auto@:>@])],
|
||||
[], [with_librsvg=auto])
|
||||
|
||||
have_librsvg=no
|
||||
if test x"$with_librsvg" = xyes -o x"$with_librsvg" = xauto; then
|
||||
PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0],
|
||||
[have_librsvg="yes (pkg-config)"], [:])
|
||||
|
||||
if test "$have_librsvg" != no; then
|
||||
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG"
|
||||
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$with_librsvg" = xyes -a "$have_librsvg" = no; then
|
||||
AC_MSG_ERROR([librsvg support requested but library not found])
|
||||
fi
|
||||
|
||||
AC_SUBST([FT_DEMO_CFLAGS])
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
|
@ -69,6 +69,11 @@ posix_mkdir=
|
|||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
|
@ -99,18 +104,28 @@ Options:
|
|||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-C install only if different (preserve data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
|
@ -137,8 +152,13 @@ while test $# -ne 0; do
|
|||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
|
@ -255,6 +275,10 @@ do
|
|||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
|
@ -271,15 +295,18 @@ do
|
|||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
|
@ -288,27 +315,16 @@ do
|
|||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
|
@ -318,43 +334,49 @@ do
|
|||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
|
@ -365,7 +387,7 @@ do
|
|||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
|
@ -394,7 +416,7 @@ do
|
|||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
|
@ -427,14 +449,25 @@ do
|
|||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
|
@ -460,6 +493,13 @@ do
|
|||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
|
@ -474,9 +514,9 @@ do
|
|||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
|
@ -493,9 +533,9 @@ do
|
|||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,7 +21,7 @@ the following targets:
|
|||
<li>PPC/SP WM6 (Windows Mobile 6)</li>
|
||||
</ul>
|
||||
|
||||
It compiles the following libraries from the FreeType 2.12.0 sources:</p>
|
||||
It compiles the following libraries from the FreeType 2.12.1 sources:</p>
|
||||
|
||||
<ul>
|
||||
<pre>
|
||||
|
|
|
@ -21,7 +21,7 @@ the following targets:
|
|||
<li>PPC/SP WM6 (Windows Mobile 6)</li>
|
||||
</ul>
|
||||
|
||||
It compiles the following libraries from the FreeType 2.12.0 sources:</p>
|
||||
It compiles the following libraries from the FreeType 2.12.1 sources:</p>
|
||||
|
||||
<ul>
|
||||
<pre>
|
||||
|
|
|
@ -197,8 +197,7 @@
|
|||
|
||||
|
||||
/* non-desktop Universal Windows Platform */
|
||||
#if defined( WINAPI_FAMILY_PARTITION ) && \
|
||||
!WINAPI_FAMILY_PARTITION( WINAPI_PARTITION_DESKTOP )
|
||||
#if defined( WINAPI_FAMILY ) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP
|
||||
|
||||
#define PACK_DWORD64( hi, lo ) ( ( (DWORD64)(hi) << 32 ) | (DWORD)(lo) )
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<p>This directory contains solution and project files for
|
||||
Visual C++ 2010 or newer, named <tt>freetype.sln</tt>,
|
||||
and <tt>freetype.vcxproj</tt>. It compiles the following libraries
|
||||
from the FreeType 2.12.0 sources:</p>
|
||||
from the FreeType 2.12.1 sources:</p>
|
||||
|
||||
<ul>
|
||||
<li>freetype.dll using 'Release' or 'Debug' configurations</li>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<p>This directory contains project files <tt>freetype.dsp</tt> for
|
||||
Visual C++ 6.0, and <tt>freetype.vcproj</tt> for Visual C++ 2002
|
||||
through 2008, which you might need to upgrade automatically.
|
||||
It compiles the following libraries from the FreeType 2.12.0 sources:</p>
|
||||
It compiles the following libraries from the FreeType 2.12.1 sources:</p>
|
||||
|
||||
<ul>
|
||||
<li>freetype.dll using 'Release' or 'Debug' configurations</li>
|
||||
|
|
|
@ -21,7 +21,7 @@ the following targets:
|
|||
<li>PPC/SP WM6 (Windows Mobile 6)</li>
|
||||
</ul>
|
||||
|
||||
It compiles the following libraries from the FreeType 2.12.0 sources:</p>
|
||||
It compiles the following libraries from the FreeType 2.12.1 sources:</p>
|
||||
|
||||
<ul>
|
||||
<pre>
|
||||
|
|
|
@ -1,270 +0,0 @@
|
|||
// Copyright (c) 2019 nyorain
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef INC_DLG_DLG_H_
|
||||
#define INC_DLG_DLG_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// Hosted at https://github.com/nyorain/dlg.
|
||||
// There are examples and documentation.
|
||||
// Issue reports and contributions appreciated.
|
||||
|
||||
// - CONFIG -
|
||||
// Define this macro to make all dlg macros have no effect at all
|
||||
// #define DLG_DISABLE
|
||||
|
||||
// the log/assertion levels below which logs/assertions are ignored
|
||||
// defaulted depending on the NDEBUG macro
|
||||
#ifndef DLG_LOG_LEVEL
|
||||
#ifdef NDEBUG
|
||||
#define DLG_LOG_LEVEL dlg_level_warn
|
||||
#else
|
||||
#define DLG_LOG_LEVEL dlg_level_trace
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DLG_ASSERT_LEVEL
|
||||
#ifdef NDEBUG
|
||||
#define DLG_ASSERT_LEVEL dlg_level_warn
|
||||
#else
|
||||
#define DLG_ASSERT_LEVEL dlg_level_trace
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// the assert level of dlg_assert
|
||||
#ifndef DLG_DEFAULT_ASSERT
|
||||
#define DLG_DEFAULT_ASSERT dlg_level_error
|
||||
#endif
|
||||
|
||||
// evaluated to the 'file' member in dlg_origin
|
||||
#ifndef DLG_FILE
|
||||
#define DLG_FILE dlg__strip_root_path(__FILE__, DLG_BASE_PATH)
|
||||
|
||||
// the base path stripped from __FILE__. If you don't override DLG_FILE set this to
|
||||
// the project root to make 'main.c' from '/some/bullshit/main.c'
|
||||
#ifndef DLG_BASE_PATH
|
||||
#define DLG_BASE_PATH ""
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Default tags applied to all logs/assertions (in the defining file).
|
||||
// Must be in format ```#define DLG_DEFAULT_TAGS "tag1", "tag2"```
|
||||
// or just nothing (as defaulted here)
|
||||
#ifndef DLG_DEFAULT_TAGS
|
||||
#define DLG_DEFAULT_TAGS_TERM NULL
|
||||
#else
|
||||
#define DLG_DEFAULT_TAGS_TERM DLG_DEFAULT_TAGS, NULL
|
||||
#endif
|
||||
|
||||
// The function used for formatting. Can have any signature, but must be callable with
|
||||
// the arguments the log/assertions macros are called with. Must return a const char*
|
||||
// that will not be freed by dlg, the formatting function must keep track of it.
|
||||
// The formatting function might use dlg_thread_buffer or a custom owned buffer.
|
||||
// The returned const char* has to be valid until the dlg log/assertion ends.
|
||||
// Usually a c function with ... (i.e. using va_list) or a variadic c++ template do
|
||||
// allow formatting.
|
||||
#ifndef DLG_FMT_FUNC
|
||||
#define DLG_FMT_FUNC dlg__printf_format
|
||||
#endif
|
||||
|
||||
// Only overwrite (i.e. predefine) this if you know what you are doing.
|
||||
// On windows this is used to add the dllimport specified.
|
||||
// If you are using the static version of dlg (on windows) define
|
||||
// DLG_STATIC before including dlg.h
|
||||
#ifndef DLG_API
|
||||
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(DLG_STATIC)
|
||||
#define DLG_API __declspec(dllimport)
|
||||
#else
|
||||
#define DLG_API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// - utility -
|
||||
// two methods needed since cplusplus does not support compound literals
|
||||
// and c does not support uniform initialization/initializer lists
|
||||
#ifdef __cplusplus
|
||||
#include <initializer_list>
|
||||
#define DLG_CREATE_TAGS(...) std::initializer_list<const char*> \
|
||||
{DLG_DEFAULT_TAGS_TERM, __VA_ARGS__, NULL}.begin()
|
||||
#else
|
||||
#define DLG_CREATE_TAGS(...) (const char* const[]) {DLG_DEFAULT_TAGS_TERM, __VA_ARGS__, NULL}
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define DLG_PRINTF_ATTRIB(a, b) __attribute__ ((format (printf, a, b)))
|
||||
#else
|
||||
#define DLG_PRINTF_ATTRIB(a, b)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// Represents the importance of a log/assertion call.
|
||||
enum dlg_level {
|
||||
dlg_level_trace = 0, // temporary used debug, e.g. to check if control reaches function
|
||||
dlg_level_debug, // general debugging, prints e.g. all major events
|
||||
dlg_level_info, // general useful information
|
||||
dlg_level_warn, // warning, something went wrong but might have no (really bad) side effect
|
||||
dlg_level_error, // something really went wrong; expect serious issues
|
||||
dlg_level_fatal // critical error; application is likely to crash/exit
|
||||
};
|
||||
|
||||
// Holds various information associated with a log/assertion call.
|
||||
// Forwarded to the output handler.
|
||||
struct dlg_origin {
|
||||
const char* file;
|
||||
unsigned int line;
|
||||
const char* func;
|
||||
enum dlg_level level;
|
||||
const char** tags; // null-terminated
|
||||
const char* expr; // assertion expression, otherwise null
|
||||
};
|
||||
|
||||
// Type of the output handler, see dlg_set_handler.
|
||||
typedef void(*dlg_handler)(const struct dlg_origin* origin, const char* string, void* data);
|
||||
|
||||
#ifdef DLG_DISABLE
|
||||
// Tagged/Untagged logging with variable level
|
||||
// Tags must always be in the format `("tag1", "tag2")` (including brackets)
|
||||
#define dlg_log(level, ...)
|
||||
#define dlg_logt(level, tags, ...)
|
||||
|
||||
// Dynamic level assert macros in various versions for additional arguments
|
||||
#define dlg_assertl(level, expr) // assert without tags/message
|
||||
#define dlg_assertlt(level, tags, expr) // assert with tags
|
||||
#define dlg_assertlm(level, expr, ...) // assert with message
|
||||
#define dlg_assertltm(level, tags, expr, ...) // assert with tags & message
|
||||
|
||||
// Sets the handler that is responsible for formatting and outputting log calls.
|
||||
// This function is not thread safe and the handler is set globally.
|
||||
// The handler itself must not change dlg tags or call a dlg macro (if it
|
||||
// does so, the provided string or tags array in 'origin' might get invalid).
|
||||
// The handler can also be used for various other things such as dealing
|
||||
// with failed assertions or filtering calls based on the passed tags.
|
||||
// The default handler is dlg_default_output (see its doc for more info).
|
||||
// If using c++ make sure the registered handler cannot throw e.g. by
|
||||
// wrapping everything into a try-catch blog.
|
||||
inline void dlg_set_handler(dlg_handler handler, void* data) {
|
||||
(void) handler;
|
||||
(void) data;
|
||||
}
|
||||
|
||||
// Returns the currently active dlg handler and sets `data` to
|
||||
// its user data pointer. `data` must not be NULL.
|
||||
// Useful to create handler chains.
|
||||
// This function is not threadsafe, i.e. retrieving the handler while
|
||||
// changing it from another thread is unsafe.
|
||||
// See `dlg_set_handler`.
|
||||
inline dlg_handler dlg_get_handler(void** data) {
|
||||
*data = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// The default output handler.
|
||||
// Only use this to reset the output handler, prefer to use
|
||||
// dlg_generic_output (from output.h) which this function simply calls.
|
||||
// It also flushes the stream used and correctly outputs even from multiple threads.
|
||||
inline void dlg_default_output(const struct dlg_origin* o, const char* str, void* data) {
|
||||
(void) o;
|
||||
(void) str;
|
||||
(void) data;
|
||||
}
|
||||
|
||||
// Adds the given tag associated with the given function to the thread specific list.
|
||||
// If func is not NULL the tag will only applied to calls from the same function.
|
||||
// Remove the tag again calling dlg_remove_tag (with exactly the same pointers!).
|
||||
// Does not check if the tag is already present.
|
||||
inline void dlg_add_tag(const char* tag, const char* func) {
|
||||
(void) tag;
|
||||
(void) func;
|
||||
}
|
||||
|
||||
// Removes a tag added with dlg_add_tag (has no effect for tags no present).
|
||||
// The pointers must be exactly the same pointers that were supplied to dlg_add_tag,
|
||||
// this function will not check using strcmp. When the same tag/func combination
|
||||
// is added multiple times, this function remove exactly one candidate, it is
|
||||
// undefined which. Returns whether a tag was found (and removed).
|
||||
inline bool dlg_remove_tag(const char* tag, const char* func) {
|
||||
(void) tag;
|
||||
(void) func;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns the thread-specific buffer and its size for dlg.
|
||||
// The buffer should only be used by formatting functions.
|
||||
// The buffer can be reallocated and the size changed, just make sure
|
||||
// to update both values correctly.
|
||||
inline char** dlg_thread_buffer(size_t** size) {
|
||||
(void) size;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else // DLG_DISABLE
|
||||
#define dlg_log(level, ...) if(level >= DLG_LOG_LEVEL) \
|
||||
dlg__do_log(level, DLG_CREATE_TAGS(NULL), DLG_FILE, __LINE__, __func__, \
|
||||
DLG_FMT_FUNC(__VA_ARGS__), NULL)
|
||||
#define dlg_logt(level, tags, ...) if(level >= DLG_LOG_LEVEL) \
|
||||
dlg__do_log(level, DLG_CREATE_TAGS tags, DLG_FILE, __LINE__, __func__, \
|
||||
DLG_FMT_FUNC(__VA_ARGS__), NULL)
|
||||
|
||||
#define dlg_assertl(level, expr) if(level >= DLG_ASSERT_LEVEL && !(expr)) \
|
||||
dlg__do_log(level, DLG_CREATE_TAGS(NULL), DLG_FILE, __LINE__, __func__, NULL, #expr)
|
||||
#define dlg_assertlt(level, tags, expr) if(level >= DLG_ASSERT_LEVEL && !(expr)) \
|
||||
dlg__do_log(level, DLG_CREATE_TAGS tags, DLG_FILE, __LINE__, __func__, NULL, #expr)
|
||||
#define dlg_assertlm(level, expr, ...) if(level >= DLG_ASSERT_LEVEL && !(expr)) \
|
||||
dlg__do_log(level, DLG_CREATE_TAGS(NULL), DLG_FILE, __LINE__, __func__, \
|
||||
DLG_FMT_FUNC(__VA_ARGS__), #expr)
|
||||
#define dlg_assertltm(level, tags, expr, ...) if(level >= DLG_ASSERT_LEVEL && !(expr)) \
|
||||
dlg__do_log(level, DLG_CREATE_TAGS tags, DLG_FILE, __LINE__, \
|
||||
__func__, DLG_FMT_FUNC(__VA_ARGS__), #expr)
|
||||
|
||||
DLG_API void dlg_set_handler(dlg_handler handler, void* data);
|
||||
DLG_API dlg_handler dlg_get_handler(void** data);
|
||||
DLG_API void dlg_default_output(const struct dlg_origin*, const char* string, void*);
|
||||
DLG_API void dlg_add_tag(const char* tag, const char* func);
|
||||
DLG_API bool dlg_remove_tag(const char* tag, const char* func);
|
||||
DLG_API char** dlg_thread_buffer(size_t** size);
|
||||
|
||||
// - Private interface: not part of the abi/api but needed in macros -
|
||||
// Formats the given format string and arguments as printf would, uses the thread buffer.
|
||||
DLG_API const char* dlg__printf_format(const char* format, ...) DLG_PRINTF_ATTRIB(1, 2);
|
||||
DLG_API void dlg__do_log(enum dlg_level lvl, const char* const*, const char*, int,
|
||||
const char*, const char*, const char*);
|
||||
DLG_API const char* dlg__strip_root_path(const char* file, const char* base);
|
||||
#endif // DLG_DISABLE
|
||||
|
||||
// Untagged leveled logging
|
||||
#define dlg_trace(...) dlg_log(dlg_level_trace, __VA_ARGS__)
|
||||
#define dlg_debug(...) dlg_log(dlg_level_debug, __VA_ARGS__)
|
||||
#define dlg_info(...) dlg_log(dlg_level_info, __VA_ARGS__)
|
||||
#define dlg_warn(...) dlg_log(dlg_level_warn, __VA_ARGS__)
|
||||
#define dlg_error(...) dlg_log(dlg_level_error, __VA_ARGS__)
|
||||
#define dlg_fatal(...) dlg_log(dlg_level_fatal, __VA_ARGS__)
|
||||
|
||||
// Tagged leveled logging
|
||||
#define dlg_tracet(tags, ...) dlg_logt(dlg_level_trace, tags, __VA_ARGS__)
|
||||
#define dlg_debugt(tags, ...) dlg_logt(dlg_level_debug, tags, __VA_ARGS__)
|
||||
#define dlg_infot(tags, ...) dlg_logt(dlg_level_info, tags, __VA_ARGS__)
|
||||
#define dlg_warnt(tags, ...) dlg_logt(dlg_level_warn, tags, __VA_ARGS__)
|
||||
#define dlg_errort(tags, ...) dlg_logt(dlg_level_error, tags, __VA_ARGS__)
|
||||
#define dlg_fatalt(tags, ...) dlg_logt(dlg_level_fatal, tags, __VA_ARGS__)
|
||||
|
||||
// Assert macros useing DLG_DEFAULT_ASSERT as level
|
||||
#define dlg_assert(expr) dlg_assertl(DLG_DEFAULT_ASSERT, expr)
|
||||
#define dlg_assertt(tags, expr) dlg_assertlt(DLG_DEFAULT_ASSERT, tags, expr)
|
||||
#define dlg_assertm(expr, ...) dlg_assertlm(DLG_DEFAULT_ASSERT, expr, __VA_ARGS__)
|
||||
#define dlg_asserttm(tags, expr, ...) dlg_assertltm(DLG_DEFAULT_ASSERT, tags, expr, __VA_ARGS__)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // header guard
|
|
@ -1,172 +0,0 @@
|
|||
// Copyright (c) 2019 nyorain
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef INC_DLG_OUTPUT_H_
|
||||
#define INC_DLG_OUTPUT_H_
|
||||
|
||||
#include <dlg/dlg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Text style
|
||||
enum dlg_text_style {
|
||||
dlg_text_style_reset = 0,
|
||||
dlg_text_style_bold = 1,
|
||||
dlg_text_style_dim = 2,
|
||||
dlg_text_style_italic = 3,
|
||||
dlg_text_style_underline = 4,
|
||||
dlg_text_style_blink = 5,
|
||||
dlg_text_style_rblink = 6,
|
||||
dlg_text_style_reversed = 7,
|
||||
dlg_text_style_conceal = 8,
|
||||
dlg_text_style_crossed = 9,
|
||||
dlg_text_style_none,
|
||||
};
|
||||
|
||||
// Text color
|
||||
enum dlg_color {
|
||||
dlg_color_black = 0,
|
||||
dlg_color_red,
|
||||
dlg_color_green,
|
||||
dlg_color_yellow,
|
||||
dlg_color_blue,
|
||||
dlg_color_magenta,
|
||||
dlg_color_cyan,
|
||||
dlg_color_gray,
|
||||
dlg_color_reset = 9,
|
||||
|
||||
dlg_color_black2 = 60,
|
||||
dlg_color_red2,
|
||||
dlg_color_green2,
|
||||
dlg_color_yellow2,
|
||||
dlg_color_blue2,
|
||||
dlg_color_magenta2,
|
||||
dlg_color_cyan2,
|
||||
dlg_color_gray2,
|
||||
|
||||
dlg_color_none = 69,
|
||||
};
|
||||
|
||||
struct dlg_style {
|
||||
enum dlg_text_style style;
|
||||
enum dlg_color fg;
|
||||
enum dlg_color bg;
|
||||
};
|
||||
|
||||
// Like fprintf but fixes utf-8 output to console on windows.
|
||||
// On non-windows sytems just uses the corresponding standard library
|
||||
// functions. On windows, if dlg was compiled with the win_console option,
|
||||
// will first try to output it in a way that allows the default console
|
||||
// to display utf-8. If that fails, will fall back to the standard
|
||||
// library functions.
|
||||
DLG_API int dlg_fprintf(FILE* stream, const char* format, ...) DLG_PRINTF_ATTRIB(2, 3);
|
||||
DLG_API int dlg_vfprintf(FILE* stream, const char* format, va_list list);
|
||||
|
||||
// Like dlg_printf, but also applies the given style to this output.
|
||||
// The style will always be applied (using escape sequences), independent of the given stream.
|
||||
// On windows escape sequences don't work out of the box, see dlg_win_init_ansi().
|
||||
DLG_API int dlg_styled_fprintf(FILE* stream, struct dlg_style style,
|
||||
const char* format, ...) DLG_PRINTF_ATTRIB(3, 4);
|
||||
|
||||
// Features to output from the generic output handler.
|
||||
// Some features might have only an effect in the specializations.
|
||||
enum dlg_output_feature {
|
||||
dlg_output_tags = 1, // output tags list
|
||||
dlg_output_time = 2, // output time of log call (hour:minute:second)
|
||||
dlg_output_style = 4, // whether to use the supplied styles
|
||||
dlg_output_func = 8, // output function
|
||||
dlg_output_file_line = 16, // output file:line,
|
||||
dlg_output_newline = 32, // output a newline at the end
|
||||
dlg_output_threadsafe = 64, // locks stream before printing
|
||||
dlg_output_time_msecs = 128 // output micro seconds (ms on windows)
|
||||
};
|
||||
|
||||
// The default level-dependent output styles. The array values represent the styles
|
||||
// to be used for the associated level (i.e. [0] for trace level).
|
||||
DLG_API extern const struct dlg_style dlg_default_output_styles[6];
|
||||
|
||||
// Generic output function. Used by the default output handler and might be useful
|
||||
// for custom output handlers (that don't want to manually format the output).
|
||||
// Will call the given output func with the given data (and format + args to print)
|
||||
// for everything it has to print in printf format.
|
||||
// See also the *_stream and *_buf specializations for common usage.
|
||||
// The given output function must not be NULL.
|
||||
typedef void(*dlg_generic_output_handler)(void* data, const char* format, ...);
|
||||
DLG_API void dlg_generic_output(dlg_generic_output_handler output, void* data,
|
||||
unsigned int features, const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]);
|
||||
|
||||
// Generic output function, using a format string instead of feature flags.
|
||||
// Use following conversion characters:
|
||||
// %h - output the time in H:M:S format
|
||||
// %m - output the time in milliseconds
|
||||
// %t - output the full list of tags, comma separated
|
||||
// %f - output the function name noted in the origin
|
||||
// %o - output the file:line of the origin
|
||||
// %s - print the appropriate style escape sequence.
|
||||
// %r - print the escape sequence to reset the style.
|
||||
// %c - The content of the log/assert
|
||||
// %% - print the '%' character
|
||||
// Only the above specified conversion characters are valid, the rest are
|
||||
// written as it is.
|
||||
DLG_API void dlg_generic_outputf(dlg_generic_output_handler output, void* data,
|
||||
const char* format_string, const struct dlg_origin* origin,
|
||||
const char* string, const struct dlg_style styles[6]);
|
||||
|
||||
// Generic output function. Used by the default output handler and might be useful
|
||||
// for custom output handlers (that don't want to manually format the output).
|
||||
// If stream is NULL uses stdout.
|
||||
// Automatically uses dlg_fprintf to assure correct utf-8 even on windows consoles.
|
||||
// Locks the stream (i.e. assures threadsafe access) when the associated feature
|
||||
// is passed (note that stdout/stderr might still mix from multiple threads).
|
||||
DLG_API void dlg_generic_output_stream(FILE* stream, unsigned int features,
|
||||
const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]);
|
||||
DLG_API void dlg_generic_outputf_stream(FILE* stream, const char* format_string,
|
||||
const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6], bool lock_stream);
|
||||
|
||||
// Generic output function (see dlg_generic_output) that uses a buffer instead of
|
||||
// a stream. buf must at least point to *size bytes. Will set *size to the number
|
||||
// of bytes written (capped to the given size), if buf == NULL will set *size
|
||||
// to the needed size. The size parameter must not be NULL.
|
||||
DLG_API void dlg_generic_output_buf(char* buf, size_t* size, unsigned int features,
|
||||
const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]);
|
||||
DLG_API void dlg_generic_outputf_buf(char* buf, size_t* size, const char* format_string,
|
||||
const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]);
|
||||
|
||||
// Returns if the given stream is a tty. Useful for custom output handlers
|
||||
// e.g. to determine whether to use color.
|
||||
// NOTE: Due to windows limitations currently returns false for wsl ttys.
|
||||
DLG_API bool dlg_is_tty(FILE* stream);
|
||||
|
||||
// Returns the null-terminated escape sequence for the given style into buf.
|
||||
// Undefined behvaiour if any member of style has a value outside its enum range (will
|
||||
// probably result in a buffer overflow or garbage being printed).
|
||||
// If all member of style are 'none' will simply nullterminate the first buf char.
|
||||
DLG_API void dlg_escape_sequence(struct dlg_style style, char buf[12]);
|
||||
|
||||
// The reset style escape sequence.
|
||||
DLG_API extern const char* const dlg_reset_sequence;
|
||||
|
||||
// Just returns true without other effect on non-windows systems or if dlg
|
||||
// was compiled without the win_console option.
|
||||
// On windows tries to set the console mode to ansi to make escape sequences work.
|
||||
// This works only on newer windows 10 versions. Returns false on error.
|
||||
// Only the first call to it will have an effect, following calls just return the result.
|
||||
// The function is threadsafe. Automatically called by the default output handler.
|
||||
// This will only be able to set the mode for the stdout and stderr consoles, so
|
||||
// other streams to consoles will still not work.
|
||||
DLG_API bool dlg_win_init_ansi(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // header guard
|
|
@ -4942,7 +4942,7 @@ FT_BEGIN_HEADER
|
|||
*/
|
||||
#define FREETYPE_MAJOR 2
|
||||
#define FREETYPE_MINOR 12
|
||||
#define FREETYPE_PATCH 0
|
||||
#define FREETYPE_PATCH 1
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -528,14 +528,14 @@ FT_BEGIN_HEADER
|
|||
* @fields:
|
||||
* num_color_stops ::
|
||||
* The number of color stops for the requested glyph index. Set by
|
||||
* @FT_Get_Colorline_Stops.
|
||||
* @FT_Get_Paint.
|
||||
*
|
||||
* current_color_stop ::
|
||||
* The current color stop. Set by @FT_Get_Colorline_Stops.
|
||||
*
|
||||
* p ::
|
||||
* An opaque pointer into 'COLR' table data. The caller must set this
|
||||
* to `NULL` before the first call of @FT_Get_Colorline_Stops.
|
||||
* An opaque pointer into 'COLR' table data. Set by @FT_Get_Paint.
|
||||
* Updated by @FT_Get_Colorline_Stops.
|
||||
*
|
||||
* @since:
|
||||
* 2.11 -- **currently experimental only!** There might be changes
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
project('freetype2', 'c',
|
||||
meson_version: '>= 0.55.0',
|
||||
default_options: ['default_library=both'],
|
||||
version: run_command('builds/meson/extract_freetype_version.py',
|
||||
'include/freetype/freetype.h',
|
||||
check: true).stdout().strip(),
|
||||
|
|
|
@ -314,7 +314,7 @@
|
|||
NULL, NULL, NULL ) )
|
||||
return ( OSType ) 0;
|
||||
|
||||
return ((FInfo *)(info.finderInfo))->fdType;
|
||||
return ( (FInfo *)( info.finderInfo ) )->fdType;
|
||||
}
|
||||
|
||||
|
||||
|
@ -462,7 +462,7 @@
|
|||
|
||||
if ( ps_name_len != 0 )
|
||||
{
|
||||
ft_memcpy(ps_name, names[0] + 1, ps_name_len);
|
||||
ft_memcpy( ps_name, names[0] + 1, ps_name_len );
|
||||
ps_name[ps_name_len] = 0;
|
||||
}
|
||||
if ( style->indexes[face_index] > 1 &&
|
||||
|
|
|
@ -402,17 +402,17 @@
|
|||
FT_Long *result_offset );
|
||||
|
||||
|
||||
CONST_FT_RFORK_RULE_ARRAY_BEGIN(ft_raccess_guess_table,
|
||||
ft_raccess_guess_rec)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_double, apple_double)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_single, apple_single)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_ufs_export, darwin_ufs_export)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_newvfs, darwin_newvfs)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_hfsplus, darwin_hfsplus)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(vfat, vfat)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_cap, linux_cap)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_double, linux_double)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_netatalk, linux_netatalk)
|
||||
CONST_FT_RFORK_RULE_ARRAY_BEGIN( ft_raccess_guess_table,
|
||||
ft_raccess_guess_rec )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( apple_double, apple_double )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( apple_single, apple_single )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_ufs_export, darwin_ufs_export )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_newvfs, darwin_newvfs )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_hfsplus, darwin_hfsplus )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( vfat, vfat )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_cap, linux_cap )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_double, linux_double )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_netatalk, linux_netatalk )
|
||||
CONST_FT_RFORK_RULE_ARRAY_END
|
||||
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
#include<windows.h>
|
||||
|
||||
#define FT_VERSION 2,12,0,0
|
||||
#define FT_VERSION_STR "2.12.0"
|
||||
#define FT_VERSION 2,12,1,0
|
||||
#define FT_VERSION_STR "2.12.1"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION FT_VERSION
|
||||
|
|
|
@ -57,8 +57,9 @@
|
|||
/* it is better to use FreeType memory routines instead of raw
|
||||
'malloc/free' */
|
||||
|
||||
typedef void *(* alloc_func)(void*, int, int);
|
||||
typedef void (* free_func)(void*, void*);
|
||||
typedef void* (*alloc_func)( void*, int, int );
|
||||
typedef void (*free_func) ( void*, void* );
|
||||
|
||||
|
||||
static void*
|
||||
ft_bzip2_alloc( FT_Memory memory,
|
||||
|
|
|
@ -210,7 +210,7 @@ FT_BEGIN_HEADER
|
|||
#define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \
|
||||
FT_BEGIN_STMNT \
|
||||
FTC_Node *_bucket, *_pnode, _node; \
|
||||
FTC_Cache _cache = FTC_CACHE(cache); \
|
||||
FTC_Cache _cache = FTC_CACHE( cache ); \
|
||||
FT_Offset _hash = (FT_Offset)(hash); \
|
||||
FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \
|
||||
FT_Bool _list_changed = FALSE; \
|
||||
|
|
|
@ -140,8 +140,8 @@ FT_BEGIN_HEADER
|
|||
|
||||
} FTC_FamilyRec, *FTC_Family;
|
||||
|
||||
#define FTC_FAMILY(x) ( (FTC_Family)(x) )
|
||||
#define FTC_FAMILY_P(x) ( (FTC_Family*)(x) )
|
||||
#define FTC_FAMILY( x ) ( (FTC_Family)(x) )
|
||||
#define FTC_FAMILY_P( x ) ( (FTC_Family*)(x) )
|
||||
|
||||
|
||||
typedef struct FTC_GNodeRec_
|
||||
|
@ -245,7 +245,7 @@ FT_BEGIN_HEADER
|
|||
#define FTC_GCACHE_CLASS( x ) ((FTC_GCacheClass)(x))
|
||||
|
||||
#define FTC_CACHE_GCACHE_CLASS( x ) \
|
||||
FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class )
|
||||
FTC_GCACHE_CLASS( FTC_CACHE( x )->org_class )
|
||||
#define FTC_CACHE_FAMILY_CLASS( x ) \
|
||||
( (FTC_MruListClass)FTC_CACHE_GCACHE_CLASS( x )->family_class )
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ FT_BEGIN_HEADER
|
|||
} FTC_INodeRec, *FTC_INode;
|
||||
|
||||
#define FTC_INODE( x ) ( (FTC_INode)( x ) )
|
||||
#define FTC_INODE_GINDEX( x ) FTC_GNODE(x)->gindex
|
||||
#define FTC_INODE_FAMILY( x ) FTC_GNODE(x)->family
|
||||
#define FTC_INODE_GINDEX( x ) FTC_GNODE( x )->gindex
|
||||
#define FTC_INODE_FAMILY( x ) FTC_GNODE( x )->family
|
||||
|
||||
typedef FT_Error
|
||||
(*FTC_IFamily_LoadGlyphFunc)( FTC_Family family,
|
||||
|
@ -72,7 +72,7 @@ FT_BEGIN_HEADER
|
|||
#define FTC_IFAMILY_CLASS( x ) ((FTC_IFamilyClass)(x))
|
||||
|
||||
#define FTC_CACHE_IFAMILY_CLASS( x ) \
|
||||
FTC_IFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS(x)->family_class )
|
||||
FTC_IFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class )
|
||||
|
||||
|
||||
/* can be used as a @FTC_Node_FreeFunc */
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
sbit->xadvance = (FT_Char)xadvance;
|
||||
sbit->yadvance = (FT_Char)yadvance;
|
||||
sbit->format = (FT_Byte)bitmap->pixel_mode;
|
||||
sbit->max_grays = (FT_Byte)(bitmap->num_grays - 1);
|
||||
sbit->max_grays = (FT_Byte)( bitmap->num_grays - 1 );
|
||||
|
||||
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ FT_BEGIN_HEADER
|
|||
|
||||
typedef const FTC_SFamilyClassRec* FTC_SFamilyClass;
|
||||
|
||||
#define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x))
|
||||
#define FTC_SFAMILY_CLASS( x ) ( (FTC_SFamilyClass)(x) )
|
||||
|
||||
#define FTC_CACHE_SFAMILY_CLASS( x ) \
|
||||
FTC_SFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class )
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
|
||||
if ( char_code < 255 )
|
||||
{
|
||||
FT_UInt code = (FT_UInt)(char_code + 1);
|
||||
FT_UInt code = (FT_UInt)( char_code + 1 );
|
||||
|
||||
|
||||
for (;;)
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
{
|
||||
CFF_Font cff = (CFF_Font)(face->extra.data);
|
||||
CFF_Font cff = (CFF_Font)( face->extra.data );
|
||||
|
||||
|
||||
return cff_index_access_element( &cff->charstrings_index, glyph_index,
|
||||
|
@ -111,7 +111,7 @@
|
|||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
{
|
||||
CFF_Font cff = (CFF_Font)(face->extra.data);
|
||||
CFF_Font cff = (CFF_Font)( face->extra.data );
|
||||
|
||||
|
||||
cff_index_forget_element( &cff->charstrings_index, pointer );
|
||||
|
@ -370,8 +370,8 @@
|
|||
SFNT_Service sfnt;
|
||||
|
||||
|
||||
if ( size->root.metrics.x_ppem < 1 ||
|
||||
size->root.metrics.y_ppem < 1 )
|
||||
if ( size && (size->root.metrics.x_ppem < 1 ||
|
||||
size->root.metrics.y_ppem < 1 ) )
|
||||
{
|
||||
error = FT_THROW( Invalid_Size_Handle );
|
||||
return error;
|
||||
|
|
|
@ -1,803 +0,0 @@
|
|||
// Copyright (c) 2019 nyorain
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#define _XOPEN_SOURCE 600
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#define _WIN32_WINNT 0x0600
|
||||
|
||||
// Needed on windows so that we can use sprintf without warning.
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include <dlg/output.h>
|
||||
#include <dlg/dlg.h>
|
||||
#include <wchar.h>
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
const char* const dlg_reset_sequence = "\033[0m";
|
||||
const struct dlg_style dlg_default_output_styles[] = {
|
||||
{dlg_text_style_italic, dlg_color_green, dlg_color_none},
|
||||
{dlg_text_style_dim, dlg_color_gray, dlg_color_none},
|
||||
{dlg_text_style_none, dlg_color_cyan, dlg_color_none},
|
||||
{dlg_text_style_none, dlg_color_yellow, dlg_color_none},
|
||||
{dlg_text_style_none, dlg_color_red, dlg_color_none},
|
||||
{dlg_text_style_bold, dlg_color_red, dlg_color_none}
|
||||
};
|
||||
|
||||
static void* xalloc(size_t size) {
|
||||
void* ret = calloc(size, 1);
|
||||
if(!ret) fprintf(stderr, "dlg: calloc returned NULL, probably crashing (size: %zu)\n", size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void* xrealloc(void* ptr, size_t size) {
|
||||
void* ret = realloc(ptr, size);
|
||||
if(!ret) fprintf(stderr, "dlg: realloc returned NULL, probably crashing (size: %zu)\n", size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct dlg_tag_func_pair {
|
||||
const char* tag;
|
||||
const char* func;
|
||||
};
|
||||
|
||||
struct dlg_data {
|
||||
const char** tags; // vec
|
||||
struct dlg_tag_func_pair* pairs; // vec
|
||||
char* buffer;
|
||||
size_t buffer_size;
|
||||
};
|
||||
|
||||
static dlg_handler g_handler = dlg_default_output;
|
||||
static void* g_data = NULL;
|
||||
|
||||
static void dlg_free_data(void* data);
|
||||
static struct dlg_data* dlg_create_data(void);
|
||||
|
||||
// platform-specific
|
||||
#if defined(__unix__) || defined(__unix) || defined(__linux__) || defined(__APPLE__) || defined(__MACH__)
|
||||
#define DLG_OS_UNIX
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
static pthread_key_t dlg_data_key;
|
||||
|
||||
static void dlg_main_cleanup(void) {
|
||||
void* data = pthread_getspecific(dlg_data_key);
|
||||
if(data) {
|
||||
dlg_free_data(data);
|
||||
pthread_setspecific(dlg_data_key, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void init_data_key(void) {
|
||||
pthread_key_create(&dlg_data_key, dlg_free_data);
|
||||
atexit(dlg_main_cleanup);
|
||||
}
|
||||
|
||||
static struct dlg_data* dlg_data(void) {
|
||||
static pthread_once_t key_once = PTHREAD_ONCE_INIT;
|
||||
pthread_once(&key_once, init_data_key);
|
||||
|
||||
void* data = pthread_getspecific(dlg_data_key);
|
||||
if(!data) {
|
||||
data = dlg_create_data();
|
||||
pthread_setspecific(dlg_data_key, data);
|
||||
}
|
||||
|
||||
return (struct dlg_data*) data;
|
||||
}
|
||||
|
||||
static void lock_file(FILE* file) {
|
||||
flockfile(file);
|
||||
}
|
||||
|
||||
static void unlock_file(FILE* file) {
|
||||
funlockfile(file);
|
||||
}
|
||||
|
||||
bool dlg_is_tty(FILE* stream) {
|
||||
return isatty(fileno(stream));
|
||||
}
|
||||
|
||||
static unsigned get_msecs(void) {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
return tv.tv_usec;
|
||||
}
|
||||
|
||||
// platform switch -- end unix
|
||||
#elif defined(WIN32) || defined(_WIN32) || defined(_WIN64)
|
||||
#define DLG_OS_WIN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define DEFINE_CONSOLEV2_PROPERTIES
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
|
||||
// thanks for nothing, microsoft
|
||||
#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||||
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
|
||||
#endif
|
||||
|
||||
// the max buffer size we will convert on the stack
|
||||
#define DLG_MAX_STACK_BUF_SIZE 1024
|
||||
|
||||
static void WINAPI dlg_fls_destructor(void* data) {
|
||||
dlg_free_data(data);
|
||||
}
|
||||
|
||||
// TODO: error handling
|
||||
static BOOL CALLBACK dlg_init_fls(PINIT_ONCE io, void* param, void** lpContext) {
|
||||
(void) io;
|
||||
(void) param;
|
||||
**((DWORD**) lpContext) = FlsAlloc(dlg_fls_destructor);
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct dlg_data* dlg_data(void) {
|
||||
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
|
||||
static DWORD fls = 0;
|
||||
void* flsp = (void*) &fls;
|
||||
InitOnceExecuteOnce(&init_once, dlg_init_fls, NULL, &flsp);
|
||||
void* data = FlsGetValue(fls);
|
||||
if(!data) {
|
||||
data = dlg_create_data();
|
||||
FlsSetValue(fls, data);
|
||||
}
|
||||
|
||||
return (struct dlg_data*) data;
|
||||
}
|
||||
|
||||
static void lock_file(FILE* file) {
|
||||
_lock_file(file);
|
||||
}
|
||||
|
||||
static void unlock_file(FILE* file) {
|
||||
_unlock_file(file);
|
||||
}
|
||||
|
||||
bool dlg_is_tty(FILE* stream) {
|
||||
return _isatty(_fileno(stream));
|
||||
}
|
||||
|
||||
#ifdef DLG_WIN_CONSOLE
|
||||
static bool init_ansi_console(void) {
|
||||
HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
HANDLE err = GetStdHandle(STD_ERROR_HANDLE);
|
||||
if(out == INVALID_HANDLE_VALUE || err == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
|
||||
DWORD outMode, errMode;
|
||||
if(!GetConsoleMode(out, &outMode) || !GetConsoleMode(err, &errMode))
|
||||
return false;
|
||||
|
||||
outMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
errMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
if(!SetConsoleMode(out, outMode) || !SetConsoleMode(out, errMode))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool win_write_heap(void* handle, int needed, const char* format, va_list args) {
|
||||
char* buf1 = xalloc(3 * needed + 3 + (needed % 2));
|
||||
wchar_t* buf2 = (wchar_t*) (buf1 + needed + 1 + (needed % 2));
|
||||
vsnprintf(buf1, needed + 1, format, args);
|
||||
needed = MultiByteToWideChar(CP_UTF8, 0, buf1, needed, buf2, needed + 1);
|
||||
bool ret = (needed != 0 && WriteConsoleW(handle, buf2, needed, NULL, NULL) != 0);
|
||||
free(buf1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool win_write_stack(void* handle, int needed, const char* format, va_list args) {
|
||||
char buf1[DLG_MAX_STACK_BUF_SIZE];
|
||||
wchar_t buf2[DLG_MAX_STACK_BUF_SIZE];
|
||||
vsnprintf(buf1, needed + 1, format, args);
|
||||
needed = MultiByteToWideChar(CP_UTF8, 0, buf1, needed, buf2, needed + 1);
|
||||
return (needed != 0 && WriteConsoleW(handle, buf2, needed, NULL, NULL) != 0);
|
||||
}
|
||||
#endif // DLG_WIN_CONSOLE
|
||||
|
||||
static unsigned get_msecs() {
|
||||
SYSTEMTIME st;
|
||||
GetSystemTime(&st);
|
||||
return st.wMilliseconds;
|
||||
}
|
||||
|
||||
#else // platform switch -- end windows
|
||||
#error Cannot determine platform (needed for color and utf-8 and stuff)
|
||||
#endif
|
||||
|
||||
// general
|
||||
void dlg_escape_sequence(struct dlg_style style, char buf[12]) {
|
||||
int nums[3];
|
||||
unsigned int count = 0;
|
||||
|
||||
if(style.fg != dlg_color_none) {
|
||||
nums[count++] = style.fg + 30;
|
||||
}
|
||||
|
||||
if(style.bg != dlg_color_none) {
|
||||
nums[count++] = style.fg + 40;
|
||||
}
|
||||
|
||||
if(style.style != dlg_text_style_none) {
|
||||
nums[count++] = style.style;
|
||||
}
|
||||
|
||||
switch(count) {
|
||||
case 1: snprintf(buf, 12, "\033[%dm", nums[0]); break;
|
||||
case 2: snprintf(buf, 12, "\033[%d;%dm", nums[0], nums[1]); break;
|
||||
case 3: snprintf(buf, 12, "\033[%d;%d;%dm", nums[0], nums[1], nums[2]); break;
|
||||
default: buf[0] = '\0'; break;
|
||||
}
|
||||
}
|
||||
|
||||
int dlg_vfprintf(FILE* stream, const char* format, va_list args) {
|
||||
#if defined(DLG_OS_WIN) && defined(DLG_WIN_CONSOLE)
|
||||
void* handle = NULL;
|
||||
if(stream == stdout) {
|
||||
handle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
} else if(stream == stderr) {
|
||||
handle = GetStdHandle(STD_ERROR_HANDLE);
|
||||
}
|
||||
|
||||
if(handle) {
|
||||
va_list args_copy;
|
||||
va_copy(args_copy, args);
|
||||
int needed = vsnprintf(NULL, 0, format, args_copy);
|
||||
va_end(args_copy);
|
||||
|
||||
if(needed < 0) {
|
||||
return needed;
|
||||
}
|
||||
|
||||
// We don't allocate too much on the stack
|
||||
// but we also don't want to call alloc every logging call
|
||||
// or use another cached buffer
|
||||
if(needed >= DLG_MAX_STACK_BUF_SIZE) {
|
||||
if(win_write_heap(handle, needed, format, args)) {
|
||||
return needed;
|
||||
}
|
||||
} else {
|
||||
if(win_write_stack(handle, needed, format, args)) {
|
||||
return needed;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return vfprintf(stream, format, args);
|
||||
}
|
||||
|
||||
int dlg_fprintf(FILE* stream, const char* format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
int ret = dlg_vfprintf(stream, format, args);
|
||||
va_end(args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int dlg_styled_fprintf(FILE* stream, struct dlg_style style, const char* format, ...) {
|
||||
char buf[12];
|
||||
dlg_escape_sequence(style, buf);
|
||||
|
||||
fprintf(stream, "%s", buf);
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
int ret = dlg_vfprintf(stream, format, args);
|
||||
va_end(args);
|
||||
fprintf(stream, "%s", dlg_reset_sequence);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void dlg_generic_output(dlg_generic_output_handler output, void* data,
|
||||
unsigned int features, const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]) {
|
||||
// We never print any dynamic content below so we can be sure at compile
|
||||
// time that a buffer of size 64 is large enough.
|
||||
char format_buf[64];
|
||||
char* format = format_buf;
|
||||
|
||||
if(features & dlg_output_style) {
|
||||
format += sprintf(format, "%%s");
|
||||
}
|
||||
|
||||
if(features & (dlg_output_time | dlg_output_file_line | dlg_output_tags | dlg_output_func)) {
|
||||
format += sprintf(format, "[");
|
||||
}
|
||||
|
||||
bool first_meta = true;
|
||||
if(features & dlg_output_time) {
|
||||
format += sprintf(format, "%%h");
|
||||
first_meta = false;
|
||||
}
|
||||
|
||||
if(features & dlg_output_time_msecs) {
|
||||
if(!first_meta) {
|
||||
format += sprintf(format, ":");
|
||||
}
|
||||
|
||||
format += sprintf(format, "%%m");
|
||||
first_meta = false;
|
||||
}
|
||||
|
||||
if(features & dlg_output_file_line) {
|
||||
if(!first_meta) {
|
||||
format += sprintf(format, " ");
|
||||
}
|
||||
|
||||
format += sprintf(format, "%%o");
|
||||
first_meta = false;
|
||||
}
|
||||
|
||||
if(features & dlg_output_func) {
|
||||
if(!first_meta) {
|
||||
format += sprintf(format, " ");
|
||||
}
|
||||
|
||||
format += sprintf(format, "%%f");
|
||||
first_meta = false;
|
||||
}
|
||||
|
||||
if(features & dlg_output_tags) {
|
||||
if(!first_meta) {
|
||||
format += sprintf(format, " ");
|
||||
}
|
||||
|
||||
format += sprintf(format, "{%%t}");
|
||||
first_meta = false;
|
||||
}
|
||||
|
||||
if(features & (dlg_output_time | dlg_output_file_line | dlg_output_tags | dlg_output_func)) {
|
||||
format += sprintf(format, "] ");
|
||||
}
|
||||
|
||||
format += sprintf(format, "%%c");
|
||||
|
||||
if(features & dlg_output_newline) {
|
||||
format += sprintf(format, "\n");
|
||||
}
|
||||
|
||||
*format = '\0';
|
||||
dlg_generic_outputf(output, data, format_buf, origin, string, styles);
|
||||
}
|
||||
|
||||
void dlg_generic_outputf(dlg_generic_output_handler output, void* data,
|
||||
const char* format_string, const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]) {
|
||||
bool reset_style = false;
|
||||
for(const char* it = format_string; *it; it++) {
|
||||
if(*it != '%') {
|
||||
output(data, "%c", *it);
|
||||
continue;
|
||||
}
|
||||
|
||||
char next = *(it + 1); // must be valid since *it is not '\0'
|
||||
if(next == 'h') {
|
||||
time_t t = time(NULL);
|
||||
struct tm tm_info;
|
||||
|
||||
#ifdef DLG_OS_WIN
|
||||
if(localtime_s(&tm_info, &t)) {
|
||||
#else
|
||||
if(!localtime_r(&t, &tm_info)) {
|
||||
#endif
|
||||
output(data, "<DATE ERROR>");
|
||||
} else {
|
||||
char timebuf[32];
|
||||
strftime(timebuf, sizeof(timebuf), "%H:%M:%S", &tm_info);
|
||||
output(data, "%s", timebuf);
|
||||
}
|
||||
it++;
|
||||
} else if(next == 'm') {
|
||||
output(data, "%06d", get_msecs());
|
||||
it++;
|
||||
} else if(next == 't') {
|
||||
bool first_tag = true;
|
||||
for(const char** tags = origin->tags; *tags; ++tags) {
|
||||
if(!first_tag) {
|
||||
output(data, ", ");
|
||||
}
|
||||
|
||||
output(data, "%s", *tags);
|
||||
first_tag = false;
|
||||
}
|
||||
++it;
|
||||
} else if(next == 'f') {
|
||||
output(data, "%s", origin->func);
|
||||
++it;
|
||||
} else if(next == 'o') {
|
||||
output(data, "%s:%u", origin->file, origin->line);
|
||||
++it;
|
||||
} else if(next == 's') {
|
||||
char buf[12];
|
||||
dlg_escape_sequence(styles[origin->level], buf);
|
||||
output(data, "%s", buf);
|
||||
reset_style = true;
|
||||
++it;
|
||||
} else if(next == 'r') {
|
||||
output(data, "%s", dlg_reset_sequence);
|
||||
reset_style = false;
|
||||
++it;
|
||||
} else if(next == 'c') {
|
||||
if(origin->expr && string) {
|
||||
output(data, "assertion '%s' failed: '%s'", origin->expr, string);
|
||||
} else if(origin->expr) {
|
||||
output(data, "assertion '%s' failed", origin->expr);
|
||||
} else if(string) {
|
||||
output(data, "%s", string);
|
||||
}
|
||||
++it;
|
||||
} else if(next == '%') {
|
||||
output(data, "%s", "%");
|
||||
++it;
|
||||
} else {
|
||||
// in this case it's a '%' without known format specifier following
|
||||
output(data, "%s", "%");
|
||||
}
|
||||
}
|
||||
|
||||
if(reset_style) {
|
||||
output(data, "%s", dlg_reset_sequence);
|
||||
}
|
||||
}
|
||||
|
||||
struct buf {
|
||||
char* buf;
|
||||
size_t* size;
|
||||
};
|
||||
|
||||
static void print_size(void* size, const char* format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
|
||||
int ret = vsnprintf(NULL, 0, format, args);
|
||||
va_end(args);
|
||||
|
||||
if(ret > 0) {
|
||||
*((size_t*) size) += ret;
|
||||
}
|
||||
}
|
||||
|
||||
static void print_buf(void* dbuf, const char* format, ...) {
|
||||
struct buf* buf = (struct buf*) dbuf;
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
|
||||
int printed = vsnprintf(buf->buf, *buf->size, format, args);
|
||||
va_end(args);
|
||||
|
||||
if(printed > 0) {
|
||||
*buf->size -= printed;
|
||||
buf->buf += printed;
|
||||
}
|
||||
}
|
||||
|
||||
void dlg_generic_output_buf(char* buf, size_t* size, unsigned int features,
|
||||
const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]) {
|
||||
if(buf) {
|
||||
struct buf mbuf;
|
||||
mbuf.buf = buf;
|
||||
mbuf.size = size;
|
||||
dlg_generic_output(print_buf, &mbuf, features, origin, string, styles);
|
||||
} else {
|
||||
*size = 0;
|
||||
dlg_generic_output(print_size, size, features, origin, string, styles);
|
||||
}
|
||||
}
|
||||
|
||||
void dlg_generic_outputf_buf(char* buf, size_t* size, const char* format_string,
|
||||
const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]) {
|
||||
if(buf) {
|
||||
struct buf mbuf;
|
||||
mbuf.buf = buf;
|
||||
mbuf.size = size;
|
||||
dlg_generic_outputf(print_buf, &mbuf, format_string, origin, string, styles);
|
||||
} else {
|
||||
*size = 0;
|
||||
dlg_generic_outputf(print_size, size, format_string, origin, string, styles);
|
||||
}
|
||||
}
|
||||
|
||||
static void print_stream(void* stream, const char* format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
dlg_vfprintf((FILE*) stream, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void dlg_generic_output_stream(FILE* stream, unsigned int features,
|
||||
const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6]) {
|
||||
stream = stream ? stream : stdout;
|
||||
if(features & dlg_output_threadsafe) {
|
||||
lock_file(stream);
|
||||
}
|
||||
|
||||
dlg_generic_output(print_stream, stream, features, origin, string, styles);
|
||||
if(features & dlg_output_threadsafe) {
|
||||
unlock_file(stream);
|
||||
}
|
||||
}
|
||||
|
||||
void dlg_generic_outputf_stream(FILE* stream, const char* format_string,
|
||||
const struct dlg_origin* origin, const char* string,
|
||||
const struct dlg_style styles[6], bool lock_stream) {
|
||||
stream = stream ? stream : stdout;
|
||||
if(lock_stream) {
|
||||
lock_file(stream);
|
||||
}
|
||||
|
||||
dlg_generic_outputf(print_stream, stream, format_string, origin, string, styles);
|
||||
if(lock_stream) {
|
||||
unlock_file(stream);
|
||||
}
|
||||
}
|
||||
|
||||
void dlg_default_output(const struct dlg_origin* origin, const char* string, void* data) {
|
||||
FILE* stream = data ? (FILE*) data : stdout;
|
||||
unsigned int features = dlg_output_file_line |
|
||||
dlg_output_newline |
|
||||
dlg_output_threadsafe;
|
||||
|
||||
#ifdef DLG_DEFAULT_OUTPUT_ALWAYS_COLOR
|
||||
dlg_win_init_ansi();
|
||||
features |= dlg_output_style;
|
||||
#else
|
||||
if(dlg_is_tty(stream) && dlg_win_init_ansi()) {
|
||||
features |= dlg_output_style;
|
||||
}
|
||||
#endif
|
||||
|
||||
dlg_generic_output_stream(stream, features, origin, string, dlg_default_output_styles);
|
||||
fflush(stream);
|
||||
}
|
||||
|
||||
bool dlg_win_init_ansi(void) {
|
||||
#if defined(DLG_OS_WIN) && defined(DLG_WIN_CONSOLE)
|
||||
// TODO: use init once
|
||||
static volatile LONG status = 0;
|
||||
LONG res = InterlockedCompareExchange(&status, 1, 0);
|
||||
if(res == 0) { // not initialized
|
||||
InterlockedExchange(&status, 3 + init_ansi_console());
|
||||
}
|
||||
|
||||
while(status == 1); // currently initialized in another thread, spinlock
|
||||
return (status == 4);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
// small dynamic vec/array implementation
|
||||
// Since the macros vec_init and vec_add[c]/vec_push might
|
||||
// change the pointers value it must not be referenced somewhere else.
|
||||
#define vec__raw(vec) (((unsigned int*) vec) - 2)
|
||||
|
||||
static void* vec_do_create(unsigned int typesize, unsigned int cap, unsigned int size) {
|
||||
unsigned long a = (size > cap) ? size : cap;
|
||||
void* ptr = xalloc(2 * sizeof(unsigned int) + a * typesize);
|
||||
unsigned int* begin = (unsigned int*) ptr;
|
||||
begin[0] = size * typesize;
|
||||
begin[1] = a * typesize;
|
||||
return begin + 2;
|
||||
}
|
||||
|
||||
// NOTE: can be more efficient if we are allowed to reorder vector
|
||||
static void vec_do_erase(void* vec, unsigned int pos, unsigned int size) {
|
||||
unsigned int* begin = vec__raw(vec);
|
||||
begin[0] -= size;
|
||||
char* buf = (char*) vec;
|
||||
memcpy(buf + pos, buf + pos + size, size);
|
||||
}
|
||||
|
||||
static void* vec_do_add(void** vec, unsigned int size) {
|
||||
unsigned int* begin = vec__raw(*vec);
|
||||
unsigned int needed = begin[0] + size;
|
||||
if(needed >= begin[1]) {
|
||||
void* ptr = xrealloc(begin, sizeof(unsigned int) * 2 + needed * 2);
|
||||
begin = (unsigned int*) ptr;
|
||||
begin[1] = needed * 2;
|
||||
(*vec) = begin + 2;
|
||||
}
|
||||
|
||||
void* ptr = ((char*) (*vec)) + begin[0];
|
||||
begin[0] += size;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
#define vec_create(type, size) (type*) vec_do_create(sizeof(type), size * 2, size)
|
||||
#define vec_create_reserve(type, size, capacity) (type*) vec_do_create(sizeof(type), capcity, size)
|
||||
#define vec_init(array, size) array = vec_do_create(sizeof(*array), size * 2, size)
|
||||
#define vec_init_reserve(array, size, capacity) *((void**) &array) = vec_do_create(sizeof(*array), capacity, size)
|
||||
#define vec_free(vec) (free((vec) ? vec__raw(vec) : NULL), vec = NULL)
|
||||
#define vec_erase_range(vec, pos, count) vec_do_erase(vec, pos * sizeof(*vec), count * sizeof(*vec))
|
||||
#define vec_erase(vec, pos) vec_do_erase(vec, pos * sizeof(*vec), sizeof(*vec))
|
||||
#define vec_size(vec) (vec__raw(vec)[0] / sizeof(*vec))
|
||||
#define vec_capacity(vec) (vec_raw(vec)[1] / sizeof(*vec))
|
||||
#define vec_add(vec) vec_do_add((void**) &vec, sizeof(*vec))
|
||||
#define vec_addc(vec, count) (vec_do_add((void**) &vec, sizeof(*vec) * count))
|
||||
#define vec_push(vec, value) (vec_do_add((void**) &vec, sizeof(*vec)), vec_last(vec) = (value))
|
||||
#define vec_pop(vec) (vec__raw(vec)[0] -= sizeof(*vec))
|
||||
#define vec_popc(vec, count) (vec__raw(vec)[0] -= sizeof(*vec) * count)
|
||||
#define vec_clear(vec) (vec__raw(vec)[0] = 0)
|
||||
#define vec_last(vec) (vec[vec_size(vec) - 1])
|
||||
|
||||
static struct dlg_data* dlg_create_data(void) {
|
||||
struct dlg_data* data = (struct dlg_data*) xalloc(sizeof(struct dlg_data));
|
||||
vec_init_reserve(data->tags, 0, 20);
|
||||
vec_init_reserve(data->pairs, 0, 20);
|
||||
data->buffer_size = 100;
|
||||
data->buffer = (char*) xalloc(data->buffer_size);
|
||||
return data;
|
||||
}
|
||||
|
||||
static void dlg_free_data(void* ddata) {
|
||||
struct dlg_data* data = (struct dlg_data*) ddata;
|
||||
if(data) {
|
||||
vec_free(data->pairs);
|
||||
vec_free(data->tags);
|
||||
free(data->buffer);
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
|
||||
void dlg_add_tag(const char* tag, const char* func) {
|
||||
struct dlg_data* data = dlg_data();
|
||||
struct dlg_tag_func_pair* pair =
|
||||
(struct dlg_tag_func_pair*) vec_add(data->pairs);
|
||||
pair->tag = tag;
|
||||
pair->func = func;
|
||||
}
|
||||
|
||||
bool dlg_remove_tag(const char* tag, const char* func) {
|
||||
struct dlg_data* data = dlg_data();
|
||||
for(unsigned int i = 0; i < vec_size(data->pairs); ++i) {
|
||||
if(data->pairs[i].func == func && data->pairs[i].tag == tag) {
|
||||
vec_erase(data->pairs, i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
char** dlg_thread_buffer(size_t** size) {
|
||||
struct dlg_data* data = dlg_data();
|
||||
if(size) {
|
||||
*size = &data->buffer_size;
|
||||
}
|
||||
return &data->buffer;
|
||||
}
|
||||
|
||||
void dlg_set_handler(dlg_handler handler, void* data) {
|
||||
g_handler = handler;
|
||||
g_data = data;
|
||||
}
|
||||
|
||||
dlg_handler dlg_get_handler(void** data) {
|
||||
*data = g_data;
|
||||
return g_handler;
|
||||
}
|
||||
|
||||
const char* dlg__printf_format(const char* str, ...) {
|
||||
va_list vlist;
|
||||
va_start(vlist, str);
|
||||
|
||||
va_list vlistcopy;
|
||||
va_copy(vlistcopy, vlist);
|
||||
int needed = vsnprintf(NULL, 0, str, vlist);
|
||||
if(needed < 0) {
|
||||
printf("dlg__printf_format: invalid format given\n");
|
||||
va_end(vlist);
|
||||
va_end(vlistcopy);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
va_end(vlist);
|
||||
|
||||
size_t* buf_size;
|
||||
char** buf = dlg_thread_buffer(&buf_size);
|
||||
if(*buf_size <= (unsigned int) needed) {
|
||||
*buf_size = (needed + 1) * 2;
|
||||
*buf = (char*) xrealloc(*buf, *buf_size);
|
||||
}
|
||||
|
||||
vsnprintf(*buf, *buf_size, str, vlistcopy);
|
||||
va_end(vlistcopy);
|
||||
|
||||
return *buf;
|
||||
}
|
||||
|
||||
void dlg__do_log(enum dlg_level lvl, const char* const* tags, const char* file, int line,
|
||||
const char* func, const char* string, const char* expr) {
|
||||
struct dlg_data* data = dlg_data();
|
||||
unsigned int tag_count = 0;
|
||||
|
||||
// push default tags
|
||||
while(tags[tag_count]) {
|
||||
vec_push(data->tags, tags[tag_count++]);
|
||||
}
|
||||
|
||||
// push current global tags
|
||||
for(size_t i = 0; i < vec_size(data->pairs); ++i) {
|
||||
const struct dlg_tag_func_pair pair = data->pairs[i];
|
||||
if(pair.func == NULL || !strcmp(pair.func, func)) {
|
||||
vec_push(data->tags, pair.tag);
|
||||
}
|
||||
}
|
||||
|
||||
// push call-specific tags, skip first terminating NULL
|
||||
++tag_count;
|
||||
while(tags[tag_count]) {
|
||||
vec_push(data->tags, tags[tag_count++]);
|
||||
}
|
||||
|
||||
vec_push(data->tags, NULL); // terminating NULL
|
||||
struct dlg_origin origin;
|
||||
origin.level = lvl;
|
||||
origin.file = file;
|
||||
origin.line = line;
|
||||
origin.func = func;
|
||||
origin.expr = expr;
|
||||
origin.tags = data->tags;
|
||||
|
||||
g_handler(&origin, string, g_data);
|
||||
vec_clear(data->tags);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// shitty msvc compatbility
|
||||
// meson gives us sane paths (separated by '/') while on MSVC,
|
||||
// __FILE__ contains a '\\' separator.
|
||||
static bool path_same(char a, char b) {
|
||||
return (a == b) ||
|
||||
(a == '/' && b == '\\') ||
|
||||
(a == '\\' && b == '/');
|
||||
}
|
||||
#else
|
||||
|
||||
static inline bool path_same(char a, char b) {
|
||||
return a == b;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
const char* dlg__strip_root_path(const char* file, const char* base) {
|
||||
if(!file) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* saved = file;
|
||||
if(*file == '.') { // relative path detected
|
||||
while(*(++file) == '.' || *file == '/' || *file == '\\');
|
||||
if(*file == '\0') { // weird case: purely relative path without file
|
||||
return saved;
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
// strip base from file if it is given
|
||||
if(base) {
|
||||
char fn = *file;
|
||||
char bn = *base;
|
||||
while(bn != '\0' && path_same(fn, bn)) {
|
||||
fn = *(++file);
|
||||
bn = *(++base);
|
||||
}
|
||||
|
||||
if(fn == '\0' || bn != '\0') { // weird case: base isn't prefix of file
|
||||
return saved;
|
||||
}
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
|
@ -1033,7 +1033,7 @@
|
|||
GXV_NAME_ENTER( "StateArray" );
|
||||
|
||||
GXV_TRACE(( "parse %d bytes by stateSize=%d maxClassID=%d\n",
|
||||
(int)(*length_p), stateSize, (int)(maxClassID) ));
|
||||
(int)( *length_p ), stateSize, (int)maxClassID ));
|
||||
|
||||
/*
|
||||
* 2 states are predefined and must be described in StateArray:
|
||||
|
@ -1418,7 +1418,7 @@
|
|||
GXV_NAME_ENTER( "XStateArray" );
|
||||
|
||||
GXV_TRACE(( "parse % 3d bytes by stateSize=% 3d maxClassID=% 3d\n",
|
||||
(int)(*length_p), (int)stateSize, (int)(maxClassID) ));
|
||||
(int)( *length_p ), (int)stateSize, (int)maxClassID ));
|
||||
|
||||
/*
|
||||
* 2 states are predefined and must be described:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Name: zlib
|
||||
Short Name: zlib
|
||||
URL: http://zlib.net/
|
||||
Version: 1.2.11
|
||||
Version: 1.2.12
|
||||
License: see `zlib.h`
|
||||
|
||||
Description:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
/* gzguts.h -- zlib internal header definitions for gz* operations
|
||||
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
|
||||
* Copyright (C) 2004-2019 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
# include <io.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#if defined(_WIN32)
|
||||
# define WIDECHAR
|
||||
#endif
|
||||
|
||||
|
@ -190,6 +190,7 @@ typedef struct {
|
|||
/* just for writing */
|
||||
int level; /* compression level */
|
||||
int strategy; /* compression strategy */
|
||||
int reset; /* true if a reset is pending after a Z_FINISH */
|
||||
/* seek request */
|
||||
z_off64_t skip; /* amount to skip (already rewound if backwards) */
|
||||
int seek; /* true if seek request pending */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* infback.c -- inflate using a call-back interface
|
||||
* Copyright (C) 1995-2016 Mark Adler
|
||||
* Copyright (C) 1995-2022 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -477,6 +477,7 @@ int ZEXPORT inflateBack(
|
|||
}
|
||||
Tracev((stderr, "inflate: codes ok\n"));
|
||||
state->mode = LEN;
|
||||
/* fallthrough */
|
||||
|
||||
case LEN:
|
||||
/* use inflate_fast() if we have enough input and output */
|
||||
|
|
|
@ -70,7 +70,7 @@ void ZLIB_INTERNAL inflate_fast(
|
|||
code const FAR *dcode; /* local strm->distcode */
|
||||
unsigned lmask; /* mask for first level of length codes */
|
||||
unsigned dmask; /* mask for first level of distance codes */
|
||||
code here; /* retrieved table entry */
|
||||
code const *here; /* retrieved table entry */
|
||||
unsigned op; /* code bits, operation, extra bits, or */
|
||||
/* window position, window bytes to copy */
|
||||
unsigned len; /* match length, unused bytes */
|
||||
|
@ -107,20 +107,20 @@ void ZLIB_INTERNAL inflate_fast(
|
|||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
}
|
||||
here = lcode[hold & lmask];
|
||||
here = lcode + (hold & lmask);
|
||||
dolen:
|
||||
op = (unsigned)(here.bits);
|
||||
op = (unsigned)(here->bits);
|
||||
hold >>= op;
|
||||
bits -= op;
|
||||
op = (unsigned)(here.op);
|
||||
op = (unsigned)(here->op);
|
||||
if (op == 0) { /* literal */
|
||||
Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
|
||||
Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ?
|
||||
"inflate: literal '%c'\n" :
|
||||
"inflate: literal 0x%02x\n", here.val));
|
||||
*out++ = (unsigned char)(here.val);
|
||||
"inflate: literal 0x%02x\n", here->val));
|
||||
*out++ = (unsigned char)(here->val);
|
||||
}
|
||||
else if (op & 16) { /* length base */
|
||||
len = (unsigned)(here.val);
|
||||
len = (unsigned)(here->val);
|
||||
op &= 15; /* number of extra bits */
|
||||
if (op) {
|
||||
if (bits < op) {
|
||||
|
@ -138,14 +138,14 @@ void ZLIB_INTERNAL inflate_fast(
|
|||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
}
|
||||
here = dcode[hold & dmask];
|
||||
here = dcode + (hold & dmask);
|
||||
dodist:
|
||||
op = (unsigned)(here.bits);
|
||||
op = (unsigned)(here->bits);
|
||||
hold >>= op;
|
||||
bits -= op;
|
||||
op = (unsigned)(here.op);
|
||||
op = (unsigned)(here->op);
|
||||
if (op & 16) { /* distance base */
|
||||
dist = (unsigned)(here.val);
|
||||
dist = (unsigned)(here->val);
|
||||
op &= 15; /* number of extra bits */
|
||||
if (bits < op) {
|
||||
hold += (unsigned long)(*in++) << bits;
|
||||
|
@ -264,7 +264,7 @@ void ZLIB_INTERNAL inflate_fast(
|
|||
}
|
||||
}
|
||||
else if ((op & 64) == 0) { /* 2nd level distance code */
|
||||
here = dcode[here.val + (hold & ((1U << op) - 1))];
|
||||
here = dcode + here->val + (hold & ((1U << op) - 1));
|
||||
goto dodist;
|
||||
}
|
||||
else {
|
||||
|
@ -274,7 +274,7 @@ void ZLIB_INTERNAL inflate_fast(
|
|||
}
|
||||
}
|
||||
else if ((op & 64) == 0) { /* 2nd level length code */
|
||||
here = lcode[here.val + (hold & ((1U << op) - 1))];
|
||||
here = lcode + here->val + (hold & ((1U << op) - 1));
|
||||
goto dolen;
|
||||
}
|
||||
else if (op & 32) { /* end-of-block */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* inflate.c -- zlib decompression
|
||||
* Copyright (C) 1995-2016 Mark Adler
|
||||
* Copyright (C) 1995-2022 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -132,6 +132,7 @@ int ZEXPORT inflateResetKeep(
|
|||
state->mode = HEAD;
|
||||
state->last = 0;
|
||||
state->havedict = 0;
|
||||
state->flags = -1;
|
||||
state->dmax = 32768U;
|
||||
state->head = Z_NULL;
|
||||
state->hold = 0;
|
||||
|
@ -269,7 +270,7 @@ int ZEXPORT inflatePrime(
|
|||
return Z_OK;
|
||||
}
|
||||
|
||||
#endif /* Z_FREETYPE */
|
||||
#endif /* !Z_FREETYPE */
|
||||
|
||||
/*
|
||||
Return state with length and distance decoding tables and index sizes set to
|
||||
|
@ -453,10 +454,10 @@ local int updatewindow(
|
|||
|
||||
/* check function to use adler32() for zlib or crc32() for gzip */
|
||||
#ifdef GUNZIP
|
||||
# define UPDATE(check, buf, len) \
|
||||
# define UPDATE_CHECK(check, buf, len) \
|
||||
(state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
|
||||
#else
|
||||
# define UPDATE(check, buf, len) adler32(check, buf, len)
|
||||
# define UPDATE_CHECK(check, buf, len) adler32(check, buf, len)
|
||||
#endif
|
||||
|
||||
/* check macros for header crc */
|
||||
|
@ -676,7 +677,6 @@ int ZEXPORT inflate(
|
|||
state->mode = FLAGS;
|
||||
break;
|
||||
}
|
||||
state->flags = 0; /* expect zlib header */
|
||||
if (state->head != Z_NULL)
|
||||
state->head->done = -1;
|
||||
if (!(state->wrap & 1) || /* check if zlib header allowed */
|
||||
|
@ -703,6 +703,7 @@ int ZEXPORT inflate(
|
|||
break;
|
||||
}
|
||||
state->dmax = 1U << len;
|
||||
state->flags = 0; /* indicate zlib header */
|
||||
Tracev((stderr, "inflate: zlib header ok\n"));
|
||||
strm->adler = state->check = adler32(0L, Z_NULL, 0);
|
||||
state->mode = hold & 0x200 ? DICTID : TYPE;
|
||||
|
@ -728,6 +729,7 @@ int ZEXPORT inflate(
|
|||
CRC2(state->check, hold);
|
||||
INITBITS();
|
||||
state->mode = TIME;
|
||||
/* fallthrough */
|
||||
case TIME:
|
||||
NEEDBITS(32);
|
||||
if (state->head != Z_NULL)
|
||||
|
@ -736,6 +738,7 @@ int ZEXPORT inflate(
|
|||
CRC4(state->check, hold);
|
||||
INITBITS();
|
||||
state->mode = OS;
|
||||
/* fallthrough */
|
||||
case OS:
|
||||
NEEDBITS(16);
|
||||
if (state->head != Z_NULL) {
|
||||
|
@ -746,6 +749,7 @@ int ZEXPORT inflate(
|
|||
CRC2(state->check, hold);
|
||||
INITBITS();
|
||||
state->mode = EXLEN;
|
||||
/* fallthrough */
|
||||
case EXLEN:
|
||||
if (state->flags & 0x0400) {
|
||||
NEEDBITS(16);
|
||||
|
@ -759,6 +763,7 @@ int ZEXPORT inflate(
|
|||
else if (state->head != Z_NULL)
|
||||
state->head->extra = Z_NULL;
|
||||
state->mode = EXTRA;
|
||||
/* fallthrough */
|
||||
case EXTRA:
|
||||
if (state->flags & 0x0400) {
|
||||
copy = state->length;
|
||||
|
@ -781,6 +786,7 @@ int ZEXPORT inflate(
|
|||
}
|
||||
state->length = 0;
|
||||
state->mode = NAME;
|
||||
/* fallthrough */
|
||||
case NAME:
|
||||
if (state->flags & 0x0800) {
|
||||
if (have == 0) goto inf_leave;
|
||||
|
@ -802,6 +808,7 @@ int ZEXPORT inflate(
|
|||
state->head->name = Z_NULL;
|
||||
state->length = 0;
|
||||
state->mode = COMMENT;
|
||||
/* fallthrough */
|
||||
case COMMENT:
|
||||
if (state->flags & 0x1000) {
|
||||
if (have == 0) goto inf_leave;
|
||||
|
@ -822,6 +829,7 @@ int ZEXPORT inflate(
|
|||
else if (state->head != Z_NULL)
|
||||
state->head->comment = Z_NULL;
|
||||
state->mode = HCRC;
|
||||
/* fallthrough */
|
||||
case HCRC:
|
||||
if (state->flags & 0x0200) {
|
||||
NEEDBITS(16);
|
||||
|
@ -845,6 +853,7 @@ int ZEXPORT inflate(
|
|||
strm->adler = state->check = ZSWAP32(hold);
|
||||
INITBITS();
|
||||
state->mode = DICT;
|
||||
/* fallthrough */
|
||||
case DICT:
|
||||
if (state->havedict == 0) {
|
||||
RESTORE();
|
||||
|
@ -852,8 +861,10 @@ int ZEXPORT inflate(
|
|||
}
|
||||
strm->adler = state->check = adler32(0L, Z_NULL, 0);
|
||||
state->mode = TYPE;
|
||||
/* fallthrough */
|
||||
case TYPE:
|
||||
if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
|
||||
/* fallthrough */
|
||||
case TYPEDO:
|
||||
if (state->last) {
|
||||
BYTEBITS();
|
||||
|
@ -904,8 +915,10 @@ int ZEXPORT inflate(
|
|||
INITBITS();
|
||||
state->mode = COPY_;
|
||||
if (flush == Z_TREES) goto inf_leave;
|
||||
/* fallthrough */
|
||||
case COPY_:
|
||||
state->mode = COPY;
|
||||
/* fallthrough */
|
||||
case COPY:
|
||||
copy = state->length;
|
||||
if (copy) {
|
||||
|
@ -941,6 +954,7 @@ int ZEXPORT inflate(
|
|||
Tracev((stderr, "inflate: table sizes ok\n"));
|
||||
state->have = 0;
|
||||
state->mode = LENLENS;
|
||||
/* fallthrough */
|
||||
case LENLENS:
|
||||
while (state->have < state->ncode) {
|
||||
NEEDBITS(3);
|
||||
|
@ -962,6 +976,7 @@ int ZEXPORT inflate(
|
|||
Tracev((stderr, "inflate: code lengths ok\n"));
|
||||
state->have = 0;
|
||||
state->mode = CODELENS;
|
||||
/* fallthrough */
|
||||
case CODELENS:
|
||||
while (state->have < state->nlen + state->ndist) {
|
||||
for (;;) {
|
||||
|
@ -1045,8 +1060,10 @@ int ZEXPORT inflate(
|
|||
Tracev((stderr, "inflate: codes ok\n"));
|
||||
state->mode = LEN_;
|
||||
if (flush == Z_TREES) goto inf_leave;
|
||||
/* fallthrough */
|
||||
case LEN_:
|
||||
state->mode = LEN;
|
||||
/* fallthrough */
|
||||
case LEN:
|
||||
if (have >= 6 && left >= 258) {
|
||||
RESTORE();
|
||||
|
@ -1096,6 +1113,7 @@ int ZEXPORT inflate(
|
|||
}
|
||||
state->extra = (unsigned)(here.op) & 15;
|
||||
state->mode = LENEXT;
|
||||
/* fallthrough */
|
||||
case LENEXT:
|
||||
if (state->extra) {
|
||||
NEEDBITS(state->extra);
|
||||
|
@ -1106,6 +1124,7 @@ int ZEXPORT inflate(
|
|||
Tracevv((stderr, "inflate: length %u\n", state->length));
|
||||
state->was = state->length;
|
||||
state->mode = DIST;
|
||||
/* fallthrough */
|
||||
case DIST:
|
||||
for (;;) {
|
||||
here = state->distcode[BITS(state->distbits)];
|
||||
|
@ -1133,6 +1152,7 @@ int ZEXPORT inflate(
|
|||
state->offset = (unsigned)here.val;
|
||||
state->extra = (unsigned)(here.op) & 15;
|
||||
state->mode = DISTEXT;
|
||||
/* fallthrough */
|
||||
case DISTEXT:
|
||||
if (state->extra) {
|
||||
NEEDBITS(state->extra);
|
||||
|
@ -1149,6 +1169,7 @@ int ZEXPORT inflate(
|
|||
#endif
|
||||
Tracevv((stderr, "inflate: distance %u\n", state->offset));
|
||||
state->mode = MATCH;
|
||||
/* fallthrough */
|
||||
case MATCH:
|
||||
if (left == 0) goto inf_leave;
|
||||
copy = out - left;
|
||||
|
@ -1208,7 +1229,7 @@ int ZEXPORT inflate(
|
|||
state->total += out;
|
||||
if ((state->wrap & 4) && out)
|
||||
strm->adler = state->check =
|
||||
UPDATE(state->check, put - out, out);
|
||||
UPDATE_CHECK(state->check, put - out, out);
|
||||
out = left;
|
||||
if ((state->wrap & 4) && (
|
||||
#ifdef GUNZIP
|
||||
|
@ -1224,10 +1245,11 @@ int ZEXPORT inflate(
|
|||
}
|
||||
#ifdef GUNZIP
|
||||
state->mode = LENGTH;
|
||||
/* fallthrough */
|
||||
case LENGTH:
|
||||
if (state->wrap && state->flags) {
|
||||
NEEDBITS(32);
|
||||
if (hold != (state->total & 0xffffffffUL)) {
|
||||
if ((state->wrap & 4) && hold != (state->total & 0xffffffff)) {
|
||||
strm->msg = (char *)"incorrect length check";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
|
@ -1237,6 +1259,7 @@ int ZEXPORT inflate(
|
|||
}
|
||||
#endif
|
||||
state->mode = DONE;
|
||||
/* fallthrough */
|
||||
case DONE:
|
||||
ret = Z_STREAM_END;
|
||||
goto inf_leave;
|
||||
|
@ -1246,6 +1269,7 @@ int ZEXPORT inflate(
|
|||
case MEM:
|
||||
return Z_MEM_ERROR;
|
||||
case SYNC:
|
||||
/* fallthrough */
|
||||
default:
|
||||
return Z_STREAM_ERROR;
|
||||
}
|
||||
|
@ -1271,7 +1295,7 @@ int ZEXPORT inflate(
|
|||
state->total += out;
|
||||
if ((state->wrap & 4) && out)
|
||||
strm->adler = state->check =
|
||||
UPDATE(state->check, strm->next_out - out, out);
|
||||
UPDATE_CHECK(state->check, strm->next_out - out, out);
|
||||
strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
|
||||
(state->mode == TYPE ? 128 : 0) +
|
||||
(state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
|
||||
|
@ -1409,6 +1433,7 @@ int ZEXPORT inflateSync(
|
|||
z_streamp strm)
|
||||
{
|
||||
unsigned len; /* number of bytes to look at or looked at */
|
||||
int flags; /* temporary to save header status */
|
||||
unsigned long in, out; /* temporary to save total_in and total_out */
|
||||
unsigned char buf[4]; /* to restore bit buffer to byte string */
|
||||
struct inflate_state FAR *state;
|
||||
|
@ -1441,9 +1466,15 @@ int ZEXPORT inflateSync(
|
|||
|
||||
/* return no joy or set up to restart inflate() on a new block */
|
||||
if (state->have != 4) return Z_DATA_ERROR;
|
||||
if (state->flags == -1)
|
||||
state->wrap = 0; /* if no header yet, treat as raw */
|
||||
else
|
||||
state->wrap &= ~4; /* no point in computing a check value now */
|
||||
flags = state->flags;
|
||||
in = strm->total_in; out = strm->total_out;
|
||||
inflateReset(strm);
|
||||
strm->total_in = in; strm->total_out = out;
|
||||
state->flags = flags;
|
||||
state->mode = TYPE;
|
||||
return Z_OK;
|
||||
}
|
||||
|
@ -1468,7 +1499,7 @@ int ZEXPORT inflateSyncPoint(
|
|||
return state->mode == STORED && state->bits == 0;
|
||||
}
|
||||
|
||||
#if !Z_FREETYPE
|
||||
#ifndef Z_FREETYPE
|
||||
|
||||
int ZEXPORT inflateCopy(
|
||||
z_streamp dest,
|
||||
|
@ -1545,7 +1576,7 @@ int ZEXPORT inflateValidate(
|
|||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (check)
|
||||
if (check && state->wrap)
|
||||
state->wrap |= 4;
|
||||
else
|
||||
state->wrap &= ~4;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* inflate.h -- internal inflate state definition
|
||||
* Copyright (C) 1995-2016 Mark Adler
|
||||
* Copyright (C) 1995-2019 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -89,7 +89,8 @@ struct inflate_state {
|
|||
int wrap; /* bit 0 true for zlib, bit 1 true for gzip,
|
||||
bit 2 true to validate check value */
|
||||
int havedict; /* true if dictionary provided */
|
||||
int flags; /* gzip header method and flags (0 if zlib) */
|
||||
int flags; /* gzip header method and flags, 0 if zlib, or
|
||||
-1 if raw or no header yet */
|
||||
unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */
|
||||
unsigned long check; /* protected copy of check value */
|
||||
unsigned long total; /* protected copy of output count */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* inftrees.c -- generate Huffman trees for efficient decoding
|
||||
* Copyright (C) 1995-2017 Mark Adler
|
||||
* Copyright (C) 1995-2022 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define MAXBITS 15
|
||||
|
||||
const char inflate_copyright[] =
|
||||
" inflate 1.2.11 Copyright 1995-2017 Mark Adler ";
|
||||
" inflate 1.2.12 Copyright 1995-2022 Mark Adler ";
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
|
@ -62,7 +62,7 @@ int ZLIB_INTERNAL inflate_table(
|
|||
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
||||
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 202};
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 202};
|
||||
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||
|
|
|
@ -6,8 +6,6 @@ are compiled as part of `src/gzip/ftgzip.c`.
|
|||
* src/gzip/adler32.c: Do not define unused functions when `Z_FREETYPE`
|
||||
is set.
|
||||
|
||||
* src/gzip/crc32.c (DO1, DO8): Undefine. Already defined in `adler32.c`.
|
||||
|
||||
* src/gzip/gzguts.h (COPY): Rename to...
|
||||
(COPY__): ... this since `COPY` and `COPY_` conflict with enum values,
|
||||
which have the same name in `zlib.h`.
|
||||
|
@ -25,10 +23,10 @@ Omit unused function declarations when `Z_FREETYPE` is defined.
|
|||
* src/gzip/inflate.h, src/gzip/inftrees.h: Add header guard macros to
|
||||
prevent compiler errors.
|
||||
|
||||
diff --git b/src/gzip/adler32.c a/src/gzip/adler32.c
|
||||
diff --git a/src/gzip/adler32.c b/src/gzip/adler32.c
|
||||
index be5e8a247..aa032e1dd 100644
|
||||
--- b/src/gzip/adler32.c
|
||||
+++ a/src/gzip/adler32.c
|
||||
--- a/src/gzip/adler32.c
|
||||
+++ b/src/gzip/adler32.c
|
||||
@@ -7,7 +7,9 @@
|
||||
|
||||
#include "zutil.h"
|
||||
|
@ -54,23 +52,10 @@ index be5e8a247..aa032e1dd 100644
|
|||
}
|
||||
+
|
||||
+#endif /* !Z_FREETYPE */
|
||||
diff --git b/src/gzip/crc32.c a/src/gzip/crc32.c
|
||||
index 3e3eb1794..ffced1ea7 100644
|
||||
--- b/src/gzip/crc32.c
|
||||
+++ a/src/gzip/crc32.c
|
||||
@@ -195,6 +195,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
+#undef DO1
|
||||
+#undef DO8
|
||||
#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
|
||||
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
|
||||
|
||||
diff --git b/src/gzip/gzguts.h a/src/gzip/gzguts.h
|
||||
index 990a4d251..c81f8f392 100644
|
||||
--- b/src/gzip/gzguts.h
|
||||
+++ a/src/gzip/gzguts.h
|
||||
diff --git a/src/gzip/gzguts.h b/src/gzip/gzguts.h
|
||||
index 57faf3716..4f09a52a7 100644
|
||||
--- a/src/gzip/gzguts.h
|
||||
+++ b/src/gzip/gzguts.h
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
/* values for gz_state how */
|
||||
|
@ -80,10 +65,10 @@ index 990a4d251..c81f8f392 100644
|
|||
#define GZIP 2 /* decompress a gzip stream */
|
||||
|
||||
/* internal gzip file state data structure */
|
||||
diff --git b/src/gzip/inflate.c a/src/gzip/inflate.c
|
||||
index 3f7ea647b..7387e6f57 100644
|
||||
--- b/src/gzip/inflate.c
|
||||
+++ a/src/gzip/inflate.c
|
||||
diff --git a/src/gzip/inflate.c b/src/gzip/inflate.c
|
||||
index 4375557b4..5bf5b815e 100644
|
||||
--- a/src/gzip/inflate.c
|
||||
+++ b/src/gzip/inflate.c
|
||||
@@ -99,8 +99,10 @@ local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
|
||||
#ifdef BUILDFIXED
|
||||
void makefixed OF((void));
|
||||
|
@ -95,7 +80,7 @@ index 3f7ea647b..7387e6f57 100644
|
|||
|
||||
local int inflateStateCheck(
|
||||
z_streamp strm)
|
||||
@@ -244,6 +246,8 @@ int ZEXPORT inflateInit_(
|
||||
@@ -245,6 +247,8 @@ int ZEXPORT inflateInit_(
|
||||
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
|
||||
}
|
||||
|
||||
|
@ -104,16 +89,16 @@ index 3f7ea647b..7387e6f57 100644
|
|||
int ZEXPORT inflatePrime(
|
||||
z_streamp strm,
|
||||
int bits,
|
||||
@@ -265,6 +269,8 @@ int ZEXPORT inflatePrime(
|
||||
@@ -266,6 +270,8 @@ int ZEXPORT inflatePrime(
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
+#endif /* Z_FREETYPE */
|
||||
+#endif /* !Z_FREETYPE */
|
||||
+
|
||||
/*
|
||||
Return state with length and distance decoding tables and index sizes set to
|
||||
fixed code decoding. Normally this returns fixed tables from inffixed.h.
|
||||
@@ -1288,6 +1294,8 @@ int ZEXPORT inflateEnd(
|
||||
@@ -1312,6 +1318,8 @@ int ZEXPORT inflateEnd(
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
|
@ -122,7 +107,7 @@ index 3f7ea647b..7387e6f57 100644
|
|||
int ZEXPORT inflateGetDictionary(
|
||||
z_streamp strm,
|
||||
Bytef *dictionary,
|
||||
@@ -1440,6 +1448,8 @@ int ZEXPORT inflateSync(
|
||||
@@ -1471,6 +1479,8 @@ int ZEXPORT inflateSync(
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
|
@ -131,16 +116,16 @@ index 3f7ea647b..7387e6f57 100644
|
|||
/*
|
||||
Returns true if inflate is currently at the end of a block generated by
|
||||
Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
|
||||
@@ -1458,6 +1468,8 @@ int ZEXPORT inflateSyncPoint(
|
||||
@@ -1489,6 +1499,8 @@ int ZEXPORT inflateSyncPoint(
|
||||
return state->mode == STORED && state->bits == 0;
|
||||
}
|
||||
|
||||
+#if !Z_FREETYPE
|
||||
+#ifndef Z_FREETYPE
|
||||
+
|
||||
int ZEXPORT inflateCopy(
|
||||
z_streamp dest,
|
||||
z_streamp source)
|
||||
@@ -1505,6 +1517,8 @@ int ZEXPORT inflateCopy(
|
||||
@@ -1536,6 +1548,8 @@ int ZEXPORT inflateCopy(
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
|
@ -149,7 +134,7 @@ index 3f7ea647b..7387e6f57 100644
|
|||
int ZEXPORT inflateUndermine(
|
||||
z_streamp strm,
|
||||
int subvert)
|
||||
@@ -1538,6 +1552,8 @@ int ZEXPORT inflateValidate(
|
||||
@@ -1569,6 +1583,8 @@ int ZEXPORT inflateValidate(
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
|
@ -158,16 +143,16 @@ index 3f7ea647b..7387e6f57 100644
|
|||
long ZEXPORT inflateMark(
|
||||
z_streamp strm)
|
||||
{
|
||||
@@ -1559,3 +1575,5 @@ unsigned long ZEXPORT inflateCodesUsed(
|
||||
@@ -1590,3 +1606,5 @@ unsigned long ZEXPORT inflateCodesUsed(
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
return (unsigned long)(state->next - state->codes);
|
||||
}
|
||||
+
|
||||
+#endif /* !Z_FREETYPE */
|
||||
diff --git b/src/gzip/inflate.h a/src/gzip/inflate.h
|
||||
index a46cce6b6..92ea758e2 100644
|
||||
--- b/src/gzip/inflate.h
|
||||
+++ a/src/gzip/inflate.h
|
||||
diff --git a/src/gzip/inflate.h b/src/gzip/inflate.h
|
||||
index f127b6b1f..c6f5a52e1 100644
|
||||
--- a/src/gzip/inflate.h
|
||||
+++ b/src/gzip/inflate.h
|
||||
@@ -3,6 +3,9 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
@ -178,16 +163,16 @@ index a46cce6b6..92ea758e2 100644
|
|||
/* WARNING: this file should *not* be used by applications. It is
|
||||
part of the implementation of the compression library and is
|
||||
subject to change. Applications should only use zlib.h.
|
||||
@@ -123,3 +126,5 @@ struct inflate_state {
|
||||
@@ -124,3 +127,5 @@ struct inflate_state {
|
||||
int back; /* bits back of last unprocessed length/lit */
|
||||
unsigned was; /* initial length of match */
|
||||
};
|
||||
+
|
||||
+#endif /* INFLATE_H */
|
||||
diff --git b/src/gzip/inftrees.h a/src/gzip/inftrees.h
|
||||
diff --git a/src/gzip/inftrees.h b/src/gzip/inftrees.h
|
||||
index baa53a0b1..c94eb78b5 100644
|
||||
--- b/src/gzip/inftrees.h
|
||||
+++ a/src/gzip/inftrees.h
|
||||
--- a/src/gzip/inftrees.h
|
||||
+++ b/src/gzip/inftrees.h
|
||||
@@ -3,6 +3,9 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
@ -204,10 +189,10 @@ index baa53a0b1..c94eb78b5 100644
|
|||
unsigned FAR *bits, unsigned short FAR *work));
|
||||
+
|
||||
+#endif /* INFTREES_H_ */
|
||||
diff --git b/src/gzip/zlib.h a/src/gzip/zlib.h
|
||||
index f09cdaf1e..1807c0645 100644
|
||||
--- b/src/gzip/zlib.h
|
||||
+++ a/src/gzip/zlib.h
|
||||
diff --git a/src/gzip/zlib.h b/src/gzip/zlib.h
|
||||
index 4a98e38bf..d760140c2 100644
|
||||
--- a/src/gzip/zlib.h
|
||||
+++ b/src/gzip/zlib.h
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef ZLIB_H
|
||||
#define ZLIB_H
|
||||
|
@ -251,7 +236,7 @@ index f09cdaf1e..1807c0645 100644
|
|||
/*
|
||||
ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
||||
int level,
|
||||
@@ -954,6 +958,8 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
|
||||
@@ -956,6 +960,8 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
|
||||
destination.
|
||||
*/
|
||||
|
||||
|
@ -260,7 +245,7 @@ index f09cdaf1e..1807c0645 100644
|
|||
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
||||
/*
|
||||
This function is equivalent to inflateEnd followed by inflateInit,
|
||||
@@ -978,6 +984,8 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
|
||||
@@ -980,6 +986,8 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
|
||||
the windowBits parameter is invalid.
|
||||
*/
|
||||
|
||||
|
@ -269,7 +254,7 @@ index f09cdaf1e..1807c0645 100644
|
|||
ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
|
||||
int bits,
|
||||
int value));
|
||||
@@ -1067,6 +1075,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
|
||||
@@ -1069,6 +1077,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
|
||||
stream state was inconsistent.
|
||||
*/
|
||||
|
||||
|
@ -278,7 +263,7 @@ index f09cdaf1e..1807c0645 100644
|
|||
/*
|
||||
ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
|
||||
unsigned char FAR *window));
|
||||
@@ -1093,6 +1103,8 @@ typedef unsigned (*in_func) OF((void FAR *,
|
||||
@@ -1095,6 +1105,8 @@ typedef unsigned (*in_func) OF((void FAR *,
|
||||
z_const unsigned char FAR * FAR *));
|
||||
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
|
||||
|
||||
|
@ -287,7 +272,7 @@ index f09cdaf1e..1807c0645 100644
|
|||
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
||||
in_func in, void FAR *in_desc,
|
||||
out_func out, void FAR *out_desc));
|
||||
@@ -1212,6 +1224,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
|
||||
@@ -1214,6 +1226,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
|
||||
27-31: 0 (reserved)
|
||||
*/
|
||||
|
||||
|
@ -296,16 +281,16 @@ index f09cdaf1e..1807c0645 100644
|
|||
#ifndef Z_SOLO
|
||||
|
||||
/* utility functions */
|
||||
@@ -1739,6 +1753,8 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
||||
@@ -1742,6 +1756,8 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
||||
if (crc != original_crc) error();
|
||||
*/
|
||||
|
||||
+#ifndef Z_FREETYPE
|
||||
+
|
||||
ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf,
|
||||
ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf,
|
||||
z_size_t len));
|
||||
/*
|
||||
@@ -1805,6 +1821,19 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
@@ -1822,6 +1838,19 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
#endif
|
||||
|
||||
|
@ -325,13 +310,14 @@ index f09cdaf1e..1807c0645 100644
|
|||
#ifndef Z_SOLO
|
||||
|
||||
/* gzgetc() macro and its supporting function and exposed data structure. Note
|
||||
@@ -1879,12 +1908,15 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
||||
@@ -1901,13 +1930,16 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
||||
|
||||
#else /* Z_SOLO */
|
||||
|
||||
+#ifndef Z_FREETYPE
|
||||
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
|
||||
+#endif
|
||||
|
||||
#endif /* !Z_SOLO */
|
||||
|
@ -341,7 +327,7 @@ index f09cdaf1e..1807c0645 100644
|
|||
ZEXTERN const char * ZEXPORT zError OF((int));
|
||||
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
|
||||
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
|
||||
@@ -1904,6 +1936,7 @@ ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
|
||||
@@ -1927,6 +1959,7 @@ ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
|
||||
va_list va));
|
||||
# endif
|
||||
#endif
|
||||
|
@ -349,21 +335,11 @@ index f09cdaf1e..1807c0645 100644
|
|||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
diff --git b/src/gzip/zutil.h a/src/gzip/zutil.h
|
||||
index b079ea6a8..2d734a835 100644
|
||||
--- b/src/gzip/zutil.h
|
||||
+++ a/src/gzip/zutil.h
|
||||
@@ -30,7 +30,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef Z_SOLO
|
||||
+# ifndef Z_FREETYPE
|
||||
typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
@@ -185,6 +187,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
diff --git a/src/gzip/zutil.h b/src/gzip/zutil.h
|
||||
index d9a20ae1b..14f0f1a85 100644
|
||||
--- a/src/gzip/zutil.h
|
||||
+++ b/src/gzip/zutil.h
|
||||
@@ -188,6 +188,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
#pragma warn -8066
|
||||
#endif
|
||||
|
||||
|
@ -372,7 +348,7 @@ index b079ea6a8..2d734a835 100644
|
|||
/* provide prototypes for these when building zlib without LFS */
|
||||
#if !defined(_WIN32) && \
|
||||
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
@@ -192,6 +196,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
@@ -195,6 +197,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
||||
#endif
|
||||
|
||||
|
@ -381,7 +357,7 @@ index b079ea6a8..2d734a835 100644
|
|||
/* common defaults */
|
||||
|
||||
#ifndef OS_CODE
|
||||
@@ -223,9 +229,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
@@ -226,9 +230,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
# define zmemcmp _fmemcmp
|
||||
# define zmemzero(dest, len) _fmemset(dest, 0, len)
|
||||
# else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.11, January 15th, 2017
|
||||
version 1.2.12, March 11th, 2022
|
||||
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -37,11 +37,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ZLIB_VERSION "1.2.11"
|
||||
#define ZLIB_VERNUM 0x12b0
|
||||
#define ZLIB_VERSION "1.2.12"
|
||||
#define ZLIB_VERNUM 0x12c0
|
||||
#define ZLIB_VER_MAJOR 1
|
||||
#define ZLIB_VER_MINOR 2
|
||||
#define ZLIB_VER_REVISION 11
|
||||
#define ZLIB_VER_REVISION 12
|
||||
#define ZLIB_VER_SUBREVISION 0
|
||||
|
||||
/*
|
||||
|
@ -547,8 +547,7 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
|||
int strategy));
|
||||
|
||||
This is another version of deflateInit with more compression options. The
|
||||
fields next_in, zalloc, zfree and opaque must be initialized before by the
|
||||
caller.
|
||||
fields zalloc, zfree and opaque must be initialized before by the caller.
|
||||
|
||||
The method parameter is the compression method. It must be Z_DEFLATED in
|
||||
this version of the library.
|
||||
|
@ -716,11 +715,12 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
|
|||
used to switch between compression and straight copy of the input data, or
|
||||
to switch to a different kind of input data requiring a different strategy.
|
||||
If the compression approach (which is a function of the level) or the
|
||||
strategy is changed, and if any input has been consumed in a previous
|
||||
deflate() call, then the input available so far is compressed with the old
|
||||
level and strategy using deflate(strm, Z_BLOCK). There are three approaches
|
||||
for the compression levels 0, 1..3, and 4..9 respectively. The new level
|
||||
and strategy will take effect at the next call of deflate().
|
||||
strategy is changed, and if there have been any deflate() calls since the
|
||||
state was initialized or reset, then the input available so far is
|
||||
compressed with the old level and strategy using deflate(strm, Z_BLOCK).
|
||||
There are three approaches for the compression levels 0, 1..3, and 4..9
|
||||
respectively. The new level and strategy will take effect at the next call
|
||||
of deflate().
|
||||
|
||||
If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
|
||||
not have enough output space to complete, then the parameter change will not
|
||||
|
@ -869,9 +869,11 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
|||
detection, or add 16 to decode only the gzip format (the zlib format will
|
||||
return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
|
||||
CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see
|
||||
below), inflate() will not automatically decode concatenated gzip streams.
|
||||
inflate() will return Z_STREAM_END at the end of the gzip stream. The state
|
||||
would need to be reset to continue decoding a subsequent gzip stream.
|
||||
below), inflate() will *not* automatically decode concatenated gzip members.
|
||||
inflate() will return Z_STREAM_END at the end of the gzip member. The state
|
||||
would need to be reset to continue decoding a subsequent gzip member. This
|
||||
*must* be done if there is more data after a gzip member, in order for the
|
||||
decompression to be compliant with the gzip standard (RFC 1952).
|
||||
|
||||
inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
||||
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
|
||||
|
@ -1316,14 +1318,14 @@ typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
|
|||
/*
|
||||
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
|
||||
|
||||
Opens a gzip (.gz) file for reading or writing. The mode parameter is as
|
||||
in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
|
||||
a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
|
||||
compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
|
||||
for fixed code compression as in "wb9F". (See the description of
|
||||
deflateInit2 for more information about the strategy parameter.) 'T' will
|
||||
request transparent writing or appending with no compression and not using
|
||||
the gzip format.
|
||||
Open the gzip (.gz) file at path for reading and decompressing, or
|
||||
compressing and writing. The mode parameter is as in fopen ("rb" or "wb")
|
||||
but can also include a compression level ("wb9") or a strategy: 'f' for
|
||||
filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h",
|
||||
'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression
|
||||
as in "wb9F". (See the description of deflateInit2 for more information
|
||||
about the strategy parameter.) 'T' will request transparent writing or
|
||||
appending with no compression and not using the gzip format.
|
||||
|
||||
"a" can be used instead of "w" to request that the gzip stream that will
|
||||
be written be appended to the file. "+" will result in an error, since
|
||||
|
@ -1353,9 +1355,9 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
|
|||
|
||||
ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
|
||||
/*
|
||||
gzdopen associates a gzFile with the file descriptor fd. File descriptors
|
||||
are obtained from calls like open, dup, creat, pipe or fileno (if the file
|
||||
has been previously opened with fopen). The mode parameter is as in gzopen.
|
||||
Associate a gzFile with the file descriptor fd. File descriptors are
|
||||
obtained from calls like open, dup, creat, pipe or fileno (if the file has
|
||||
been previously opened with fopen). The mode parameter is as in gzopen.
|
||||
|
||||
The next call of gzclose on the returned gzFile will also close the file
|
||||
descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
|
||||
|
@ -1376,13 +1378,13 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
|
|||
|
||||
ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
|
||||
/*
|
||||
Set the internal buffer size used by this library's functions. The
|
||||
default buffer size is 8192 bytes. This function must be called after
|
||||
gzopen() or gzdopen(), and before any other calls that read or write the
|
||||
file. The buffer memory allocation is always deferred to the first read or
|
||||
write. Three times that size in buffer space is allocated. A larger buffer
|
||||
size of, for example, 64K or 128K bytes will noticeably increase the speed
|
||||
of decompression (reading).
|
||||
Set the internal buffer size used by this library's functions for file to
|
||||
size. The default buffer size is 8192 bytes. This function must be called
|
||||
after gzopen() or gzdopen(), and before any other calls that read or write
|
||||
the file. The buffer memory allocation is always deferred to the first read
|
||||
or write. Three times that size in buffer space is allocated. A larger
|
||||
buffer size of, for example, 64K or 128K bytes will noticeably increase the
|
||||
speed of decompression (reading).
|
||||
|
||||
The new buffer size also affects the maximum length for gzprintf().
|
||||
|
||||
|
@ -1392,9 +1394,9 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
|
|||
|
||||
ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
||||
/*
|
||||
Dynamically update the compression level or strategy. See the description
|
||||
of deflateInit2 for the meaning of these parameters. Previously provided
|
||||
data is flushed before the parameter change.
|
||||
Dynamically update the compression level and strategy for file. See the
|
||||
description of deflateInit2 for the meaning of these parameters. Previously
|
||||
provided data is flushed before applying the parameter changes.
|
||||
|
||||
gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
|
||||
opened for writing, Z_ERRNO if there is an error writing the flushed data,
|
||||
|
@ -1403,7 +1405,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
|||
|
||||
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
|
||||
/*
|
||||
Reads the given number of uncompressed bytes from the compressed file. If
|
||||
Read and decompress up to len uncompressed bytes from file into buf. If
|
||||
the input file is not in gzip format, gzread copies the given number of
|
||||
bytes into the buffer directly from the file.
|
||||
|
||||
|
@ -1434,11 +1436,11 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
|
|||
ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
|
||||
gzFile file));
|
||||
/*
|
||||
Read up to nitems items of size size from file to buf, otherwise operating
|
||||
as gzread() does. This duplicates the interface of stdio's fread(), with
|
||||
size_t request and return types. If the library defines size_t, then
|
||||
z_size_t is identical to size_t. If not, then z_size_t is an unsigned
|
||||
integer type that can contain a pointer.
|
||||
Read and decompress up to nitems items of size size from file into buf,
|
||||
otherwise operating as gzread() does. This duplicates the interface of
|
||||
stdio's fread(), with size_t request and return types. If the library
|
||||
defines size_t, then z_size_t is identical to size_t. If not, then z_size_t
|
||||
is an unsigned integer type that can contain a pointer.
|
||||
|
||||
gzfread() returns the number of full items read of size size, or zero if
|
||||
the end of the file was reached and a full item could not be read, or if
|
||||
|
@ -1457,18 +1459,16 @@ ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
|
|||
file, reseting and retrying on end-of-file, when size is not 1.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
||||
voidpc buf, unsigned len));
|
||||
ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len));
|
||||
/*
|
||||
Writes the given number of uncompressed bytes into the compressed file.
|
||||
gzwrite returns the number of uncompressed bytes written or 0 in case of
|
||||
error.
|
||||
Compress and write the len uncompressed bytes at buf to file. gzwrite
|
||||
returns the number of uncompressed bytes written or 0 in case of error.
|
||||
*/
|
||||
|
||||
ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
|
||||
z_size_t nitems, gzFile file));
|
||||
/*
|
||||
gzfwrite() writes nitems items of size size from buf to file, duplicating
|
||||
Compress and write nitems items of size size from buf to file, duplicating
|
||||
the interface of stdio's fwrite(), with size_t request and return types. If
|
||||
the library defines size_t, then z_size_t is identical to size_t. If not,
|
||||
then z_size_t is an unsigned integer type that can contain a pointer.
|
||||
|
@ -1481,22 +1481,22 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
|
|||
|
||||
ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
|
||||
/*
|
||||
Converts, formats, and writes the arguments to the compressed file under
|
||||
control of the format string, as in fprintf. gzprintf returns the number of
|
||||
Convert, format, compress, and write the arguments (...) to file under
|
||||
control of the string format, as in fprintf. gzprintf returns the number of
|
||||
uncompressed bytes actually written, or a negative zlib error code in case
|
||||
of error. The number of uncompressed bytes written is limited to 8191, or
|
||||
one less than the buffer size given to gzbuffer(). The caller should assure
|
||||
that this limit is not exceeded. If it is exceeded, then gzprintf() will
|
||||
return an error (0) with nothing written. In this case, there may also be a
|
||||
buffer overflow with unpredictable consequences, which is possible only if
|
||||
zlib was compiled with the insecure functions sprintf() or vsprintf()
|
||||
zlib was compiled with the insecure functions sprintf() or vsprintf(),
|
||||
because the secure snprintf() or vsnprintf() functions were not available.
|
||||
This can be determined using zlibCompileFlags().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
||||
/*
|
||||
Writes the given null-terminated string to the compressed file, excluding
|
||||
Compress and write the given null-terminated string s to file, excluding
|
||||
the terminating null character.
|
||||
|
||||
gzputs returns the number of characters written, or -1 in case of error.
|
||||
|
@ -1504,11 +1504,12 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
|||
|
||||
ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
|
||||
/*
|
||||
Reads bytes from the compressed file until len-1 characters are read, or a
|
||||
newline character is read and transferred to buf, or an end-of-file
|
||||
condition is encountered. If any characters are read or if len == 1, the
|
||||
string is terminated with a null character. If no characters are read due
|
||||
to an end-of-file or len < 1, then the buffer is left untouched.
|
||||
Read and decompress bytes from file into buf, until len-1 characters are
|
||||
read, or until a newline character is read and transferred to buf, or an
|
||||
end-of-file condition is encountered. If any characters are read or if len
|
||||
is one, the string is terminated with a null character. If no characters
|
||||
are read due to an end-of-file or len is less than one, then the buffer is
|
||||
left untouched.
|
||||
|
||||
gzgets returns buf which is a null-terminated string, or it returns NULL
|
||||
for end-of-file or in case of error. If there was an error, the contents at
|
||||
|
@ -1517,13 +1518,13 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
|
|||
|
||||
ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
|
||||
/*
|
||||
Writes c, converted to an unsigned char, into the compressed file. gzputc
|
||||
Compress and write c, converted to an unsigned char, into file. gzputc
|
||||
returns the value that was written, or -1 in case of error.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
|
||||
/*
|
||||
Reads one byte from the compressed file. gzgetc returns this byte or -1
|
||||
Read and decompress one byte from file. gzgetc returns this byte or -1
|
||||
in case of end of file or error. This is implemented as a macro for speed.
|
||||
As such, it does not do all of the checking the other functions do. I.e.
|
||||
it does not check to see if file is NULL, nor whether the structure file
|
||||
|
@ -1532,8 +1533,8 @@ ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
|
|||
|
||||
ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
|
||||
/*
|
||||
Push one character back onto the stream to be read as the first character
|
||||
on the next read. At least one character of push-back is allowed.
|
||||
Push c back onto the stream for file to be read as the first character on
|
||||
the next read. At least one character of push-back is always allowed.
|
||||
gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
|
||||
fail if c is -1, and may fail if a character has been pushed but not read
|
||||
yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
|
||||
|
@ -1544,9 +1545,9 @@ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
|
|||
|
||||
ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
|
||||
/*
|
||||
Flushes all pending output into the compressed file. The parameter flush
|
||||
is as in the deflate() function. The return value is the zlib error number
|
||||
(see function gzerror below). gzflush is only permitted when writing.
|
||||
Flush all pending output to file. The parameter flush is as in the
|
||||
deflate() function. The return value is the zlib error number (see function
|
||||
gzerror below). gzflush is only permitted when writing.
|
||||
|
||||
If the flush parameter is Z_FINISH, the remaining data is written and the
|
||||
gzip stream is completed in the output. If gzwrite() is called again, a new
|
||||
|
@ -1561,8 +1562,8 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
|
|||
ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
|
||||
z_off_t offset, int whence));
|
||||
|
||||
Sets the starting position for the next gzread or gzwrite on the given
|
||||
compressed file. The offset represents a number of bytes in the
|
||||
Set the starting position to offset relative to whence for the next gzread
|
||||
or gzwrite on file. The offset represents a number of bytes in the
|
||||
uncompressed data stream. The whence parameter is defined as in lseek(2);
|
||||
the value SEEK_END is not supported.
|
||||
|
||||
|
@ -1579,18 +1580,18 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
|
|||
|
||||
ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
|
||||
/*
|
||||
Rewinds the given file. This function is supported only for reading.
|
||||
Rewind file. This function is supported only for reading.
|
||||
|
||||
gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
|
||||
gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET).
|
||||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
|
||||
|
||||
Returns the starting position for the next gzread or gzwrite on the given
|
||||
compressed file. This position represents a number of bytes in the
|
||||
uncompressed data stream, and is zero when starting, even if appending or
|
||||
reading a gzip stream from the middle of a file using gzdopen().
|
||||
Return the starting position for the next gzread or gzwrite on file.
|
||||
This position represents a number of bytes in the uncompressed data stream,
|
||||
and is zero when starting, even if appending or reading a gzip stream from
|
||||
the middle of a file using gzdopen().
|
||||
|
||||
gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
|
||||
*/
|
||||
|
@ -1598,22 +1599,22 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
|
|||
/*
|
||||
ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
|
||||
|
||||
Returns the current offset in the file being read or written. This offset
|
||||
includes the count of bytes that precede the gzip stream, for example when
|
||||
appending or when using gzdopen() for reading. When reading, the offset
|
||||
does not include as yet unused buffered input. This information can be used
|
||||
for a progress indicator. On error, gzoffset() returns -1.
|
||||
Return the current compressed (actual) read or write offset of file. This
|
||||
offset includes the count of bytes that precede the gzip stream, for example
|
||||
when appending or when using gzdopen() for reading. When reading, the
|
||||
offset does not include as yet unused buffered input. This information can
|
||||
be used for a progress indicator. On error, gzoffset() returns -1.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzeof OF((gzFile file));
|
||||
/*
|
||||
Returns true (1) if the end-of-file indicator has been set while reading,
|
||||
false (0) otherwise. Note that the end-of-file indicator is set only if the
|
||||
read tried to go past the end of the input, but came up short. Therefore,
|
||||
just like feof(), gzeof() may return false even if there is no more data to
|
||||
read, in the event that the last read request was for the exact number of
|
||||
bytes remaining in the input file. This will happen if the input file size
|
||||
is an exact multiple of the buffer size.
|
||||
Return true (1) if the end-of-file indicator for file has been set while
|
||||
reading, false (0) otherwise. Note that the end-of-file indicator is set
|
||||
only if the read tried to go past the end of the input, but came up short.
|
||||
Therefore, just like feof(), gzeof() may return false even if there is no
|
||||
more data to read, in the event that the last read request was for the exact
|
||||
number of bytes remaining in the input file. This will happen if the input
|
||||
file size is an exact multiple of the buffer size.
|
||||
|
||||
If gzeof() returns true, then the read functions will return no more data,
|
||||
unless the end-of-file indicator is reset by gzclearerr() and the input file
|
||||
|
@ -1622,7 +1623,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file));
|
|||
|
||||
ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
|
||||
/*
|
||||
Returns true (1) if file is being copied directly while reading, or false
|
||||
Return true (1) if file is being copied directly while reading, or false
|
||||
(0) if file is a gzip stream being decompressed.
|
||||
|
||||
If the input file is empty, gzdirect() will return true, since the input
|
||||
|
@ -1643,8 +1644,8 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
|
|||
|
||||
ZEXTERN int ZEXPORT gzclose OF((gzFile file));
|
||||
/*
|
||||
Flushes all pending output if necessary, closes the compressed file and
|
||||
deallocates the (de)compression state. Note that once file is closed, you
|
||||
Flush all pending output for file, if necessary, close file and
|
||||
deallocate the (de)compression state. Note that once file is closed, you
|
||||
cannot call gzerror with file, since its structures have been deallocated.
|
||||
gzclose must not be called more than once on the same file, just as free
|
||||
must not be called more than once on the same allocation.
|
||||
|
@ -1668,10 +1669,10 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
|
|||
|
||||
ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
|
||||
/*
|
||||
Returns the error message for the last error which occurred on the given
|
||||
compressed file. errnum is set to zlib error number. If an error occurred
|
||||
in the file system and not in the compression library, errnum is set to
|
||||
Z_ERRNO and the application may consult errno to get the exact error code.
|
||||
Return the error message for the last error which occurred on file.
|
||||
errnum is set to zlib error number. If an error occurred in the file system
|
||||
and not in the compression library, errnum is set to Z_ERRNO and the
|
||||
application may consult errno to get the exact error code.
|
||||
|
||||
The application must not modify the returned string. Future calls to
|
||||
this function may invalidate the previously returned string. If file is
|
||||
|
@ -1684,7 +1685,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
|
|||
|
||||
ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
|
||||
/*
|
||||
Clears the error and end-of-file flags for file. This is analogous to the
|
||||
Clear the error and end-of-file flags for file. This is analogous to the
|
||||
clearerr() function in stdio. This is useful for continuing to read a gzip
|
||||
file that is being written concurrently.
|
||||
*/
|
||||
|
@ -1702,8 +1703,9 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
|
|||
ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
||||
/*
|
||||
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
|
||||
return the updated checksum. If buf is Z_NULL, this function returns the
|
||||
required initial value for the checksum.
|
||||
return the updated checksum. An Adler-32 value is in the range of a 32-bit
|
||||
unsigned integer. If buf is Z_NULL, this function returns the required
|
||||
initial value for the checksum.
|
||||
|
||||
An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
|
||||
much faster.
|
||||
|
@ -1736,12 +1738,13 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
|
|||
negative, the result has no meaning or utility.
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
||||
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
||||
/*
|
||||
Update a running CRC-32 with the bytes buf[0..len-1] and return the
|
||||
updated CRC-32. If buf is Z_NULL, this function returns the required
|
||||
initial value for the crc. Pre- and post-conditioning (one's complement) is
|
||||
performed within this function so it shouldn't be done by the application.
|
||||
updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
|
||||
If buf is Z_NULL, this function returns the required initial value for the
|
||||
crc. Pre- and post-conditioning (one's complement) is performed within this
|
||||
function so it shouldn't be done by the application.
|
||||
|
||||
Usage example:
|
||||
|
||||
|
@ -1755,7 +1758,7 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
|||
|
||||
#ifndef Z_FREETYPE
|
||||
|
||||
ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf,
|
||||
ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf,
|
||||
z_size_t len));
|
||||
/*
|
||||
Same as crc32(), but with a size_t length.
|
||||
|
@ -1771,6 +1774,20 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
|
|||
len2.
|
||||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2));
|
||||
|
||||
Return the operator corresponding to length len2, to be used with
|
||||
crc32_combine_op().
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
|
||||
/*
|
||||
Give the same result as crc32_combine(), using op in place of len2. op is
|
||||
is generated from len2 by crc32_combine_gen(). This will be faster than
|
||||
crc32_combine() if the generated op is used more than once.
|
||||
*/
|
||||
|
||||
|
||||
/* various hacks, don't look :) */
|
||||
|
||||
|
@ -1871,6 +1888,7 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|||
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
|
||||
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t));
|
||||
#endif
|
||||
|
||||
#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
|
||||
|
@ -1881,6 +1899,7 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|||
# define z_gzoffset z_gzoffset64
|
||||
# define z_adler32_combine z_adler32_combine64
|
||||
# define z_crc32_combine z_crc32_combine64
|
||||
# define z_crc32_combine_gen z_crc32_combine_gen64
|
||||
# else
|
||||
# define gzopen gzopen64
|
||||
# define gzseek gzseek64
|
||||
|
@ -1888,6 +1907,7 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|||
# define gzoffset gzoffset64
|
||||
# define adler32_combine adler32_combine64
|
||||
# define crc32_combine crc32_combine64
|
||||
# define crc32_combine_gen crc32_combine_gen64
|
||||
# endif
|
||||
# ifndef Z_LARGE64
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
|
@ -1896,6 +1916,7 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|||
ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
|
||||
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
|
||||
# endif
|
||||
#else
|
||||
ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
|
||||
|
@ -1904,6 +1925,7 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|||
ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
|
||||
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
|
||||
#endif
|
||||
|
||||
#else /* Z_SOLO */
|
||||
|
@ -1911,6 +1933,7 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|||
#ifndef Z_FREETYPE
|
||||
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
|
||||
#endif
|
||||
|
||||
#endif /* !Z_SOLO */
|
||||
|
@ -1925,7 +1948,7 @@ ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int));
|
|||
ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp));
|
||||
ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
|
||||
ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
|
||||
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO)
|
||||
#if defined(_WIN32) && !defined(Z_SOLO)
|
||||
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
||||
const char *mode));
|
||||
#endif
|
||||
|
|
|
@ -136,8 +136,8 @@ const char * ZEXPORT zError(
|
|||
return ERR_MSG(err);
|
||||
}
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
/* The Microsoft C Run-Time Library for Windows CE doesn't have
|
||||
#if defined(_WIN32_WCE) && _WIN32_WCE < 0x800
|
||||
/* The older Microsoft C Run-Time Library for Windows CE doesn't have
|
||||
* errno. We define it as a global variable to simplify porting.
|
||||
* Its value is always 0 and should not be used.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* zutil.h -- internal interface and configuration of the compression library
|
||||
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
||||
* Copyright (C) 1995-2022 Jean-loup Gailly, Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -29,12 +29,6 @@
|
|||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef Z_SOLO
|
||||
# ifndef Z_FREETYPE
|
||||
typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
# define local static
|
||||
#endif
|
||||
|
@ -48,6 +42,17 @@ typedef unsigned short ush;
|
|||
typedef ush FAR ushf;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (ULONG_MAX == 0xffffffffffffffff)
|
||||
# define Z_U8 unsigned long
|
||||
# elif (ULLONG_MAX == 0xffffffffffffffff)
|
||||
# define Z_U8 unsigned long long
|
||||
# elif (UINT_MAX == 0xffffffffffffffff)
|
||||
# define Z_U8 unsigned
|
||||
# endif
|
||||
#endif
|
||||
|
||||
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
/* (size given to avoid silly warnings with Visual C++) */
|
||||
|
||||
|
@ -172,10 +177,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
|
||||
# if defined(_WIN32_WCE)
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# ifndef _PTRDIFF_T_DEFINED
|
||||
typedef int ptrdiff_t;
|
||||
# define _PTRDIFF_T_DEFINED
|
||||
# endif
|
||||
# else
|
||||
# define fdopen(fd,type) _fdopen(fd,type)
|
||||
# endif
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
|
||||
pfrface->height = (FT_Short)( ( pfrface->units_per_EM * 12 ) / 10 );
|
||||
if ( pfrface->height < pfrface->ascender - pfrface->descender )
|
||||
pfrface->height = (FT_Short)(pfrface->ascender - pfrface->descender);
|
||||
pfrface->height = (FT_Short)( pfrface->ascender - pfrface->descender );
|
||||
|
||||
if ( phy_font->num_strikes > 0 )
|
||||
{
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
else
|
||||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
{
|
||||
CFF_Font cff = (CFF_Font)(face->extra.data);
|
||||
CFF_Font cff = (CFF_Font)( face->extra.data );
|
||||
|
||||
|
||||
bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );
|
||||
|
|
|
@ -535,11 +535,11 @@
|
|||
|
||||
if ( r & 1 )
|
||||
{
|
||||
*buffer = (FT_Byte)(*buffer + c);
|
||||
*buffer = (FT_Byte)( *buffer + c );
|
||||
buffer++;
|
||||
}
|
||||
else
|
||||
*buffer = (FT_Byte)(c << 4);
|
||||
*buffer = (FT_Byte)( c << 4 );
|
||||
|
||||
r++;
|
||||
}
|
||||
|
@ -572,8 +572,8 @@
|
|||
if ( p >= limit )
|
||||
return 0;
|
||||
|
||||
if ( n > (FT_UInt)(limit - p) )
|
||||
n = (FT_UInt)(limit - p);
|
||||
if ( n > (FT_UInt)( limit - p ) )
|
||||
n = (FT_UInt)( limit - p );
|
||||
|
||||
for ( r = 0; r < n; r++ )
|
||||
{
|
||||
|
|
|
@ -518,7 +518,7 @@
|
|||
|
||||
if ( *cur == '<' ) /* <...> */
|
||||
{
|
||||
if ( cur + 1 < limit && *(cur + 1) == '<' ) /* << */
|
||||
if ( cur + 1 < limit && *( cur + 1 ) == '<' ) /* << */
|
||||
{
|
||||
cur++;
|
||||
cur++;
|
||||
|
|
|
@ -2269,7 +2269,7 @@
|
|||
/* This is due to the fact that, in the vast majority of cases, */
|
||||
/* the span length in bytes is relatively small. */
|
||||
while ( --c2 > 0 )
|
||||
*(++target) = 0xFF;
|
||||
*( ++target ) = 0xFF;
|
||||
|
||||
target[1] |= f2;
|
||||
}
|
||||
|
|
|
@ -3014,7 +3014,7 @@
|
|||
diff = current_dist.distance - min_dist.distance;
|
||||
|
||||
|
||||
if ( FT_ABS(diff ) < CORNER_CHECK_EPSILON )
|
||||
if ( FT_ABS( diff ) < CORNER_CHECK_EPSILON )
|
||||
min_dist = resolve_corner( min_dist, current_dist );
|
||||
else if ( diff < 0 )
|
||||
min_dist = current_dist;
|
||||
|
|
|
@ -298,15 +298,9 @@
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
/* the rows and pitch must be valid after presetting the */
|
||||
/* bitmap using outline */
|
||||
/* nothing to render */
|
||||
if ( !bitmap->rows || !bitmap->pitch )
|
||||
{
|
||||
FT_ERROR(( "ft_sdf_render: failed to preset bitmap\n" ));
|
||||
|
||||
error = FT_THROW( Cannot_Render_Glyph );
|
||||
goto Exit;
|
||||
}
|
||||
return FT_Err_Ok;
|
||||
|
||||
/* the padding will simply be equal to the `spread' */
|
||||
x_pad = sdf_module->spread;
|
||||
|
@ -525,13 +519,9 @@
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
/* nothing to render */
|
||||
if ( !bitmap->rows || !bitmap->pitch )
|
||||
{
|
||||
FT_ERROR(( "ft_bsdf_render: invalid bitmap size\n" ));
|
||||
|
||||
error = FT_THROW( Invalid_Argument );
|
||||
goto Exit;
|
||||
}
|
||||
return FT_Err_Ok;
|
||||
|
||||
FT_Bitmap_New( &target );
|
||||
|
||||
|
|
|
@ -367,7 +367,7 @@
|
|||
}
|
||||
|
||||
/* transform transparency to alpha */
|
||||
if ( png_get_valid(png, info, PNG_INFO_tRNS ) )
|
||||
if ( png_get_valid( png, info, PNG_INFO_tRNS ) )
|
||||
png_set_tRNS_to_alpha( png );
|
||||
|
||||
if ( bitdepth == 16 )
|
||||
|
@ -387,7 +387,7 @@
|
|||
png_set_filler( png, 0xFF, PNG_FILLER_AFTER );
|
||||
|
||||
/* recheck header after setting EXPAND options */
|
||||
png_read_update_info(png, info );
|
||||
png_read_update_info( png, info );
|
||||
png_get_IHDR( png, info,
|
||||
&imgWidth, &imgHeight,
|
||||
&bitdepth, &color_type, &interlace,
|
||||
|
|
|
@ -1066,7 +1066,8 @@
|
|||
*/
|
||||
if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_CBLC ||
|
||||
face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX ||
|
||||
face->colr )
|
||||
face->colr ||
|
||||
face->svg )
|
||||
flags |= FT_FACE_FLAG_COLOR; /* color glyphs */
|
||||
|
||||
if ( has_outline == TRUE )
|
||||
|
|
|
@ -973,7 +973,7 @@
|
|||
/* composite glyph */
|
||||
FT_Bool have_instructions = FALSE;
|
||||
FT_UShort instruction_size = 0;
|
||||
FT_ULong composite_size;
|
||||
FT_ULong composite_size = 0;
|
||||
FT_ULong size_needed;
|
||||
FT_Byte* pointer = NULL;
|
||||
|
||||
|
@ -2104,7 +2104,7 @@
|
|||
error = FT_THROW( Invalid_Table );
|
||||
goto Exit;
|
||||
}
|
||||
file_offset = ROUND4(woff2.metaOffset + woff2.metaLength);
|
||||
file_offset = ROUND4( woff2.metaOffset + woff2.metaLength );
|
||||
}
|
||||
|
||||
if ( woff2.privOffset )
|
||||
|
@ -2114,7 +2114,7 @@
|
|||
error = FT_THROW( Invalid_Table );
|
||||
goto Exit;
|
||||
}
|
||||
file_offset = ROUND4(woff2.privOffset + woff2.privLength);
|
||||
file_offset = ROUND4( woff2.privOffset + woff2.privLength );
|
||||
}
|
||||
|
||||
if ( file_offset != ( ROUND4( woff2.length ) ) )
|
||||
|
|
|
@ -465,7 +465,7 @@
|
|||
if ( subheader )
|
||||
{
|
||||
FT_Byte* p = subheader;
|
||||
FT_UInt idx = (FT_UInt)(char_code & 0xFF);
|
||||
FT_UInt idx = (FT_UInt)( char_code & 0xFF );
|
||||
FT_UInt start, count;
|
||||
FT_Int delta;
|
||||
FT_UInt offset;
|
||||
|
|
|
@ -1104,8 +1104,8 @@
|
|||
|
||||
for ( ; vec < limit; vec++, u++ )
|
||||
{
|
||||
vec->x = ( FT_MulFix( u->x, x_scale ) + 32 ) >> 6;
|
||||
vec->y = ( FT_MulFix( u->y, y_scale ) + 32 ) >> 6;
|
||||
vec->x = ADD_LONG( FT_MulFix( u->x, x_scale ), 32 ) >> 6;
|
||||
vec->y = ADD_LONG( FT_MulFix( u->y, y_scale ), 32 ) >> 6;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1228,8 +1228,8 @@
|
|||
p1 = gloader->base.outline.points + k;
|
||||
p2 = gloader->base.outline.points + l;
|
||||
|
||||
x = p1->x - p2->x;
|
||||
y = p1->y - p2->y;
|
||||
x = SUB_LONG( p1->x, p2->x );
|
||||
y = SUB_LONG( p1->y, p2->y );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2255,7 +2255,7 @@
|
|||
if ( loader->widthp )
|
||||
glyph->metrics.horiAdvance = loader->widthp[glyph_index] * 64;
|
||||
else
|
||||
glyph->metrics.horiAdvance = SUB_LONG(loader->pp2.x, loader->pp1.x);
|
||||
glyph->metrics.horiAdvance = SUB_LONG( loader->pp2.x, loader->pp1.x );
|
||||
|
||||
/* set glyph dimensions */
|
||||
glyph->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin );
|
||||
|
|
|
@ -516,14 +516,6 @@
|
|||
exec->GS.round_state = 1;
|
||||
exec->GS.loop = 1;
|
||||
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
|
||||
exec->iup_called = FALSE;
|
||||
#endif
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
|
||||
exec->iupx_called = FALSE;
|
||||
exec->iupy_called = FALSE;
|
||||
#endif
|
||||
|
||||
/* some glyphs leave something on the stack. so we clean it */
|
||||
/* before a new execution. */
|
||||
exec->top = 0;
|
||||
|
@ -7847,6 +7839,15 @@
|
|||
Compute_Funcs( exc );
|
||||
Compute_Round( exc, (FT_Byte)exc->GS.round_state );
|
||||
|
||||
/* These flags cancel execution of some opcodes after IUP is called */
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
|
||||
exc->iup_called = FALSE;
|
||||
#endif
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
|
||||
exc->iupx_called = FALSE;
|
||||
exc->iupy_called = FALSE;
|
||||
#endif
|
||||
|
||||
do
|
||||
{
|
||||
exc->opcode = exc->code[exc->IP];
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
kp->index1 = FT_Get_Char_Index( t1_face, p[0] );
|
||||
kp->index2 = FT_Get_Char_Index( t1_face, p[1] );
|
||||
|
||||
kp->x = (FT_Int)FT_PEEK_SHORT_LE(p + 2);
|
||||
kp->x = (FT_Int)FT_PEEK_SHORT_LE( p + 2 );
|
||||
kp->y = 0;
|
||||
|
||||
kp++;
|
||||
|
|
|
@ -2057,9 +2057,9 @@
|
|||
name_table->elements[n][len] = '\0';
|
||||
|
||||
/* record index of /.notdef */
|
||||
if ( *cur == '.' &&
|
||||
if ( *cur == '.' &&
|
||||
ft_strcmp( ".notdef",
|
||||
(const char*)(name_table->elements[n]) ) == 0 )
|
||||
(const char*)( name_table->elements[n] ) ) == 0 )
|
||||
{
|
||||
notdef_index = n;
|
||||
notdef_found = 1;
|
||||
|
@ -2331,8 +2331,8 @@
|
|||
/* in valid Type 1 fonts we don't see `RD' or `-|' directly */
|
||||
/* since those tokens are handled by parse_subrs and */
|
||||
/* parse_charstrings */
|
||||
else if ( *cur == 'R' && cur + 6 < limit && *(cur + 1) == 'D' &&
|
||||
have_integer )
|
||||
else if ( *cur == 'R' && cur + 6 < limit && *( cur + 1 ) == 'D' &&
|
||||
have_integer )
|
||||
{
|
||||
FT_ULong s;
|
||||
FT_Byte* b;
|
||||
|
@ -2344,8 +2344,8 @@
|
|||
have_integer = 0;
|
||||
}
|
||||
|
||||
else if ( *cur == '-' && cur + 6 < limit && *(cur + 1) == '|' &&
|
||||
have_integer )
|
||||
else if ( *cur == '-' && cur + 6 < limit && *( cur + 1 ) == '|' &&
|
||||
have_integer )
|
||||
{
|
||||
FT_ULong s;
|
||||
FT_Byte* b;
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
t42_loader_done( &loader );
|
||||
if ( error )
|
||||
{
|
||||
FT_FREE(face->ttf_data);
|
||||
FT_FREE( face->ttf_data );
|
||||
face->ttf_size = 0;
|
||||
}
|
||||
return error;
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
#undef T1CODE
|
||||
#define T1CODE T1_FIELD_LOCATION_BBOX
|
||||
|
||||
T1_FIELD_BBOX("FontBBox", xMin, 0 )
|
||||
T1_FIELD_BBOX( "FontBBox", xMin, 0 )
|
||||
|
||||
T1_FIELD_CALLBACK( "FontMatrix", t42_parse_font_matrix, 0 )
|
||||
T1_FIELD_CALLBACK( "Encoding", t42_parse_encoding, 0 )
|
||||
|
@ -1008,9 +1008,9 @@
|
|||
name_table->elements[n][len] = '\0';
|
||||
|
||||
/* record index of /.notdef */
|
||||
if ( *cur == '.' &&
|
||||
if ( *cur == '.' &&
|
||||
ft_strcmp( ".notdef",
|
||||
(const char*)(name_table->elements[n]) ) == 0 )
|
||||
(const char*)( name_table->elements[n] ) ) == 0 )
|
||||
{
|
||||
notdef_index = n;
|
||||
notdef_found = 1;
|
||||
|
|
|
@ -489,7 +489,7 @@
|
|||
&dir_entry1 ) )
|
||||
goto Exit;
|
||||
|
||||
if ( !(dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ )
|
||||
if ( !( dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ )
|
||||
{
|
||||
error = FT_THROW( Invalid_File_Format );
|
||||
goto Exit;
|
||||
|
@ -513,7 +513,7 @@
|
|||
&dir_entry2 ) )
|
||||
goto Exit;
|
||||
|
||||
if ( !(dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ )
|
||||
if ( !( dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ )
|
||||
{
|
||||
error = FT_THROW( Invalid_File_Format );
|
||||
goto Exit;
|
||||
|
|
Loading…
Reference in New Issue