enhancing xma to use 2 less fields for allocated blocks
This commit is contained in:
parent
991baa7c93
commit
8b1dd90901
@ -165,8 +165,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/ar-lib \
|
|||||||
$(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \
|
$(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \
|
||||||
$(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \
|
$(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \
|
||||||
$(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing ac/ar-lib \
|
$(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing ac/ar-lib \
|
||||||
ac/compile ac/config.guess ac/config.sub ac/depcomp \
|
ac/compile ac/config.guess ac/config.sub ac/install-sh \
|
||||||
ac/install-sh ac/ltmain.sh ac/missing
|
ac/ltmain.sh ac/missing
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
distdir = $(PACKAGE)-$(VERSION)
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
top_distdir = $(distdir)
|
top_distdir = $(distdir)
|
||||||
@ -337,6 +337,7 @@ pdfdir = @pdfdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
|
runstatedir = @runstatedir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
|
128
moo/ac/config.guess
generated
vendored
128
moo/ac/config.guess
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2018-08-29'
|
timestamp='2018-02-24'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@ -84,6 +84,8 @@ if test $# != 0; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
trap 'exit 1' 1 2 15
|
||||||
|
|
||||||
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
||||||
# compiler to aid in system detection is discouraged as it requires
|
# compiler to aid in system detection is discouraged as it requires
|
||||||
# temporary files to be created and, as you can see below, it is a
|
# temporary files to be created and, as you can see below, it is a
|
||||||
@ -94,39 +96,34 @@ fi
|
|||||||
|
|
||||||
# Portable tmp directory creation inspired by the Autoconf team.
|
# Portable tmp directory creation inspired by the Autoconf team.
|
||||||
|
|
||||||
tmp=
|
set_cc_for_build='
|
||||||
# shellcheck disable=SC2172
|
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||||
trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
|
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||||
trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
|
: ${TMPDIR=/tmp} ;
|
||||||
|
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||||
set_cc_for_build() {
|
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||||
: "${TMPDIR=/tmp}"
|
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||||
# shellcheck disable=SC2039
|
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
dummy=$tmp/dummy ;
|
||||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
|
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
|
,,) echo "int x;" > "$dummy.c" ;
|
||||||
dummy=$tmp/dummy
|
for c in cc gcc c89 c99 ; do
|
||||||
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||||
,,) echo "int x;" > "$dummy.c"
|
CC_FOR_BUILD="$c"; break ;
|
||||||
for driver in cc gcc c89 c99 ; do
|
fi ;
|
||||||
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
done ;
|
||||||
CC_FOR_BUILD="$driver"
|
if test x"$CC_FOR_BUILD" = x ; then
|
||||||
break
|
CC_FOR_BUILD=no_compiler_found ;
|
||||||
fi
|
fi
|
||||||
done
|
;;
|
||||||
if test x"$CC_FOR_BUILD" = x ; then
|
,,*) CC_FOR_BUILD=$CC ;;
|
||||||
CC_FOR_BUILD=no_compiler_found
|
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||||
fi
|
esac ; set_cc_for_build= ;'
|
||||||
;;
|
|
||||||
,,*) CC_FOR_BUILD=$CC ;;
|
|
||||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||||
if test -f /.attbin/uname ; then
|
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||||
PATH=$PATH:/.attbin ; export PATH
|
PATH=$PATH:/.attbin ; export PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -141,7 +138,7 @@ Linux|GNU|GNU/*)
|
|||||||
# We could probably try harder.
|
# We could probably try harder.
|
||||||
LIBC=gnu
|
LIBC=gnu
|
||||||
|
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
cat <<-EOF > "$dummy.c"
|
cat <<-EOF > "$dummy.c"
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#if defined(__UCLIBC__)
|
#if defined(__UCLIBC__)
|
||||||
@ -202,7 +199,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|||||||
os=netbsdelf
|
os=netbsdelf
|
||||||
;;
|
;;
|
||||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep -q __ELF__
|
| grep -q __ELF__
|
||||||
then
|
then
|
||||||
@ -240,7 +237,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|||||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||||
# contains redundant information, the shorter form:
|
# contains redundant information, the shorter form:
|
||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||||
echo "$machine-${os}${release}${abi-}"
|
echo "$machine-${os}${release}${abi}"
|
||||||
exit ;;
|
exit ;;
|
||||||
*:Bitrig:*:*)
|
*:Bitrig:*:*)
|
||||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||||
@ -392,15 +389,20 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|||||||
echo i386-pc-auroraux"$UNAME_RELEASE"
|
echo i386-pc-auroraux"$UNAME_RELEASE"
|
||||||
exit ;;
|
exit ;;
|
||||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||||
UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
|
eval "$set_cc_for_build"
|
||||||
case `isainfo -b` in
|
SUN_ARCH=i386
|
||||||
32)
|
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||||
echo i386-pc-solaris2"$UNAME_REL"
|
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||||
;;
|
# This test works for both compilers.
|
||||||
64)
|
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||||
echo x86_64-pc-solaris2"$UNAME_REL"
|
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||||
;;
|
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||||
esac
|
grep IS_64BIT_ARCH >/dev/null
|
||||||
|
then
|
||||||
|
SUN_ARCH=x86_64
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
||||||
exit ;;
|
exit ;;
|
||||||
sun4*:SunOS:6*:*)
|
sun4*:SunOS:6*:*)
|
||||||
# According to config.sub, this is the proper way to canonicalize
|
# According to config.sub, this is the proper way to canonicalize
|
||||||
@ -480,7 +482,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|||||||
echo clipper-intergraph-clix"$UNAME_RELEASE"
|
echo clipper-intergraph-clix"$UNAME_RELEASE"
|
||||||
exit ;;
|
exit ;;
|
||||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <stdio.h> /* for printf() prototype */
|
#include <stdio.h> /* for printf() prototype */
|
||||||
@ -577,7 +579,7 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
*:AIX:2:3)
|
*:AIX:2:3)
|
||||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
#include <sys/systemcfg.h>
|
#include <sys/systemcfg.h>
|
||||||
|
|
||||||
@ -658,7 +660,7 @@ EOF
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if [ "$HP_ARCH" = "" ]; then
|
if [ "$HP_ARCH" = "" ]; then
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
|
|
||||||
#define _HPUX_SOURCE
|
#define _HPUX_SOURCE
|
||||||
@ -698,7 +700,7 @@ EOF
|
|||||||
esac
|
esac
|
||||||
if [ "$HP_ARCH" = hppa2.0w ]
|
if [ "$HP_ARCH" = hppa2.0w ]
|
||||||
then
|
then
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
|
|
||||||
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
|
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
|
||||||
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
|
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
|
||||||
@ -724,7 +726,7 @@ EOF
|
|||||||
echo ia64-hp-hpux"$HPUX_REV"
|
echo ia64-hp-hpux"$HPUX_REV"
|
||||||
exit ;;
|
exit ;;
|
||||||
3050*:HI-UX:*:*)
|
3050*:HI-UX:*:*)
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
int
|
int
|
||||||
@ -838,17 +840,6 @@ EOF
|
|||||||
*:BSD/OS:*:*)
|
*:BSD/OS:*:*)
|
||||||
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
|
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
|
||||||
exit ;;
|
exit ;;
|
||||||
arm:FreeBSD:*:*)
|
|
||||||
UNAME_PROCESSOR=`uname -p`
|
|
||||||
set_cc_for_build
|
|
||||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
||||||
| grep -q __ARM_PCS_VFP
|
|
||||||
then
|
|
||||||
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
|
|
||||||
else
|
|
||||||
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
|
|
||||||
fi
|
|
||||||
exit ;;
|
|
||||||
*:FreeBSD:*:*)
|
*:FreeBSD:*:*)
|
||||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||||
case "$UNAME_PROCESSOR" in
|
case "$UNAME_PROCESSOR" in
|
||||||
@ -903,8 +894,8 @@ EOF
|
|||||||
# other systems with GNU libc and userland
|
# other systems with GNU libc and userland
|
||||||
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
*:Minix:*:*)
|
i*86:Minix:*:*)
|
||||||
echo "$UNAME_MACHINE"-unknown-minix
|
echo "$UNAME_MACHINE"-pc-minix
|
||||||
exit ;;
|
exit ;;
|
||||||
aarch64:Linux:*:*)
|
aarch64:Linux:*:*)
|
||||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
@ -931,7 +922,7 @@ EOF
|
|||||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
arm*:Linux:*:*)
|
arm*:Linux:*:*)
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep -q __ARM_EABI__
|
| grep -q __ARM_EABI__
|
||||||
then
|
then
|
||||||
@ -980,7 +971,7 @@ EOF
|
|||||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
mips:Linux:*:* | mips64:Linux:*:*)
|
mips:Linux:*:* | mips64:Linux:*:*)
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
#undef CPU
|
#undef CPU
|
||||||
#undef ${UNAME_MACHINE}
|
#undef ${UNAME_MACHINE}
|
||||||
@ -1055,7 +1046,11 @@ EOF
|
|||||||
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
x86_64:Linux:*:*)
|
x86_64:Linux:*:*)
|
||||||
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
|
if objdump -f /bin/sh | grep -q elf32-x86-64; then
|
||||||
|
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
|
||||||
|
else
|
||||||
|
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
|
||||||
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
xtensa*:Linux:*:*)
|
xtensa*:Linux:*:*)
|
||||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
@ -1294,7 +1289,7 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
*:Darwin:*:*)
|
*:Darwin:*:*)
|
||||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||||
set_cc_for_build
|
eval "$set_cc_for_build"
|
||||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||||
UNAME_PROCESSOR=powerpc
|
UNAME_PROCESSOR=powerpc
|
||||||
fi
|
fi
|
||||||
@ -1367,7 +1362,6 @@ EOF
|
|||||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||||
# is converted to i386 for consistency with other x86
|
# is converted to i386 for consistency with other x86
|
||||||
# operating systems.
|
# operating systems.
|
||||||
# shellcheck disable=SC2154
|
|
||||||
if test "$cputype" = 386; then
|
if test "$cputype" = 386; then
|
||||||
UNAME_MACHINE=i386
|
UNAME_MACHINE=i386
|
||||||
else
|
else
|
||||||
@ -1479,7 +1473,7 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-functions 'time-stamp)
|
||||||
# time-stamp-start: "timestamp='"
|
# time-stamp-start: "timestamp='"
|
||||||
# time-stamp-format: "%:y-%02m-%02d"
|
# time-stamp-format: "%:y-%02m-%02d"
|
||||||
# time-stamp-end: "'"
|
# time-stamp-end: "'"
|
||||||
|
2639
moo/ac/config.sub
generated
vendored
2639
moo/ac/config.sub
generated
vendored
File diff suppressed because it is too large
Load Diff
246
moo/ac/ltmain.sh
generated
246
moo/ac/ltmain.sh
generated
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
PROGRAM=libtool
|
PROGRAM=libtool
|
||||||
PACKAGE=libtool
|
PACKAGE=libtool
|
||||||
VERSION=2.4.6
|
VERSION="2.4.6 Debian-2.4.6-9"
|
||||||
package_revision=2.4.6
|
package_revision=2.4.6
|
||||||
|
|
||||||
|
|
||||||
@ -1370,7 +1370,7 @@ func_lt_ver ()
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
# Set a version string for this script.
|
# Set a version string for this script.
|
||||||
scriptversion=2014-01-07.03; # UTC
|
scriptversion=2015-10-07.11; # UTC
|
||||||
|
|
||||||
# A portable, pluggable option parser for Bourne shell.
|
# A portable, pluggable option parser for Bourne shell.
|
||||||
# Written by Gary V. Vaughan, 2010
|
# Written by Gary V. Vaughan, 2010
|
||||||
@ -1530,6 +1530,8 @@ func_run_hooks ()
|
|||||||
{
|
{
|
||||||
$debug_cmd
|
$debug_cmd
|
||||||
|
|
||||||
|
_G_rc_run_hooks=false
|
||||||
|
|
||||||
case " $hookable_fns " in
|
case " $hookable_fns " in
|
||||||
*" $1 "*) ;;
|
*" $1 "*) ;;
|
||||||
*) func_fatal_error "'$1' does not support hook funcions.n" ;;
|
*) func_fatal_error "'$1' does not support hook funcions.n" ;;
|
||||||
@ -1538,16 +1540,16 @@ func_run_hooks ()
|
|||||||
eval _G_hook_fns=\$$1_hooks; shift
|
eval _G_hook_fns=\$$1_hooks; shift
|
||||||
|
|
||||||
for _G_hook in $_G_hook_fns; do
|
for _G_hook in $_G_hook_fns; do
|
||||||
eval $_G_hook '"$@"'
|
if eval $_G_hook '"$@"'; then
|
||||||
|
# store returned options list back into positional
|
||||||
# store returned options list back into positional
|
# parameters for next 'cmd' execution.
|
||||||
# parameters for next 'cmd' execution.
|
eval _G_hook_result=\$${_G_hook}_result
|
||||||
eval _G_hook_result=\$${_G_hook}_result
|
eval set dummy "$_G_hook_result"; shift
|
||||||
eval set dummy "$_G_hook_result"; shift
|
_G_rc_run_hooks=:
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
func_quote_for_eval ${1+"$@"}
|
$_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
|
||||||
func_run_hooks_result=$func_quote_for_eval_result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1557,10 +1559,16 @@ func_run_hooks ()
|
|||||||
## --------------- ##
|
## --------------- ##
|
||||||
|
|
||||||
# In order to add your own option parsing hooks, you must accept the
|
# In order to add your own option parsing hooks, you must accept the
|
||||||
# full positional parameter list in your hook function, remove any
|
# full positional parameter list in your hook function, you may remove/edit
|
||||||
# options that you action, and then pass back the remaining unprocessed
|
# any options that you action, and then pass back the remaining unprocessed
|
||||||
# options in '<hooked_function_name>_result', escaped suitably for
|
# options in '<hooked_function_name>_result', escaped suitably for
|
||||||
# 'eval'. Like this:
|
# 'eval'. In this case you also must return $EXIT_SUCCESS to let the
|
||||||
|
# hook's caller know that it should pay attention to
|
||||||
|
# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
|
||||||
|
# arguments are left untouched by the hook and therefore caller will ignore the
|
||||||
|
# result variable.
|
||||||
|
#
|
||||||
|
# Like this:
|
||||||
#
|
#
|
||||||
# my_options_prep ()
|
# my_options_prep ()
|
||||||
# {
|
# {
|
||||||
@ -1570,9 +1578,11 @@ func_run_hooks ()
|
|||||||
# usage_message=$usage_message'
|
# usage_message=$usage_message'
|
||||||
# -s, --silent don'\''t print informational messages
|
# -s, --silent don'\''t print informational messages
|
||||||
# '
|
# '
|
||||||
#
|
# # No change in '$@' (ignored completely by this hook). There is
|
||||||
# func_quote_for_eval ${1+"$@"}
|
# # no need to do the equivalent (but slower) action:
|
||||||
# my_options_prep_result=$func_quote_for_eval_result
|
# # func_quote_for_eval ${1+"$@"}
|
||||||
|
# # my_options_prep_result=$func_quote_for_eval_result
|
||||||
|
# false
|
||||||
# }
|
# }
|
||||||
# func_add_hook func_options_prep my_options_prep
|
# func_add_hook func_options_prep my_options_prep
|
||||||
#
|
#
|
||||||
@ -1581,25 +1591,37 @@ func_run_hooks ()
|
|||||||
# {
|
# {
|
||||||
# $debug_cmd
|
# $debug_cmd
|
||||||
#
|
#
|
||||||
|
# args_changed=false
|
||||||
|
#
|
||||||
# # Note that for efficiency, we parse as many options as we can
|
# # Note that for efficiency, we parse as many options as we can
|
||||||
# # recognise in a loop before passing the remainder back to the
|
# # recognise in a loop before passing the remainder back to the
|
||||||
# # caller on the first unrecognised argument we encounter.
|
# # caller on the first unrecognised argument we encounter.
|
||||||
# while test $# -gt 0; do
|
# while test $# -gt 0; do
|
||||||
# opt=$1; shift
|
# opt=$1; shift
|
||||||
# case $opt in
|
# case $opt in
|
||||||
# --silent|-s) opt_silent=: ;;
|
# --silent|-s) opt_silent=:
|
||||||
|
# args_changed=:
|
||||||
|
# ;;
|
||||||
# # Separate non-argument short options:
|
# # Separate non-argument short options:
|
||||||
# -s*) func_split_short_opt "$_G_opt"
|
# -s*) func_split_short_opt "$_G_opt"
|
||||||
# set dummy "$func_split_short_opt_name" \
|
# set dummy "$func_split_short_opt_name" \
|
||||||
# "-$func_split_short_opt_arg" ${1+"$@"}
|
# "-$func_split_short_opt_arg" ${1+"$@"}
|
||||||
# shift
|
# shift
|
||||||
|
# args_changed=:
|
||||||
# ;;
|
# ;;
|
||||||
# *) set dummy "$_G_opt" "$*"; shift; break ;;
|
# *) # Make sure the first unrecognised option "$_G_opt"
|
||||||
|
# # is added back to "$@", we could need that later
|
||||||
|
# # if $args_changed is true.
|
||||||
|
# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
|
||||||
# esac
|
# esac
|
||||||
# done
|
# done
|
||||||
#
|
#
|
||||||
# func_quote_for_eval ${1+"$@"}
|
# if $args_changed; then
|
||||||
# my_silent_option_result=$func_quote_for_eval_result
|
# func_quote_for_eval ${1+"$@"}
|
||||||
|
# my_silent_option_result=$func_quote_for_eval_result
|
||||||
|
# fi
|
||||||
|
#
|
||||||
|
# $args_changed
|
||||||
# }
|
# }
|
||||||
# func_add_hook func_parse_options my_silent_option
|
# func_add_hook func_parse_options my_silent_option
|
||||||
#
|
#
|
||||||
@ -1611,16 +1633,32 @@ func_run_hooks ()
|
|||||||
# $opt_silent && $opt_verbose && func_fatal_help "\
|
# $opt_silent && $opt_verbose && func_fatal_help "\
|
||||||
# '--silent' and '--verbose' options are mutually exclusive."
|
# '--silent' and '--verbose' options are mutually exclusive."
|
||||||
#
|
#
|
||||||
# func_quote_for_eval ${1+"$@"}
|
# false
|
||||||
# my_option_validation_result=$func_quote_for_eval_result
|
|
||||||
# }
|
# }
|
||||||
# func_add_hook func_validate_options my_option_validation
|
# func_add_hook func_validate_options my_option_validation
|
||||||
#
|
#
|
||||||
# You'll alse need to manually amend $usage_message to reflect the extra
|
# You'll also need to manually amend $usage_message to reflect the extra
|
||||||
# options you parse. It's preferable to append if you can, so that
|
# options you parse. It's preferable to append if you can, so that
|
||||||
# multiple option parsing hooks can be added safely.
|
# multiple option parsing hooks can be added safely.
|
||||||
|
|
||||||
|
|
||||||
|
# func_options_finish [ARG]...
|
||||||
|
# ----------------------------
|
||||||
|
# Finishing the option parse loop (call 'func_options' hooks ATM).
|
||||||
|
func_options_finish ()
|
||||||
|
{
|
||||||
|
$debug_cmd
|
||||||
|
|
||||||
|
_G_func_options_finish_exit=false
|
||||||
|
if func_run_hooks func_options ${1+"$@"}; then
|
||||||
|
func_options_finish_result=$func_run_hooks_result
|
||||||
|
_G_func_options_finish_exit=:
|
||||||
|
fi
|
||||||
|
|
||||||
|
$_G_func_options_finish_exit
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# func_options [ARG]...
|
# func_options [ARG]...
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# All the functions called inside func_options are hookable. See the
|
# All the functions called inside func_options are hookable. See the
|
||||||
@ -1630,17 +1668,28 @@ func_options ()
|
|||||||
{
|
{
|
||||||
$debug_cmd
|
$debug_cmd
|
||||||
|
|
||||||
func_options_prep ${1+"$@"}
|
_G_rc_options=false
|
||||||
eval func_parse_options \
|
|
||||||
${func_options_prep_result+"$func_options_prep_result"}
|
|
||||||
eval func_validate_options \
|
|
||||||
${func_parse_options_result+"$func_parse_options_result"}
|
|
||||||
|
|
||||||
eval func_run_hooks func_options \
|
for my_func in options_prep parse_options validate_options options_finish
|
||||||
${func_validate_options_result+"$func_validate_options_result"}
|
do
|
||||||
|
if eval func_$my_func '${1+"$@"}'; then
|
||||||
|
eval _G_res_var='$'"func_${my_func}_result"
|
||||||
|
eval set dummy "$_G_res_var" ; shift
|
||||||
|
_G_rc_options=:
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# save modified positional parameters for caller
|
# Save modified positional parameters for caller. As a top-level
|
||||||
func_options_result=$func_run_hooks_result
|
# options-parser function we always need to set the 'func_options_result'
|
||||||
|
# variable (regardless the $_G_rc_options value).
|
||||||
|
if $_G_rc_options; then
|
||||||
|
func_options_result=$_G_res_var
|
||||||
|
else
|
||||||
|
func_quote_for_eval ${1+"$@"}
|
||||||
|
func_options_result=$func_quote_for_eval_result
|
||||||
|
fi
|
||||||
|
|
||||||
|
$_G_rc_options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1649,9 +1698,9 @@ func_options ()
|
|||||||
# All initialisations required before starting the option parse loop.
|
# All initialisations required before starting the option parse loop.
|
||||||
# Note that when calling hook functions, we pass through the list of
|
# Note that when calling hook functions, we pass through the list of
|
||||||
# positional parameters. If a hook function modifies that list, and
|
# positional parameters. If a hook function modifies that list, and
|
||||||
# needs to propogate that back to rest of this script, then the complete
|
# needs to propagate that back to rest of this script, then the complete
|
||||||
# modified list must be put in 'func_run_hooks_result' before
|
# modified list must be put in 'func_run_hooks_result' before
|
||||||
# returning.
|
# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
|
||||||
func_hookable func_options_prep
|
func_hookable func_options_prep
|
||||||
func_options_prep ()
|
func_options_prep ()
|
||||||
{
|
{
|
||||||
@ -1661,10 +1710,14 @@ func_options_prep ()
|
|||||||
opt_verbose=false
|
opt_verbose=false
|
||||||
opt_warning_types=
|
opt_warning_types=
|
||||||
|
|
||||||
func_run_hooks func_options_prep ${1+"$@"}
|
_G_rc_options_prep=false
|
||||||
|
if func_run_hooks func_options_prep ${1+"$@"}; then
|
||||||
|
_G_rc_options_prep=:
|
||||||
|
# save modified positional parameters for caller
|
||||||
|
func_options_prep_result=$func_run_hooks_result
|
||||||
|
fi
|
||||||
|
|
||||||
# save modified positional parameters for caller
|
$_G_rc_options_prep
|
||||||
func_options_prep_result=$func_run_hooks_result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1678,18 +1731,20 @@ func_parse_options ()
|
|||||||
|
|
||||||
func_parse_options_result=
|
func_parse_options_result=
|
||||||
|
|
||||||
|
_G_rc_parse_options=false
|
||||||
# this just eases exit handling
|
# this just eases exit handling
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
# Defer to hook functions for initial option parsing, so they
|
# Defer to hook functions for initial option parsing, so they
|
||||||
# get priority in the event of reusing an option name.
|
# get priority in the event of reusing an option name.
|
||||||
func_run_hooks func_parse_options ${1+"$@"}
|
if func_run_hooks func_parse_options ${1+"$@"}; then
|
||||||
|
eval set dummy "$func_run_hooks_result"; shift
|
||||||
# Adjust func_parse_options positional parameters to match
|
_G_rc_parse_options=:
|
||||||
eval set dummy "$func_run_hooks_result"; shift
|
fi
|
||||||
|
|
||||||
# Break out of the loop if we already parsed every option.
|
# Break out of the loop if we already parsed every option.
|
||||||
test $# -gt 0 || break
|
test $# -gt 0 || break
|
||||||
|
|
||||||
|
_G_match_parse_options=:
|
||||||
_G_opt=$1
|
_G_opt=$1
|
||||||
shift
|
shift
|
||||||
case $_G_opt in
|
case $_G_opt in
|
||||||
@ -1704,7 +1759,10 @@ func_parse_options ()
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
--warnings|--warning|-W)
|
--warnings|--warning|-W)
|
||||||
test $# = 0 && func_missing_arg $_G_opt && break
|
if test $# = 0 && func_missing_arg $_G_opt; then
|
||||||
|
_G_rc_parse_options=:
|
||||||
|
break
|
||||||
|
fi
|
||||||
case " $warning_categories $1" in
|
case " $warning_categories $1" in
|
||||||
*" $1 "*)
|
*" $1 "*)
|
||||||
# trailing space prevents matching last $1 above
|
# trailing space prevents matching last $1 above
|
||||||
@ -1757,15 +1815,25 @@ func_parse_options ()
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--) break ;;
|
--) _G_rc_parse_options=: ; break ;;
|
||||||
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
|
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
|
||||||
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
|
*) set dummy "$_G_opt" ${1+"$@"}; shift
|
||||||
|
_G_match_parse_options=false
|
||||||
|
break
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
$_G_match_parse_options && _G_rc_parse_options=:
|
||||||
done
|
done
|
||||||
|
|
||||||
# save modified positional parameters for caller
|
|
||||||
func_quote_for_eval ${1+"$@"}
|
if $_G_rc_parse_options; then
|
||||||
func_parse_options_result=$func_quote_for_eval_result
|
# save modified positional parameters for caller
|
||||||
|
func_quote_for_eval ${1+"$@"}
|
||||||
|
func_parse_options_result=$func_quote_for_eval_result
|
||||||
|
fi
|
||||||
|
|
||||||
|
$_G_rc_parse_options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1778,16 +1846,21 @@ func_validate_options ()
|
|||||||
{
|
{
|
||||||
$debug_cmd
|
$debug_cmd
|
||||||
|
|
||||||
|
_G_rc_validate_options=false
|
||||||
|
|
||||||
# Display all warnings if -W was not given.
|
# Display all warnings if -W was not given.
|
||||||
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
|
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
|
||||||
|
|
||||||
func_run_hooks func_validate_options ${1+"$@"}
|
if func_run_hooks func_validate_options ${1+"$@"}; then
|
||||||
|
# save modified positional parameters for caller
|
||||||
|
func_validate_options_result=$func_run_hooks_result
|
||||||
|
_G_rc_validate_options=:
|
||||||
|
fi
|
||||||
|
|
||||||
# Bail if the options were screwed!
|
# Bail if the options were screwed!
|
||||||
$exit_cmd $EXIT_FAILURE
|
$exit_cmd $EXIT_FAILURE
|
||||||
|
|
||||||
# save modified positional parameters for caller
|
$_G_rc_validate_options
|
||||||
func_validate_options_result=$func_run_hooks_result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2068,12 +2141,12 @@ include the following information:
|
|||||||
compiler: $LTCC
|
compiler: $LTCC
|
||||||
compiler flags: $LTCFLAGS
|
compiler flags: $LTCFLAGS
|
||||||
linker: $LD (gnu? $with_gnu_ld)
|
linker: $LD (gnu? $with_gnu_ld)
|
||||||
version: $progname (GNU libtool) 2.4.6
|
version: $progname $scriptversion Debian-2.4.6-9
|
||||||
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
|
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
|
||||||
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
|
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
|
||||||
|
|
||||||
Report bugs to <bug-libtool@gnu.org>.
|
Report bugs to <bug-libtool@gnu.org>.
|
||||||
GNU libtool home page: <http://www.gnu.org/software/libtool/>.
|
GNU libtool home page: <http://www.gnu.org/s/libtool/>.
|
||||||
General help using GNU software: <http://www.gnu.org/gethelp/>."
|
General help using GNU software: <http://www.gnu.org/gethelp/>."
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
@ -2124,7 +2197,7 @@ fi
|
|||||||
# a configuration failure hint, and exit.
|
# a configuration failure hint, and exit.
|
||||||
func_fatal_configuration ()
|
func_fatal_configuration ()
|
||||||
{
|
{
|
||||||
func_fatal_error ${1+"$@"} \
|
func__fatal_error ${1+"$@"} \
|
||||||
"See the $PACKAGE documentation for more information." \
|
"See the $PACKAGE documentation for more information." \
|
||||||
"Fatal configuration error."
|
"Fatal configuration error."
|
||||||
}
|
}
|
||||||
@ -2270,6 +2343,8 @@ libtool_options_prep ()
|
|||||||
nonopt=
|
nonopt=
|
||||||
preserve_args=
|
preserve_args=
|
||||||
|
|
||||||
|
_G_rc_lt_options_prep=:
|
||||||
|
|
||||||
# Shorthand for --mode=foo, only valid as the first argument
|
# Shorthand for --mode=foo, only valid as the first argument
|
||||||
case $1 in
|
case $1 in
|
||||||
clean|clea|cle|cl)
|
clean|clea|cle|cl)
|
||||||
@ -2293,11 +2368,18 @@ libtool_options_prep ()
|
|||||||
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
|
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
|
||||||
shift; set dummy --mode uninstall ${1+"$@"}; shift
|
shift; set dummy --mode uninstall ${1+"$@"}; shift
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
_G_rc_lt_options_prep=false
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Pass back the list of options.
|
if $_G_rc_lt_options_prep; then
|
||||||
func_quote_for_eval ${1+"$@"}
|
# Pass back the list of options.
|
||||||
libtool_options_prep_result=$func_quote_for_eval_result
|
func_quote_for_eval ${1+"$@"}
|
||||||
|
libtool_options_prep_result=$func_quote_for_eval_result
|
||||||
|
fi
|
||||||
|
|
||||||
|
$_G_rc_lt_options_prep
|
||||||
}
|
}
|
||||||
func_add_hook func_options_prep libtool_options_prep
|
func_add_hook func_options_prep libtool_options_prep
|
||||||
|
|
||||||
@ -2309,9 +2391,12 @@ libtool_parse_options ()
|
|||||||
{
|
{
|
||||||
$debug_cmd
|
$debug_cmd
|
||||||
|
|
||||||
|
_G_rc_lt_parse_options=false
|
||||||
|
|
||||||
# Perform our own loop to consume as many options as possible in
|
# Perform our own loop to consume as many options as possible in
|
||||||
# each iteration.
|
# each iteration.
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
|
_G_match_lt_parse_options=:
|
||||||
_G_opt=$1
|
_G_opt=$1
|
||||||
shift
|
shift
|
||||||
case $_G_opt in
|
case $_G_opt in
|
||||||
@ -2386,15 +2471,22 @@ libtool_parse_options ()
|
|||||||
func_append preserve_args " $_G_opt"
|
func_append preserve_args " $_G_opt"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# An option not handled by this hook function:
|
# An option not handled by this hook function:
|
||||||
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
|
*) set dummy "$_G_opt" ${1+"$@"} ; shift
|
||||||
|
_G_match_lt_parse_options=false
|
||||||
|
break
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
$_G_match_lt_parse_options && _G_rc_lt_parse_options=:
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if $_G_rc_lt_parse_options; then
|
||||||
|
# save modified positional parameters for caller
|
||||||
|
func_quote_for_eval ${1+"$@"}
|
||||||
|
libtool_parse_options_result=$func_quote_for_eval_result
|
||||||
|
fi
|
||||||
|
|
||||||
# save modified positional parameters for caller
|
$_G_rc_lt_parse_options
|
||||||
func_quote_for_eval ${1+"$@"}
|
|
||||||
libtool_parse_options_result=$func_quote_for_eval_result
|
|
||||||
}
|
}
|
||||||
func_add_hook func_parse_options libtool_parse_options
|
func_add_hook func_parse_options libtool_parse_options
|
||||||
|
|
||||||
@ -7274,10 +7366,12 @@ func_mode_link ()
|
|||||||
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
|
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
|
||||||
# -specs=* GCC specs files
|
# -specs=* GCC specs files
|
||||||
# -stdlib=* select c++ std lib with clang
|
# -stdlib=* select c++ std lib with clang
|
||||||
|
# -fsanitize=* Clang/GCC memory and address sanitizer
|
||||||
|
# -fuse-ld=* Linker select flags for GCC
|
||||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
||||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
||||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
||||||
-specs=*)
|
-specs=*|-fsanitize=*|-fuse-ld=*)
|
||||||
func_quote_for_eval "$arg"
|
func_quote_for_eval "$arg"
|
||||||
arg=$func_quote_for_eval_result
|
arg=$func_quote_for_eval_result
|
||||||
func_append compile_command " $arg"
|
func_append compile_command " $arg"
|
||||||
@ -7570,7 +7664,10 @@ func_mode_link ()
|
|||||||
case $pass in
|
case $pass in
|
||||||
dlopen) libs=$dlfiles ;;
|
dlopen) libs=$dlfiles ;;
|
||||||
dlpreopen) libs=$dlprefiles ;;
|
dlpreopen) libs=$dlprefiles ;;
|
||||||
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
|
link)
|
||||||
|
libs="$deplibs %DEPLIBS%"
|
||||||
|
test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if test lib,dlpreopen = "$linkmode,$pass"; then
|
if test lib,dlpreopen = "$linkmode,$pass"; then
|
||||||
@ -7889,19 +7986,19 @@ func_mode_link ()
|
|||||||
# It is a libtool convenience library, so add in its objects.
|
# It is a libtool convenience library, so add in its objects.
|
||||||
func_append convenience " $ladir/$objdir/$old_library"
|
func_append convenience " $ladir/$objdir/$old_library"
|
||||||
func_append old_convenience " $ladir/$objdir/$old_library"
|
func_append old_convenience " $ladir/$objdir/$old_library"
|
||||||
|
tmp_libs=
|
||||||
|
for deplib in $dependency_libs; do
|
||||||
|
deplibs="$deplib $deplibs"
|
||||||
|
if $opt_preserve_dup_deps; then
|
||||||
|
case "$tmp_libs " in
|
||||||
|
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
func_append tmp_libs " $deplib"
|
||||||
|
done
|
||||||
elif test prog != "$linkmode" && test lib != "$linkmode"; then
|
elif test prog != "$linkmode" && test lib != "$linkmode"; then
|
||||||
func_fatal_error "'$lib' is not a convenience library"
|
func_fatal_error "'$lib' is not a convenience library"
|
||||||
fi
|
fi
|
||||||
tmp_libs=
|
|
||||||
for deplib in $dependency_libs; do
|
|
||||||
deplibs="$deplib $deplibs"
|
|
||||||
if $opt_preserve_dup_deps; then
|
|
||||||
case "$tmp_libs " in
|
|
||||||
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
func_append tmp_libs " $deplib"
|
|
||||||
done
|
|
||||||
continue
|
continue
|
||||||
fi # $pass = conv
|
fi # $pass = conv
|
||||||
|
|
||||||
@ -8825,6 +8922,9 @@ func_mode_link ()
|
|||||||
revision=$number_minor
|
revision=$number_minor
|
||||||
lt_irix_increment=no
|
lt_irix_increment=no
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
func_fatal_configuration "$modename: unknown library version type '$version_type'"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
|
148
moo/ac/test-driver
generated
Executable file
148
moo/ac/test-driver
generated
Executable file
@ -0,0 +1,148 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# test-driver - basic testsuite driver script.
|
||||||
|
|
||||||
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 2011-2018 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
# Make unconditional expansion of undefined variables an error. This
|
||||||
|
# helps a lot in preventing typo-related bugs.
|
||||||
|
set -u
|
||||||
|
|
||||||
|
usage_error ()
|
||||||
|
{
|
||||||
|
echo "$0: $*" >&2
|
||||||
|
print_usage >&2
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
print_usage ()
|
||||||
|
{
|
||||||
|
cat <<END
|
||||||
|
Usage:
|
||||||
|
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||||
|
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||||
|
[--enable-hard-errors={yes|no}] [--]
|
||||||
|
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||||
|
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||||
|
END
|
||||||
|
}
|
||||||
|
|
||||||
|
test_name= # Used for reporting.
|
||||||
|
log_file= # Where to save the output of the test script.
|
||||||
|
trs_file= # Where to save the metadata of the test run.
|
||||||
|
expect_failure=no
|
||||||
|
color_tests=no
|
||||||
|
enable_hard_errors=yes
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case $1 in
|
||||||
|
--help) print_usage; exit $?;;
|
||||||
|
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||||
|
--test-name) test_name=$2; shift;;
|
||||||
|
--log-file) log_file=$2; shift;;
|
||||||
|
--trs-file) trs_file=$2; shift;;
|
||||||
|
--color-tests) color_tests=$2; shift;;
|
||||||
|
--expect-failure) expect_failure=$2; shift;;
|
||||||
|
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||||
|
--) shift; break;;
|
||||||
|
-*) usage_error "invalid option: '$1'";;
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
missing_opts=
|
||||||
|
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||||
|
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||||
|
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||||
|
if test x"$missing_opts" != x; then
|
||||||
|
usage_error "the following mandatory options are missing:$missing_opts"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
usage_error "missing argument"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $color_tests = yes; then
|
||||||
|
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||||
|
red='[0;31m' # Red.
|
||||||
|
grn='[0;32m' # Green.
|
||||||
|
lgn='[1;32m' # Light green.
|
||||||
|
blu='[1;34m' # Blue.
|
||||||
|
mgn='[0;35m' # Magenta.
|
||||||
|
std='[m' # No color.
|
||||||
|
else
|
||||||
|
red= grn= lgn= blu= mgn= std=
|
||||||
|
fi
|
||||||
|
|
||||||
|
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||||
|
trap "st=129; $do_exit" 1
|
||||||
|
trap "st=130; $do_exit" 2
|
||||||
|
trap "st=141; $do_exit" 13
|
||||||
|
trap "st=143; $do_exit" 15
|
||||||
|
|
||||||
|
# Test script is run here.
|
||||||
|
"$@" >$log_file 2>&1
|
||||||
|
estatus=$?
|
||||||
|
|
||||||
|
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||||
|
tweaked_estatus=1
|
||||||
|
else
|
||||||
|
tweaked_estatus=$estatus
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $tweaked_estatus:$expect_failure in
|
||||||
|
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||||
|
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||||
|
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||||
|
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||||
|
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||||
|
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Report the test outcome and exit status in the logs, so that one can
|
||||||
|
# know whether the test passed or failed simply by looking at the '.log'
|
||||||
|
# file, without the need of also peaking into the corresponding '.trs'
|
||||||
|
# file (automake bug#11814).
|
||||||
|
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||||
|
|
||||||
|
# Report outcome to console.
|
||||||
|
echo "${col}${res}${std}: $test_name"
|
||||||
|
|
||||||
|
# Register the test result, and other relevant metadata.
|
||||||
|
echo ":test-result: $res" > $trs_file
|
||||||
|
echo ":global-test-result: $res" >> $trs_file
|
||||||
|
echo ":recheck: $recheck" >> $trs_file
|
||||||
|
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC0"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
@ -5,7 +5,8 @@ CPPFLAGS_ALL_COMMON = \
|
|||||||
-I$(abs_builddir)/../lib \
|
-I$(abs_builddir)/../lib \
|
||||||
-I$(abs_srcdir) \
|
-I$(abs_srcdir) \
|
||||||
-I$(abs_srcdir)/../lib \
|
-I$(abs_srcdir)/../lib \
|
||||||
-I$(includedir)
|
-I$(includedir) \
|
||||||
|
$(PTHREAD_CFLAGS)
|
||||||
|
|
||||||
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir)
|
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir)
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ bin_PROGRAMS = moo
|
|||||||
moo_SOURCES = main.c
|
moo_SOURCES = main.c
|
||||||
moo_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
moo_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
||||||
moo_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
moo_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
||||||
moo_LDADD = $(LIBADD_BIN_COMMON) -lmoox
|
moo_LDADD = $(LIBADD_BIN_COMMON) -lmoox $(PTHREAD_LIBS)
|
||||||
moo_DEPENDENCIES = ../lib/libmoox.la
|
moo_DEPENDENCIES = ../lib/libmoox.la
|
||||||
|
|
||||||
|
|
||||||
|
@ -321,6 +321,7 @@ pdfdir = @pdfdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
|
runstatedir = @runstatedir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
@ -335,7 +336,8 @@ CPPFLAGS_ALL_COMMON = \
|
|||||||
-I$(abs_builddir)/../lib \
|
-I$(abs_builddir)/../lib \
|
||||||
-I$(abs_srcdir) \
|
-I$(abs_srcdir) \
|
||||||
-I$(abs_srcdir)/../lib \
|
-I$(abs_srcdir)/../lib \
|
||||||
-I$(includedir)
|
-I$(includedir) \
|
||||||
|
$(PTHREAD_CFLAGS)
|
||||||
|
|
||||||
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir)
|
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir)
|
||||||
CPPFLAGS_BIN_COMMON = $(CPPFLAGS_ALL_COMMON)
|
CPPFLAGS_BIN_COMMON = $(CPPFLAGS_ALL_COMMON)
|
||||||
@ -348,7 +350,7 @@ LIBADD_BIN_COMMON = $(LIBM)
|
|||||||
moo_SOURCES = main.c
|
moo_SOURCES = main.c
|
||||||
moo_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
moo_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
||||||
moo_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
moo_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
||||||
moo_LDADD = $(LIBADD_BIN_COMMON) -lmoox
|
moo_LDADD = $(LIBADD_BIN_COMMON) -lmoox $(PTHREAD_LIBS)
|
||||||
moo_DEPENDENCIES = ../lib/libmoox.la
|
moo_DEPENDENCIES = ../lib/libmoox.la
|
||||||
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_SOURCES = gtk-main.c
|
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_SOURCES = gtk-main.c
|
||||||
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_CPPFLAGS = $(CPPFLAGS_ALL_COMMON) -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
|
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_CPPFLAGS = $(CPPFLAGS_ALL_COMMON) -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
|
||||||
|
59
moo/configure
vendored
59
moo/configure
vendored
@ -771,6 +771,7 @@ infodir
|
|||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
|
runstatedir
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
@ -868,6 +869,7 @@ datadir='${datarootdir}'
|
|||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
|
runstatedir='${localstatedir}/run'
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||||
@ -1120,6 +1122,15 @@ do
|
|||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
|
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||||
|
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||||
|
| --run | --ru | --r)
|
||||||
|
ac_prev=runstatedir ;;
|
||||||
|
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||||
|
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||||
|
| --run=* | --ru=* | --r=*)
|
||||||
|
runstatedir=$ac_optarg ;;
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
@ -1257,7 +1268,7 @@ fi
|
|||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir
|
libdir localedir mandir runstatedir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
@ -1410,6 +1421,7 @@ Fine tuning of the installation directories:
|
|||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
|
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
@ -6450,7 +6462,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
|||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd* | netbsdelf*-gnu)
|
||||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||||
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
|
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
|
||||||
else
|
else
|
||||||
@ -7313,11 +7325,8 @@ _LT_EOF
|
|||||||
test $ac_status = 0; }; then
|
test $ac_status = 0; }; then
|
||||||
# Now try to grab the symbols.
|
# Now try to grab the symbols.
|
||||||
nlist=conftest.nm
|
nlist=conftest.nm
|
||||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
|
$ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
|
||||||
(eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
|
if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
|
||||||
ac_status=$?
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
||||||
test $ac_status = 0; } && test -s "$nlist"; then
|
|
||||||
# Try sorting and uniquifying the output.
|
# Try sorting and uniquifying the output.
|
||||||
if sort "$nlist" | uniq > "$nlist"T; then
|
if sort "$nlist" | uniq > "$nlist"T; then
|
||||||
mv -f "$nlist"T "$nlist"
|
mv -f "$nlist"T "$nlist"
|
||||||
@ -10142,6 +10151,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
|
|||||||
openbsd* | bitrig*)
|
openbsd* | bitrig*)
|
||||||
with_gnu_ld=no
|
with_gnu_ld=no
|
||||||
;;
|
;;
|
||||||
|
linux* | k*bsd*-gnu | gnu*)
|
||||||
|
link_all_deplibs=no
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
ld_shlibs=yes
|
ld_shlibs=yes
|
||||||
@ -10396,7 +10408,7 @@ _LT_EOF
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd* | netbsdelf*-gnu)
|
||||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||||
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||||
wlarc=
|
wlarc=
|
||||||
@ -11066,6 +11078,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
|
|||||||
if test yes = "$lt_cv_irix_exported_symbol"; then
|
if test yes = "$lt_cv_irix_exported_symbol"; then
|
||||||
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
|
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
|
||||||
fi
|
fi
|
||||||
|
link_all_deplibs=no
|
||||||
else
|
else
|
||||||
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
|
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
|
||||||
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
|
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
|
||||||
@ -11087,7 +11100,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd* | netbsdelf*-gnu)
|
||||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
|
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
|
||||||
else
|
else
|
||||||
@ -12182,9 +12195,6 @@ fi
|
|||||||
# before this can be enabled.
|
# before this can be enabled.
|
||||||
hardcode_into_libs=yes
|
hardcode_into_libs=yes
|
||||||
|
|
||||||
# Add ABI-specific directories to the system library path.
|
|
||||||
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
|
||||||
|
|
||||||
# Ideally, we could use ldconfig to report *all* directores which are
|
# Ideally, we could use ldconfig to report *all* directores which are
|
||||||
# searched for libraries, however this is still not possible. Aside from not
|
# searched for libraries, however this is still not possible. Aside from not
|
||||||
# being certain /sbin/ldconfig is available, command
|
# being certain /sbin/ldconfig is available, command
|
||||||
@ -12193,7 +12203,7 @@ fi
|
|||||||
# appending ld.so.conf contents (and includes) to the search path.
|
# appending ld.so.conf contents (and includes) to the search path.
|
||||||
if test -f /etc/ld.so.conf; then
|
if test -f /etc/ld.so.conf; then
|
||||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||||
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||||
@ -12205,6 +12215,18 @@ fi
|
|||||||
dynamic_linker='GNU/Linux ld.so'
|
dynamic_linker='GNU/Linux ld.so'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
netbsdelf*-gnu)
|
||||||
|
version_type=linux
|
||||||
|
need_lib_prefix=no
|
||||||
|
need_version=no
|
||||||
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||||
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
shlibpath_overrides_runpath=no
|
||||||
|
hardcode_into_libs=yes
|
||||||
|
dynamic_linker='NetBSD ld.elf_so'
|
||||||
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd*)
|
||||||
version_type=sunos
|
version_type=sunos
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
@ -13249,7 +13271,7 @@ else
|
|||||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||||
since some C++ compilers masquerading as C compilers
|
since some C++ compilers masquerading as C compilers
|
||||||
incorrectly reject 9223372036854775807. */
|
incorrectly reject 9223372036854775807. */
|
||||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||||
&& LARGE_OFF_T % 2147483647 == 1)
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
? 1 : -1];
|
? 1 : -1];
|
||||||
@ -13295,7 +13317,7 @@ else
|
|||||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||||
since some C++ compilers masquerading as C compilers
|
since some C++ compilers masquerading as C compilers
|
||||||
incorrectly reject 9223372036854775807. */
|
incorrectly reject 9223372036854775807. */
|
||||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||||
&& LARGE_OFF_T % 2147483647 == 1)
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
? 1 : -1];
|
? 1 : -1];
|
||||||
@ -13319,7 +13341,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|||||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||||
since some C++ compilers masquerading as C compilers
|
since some C++ compilers masquerading as C compilers
|
||||||
incorrectly reject 9223372036854775807. */
|
incorrectly reject 9223372036854775807. */
|
||||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||||
&& LARGE_OFF_T % 2147483647 == 1)
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
? 1 : -1];
|
? 1 : -1];
|
||||||
@ -13364,7 +13386,7 @@ else
|
|||||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||||
since some C++ compilers masquerading as C compilers
|
since some C++ compilers masquerading as C compilers
|
||||||
incorrectly reject 9223372036854775807. */
|
incorrectly reject 9223372036854775807. */
|
||||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||||
&& LARGE_OFF_T % 2147483647 == 1)
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
? 1 : -1];
|
? 1 : -1];
|
||||||
@ -13388,7 +13410,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|||||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||||
since some C++ compilers masquerading as C compilers
|
since some C++ compilers masquerading as C compilers
|
||||||
incorrectly reject 9223372036854775807. */
|
incorrectly reject 9223372036854775807. */
|
||||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||||
&& LARGE_OFF_T % 2147483647 == 1)
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
? 1 : -1];
|
? 1 : -1];
|
||||||
@ -19960,7 +19982,6 @@ See \`config.log' for more details" "$LINENO" 5; }
|
|||||||
cat <<_LT_EOF >> "$cfgfile"
|
cat <<_LT_EOF >> "$cfgfile"
|
||||||
#! $SHELL
|
#! $SHELL
|
||||||
# Generated automatically by $as_me ($PACKAGE) $VERSION
|
# 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.
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||||
|
|
||||||
# Provide generalized library-building support services.
|
# Provide generalized library-building support services.
|
||||||
|
@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = nostdinc
|
|||||||
CPPFLAGS_ALL_COMMON = \
|
CPPFLAGS_ALL_COMMON = \
|
||||||
-I$(abs_builddir) \
|
-I$(abs_builddir) \
|
||||||
-I$(abs_srcdir) \
|
-I$(abs_srcdir) \
|
||||||
-I$(includedir)
|
-I$(includedir) $(PTHREAD_CFLAGS)
|
||||||
|
|
||||||
if ENABLE_STATIC_MODULE
|
if ENABLE_STATIC_MODULE
|
||||||
LDFLAGS_ALL_COMMON = -L$(abs_builddir)/../mod -L$(abs_builddir) -L$(libdir)
|
LDFLAGS_ALL_COMMON = -L$(abs_builddir)/../mod -L$(abs_builddir) -L$(libdir)
|
||||||
@ -93,7 +93,7 @@ libmoo_la_SOURCES = \
|
|||||||
xma.c
|
xma.c
|
||||||
libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
||||||
libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
||||||
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON)
|
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS)
|
||||||
libmoo_la_DEPENDENCIES =
|
libmoo_la_DEPENDENCIES =
|
||||||
|
|
||||||
if ENABLE_STATIC_MODULE
|
if ENABLE_STATIC_MODULE
|
||||||
|
@ -327,18 +327,6 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
|
|||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOO_PROJECT_AUTHOR = @MOO_PROJECT_AUTHOR@
|
MOO_PROJECT_AUTHOR = @MOO_PROJECT_AUTHOR@
|
||||||
MOO_PROJECT_URL = @MOO_PROJECT_URL@
|
MOO_PROJECT_URL = @MOO_PROJECT_URL@
|
||||||
MOO_SIZEOF_CHAR = @MOO_SIZEOF_CHAR@
|
|
||||||
MOO_SIZEOF_DOUBLE = @MOO_SIZEOF_DOUBLE@
|
|
||||||
MOO_SIZEOF_FLOAT = @MOO_SIZEOF_FLOAT@
|
|
||||||
MOO_SIZEOF_INT = @MOO_SIZEOF_INT@
|
|
||||||
MOO_SIZEOF_LONG = @MOO_SIZEOF_LONG@
|
|
||||||
MOO_SIZEOF_LONG_DOUBLE = @MOO_SIZEOF_LONG_DOUBLE@
|
|
||||||
MOO_SIZEOF_LONG_LONG = @MOO_SIZEOF_LONG_LONG@
|
|
||||||
MOO_SIZEOF_OFF64_T = @MOO_SIZEOF_OFF64_T@
|
|
||||||
MOO_SIZEOF_OFF_T = @MOO_SIZEOF_OFF_T@
|
|
||||||
MOO_SIZEOF_SHORT = @MOO_SIZEOF_SHORT@
|
|
||||||
MOO_SIZEOF_VOID_P = @MOO_SIZEOF_VOID_P@
|
|
||||||
MOO_SIZEOF_WCHAR_T = @MOO_SIZEOF_WCHAR_T@
|
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
NMEDIT = @NMEDIT@
|
NMEDIT = @NMEDIT@
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
@ -428,7 +416,7 @@ AUTOMAKE_OPTIONS = nostdinc
|
|||||||
CPPFLAGS_ALL_COMMON = \
|
CPPFLAGS_ALL_COMMON = \
|
||||||
-I$(abs_builddir) \
|
-I$(abs_builddir) \
|
||||||
-I$(abs_srcdir) \
|
-I$(abs_srcdir) \
|
||||||
-I$(includedir)
|
-I$(includedir) $(PTHREAD_CFLAGS)
|
||||||
|
|
||||||
@ENABLE_STATIC_MODULE_FALSE@LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
|
@ENABLE_STATIC_MODULE_FALSE@LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
|
||||||
@ENABLE_STATIC_MODULE_TRUE@LDFLAGS_ALL_COMMON = -L$(abs_builddir)/../mod -L$(abs_builddir) -L$(libdir)
|
@ENABLE_STATIC_MODULE_TRUE@LDFLAGS_ALL_COMMON = -L$(abs_builddir)/../mod -L$(abs_builddir) -L$(libdir)
|
||||||
@ -501,9 +489,9 @@ libmoo_la_SOURCES = \
|
|||||||
|
|
||||||
libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
||||||
libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
||||||
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_3) \
|
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) \
|
||||||
$(am__append_5) $(am__append_7) $(am__append_9) \
|
$(am__append_3) $(am__append_5) $(am__append_7) \
|
||||||
$(am__append_11) $(am__append_13)
|
$(am__append_9) $(am__append_11) $(am__append_13)
|
||||||
libmoo_la_DEPENDENCIES = $(am__append_4) $(am__append_6) \
|
libmoo_la_DEPENDENCIES = $(am__append_4) $(am__append_6) \
|
||||||
$(am__append_8) $(am__append_10) $(am__append_12) \
|
$(am__append_8) $(am__append_10) $(am__append_12) \
|
||||||
$(am__append_14)
|
$(am__append_14)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#define _MOO_FMT_H_
|
#define _MOO_FMT_H_
|
||||||
|
|
||||||
#include <moo-cmn.h>
|
#include <moo-cmn.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
* This file defines various formatting functions.
|
* This file defines various formatting functions.
|
||||||
|
@ -46,11 +46,11 @@
|
|||||||
*
|
*
|
||||||
* // create a new memory allocator obtaining a 100K byte zone
|
* // create a new memory allocator obtaining a 100K byte zone
|
||||||
* // with the default memory allocator
|
* // with the default memory allocator
|
||||||
* xma = moo_xma_open (MOO_NULL, 0, 100000L);
|
* xma = moo_xma_open(MOO_NULL, 0, 100000L);
|
||||||
*
|
*
|
||||||
* ptr1 = moo_xma_alloc (xma, 5000); // allocate a 5K block from the zone
|
* ptr1 = moo_xma_alloc(xma, 5000); // allocate a 5K block from the zone
|
||||||
* ptr2 = moo_xma_alloc (xma, 1000); // allocate a 1K block from the zone
|
* ptr2 = moo_xma_alloc(xma, 1000); // allocate a 1K block from the zone
|
||||||
* ptr1 = moo_xma_realloc (xma, ptr1, 6000); // resize the 5K block to 6K.
|
* ptr1 = moo_xma_realloc(xma, ptr1, 6000); // resize the 5K block to 6K.
|
||||||
*
|
*
|
||||||
* moo_xma_dump (xma, moo_fprintf, MOO_STDOUT); // dump memory blocks
|
* moo_xma_dump (xma, moo_fprintf, MOO_STDOUT); // dump memory blocks
|
||||||
*
|
*
|
||||||
@ -77,9 +77,10 @@
|
|||||||
typedef struct moo_xma_t moo_xma_t;
|
typedef struct moo_xma_t moo_xma_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The moo_xma_blk_t type defines a memory block allocated.
|
* The moo_xma_fblk_t type defines a memory block allocated.
|
||||||
*/
|
*/
|
||||||
typedef struct moo_xma_blk_t moo_xma_blk_t;
|
typedef struct moo_xma_fblk_t moo_xma_fblk_t;
|
||||||
|
typedef struct moo_xma_mblk_t moo_xma_mblk_t;
|
||||||
|
|
||||||
#define MOO_XMA_FIXED 32
|
#define MOO_XMA_FIXED 32
|
||||||
#define MOO_XMA_SIZE_BITS ((MOO_SIZEOF_OOW_T*8)-1)
|
#define MOO_XMA_SIZE_BITS ((MOO_SIZEOF_OOW_T*8)-1)
|
||||||
@ -88,11 +89,11 @@ struct moo_xma_t
|
|||||||
{
|
{
|
||||||
moo_mmgr_t* _mmgr;
|
moo_mmgr_t* _mmgr;
|
||||||
|
|
||||||
/** pointer to the first memory block */
|
moo_uint8_t* start; /* zone beginning */
|
||||||
moo_xma_blk_t* head;
|
moo_uint8_t* end; /* zone end */
|
||||||
|
|
||||||
/** pointer array to free memory blocks */
|
/** pointer array to free memory blocks */
|
||||||
moo_xma_blk_t* xfree[MOO_XMA_FIXED + MOO_XMA_SIZE_BITS + 1];
|
moo_xma_fblk_t* xfree[MOO_XMA_FIXED + MOO_XMA_SIZE_BITS + 1];
|
||||||
|
|
||||||
/** pre-computed value for fast xfree index calculation */
|
/** pre-computed value for fast xfree index calculation */
|
||||||
moo_oow_t bdec;
|
moo_oow_t bdec;
|
||||||
|
@ -41,6 +41,7 @@ void* moo_allocbytes (moo_t* moo, moo_oow_t size)
|
|||||||
#if defined(MOO_ENABLE_GC_MARK_SWEEP)
|
#if defined(MOO_ENABLE_GC_MARK_SWEEP)
|
||||||
if (MOO_UNLIKELY(moo->igniting))
|
if (MOO_UNLIKELY(moo->igniting))
|
||||||
{
|
{
|
||||||
|
//moo_xma_calloc(moo->gci.xma, MOO_SIZEOF(*gch) + size);
|
||||||
gch = (moo_gchdr_t*)moo_callocmem(moo, MOO_SIZEOF(*gch) + size);
|
gch = (moo_gchdr_t*)moo_callocmem(moo, MOO_SIZEOF(*gch) + size);
|
||||||
if (MOO_UNLIKELY(!gch)) return MOO_NULL;
|
if (MOO_UNLIKELY(!gch)) return MOO_NULL;
|
||||||
}
|
}
|
||||||
|
281
moo/lib/xma.c
281
moo/lib/xma.c
@ -30,11 +30,13 @@
|
|||||||
|
|
||||||
|
|
||||||
#define ALIGN MOO_SIZEOF(moo_oow_t) /* this must be a power of 2 */
|
#define ALIGN MOO_SIZEOF(moo_oow_t) /* this must be a power of 2 */
|
||||||
#define HDRSIZE MOO_SIZEOF(moo_xma_blk_t)
|
#define HDRSIZE MOO_SIZEOF(moo_xma_mblk_t)
|
||||||
#define MINBLKLEN (HDRSIZE + ALIGN)
|
/*#define MINBLKLEN (HDRSIZE + ALIGN + ALIGN)*/
|
||||||
|
#define MINBLKLEN MOO_SIZEOF(moo_xma_fblk_t) /* need space for the free links when the block is freeed */
|
||||||
|
#define MINCHUNKSIZE (ALIGN + ALIGN) /* as large as the free links in moo_xma_fblk_t */
|
||||||
|
|
||||||
#define SYS_TO_USR(_) (((moo_xma_blk_t*)_) + 1)
|
#define SYS_TO_USR(_) (((moo_xma_mblk_t*)_) + 1)
|
||||||
#define USR_TO_SYS(_) (((moo_xma_blk_t*)_) - 1)
|
#define USR_TO_SYS(_) (((moo_xma_mblk_t*)_) - 1)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* the xfree array is divided into three region
|
* the xfree array is divided into three region
|
||||||
@ -44,22 +46,29 @@
|
|||||||
#define FIXED MOO_XMA_FIXED
|
#define FIXED MOO_XMA_FIXED
|
||||||
#define XFIMAX(xma) (MOO_COUNTOF(xma->xfree)-1)
|
#define XFIMAX(xma) (MOO_COUNTOF(xma->xfree)-1)
|
||||||
|
|
||||||
struct moo_xma_blk_t
|
|
||||||
|
#define next_mblk(b) ((moo_xma_mblk_t*)((moo_uint8_t*)((moo_xma_mblk_t*)(b) + 1) + ((moo_xma_mblk_t*)(b))->size))
|
||||||
|
#define prev_mblk(b) ((moo_xma_mblk_t*)((moo_uint8_t*)b - ((moo_xma_mblk_t*)(b))->prev_size) - HDRSIZE)
|
||||||
|
|
||||||
|
|
||||||
|
struct moo_xma_mblk_t
|
||||||
{
|
{
|
||||||
|
moo_oow_t prev_size;
|
||||||
|
moo_oow_t avail: 1;
|
||||||
|
moo_oow_t size: MOO_XMA_SIZE_BITS;/**< block size */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct moo_xma_fblk_t
|
||||||
|
{
|
||||||
|
moo_oow_t prev_size;
|
||||||
moo_oow_t avail: 1;
|
moo_oow_t avail: 1;
|
||||||
moo_oow_t size: MOO_XMA_SIZE_BITS;/**< block size */
|
moo_oow_t size: MOO_XMA_SIZE_BITS;/**< block size */
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* prev; /**< link to the previous free block */
|
moo_xma_fblk_t* prev; /**< link to the previous free block */
|
||||||
moo_xma_blk_t* next; /**< link to the next free block */
|
moo_xma_fblk_t* next; /**< link to the next free block */
|
||||||
} f;
|
} f;
|
||||||
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
moo_xma_blk_t* prev; /**< link to the previous adjacent block */
|
|
||||||
moo_xma_blk_t* next; /**< link to the next adjacent block */
|
|
||||||
} b;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static MOO_INLINE moo_oow_t szlog2 (moo_oow_t n)
|
static MOO_INLINE moo_oow_t szlog2 (moo_oow_t n)
|
||||||
@ -120,10 +129,10 @@ moo_xma_t* moo_xma_open (moo_mmgr_t* mmgr, moo_oow_t xtnsize, moo_oow_t zonesize
|
|||||||
{
|
{
|
||||||
moo_xma_t* xma;
|
moo_xma_t* xma;
|
||||||
|
|
||||||
xma = (moo_xma_t*) MOO_MMGR_ALLOC (mmgr, MOO_SIZEOF(*xma) + xtnsize);
|
xma = (moo_xma_t*)MOO_MMGR_ALLOC(mmgr, MOO_SIZEOF(*xma) + xtnsize);
|
||||||
if (xma == MOO_NULL) return MOO_NULL;
|
if (MOO_UNLIKELY(!xma)) return MOO_NULL;
|
||||||
|
|
||||||
if (moo_xma_init (xma, mmgr, zonesize) <= -1)
|
if (moo_xma_init(xma, mmgr, zonesize) <= -1)
|
||||||
{
|
{
|
||||||
MOO_MMGR_FREE (mmgr, xma);
|
MOO_MMGR_FREE (mmgr, xma);
|
||||||
return MOO_NULL;
|
return MOO_NULL;
|
||||||
@ -141,7 +150,7 @@ void moo_xma_close (moo_xma_t* xma)
|
|||||||
|
|
||||||
int moo_xma_init (moo_xma_t* xma, moo_mmgr_t* mmgr, moo_oow_t zonesize)
|
int moo_xma_init (moo_xma_t* xma, moo_mmgr_t* mmgr, moo_oow_t zonesize)
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* free;
|
moo_xma_fblk_t* free;
|
||||||
moo_oow_t xfi;
|
moo_oow_t xfi;
|
||||||
|
|
||||||
/* round 'zonesize' to be the multiples of ALIGN */
|
/* round 'zonesize' to be the multiples of ALIGN */
|
||||||
@ -152,15 +161,14 @@ int moo_xma_init (moo_xma_t* xma, moo_mmgr_t* mmgr, moo_oow_t zonesize)
|
|||||||
|
|
||||||
/* allocate a memory chunk to use for actual memory allocation */
|
/* allocate a memory chunk to use for actual memory allocation */
|
||||||
free = MOO_MMGR_ALLOC(mmgr, zonesize);
|
free = MOO_MMGR_ALLOC(mmgr, zonesize);
|
||||||
if (free == MOO_NULL) return -1;
|
if (MOO_UNLIKELY(!free)) return -1;
|
||||||
|
|
||||||
/* initialize the header part of the free chunk */
|
/* initialize the header part of the free chunk. the entire zone is a single free block */
|
||||||
|
free->prev_size = 0;
|
||||||
free->avail = 1;
|
free->avail = 1;
|
||||||
free->size = zonesize - HDRSIZE; /* size excluding the block header */
|
free->size = zonesize - HDRSIZE; /* size excluding the block header */
|
||||||
free->f.prev = MOO_NULL;
|
free->f.prev = MOO_NULL;
|
||||||
free->f.next = MOO_NULL;
|
free->f.next = MOO_NULL;
|
||||||
free->b.next = MOO_NULL;
|
|
||||||
free->b.prev = MOO_NULL;
|
|
||||||
|
|
||||||
MOO_MEMSET (xma, 0, MOO_SIZEOF(*xma));
|
MOO_MEMSET (xma, 0, MOO_SIZEOF(*xma));
|
||||||
xma->_mmgr = mmgr;
|
xma->_mmgr = mmgr;
|
||||||
@ -173,7 +181,9 @@ int moo_xma_init (moo_xma_t* xma, moo_mmgr_t* mmgr, moo_oow_t zonesize)
|
|||||||
/* locate it into an apporopriate slot */
|
/* locate it into an apporopriate slot */
|
||||||
xma->xfree[xfi] = free;
|
xma->xfree[xfi] = free;
|
||||||
/* let it be the head, which is natural with only a block */
|
/* let it be the head, which is natural with only a block */
|
||||||
xma->head = free;
|
xma->start = (moo_uint8_t*)free;
|
||||||
|
xma->end = xma->start + zonesize;
|
||||||
|
|
||||||
|
|
||||||
/* initialize some statistical variables */
|
/* initialize some statistical variables */
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
@ -191,10 +201,12 @@ void moo_xma_fini (moo_xma_t* xma)
|
|||||||
{
|
{
|
||||||
/* the head must point to the free chunk allocated in init().
|
/* the head must point to the free chunk allocated in init().
|
||||||
* let's deallocate it */
|
* let's deallocate it */
|
||||||
MOO_MMGR_FREE (xma->_mmgr, xma->head);
|
MOO_MMGR_FREE (xma->_mmgr, xma->start);
|
||||||
|
xma->start = MOO_NULL;
|
||||||
|
xma->end = MOO_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static MOO_INLINE void attach_to_freelist (moo_xma_t* xma, moo_xma_blk_t* b)
|
static MOO_INLINE void attach_to_freelist (moo_xma_t* xma, moo_xma_fblk_t* b)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* attach a block to a free list
|
* attach a block to a free list
|
||||||
@ -210,12 +222,12 @@ static MOO_INLINE void attach_to_freelist (moo_xma_t* xma, moo_xma_blk_t* b)
|
|||||||
xma->xfree[xfi] = b;
|
xma->xfree[xfi] = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
static MOO_INLINE void detach_from_freelist (moo_xma_t* xma, moo_xma_blk_t* b)
|
static MOO_INLINE void detach_from_freelist (moo_xma_t* xma, moo_xma_fblk_t* b)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* detach a block from a free list
|
* detach a block from a free list
|
||||||
*/
|
*/
|
||||||
moo_xma_blk_t* p, * n;
|
moo_xma_fblk_t* p, * n;
|
||||||
|
|
||||||
/* alias the previous and the next with short variable names */
|
/* alias the previous and the next with short variable names */
|
||||||
p = b->f.prev;
|
p = b->f.prev;
|
||||||
@ -243,10 +255,9 @@ static MOO_INLINE void detach_from_freelist (moo_xma_t* xma, moo_xma_blk_t* b)
|
|||||||
if (n) n->f.prev = p;
|
if (n) n->f.prev = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static moo_xma_blk_t* alloc_from_freelist (
|
static moo_xma_fblk_t* alloc_from_freelist (moo_xma_t* xma, moo_oow_t xfi, moo_oow_t size)
|
||||||
moo_xma_t* xma, moo_oow_t xfi, moo_oow_t size)
|
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* free;
|
moo_xma_fblk_t* free;
|
||||||
|
|
||||||
for (free = xma->xfree[xfi]; free; free = free->f.next)
|
for (free = xma->xfree[xfi]; free; free = free->f.next)
|
||||||
{
|
{
|
||||||
@ -259,7 +270,7 @@ static moo_xma_blk_t* alloc_from_freelist (
|
|||||||
rem = free->size - size;
|
rem = free->size - size;
|
||||||
if (rem >= MINBLKLEN)
|
if (rem >= MINBLKLEN)
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* tmp;
|
moo_xma_fblk_t* tmp;
|
||||||
|
|
||||||
/* the remaining part is large enough to hold
|
/* the remaining part is large enough to hold
|
||||||
* another block. let's split it
|
* another block. let's split it
|
||||||
@ -269,17 +280,12 @@ static moo_xma_blk_t* alloc_from_freelist (
|
|||||||
free->size = size;
|
free->size = size;
|
||||||
|
|
||||||
/* let 'tmp' point to the remaining part */
|
/* let 'tmp' point to the remaining part */
|
||||||
tmp = (moo_xma_blk_t*)(((moo_uint8_t*)(free + 1)) + size);
|
tmp = (moo_xma_fblk_t*)next_mblk(free); /* get the next adjacent block */
|
||||||
|
|
||||||
/* initialize some fields */
|
/* initialize some fields */
|
||||||
tmp->avail = 1;
|
tmp->avail = 1;
|
||||||
tmp->size = rem - HDRSIZE;
|
tmp->size = rem - HDRSIZE;
|
||||||
|
tmp->prev_size = free->size;
|
||||||
/* link 'tmp' to the block list */
|
|
||||||
tmp->b.next = free->b.next;
|
|
||||||
tmp->b.prev = free;
|
|
||||||
if (free->b.next) free->b.next->b.prev = tmp;
|
|
||||||
free->b.next = tmp;
|
|
||||||
|
|
||||||
/* add the remaining part to the free list */
|
/* add the remaining part to the free list */
|
||||||
attach_to_freelist (xma, tmp);
|
attach_to_freelist (xma, tmp);
|
||||||
@ -317,12 +323,13 @@ static moo_xma_blk_t* alloc_from_freelist (
|
|||||||
|
|
||||||
void* moo_xma_alloc (moo_xma_t* xma, moo_oow_t size)
|
void* moo_xma_alloc (moo_xma_t* xma, moo_oow_t size)
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* free;
|
moo_xma_fblk_t* free;
|
||||||
moo_oow_t xfi;
|
moo_oow_t xfi;
|
||||||
|
|
||||||
if (size <= 0) size = 1;
|
if (size <= 0) size = 1;
|
||||||
|
|
||||||
/* round up 'size' to the multiples of ALIGN */
|
/* round up 'size' to the multiples of ALIGN */
|
||||||
|
if (size < MINCHUNKSIZE) size = MINCHUNKSIZE;
|
||||||
size = MOO_ALIGN_POW2(size, ALIGN);
|
size = MOO_ALIGN_POW2(size, ALIGN);
|
||||||
|
|
||||||
assert (size >= ALIGN);
|
assert (size >= ALIGN);
|
||||||
@ -350,37 +357,37 @@ void* moo_xma_alloc (moo_xma_t* xma, moo_oow_t size)
|
|||||||
else if (xfi == XFIMAX(xma))
|
else if (xfi == XFIMAX(xma))
|
||||||
{
|
{
|
||||||
/* huge block */
|
/* huge block */
|
||||||
free = alloc_from_freelist (xma, XFIMAX(xma), size);
|
free = alloc_from_freelist(xma, XFIMAX(xma), size);
|
||||||
if (free == MOO_NULL) return MOO_NULL;
|
if (!free) return MOO_NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (xfi >= FIXED)
|
if (xfi >= FIXED)
|
||||||
{
|
{
|
||||||
/* get the block from its own large chain */
|
/* get the block from its own large chain */
|
||||||
free = alloc_from_freelist (xma, xfi, size);
|
free = alloc_from_freelist(xma, xfi, size);
|
||||||
if (free == MOO_NULL)
|
if (!free)
|
||||||
{
|
{
|
||||||
/* borrow a large block from the huge block chain */
|
/* borrow a large block from the huge block chain */
|
||||||
free = alloc_from_freelist (xma, XFIMAX(xma), size);
|
free = alloc_from_freelist(xma, XFIMAX(xma), size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* borrow a small block from the huge block chain */
|
/* borrow a small block from the huge block chain */
|
||||||
free = alloc_from_freelist (xma, XFIMAX(xma), size);
|
free = alloc_from_freelist(xma, XFIMAX(xma), size);
|
||||||
if (free == MOO_NULL) xfi = FIXED - 1;
|
if (!free) xfi = FIXED - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (free == MOO_NULL)
|
if (!free)
|
||||||
{
|
{
|
||||||
/* try each large block chain left */
|
/* try each large block chain left */
|
||||||
for (++xfi; xfi < XFIMAX(xma) - 1; xfi++)
|
for (++xfi; xfi < XFIMAX(xma) - 1; xfi++)
|
||||||
{
|
{
|
||||||
free = alloc_from_freelist (xma, xfi, size);
|
free = alloc_from_freelist(xma, xfi, size);
|
||||||
if (free) break;
|
if (free) break;
|
||||||
}
|
}
|
||||||
if (free == MOO_NULL) return MOO_NULL;
|
if (!free) return MOO_NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -389,29 +396,27 @@ void* moo_xma_alloc (moo_xma_t* xma, moo_oow_t size)
|
|||||||
|
|
||||||
static void* _realloc_merge (moo_xma_t* xma, void* b, moo_oow_t size)
|
static void* _realloc_merge (moo_xma_t* xma, void* b, moo_oow_t size)
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* blk = USR_TO_SYS(b);
|
moo_xma_mblk_t* blk = USR_TO_SYS(b);
|
||||||
|
|
||||||
/* rounds up 'size' to be multiples of ALIGN */
|
/* rounds up 'size' to be multiples of ALIGN */
|
||||||
size = MOO_ALIGN_POW2 (size, ALIGN);
|
if (size < MINCHUNKSIZE) size = MINCHUNKSIZE;
|
||||||
|
size = MOO_ALIGN_POW2(size, ALIGN);
|
||||||
|
|
||||||
if (size > blk->size)
|
if (size > blk->size)
|
||||||
{
|
{
|
||||||
/*
|
/* grow the current block */
|
||||||
* grow the current block
|
|
||||||
*/
|
|
||||||
moo_oow_t req;
|
moo_oow_t req;
|
||||||
moo_xma_blk_t* n;
|
moo_xma_mblk_t* n;
|
||||||
moo_oow_t rem;
|
moo_oow_t rem;
|
||||||
|
|
||||||
req = size - blk->size;
|
req = size - blk->size;
|
||||||
|
|
||||||
n = blk->b.next;
|
n = next_mblk(blk);
|
||||||
|
|
||||||
/* check if the next adjacent block is available */
|
/* check if the next adjacent block is available */
|
||||||
if (!n || !n->avail || req > n->size) return MOO_NULL; /* no! */
|
if ((moo_uint8_t*)n >= xma->end || !n->avail || req > n->size) return MOO_NULL; /* no! */
|
||||||
|
|
||||||
/* let's merge the current block with the next block */
|
/* let's merge the current block with the next block */
|
||||||
detach_from_freelist (xma, n);
|
detach_from_freelist (xma, (moo_xma_fblk_t*)n);
|
||||||
|
|
||||||
rem = (HDRSIZE + n->size) - req;
|
rem = (HDRSIZE + n->size) - req;
|
||||||
if (rem >= MINBLKLEN)
|
if (rem >= MINBLKLEN)
|
||||||
@ -421,25 +426,19 @@ static void* _realloc_merge (moo_xma_t* xma, void* b, moo_oow_t size)
|
|||||||
* to hold a block. break the next block.
|
* to hold a block. break the next block.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
moo_xma_blk_t* tmp;
|
moo_xma_fblk_t* tmp;
|
||||||
|
|
||||||
/* store n->b.next in case 'tmp' begins somewhere
|
tmp = (moo_xma_fblk_t*)(((moo_uint8_t*)n) + req);
|
||||||
* in the header part of n */
|
|
||||||
moo_xma_blk_t* nn = n->b.next;
|
|
||||||
|
|
||||||
tmp = (moo_xma_blk_t*)(((moo_uint8_t*)n) + req);
|
|
||||||
|
|
||||||
tmp->avail = 1;
|
|
||||||
tmp->size = rem - HDRSIZE;
|
|
||||||
attach_to_freelist (xma, tmp);
|
|
||||||
|
|
||||||
blk->size += req;
|
blk->size += req;
|
||||||
|
|
||||||
tmp->b.next = nn;
|
tmp->avail = 1;
|
||||||
if (nn) nn->b.prev = tmp;
|
tmp->size = rem - HDRSIZE;
|
||||||
|
tmp->prev_size = blk->size;
|
||||||
|
attach_to_freelist (xma, tmp);
|
||||||
|
|
||||||
blk->b.next = tmp;
|
n = next_mblk(tmp);
|
||||||
tmp->b.prev = blk;
|
if ((moo_uint8_t*)n < xma->end) n->prev_size = tmp->size;
|
||||||
|
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
xma->stat.alloc += req;
|
xma->stat.alloc += req;
|
||||||
@ -451,8 +450,9 @@ static void* _realloc_merge (moo_xma_t* xma, void* b, moo_oow_t size)
|
|||||||
/* the remaining part of the next block is negligible.
|
/* the remaining part of the next block is negligible.
|
||||||
* utilize the whole block by merging to the resizing block */
|
* utilize the whole block by merging to the resizing block */
|
||||||
blk->size += HDRSIZE + n->size;
|
blk->size += HDRSIZE + n->size;
|
||||||
blk->b.next = n->b.next;
|
|
||||||
if (n->b.next) n->b.next->b.prev = blk;
|
n = next_mblk(blk);
|
||||||
|
if ((moo_uint8_t*)n < xma->end) n->prev_size = blk->size;
|
||||||
|
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
xma->stat.nfree--;
|
xma->stat.nfree--;
|
||||||
@ -463,34 +463,33 @@ static void* _realloc_merge (moo_xma_t* xma, void* b, moo_oow_t size)
|
|||||||
}
|
}
|
||||||
else if (size < blk->size)
|
else if (size < blk->size)
|
||||||
{
|
{
|
||||||
/*
|
/* shrink the block */
|
||||||
* shrink the block
|
|
||||||
*/
|
|
||||||
|
|
||||||
moo_oow_t rem = blk->size - size;
|
moo_oow_t rem = blk->size - size;
|
||||||
if (rem >= MINBLKLEN)
|
if (rem >= MINBLKLEN)
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* tmp;
|
moo_xma_fblk_t* tmp;
|
||||||
moo_xma_blk_t* n = blk->b.next;
|
moo_xma_mblk_t* n;
|
||||||
|
|
||||||
/* the leftover is large enough to hold a block
|
n = next_mblk(blk);
|
||||||
* of minimum size. split the current block.
|
|
||||||
* let 'tmp' point to the leftover. */
|
/* the leftover is large enough to hold a block of minimum size.
|
||||||
tmp = (moo_xma_blk_t*)(((moo_uint8_t*)(blk + 1)) + size);
|
* split the current block. let 'tmp' point to the leftover. */
|
||||||
|
tmp = (moo_xma_fblk_t*)(((moo_uint8_t*)(blk + 1)) + size);
|
||||||
tmp->avail = 1;
|
tmp->avail = 1;
|
||||||
|
|
||||||
if (n && n->avail)
|
if ((moo_uint8_t*)n < xma->end && n->avail)
|
||||||
{
|
{
|
||||||
/* merge with the next block */
|
/* let the leftover block merge with the next block */
|
||||||
detach_from_freelist (xma, n);
|
detach_from_freelist (xma, (moo_xma_fblk_t*)n);
|
||||||
|
|
||||||
tmp->b.next = n->b.next;
|
|
||||||
tmp->b.prev = blk;
|
|
||||||
if (n->b.next) n->b.next->b.prev = tmp;
|
|
||||||
blk->b.next = tmp;
|
|
||||||
blk->size = size;
|
blk->size = size;
|
||||||
|
|
||||||
tmp->size = rem - HDRSIZE + HDRSIZE + n->size;
|
tmp->size = rem - HDRSIZE + HDRSIZE + n->size;
|
||||||
|
tmp->prev_size = size;
|
||||||
|
|
||||||
|
n = next_mblk(blk);
|
||||||
|
if ((moo_uint8_t*)n < xma->end) n->prev_size = tmp->size;
|
||||||
|
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
xma->stat.alloc -= rem;
|
xma->stat.alloc -= rem;
|
||||||
@ -501,13 +500,10 @@ static void* _realloc_merge (moo_xma_t* xma, void* b, moo_oow_t size)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* link 'tmp' to the block list */
|
/* link 'tmp' to the block list */
|
||||||
tmp->b.next = n;
|
|
||||||
tmp->b.prev = blk;
|
|
||||||
if (n) n->b.prev = tmp;
|
|
||||||
blk->b.next = tmp;
|
|
||||||
blk->size = size;
|
blk->size = size;
|
||||||
|
|
||||||
tmp->size = rem - HDRSIZE;
|
tmp->size = rem - HDRSIZE;
|
||||||
|
tmp->prev_size = blk->size;
|
||||||
|
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
xma->stat.nfree++;
|
xma->stat.nfree++;
|
||||||
@ -562,7 +558,8 @@ void* moo_xma_realloc (moo_xma_t* xma, void* b, moo_oow_t size)
|
|||||||
|
|
||||||
void moo_xma_free (moo_xma_t* xma, void* b)
|
void moo_xma_free (moo_xma_t* xma, void* b)
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* blk = USR_TO_SYS(b);
|
moo_xma_mblk_t* blk = USR_TO_SYS(b);
|
||||||
|
moo_xma_mblk_t* x, * y;
|
||||||
|
|
||||||
/*assert (blk->f.next == MOO_NULL);*/
|
/*assert (blk->f.next == MOO_NULL);*/
|
||||||
|
|
||||||
@ -572,98 +569,88 @@ void moo_xma_free (moo_xma_t* xma, void* b)
|
|||||||
xma->stat.alloc -= blk->size;
|
xma->stat.alloc -= blk->size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((blk->b.prev && blk->b.prev->avail) &&
|
x = prev_mblk(blk);
|
||||||
(blk->b.next && blk->b.next->avail))
|
y = next_mblk(blk);
|
||||||
|
if (((moo_uint8_t*)x >= xma->start && x->avail) && ((moo_uint8_t*)y < xma->end && y->avail))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Merge the block with surrounding blocks
|
* Merge the block with surrounding blocks
|
||||||
*
|
*
|
||||||
* blk
|
* blk
|
||||||
* +-----+ | +-----+ +------+
|
* |
|
||||||
* | V v | v | V
|
* v
|
||||||
* +------------+------------+------------+------------+
|
* +------------+------------+------------+------------+
|
||||||
* | X | | Y | Z |
|
* | X | | Y | Z |
|
||||||
* +------------+------------+------------+------------+
|
* +------------+------------+------------+------------+
|
||||||
* ^ | ^ | ^ |
|
*
|
||||||
* +-----+ +------+ +------+
|
*
|
||||||
*
|
|
||||||
*
|
|
||||||
* +-----------------------------------+
|
|
||||||
* | V
|
|
||||||
* +--------------------------------------+------------+
|
* +--------------------------------------+------------+
|
||||||
* | X | Z |
|
* | X | Z |
|
||||||
* +--------------------------------------+------------+
|
* +--------------------------------------+------------+
|
||||||
* ^ |
|
*
|
||||||
* +-----------------------------------+
|
|
||||||
*/
|
*/
|
||||||
moo_xma_blk_t* x = blk->b.prev;
|
|
||||||
moo_xma_blk_t* y = blk->b.next;
|
moo_xma_mblk_t* z = next_mblk(y);
|
||||||
moo_xma_blk_t* z = y->b.next;
|
|
||||||
moo_oow_t ns = HDRSIZE + blk->size + HDRSIZE;
|
moo_oow_t ns = HDRSIZE + blk->size + HDRSIZE;
|
||||||
moo_oow_t bs = ns + y->size;
|
moo_oow_t bs = ns + y->size;
|
||||||
|
|
||||||
detach_from_freelist (xma, x);
|
detach_from_freelist (xma, (moo_xma_fblk_t*)x);
|
||||||
detach_from_freelist (xma, y);
|
detach_from_freelist (xma, (moo_xma_fblk_t*)y);
|
||||||
|
|
||||||
x->size += bs;
|
x->size += bs;
|
||||||
x->b.next = z;
|
if ((moo_uint8_t*)z < xma->end) z->prev_size = x->size;
|
||||||
if (z) z->b.prev = x;
|
|
||||||
|
|
||||||
attach_to_freelist (xma, x);
|
attach_to_freelist (xma, (moo_xma_fblk_t*)x);
|
||||||
|
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
xma->stat.nfree--;
|
xma->stat.nfree--;
|
||||||
xma->stat.avail += ns;
|
xma->stat.avail += ns;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (blk->b.next && blk->b.next->avail)
|
else if ((moo_uint8_t*)y < xma->end && y->avail)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Merge the block with the next block
|
* Merge the block with the next block
|
||||||
*
|
*
|
||||||
* blk
|
* blk
|
||||||
* | +-----+ +------+
|
* |
|
||||||
* v | v | V
|
* v
|
||||||
* +------------+------------+------------+
|
* +------------+------------+------------+
|
||||||
* | | X | Y |
|
* | | Y | Z |
|
||||||
* +------------+------------+------------+
|
* +------------+------------+------------+
|
||||||
* ^ | ^ |
|
*
|
||||||
* +------+ +------+
|
*
|
||||||
*
|
*
|
||||||
* blk
|
* blk
|
||||||
* | +------------------+
|
* |
|
||||||
* v | V
|
* v
|
||||||
* +-------------------------+------------+
|
* +-------------------------+------------+
|
||||||
* | | Y |
|
* | | Z |
|
||||||
* +-------------------------+------------+
|
* +-------------------------+------------+
|
||||||
* ^ |
|
*
|
||||||
* +-------------------+
|
*
|
||||||
*/
|
*/
|
||||||
moo_xma_blk_t* x = blk->b.next;
|
moo_xma_mblk_t* z = next_mblk(y);
|
||||||
moo_xma_blk_t* y = x->b.next;
|
|
||||||
|
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
xma->stat.avail += blk->size + HDRSIZE;
|
xma->stat.avail += blk->size + HDRSIZE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* detach x from the free list */
|
/* detach y from the free list */
|
||||||
detach_from_freelist (xma, x);
|
detach_from_freelist (xma, (moo_xma_fblk_t*)y);
|
||||||
|
|
||||||
/* update the block availability */
|
/* update the block availability */
|
||||||
blk->avail = 1;
|
blk->avail = 1;
|
||||||
/* update the block size. HDRSIZE for the header space in x */
|
/* update the block size. HDRSIZE for the header space in x */
|
||||||
blk->size += HDRSIZE + x->size;
|
blk->size += HDRSIZE + y->size;
|
||||||
|
|
||||||
/* update the backward link of Y */
|
/* update the backward link of Y */
|
||||||
if (y) y->b.prev = blk;
|
if ((moo_uint8_t*)z < xma->end) z->prev_size = blk->size;
|
||||||
/* update the forward link of the block being freed */
|
|
||||||
blk->b.next = y;
|
|
||||||
|
|
||||||
/* attach blk to the free list */
|
/* attach blk to the free list */
|
||||||
attach_to_freelist (xma, blk);
|
attach_to_freelist (xma, (moo_xma_fblk_t*)blk);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (blk->b.prev && blk->b.prev->avail)
|
else if ((moo_uint8_t*)x < xma->end && x->avail)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Merge the block with the previous block
|
* Merge the block with the previous block
|
||||||
@ -687,25 +674,21 @@ void moo_xma_free (moo_xma_t* xma, void* b)
|
|||||||
* +--------------------+
|
* +--------------------+
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
moo_xma_blk_t* x = blk->b.prev;
|
|
||||||
moo_xma_blk_t* y = blk->b.next;
|
|
||||||
|
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
xma->stat.avail += HDRSIZE + blk->size;
|
xma->stat.avail += HDRSIZE + blk->size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
detach_from_freelist (xma, x);
|
detach_from_freelist (xma, (moo_xma_fblk_t*)x);
|
||||||
|
|
||||||
x->size += HDRSIZE + blk->size;
|
x->size += HDRSIZE + blk->size;
|
||||||
x->b.next = y;
|
if ((moo_uint8_t*)y < xma->end) y->prev_size = x->size;
|
||||||
if (y) y->b.prev = x;
|
|
||||||
|
|
||||||
attach_to_freelist (xma, x);
|
attach_to_freelist (xma, (moo_xma_fblk_t*)x);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
blk->avail = 1;
|
blk->avail = 1;
|
||||||
attach_to_freelist (xma, blk);
|
attach_to_freelist (xma, (moo_xma_fblk_t*)blk);
|
||||||
|
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
xma->stat.nfree++;
|
xma->stat.nfree++;
|
||||||
@ -716,7 +699,7 @@ void moo_xma_free (moo_xma_t* xma, void* b)
|
|||||||
|
|
||||||
void moo_xma_dump (moo_xma_t* xma, moo_xma_dumper_t dumper, void* ctx)
|
void moo_xma_dump (moo_xma_t* xma, moo_xma_dumper_t dumper, void* ctx)
|
||||||
{
|
{
|
||||||
moo_xma_blk_t* tmp;
|
moo_xma_mblk_t* tmp;
|
||||||
moo_oow_t fsum, asum;
|
moo_oow_t fsum, asum;
|
||||||
#if defined(MOO_XMA_ENABLE_STAT)
|
#if defined(MOO_XMA_ENABLE_STAT)
|
||||||
moo_oow_t isum;
|
moo_oow_t isum;
|
||||||
@ -733,7 +716,7 @@ void moo_xma_dump (moo_xma_t* xma, moo_xma_dumper_t dumper, void* ctx)
|
|||||||
|
|
||||||
dumper (ctx, "== blocks ==\n");
|
dumper (ctx, "== blocks ==\n");
|
||||||
dumper (ctx, " size avail address\n");
|
dumper (ctx, " size avail address\n");
|
||||||
for (tmp = xma->head, fsum = 0, asum = 0; tmp; tmp = tmp->b.next)
|
for (tmp = (moo_xma_mblk_t*)xma->start, fsum = 0, asum = 0; (moo_uint8_t*)tmp < xma->end; tmp = next_mblk(tmp))
|
||||||
{
|
{
|
||||||
dumper (ctx, " %-18zu %-5u %p\n", tmp->size, (unsigned int)tmp->avail, tmp);
|
dumper (ctx, " %-18zu %-5u %p\n", tmp->size, (unsigned int)tmp->avail, tmp);
|
||||||
if (tmp->avail) fsum += tmp->size;
|
if (tmp->avail) fsum += tmp->size;
|
||||||
|
48
moo/m4/libtool.m4
generated
vendored
48
moo/m4/libtool.m4
generated
vendored
@ -728,7 +728,6 @@ _LT_CONFIG_SAVE_COMMANDS([
|
|||||||
cat <<_LT_EOF >> "$cfgfile"
|
cat <<_LT_EOF >> "$cfgfile"
|
||||||
#! $SHELL
|
#! $SHELL
|
||||||
# Generated automatically by $as_me ($PACKAGE) $VERSION
|
# 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.
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||||
|
|
||||||
# Provide generalized library-building support services.
|
# Provide generalized library-building support services.
|
||||||
@ -2867,9 +2866,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
|||||||
# before this can be enabled.
|
# before this can be enabled.
|
||||||
hardcode_into_libs=yes
|
hardcode_into_libs=yes
|
||||||
|
|
||||||
# Add ABI-specific directories to the system library path.
|
|
||||||
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
|
||||||
|
|
||||||
# Ideally, we could use ldconfig to report *all* directores which are
|
# Ideally, we could use ldconfig to report *all* directores which are
|
||||||
# searched for libraries, however this is still not possible. Aside from not
|
# searched for libraries, however this is still not possible. Aside from not
|
||||||
# being certain /sbin/ldconfig is available, command
|
# being certain /sbin/ldconfig is available, command
|
||||||
@ -2878,7 +2874,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
|||||||
# appending ld.so.conf contents (and includes) to the search path.
|
# appending ld.so.conf contents (and includes) to the search path.
|
||||||
if test -f /etc/ld.so.conf; then
|
if test -f /etc/ld.so.conf; then
|
||||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||||
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||||
@ -2890,6 +2886,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
|||||||
dynamic_linker='GNU/Linux ld.so'
|
dynamic_linker='GNU/Linux ld.so'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
netbsdelf*-gnu)
|
||||||
|
version_type=linux
|
||||||
|
need_lib_prefix=no
|
||||||
|
need_version=no
|
||||||
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||||
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
shlibpath_overrides_runpath=no
|
||||||
|
hardcode_into_libs=yes
|
||||||
|
dynamic_linker='NetBSD ld.elf_so'
|
||||||
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd*)
|
||||||
version_type=sunos
|
version_type=sunos
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
@ -3549,7 +3557,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
|||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd* | netbsdelf*-gnu)
|
||||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||||
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
|
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
|
||||||
else
|
else
|
||||||
@ -4055,7 +4063,8 @@ _LT_EOF
|
|||||||
if AC_TRY_EVAL(ac_compile); then
|
if AC_TRY_EVAL(ac_compile); then
|
||||||
# Now try to grab the symbols.
|
# Now try to grab the symbols.
|
||||||
nlist=conftest.nm
|
nlist=conftest.nm
|
||||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
|
$ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
|
||||||
|
if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
|
||||||
# Try sorting and uniquifying the output.
|
# Try sorting and uniquifying the output.
|
||||||
if sort "$nlist" | uniq > "$nlist"T; then
|
if sort "$nlist" | uniq > "$nlist"T; then
|
||||||
mv -f "$nlist"T "$nlist"
|
mv -f "$nlist"T "$nlist"
|
||||||
@ -4427,7 +4436,7 @@ m4_if([$1], [CXX], [
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
netbsd*)
|
netbsd* | netbsdelf*-gnu)
|
||||||
;;
|
;;
|
||||||
*qnx* | *nto*)
|
*qnx* | *nto*)
|
||||||
# QNX uses GNU C++, but need to define -shared option too, otherwise
|
# QNX uses GNU C++, but need to define -shared option too, otherwise
|
||||||
@ -4939,6 +4948,9 @@ m4_if([$1], [CXX], [
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
linux* | k*bsd*-gnu | gnu*)
|
||||||
|
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
|
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
|
||||||
;;
|
;;
|
||||||
@ -5001,6 +5013,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
|||||||
openbsd* | bitrig*)
|
openbsd* | bitrig*)
|
||||||
with_gnu_ld=no
|
with_gnu_ld=no
|
||||||
;;
|
;;
|
||||||
|
linux* | k*bsd*-gnu | gnu*)
|
||||||
|
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||||
@ -5255,7 +5270,7 @@ _LT_EOF
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd* | netbsdelf*-gnu)
|
||||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||||
wlarc=
|
wlarc=
|
||||||
@ -5776,6 +5791,7 @@ _LT_EOF
|
|||||||
if test yes = "$lt_cv_irix_exported_symbol"; then
|
if test yes = "$lt_cv_irix_exported_symbol"; then
|
||||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
|
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
|
||||||
fi
|
fi
|
||||||
|
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||||
else
|
else
|
||||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
|
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
|
||||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
|
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
|
||||||
@ -5797,7 +5813,7 @@ _LT_EOF
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd* | netbsdelf*-gnu)
|
||||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
|
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
|
||||||
else
|
else
|
||||||
@ -6423,7 +6439,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# Commands to make compiler produce verbose output that lists
|
# Commands to make compiler produce verbose output that lists
|
||||||
# what "hidden" libraries, object files and flags are used when
|
# what "hidden" libraries, object files and flags are used when
|
||||||
# linking a shared library.
|
# linking a shared library.
|
||||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
|
||||||
|
|
||||||
else
|
else
|
||||||
GXX=no
|
GXX=no
|
||||||
@ -6798,7 +6814,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# explicitly linking system object files so we need to strip them
|
# explicitly linking system object files so we need to strip them
|
||||||
# from the output so that they don't get included in the library
|
# from the output so that they don't get included in the library
|
||||||
# dependencies.
|
# dependencies.
|
||||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test yes = "$GXX"; then
|
if test yes = "$GXX"; then
|
||||||
@ -6863,7 +6879,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# explicitly linking system object files so we need to strip them
|
# explicitly linking system object files so we need to strip them
|
||||||
# from the output so that they don't get included in the library
|
# from the output so that they don't get included in the library
|
||||||
# dependencies.
|
# dependencies.
|
||||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test yes = "$GXX"; then
|
if test yes = "$GXX"; then
|
||||||
@ -7202,7 +7218,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# Commands to make compiler produce verbose output that lists
|
# Commands to make compiler produce verbose output that lists
|
||||||
# what "hidden" libraries, object files and flags are used when
|
# what "hidden" libraries, object files and flags are used when
|
||||||
# linking a shared library.
|
# linking a shared library.
|
||||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
|
||||||
|
|
||||||
else
|
else
|
||||||
# FIXME: insert proper C++ library support
|
# FIXME: insert proper C++ library support
|
||||||
@ -7286,7 +7302,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# Commands to make compiler produce verbose output that lists
|
# Commands to make compiler produce verbose output that lists
|
||||||
# what "hidden" libraries, object files and flags are used when
|
# what "hidden" libraries, object files and flags are used when
|
||||||
# linking a shared library.
|
# linking a shared library.
|
||||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
|
||||||
else
|
else
|
||||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||||
# platform.
|
# platform.
|
||||||
@ -7297,7 +7313,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# Commands to make compiler produce verbose output that lists
|
# Commands to make compiler produce verbose output that lists
|
||||||
# what "hidden" libraries, object files and flags are used when
|
# what "hidden" libraries, object files and flags are used when
|
||||||
# linking a shared library.
|
# linking a shared library.
|
||||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
||||||
|
@ -419,6 +419,7 @@ pdfdir = @pdfdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
|
runstatedir = @runstatedir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
AUTOMAKE_OPTIONS = nostdinc
|
AUTOMAKE_OPTIONS = nostdinc
|
||||||
|
|
||||||
|
AM_CFLAGS = $(PTHREAD_CFLAGS)
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(abs_builddir) \
|
-I$(abs_builddir) \
|
||||||
-I$(abs_builddir)/../lib \
|
-I$(abs_builddir)/../lib \
|
||||||
@ -10,7 +12,7 @@ AM_CPPFLAGS = \
|
|||||||
AM_LDFLAGS = -L$(abs_builddir)/../lib -L$(libdir)
|
AM_LDFLAGS = -L$(abs_builddir)/../lib -L$(libdir)
|
||||||
LDADD =
|
LDADD =
|
||||||
|
|
||||||
bin_PROGRAMS = t-001 t-002 t-003 t-004
|
check_PROGRAMS = t-001 t-002 t-003 t-004 t-005
|
||||||
|
|
||||||
t_001_SOURCES = t-001.c
|
t_001_SOURCES = t-001.c
|
||||||
|
|
||||||
@ -19,9 +21,16 @@ t_002_LDADD = -lmoo $(LDADD)
|
|||||||
t_002_DEPENDENCIES = ../lib/libmoo.la
|
t_002_DEPENDENCIES = ../lib/libmoo.la
|
||||||
|
|
||||||
t_003_SOURCES = t-003.c
|
t_003_SOURCES = t-003.c
|
||||||
t_003_LDADD = -lmoo $(LDADD)
|
t_003_LDADD = -lmoo $(LDADD) $(LIBM)
|
||||||
t_003_DEPENDENCIES = ../lib/libmoo.la
|
t_003_DEPENDENCIES = ../lib/libmoo.la
|
||||||
|
|
||||||
t_004_SOURCES = t-004.c
|
t_004_SOURCES = t-004.c
|
||||||
t_004_LDADD = -lmoox $(LDADD)
|
t_004_LDADD = -lmoox $(LDADD)
|
||||||
t_004_DEPENDENCIES = ../lib/libmoox.la
|
t_004_DEPENDENCIES = ../lib/libmoox.la
|
||||||
|
|
||||||
|
t_005_SOURCES = t-005.c
|
||||||
|
t_005_LDADD = -lmoo $(LDADD)
|
||||||
|
t_005_DEPENDENCIES = ../lib/libmoo.la
|
||||||
|
|
||||||
|
|
||||||
|
TESTS = $(check_PROGRAMS)
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = { \
|
||||||
if test -z '$(MAKELEVEL)'; then \
|
if test -z '$(MAKELEVEL)'; then \
|
||||||
@ -88,8 +87,8 @@ PRE_UNINSTALL = :
|
|||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
bin_PROGRAMS = t-001$(EXEEXT) t-002$(EXEEXT) t-003$(EXEEXT) \
|
check_PROGRAMS = t-001$(EXEEXT) t-002$(EXEEXT) t-003$(EXEEXT) \
|
||||||
t-004$(EXEEXT)
|
t-004$(EXEEXT) t-005$(EXEEXT)
|
||||||
subdir = t
|
subdir = t
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
|
||||||
@ -104,8 +103,6 @@ mkinstalldirs = $(install_sh) -d
|
|||||||
CONFIG_HEADER = $(top_builddir)/lib/moo-cfg.h
|
CONFIG_HEADER = $(top_builddir)/lib/moo-cfg.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
|
||||||
PROGRAMS = $(bin_PROGRAMS)
|
|
||||||
am_t_001_OBJECTS = t-001.$(OBJEXT)
|
am_t_001_OBJECTS = t-001.$(OBJEXT)
|
||||||
t_001_OBJECTS = $(am_t_001_OBJECTS)
|
t_001_OBJECTS = $(am_t_001_OBJECTS)
|
||||||
t_001_LDADD = $(LDADD)
|
t_001_LDADD = $(LDADD)
|
||||||
@ -121,6 +118,8 @@ am_t_003_OBJECTS = t-003.$(OBJEXT)
|
|||||||
t_003_OBJECTS = $(am_t_003_OBJECTS)
|
t_003_OBJECTS = $(am_t_003_OBJECTS)
|
||||||
am_t_004_OBJECTS = t-004.$(OBJEXT)
|
am_t_004_OBJECTS = t-004.$(OBJEXT)
|
||||||
t_004_OBJECTS = $(am_t_004_OBJECTS)
|
t_004_OBJECTS = $(am_t_004_OBJECTS)
|
||||||
|
am_t_005_OBJECTS = t-005.$(OBJEXT)
|
||||||
|
t_005_OBJECTS = $(am_t_005_OBJECTS)
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
am__v_P_0 = false
|
am__v_P_0 = false
|
||||||
@ -137,7 +136,7 @@ DEFAULT_INCLUDES =
|
|||||||
depcomp = $(SHELL) $(top_srcdir)/ac/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/ac/depcomp
|
||||||
am__maybe_remake_depfiles = depfiles
|
am__maybe_remake_depfiles = depfiles
|
||||||
am__depfiles_remade = ./$(DEPDIR)/t-001.Po ./$(DEPDIR)/t-002.Po \
|
am__depfiles_remade = ./$(DEPDIR)/t-001.Po ./$(DEPDIR)/t-002.Po \
|
||||||
./$(DEPDIR)/t-003.Po ./$(DEPDIR)/t-004.Po
|
./$(DEPDIR)/t-003.Po ./$(DEPDIR)/t-004.Po ./$(DEPDIR)/t-005.Po
|
||||||
am__mv = mv -f
|
am__mv = mv -f
|
||||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
@ -158,9 +157,9 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
|||||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||||
am__v_CCLD_1 =
|
am__v_CCLD_1 =
|
||||||
SOURCES = $(t_001_SOURCES) $(t_002_SOURCES) $(t_003_SOURCES) \
|
SOURCES = $(t_001_SOURCES) $(t_002_SOURCES) $(t_003_SOURCES) \
|
||||||
$(t_004_SOURCES)
|
$(t_004_SOURCES) $(t_005_SOURCES)
|
||||||
DIST_SOURCES = $(t_001_SOURCES) $(t_002_SOURCES) $(t_003_SOURCES) \
|
DIST_SOURCES = $(t_001_SOURCES) $(t_002_SOURCES) $(t_003_SOURCES) \
|
||||||
$(t_004_SOURCES)
|
$(t_004_SOURCES) $(t_005_SOURCES)
|
||||||
am__can_run_installinfo = \
|
am__can_run_installinfo = \
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
n|no|NO) false;; \
|
n|no|NO) false;; \
|
||||||
@ -185,7 +184,212 @@ am__define_uniq_tagged_files = \
|
|||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/depcomp
|
am__tty_colors_dummy = \
|
||||||
|
mgn= red= grn= lgn= blu= brg= std=; \
|
||||||
|
am__color_tests=no
|
||||||
|
am__tty_colors = { \
|
||||||
|
$(am__tty_colors_dummy); \
|
||||||
|
if test "X$(AM_COLOR_TESTS)" = Xno; then \
|
||||||
|
am__color_tests=no; \
|
||||||
|
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
|
||||||
|
am__color_tests=yes; \
|
||||||
|
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
|
||||||
|
am__color_tests=yes; \
|
||||||
|
fi; \
|
||||||
|
if test $$am__color_tests = yes; then \
|
||||||
|
red='[0;31m'; \
|
||||||
|
grn='[0;32m'; \
|
||||||
|
lgn='[1;32m'; \
|
||||||
|
blu='[1;34m'; \
|
||||||
|
mgn='[0;35m'; \
|
||||||
|
brg='[1m'; \
|
||||||
|
std='[m'; \
|
||||||
|
fi; \
|
||||||
|
}
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__uninstall_files_from_dir = { \
|
||||||
|
test -z "$$files" \
|
||||||
|
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||||
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
|
}
|
||||||
|
am__recheck_rx = ^[ ]*:recheck:[ ]*
|
||||||
|
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
|
||||||
|
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
|
||||||
|
# A command that, given a newline-separated list of test names on the
|
||||||
|
# standard input, print the name of the tests that are to be re-run
|
||||||
|
# upon "make recheck".
|
||||||
|
am__list_recheck_tests = $(AWK) '{ \
|
||||||
|
recheck = 1; \
|
||||||
|
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||||
|
{ \
|
||||||
|
if (rc < 0) \
|
||||||
|
{ \
|
||||||
|
if ((getline line2 < ($$0 ".log")) < 0) \
|
||||||
|
recheck = 0; \
|
||||||
|
break; \
|
||||||
|
} \
|
||||||
|
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
|
||||||
|
{ \
|
||||||
|
recheck = 0; \
|
||||||
|
break; \
|
||||||
|
} \
|
||||||
|
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
|
||||||
|
{ \
|
||||||
|
break; \
|
||||||
|
} \
|
||||||
|
}; \
|
||||||
|
if (recheck) \
|
||||||
|
print $$0; \
|
||||||
|
close ($$0 ".trs"); \
|
||||||
|
close ($$0 ".log"); \
|
||||||
|
}'
|
||||||
|
# A command that, given a newline-separated list of test names on the
|
||||||
|
# standard input, create the global log from their .trs and .log files.
|
||||||
|
am__create_global_log = $(AWK) ' \
|
||||||
|
function fatal(msg) \
|
||||||
|
{ \
|
||||||
|
print "fatal: making $@: " msg | "cat >&2"; \
|
||||||
|
exit 1; \
|
||||||
|
} \
|
||||||
|
function rst_section(header) \
|
||||||
|
{ \
|
||||||
|
print header; \
|
||||||
|
len = length(header); \
|
||||||
|
for (i = 1; i <= len; i = i + 1) \
|
||||||
|
printf "="; \
|
||||||
|
printf "\n\n"; \
|
||||||
|
} \
|
||||||
|
{ \
|
||||||
|
copy_in_global_log = 1; \
|
||||||
|
global_test_result = "RUN"; \
|
||||||
|
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||||
|
{ \
|
||||||
|
if (rc < 0) \
|
||||||
|
fatal("failed to read from " $$0 ".trs"); \
|
||||||
|
if (line ~ /$(am__global_test_result_rx)/) \
|
||||||
|
{ \
|
||||||
|
sub("$(am__global_test_result_rx)", "", line); \
|
||||||
|
sub("[ ]*$$", "", line); \
|
||||||
|
global_test_result = line; \
|
||||||
|
} \
|
||||||
|
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
|
||||||
|
copy_in_global_log = 0; \
|
||||||
|
}; \
|
||||||
|
if (copy_in_global_log) \
|
||||||
|
{ \
|
||||||
|
rst_section(global_test_result ": " $$0); \
|
||||||
|
while ((rc = (getline line < ($$0 ".log"))) != 0) \
|
||||||
|
{ \
|
||||||
|
if (rc < 0) \
|
||||||
|
fatal("failed to read from " $$0 ".log"); \
|
||||||
|
print line; \
|
||||||
|
}; \
|
||||||
|
printf "\n"; \
|
||||||
|
}; \
|
||||||
|
close ($$0 ".trs"); \
|
||||||
|
close ($$0 ".log"); \
|
||||||
|
}'
|
||||||
|
# Restructured Text title.
|
||||||
|
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
|
||||||
|
# Solaris 10 'make', and several other traditional 'make' implementations,
|
||||||
|
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
|
||||||
|
# by disabling -e (using the XSI extension "set +e") if it's set.
|
||||||
|
am__sh_e_setup = case $$- in *e*) set +e;; esac
|
||||||
|
# Default flags passed to test drivers.
|
||||||
|
am__common_driver_flags = \
|
||||||
|
--color-tests "$$am__color_tests" \
|
||||||
|
--enable-hard-errors "$$am__enable_hard_errors" \
|
||||||
|
--expect-failure "$$am__expect_failure"
|
||||||
|
# To be inserted before the command running the test. Creates the
|
||||||
|
# directory for the log if needed. Stores in $dir the directory
|
||||||
|
# containing $f, in $tst the test, in $log the log. Executes the
|
||||||
|
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
|
||||||
|
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
|
||||||
|
# will run the test scripts (or their associated LOG_COMPILER, if
|
||||||
|
# thy have one).
|
||||||
|
am__check_pre = \
|
||||||
|
$(am__sh_e_setup); \
|
||||||
|
$(am__vpath_adj_setup) $(am__vpath_adj) \
|
||||||
|
$(am__tty_colors); \
|
||||||
|
srcdir=$(srcdir); export srcdir; \
|
||||||
|
case "$@" in \
|
||||||
|
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
|
||||||
|
*) am__odir=.;; \
|
||||||
|
esac; \
|
||||||
|
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|
||||||
|
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
|
||||||
|
if test -f "./$$f"; then dir=./; \
|
||||||
|
elif test -f "$$f"; then dir=; \
|
||||||
|
else dir="$(srcdir)/"; fi; \
|
||||||
|
tst=$$dir$$f; log='$@'; \
|
||||||
|
if test -n '$(DISABLE_HARD_ERRORS)'; then \
|
||||||
|
am__enable_hard_errors=no; \
|
||||||
|
else \
|
||||||
|
am__enable_hard_errors=yes; \
|
||||||
|
fi; \
|
||||||
|
case " $(XFAIL_TESTS) " in \
|
||||||
|
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
|
||||||
|
am__expect_failure=yes;; \
|
||||||
|
*) \
|
||||||
|
am__expect_failure=no;; \
|
||||||
|
esac; \
|
||||||
|
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
|
||||||
|
# A shell command to get the names of the tests scripts with any registered
|
||||||
|
# extension removed (i.e., equivalently, the names of the test logs, with
|
||||||
|
# the '.log' extension removed). The result is saved in the shell variable
|
||||||
|
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
|
||||||
|
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
|
||||||
|
# since that might cause problem with VPATH rewrites for suffix-less tests.
|
||||||
|
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
|
||||||
|
am__set_TESTS_bases = \
|
||||||
|
bases='$(TEST_LOGS)'; \
|
||||||
|
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
|
||||||
|
bases=`echo $$bases`
|
||||||
|
RECHECK_LOGS = $(TEST_LOGS)
|
||||||
|
AM_RECURSIVE_TARGETS = check recheck
|
||||||
|
TEST_SUITE_LOG = test-suite.log
|
||||||
|
TEST_EXTENSIONS = @EXEEXT@ .test
|
||||||
|
LOG_DRIVER = $(SHELL) $(top_srcdir)/ac/test-driver
|
||||||
|
LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
|
||||||
|
am__set_b = \
|
||||||
|
case '$@' in \
|
||||||
|
*/*) \
|
||||||
|
case '$*' in \
|
||||||
|
*/*) b='$*';; \
|
||||||
|
*) b=`echo '$@' | sed 's/\.log$$//'`; \
|
||||||
|
esac;; \
|
||||||
|
*) \
|
||||||
|
b='$*';; \
|
||||||
|
esac
|
||||||
|
am__test_logs1 = $(TESTS:=.log)
|
||||||
|
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
|
||||||
|
TEST_LOGS = $(am__test_logs2:.test.log=.log)
|
||||||
|
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/ac/test-driver
|
||||||
|
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
|
||||||
|
$(TEST_LOG_FLAGS)
|
||||||
|
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/depcomp \
|
||||||
|
$(top_srcdir)/ac/test-driver
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
@ -315,6 +519,7 @@ pdfdir = @pdfdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
|
runstatedir = @runstatedir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
@ -324,6 +529,7 @@ top_build_prefix = @top_build_prefix@
|
|||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
AUTOMAKE_OPTIONS = nostdinc
|
AUTOMAKE_OPTIONS = nostdinc
|
||||||
|
AM_CFLAGS = $(PTHREAD_CFLAGS)
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(abs_builddir) \
|
-I$(abs_builddir) \
|
||||||
-I$(abs_builddir)/../lib \
|
-I$(abs_builddir)/../lib \
|
||||||
@ -338,15 +544,19 @@ t_002_SOURCES = t-002.c
|
|||||||
t_002_LDADD = -lmoo $(LDADD)
|
t_002_LDADD = -lmoo $(LDADD)
|
||||||
t_002_DEPENDENCIES = ../lib/libmoo.la
|
t_002_DEPENDENCIES = ../lib/libmoo.la
|
||||||
t_003_SOURCES = t-003.c
|
t_003_SOURCES = t-003.c
|
||||||
t_003_LDADD = -lmoo $(LDADD)
|
t_003_LDADD = -lmoo $(LDADD) $(LIBM)
|
||||||
t_003_DEPENDENCIES = ../lib/libmoo.la
|
t_003_DEPENDENCIES = ../lib/libmoo.la
|
||||||
t_004_SOURCES = t-004.c
|
t_004_SOURCES = t-004.c
|
||||||
t_004_LDADD = -lmoox $(LDADD)
|
t_004_LDADD = -lmoox $(LDADD)
|
||||||
t_004_DEPENDENCIES = ../lib/libmoox.la
|
t_004_DEPENDENCIES = ../lib/libmoox.la
|
||||||
|
t_005_SOURCES = t-005.c
|
||||||
|
t_005_LDADD = -lmoo $(LDADD)
|
||||||
|
t_005_DEPENDENCIES = ../lib/libmoo.la
|
||||||
|
TESTS = $(check_PROGRAMS)
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .lo .o .obj
|
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
|
||||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
@ -376,49 +586,9 @@ $(top_srcdir)/configure: $(am__configure_deps)
|
|||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
|
||||||
if test -n "$$list"; then \
|
|
||||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
|
||||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
|
||||||
fi; \
|
|
||||||
for p in $$list; do echo "$$p $$p"; done | \
|
|
||||||
sed 's/$(EXEEXT)$$//' | \
|
|
||||||
while read p p1; do if test -f $$p \
|
|
||||||
|| test -f $$p1 \
|
|
||||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
|
||||||
done | \
|
|
||||||
sed -e 'p;s,.*/,,;n;h' \
|
|
||||||
-e 's|.*|.|' \
|
|
||||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
|
||||||
sed 'N;N;N;s,\n, ,g' | \
|
|
||||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
|
||||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
|
||||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
|
||||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
|
||||||
END { for (d in files) print "f", d, files[d] }' | \
|
|
||||||
while read type dir files; do \
|
|
||||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
|
||||||
test -z "$$files" || { \
|
|
||||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
|
||||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
|
||||||
} \
|
|
||||||
; done
|
|
||||||
|
|
||||||
uninstall-binPROGRAMS:
|
clean-checkPROGRAMS:
|
||||||
@$(NORMAL_UNINSTALL)
|
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo "$$p"; done | \
|
|
||||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
|
||||||
-e 's/$$/$(EXEEXT)/' \
|
|
||||||
`; \
|
|
||||||
test -n "$$list" || exit 0; \
|
|
||||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
|
||||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
|
||||||
|
|
||||||
clean-binPROGRAMS:
|
|
||||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
|
||||||
echo " rm -f" $$list; \
|
echo " rm -f" $$list; \
|
||||||
rm -f $$list || exit $$?; \
|
rm -f $$list || exit $$?; \
|
||||||
test -n "$(EXEEXT)" || exit 0; \
|
test -n "$(EXEEXT)" || exit 0; \
|
||||||
@ -442,6 +612,10 @@ t-004$(EXEEXT): $(t_004_OBJECTS) $(t_004_DEPENDENCIES) $(EXTRA_t_004_DEPENDENCIE
|
|||||||
@rm -f t-004$(EXEEXT)
|
@rm -f t-004$(EXEEXT)
|
||||||
$(AM_V_CCLD)$(LINK) $(t_004_OBJECTS) $(t_004_LDADD) $(LIBS)
|
$(AM_V_CCLD)$(LINK) $(t_004_OBJECTS) $(t_004_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
t-005$(EXEEXT): $(t_005_OBJECTS) $(t_005_DEPENDENCIES) $(EXTRA_t_005_DEPENDENCIES)
|
||||||
|
@rm -f t-005$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(t_005_OBJECTS) $(t_005_LDADD) $(LIBS)
|
||||||
|
|
||||||
mostlyclean-compile:
|
mostlyclean-compile:
|
||||||
-rm -f *.$(OBJEXT)
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
@ -452,6 +626,7 @@ distclean-compile:
|
|||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-002.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-002.Po@am__quote@ # am--include-marker
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-003.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-003.Po@am__quote@ # am--include-marker
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-004.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-004.Po@am__quote@ # am--include-marker
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-005.Po@am__quote@ # am--include-marker
|
||||||
|
|
||||||
$(am__depfiles_remade):
|
$(am__depfiles_remade):
|
||||||
@$(MKDIR_P) $(@D)
|
@$(MKDIR_P) $(@D)
|
||||||
@ -541,6 +716,197 @@ cscopelist-am: $(am__tagged_files)
|
|||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
# Recover from deleted '.trs' file; this should ensure that
|
||||||
|
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
|
||||||
|
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
|
||||||
|
# to avoid problems with "make -n".
|
||||||
|
.log.trs:
|
||||||
|
rm -f $< $@
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) $<
|
||||||
|
|
||||||
|
# Leading 'am--fnord' is there to ensure the list of targets does not
|
||||||
|
# expand to empty, as could happen e.g. with make check TESTS=''.
|
||||||
|
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
|
||||||
|
am--force-recheck:
|
||||||
|
@:
|
||||||
|
|
||||||
|
$(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||||
|
@$(am__set_TESTS_bases); \
|
||||||
|
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
|
||||||
|
redo_bases=`for i in $$bases; do \
|
||||||
|
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
|
||||||
|
done`; \
|
||||||
|
if test -n "$$redo_bases"; then \
|
||||||
|
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
|
||||||
|
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
|
||||||
|
if $(am__make_dryrun); then :; else \
|
||||||
|
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
if test -n "$$am__remaking_logs"; then \
|
||||||
|
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
|
||||||
|
"recursion detected" >&2; \
|
||||||
|
elif test -n "$$redo_logs"; then \
|
||||||
|
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
|
||||||
|
fi; \
|
||||||
|
if $(am__make_dryrun); then :; else \
|
||||||
|
st=0; \
|
||||||
|
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
|
||||||
|
for i in $$redo_bases; do \
|
||||||
|
test -f $$i.trs && test -r $$i.trs \
|
||||||
|
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
|
||||||
|
test -f $$i.log && test -r $$i.log \
|
||||||
|
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
|
||||||
|
done; \
|
||||||
|
test $$st -eq 0 || exit 1; \
|
||||||
|
fi
|
||||||
|
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
|
||||||
|
ws='[ ]'; \
|
||||||
|
results=`for b in $$bases; do echo $$b.trs; done`; \
|
||||||
|
test -n "$$results" || results=/dev/null; \
|
||||||
|
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
|
||||||
|
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
|
||||||
|
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
|
||||||
|
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
|
||||||
|
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
|
||||||
|
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
|
||||||
|
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
|
||||||
|
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
|
||||||
|
success=true; \
|
||||||
|
else \
|
||||||
|
success=false; \
|
||||||
|
fi; \
|
||||||
|
br='==================='; br=$$br$$br$$br$$br; \
|
||||||
|
result_count () \
|
||||||
|
{ \
|
||||||
|
if test x"$$1" = x"--maybe-color"; then \
|
||||||
|
maybe_colorize=yes; \
|
||||||
|
elif test x"$$1" = x"--no-color"; then \
|
||||||
|
maybe_colorize=no; \
|
||||||
|
else \
|
||||||
|
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
|
||||||
|
fi; \
|
||||||
|
shift; \
|
||||||
|
desc=$$1 count=$$2; \
|
||||||
|
if test $$maybe_colorize = yes && test $$count -gt 0; then \
|
||||||
|
color_start=$$3 color_end=$$std; \
|
||||||
|
else \
|
||||||
|
color_start= color_end=; \
|
||||||
|
fi; \
|
||||||
|
echo "$${color_start}# $$desc $$count$${color_end}"; \
|
||||||
|
}; \
|
||||||
|
create_testsuite_report () \
|
||||||
|
{ \
|
||||||
|
result_count $$1 "TOTAL:" $$all "$$brg"; \
|
||||||
|
result_count $$1 "PASS: " $$pass "$$grn"; \
|
||||||
|
result_count $$1 "SKIP: " $$skip "$$blu"; \
|
||||||
|
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
|
||||||
|
result_count $$1 "FAIL: " $$fail "$$red"; \
|
||||||
|
result_count $$1 "XPASS:" $$xpass "$$red"; \
|
||||||
|
result_count $$1 "ERROR:" $$error "$$mgn"; \
|
||||||
|
}; \
|
||||||
|
{ \
|
||||||
|
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
|
||||||
|
$(am__rst_title); \
|
||||||
|
create_testsuite_report --no-color; \
|
||||||
|
echo; \
|
||||||
|
echo ".. contents:: :depth: 2"; \
|
||||||
|
echo; \
|
||||||
|
for b in $$bases; do echo $$b; done \
|
||||||
|
| $(am__create_global_log); \
|
||||||
|
} >$(TEST_SUITE_LOG).tmp || exit 1; \
|
||||||
|
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
|
||||||
|
if $$success; then \
|
||||||
|
col="$$grn"; \
|
||||||
|
else \
|
||||||
|
col="$$red"; \
|
||||||
|
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
|
||||||
|
fi; \
|
||||||
|
echo "$${col}$$br$${std}"; \
|
||||||
|
echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
|
||||||
|
echo "$${col}$$br$${std}"; \
|
||||||
|
create_testsuite_report --maybe-color; \
|
||||||
|
echo "$$col$$br$$std"; \
|
||||||
|
if $$success; then :; else \
|
||||||
|
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
|
||||||
|
if test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||||
|
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
|
||||||
|
fi; \
|
||||||
|
echo "$$col$$br$$std"; \
|
||||||
|
fi; \
|
||||||
|
$$success || exit 1
|
||||||
|
|
||||||
|
check-TESTS: $(check_PROGRAMS)
|
||||||
|
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
|
||||||
|
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
|
||||||
|
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||||
|
@set +e; $(am__set_TESTS_bases); \
|
||||||
|
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||||
|
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
|
||||||
|
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
|
||||||
|
exit $$?;
|
||||||
|
recheck: all $(check_PROGRAMS)
|
||||||
|
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||||
|
@set +e; $(am__set_TESTS_bases); \
|
||||||
|
bases=`for i in $$bases; do echo $$i; done \
|
||||||
|
| $(am__list_recheck_tests)` || exit 1; \
|
||||||
|
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||||
|
log_list=`echo $$log_list`; \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
|
||||||
|
am__force_recheck=am--force-recheck \
|
||||||
|
TEST_LOGS="$$log_list"; \
|
||||||
|
exit $$?
|
||||||
|
t-001.log: t-001$(EXEEXT)
|
||||||
|
@p='t-001$(EXEEXT)'; \
|
||||||
|
b='t-001'; \
|
||||||
|
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
||||||
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||||
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
t-002.log: t-002$(EXEEXT)
|
||||||
|
@p='t-002$(EXEEXT)'; \
|
||||||
|
b='t-002'; \
|
||||||
|
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
||||||
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||||
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
t-003.log: t-003$(EXEEXT)
|
||||||
|
@p='t-003$(EXEEXT)'; \
|
||||||
|
b='t-003'; \
|
||||||
|
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
||||||
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||||
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
t-004.log: t-004$(EXEEXT)
|
||||||
|
@p='t-004$(EXEEXT)'; \
|
||||||
|
b='t-004'; \
|
||||||
|
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
||||||
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||||
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
t-005.log: t-005$(EXEEXT)
|
||||||
|
@p='t-005$(EXEEXT)'; \
|
||||||
|
b='t-005'; \
|
||||||
|
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
||||||
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||||
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
.test.log:
|
||||||
|
@p='$<'; \
|
||||||
|
$(am__set_b); \
|
||||||
|
$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
|
||||||
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
|
$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||||
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
|
||||||
|
@am__EXEEXT_TRUE@ @p='$<'; \
|
||||||
|
@am__EXEEXT_TRUE@ $(am__set_b); \
|
||||||
|
@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
|
||||||
|
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||||
|
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||||
|
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
@ -575,12 +941,11 @@ distdir-am: $(DISTFILES)
|
|||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile $(PROGRAMS)
|
all-am: Makefile
|
||||||
installdirs:
|
installdirs:
|
||||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
|
||||||
done
|
|
||||||
install: install-am
|
install: install-am
|
||||||
install-exec: install-exec-am
|
install-exec: install-exec-am
|
||||||
install-data: install-data-am
|
install-data: install-data-am
|
||||||
@ -601,6 +966,9 @@ install-strip:
|
|||||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
fi
|
fi
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
|
||||||
|
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
|
||||||
|
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||||
|
|
||||||
clean-generic:
|
clean-generic:
|
||||||
|
|
||||||
@ -613,13 +981,15 @@ maintainer-clean-generic:
|
|||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
|
||||||
|
mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
-rm -f ./$(DEPDIR)/t-001.Po
|
-rm -f ./$(DEPDIR)/t-001.Po
|
||||||
-rm -f ./$(DEPDIR)/t-002.Po
|
-rm -f ./$(DEPDIR)/t-002.Po
|
||||||
-rm -f ./$(DEPDIR)/t-003.Po
|
-rm -f ./$(DEPDIR)/t-003.Po
|
||||||
-rm -f ./$(DEPDIR)/t-004.Po
|
-rm -f ./$(DEPDIR)/t-004.Po
|
||||||
|
-rm -f ./$(DEPDIR)/t-005.Po
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-compile distclean-generic \
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
distclean-tags
|
distclean-tags
|
||||||
@ -642,7 +1012,7 @@ install-dvi: install-dvi-am
|
|||||||
|
|
||||||
install-dvi-am:
|
install-dvi-am:
|
||||||
|
|
||||||
install-exec-am: install-binPROGRAMS
|
install-exec-am:
|
||||||
|
|
||||||
install-html: install-html-am
|
install-html: install-html-am
|
||||||
|
|
||||||
@ -669,6 +1039,7 @@ maintainer-clean: maintainer-clean-am
|
|||||||
-rm -f ./$(DEPDIR)/t-002.Po
|
-rm -f ./$(DEPDIR)/t-002.Po
|
||||||
-rm -f ./$(DEPDIR)/t-003.Po
|
-rm -f ./$(DEPDIR)/t-003.Po
|
||||||
-rm -f ./$(DEPDIR)/t-004.Po
|
-rm -f ./$(DEPDIR)/t-004.Po
|
||||||
|
-rm -f ./$(DEPDIR)/t-005.Po
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
@ -685,15 +1056,15 @@ ps: ps-am
|
|||||||
|
|
||||||
ps-am:
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-binPROGRAMS
|
uninstall-am:
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
.MAKE: check-am install-am install-strip
|
||||||
|
|
||||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
|
||||||
clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
|
check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
|
||||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
cscopelist-am ctags ctags-am distclean distclean-compile \
|
||||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||||
html-am info info-am install install-am install-binPROGRAMS \
|
dvi-am html html-am info info-am install install-am \
|
||||||
install-data install-data-am install-dvi install-dvi-am \
|
install-data install-data-am install-dvi install-dvi-am \
|
||||||
install-exec install-exec-am install-html install-html-am \
|
install-exec install-exec-am install-html install-html-am \
|
||||||
install-info install-info-am install-man install-pdf \
|
install-info install-info-am install-man install-pdf \
|
||||||
@ -701,7 +1072,7 @@ uninstall-am: uninstall-binPROGRAMS
|
|||||||
installcheck installcheck-am installdirs maintainer-clean \
|
installcheck installcheck-am installdirs maintainer-clean \
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
|
recheck tags tags-am uninstall uninstall-am
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
.PRECIOUS: Makefile
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
#include <moo-fmt.h>
|
||||||
#include <moo-utl.h>
|
#include <moo-utl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include "t.h"
|
#include "t.h"
|
||||||
|
|
||||||
static int put_bcs (moo_fmtout_t* fmtout, const moo_bch_t* c, moo_oow_t len)
|
static int put_bcs (moo_fmtout_t* fmtout, const moo_bch_t* c, moo_oow_t len)
|
||||||
@ -40,8 +42,8 @@ static moo_ooi_t bfmt_out (const moo_bch_t* fmt, ...)
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
memset (&fmtout, 0, MOO_SIZEOF(fmtout));
|
memset (&fmtout, 0, MOO_SIZEOF(fmtout));
|
||||||
fmtout.putbcs = put_bcs;
|
fmtout.putbchars = put_bcs;
|
||||||
fmtout.putucs = put_ucs;
|
fmtout.putuchars = put_ucs;
|
||||||
|
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
n = moo_bfmt_outv (&fmtout, fmt, ap);
|
n = moo_bfmt_outv (&fmtout, fmt, ap);
|
||||||
|
59
moo/t/t-005.c
Normal file
59
moo/t/t-005.c
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#include <moo-xma.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include "t.h"
|
||||||
|
|
||||||
|
static void* sys_alloc (moo_mmgr_t* mmgr, moo_oow_t size)
|
||||||
|
{
|
||||||
|
return malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void* sys_realloc (moo_mmgr_t* mmgr, void* ptr, moo_oow_t size)
|
||||||
|
{
|
||||||
|
return realloc(ptr, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sys_free (moo_mmgr_t* mmgr, void* ptr)
|
||||||
|
{
|
||||||
|
free (ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static moo_mmgr_t sys_mmgr =
|
||||||
|
{
|
||||||
|
sys_alloc,
|
||||||
|
sys_realloc,
|
||||||
|
sys_free,
|
||||||
|
MOO_NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
void dumper (void* ctx, const char* fmt, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start (ap, fmt);
|
||||||
|
vprintf (fmt, ap);
|
||||||
|
va_end (ap);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
moo_xma_t* xma;
|
||||||
|
void* ptr1, * ptr2, * ptr3;
|
||||||
|
|
||||||
|
|
||||||
|
xma = moo_xma_open(&sys_mmgr, 0, 100000);
|
||||||
|
|
||||||
|
|
||||||
|
ptr1 = moo_xma_alloc(xma, 1000);
|
||||||
|
ptr2 = moo_xma_alloc(xma, 50);
|
||||||
|
ptr3 = moo_xma_alloc(xma, 1);
|
||||||
|
|
||||||
|
moo_xma_free (xma, ptr2);
|
||||||
|
moo_xma_free (xma, ptr1);
|
||||||
|
|
||||||
|
moo_xma_dump (xma, dumper, MOO_NULL);
|
||||||
|
moo_xma_close (xma);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -313,6 +313,7 @@ pdfdir = @pdfdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
|
runstatedir = @runstatedir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
|
@ -251,6 +251,7 @@ pdfdir = @pdfdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
|
runstatedir = @runstatedir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
|
Loading…
Reference in New Issue
Block a user