added floating-point formatting implementation in basic logging functions.
changed O_CLOEXEC to EPOLL_CLOEXEC in a call to epoll_create1()
This commit is contained in:
parent
088ea05e7b
commit
148e1468b7
@ -164,8 +164,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/ar-lib \
|
||||
$(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \
|
||||
$(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \
|
||||
$(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing ac/ar-lib \
|
||||
ac/compile ac/config.guess ac/config.sub ac/depcomp \
|
||||
ac/install-sh ac/ltmain.sh ac/missing
|
||||
ac/compile ac/config.guess ac/config.sub ac/install-sh \
|
||||
ac/ltmain.sh ac/missing
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
@ -338,6 +338,7 @@ pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
114
mio/ac/config.guess
generated
vendored
114
mio/ac/config.guess
generated
vendored
@ -2,7 +2,7 @@
|
||||
# Attempt to guess a canonical system name.
|
||||
# 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
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -84,6 +84,8 @@ if test $# != 0; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap 'exit 1' 1 2 15
|
||||
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
tmp=
|
||||
# shellcheck disable=SC2172
|
||||
trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
|
||||
trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
|
||||
|
||||
set_cc_for_build() {
|
||||
: "${TMPDIR=/tmp}"
|
||||
# shellcheck disable=SC2039
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
|
||||
dummy=$tmp/dummy
|
||||
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
||||
,,) echo "int x;" > "$dummy.c"
|
||||
for driver in cc gcc c89 c99 ; do
|
||||
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD="$driver"
|
||||
break
|
||||
fi
|
||||
done
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int x;" > "$dummy.c" ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac
|
||||
}
|
||||
esac ; set_cc_for_build= ;'
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (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
|
||||
fi
|
||||
|
||||
@ -141,7 +138,7 @@ Linux|GNU|GNU/*)
|
||||
# We could probably try harder.
|
||||
LIBC=gnu
|
||||
|
||||
set_cc_for_build
|
||||
eval "$set_cc_for_build"
|
||||
cat <<-EOF > "$dummy.c"
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
@ -202,7 +199,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
os=netbsdelf
|
||||
;;
|
||||
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 \
|
||||
| grep -q __ELF__
|
||||
then
|
||||
@ -240,7 +237,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "$machine-${os}${release}${abi-}"
|
||||
echo "$machine-${os}${release}${abi}"
|
||||
exit ;;
|
||||
*: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"
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
|
||||
case `isainfo -b` in
|
||||
32)
|
||||
echo i386-pc-solaris2"$UNAME_REL"
|
||||
;;
|
||||
64)
|
||||
echo x86_64-pc-solaris2"$UNAME_REL"
|
||||
;;
|
||||
esac
|
||||
eval "$set_cc_for_build"
|
||||
SUN_ARCH=i386
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
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 ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# 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"
|
||||
exit ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
set_cc_for_build
|
||||
eval "$set_cc_for_build"
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
@ -577,7 +579,7 @@ EOF
|
||||
exit ;;
|
||||
*:AIX:2:3)
|
||||
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"
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
@ -658,7 +660,7 @@ EOF
|
||||
esac
|
||||
fi
|
||||
if [ "$HP_ARCH" = "" ]; then
|
||||
set_cc_for_build
|
||||
eval "$set_cc_for_build"
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
@ -698,7 +700,7 @@ EOF
|
||||
esac
|
||||
if [ "$HP_ARCH" = hppa2.0w ]
|
||||
then
|
||||
set_cc_for_build
|
||||
eval "$set_cc_for_build"
|
||||
|
||||
# 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
|
||||
@ -724,7 +726,7 @@ EOF
|
||||
echo ia64-hp-hpux"$HPUX_REV"
|
||||
exit ;;
|
||||
3050*:HI-UX:*:*)
|
||||
set_cc_for_build
|
||||
eval "$set_cc_for_build"
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#include <unistd.h>
|
||||
int
|
||||
@ -838,17 +840,6 @@ EOF
|
||||
*:BSD/OS:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
|
||||
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:*:*)
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
case "$UNAME_PROCESSOR" in
|
||||
@ -903,8 +894,8 @@ EOF
|
||||
# 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"
|
||||
exit ;;
|
||||
*:Minix:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-minix
|
||||
i*86:Minix:*:*)
|
||||
echo "$UNAME_MACHINE"-pc-minix
|
||||
exit ;;
|
||||
aarch64:Linux:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
@ -931,7 +922,7 @@ EOF
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
set_cc_for_build
|
||||
eval "$set_cc_for_build"
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
@ -980,7 +971,7 @@ EOF
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
set_cc_for_build
|
||||
eval "$set_cc_for_build"
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#undef CPU
|
||||
#undef ${UNAME_MACHINE}
|
||||
@ -1055,7 +1046,11 @@ EOF
|
||||
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
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 ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
@ -1294,7 +1289,7 @@ EOF
|
||||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
set_cc_for_build
|
||||
eval "$set_cc_for_build"
|
||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
@ -1367,7 +1362,6 @@ EOF
|
||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||
# is converted to i386 for consistency with other x86
|
||||
# operating systems.
|
||||
# shellcheck disable=SC2154
|
||||
if test "$cputype" = 386; then
|
||||
UNAME_MACHINE=i386
|
||||
else
|
||||
@ -1479,7 +1473,7 @@ EOF
|
||||
exit 1
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# eval: (add-hook 'write-file-functions 'time-stamp)
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
|
2679
mio/ac/config.sub
generated
vendored
2679
mio/ac/config.sub
generated
vendored
File diff suppressed because it is too large
Load Diff
198
mio/ac/ltmain.sh
generated
198
mio/ac/ltmain.sh
generated
@ -31,7 +31,7 @@
|
||||
|
||||
PROGRAM=libtool
|
||||
PACKAGE=libtool
|
||||
VERSION=2.4.6
|
||||
VERSION="2.4.6 Debian-2.4.6-9"
|
||||
package_revision=2.4.6
|
||||
|
||||
|
||||
@ -1370,7 +1370,7 @@ func_lt_ver ()
|
||||
#! /bin/sh
|
||||
|
||||
# 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.
|
||||
# Written by Gary V. Vaughan, 2010
|
||||
@ -1530,6 +1530,8 @@ func_run_hooks ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
_G_rc_run_hooks=false
|
||||
|
||||
case " $hookable_fns " in
|
||||
*" $1 "*) ;;
|
||||
*) func_fatal_error "'$1' does not support hook funcions.n" ;;
|
||||
@ -1538,16 +1540,16 @@ func_run_hooks ()
|
||||
eval _G_hook_fns=\$$1_hooks; shift
|
||||
|
||||
for _G_hook in $_G_hook_fns; do
|
||||
eval $_G_hook '"$@"'
|
||||
|
||||
if eval $_G_hook '"$@"'; then
|
||||
# store returned options list back into positional
|
||||
# parameters for next 'cmd' execution.
|
||||
eval _G_hook_result=\$${_G_hook}_result
|
||||
eval set dummy "$_G_hook_result"; shift
|
||||
_G_rc_run_hooks=:
|
||||
fi
|
||||
done
|
||||
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
func_run_hooks_result=$func_quote_for_eval_result
|
||||
$_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
|
||||
}
|
||||
|
||||
|
||||
@ -1557,10 +1559,16 @@ func_run_hooks ()
|
||||
## --------------- ##
|
||||
|
||||
# In order to add your own option parsing hooks, you must accept the
|
||||
# full positional parameter list in your hook function, remove any
|
||||
# options that you action, and then pass back the remaining unprocessed
|
||||
# full positional parameter list in your hook function, you may remove/edit
|
||||
# any options that you action, and then pass back the remaining unprocessed
|
||||
# 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 ()
|
||||
# {
|
||||
@ -1570,9 +1578,11 @@ func_run_hooks ()
|
||||
# usage_message=$usage_message'
|
||||
# -s, --silent don'\''t print informational messages
|
||||
# '
|
||||
#
|
||||
# func_quote_for_eval ${1+"$@"}
|
||||
# my_options_prep_result=$func_quote_for_eval_result
|
||||
# # No change in '$@' (ignored completely by this hook). There is
|
||||
# # no need to do the equivalent (but slower) action:
|
||||
# # func_quote_for_eval ${1+"$@"}
|
||||
# # my_options_prep_result=$func_quote_for_eval_result
|
||||
# false
|
||||
# }
|
||||
# func_add_hook func_options_prep my_options_prep
|
||||
#
|
||||
@ -1581,25 +1591,37 @@ func_run_hooks ()
|
||||
# {
|
||||
# $debug_cmd
|
||||
#
|
||||
# args_changed=false
|
||||
#
|
||||
# # Note that for efficiency, we parse as many options as we can
|
||||
# # recognise in a loop before passing the remainder back to the
|
||||
# # caller on the first unrecognised argument we encounter.
|
||||
# while test $# -gt 0; do
|
||||
# opt=$1; shift
|
||||
# case $opt in
|
||||
# --silent|-s) opt_silent=: ;;
|
||||
# --silent|-s) opt_silent=:
|
||||
# args_changed=:
|
||||
# ;;
|
||||
# # Separate non-argument short options:
|
||||
# -s*) func_split_short_opt "$_G_opt"
|
||||
# set dummy "$func_split_short_opt_name" \
|
||||
# "-$func_split_short_opt_arg" ${1+"$@"}
|
||||
# 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
|
||||
# done
|
||||
#
|
||||
# if $args_changed; then
|
||||
# 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
|
||||
#
|
||||
@ -1611,16 +1633,32 @@ func_run_hooks ()
|
||||
# $opt_silent && $opt_verbose && func_fatal_help "\
|
||||
# '--silent' and '--verbose' options are mutually exclusive."
|
||||
#
|
||||
# func_quote_for_eval ${1+"$@"}
|
||||
# my_option_validation_result=$func_quote_for_eval_result
|
||||
# false
|
||||
# }
|
||||
# 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
|
||||
# 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]...
|
||||
# ---------------------
|
||||
# All the functions called inside func_options are hookable. See the
|
||||
@ -1630,17 +1668,28 @@ func_options ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
func_options_prep ${1+"$@"}
|
||||
eval func_parse_options \
|
||||
${func_options_prep_result+"$func_options_prep_result"}
|
||||
eval func_validate_options \
|
||||
${func_parse_options_result+"$func_parse_options_result"}
|
||||
_G_rc_options=false
|
||||
|
||||
eval func_run_hooks func_options \
|
||||
${func_validate_options_result+"$func_validate_options_result"}
|
||||
for my_func in options_prep parse_options validate_options options_finish
|
||||
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
|
||||
func_options_result=$func_run_hooks_result
|
||||
# Save modified positional parameters for caller. As a top-level
|
||||
# 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.
|
||||
# Note that when calling hook functions, we pass through the list of
|
||||
# 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
|
||||
# returning.
|
||||
# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
|
||||
func_hookable func_options_prep
|
||||
func_options_prep ()
|
||||
{
|
||||
@ -1661,10 +1710,14 @@ func_options_prep ()
|
||||
opt_verbose=false
|
||||
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
|
||||
|
||||
$_G_rc_options_prep
|
||||
}
|
||||
|
||||
|
||||
@ -1678,18 +1731,20 @@ func_parse_options ()
|
||||
|
||||
func_parse_options_result=
|
||||
|
||||
_G_rc_parse_options=false
|
||||
# this just eases exit handling
|
||||
while test $# -gt 0; do
|
||||
# Defer to hook functions for initial option parsing, so they
|
||||
# get priority in the event of reusing an option name.
|
||||
func_run_hooks func_parse_options ${1+"$@"}
|
||||
|
||||
# Adjust func_parse_options positional parameters to match
|
||||
if func_run_hooks func_parse_options ${1+"$@"}; then
|
||||
eval set dummy "$func_run_hooks_result"; shift
|
||||
_G_rc_parse_options=:
|
||||
fi
|
||||
|
||||
# Break out of the loop if we already parsed every option.
|
||||
test $# -gt 0 || break
|
||||
|
||||
_G_match_parse_options=:
|
||||
_G_opt=$1
|
||||
shift
|
||||
case $_G_opt in
|
||||
@ -1704,7 +1759,10 @@ func_parse_options ()
|
||||
;;
|
||||
|
||||
--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
|
||||
*" $1 "*)
|
||||
# trailing space prevents matching last $1 above
|
||||
@ -1757,15 +1815,25 @@ func_parse_options ()
|
||||
shift
|
||||
;;
|
||||
|
||||
--) break ;;
|
||||
--) _G_rc_parse_options=: ; break ;;
|
||||
-*) 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
|
||||
|
||||
$_G_match_parse_options && _G_rc_parse_options=:
|
||||
done
|
||||
|
||||
|
||||
if $_G_rc_parse_options; then
|
||||
# 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
|
||||
|
||||
_G_rc_validate_options=false
|
||||
|
||||
# Display all warnings if -W was not given.
|
||||
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!
|
||||
$exit_cmd $EXIT_FAILURE
|
||||
|
||||
# save modified positional parameters for caller
|
||||
func_validate_options_result=$func_run_hooks_result
|
||||
$_G_rc_validate_options
|
||||
}
|
||||
|
||||
|
||||
@ -2068,12 +2141,12 @@ include the following information:
|
||||
compiler: $LTCC
|
||||
compiler flags: $LTCFLAGS
|
||||
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`
|
||||
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
|
||||
|
||||
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/>."
|
||||
exit 0
|
||||
}
|
||||
@ -2124,7 +2197,7 @@ fi
|
||||
# a configuration failure hint, and exit.
|
||||
func_fatal_configuration ()
|
||||
{
|
||||
func_fatal_error ${1+"$@"} \
|
||||
func__fatal_error ${1+"$@"} \
|
||||
"See the $PACKAGE documentation for more information." \
|
||||
"Fatal configuration error."
|
||||
}
|
||||
@ -2270,6 +2343,8 @@ libtool_options_prep ()
|
||||
nonopt=
|
||||
preserve_args=
|
||||
|
||||
_G_rc_lt_options_prep=:
|
||||
|
||||
# Shorthand for --mode=foo, only valid as the first argument
|
||||
case $1 in
|
||||
clean|clea|cle|cl)
|
||||
@ -2293,11 +2368,18 @@ libtool_options_prep ()
|
||||
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
|
||||
shift; set dummy --mode uninstall ${1+"$@"}; shift
|
||||
;;
|
||||
*)
|
||||
_G_rc_lt_options_prep=false
|
||||
;;
|
||||
esac
|
||||
|
||||
if $_G_rc_lt_options_prep; then
|
||||
# Pass back the list of options.
|
||||
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
|
||||
|
||||
@ -2309,9 +2391,12 @@ libtool_parse_options ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
_G_rc_lt_parse_options=false
|
||||
|
||||
# Perform our own loop to consume as many options as possible in
|
||||
# each iteration.
|
||||
while test $# -gt 0; do
|
||||
_G_match_lt_parse_options=:
|
||||
_G_opt=$1
|
||||
shift
|
||||
case $_G_opt in
|
||||
@ -2387,14 +2472,21 @@ libtool_parse_options ()
|
||||
;;
|
||||
|
||||
# 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
|
||||
$_G_match_lt_parse_options && _G_rc_lt_parse_options=:
|
||||
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
|
||||
|
||||
$_G_rc_lt_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
|
||||
# -specs=* GCC specs files
|
||||
# -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*| \
|
||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
||||
-specs=*)
|
||||
-specs=*|-fsanitize=*|-fuse-ld=*)
|
||||
func_quote_for_eval "$arg"
|
||||
arg=$func_quote_for_eval_result
|
||||
func_append compile_command " $arg"
|
||||
@ -7570,7 +7664,10 @@ func_mode_link ()
|
||||
case $pass in
|
||||
dlopen) libs=$dlfiles ;;
|
||||
dlpreopen) libs=$dlprefiles ;;
|
||||
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
|
||||
link)
|
||||
libs="$deplibs %DEPLIBS%"
|
||||
test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test lib,dlpreopen = "$linkmode,$pass"; then
|
||||
@ -7889,9 +7986,6 @@ func_mode_link ()
|
||||
# It is a libtool convenience library, so add in its objects.
|
||||
func_append convenience " $ladir/$objdir/$old_library"
|
||||
func_append old_convenience " $ladir/$objdir/$old_library"
|
||||
elif test prog != "$linkmode" && test lib != "$linkmode"; then
|
||||
func_fatal_error "'$lib' is not a convenience library"
|
||||
fi
|
||||
tmp_libs=
|
||||
for deplib in $dependency_libs; do
|
||||
deplibs="$deplib $deplibs"
|
||||
@ -7902,6 +7996,9 @@ func_mode_link ()
|
||||
fi
|
||||
func_append tmp_libs " $deplib"
|
||||
done
|
||||
elif test prog != "$linkmode" && test lib != "$linkmode"; then
|
||||
func_fatal_error "'$lib' is not a convenience library"
|
||||
fi
|
||||
continue
|
||||
fi # $pass = conv
|
||||
|
||||
@ -8825,6 +8922,9 @@ func_mode_link ()
|
||||
revision=$number_minor
|
||||
lt_irix_increment=no
|
||||
;;
|
||||
*)
|
||||
func_fatal_configuration "$modename: unknown library version type '$version_type'"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
no)
|
||||
|
@ -15,7 +15,7 @@ LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir)
|
||||
|
||||
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON)
|
||||
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -no-undefined
|
||||
LIBADD_LIB_COMMON = $(LIBM)
|
||||
LIBADD_LIB_COMMON =
|
||||
|
||||
bin_PROGRAMS = mio-execd
|
||||
mio_execd_SOURCES = execd.c
|
||||
|
@ -111,8 +111,7 @@ PROGRAMS = $(bin_PROGRAMS)
|
||||
am_mio_execd_OBJECTS = mio_execd-execd.$(OBJEXT)
|
||||
mio_execd_OBJECTS = $(am_mio_execd_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
|
||||
mio_execd_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
|
||||
mio_execd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
@ -123,42 +122,42 @@ mio_execd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(mio_execd_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_mio_t01_OBJECTS = mio_t01-t01.$(OBJEXT)
|
||||
mio_t01_OBJECTS = $(am_mio_t01_OBJECTS)
|
||||
mio_t01_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
|
||||
mio_t01_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
mio_t01_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(mio_t01_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_mio_t02_OBJECTS = mio_t02-t02.$(OBJEXT)
|
||||
mio_t02_OBJECTS = $(am_mio_t02_OBJECTS)
|
||||
mio_t02_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
|
||||
mio_t02_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
mio_t02_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(mio_t02_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_mio_t03_OBJECTS = mio_t03-t03.$(OBJEXT)
|
||||
mio_t03_OBJECTS = $(am_mio_t03_OBJECTS)
|
||||
mio_t03_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
|
||||
mio_t03_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
mio_t03_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(mio_t03_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_mio_t04_OBJECTS = mio_t04-t04.$(OBJEXT)
|
||||
mio_t04_OBJECTS = $(am_mio_t04_OBJECTS)
|
||||
mio_t04_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
|
||||
mio_t04_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
mio_t04_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(mio_t04_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_mio_t05_OBJECTS = mio_t05-t05.$(OBJEXT)
|
||||
mio_t05_OBJECTS = $(am_mio_t05_OBJECTS)
|
||||
mio_t05_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
|
||||
mio_t05_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
mio_t05_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(mio_t05_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_mio_t06_OBJECTS = mio_t06-t06.$(OBJEXT)
|
||||
mio_t06_OBJECTS = $(am_mio_t06_OBJECTS)
|
||||
mio_t06_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
|
||||
mio_t06_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
mio_t06_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
@ -363,6 +362,7 @@ pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
@ -386,7 +386,7 @@ LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir)
|
||||
##################################################
|
||||
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON)
|
||||
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -no-undefined
|
||||
LIBADD_LIB_COMMON = $(LIBM)
|
||||
LIBADD_LIB_COMMON =
|
||||
mio_execd_SOURCES = execd.c
|
||||
mio_execd_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
||||
mio_execd_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
||||
|
100
mio/configure
vendored
100
mio/configure
vendored
@ -761,6 +761,7 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@ -851,6 +852,7 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
@ -1103,6 +1105,15 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
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)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@ -1240,7 +1251,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir
|
||||
libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@ -1393,6 +1404,7 @@ Fine tuning of the installation directories:
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@ -6535,7 +6547,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
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)$'
|
||||
else
|
||||
@ -7398,11 +7410,8 @@ _LT_EOF
|
||||
test $ac_status = 0; }; then
|
||||
# Now try to grab the symbols.
|
||||
nlist=conftest.nm
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$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
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; } && test -s "$nlist"; then
|
||||
$ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
|
||||
if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
|
||||
# Try sorting and uniquifying the output.
|
||||
if sort "$nlist" | uniq > "$nlist"T; then
|
||||
mv -f "$nlist"T "$nlist"
|
||||
@ -10227,6 +10236,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
|
||||
openbsd* | bitrig*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
linux* | k*bsd*-gnu | gnu*)
|
||||
link_all_deplibs=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
@ -10481,7 +10493,7 @@ _LT_EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
wlarc=
|
||||
@ -11151,6 +11163,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
|
||||
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'
|
||||
fi
|
||||
link_all_deplibs=no
|
||||
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_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'
|
||||
@ -11172,7 +11185,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
|
||||
esac
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
|
||||
else
|
||||
@ -12267,9 +12280,6 @@ fi
|
||||
# before this can be enabled.
|
||||
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
|
||||
# searched for libraries, however this is still not possible. Aside from not
|
||||
# being certain /sbin/ldconfig is available, command
|
||||
@ -12278,7 +12288,7 @@ fi
|
||||
# appending ld.so.conf contents (and includes) to the search path.
|
||||
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' ' '`
|
||||
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
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
@ -12290,6 +12300,18 @@ fi
|
||||
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*)
|
||||
version_type=sunos
|
||||
need_lib_prefix=no
|
||||
@ -13334,7 +13356,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
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
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@ -13380,7 +13402,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
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
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@ -13404,7 +13426,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
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
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@ -13449,7 +13471,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
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
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@ -13473,7 +13495,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
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
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@ -14211,47 +14233,6 @@ _ACEOF
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
OLDLIBS="$LIBS"
|
||||
LIBS="$LIBM $LIBS"
|
||||
for ac_func in powl fmodl sinl cosl tanl sinhl coshl tanhl asinl acosl atanl atan2l logl log10l expl sqrtl ceill floorl roundl
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in pow fmod sin cos tan sinh cosh tanh asin acos atan atan2 log log10 exp sqrt ceil floor round
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in powf fmodf sinf cosf tanf sinhf coshf tanhf asinf acosf atanf atan2f logf log10f expf sqrtf ceilf floorf roundf
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
LIBS="$OLDLIBS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
|
||||
$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
|
||||
if ${ac_cv_lib_rt_clock_gettime+:} false; then :
|
||||
@ -20780,7 +20761,6 @@ See \`config.log' for more details" "$LINENO" 5; }
|
||||
cat <<_LT_EOF >> "$cfgfile"
|
||||
#! $SHELL
|
||||
# Generated automatically by $as_me ($PACKAGE) $VERSION
|
||||
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
|
||||
# Provide generalized library-building support services.
|
||||
|
@ -143,14 +143,6 @@ AC_CHECK_FUNCS([makecontext swapcontext getcontext setcontext])
|
||||
AC_CHECK_FUNCS([snprintf _vsnprintf _vsnwprintf])
|
||||
AC_CHECK_FUNCS([pipe2 accept4 sendmsg recvmsg writev readv])
|
||||
AC_CHECK_FUNCS([isatty mmap munmap])
|
||||
|
||||
OLDLIBS="$LIBS"
|
||||
LIBS="$LIBM $LIBS"
|
||||
AC_CHECK_FUNCS([powl fmodl sinl cosl tanl sinhl coshl tanhl asinl acosl atanl atan2l logl log10l expl sqrtl ceill floorl roundl])
|
||||
AC_CHECK_FUNCS([pow fmod sin cos tan sinh cosh tanh asin acos atan atan2 log log10 exp sqrt ceil floor round])
|
||||
AC_CHECK_FUNCS([powf fmodf sinf cosf tanf sinhf coshf tanhf asinf acosf atanf atan2f logf log10f expf sqrtf ceilf floorf roundf])
|
||||
LIBS="$OLDLIBS"
|
||||
|
||||
AC_CHECK_LIB([rt], [clock_gettime], [LIBS="$LIBS -lrt"])
|
||||
|
||||
dnl OLDLIBS="$LIBS"
|
||||
|
@ -13,6 +13,9 @@ LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
|
||||
|
||||
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON)
|
||||
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
|
||||
|
||||
# $(LIBM) here for quadmath_snprintf() in libquadmath
|
||||
# TODO: make this selective by moving MIO_ENABLE_FLTFMT to configure.ac
|
||||
LIBADD_LIB_COMMON = $(LIBM)
|
||||
|
||||
#pkgincludedir = $(includedir)
|
||||
|
@ -403,6 +403,7 @@ pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
@ -424,6 +425,9 @@ LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
|
||||
##################################################
|
||||
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON)
|
||||
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
|
||||
|
||||
# $(LIBM) here for quadmath_snprintf() in libquadmath
|
||||
# TODO: make this selective by moving MIO_ENABLE_FLTFMT to configure.ac
|
||||
LIBADD_LIB_COMMON = $(LIBM)
|
||||
|
||||
#pkgincludedir = $(includedir)
|
||||
|
208
mio/lib/fmt.c
208
mio/lib/fmt.c
@ -68,7 +68,8 @@
|
||||
#include "mio-prv.h"
|
||||
|
||||
|
||||
#if 0
|
||||
#if defined(MIO_ENABLE_FLTFMT)
|
||||
|
||||
#include <stdio.h> /* for snrintf(). used for floating-point number formatting */
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && (__WATCOMC__ < 1200))
|
||||
# define snprintf _snprintf
|
||||
@ -79,6 +80,7 @@
|
||||
#if defined(HAVE_QUADMATH_H)
|
||||
# include <quadmath.h> /* for quadmath_snprintf() */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Max number conversion buffer length:
|
||||
@ -287,10 +289,25 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
mio_bch_t nbuf[MAXNBUF];
|
||||
const mio_bch_t* nbufp;
|
||||
int stop = 0;
|
||||
#if 0
|
||||
mio_bchbuf_t* fltfmt;
|
||||
mio_oochbuf_t* fltout;
|
||||
|
||||
#if defined(MIO_ENABLE_FLTFMT)
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
mio_bch_t sbuf[32];
|
||||
mio_bch_t* ptr;
|
||||
mio_oow_t capa;
|
||||
} fmt;
|
||||
struct
|
||||
{
|
||||
mio_bch_t sbuf[64];
|
||||
mio_bch_t* ptr;
|
||||
mio_oow_t capa;
|
||||
} out;
|
||||
} fb; /* some buffers for handling float-point number formatting */
|
||||
#endif
|
||||
|
||||
mio_bch_t* (*sprintn) (mio_bch_t* nbuf, mio_uintmax_t num, int base, mio_ooi_t* lenp);
|
||||
|
||||
fmtptr = (const mio_uint8_t*)fmtout->fmt_str;
|
||||
@ -306,16 +323,11 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
|
||||
/* this is an internal function. it doesn't reset count to 0 */
|
||||
/* fmtout->count = 0; */
|
||||
|
||||
#if 0
|
||||
fltfmt = &mio->d->fltfmt;
|
||||
fltout = &mio->d->fltout;
|
||||
|
||||
fltfmt->ptr = fltfmt->buf;
|
||||
fltfmt->capa = MIO_COUNTOF(fltfmt->buf) - 1;
|
||||
|
||||
fltout->ptr = fltout->buf;
|
||||
fltout->capa = MIO_COUNTOF(fltout->buf) - 1;
|
||||
#if defined(MIO_ENABLE_FLTFMT)
|
||||
fb.fmt.ptr = fb.fmt.sbuf;
|
||||
fb.fmt.capa = MIO_COUNTOF(fb.fmt.sbuf) - 1;
|
||||
fb.out.ptr = fb.out.sbuf;
|
||||
fb.out.capa = MIO_COUNTOF(fb.out.sbuf) - 1;
|
||||
#endif
|
||||
|
||||
while (1)
|
||||
@ -429,7 +441,6 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
flagc &= ~FLAGC_ZEROPAD;
|
||||
}
|
||||
}
|
||||
|
||||
goto reswitch;
|
||||
|
||||
case '*': /* take the length from the parameter */
|
||||
@ -515,7 +526,7 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
case 'q': /* long long int */
|
||||
case 'j': /* mio_intmax_t/mio_uintmax_t */
|
||||
case 'z': /* mio_ooi_t/mio_oow_t */
|
||||
case 't': /* ptrdiff_t */
|
||||
case 't': /* ptrdiff_t - usually mio_intptr_t */
|
||||
if (lm_flag & (LF_LD | LF_QD)) goto invalid_format;
|
||||
|
||||
flagc |= FLAGC_LENMOD;
|
||||
@ -874,6 +885,13 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
}
|
||||
|
||||
#if 0
|
||||
case 'O': /* object - ignore precision, width, adjustment */
|
||||
if (!fmtout->putobj) goto invalid_format;
|
||||
if (fmtout->putobj(fmtout, va_arg(ap, mio_oop_t)) <= -1) goto oops;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(MIO_ENABLE_FLTFMT)
|
||||
case 'e':
|
||||
case 'E':
|
||||
case 'f':
|
||||
@ -888,23 +906,27 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
/* let me rely on snprintf until i implement float-point to string conversion */
|
||||
int q;
|
||||
mio_oow_t fmtlen;
|
||||
union
|
||||
{
|
||||
#if (MIO_SIZEOF___FLOAT128 > 0) && defined(HAVE_QUADMATH_SNPRINTF)
|
||||
__float128 v_qd;
|
||||
__float128 qd;
|
||||
#endif
|
||||
long double v_ld;
|
||||
double v_d;
|
||||
long double ld;
|
||||
double d;
|
||||
} v;
|
||||
int dtype = 0;
|
||||
mio_oow_t newcapa;
|
||||
mio_bch_t* bsp;
|
||||
|
||||
if (lm_flag & LF_J)
|
||||
{
|
||||
#if (MIO_SIZEOF___FLOAT128 > 0) && defined(HAVE_QUADMATH_SNPRINTF) && (MIO_SIZEOF_FLTMAX_T == MIO_SIZEOF___FLOAT128)
|
||||
v_qd = va_arg (ap, mio_fltmax_t);
|
||||
v.qd = va_arg(ap, mio_fltmax_t);
|
||||
dtype = LF_QD;
|
||||
#elif MIO_SIZEOF_FLTMAX_T == MIO_SIZEOF_DOUBLE
|
||||
v_d = va_arg(ap, mio_fltmax_t);
|
||||
v.d = va_arg(ap, mio_fltmax_t);
|
||||
#elif MIO_SIZEOF_FLTMAX_T == MIO_SIZEOF_LONG_DOUBLE
|
||||
v_ld = va_arg(ap, mio_fltmax_t);
|
||||
v.ld = va_arg(ap, mio_fltmax_t);
|
||||
dtype = LF_LD;
|
||||
#else
|
||||
#error Unsupported mio_flt_t
|
||||
@ -919,9 +941,9 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
* so i prefer the format specifier with no modifier.
|
||||
*/
|
||||
#if MIO_SIZEOF_FLT_T == MIO_SIZEOF_DOUBLE
|
||||
v_d = va_arg(ap, mio_flt_t);
|
||||
v.d = va_arg(ap, mio_flt_t);
|
||||
#elif MIO_SIZEOF_FLT_T == MIO_SIZEOF_LONG_DOUBLE
|
||||
v_ld = va_arg(ap, mio_flt_t);
|
||||
v.ld = va_arg(ap, mio_flt_t);
|
||||
dtype = LF_LD;
|
||||
#else
|
||||
#error Unsupported mio_flt_t
|
||||
@ -929,13 +951,13 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
}
|
||||
else if (lm_flag & (LF_LD | LF_L))
|
||||
{
|
||||
v_ld = va_arg (ap, long double);
|
||||
v.ld = va_arg(ap, long double);
|
||||
dtype = LF_LD;
|
||||
}
|
||||
#if (MIO_SIZEOF___FLOAT128 > 0) && defined(HAVE_QUADMATH_SNPRINTF)
|
||||
else if (lm_flag & (LF_QD | LF_Q))
|
||||
{
|
||||
v_qd = va_arg(ap, __float128);
|
||||
v.qd = va_arg(ap, __float128);
|
||||
dtype = LF_QD;
|
||||
}
|
||||
#endif
|
||||
@ -945,63 +967,63 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
}
|
||||
else
|
||||
{
|
||||
v_d = va_arg (ap, double);
|
||||
v.d = va_arg(ap, double);
|
||||
}
|
||||
|
||||
fmtlen = fmt - percent;
|
||||
if (fmtlen > fltfmt->capa)
|
||||
fmtlen = fmtptr - percent;
|
||||
if (fmtlen > fb.fmt.capa)
|
||||
{
|
||||
if (fltfmt->ptr == fltfmt->buf)
|
||||
if (fb.fmt.ptr == fb.fmt.sbuf)
|
||||
{
|
||||
fltfmt->ptr = MIO_MMGR_ALLOC(MIO_MMGR_GETDFL(), MIO_SIZEOF(*fltfmt->ptr) * (fmtlen + 1));
|
||||
if (!fltfmt->ptr) goto oops;
|
||||
fb.fmt.ptr = (mio_bch_t*)MIO_MMGR_ALLOC(fmtout->mmgr, MIO_SIZEOF(*fb.fmt.ptr) * (fmtlen + 1));
|
||||
if (!fb.fmt.ptr) goto oops;
|
||||
}
|
||||
else
|
||||
{
|
||||
mio_bch_t* tmpptr;
|
||||
|
||||
tmpptr = MIO_MMGR_REALLOC(MIO_MMGR_GETDFL(), fltfmt->ptr, MIO_SIZEOF(*fltfmt->ptr) * (fmtlen + 1));
|
||||
tmpptr = (mio_bch_t*)MIO_MMGR_REALLOC(fmtout->mmgr, fb.fmt.ptr, MIO_SIZEOF(*fb.fmt.ptr) * (fmtlen + 1));
|
||||
if (!tmpptr) goto oops;
|
||||
fltfmt->ptr = tmpptr;
|
||||
fb.fmt.ptr = tmpptr;
|
||||
}
|
||||
|
||||
fltfmt->capa = fmtlen;
|
||||
fb.fmt.capa = fmtlen;
|
||||
}
|
||||
|
||||
/* compose back the format specifier */
|
||||
fmtlen = 0;
|
||||
fltfmt->ptr[fmtlen++] = '%';
|
||||
if (flagc & FLAGC_SPACE) fltfmt->ptr[fmtlen++] = ' ';
|
||||
if (flagc & FLAGC_SHARP) fltfmt->ptr[fmtlen++] = '#';
|
||||
if (flagc & FLAGC_SIGN) fltfmt->ptr[fmtlen++] = '+';
|
||||
if (flagc & FLAGC_LEFTADJ) fltfmt->ptr[fmtlen++] = '-';
|
||||
if (flagc & FLAGC_ZEROPAD) fltfmt->ptr[fmtlen++] = '0';
|
||||
fb.fmt.ptr[fmtlen++] = '%';
|
||||
if (flagc & FLAGC_SPACE) fb.fmt.ptr[fmtlen++] = ' ';
|
||||
if (flagc & FLAGC_SHARP) fb.fmt.ptr[fmtlen++] = '#';
|
||||
if (flagc & FLAGC_SIGN) fb.fmt.ptr[fmtlen++] = '+';
|
||||
if (flagc & FLAGC_LEFTADJ) fb.fmt.ptr[fmtlen++] = '-';
|
||||
if (flagc & FLAGC_ZEROPAD) fb.fmt.ptr[fmtlen++] = '0';
|
||||
|
||||
if (flagc & FLAGC_STAR1) fltfmt->ptr[fmtlen++] = '*';
|
||||
if (flagc & FLAGC_STAR1) fb.fmt.ptr[fmtlen++] = '*';
|
||||
else if (flagc & FLAGC_WIDTH)
|
||||
{
|
||||
fmtlen += mio_fmtuintmaxtombs (
|
||||
&fltfmt->ptr[fmtlen], fltfmt->capa - fmtlen,
|
||||
fmtlen += mio_fmt_uintmax_to_bcstr(
|
||||
&fb.fmt.ptr[fmtlen], fb.fmt.capa - fmtlen,
|
||||
width, 10, -1, '\0', MIO_NULL);
|
||||
}
|
||||
if (flagc & FLAGC_DOT) fltfmt->ptr[fmtlen++] = '.';
|
||||
if (flagc & FLAGC_STAR2) fltfmt->ptr[fmtlen++] = '*';
|
||||
if (flagc & FLAGC_DOT) fb.fmt.ptr[fmtlen++] = '.';
|
||||
if (flagc & FLAGC_STAR2) fb.fmt.ptr[fmtlen++] = '*';
|
||||
else if (flagc & FLAGC_PRECISION)
|
||||
{
|
||||
fmtlen += mio_fmtuintmaxtombs (
|
||||
&fltfmt->ptr[fmtlen], fltfmt->capa - fmtlen,
|
||||
fmtlen += mio_fmt_uintmax_to_bcstr(
|
||||
&fb.fmt.ptr[fmtlen], fb.fmt.capa - fmtlen,
|
||||
precision, 10, -1, '\0', MIO_NULL);
|
||||
}
|
||||
|
||||
if (dtype == LF_LD)
|
||||
fltfmt->ptr[fmtlen++] = 'L';
|
||||
fb.fmt.ptr[fmtlen++] = 'L';
|
||||
#if (MIO_SIZEOF___FLOAT128 > 0)
|
||||
else if (dtype == LF_QD)
|
||||
fltfmt->ptr[fmtlen++] = 'Q';
|
||||
fb.fmt.ptr[fmtlen++] = 'Q';
|
||||
#endif
|
||||
|
||||
fltfmt->ptr[fmtlen++] = ch;
|
||||
fltfmt->ptr[fmtlen] = '\0';
|
||||
fb.fmt.ptr[fmtlen++] = uch;
|
||||
fb.fmt.ptr[fmtlen] = '\0';
|
||||
|
||||
#if defined(HAVE_SNPRINTF)
|
||||
/* nothing special here */
|
||||
@ -1009,78 +1031,64 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
/* best effort to avoid buffer overflow when no snprintf is available.
|
||||
* i really can't do much if it happens. */
|
||||
newcapa = precision + width + 32;
|
||||
if (fltout->capa < newcapa)
|
||||
if (fb.out.capa < newcapa)
|
||||
{
|
||||
MIO_ASSERT (mio, fltout->ptr == fltout->buf);
|
||||
|
||||
fltout->ptr = MIO_MMGR_ALLOC(MIO_MMGR_GETDFL(), MIO_SIZEOF(char_t) * (newcapa + 1));
|
||||
if (!fltout->ptr) goto oops;
|
||||
fltout->capa = newcapa;
|
||||
/*MIO_ASSERT (mio, fb.out.ptr == fb.out.sbuf);*/
|
||||
fb.out.ptr = MIO_MMGR_ALLOC(fmtout->mmgr, MIO_SIZEOF(mio_bch_t) * (newcapa + 1));
|
||||
if (!fb.out.ptr) goto oops;
|
||||
fb.out.capa = newcapa;
|
||||
}
|
||||
#endif
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
||||
if (dtype == LF_LD)
|
||||
{
|
||||
#if defined(HAVE_SNPRINTF)
|
||||
q = snprintf ((mio_bch_t*)fltout->ptr, fltout->capa + 1, fltfmt->ptr, v_ld);
|
||||
q = snprintf((mio_bch_t*)fb.out.ptr, fb.out.capa + 1, fb.fmt.ptr, v.ld);
|
||||
#else
|
||||
q = sprintf ((mio_bch_t*)fltout->ptr, fltfmt->ptr, v_ld);
|
||||
q = sprintf((mio_bch_t*)fb.out.ptr, fb.fmt.ptr, v.ld);
|
||||
#endif
|
||||
}
|
||||
#if (MIO_SIZEOF___FLOAT128 > 0) && defined(HAVE_QUADMATH_SNPRINTF)
|
||||
else if (dtype == LF_QD)
|
||||
{
|
||||
q = quadmath_snprintf((mio_bch_t*)fltout->ptr, fltout->capa + 1, fltfmt->ptr, v_qd);
|
||||
q = quadmath_snprintf((mio_bch_t*)fb.out.ptr, fb.out.capa + 1, fb.fmt.ptr, v.qd);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
#if defined(HAVE_SNPRINTF)
|
||||
q = snprintf ((mio_bch_t*)fltout->ptr, fltout->capa + 1, fltfmt->ptr, v_d);
|
||||
q = snprintf((mio_bch_t*)fb.out.ptr, fb.out.capa + 1, fb.fmt.ptr, v.d);
|
||||
#else
|
||||
q = sprintf ((mio_bch_t*)fltout->ptr, fltfmt->ptr, v_d);
|
||||
q = sprintf((mio_bch_t*)fb.out.ptr, fb.fmt.ptr, v.d);
|
||||
#endif
|
||||
}
|
||||
if (q <= -1) goto oops;
|
||||
if (q <= fltout->capa) break;
|
||||
if (q <= fb.out.capa) break;
|
||||
|
||||
newcapa = fltout->capa * 2;
|
||||
newcapa = fb.out.capa * 2;
|
||||
if (newcapa < q) newcapa = q;
|
||||
|
||||
if (fltout->ptr == fltout->sbuf)
|
||||
if (fb.out.ptr == fb.out.sbuf)
|
||||
{
|
||||
fltout->ptr = MIO_MMGR_ALLOC(MIO_MMGR_GETDFL(), MIO_SIZEOF(char_t) * (newcapa + 1));
|
||||
if (!fltout->ptr) goto oops;
|
||||
fb.out.ptr = (mio_bch_t*)MIO_MMGR_ALLOC(fmtout->mmgr, MIO_SIZEOF(mio_bch_t) * (newcapa + 1));
|
||||
if (!fb.out.ptr) goto oops;
|
||||
}
|
||||
else
|
||||
{
|
||||
char_t* tmpptr;
|
||||
|
||||
tmpptr = MIO_MMGR_REALLOC(MIO_MMGR_GETDFL(), fltout->ptr, MIO_SIZEOF(char_t) * (newcapa + 1));
|
||||
mio_bch_t* tmpptr;
|
||||
tmpptr = (mio_bch_t*)MIO_MMGR_REALLOC(fmtout->mmgr, fb.out.ptr, MIO_SIZEOF(mio_bch_t) * (newcapa + 1));
|
||||
if (!tmpptr) goto oops;
|
||||
fltout->ptr = tmpptr;
|
||||
fb.out.ptr = tmpptr;
|
||||
}
|
||||
fltout->capa = newcapa;
|
||||
fb.out.capa = newcapa;
|
||||
}
|
||||
|
||||
if (MIO_SIZEOF(char_t) != MIO_SIZEOF(mio_bch_t))
|
||||
{
|
||||
fltout->ptr[q] = '\0';
|
||||
while (q > 0)
|
||||
{
|
||||
q--;
|
||||
fltout->ptr[q] = ((mio_bch_t*)fltout->ptr)[q];
|
||||
}
|
||||
}
|
||||
|
||||
sp = fltout->ptr;
|
||||
flagc &= ~FLAGC_DOT;
|
||||
width = 0;
|
||||
precision = 0;
|
||||
goto print_lowercase_s;
|
||||
bsp = fb.out.ptr;
|
||||
n = 0; while (bsp[n] != '\0') n++;
|
||||
PUT_BCS (fmtout, bsp, n);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1092,7 +1100,7 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
(MIO_SIZEOF_UINTMAX_T > MIO_SIZEOF_OOW_T) && \
|
||||
(MIO_SIZEOF_UINTMAX_T != MIO_SIZEOF_LONG_LONG) && \
|
||||
(MIO_SIZEOF_UINTMAX_T != MIO_SIZEOF_LONG)
|
||||
/* Binaries by some GCC compilers crashed when getting mio_uintmax_t with va_arg.
|
||||
/* GCC-compiled binaries crashed when getting mio_uintmax_t with va_arg.
|
||||
* This is just a work-around for it */
|
||||
int i;
|
||||
for (i = 0, num = 0; i < MIO_SIZEOF(mio_uintmax_t) / MIO_SIZEOF(mio_oow_t); i++)
|
||||
@ -1109,10 +1117,8 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
num = va_arg(ap, mio_uintmax_t);
|
||||
#endif
|
||||
}
|
||||
#if 0
|
||||
else if (lm_flag & LF_T)
|
||||
num = va_arg(ap, mio_ptrdiff_t);
|
||||
#endif
|
||||
num = va_arg(ap, mio_intptr_t/*mio_ptrdiff_t*/);
|
||||
else if (lm_flag & LF_Z)
|
||||
num = va_arg(ap, mio_oow_t);
|
||||
#if (MIO_SIZEOF_LONG_LONG > 0)
|
||||
@ -1154,10 +1160,8 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
else if (lm_flag & LF_T)
|
||||
num = va_arg(ap, mio_ptrdiff_t);
|
||||
#endif
|
||||
num = va_arg(ap, mio_intptr_t/*mio_ptrdiff_t*/);
|
||||
else if (lm_flag & LF_Z)
|
||||
num = va_arg(ap, mio_ooi_t);
|
||||
#if (MIO_SIZEOF_LONG_LONG > 0)
|
||||
@ -1236,7 +1240,6 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
PUT_OOCH (fmtout, padc, width);
|
||||
}
|
||||
|
||||
|
||||
while (*nbufp) PUT_OOCH (fmtout, *nbufp--, 1); /* output actual digits */
|
||||
|
||||
if ((flagc & FLAGC_LEFTADJ) && width > 0 && (width -= tmp) > 0)
|
||||
@ -1279,9 +1282,17 @@ static int fmt_outv (mio_fmtout_t* fmtout, va_list ap)
|
||||
}
|
||||
|
||||
done:
|
||||
#if defined(MIO_ENABLE_FLTFMT)
|
||||
if (fb.fmt.ptr != fb.fmt.sbuf) MIO_MMGR_FREE (fmtout->mmgr, fb.fmt.ptr);
|
||||
if (fb.out.ptr != fb.out.sbuf) MIO_MMGR_FREE (fmtout->mmgr, fb.out.ptr);
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
oops:
|
||||
#if defined(MIO_ENABLE_FLTFMT)
|
||||
if (fb.fmt.ptr != fb.fmt.sbuf) MIO_MMGR_FREE (fmtout->mmgr, fb.fmt.ptr);
|
||||
if (fb.out.ptr != fb.out.sbuf) MIO_MMGR_FREE (fmtout->mmgr, fb.out.ptr);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1538,6 +1549,7 @@ mio_ooi_t mio_logbfmtv (mio_t* mio, mio_bitmask_t mask, const mio_bch_t* fmt, va
|
||||
fo.fmt_str = fmt;
|
||||
fo.ctx = mio;
|
||||
fo.mask = mask;
|
||||
fo.mmgr = mio_getmmgr(mio);
|
||||
fo.putbchars = log_bcs;
|
||||
fo.putuchars = log_ucs;
|
||||
|
||||
@ -1591,6 +1603,7 @@ mio_ooi_t mio_logufmtv (mio_t* mio, mio_bitmask_t mask, const mio_uch_t* fmt, va
|
||||
fo.fmt_str = fmt;
|
||||
fo.ctx = mio;
|
||||
fo.mask = mask;
|
||||
fo.mmgr = mio_getmmgr(mio);
|
||||
fo.putbchars = log_bcs;
|
||||
fo.putuchars = log_ucs;
|
||||
|
||||
@ -1601,6 +1614,7 @@ mio_ooi_t mio_logufmtv (mio_t* mio, mio_bitmask_t mask, const mio_uch_t* fmt, va
|
||||
prim_write_log (mio, mio->log.last_mask, mio->log.ptr, mio->log.len);
|
||||
mio->log.len = 0;
|
||||
}
|
||||
|
||||
return (x <= -1)? -1: fo.count;
|
||||
}
|
||||
|
||||
|
@ -6,51 +6,15 @@
|
||||
/* Define to 1 if you have the `accept4' function. */
|
||||
#undef HAVE_ACCEPT4
|
||||
|
||||
/* Define to 1 if you have the `acos' function. */
|
||||
#undef HAVE_ACOS
|
||||
|
||||
/* Define to 1 if you have the `acosf' function. */
|
||||
#undef HAVE_ACOSF
|
||||
|
||||
/* Define to 1 if you have the `acosl' function. */
|
||||
#undef HAVE_ACOSL
|
||||
|
||||
/* Define to 1 if you have the `acosq' function. */
|
||||
#undef HAVE_ACOSQ
|
||||
|
||||
/* Define to 1 if you have the `asin' function. */
|
||||
#undef HAVE_ASIN
|
||||
|
||||
/* Define to 1 if you have the `asinf' function. */
|
||||
#undef HAVE_ASINF
|
||||
|
||||
/* Define to 1 if you have the `asinl' function. */
|
||||
#undef HAVE_ASINL
|
||||
|
||||
/* Define to 1 if you have the `asinq' function. */
|
||||
#undef HAVE_ASINQ
|
||||
|
||||
/* Define to 1 if you have the `atan' function. */
|
||||
#undef HAVE_ATAN
|
||||
|
||||
/* Define to 1 if you have the `atan2' function. */
|
||||
#undef HAVE_ATAN2
|
||||
|
||||
/* Define to 1 if you have the `atan2f' function. */
|
||||
#undef HAVE_ATAN2F
|
||||
|
||||
/* Define to 1 if you have the `atan2l' function. */
|
||||
#undef HAVE_ATAN2L
|
||||
|
||||
/* Define to 1 if you have the `atan2q' function. */
|
||||
#undef HAVE_ATAN2Q
|
||||
|
||||
/* Define to 1 if you have the `atanf' function. */
|
||||
#undef HAVE_ATANF
|
||||
|
||||
/* Define to 1 if you have the `atanl' function. */
|
||||
#undef HAVE_ATANL
|
||||
|
||||
/* Define to 1 if you have the `atanq' function. */
|
||||
#undef HAVE_ATANQ
|
||||
|
||||
@ -60,15 +24,6 @@
|
||||
/* Define to 1 if you have the `backtrace_symbols' function. */
|
||||
#undef HAVE_BACKTRACE_SYMBOLS
|
||||
|
||||
/* Define to 1 if you have the `ceil' function. */
|
||||
#undef HAVE_CEIL
|
||||
|
||||
/* Define to 1 if you have the `ceilf' function. */
|
||||
#undef HAVE_CEILF
|
||||
|
||||
/* Define to 1 if you have the `ceill' function. */
|
||||
#undef HAVE_CEILL
|
||||
|
||||
/* Define to 1 if you have the `ceilq' function. */
|
||||
#undef HAVE_CEILQ
|
||||
|
||||
@ -84,27 +39,9 @@
|
||||
/* Define to 1 if you have the `connect' function. */
|
||||
#undef HAVE_CONNECT
|
||||
|
||||
/* Define to 1 if you have the `cos' function. */
|
||||
#undef HAVE_COS
|
||||
|
||||
/* Define to 1 if you have the `cosf' function. */
|
||||
#undef HAVE_COSF
|
||||
|
||||
/* Define to 1 if you have the `cosh' function. */
|
||||
#undef HAVE_COSH
|
||||
|
||||
/* Define to 1 if you have the `coshf' function. */
|
||||
#undef HAVE_COSHF
|
||||
|
||||
/* Define to 1 if you have the `coshl' function. */
|
||||
#undef HAVE_COSHL
|
||||
|
||||
/* Define to 1 if you have the `coshq' function. */
|
||||
#undef HAVE_COSHQ
|
||||
|
||||
/* Define to 1 if you have the `cosl' function. */
|
||||
#undef HAVE_COSL
|
||||
|
||||
/* Define to 1 if you have the `cosq' function. */
|
||||
#undef HAVE_COSQ
|
||||
|
||||
@ -148,15 +85,6 @@
|
||||
/* Define to 1 if you have the <execinfo.h> header file. */
|
||||
#undef HAVE_EXECINFO_H
|
||||
|
||||
/* Define to 1 if you have the `exp' function. */
|
||||
#undef HAVE_EXP
|
||||
|
||||
/* Define to 1 if you have the `expf' function. */
|
||||
#undef HAVE_EXPF
|
||||
|
||||
/* Define to 1 if you have the `expl' function. */
|
||||
#undef HAVE_EXPL
|
||||
|
||||
/* Define to 1 if you have the `expq' function. */
|
||||
#undef HAVE_EXPQ
|
||||
|
||||
@ -169,27 +97,9 @@
|
||||
/* Define to 1 if you have the `fdopendir' function. */
|
||||
#undef HAVE_FDOPENDIR
|
||||
|
||||
/* Define to 1 if you have the `floor' function. */
|
||||
#undef HAVE_FLOOR
|
||||
|
||||
/* Define to 1 if you have the `floorf' function. */
|
||||
#undef HAVE_FLOORF
|
||||
|
||||
/* Define to 1 if you have the `floorl' function. */
|
||||
#undef HAVE_FLOORL
|
||||
|
||||
/* Define to 1 if you have the `floorq' function. */
|
||||
#undef HAVE_FLOORQ
|
||||
|
||||
/* Define to 1 if you have the `fmod' function. */
|
||||
#undef HAVE_FMOD
|
||||
|
||||
/* Define to 1 if you have the `fmodf' function. */
|
||||
#undef HAVE_FMODF
|
||||
|
||||
/* Define to 1 if you have the `fmodl' function. */
|
||||
#undef HAVE_FMODL
|
||||
|
||||
/* Define to 1 if you have the `fmodq' function. */
|
||||
#undef HAVE_FMODQ
|
||||
|
||||
@ -283,27 +193,9 @@
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if you have the `log' function. */
|
||||
#undef HAVE_LOG
|
||||
|
||||
/* Define to 1 if you have the `log10' function. */
|
||||
#undef HAVE_LOG10
|
||||
|
||||
/* Define to 1 if you have the `log10f' function. */
|
||||
#undef HAVE_LOG10F
|
||||
|
||||
/* Define to 1 if you have the `log10l' function. */
|
||||
#undef HAVE_LOG10L
|
||||
|
||||
/* Define to 1 if you have the `log10q' function. */
|
||||
#undef HAVE_LOG10Q
|
||||
|
||||
/* Define to 1 if you have the `logf' function. */
|
||||
#undef HAVE_LOGF
|
||||
|
||||
/* Define to 1 if you have the `logl' function. */
|
||||
#undef HAVE_LOGL
|
||||
|
||||
/* Define to 1 if you have the `logq' function. */
|
||||
#undef HAVE_LOGQ
|
||||
|
||||
@ -385,15 +277,6 @@
|
||||
/* Define to 1 if you have the `posix_spawn' function. */
|
||||
#undef HAVE_POSIX_SPAWN
|
||||
|
||||
/* Define to 1 if you have the `pow' function. */
|
||||
#undef HAVE_POW
|
||||
|
||||
/* Define to 1 if you have the `powf' function. */
|
||||
#undef HAVE_POWF
|
||||
|
||||
/* Define to 1 if you have the `powl' function. */
|
||||
#undef HAVE_POWL
|
||||
|
||||
/* Define to 1 if you have the `powq' function. */
|
||||
#undef HAVE_POWQ
|
||||
|
||||
@ -427,15 +310,6 @@
|
||||
/* Define to 1 if you have the `recvmsg' function. */
|
||||
#undef HAVE_RECVMSG
|
||||
|
||||
/* Define to 1 if you have the `round' function. */
|
||||
#undef HAVE_ROUND
|
||||
|
||||
/* Define to 1 if you have the `roundf' function. */
|
||||
#undef HAVE_ROUNDF
|
||||
|
||||
/* Define to 1 if you have the `roundl' function. */
|
||||
#undef HAVE_ROUNDL
|
||||
|
||||
/* Define to 1 if you have the `roundq' function. */
|
||||
#undef HAVE_ROUNDQ
|
||||
|
||||
@ -469,27 +343,9 @@
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#undef HAVE_SIGNAL_H
|
||||
|
||||
/* Define to 1 if you have the `sin' function. */
|
||||
#undef HAVE_SIN
|
||||
|
||||
/* Define to 1 if you have the `sinf' function. */
|
||||
#undef HAVE_SINF
|
||||
|
||||
/* Define to 1 if you have the `sinh' function. */
|
||||
#undef HAVE_SINH
|
||||
|
||||
/* Define to 1 if you have the `sinhf' function. */
|
||||
#undef HAVE_SINHF
|
||||
|
||||
/* Define to 1 if you have the `sinhl' function. */
|
||||
#undef HAVE_SINHL
|
||||
|
||||
/* Define to 1 if you have the `sinhq' function. */
|
||||
#undef HAVE_SINHQ
|
||||
|
||||
/* Define to 1 if you have the `sinl' function. */
|
||||
#undef HAVE_SINL
|
||||
|
||||
/* Define to 1 if you have the `sinq' function. */
|
||||
#undef HAVE_SINQ
|
||||
|
||||
@ -499,15 +355,6 @@
|
||||
/* Define to 1 if you have the <spawn.h> header file. */
|
||||
#undef HAVE_SPAWN_H
|
||||
|
||||
/* Define to 1 if you have the `sqrt' function. */
|
||||
#undef HAVE_SQRT
|
||||
|
||||
/* Define to 1 if you have the `sqrtf' function. */
|
||||
#undef HAVE_SQRTF
|
||||
|
||||
/* Define to 1 if you have the `sqrtl' function. */
|
||||
#undef HAVE_SQRTL
|
||||
|
||||
/* Define to 1 if you have the `sqrtq' function. */
|
||||
#undef HAVE_SQRTQ
|
||||
|
||||
@ -648,27 +495,9 @@
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define to 1 if you have the `tan' function. */
|
||||
#undef HAVE_TAN
|
||||
|
||||
/* Define to 1 if you have the `tanf' function. */
|
||||
#undef HAVE_TANF
|
||||
|
||||
/* Define to 1 if you have the `tanh' function. */
|
||||
#undef HAVE_TANH
|
||||
|
||||
/* Define to 1 if you have the `tanhf' function. */
|
||||
#undef HAVE_TANHF
|
||||
|
||||
/* Define to 1 if you have the `tanhl' function. */
|
||||
#undef HAVE_TANHL
|
||||
|
||||
/* Define to 1 if you have the `tanhq' function. */
|
||||
#undef HAVE_TANHQ
|
||||
|
||||
/* Define to 1 if you have the `tanl' function. */
|
||||
#undef HAVE_TANL
|
||||
|
||||
/* Define to 1 if you have the `tanq' function. */
|
||||
#undef HAVE_TANQ
|
||||
|
||||
|
@ -336,6 +336,50 @@
|
||||
# error UNKNOWN INTMAX SIZE
|
||||
#endif
|
||||
|
||||
/* =========================================================================
|
||||
* FLOATING-POINT TYPE
|
||||
* ========================================================================= */
|
||||
/** \typedef mio_fltbas_t
|
||||
* The mio_fltbas_t type defines the largest floating-pointer number type
|
||||
* naturally supported.
|
||||
*/
|
||||
#if defined(__FreeBSD__) || defined(__MINGW32__)
|
||||
/* TODO: check if the support for long double is complete.
|
||||
* if so, use long double for mio_flt_t */
|
||||
typedef double mio_fltbas_t;
|
||||
# define MIO_SIZEOF_FLTBAS_T MIO_SIZEOF_DOUBLE
|
||||
#elif MIO_SIZEOF_LONG_DOUBLE > MIO_SIZEOF_DOUBLE
|
||||
typedef long double mio_fltbas_t;
|
||||
# define MIO_SIZEOF_FLTBAS_T MIO_SIZEOF_LONG_DOUBLE
|
||||
#else
|
||||
typedef double mio_fltbas_t;
|
||||
# define MIO_SIZEOF_FLTBAS_T MIO_SIZEOF_DOUBLE
|
||||
#endif
|
||||
|
||||
/** \typedef mio_fltmax_t
|
||||
* The mio_fltmax_t type defines the largest floating-pointer number type
|
||||
* ever supported.
|
||||
*/
|
||||
#if MIO_SIZEOF___FLOAT128 >= MIO_SIZEOF_FLTBAS_T
|
||||
/* the size of long double may be equal to the size of __float128
|
||||
* for alignment on some platforms */
|
||||
typedef __float128 mio_fltmax_t;
|
||||
# define MIO_SIZEOF_FLTMAX_T MIO_SIZEOF___FLOAT128
|
||||
# define MIO_FLTMAX_REQUIRE_QUADMATH 1
|
||||
#else
|
||||
typedef mio_fltbas_t mio_fltmax_t;
|
||||
# define MIO_SIZEOF_FLTMAX_T MIO_SIZEOF_FLTBAS_T
|
||||
# undef MIO_FLTMAX_REQUIRE_QUADMATH
|
||||
#endif
|
||||
|
||||
#if defined(MIO_USE_FLTMAX)
|
||||
typedef mio_fltmax_t mio_flt_t;
|
||||
#define MIO_SIZEOF_FLT_T MIO_SIZEOF_FLTMAX_T
|
||||
#else
|
||||
typedef mio_fltbas_t mio_flt_t;
|
||||
#define MIO_SIZEOF_FLT_T MIO_SIZEOF_FLTBAS_T
|
||||
#endif
|
||||
|
||||
/* =========================================================================
|
||||
* BASIC HARD-CODED DEFINES
|
||||
* ========================================================================= */
|
||||
|
@ -63,6 +63,7 @@ struct mio_fmtout_t
|
||||
{
|
||||
mio_oow_t count; /* out */
|
||||
|
||||
mio_mmgr_t* mmgr; /* in */
|
||||
mio_fmtout_putbchars_t putbchars; /* in */
|
||||
mio_fmtout_putuchars_t putuchars; /* in */
|
||||
mio_bitmask_t mask; /* in */
|
||||
|
@ -30,6 +30,9 @@
|
||||
#include <mio.h>
|
||||
#include <mio-utl.h>
|
||||
|
||||
/* enable floating-point support in basic formatting functions */
|
||||
#define MIO_ENABLE_FLTFMT
|
||||
|
||||
#if defined(__has_builtin)
|
||||
|
||||
# if (!__has_builtin(__builtin_memset) || !__has_builtin(__builtin_memcpy) || !__has_builtin(__builtin_memmove) || !__has_builtin(__builtin_memcmp))
|
||||
|
@ -42,8 +42,8 @@ int mio_sys_initmux (mio_t* mio)
|
||||
|
||||
#if defined(USE_EPOLL)
|
||||
|
||||
#if defined(HAVE_EPOLL_CREATE1)
|
||||
mux->hnd = epoll_create1(O_CLOEXEC);
|
||||
#if defined(HAVE_EPOLL_CREATE1) && defined(EPOLL_CLOEXEC)
|
||||
mux->hnd = epoll_create1(EPOLL_CLOEXEC);
|
||||
if (mux->hnd == -1)
|
||||
{
|
||||
if (errno == ENOSYS) goto normal_epoll_create; /* kernel doesn't support it */
|
||||
@ -61,11 +61,11 @@ normal_epoll_create:
|
||||
mio_seterrwithsyserr (mio, 0, errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined(FD_CLOEXEC)
|
||||
else
|
||||
{
|
||||
int flags = fcntl(mux->hnd, F_GETFD, 0);
|
||||
if (flags >= 0) fcntl(mux->hnd, F_SETFD, flags | FD_CLOEXEC);
|
||||
if (flags >= 0 && !(flags & FD_CLOEXEC)) fcntl(mux->hnd, F_SETFD, flags | FD_CLOEXEC);
|
||||
}
|
||||
#endif /* FD_CLOEXEC */
|
||||
|
||||
|
36
mio/m4/libtool.m4
generated
vendored
36
mio/m4/libtool.m4
generated
vendored
@ -728,7 +728,6 @@ _LT_CONFIG_SAVE_COMMANDS([
|
||||
cat <<_LT_EOF >> "$cfgfile"
|
||||
#! $SHELL
|
||||
# Generated automatically by $as_me ($PACKAGE) $VERSION
|
||||
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
|
||||
# Provide generalized library-building support services.
|
||||
@ -2867,9 +2866,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
# before this can be enabled.
|
||||
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
|
||||
# searched for libraries, however this is still not possible. Aside from not
|
||||
# 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.
|
||||
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' ' '`
|
||||
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
|
||||
|
||||
# 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'
|
||||
;;
|
||||
|
||||
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*)
|
||||
version_type=sunos
|
||||
need_lib_prefix=no
|
||||
@ -3549,7 +3557,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
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)$'
|
||||
else
|
||||
@ -4055,7 +4063,8 @@ _LT_EOF
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
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.
|
||||
if sort "$nlist" | uniq > "$nlist"T; then
|
||||
mv -f "$nlist"T "$nlist"
|
||||
@ -4427,7 +4436,7 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
;;
|
||||
*qnx* | *nto*)
|
||||
# QNX uses GNU C++, but need to define -shared option too, otherwise
|
||||
@ -4939,6 +4948,9 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
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'
|
||||
;;
|
||||
@ -5001,6 +5013,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
||||
openbsd* | bitrig*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
linux* | k*bsd*-gnu | gnu*)
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
@ -5255,7 +5270,7 @@ _LT_EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
wlarc=
|
||||
@ -5776,6 +5791,7 @@ _LT_EOF
|
||||
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'
|
||||
fi
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||
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_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
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
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
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user