fcgi work in progress

This commit is contained in:
hyung-hwan 2022-08-31 23:01:32 +00:00
parent 1fde54f3ec
commit 2f49d097f1
23 changed files with 2766 additions and 1704 deletions

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -590,10 +590,6 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-zstd: distdir
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@ -636,8 +632,6 @@ distcheck: dist
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@ -815,18 +809,18 @@ uninstall-am:
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip dist-zstd distcheck distclean \
distclean-generic distclean-libtool distclean-local \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
dist-xz dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-local distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile

17
hio/ac/ar-lib generated
View File

@ -2,9 +2,9 @@
# Wrapper for Microsoft lib.exe
me=ar-lib
scriptversion=2019-07-04.01; # UTC
scriptversion=2012-03-01.08; # UTC
# Copyright (C) 2010-2020 Free Software Foundation, Inc.
# Copyright (C) 2010-2018 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# This program is free software; you can redistribute it and/or modify
@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
CYGWIN* | MSYS*)
CYGWIN*)
file_conv=cygwin
;;
*)
@ -65,7 +65,7 @@ func_file_conv ()
mingw)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin | msys)
cygwin)
file=`cygpath -m "$file" || echo "$file"`
;;
wine)
@ -224,11 +224,10 @@ elif test -n "$extract"; then
esac
done
else
$AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
| while read member
do
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
done
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
do
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
done
fi
elif test -n "$quick$replace"; then

6
hio/ac/compile generated
View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
CYGWIN* | MSYS*)
CYGWIN*)
file_conv=cygwin
;;
*)
@ -67,7 +67,7 @@ func_file_conv ()
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/* | msys/*)
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)

128
hio/ac/config.guess generated vendored
View File

@ -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
{ 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
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac
}
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) ; } ||
{ 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 ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
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:*:*)
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 ;;
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: "'"

2639
hio/ac/config.sub generated vendored

File diff suppressed because it is too large Load Diff

2
hio/ac/depcomp generated
View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-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

13
hio/ac/install-sh generated
View File

@ -451,18 +451,7 @@ do
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#

250
hio/ac/ltmain.sh generated
View File

@ -31,7 +31,7 @@
PROGRAM=libtool
PACKAGE=libtool
VERSION=2.4.6
VERSION="2.4.6 Debian-2.4.6-14"
package_revision=2.4.6
@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
# putting '$debug_cmd' at the start of all your functions, you can get
# bash to show function call trace with:
#
# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
debug_cmd=${debug_cmd-":"}
exit_cmd=:
@ -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 '"$@"'
# 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
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
#
# func_quote_for_eval ${1+"$@"}
# my_silent_option_result=$func_quote_for_eval_result
# 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
# save modified positional parameters for caller
func_options_prep_result=$func_run_hooks_result
$_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
eval set dummy "$func_run_hooks_result"; shift
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
# save modified positional parameters for caller
func_quote_for_eval ${1+"$@"}
func_parse_options_result=$func_quote_for_eval_result
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-14
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
# Pass back the list of options.
func_quote_for_eval ${1+"$@"}
libtool_options_prep_result=$func_quote_for_eval_result
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
@ -2386,15 +2471,22 @@ libtool_parse_options ()
func_append preserve_args " $_G_opt"
;;
# An option not handled by this hook function:
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
# An option not handled by this hook function:
*) 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
# save modified positional parameters for caller
func_quote_for_eval ${1+"$@"}
libtool_parse_options_result=$func_quote_for_eval_result
$_G_rc_lt_parse_options
}
func_add_hook func_parse_options libtool_parse_options
@ -7274,10 +7366,14 @@ 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
# -static-* direct GCC to link specific libraries statically
# -fcilkplus Cilk Plus language extension features for C/C++
-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=*|-static-*|-fcilkplus)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
@ -7570,7 +7666,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,19 +7988,19 @@ 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"
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
func_fatal_error "'$lib' is not a convenience library"
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
fi # $pass = conv
@ -8825,6 +8924,9 @@ func_mode_link ()
revision=$number_minor
lt_irix_increment=no
;;
*)
func_fatal_configuration "$modename: unknown library version type '$version_type'"
;;
esac
;;
no)

2
hio/ac/missing generated
View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify

2
hio/ac/test-driver generated
View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
# 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

50
hio/aclocal.m4 vendored
View File

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.16.2], [],
m4_if([$1], [1.16.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.16.2])dnl
[AM_AUTOMAKE_VERSION([1.16.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
# Copyright (C) 2011-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -118,7 +118,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -170,7 +170,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -201,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -392,7 +392,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -431,9 +431,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
@ -460,7 +458,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -657,7 +655,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -678,7 +676,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -699,7 +697,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -742,7 +740,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -781,7 +779,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -810,7 +808,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -857,7 +855,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -876,7 +874,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -957,7 +955,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1017,7 +1015,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1045,7 +1043,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1064,7 +1062,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2020 Free Software Foundation, Inc.
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

61
hio/configure vendored
View File

@ -6549,7 +6549,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
@ -6911,7 +6911,7 @@ esac
fi
: ${AR=ar}
: ${AR_FLAGS=cru}
: ${AR_FLAGS=cr}
@ -7412,11 +7412,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"
@ -8635,8 +8632,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
echo "$AR cr libconftest.a conftest.o" >&5
$AR cr libconftest.a conftest.o 2>&5
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
@ -9765,6 +9762,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-static'
;;
# flang / f18. f95 an alias for gfortran or flang on Debian
flang* | f18* | f95*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-fPIC'
lt_prog_compiler_static='-static'
;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
@ -10241,6 +10244,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
@ -10495,7 +10501,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=
@ -11165,6 +11171,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'
@ -11186,7 +11193,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
@ -12281,9 +12288,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
@ -12292,7 +12296,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
@ -12304,6 +12308,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
@ -13348,7 +13364,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];
@ -13394,7 +13410,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];
@ -13418,7 +13434,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];
@ -13463,7 +13479,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];
@ -13487,7 +13503,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];
@ -20988,9 +21004,7 @@ $as_echo X/"$am_mf" |
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE=\"gmake\" (or whatever is
necessary). You can also try re-running configure with the
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See \`config.log' for more details" "$LINENO" 5; }
@ -21017,7 +21031,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.

View File

@ -2,7 +2,7 @@ dnl AC_PREREQ([2.69])
AC_INIT([hio],[0.1.0],[Chung, Hyung-Hwan (hyunghwan.chung@gmail.com)],[],[http://code.miflux.com/@hio])
AC_CONFIG_HEADER([lib/hio-cfg.h])
AC_CONFIG_HEADERS([lib/hio-cfg.h])
AC_CONFIG_AUX_DIR([ac])
AC_CONFIG_MACRO_DIR([m4])

View File

@ -40,6 +40,7 @@ include_HEADERS = \
hio-dhcp.h \
hio-dns.h \
hio-ecs.h \
hio-fcgi.h \
hio-fmt.h \
hio-htb.h \
hio-htrd.h \
@ -73,6 +74,7 @@ libhio_la_SOURCES = \
ecs.c \
ecs-imp.h \
err.c \
fcgi-cli.c \
fmt.c \
fmt-imp.h \
htb.c \
@ -80,6 +82,7 @@ libhio_la_SOURCES = \
htre.c \
http.c \
http-cgi.c \
http-fcgi.c \
http-file.c \
http-prv.h \
http-svr.c \

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -148,30 +148,31 @@ libhio_la_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
am__libhio_la_SOURCES_DIST = chr.c dhcp-svr.c dns.c dns-cli.c ecs.c \
ecs-imp.h err.c fmt.c fmt-imp.h htb.c htrd.c htre.c http.c \
http-cgi.c http-file.c http-prv.h http-svr.c http-thr.c \
http-txt.c json.c hio-prv.h hio.c md5.c nwif.c opt.c opt-imp.h \
path.c pipe.c pro.c pty.c rad-msg.c sck.c shw.c skad.c sys.c \
sys-ass.c sys-err.c sys-log.c sys-mux.c sys-prv.h sys-tim.c \
thr.c uch-case.h uch-prop.h tmr.c utf8.c utl.c utl-siph.c \
utl-str.c mar.c mar-cli.c
ecs-imp.h err.c fcgi-cli.c fmt.c fmt-imp.h htb.c htrd.c htre.c \
http.c http-cgi.c http-fcgi.c http-file.c http-prv.h \
http-svr.c http-thr.c http-txt.c json.c hio-prv.h hio.c md5.c \
nwif.c opt.c opt-imp.h path.c pipe.c pro.c pty.c rad-msg.c \
sck.c shw.c skad.c sys.c sys-ass.c sys-err.c sys-log.c \
sys-mux.c sys-prv.h sys-tim.c thr.c uch-case.h uch-prop.h \
tmr.c utf8.c utl.c utl-siph.c utl-str.c mar.c mar-cli.c
@ENABLE_MARIADB_TRUE@am__objects_1 = libhio_la-mar.lo \
@ENABLE_MARIADB_TRUE@ libhio_la-mar-cli.lo
am_libhio_la_OBJECTS = libhio_la-chr.lo libhio_la-dhcp-svr.lo \
libhio_la-dns.lo libhio_la-dns-cli.lo libhio_la-ecs.lo \
libhio_la-err.lo libhio_la-fmt.lo libhio_la-htb.lo \
libhio_la-htrd.lo libhio_la-htre.lo libhio_la-http.lo \
libhio_la-http-cgi.lo libhio_la-http-file.lo \
libhio_la-http-svr.lo libhio_la-http-thr.lo \
libhio_la-http-txt.lo libhio_la-json.lo libhio_la-hio.lo \
libhio_la-md5.lo libhio_la-nwif.lo libhio_la-opt.lo \
libhio_la-path.lo libhio_la-pipe.lo libhio_la-pro.lo \
libhio_la-pty.lo libhio_la-rad-msg.lo libhio_la-sck.lo \
libhio_la-shw.lo libhio_la-skad.lo libhio_la-sys.lo \
libhio_la-sys-ass.lo libhio_la-sys-err.lo libhio_la-sys-log.lo \
libhio_la-sys-mux.lo libhio_la-sys-tim.lo libhio_la-thr.lo \
libhio_la-tmr.lo libhio_la-utf8.lo libhio_la-utl.lo \
libhio_la-utl-siph.lo libhio_la-utl-str.lo $(am__objects_1)
libhio_la-err.lo libhio_la-fcgi-cli.lo libhio_la-fmt.lo \
libhio_la-htb.lo libhio_la-htrd.lo libhio_la-htre.lo \
libhio_la-http.lo libhio_la-http-cgi.lo libhio_la-http-fcgi.lo \
libhio_la-http-file.lo libhio_la-http-svr.lo \
libhio_la-http-thr.lo libhio_la-http-txt.lo libhio_la-json.lo \
libhio_la-hio.lo libhio_la-md5.lo libhio_la-nwif.lo \
libhio_la-opt.lo libhio_la-path.lo libhio_la-pipe.lo \
libhio_la-pro.lo libhio_la-pty.lo libhio_la-rad-msg.lo \
libhio_la-sck.lo libhio_la-shw.lo libhio_la-skad.lo \
libhio_la-sys.lo libhio_la-sys-ass.lo libhio_la-sys-err.lo \
libhio_la-sys-log.lo libhio_la-sys-mux.lo libhio_la-sys-tim.lo \
libhio_la-thr.lo libhio_la-tmr.lo libhio_la-utf8.lo \
libhio_la-utl.lo libhio_la-utl-siph.lo libhio_la-utl-str.lo \
$(am__objects_1)
libhio_la_OBJECTS = $(am_libhio_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@ -199,10 +200,13 @@ am__depfiles_remade = ./$(DEPDIR)/libhio_la-chr.Plo \
./$(DEPDIR)/libhio_la-dhcp-svr.Plo \
./$(DEPDIR)/libhio_la-dns-cli.Plo \
./$(DEPDIR)/libhio_la-dns.Plo ./$(DEPDIR)/libhio_la-ecs.Plo \
./$(DEPDIR)/libhio_la-err.Plo ./$(DEPDIR)/libhio_la-fmt.Plo \
./$(DEPDIR)/libhio_la-hio.Plo ./$(DEPDIR)/libhio_la-htb.Plo \
./$(DEPDIR)/libhio_la-htrd.Plo ./$(DEPDIR)/libhio_la-htre.Plo \
./$(DEPDIR)/libhio_la-err.Plo \
./$(DEPDIR)/libhio_la-fcgi-cli.Plo \
./$(DEPDIR)/libhio_la-fmt.Plo ./$(DEPDIR)/libhio_la-hio.Plo \
./$(DEPDIR)/libhio_la-htb.Plo ./$(DEPDIR)/libhio_la-htrd.Plo \
./$(DEPDIR)/libhio_la-htre.Plo \
./$(DEPDIR)/libhio_la-http-cgi.Plo \
./$(DEPDIR)/libhio_la-http-fcgi.Plo \
./$(DEPDIR)/libhio_la-http-file.Plo \
./$(DEPDIR)/libhio_la-http-svr.Plo \
./$(DEPDIR)/libhio_la-http-thr.Plo \
@ -253,14 +257,14 @@ am__can_run_installinfo = \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__include_HEADERS_DIST = hio-chr.h hio-cmn.h hio-dhcp.h hio-dns.h \
hio-ecs.h hio-fmt.h hio-htb.h hio-htrd.h hio-htre.h hio-http.h \
hio-json.h hio-md5.h hio-nwif.h hio-opt.h hio-pac1.h \
hio-path.h hio-pipe.h hio-pro.h hio-pty.h hio-rad.h hio-sck.h \
hio-shw.h hio-skad.h hio-str.h hio-thr.h hio-upac.h hio-utl.h \
hio.h hio-mar.h
hio-ecs.h hio-fcgi.h hio-fmt.h hio-htb.h hio-htrd.h hio-htre.h \
hio-http.h hio-json.h hio-md5.h hio-nwif.h hio-opt.h \
hio-pac1.h hio-path.h hio-pipe.h hio-pro.h hio-pty.h hio-rad.h \
hio-sck.h hio-shw.h hio-skad.h hio-str.h hio-thr.h hio-upac.h \
hio-utl.h hio.h hio-mar.h
HEADERS = $(include_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
hio-cfg.h.in
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)hio-cfg.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
@ -456,20 +460,20 @@ LIBADD_LIB_COMMON = $(LIBM)
# Never list hio-cfg.h in include_HEADERS.
include_HEADERS = hio-chr.h hio-cmn.h hio-dhcp.h hio-dns.h hio-ecs.h \
hio-fmt.h hio-htb.h hio-htrd.h hio-htre.h hio-http.h \
hio-json.h hio-md5.h hio-nwif.h hio-opt.h hio-pac1.h \
hio-path.h hio-pipe.h hio-pro.h hio-pty.h hio-rad.h hio-sck.h \
hio-shw.h hio-skad.h hio-str.h hio-thr.h hio-upac.h hio-utl.h \
hio.h $(am__append_1)
hio-fcgi.h hio-fmt.h hio-htb.h hio-htrd.h hio-htre.h \
hio-http.h hio-json.h hio-md5.h hio-nwif.h hio-opt.h \
hio-pac1.h hio-path.h hio-pipe.h hio-pro.h hio-pty.h hio-rad.h \
hio-sck.h hio-shw.h hio-skad.h hio-str.h hio-thr.h hio-upac.h \
hio-utl.h hio.h $(am__append_1)
lib_LTLIBRARIES = libhio.la
libhio_la_SOURCES = chr.c dhcp-svr.c dns.c dns-cli.c ecs.c ecs-imp.h \
err.c fmt.c fmt-imp.h htb.c htrd.c htre.c http.c http-cgi.c \
http-file.c http-prv.h http-svr.c http-thr.c http-txt.c json.c \
hio-prv.h hio.c md5.c nwif.c opt.c opt-imp.h path.c pipe.c \
pro.c pty.c rad-msg.c sck.c shw.c skad.c sys.c sys-ass.c \
sys-err.c sys-log.c sys-mux.c sys-prv.h sys-tim.c thr.c \
uch-case.h uch-prop.h tmr.c utf8.c utl.c utl-siph.c utl-str.c \
$(am__append_2)
err.c fcgi-cli.c fmt.c fmt-imp.h htb.c htrd.c htre.c http.c \
http-cgi.c http-fcgi.c http-file.c http-prv.h http-svr.c \
http-thr.c http-txt.c json.c hio-prv.h hio.c md5.c nwif.c \
opt.c opt-imp.h path.c pipe.c pro.c pty.c rad-msg.c sck.c \
shw.c skad.c sys.c sys-ass.c sys-err.c sys-log.c sys-mux.c \
sys-prv.h sys-tim.c thr.c uch-case.h uch-prop.h tmr.c utf8.c \
utl.c utl-siph.c utl-str.c $(am__append_2)
libhio_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
libhio_la_CFLAGS = $(CFLAGS_LIB_COMMON) $(am__append_3)
libhio_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) $(am__append_4)
@ -575,12 +579,14 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-dns.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-ecs.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-err.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-fcgi-cli.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-fmt.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-hio.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-htb.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-htrd.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-htre.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-http-cgi.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-http-fcgi.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-http-file.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-http-svr.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhio_la-http-thr.Plo@am__quote@ # am--include-marker
@ -685,6 +691,13 @@ libhio_la-err.lo: err.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhio_la_CPPFLAGS) $(CPPFLAGS) $(libhio_la_CFLAGS) $(CFLAGS) -c -o libhio_la-err.lo `test -f 'err.c' || echo '$(srcdir)/'`err.c
libhio_la-fcgi-cli.lo: fcgi-cli.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhio_la_CPPFLAGS) $(CPPFLAGS) $(libhio_la_CFLAGS) $(CFLAGS) -MT libhio_la-fcgi-cli.lo -MD -MP -MF $(DEPDIR)/libhio_la-fcgi-cli.Tpo -c -o libhio_la-fcgi-cli.lo `test -f 'fcgi-cli.c' || echo '$(srcdir)/'`fcgi-cli.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhio_la-fcgi-cli.Tpo $(DEPDIR)/libhio_la-fcgi-cli.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcgi-cli.c' object='libhio_la-fcgi-cli.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhio_la_CPPFLAGS) $(CPPFLAGS) $(libhio_la_CFLAGS) $(CFLAGS) -c -o libhio_la-fcgi-cli.lo `test -f 'fcgi-cli.c' || echo '$(srcdir)/'`fcgi-cli.c
libhio_la-fmt.lo: fmt.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhio_la_CPPFLAGS) $(CPPFLAGS) $(libhio_la_CFLAGS) $(CFLAGS) -MT libhio_la-fmt.lo -MD -MP -MF $(DEPDIR)/libhio_la-fmt.Tpo -c -o libhio_la-fmt.lo `test -f 'fmt.c' || echo '$(srcdir)/'`fmt.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhio_la-fmt.Tpo $(DEPDIR)/libhio_la-fmt.Plo
@ -727,6 +740,13 @@ libhio_la-http-cgi.lo: http-cgi.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhio_la_CPPFLAGS) $(CPPFLAGS) $(libhio_la_CFLAGS) $(CFLAGS) -c -o libhio_la-http-cgi.lo `test -f 'http-cgi.c' || echo '$(srcdir)/'`http-cgi.c
libhio_la-http-fcgi.lo: http-fcgi.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhio_la_CPPFLAGS) $(CPPFLAGS) $(libhio_la_CFLAGS) $(CFLAGS) -MT libhio_la-http-fcgi.lo -MD -MP -MF $(DEPDIR)/libhio_la-http-fcgi.Tpo -c -o libhio_la-http-fcgi.lo `test -f 'http-fcgi.c' || echo '$(srcdir)/'`http-fcgi.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhio_la-http-fcgi.Tpo $(DEPDIR)/libhio_la-http-fcgi.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='http-fcgi.c' object='libhio_la-http-fcgi.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhio_la_CPPFLAGS) $(CPPFLAGS) $(libhio_la_CFLAGS) $(CFLAGS) -c -o libhio_la-http-fcgi.lo `test -f 'http-fcgi.c' || echo '$(srcdir)/'`http-fcgi.c
libhio_la-http-file.lo: http-file.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhio_la_CPPFLAGS) $(CPPFLAGS) $(libhio_la_CFLAGS) $(CFLAGS) -MT libhio_la-http-file.lo -MD -MP -MF $(DEPDIR)/libhio_la-http-file.Tpo -c -o libhio_la-http-file.lo `test -f 'http-file.c' || echo '$(srcdir)/'`http-file.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhio_la-http-file.Tpo $(DEPDIR)/libhio_la-http-file.Plo
@ -1108,12 +1128,14 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/libhio_la-dns.Plo
-rm -f ./$(DEPDIR)/libhio_la-ecs.Plo
-rm -f ./$(DEPDIR)/libhio_la-err.Plo
-rm -f ./$(DEPDIR)/libhio_la-fcgi-cli.Plo
-rm -f ./$(DEPDIR)/libhio_la-fmt.Plo
-rm -f ./$(DEPDIR)/libhio_la-hio.Plo
-rm -f ./$(DEPDIR)/libhio_la-htb.Plo
-rm -f ./$(DEPDIR)/libhio_la-htrd.Plo
-rm -f ./$(DEPDIR)/libhio_la-htre.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-cgi.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-fcgi.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-file.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-svr.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-thr.Plo
@ -1197,12 +1219,14 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/libhio_la-dns.Plo
-rm -f ./$(DEPDIR)/libhio_la-ecs.Plo
-rm -f ./$(DEPDIR)/libhio_la-err.Plo
-rm -f ./$(DEPDIR)/libhio_la-fcgi-cli.Plo
-rm -f ./$(DEPDIR)/libhio_la-fmt.Plo
-rm -f ./$(DEPDIR)/libhio_la-hio.Plo
-rm -f ./$(DEPDIR)/libhio_la-htb.Plo
-rm -f ./$(DEPDIR)/libhio_la-htrd.Plo
-rm -f ./$(DEPDIR)/libhio_la-htre.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-cgi.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-fcgi.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-file.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-svr.Plo
-rm -f ./$(DEPDIR)/libhio_la-http-thr.Plo

255
hio/lib/fcgi-cli.c Normal file
View File

@ -0,0 +1,255 @@
/*
Copyright (c) 2016-2020 Chung, Hyung-Hwan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hio-fcgi.h>
#include <hio-sck.h>
#include "hio-prv.h"
typedef struct hio_svc_fcgic_conn_t hio_svc_fcgic_conn_t;
struct hio_svc_fcgic_t
{
HIO_SVC_HEADER;
int stopping;
int tmout_set;
hio_svc_fcgic_tmout_t tmout;
hio_svc_fcgic_conn_t* conns;
#if 0
hio_oow_t autoi;
hio_oow_t autoi2;
#endif
};
#define INVALID_SID HIO_TYPE_MAX(hio_oow_t)
struct hio_svc_fcgic_sess_t
{
hio_oow_t sid;
hio_svc_fcgic_t* fcgic;
hio_svc_fcgic_conn_t* conn;
};
struct hio_svc_fcgic_conn_t
{
hio_skad_t addr;
hio_dev_sck_t* dev;
int connected;
struct
{
hio_svc_fcgic_sess_t* ptr;
hio_oow_t capa;
hio_oow_t free; /* the index to the first free session slot */
} sess;
hio_svc_fcgic_conn_t* next;
};
#if 0
struct fcgic_sck_xtn_t
{
hio_svc_fcgic_t* fcgic;
struct
{
hio_uint8_t* ptr;
hio_oow_t len;
hio_oow_t capa;
} rbuf; /* used by tcp socket */
};
typedef struct fcgic_sck_xtn_t fcgic_sck_xtn_t;
/* ----------------------------------------------------------------------- */
struct fcgic_fcgi_msg_xtn_t
{
hio_dev_sck_t* dev;
hio_tmridx_t rtmridx;
//hio_fcgi_msg_t* prev;
//hio_fcgi_msg_t* next;
hio_skad_t servaddr;
//hio_svc_fcgic_on_done_t on_done;
hio_ntime_t wtmout;
hio_ntime_t rtmout;
int rmaxtries; /* maximum number of tries to receive a reply */
int rtries; /* number of tries made so far */
int pending;
};
typedef struct fcgic_fcgi_msg_xtn_t fcgic_fcgi_msg_xtn_t;
#if defined(HIO_HAVE_INLINE)
static HIO_INLINE fcgic_fcgi_msg_xtn_t* fcgic_fcgi_msg_getxtn(hio_fcgi_msg_t* msg) { return (fcgic_fcgi_msg_xtn_t*)((hio_uint8_t*)hio_fcgi_msg_to_pkt(msg) + msg->pktalilen); }
#else
# define fcgic_fcgi_msg_getxtn(msg) ((fcgic_fcgi_msg_xtn_t*)((hio_uint8_t*)hio_fcgi_msg_to_pkt(msg) + msg->pktalilen))
#endif
#endif
static hio_svc_fcgic_conn_t* get_connection (hio_svc_fcgic_t* fcgic, hio_skad_t* addr)
{
hio_t* hio = fcgic->hio;
hio_svc_fcgic_conn_t* conn = fcgic->conns;
/* TODO: speed up? how many conns would be configured? sequential search may be ok here */
while (conn)
{
if (hio_equal_skads(&conn->addr, addr, 1)) return conn;
conn = conn->next;
}
conn = hio_callocmem(hio, HIO_SIZEOF(*conn));
if (HIO_UNLIKELY(!conn)) return HIO_NULL;
conn->sess.capa = 0;
conn->sess.free = INVALID_SID;
conn->next = fcgic->conns;
fcgic->conns = conn;
return conn;
}
static void free_connections (hio_svc_fcgic_t* fcgic)
{
hio_t* hio = fcgic->hio;
hio_svc_fcgic_conn_t* conn = fcgic->conns;
hio_svc_fcgic_conn_t* next;
while (conn)
{
next = conn->next;
if (conn->dev) hio_dev_sck_kill (conn->dev);
hio_freemem (hio, conn->sess.ptr);
hio_freemem (hio, conn);
conn = next;
}
}
static hio_svc_fcgic_sess_t* new_session (hio_svc_fcgic_t* fcgic, hio_skad_t* addr)
{
hio_t* hio = fcgic->hio;
hio_svc_fcgic_conn_t* conn;
hio_svc_fcgic_sess_t* sess;
conn = get_connection(fcgic, addr);
if (HIO_UNLIKELY(!conn)) return HIO_NULL;
if (conn->sess.free == INVALID_SID)
{
hio_oow_t newcapa, i;
hio_svc_fcgic_sess_t* newptr;
newcapa = conn->sess.capa + 32;
newptr = hio_reallocmem (hio, conn->sess.ptr, HIO_SIZEOF(*sess) * newcapa);
if (HIO_UNLIKELY(!newptr)) return HIO_NULL;
for (i = conn->sess.capa ; i < newcapa; i++)
{
newptr[i].sid = i + 1;
newptr[i].fcgic = fcgic;
newptr[i].conn = conn;
}
newptr[i - 1].sid = INVALID_SID;
conn->sess.free = conn->sess.capa;
conn->sess.capa = newcapa;
conn->sess.ptr = newptr;
}
else
{
sess = &conn->sess.ptr[conn->sess.free];
conn->sess.free = sess->sid;
sess->sid = conn->sess.free;
HIO_ASSERT (hio, sess->fcgic == fcgic);
HIO_ASSERT (hio, sess->conn == conn);
}
return sess;
}
static void release_session (hio_svc_fcgic_sess_t* sess)
{
sess->sid = sess->conn->sess.free;
sess->conn->sess.free = sess->sid;
}
hio_svc_fcgic_t* hio_svc_fcgic_start (hio_t* hio, const hio_svc_fcgic_tmout_t* tmout)
{
hio_svc_fcgic_t* fcgic = HIO_NULL;
fcgic = (hio_svc_fcgic_t*)hio_callocmem(hio, HIO_SIZEOF(*fcgic));
if (HIO_UNLIKELY(!fcgic)) goto oops;
fcgic->hio = hio;
fcgic->svc_stop = hio_svc_fcgic_stop;
if (tmout)
{
fcgic->tmout = *tmout;
fcgic->tmout_set = 1;
}
HIO_SVCL_APPEND_SVC (&hio->actsvc, (hio_svc_t*)fcgic);
HIO_DEBUG1 (hio, "FCGIC - STARTED SERVICE %p\n", fcgic);
return fcgic;
oops:
if (fcgic) hio_freemem (hio, fcgic);
return HIO_NULL;
}
void hio_svc_fcgic_stop (hio_svc_fcgic_t* fcgic)
{
hio_t* hio = fcgic->hio;
HIO_DEBUG1 (hio, "FCGIC - STOPPING SERVICE %p\n", fcgic);
fcgic->stopping = 1;
free_connections (fcgic);
HIO_SVCL_UNLINK_SVC (fcgic);
hio_freemem (hio, fcgic);
}
hio_svc_fcgic_sess_t* hio_svc_fcgic_tie (hio_svc_fcgic_t* fcgic, hio_skad_t* addr)
{
/* TODO: reference counting for safety?? */
return new_session(fcgic, addr);
}
int hio_svc_fcgic_untie (hio_svc_fcgic_sess_t* sess)
{
/* TODO: reference counting for safety?? */
release_session (sess);
}

74
hio/lib/hio-fcgi.h Normal file
View File

@ -0,0 +1,74 @@
/*
Copyright (c) 2016-2020 Chung, Hyung-Hwan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _HIO_FCGI_H_
#define _HIO_FCGI_H_
#include <hio.h>
#include <hio-skad.h>
/* ---------------------------------------------------------------- */
typedef struct hio_svc_fcgis_t hio_svc_fcgis_t; /* server service */
typedef struct hio_svc_fcgic_t hio_svc_fcgic_t; /* client service */
typedef struct hio_svc_fcgic_tmout_t hio_svc_fcgic_tmout_t;
struct hio_svc_fcgic_tmout_t
{
hio_ntime_t c;
hio_ntime_t r;
hio_ntime_t w;
};
/* ---------------------------------------------------------------- */
typedef struct hio_svc_fcgic_sess_t hio_svc_fcgic_sess_t;
/* ---------------------------------------------------------------- */
#if defined(__cplusplus)
extern "C" {
#endif
HIO_EXPORT hio_svc_fcgic_t* hio_svc_fcgic_start (
hio_t* hio,
const hio_svc_fcgic_tmout_t* tmout
);
HIO_EXPORT void hio_svc_fcgic_stop (
hio_svc_fcgic_t* fcgic
);
#if defined(HIO_HAVE_INLINE)
static HIO_INLINE hio_t* hio_svc_fcgis_gethio(hio_svc_fcgis_t* svc) { return hio_svc_gethio((hio_svc_t*)svc); }
static HIO_INLINE hio_t* hio_svc_fcgic_gethio(hio_svc_fcgic_t* svc) { return hio_svc_gethio((hio_svc_t*)svc); }
#else
# define hio_svc_fcgis_gethio(svc) hio_svc_gethio(svc)
# define hio_svc_fcgic_gethio(svc) hio_svc_gethio(svc)
#endif
#if defined(__cplusplus)
}
#endif
#endif

View File

@ -83,7 +83,7 @@ typedef struct cgi_t cgi_t;
struct cgi_peer_xtn_t
{
cgi_t* state;
cgi_t* cgi; /* back pointer to the cgi object */
};
typedef struct cgi_peer_xtn_t cgi_peer_xtn_t;
@ -184,6 +184,7 @@ static int cgi_write_to_peer (cgi_t* cgi, const void* data, hio_iolen_t dlen)
/* TODO: check if it's already finished or something.. */
if (cgi->num_pending_writes_to_peer > CGI_PENDING_IO_THRESHOLD)
{
/* suspend input watching */
if (hio_dev_sck_read(cgi->client->sck, 0) <= -1) return -1;
}
return 0;
@ -232,7 +233,7 @@ static HIO_INLINE void cgi_mark_over (cgi_t* cgi, int over_bits)
/*printf ("DETACHING FROM THE MAIN CLIENT RSRC... state -> %p\n", cgi->client->rsrc);*/
HIO_SVC_HTTS_RSRC_DETACH (cgi->client->rsrc);
/* cgi must not be access from here down as it could have been destroyed */
/* cgi must not be accessed from here down as it could have been destroyed */
}
else
{
@ -251,8 +252,8 @@ static void cgi_on_kill (cgi_t* cgi)
if (cgi->peer)
{
cgi_peer_xtn_t* cgi_peer = hio_dev_pro_getxtn(cgi->peer);
cgi_peer->state = HIO_NULL; /* cgi_peer->state many not be NULL if the resource is killed regardless of the reference count */
cgi_peer_xtn_t* peer = hio_dev_pro_getxtn(cgi->peer);
peer->cgi = HIO_NULL; /* peer->cgi many not be NULL if the resource is killed regardless of the reference count */
hio_dev_pro_kill (cgi->peer);
cgi->peer = HIO_NULL;
@ -260,8 +261,8 @@ static void cgi_on_kill (cgi_t* cgi)
if (cgi->peer_htrd)
{
cgi_peer_xtn_t* cgi_peer = hio_htrd_getxtn(cgi->peer_htrd);
cgi_peer->state = HIO_NULL; /* cgi_peer->state many not be NULL if the resource is killed regardless of the reference count */
cgi_peer_xtn_t* peer = hio_htrd_getxtn(cgi->peer_htrd);
peer->cgi = HIO_NULL; /* peer->cgi many not be NULL if the resource is killed regardless of the reference count */
hio_htrd_close (cgi->peer_htrd);
cgi->peer_htrd = HIO_NULL;
@ -304,11 +305,11 @@ static void cgi_on_kill (cgi_t* cgi)
/*printf ("**** CGI_ON_KILL DONE\n");*/
}
static void cgi_peer_on_close (hio_dev_pro_t* pro, hio_dev_pro_sid_t sid)
static void peer_on_close (hio_dev_pro_t* pro, hio_dev_pro_sid_t sid)
{
hio_t* hio = pro->hio;
cgi_peer_xtn_t* cgi_peer = hio_dev_pro_getxtn(pro);
cgi_t* cgi = cgi_peer->state;
cgi_peer_xtn_t* peer = hio_dev_pro_getxtn(pro);
cgi_t* cgi = peer->cgi;
if (!cgi) return; /* cgi state already gone */
@ -318,18 +319,18 @@ static void cgi_peer_on_close (hio_dev_pro_t* pro, hio_dev_pro_sid_t sid)
HIO_DEBUG3 (hio, "HTTS(%p) - peer %p(pid=%d) closing master\n", cgi->client->htts, pro, (int)pro->child_pid);
cgi->peer = HIO_NULL; /* clear this peer from the state */
HIO_ASSERT (hio, cgi_peer->state != HIO_NULL);
/*printf ("DETACHING FROM CGI PEER DEVICE.....................%p %d\n", cgi_peer->state, (int)cgi_peer->state->rsrc_refcnt);*/
HIO_SVC_HTTS_RSRC_DETACH (cgi_peer->state);
HIO_ASSERT (hio, peer->cgi != HIO_NULL);
/*printf ("DETACHING FROM CGI PEER DEVICE.....................%p %d\n", peer->cgi, (int)peer->cgi->rsrc_refcnt);*/
HIO_SVC_HTTS_RSRC_DETACH (peer->cgi);
if (cgi->peer_htrd)
{
/* once this peer device is closed, peer's htrd is also never used.
* it's safe to detach the extra information attached on the htrd object. */
cgi_peer = hio_htrd_getxtn(cgi->peer_htrd);
HIO_ASSERT (hio, cgi_peer->state != HIO_NULL);
/*printf ("DETACHING FROM CGI PEER HTRD.....................%p %d\n", cgi_peer->state, (int)cgi_peer->state->rsrc_refcnt);*/
HIO_SVC_HTTS_RSRC_DETACH (cgi_peer->state);
peer = hio_htrd_getxtn(cgi->peer_htrd);
HIO_ASSERT (hio, peer->cgi != HIO_NULL);
/*printf ("DETACHING FROM CGI PEER HTRD.....................%p %d\n", peer->cgi, (int)peer->cgi->rsrc_refcnt);*/
HIO_SVC_HTTS_RSRC_DETACH (peer->cgi);
}
break;
@ -360,11 +361,11 @@ static void cgi_peer_on_close (hio_dev_pro_t* pro, hio_dev_pro_sid_t sid)
}
}
static int cgi_peer_on_read (hio_dev_pro_t* pro, hio_dev_pro_sid_t sid, const void* data, hio_iolen_t dlen)
static int peer_on_read (hio_dev_pro_t* pro, hio_dev_pro_sid_t sid, const void* data, hio_iolen_t dlen)
{
hio_t* hio = pro->hio;
cgi_peer_xtn_t* cgi_peer = hio_dev_pro_getxtn(pro);
cgi_t* cgi = cgi_peer->state;
cgi_peer_xtn_t* peer = hio_dev_pro_getxtn(pro);
cgi_t* cgi = peer->cgi;
HIO_ASSERT (hio, sid == HIO_DEV_PRO_OUT); /* since HIO_DEV_PRO_ERRTONUL is used, there should be no input from HIO_DEV_PRO_ERR */
HIO_ASSERT (hio, cgi != HIO_NULL);
@ -384,7 +385,7 @@ static int cgi_peer_on_read (hio_dev_pro_t* pro, hio_dev_pro_sid_t sid, const vo
int n;
/* the cgi script could be misbehaving.
* it still has to read more but EOF is read.
* otherwise cgi_peer_htrd_poke() should have been called */
* otherwise peer_htrd_poke() should have been called */
n = cgi_write_last_chunk_to_client(cgi);
cgi_mark_over (cgi, CGI_OVER_READ_FROM_PEER);
if (n <= -1) goto oops;
@ -424,7 +425,7 @@ oops:
return 0;
}
static int cgi_peer_capture_response_header (hio_htre_t* req, const hio_bch_t* key, const hio_htre_hdrval_t* val, void* ctx)
static int peer_capture_response_header (hio_htre_t* req, const hio_bch_t* key, const hio_htre_hdrval_t* val, void* ctx)
{
hio_svc_htts_cli_t* cli = (hio_svc_htts_cli_t*)ctx;
@ -453,10 +454,10 @@ static int cgi_peer_capture_response_header (hio_htre_t* req, const hio_bch_t* k
return 0;
}
static int cgi_peer_htrd_peek (hio_htrd_t* htrd, hio_htre_t* req)
static int peer_htrd_peek (hio_htrd_t* htrd, hio_htre_t* req)
{
cgi_peer_xtn_t* cgi_peer = hio_htrd_getxtn(htrd);
cgi_t* cgi = cgi_peer->state;
cgi_peer_xtn_t* peer = hio_htrd_getxtn(htrd);
cgi_t* cgi = peer->cgi;
hio_svc_htts_cli_t* cli = cgi->client;
hio_bch_t dtbuf[64];
int status_code = 200;
@ -485,7 +486,7 @@ static int cgi_peer_htrd_peek (hio_htrd_t* htrd, hio_htre_t* req)
status_code, hio_http_status_to_bcstr(status_code),
cli->htts->server_name, dtbuf) == (hio_oow_t)-1) return -1;
if (hio_htre_walkheaders(req, cgi_peer_capture_response_header, cli) <= -1) return -1;
if (hio_htre_walkheaders(req, peer_capture_response_header, cli) <= -1) return -1;
switch (cgi->res_mode_to_cli)
{
@ -507,11 +508,11 @@ static int cgi_peer_htrd_peek (hio_htrd_t* htrd, hio_htre_t* req)
return cgi_write_to_client(cgi, HIO_BECS_PTR(cli->sbuf), HIO_BECS_LEN(cli->sbuf));
}
static int cgi_peer_htrd_poke (hio_htrd_t* htrd, hio_htre_t* req)
static int peer_htrd_poke (hio_htrd_t* htrd, hio_htre_t* req)
{
/* client request got completed */
cgi_peer_xtn_t* cgi_peer = hio_htrd_getxtn(htrd);
cgi_t* cgi = cgi_peer->state;
cgi_peer_xtn_t* peer = hio_htrd_getxtn(htrd);
cgi_t* cgi = peer->cgi;
/*printf (">> PEER RESPONSE COMPLETED\n");*/
@ -521,10 +522,10 @@ static int cgi_peer_htrd_poke (hio_htrd_t* htrd, hio_htre_t* req)
return 0;
}
static int cgi_peer_htrd_push_content (hio_htrd_t* htrd, hio_htre_t* req, const hio_bch_t* data, hio_oow_t dlen)
static int peer_htrd_push_content (hio_htrd_t* htrd, hio_htre_t* req, const hio_bch_t* data, hio_oow_t dlen)
{
cgi_peer_xtn_t* cgi_peer = hio_htrd_getxtn(htrd);
cgi_t* cgi = cgi_peer->state;
cgi_peer_xtn_t* peer = hio_htrd_getxtn(htrd);
cgi_t* cgi = peer->cgi;
HIO_ASSERT (cgi->client->htts->hio, htrd == cgi->peer_htrd);
@ -570,11 +571,11 @@ oops:
return -1;
}
static hio_htrd_recbs_t cgi_peer_htrd_recbs =
static hio_htrd_recbs_t peer_htrd_recbs =
{
cgi_peer_htrd_peek,
cgi_peer_htrd_poke,
cgi_peer_htrd_push_content
peer_htrd_peek,
peer_htrd_poke,
peer_htrd_push_content
};
static int cgi_client_htrd_poke (hio_htrd_t* htrd, hio_htre_t* req)
@ -607,16 +608,16 @@ static int cgi_client_htrd_push_content (hio_htrd_t* htrd, hio_htre_t* req, cons
static hio_htrd_recbs_t cgi_client_htrd_recbs =
{
HIO_NULL,
HIO_NULL, /* this shall be set to an actual peer handler before hio_htrd_setrecbs() */
cgi_client_htrd_poke,
cgi_client_htrd_push_content
};
static int cgi_peer_on_write (hio_dev_pro_t* pro, hio_iolen_t wrlen, void* wrctx)
static int peer_on_write (hio_dev_pro_t* pro, hio_iolen_t wrlen, void* wrctx)
{
hio_t* hio = pro->hio;
cgi_peer_xtn_t* cgi_peer = hio_dev_pro_getxtn(pro);
cgi_t* cgi = cgi_peer->state;
cgi_peer_xtn_t* peer = hio_dev_pro_getxtn(pro);
cgi_t* cgi = peer->cgi;
if (cgi == HIO_NULL) return 0; /* there is nothing i can do. the cgi is being cleared or has been cleared already. */
@ -772,7 +773,7 @@ oops:
return 0;
}
struct cgi_peer_fork_ctx_t
struct peer_fork_ctx_t
{
hio_svc_htts_cli_t* cli;
hio_htre_t* req;
@ -780,9 +781,9 @@ struct cgi_peer_fork_ctx_t
const hio_bch_t* script;
hio_bch_t* actual_script;
};
typedef struct cgi_peer_fork_ctx_t cgi_peer_fork_ctx_t;
typedef struct peer_fork_ctx_t peer_fork_ctx_t;
static int cgi_peer_capture_request_header (hio_htre_t* req, const hio_bch_t* key, const hio_htre_hdrval_t* val, void* ctx)
static int peer_capture_request_header (hio_htre_t* req, const hio_bch_t* key, const hio_htre_hdrval_t* val, void* ctx)
{
hio_becs_t* dbuf = (hio_becs_t*)ctx;
@ -821,10 +822,10 @@ static int cgi_peer_capture_request_header (hio_htre_t* req, const hio_bch_t* ke
return 0;
}
static int cgi_peer_on_fork (hio_dev_pro_t* pro, void* fork_ctx)
static int peer_on_fork (hio_dev_pro_t* pro, void* fork_ctx)
{
hio_t* hio = pro->hio; /* in this callback, the pro device is not fully up. however, the hio field is guaranteed to be available */
cgi_peer_fork_ctx_t* fc = (cgi_peer_fork_ctx_t*)fork_ctx;
peer_fork_ctx_t* fc = (peer_fork_ctx_t*)fork_ctx;
hio_oow_t content_length;
const hio_bch_t* qparam;
const hio_bch_t* tmpstr;
@ -912,7 +913,7 @@ static int cgi_peer_on_fork (hio_dev_pro_t* pro, void* fork_ctx)
if (hio_becs_init(&dbuf, hio, 256) >= 0)
{
hio_htre_walkheaders (fc->req, cgi_peer_capture_request_header, &dbuf);
hio_htre_walkheaders (fc->req, peer_capture_request_header, &dbuf);
/* [NOTE] trailers are not available when this cgi resource is started. let's not call hio_htre_walktrailers() */
hio_becs_fini (&dbuf);
}
@ -925,9 +926,9 @@ int hio_svc_htts_docgi (hio_svc_htts_t* htts, hio_dev_sck_t* csck, hio_htre_t* r
hio_t* hio = htts->hio;
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(csck);
cgi_t* cgi = HIO_NULL;
cgi_peer_xtn_t* cgi_peer;
cgi_peer_xtn_t* peer;
hio_dev_pro_make_t mi;
cgi_peer_fork_ctx_t fc;
peer_fork_ctx_t fc;
/* ensure that you call this function before any contents is received */
HIO_ASSERT (hio, hio_htre_getcontentlen(req) == 0);
@ -943,10 +944,10 @@ int hio_svc_htts_docgi (hio_svc_htts_t* htts, hio_dev_sck_t* csck, hio_htre_t* r
HIO_MEMSET (&mi, 0, HIO_SIZEOF(mi));
mi.flags = HIO_DEV_PRO_READOUT | HIO_DEV_PRO_ERRTONUL | HIO_DEV_PRO_WRITEIN /*| HIO_DEV_PRO_FORGET_CHILD*/;
mi.cmd = fc.actual_script;
mi.on_read = cgi_peer_on_read;
mi.on_write = cgi_peer_on_write;
mi.on_close = cgi_peer_on_close;
mi.on_fork = cgi_peer_on_fork;
mi.on_read = peer_on_read;
mi.on_write = peer_on_write;
mi.on_close = peer_on_close;
mi.on_fork = peer_on_fork;
mi.fork_ctx = &fc;
cgi = (cgi_t*)hio_svc_htts_rsrc_make(htts, HIO_SIZEOF(*cgi), cgi_on_kill);
@ -958,15 +959,17 @@ int hio_svc_htts_docgi (hio_svc_htts_t* htts, hio_dev_sck_t* csck, hio_htre_t* r
cgi->req_version = *hio_htre_getversion(req);
cgi->req_content_length_unlimited = hio_htre_getreqcontentlen(req, &cgi->req_content_length);
/* remember the client socket's io event handlers */
cgi->client_org_on_read = csck->on_read;
cgi->client_org_on_write = csck->on_write;
cgi->client_org_on_disconnect = csck->on_disconnect;
/* set new io events handlers on the client socket */
csck->on_read = cgi_client_on_read;
csck->on_write = cgi_client_on_write;
csck->on_disconnect = cgi_client_on_disconnect;
HIO_ASSERT (hio, cli->rsrc == HIO_NULL);
HIO_SVC_HTTS_RSRC_ATTACH (cgi, cli->rsrc);
HIO_SVC_HTTS_RSRC_ATTACH (cgi, cli->rsrc); /* cli->rsrc = cgi */
if (access(mi.cmd, X_OK) == -1)
{
@ -974,18 +977,18 @@ int hio_svc_htts_docgi (hio_svc_htts_t* htts, hio_dev_sck_t* csck, hio_htre_t* r
goto oops; /* TODO: must not go to oops. just destroy the cgi and finalize the request .. */
}
cgi->peer = hio_dev_pro_make(hio, HIO_SIZEOF(*cgi_peer), &mi);
cgi->peer = hio_dev_pro_make(hio, HIO_SIZEOF(*peer), &mi);
if (HIO_UNLIKELY(!cgi->peer)) goto oops;
cgi_peer = hio_dev_pro_getxtn(cgi->peer);
HIO_SVC_HTTS_RSRC_ATTACH (cgi, cgi_peer->state);
peer = hio_dev_pro_getxtn(cgi->peer);
HIO_SVC_HTTS_RSRC_ATTACH (cgi, peer->cgi); /* peer->cgi in pro = cgi */
cgi->peer_htrd = hio_htrd_open(hio, HIO_SIZEOF(*cgi_peer));
cgi->peer_htrd = hio_htrd_open(hio, HIO_SIZEOF(*peer));
if (HIO_UNLIKELY(!cgi->peer_htrd)) goto oops;
hio_htrd_setoption (cgi->peer_htrd, HIO_HTRD_SKIP_INITIAL_LINE | HIO_HTRD_RESPONSE);
hio_htrd_setrecbs (cgi->peer_htrd, &cgi_peer_htrd_recbs);
hio_htrd_setrecbs (cgi->peer_htrd, &peer_htrd_recbs);
cgi_peer = hio_htrd_getxtn(cgi->peer_htrd);
HIO_SVC_HTTS_RSRC_ATTACH (cgi, cgi_peer->state);
peer = hio_htrd_getxtn(cgi->peer_htrd);
HIO_SVC_HTTS_RSRC_ATTACH (cgi, peer->cgi); /* peer->cgi in htrd = cgi */
#if !defined(CGI_ALLOW_UNLIMITED_REQ_CONTENT_LENGTH)
if (cgi->req_content_length_unlimited)

View File

@ -1,25 +1,59 @@
#include "http-prv.h"
#include <hio-fmt.h>
#include <hio-chr.h>
#define FCGI_PADDING_SIZE 255
#define FCGI_RECORD_SIZE \
(sizeof(struct fcgi_record_header) + FCGI_CONTENT_SIZE + FCGI_PADDING_SIZE)
#define FCGI_ALLOW_UNLIMITED_REQ_CONTENT_LENGTH
#define FCGI_BEGIN_REQUEST 1
#define FCGI_ABORT_REQUEST 2
#define FCGI_END_REQUEST 3
#define FCGI_PARAMS 4
#define FCGI_STDIN 5
#define FCGI_STDOUT 6
#define FCGI_STDERR 7
#define FCGI_DATA 8
#define FCGI_GET_VALUES 9
#define FCGI_GET_VALUES_RESULT 10
#define FCGI_UNKNOWN_TYPE 11
#define FCGI_MAXTYPE (FCGI_UNKNOWN_TYPE)
enum fcgi_res_mode_t
{
FCGI_RES_MODE_CHUNKED,
FCGI_RES_MODE_CLOSE,
FCGI_RES_MODE_LENGTH
};
typedef enum fcgi_res_mode_t fcgi_res_mode_t;
#define FCGI_PENDING_IO_THRESHOLD 5
#define FCGI_OVER_READ_FROM_CLIENT (1 << 0)
#define FCGI_OVER_READ_FROM_PEER (1 << 1)
#define FCGI_OVER_WRITE_TO_CLIENT (1 << 2)
#define FCGI_OVER_WRITE_TO_PEER (1 << 3)
#define FCGI_OVER_ALL (FCGI_OVER_READ_FROM_CLIENT | FCGI_OVER_READ_FROM_PEER | FCGI_OVER_WRITE_TO_CLIENT | FCGI_OVER_WRITE_TO_PEER)
#define FCGI_VERSION (1)
#define FCGI_PADDING_SIZE 255
#define FCGI_RECORD_SIZE HIO_SIZEOF(struct fcgi_record_header_t) + FCGI_CONTENT_SIZE + FCGI_PADDING_SIZE)
enum fcgi_req_type_t
{
FCGI_BEGIN_REQUEST = 1,
FCGI_ABORT_REQUEST = 2,
FCGI_END_REQUEST = 3,
FCGI_PARAMS = 4,
FCGI_STDIN = 5,
FCGI_STDOUT = 6,
FCGI_STDERR = 7,
FCGI_DATA = 8,
FCGI_GET_VALUES = 9,
FCGI_GET_VALUES_RESULT = 10,
FCGI_UNKNOWN_TYPE = 11,
FCGI_MAXTYPE = (FCGI_UNKNOWN_TYPE)
};
typedef enum fcgi_req_type_t fcgi_req_type_t;
/* role in fcgi_begin_request_body */
#define FCGI_RESPONDER 1
#define FCGI_AUTHORIZER 2
#define FCGI_FILTER 3
enum fcgi_role_t
{
FCGI_ROLE_RESPONDER = 1,
FCGI_ROLE_AUTHORIZER = 2,
FCGI_ROLE_FILTER = 3,
};
typedef enum fcgi_role_t fcgi_role_t;
/* flag in fcgi_begin_request_body */
#define FCGI_KEEP_CONN 1
@ -27,11 +61,11 @@
/* proto in fcgi_end_request_body */
#define FCGI_REQUEST_COMPLETE 0
#define FCGI_CANT_MPX_CONN 1
#define FCGI_OVERLOADED 2
#define FFCGI_OVERLOADED 2
#define FCGI_UNKNOWN_ROLE 3
#include "hio-pac1.h"
struct fcgi_record_header
struct fcgi_record_header_t
{
hio_uint8_t version;
hio_uint8_t type;
@ -39,16 +73,18 @@ struct fcgi_record_header
hio_uint16_t content_len;
hio_uint8_t padding_len;
hio_uint8_t reserved;
/* content data of the record 'type'*/
/* padding data ... */
};
struct fcgi_begin_request_body
struct fcgi_begin_request_body_t
{
hio_uint16_t role;
hio_uint8_t flags;
hio_uint8_t reserved[5];
};
struct fcgi_end_request_body
struct fcgi_end_request_body_t
{
hio_uint32_t app_status;
hio_uint8_t proto_status;
@ -57,20 +93,47 @@ struct fcgi_end_request_body
#include "hio-upac.h"
struct fcgi_t
{
HIO_SVC_HTTS_RSRC_HEADER;
hio_oow_t num_pending_writes_to_client;
hio_oow_t num_pending_writes_to_peer;
//hio_dev_pro_t* peer;
hio_svc_htts_cli_t* client;
hio_http_version_t req_version; /* client request */
unsigned int over: 4; /* must be large enough to accomodate FCGI_OVER_ALL */
unsigned int keep_alive: 1;
unsigned int req_content_length_unlimited: 1;
unsigned int ever_attempted_to_write_to_client: 1;
unsigned int client_disconnected: 1;
unsigned int client_htrd_recbs_changed: 1;
hio_oow_t req_content_length; /* client request content length */
fcgi_res_mode_t res_mode_to_cli;
hio_dev_sck_on_read_t client_org_on_read;
hio_dev_sck_on_write_t client_org_on_write;
hio_dev_sck_on_disconnect_t client_org_on_disconnect;
hio_htrd_recbs_t client_htrd_org_recbs;
};
typedef struct fcgi_t fcgi_t;
#if 0
static int begin_request ()
{
struct fcgi_record_header* h;
struct fcgi_begin_request_body* br;
h->version = 1;
h->version = FCGI_VERSION;
h->type = FCGI_BEGIN_REQUEST;
h->id = HIO_CONST_HTON16(1);
h->content_len = HIO_HTON16(HIO_SIZEOF(struct fcgi_begin_request_body));
h->padding_len = 0;
br->role = HIO_CONST_HTON16(FCGI_RESPONDER);
br->flags = 0;
@ -84,3 +147,521 @@ static int begin_request ()
*/
}
#endif
static void fcgi_halt_participating_devices (fcgi_t* fcgi)
{
HIO_ASSERT (fcgi->client->htts->hio, fcgi->client != HIO_NULL);
HIO_ASSERT (fcgi->client->htts->hio, fcgi->client->sck != HIO_NULL);
/* TODO: include fcgi session id in the output in place of peer??? */
HIO_DEBUG3 (fcgi->client->htts->hio, "HTTS(%p) - Halting participating devices in fcgi state %p(client=%p)\n", fcgi->client->htts, fcgi, fcgi->client->sck);
hio_dev_sck_halt (fcgi->client->sck);
#if 0
/* check for peer as it may not have been started */
/* TODO: send abort if the transmission didn't end ... */
if (fcgi->peer) hio_dev_pro_halt (fcgi->peer);
#endif
}
static int fcgi_write_to_peer (fcgi_t* fcgi, const void* data, hio_iolen_t dlen)
{
#if 0
fcgi->num_pending_writes_to_peer++;
if (hio_dev_pro_write(fcgi->peer, data, dlen, HIO_NULL) <= -1)
{
fcgi->num_pending_writes_to_peer--;
return -1;
}
#endif
/* TODO: check if it's already finished or something.. */
if (fcgi->num_pending_writes_to_peer > FCGI_PENDING_IO_THRESHOLD)
{
/* disable input watching */
if (hio_dev_sck_read(fcgi->client->sck, 0) <= -1) return -1;
}
return 0;
}
static HIO_INLINE void fcgi_mark_over (fcgi_t* fcgi, int over_bits)
{
unsigned int old_over;
old_over = fcgi->over;
fcgi->over |= over_bits;
HIO_DEBUG4 (fcgi->htts->hio, "HTTS(%p) - client=%p new-bits=%x over=%x\n", fcgi->htts, fcgi->client->sck, (int)over_bits, (int)fcgi->over);
if (!(old_over & FCGI_OVER_READ_FROM_CLIENT) && (fcgi->over & FCGI_OVER_READ_FROM_CLIENT))
{
if (hio_dev_sck_read(fcgi->client->sck, 0) <= -1)
{
HIO_DEBUG2 (fcgi->htts->hio, "HTTS(%p) - halting client(%p) for failure to disable input watching\n", fcgi->htts, fcgi->client->sck);
hio_dev_sck_halt (fcgi->client->sck);
}
}
if (!(old_over & FCGI_OVER_READ_FROM_PEER) && (fcgi->over & FCGI_OVER_READ_FROM_PEER))
{
#if 0 // TODO:
if (fcgi->peer && hio_dev_pro_read(fcgi->peer, HIO_DEV_PRO_OUT, 0) <= -1)
{
HIO_DEBUG2 (fcgi->htts->hio, "HTTS(%p) - halting peer(%p) for failure to disable input watching\n", fcgi->htts, fcgi->peer);
hio_dev_pro_halt (fcgi->peer);
}
#endif
}
if (old_over != FCGI_OVER_ALL && fcgi->over == FCGI_OVER_ALL)
{
/* ready to stop */
#if 0 // TODO:
if (fcgi->peer)
{
HIO_DEBUG2 (fcgi->htts->hio, "HTTS(%p) - halting peer(%p) as it is unneeded\n", fcgi->htts, fcgi->peer);
hio_dev_pro_halt (fcgi->peer);
}
#endif
if (fcgi->keep_alive)
{
/* how to arrange to delete this fcgi object and put the socket back to the normal waiting state??? */
HIO_ASSERT (fcgi->htts->hio, fcgi->client->rsrc == (hio_svc_htts_rsrc_t*)fcgi);
/*printf ("DETACHING FROM THE MAIN CLIENT RSRC... state -> %p\n", fcgi->client->rsrc);*/
HIO_SVC_HTTS_RSRC_DETACH (fcgi->client->rsrc);
/* fcgi must not be accessed from here down as it could have been destroyed */
}
else
{
HIO_DEBUG2 (fcgi->htts->hio, "HTTS(%p) - halting client(%p) for no keep-alive\n", fcgi->htts, fcgi->client->sck);
hio_dev_sck_shutdown (fcgi->client->sck, HIO_DEV_SCK_SHUTDOWN_WRITE);
hio_dev_sck_halt (fcgi->client->sck);
}
}
}
static int fcgi_write_to_client (fcgi_t* fcgi, const void* data, hio_iolen_t dlen)
{
fcgi->ever_attempted_to_write_to_client = 1;
fcgi->num_pending_writes_to_client++;
if (hio_dev_sck_write(fcgi->client->sck, data, dlen, HIO_NULL, HIO_NULL) <= -1)
{
fcgi->num_pending_writes_to_client--;
return -1;
}
if (fcgi->num_pending_writes_to_client > FCGI_PENDING_IO_THRESHOLD)
{
/* disable reading on the output stream of the peer */
#if 0 // TODO
if (hio_dev_pro_read(fcgi->peer, HIO_DEV_PRO_OUT, 0) <= -1) return -1;
#endif
}
return 0;
}
static int fcgi_send_final_status_to_client (fcgi_t* fcgi, int status_code, int force_close)
{
hio_svc_htts_cli_t* cli = fcgi->client;
hio_bch_t dtbuf[64];
hio_svc_htts_fmtgmtime (cli->htts, HIO_NULL, dtbuf, HIO_COUNTOF(dtbuf));
if (!force_close) force_close = !fcgi->keep_alive;
if (hio_becs_fmt(cli->sbuf, "HTTP/%d.%d %d %hs\r\nServer: %hs\r\nDate: %s\r\nConnection: %hs\r\nContent-Length: 0\r\n\r\n",
fcgi->req_version.major, fcgi->req_version.minor,
status_code, hio_http_status_to_bcstr(status_code),
cli->htts->server_name, dtbuf,
(force_close? "close": "keep-alive")) == (hio_oow_t)-1) return -1;
return (fcgi_write_to_client(fcgi, HIO_BECS_PTR(cli->sbuf), HIO_BECS_LEN(cli->sbuf)) <= -1 ||
(force_close && fcgi_write_to_client(fcgi, HIO_NULL, 0) <= -1))? -1: 0;
}
static int fcgi_client_htrd_poke (hio_htrd_t* htrd, hio_htre_t* req)
{
/* client request got completed */
hio_svc_htts_cli_htrd_xtn_t* htrdxtn = (hio_svc_htts_cli_htrd_xtn_t*)hio_htrd_getxtn(htrd);
hio_dev_sck_t* sck = htrdxtn->sck;
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(sck);
fcgi_t* fcgi = (fcgi_t*)cli->rsrc;
/*printf (">> CLIENT REQUEST COMPLETED\n");*/
#if 0 // TODO: send abort???
/* indicate EOF to the client peer */
if (fcgi_write_to_peer(fcgi, HIO_NULL, 0) <= -1) return -1;
#endif
fcgi_mark_over (fcgi, FCGI_OVER_READ_FROM_CLIENT);
return 0;
}
static int fcgi_client_htrd_push_content (hio_htrd_t* htrd, hio_htre_t* req, const hio_bch_t* data, hio_oow_t dlen)
{
hio_svc_htts_cli_htrd_xtn_t* htrdxtn = (hio_svc_htts_cli_htrd_xtn_t*)hio_htrd_getxtn(htrd);
hio_dev_sck_t* sck = htrdxtn->sck;
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(sck);
fcgi_t* fcgi = (fcgi_t*)cli->rsrc;
HIO_ASSERT (sck->hio, cli->sck == sck);
return fcgi_write_to_peer(fcgi, data, dlen);
}
static hio_htrd_recbs_t fcgi_client_htrd_recbs =
{
HIO_NULL, /* this shall be set to an actual peer handler before hio_htrd_setrecbs() */
fcgi_client_htrd_poke,
fcgi_client_htrd_push_content
};
static void fcgi_client_on_disconnect (hio_dev_sck_t* sck)
{
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(sck);
fcgi_t* fcgi = (fcgi_t*)cli->rsrc;
fcgi->client_disconnected = 1;
fcgi->client_org_on_disconnect (sck);
}
static int fcgi_client_on_read (hio_dev_sck_t* sck, const void* buf, hio_iolen_t len, const hio_skad_t* srcaddr)
{
hio_t* hio = sck->hio;
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(sck);
fcgi_t* fcgi = (fcgi_t*)cli->rsrc;
HIO_ASSERT (hio, sck == cli->sck);
if (len <= -1)
{
/* read error */
HIO_DEBUG2 (cli->htts->hio, "HTTS(%p) - read error on client %p(%d)\n", sck, (int)sck->hnd);
goto oops;
}
#if 0
if (!fcgi->peer)
{
/* the peer is gone */
goto oops; /* do what? just return 0? */
}
#endif
if (len == 0)
{
/* EOF on the client side. arrange to close */
HIO_DEBUG3 (hio, "HTTS(%p) - EOF from client %p(hnd=%d)\n", fcgi->client->htts, sck, (int)sck->hnd);
if (!(fcgi->over & FCGI_OVER_READ_FROM_CLIENT)) /* if this is true, EOF is received without fcgi_client_htrd_poke() */
{
#if 0
/* indicate eof to the write side */
if (fcgi_write_to_peer(fcgi, HIO_NULL, 0) <= -1) goto oops;
#endif
fcgi_mark_over (fcgi, FCGI_OVER_READ_FROM_CLIENT);
}
}
else
{
hio_oow_t rem;
HIO_ASSERT (hio, !(fcgi->over & FCGI_OVER_READ_FROM_CLIENT));
if (hio_htrd_feed(cli->htrd, buf, len, &rem) <= -1) goto oops;
if (rem > 0)
{
/* TODO store this to client buffer. once the current resource is completed, arrange to call on_read() with it */
HIO_DEBUG3 (hio, "HTTS(%p) - excessive data after contents by fcgi client %p(%d)\n", sck->hio, sck, (int)sck->hnd);
}
}
return 0;
oops:
fcgi_halt_participating_devices (fcgi);
return 0;
}
static int fcgi_client_on_write (hio_dev_sck_t* sck, hio_iolen_t wrlen, void* wrctx, const hio_skad_t* dstaddr)
{
hio_t* hio = sck->hio;
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(sck);
fcgi_t* fcgi = (fcgi_t*)cli->rsrc;
if (wrlen <= -1)
{
HIO_DEBUG3 (hio, "HTTS(%p) - unable to write to client %p(%d)\n", sck->hio, sck, (int)sck->hnd);
goto oops;
}
if (wrlen == 0)
{
/* if the connect is keep-alive, this part may not be called */
fcgi->num_pending_writes_to_client--;
HIO_ASSERT (hio, fcgi->num_pending_writes_to_client == 0);
HIO_DEBUG3 (hio, "HTTS(%p) - indicated EOF to client %p(%d)\n", fcgi->client->htts, sck, (int)sck->hnd);
/* since EOF has been indicated to the client, it must not write to the client any further.
* this also means that i don't need any data from the peer side either.
* i don't need to enable input watching on the peer side */
fcgi_mark_over (fcgi, FCGI_OVER_WRITE_TO_CLIENT);
}
else
{
HIO_ASSERT (hio, fcgi->num_pending_writes_to_client > 0);
#if 0 // TODO
fcgi->num_pending_writes_to_client--;
if (fcgi->peer && fcgi->num_pending_writes_to_client == FCGI_PENDING_IO_THRESHOLD)
{
if (!(fcgi->over & FCGI_OVER_READ_FROM_PEER) &&
hio_dev_pro_read(fcgi->peer, HIO_DEV_PRO_OUT, 1) <= -1) goto oops;
}
#endif
if ((fcgi->over & FCGI_OVER_READ_FROM_PEER) && fcgi->num_pending_writes_to_client <= 0)
{
fcgi_mark_over (fcgi, FCGI_OVER_WRITE_TO_CLIENT);
}
}
return 0;
oops:
fcgi_halt_participating_devices (fcgi);
return 0;
}
static void fcgi_on_kill (fcgi_t* fcgi)
{
hio_t* hio = fcgi->htts->hio;
HIO_DEBUG2 (hio, "HTTS(%p) - killing fcgi client(%p)\n", fcgi->htts, fcgi->client->sck);
#if 0
if (fcgi->peer)
{
fcgi_peer_xtn_t* peer = hio_dev_pro_getxtn(fcgi->peer);
peer->state = HIO_NULL; /* peer->state many not be NULL if the resource is killed regardless of the reference count */
hio_dev_pro_kill (fcgi->peer);
fcgi->peer = HIO_NULL;
}
if (fcgi->client_org_on_read)
{
fcgi->client->sck->on_read = fcgi->client_org_on_read;
fcgi->client_org_on_read = HIO_NULL;
}
if (fcgi->client_org_on_write)
{
fcgi->client->sck->on_write = fcgi->client_org_on_write;
fcgi->client_org_on_write = HIO_NULL;
}
if (fcgi->client_org_on_disconnect)
{
fcgi->client->sck->on_disconnect = fcgi->client_org_on_disconnect;
fcgi->client_org_on_disconnect = HIO_NULL;
}
if (fcgi->client_htrd_recbs_changed)
{
/* restore the callbacks */
hio_htrd_setrecbs (fcgi->client->htrd, &fcgi->client_htrd_org_recbs);
}
if (!fcgi->client_disconnected)
{
if (!fcgi->keep_alive || hio_dev_sck_read(fcgi->client->sck, 1) <= -1)
{
HIO_DEBUG2 (hio, "HTTS(%p) - halting client(%p) for failure to enable input watching\n", fcgi->htts, fcgi->client->sck);
hio_dev_sck_halt (fcgi->client->sck);
}
}
#endif
}
int hio_svc_htts_dofcgi (hio_svc_htts_t* htts, hio_dev_sck_t* csck, hio_htre_t* req, hio_skad_t* fcgi_server_addr)
{
hio_t* hio = htts->hio;
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(csck);
fcgi_t* fcgi = HIO_NULL;
//fcgi_peer_xtn_t* peer;
/* ensure that you call this function before any contents is received */
HIO_ASSERT (hio, hio_htre_getcontentlen(req) == 0);
fcgi = (fcgi_t*)hio_svc_htts_rsrc_make(htts, HIO_SIZEOF(*fcgi), fcgi_on_kill);
if (HIO_UNLIKELY(!fcgi)) goto oops;
fcgi->client = cli;
/*fcgi->num_pending_writes_to_client = 0;
fcgi->num_pending_writes_to_peer = 0;*/
fcgi->req_version = *hio_htre_getversion(req);
fcgi->req_content_length_unlimited = hio_htre_getreqcontentlen(req, &fcgi->req_content_length);
/* remember the client socket's io event handlers */
fcgi->client_org_on_read = csck->on_read;
fcgi->client_org_on_write = csck->on_write;
fcgi->client_org_on_disconnect = csck->on_disconnect;
/* set new io events handlers on the client socket */
csck->on_read = fcgi_client_on_read;
csck->on_write = fcgi_client_on_write;
csck->on_disconnect = fcgi_client_on_disconnect;
HIO_ASSERT (hio, cli->rsrc == HIO_NULL);
HIO_SVC_HTTS_RSRC_ATTACH (fcgi, cli->rsrc); /* cli->rsrc = fcgi */
#if 0 // TODO
fcgi->peer = hio_dev_pro_make(hio, HIO_SIZEOF(*peer), &mi);
if (HIO_UNLIKELY(!fcgi->peer)) goto oops;
peer = hio_dev_pro_getxtn(fcgi->peer);
HIO_SVC_HTTS_RSRC_ATTACH (fcgi, peer->fcgi); /* peer->fcgi = fcgi */
#else
/*
hio_fcgic_sess_t* fcgi_sess;
fcgi_sess = hio_svc_fcgic_tie(hio, "10.10.10.9:9000");
if (HIO_UNLIKELY(!fcgi_sess)) goto oops;
hio_svc_fcgic_untie (fcgic_sess); <--- this must release the session.
fcgi_sess = hio_svc_fcgic_tie(hio, "10.10.10.9:9000", callback?);
hio_svc_fcgic_write (hio, fcgi_sess, DATA, "aaaaaaaaaaaaaaaaaaaaa");
hio_svc_fcgic_write (hio, fcgi_sess, STDIO, "aaaaaaaaaaaaaaaaaaaaa");
fcgi->peer = hio_svc_fcgi_make(hio, XXXX);
if (HIO_UNLIKELY(!fcgi->peer)) goto oops;
peer = hio_dev_pro_getxtn(fcgi->peer);
HIO_SVC_HTTS_RSRC_ATTACH (fcgi, peer->fcgi);
*/
#endif
#if 0 // TODO
fcgi->peer_htrd = hio_htrd_open(hio, HIO_SIZEOF(*peer));
if (HIO_UNLIKELY(!fcgi->peer_htrd)) goto oops;
hio_htrd_setoption (fcgi->peer_htrd, HIO_HTRD_SKIP_INITIAL_LINE | HIO_HTRD_RESPONSE);
hio_htrd_setrecbs (fcgi->peer_htrd, &peer_htrd_recbs);
peer = hio_htrd_getxtn(fcgi->peer_htrd);
HIO_SVC_HTTS_RSRC_ATTACH (fcgi, peer->fcgi); /* peer->fcgi = fcgi */
#endif
#if !defined(FCGI_ALLOW_UNLIMITED_REQ_CONTENT_LENGTH)
if (fcgi->req_content_length_unlimited)
{
/* Transfer-Encoding is chunked. no content-length is known in advance. */
/* option 1. buffer contents. if it gets too large, send 413 Request Entity Too Large.
* option 2. send 411 Length Required immediately
* option 3. set Content-Length to -1 and use EOF to indicate the end of content [Non-Standard] */
if (cgi_send_final_status_to_client(cgi, 411, 1) <= -1) goto oops;
}
#endif
if (req->flags & HIO_HTRE_ATTR_EXPECT100)
{
/* TODO: Expect: 100-continue? who should handle this? cgi? or the http server? */
/* CAN I LET the cgi SCRIPT handle this? */
if (hio_comp_http_version_numbers(&req->version, 1, 1) >= 0 &&
(fcgi->req_content_length_unlimited || fcgi->req_content_length > 0))
{
/*
* Don't send 100 Continue if http verions is lower than 1.1
* [RFC7231]
* A server that receives a 100-continue expectation in an HTTP/1.0
* request MUST ignore that expectation.
*
* Don't send 100 Continue if expected content lenth is 0.
* [RFC7231]
* A server MAY omit sending a 100 (Continue) response if it has
* already received some or all of the message body for the
* corresponding request, or if the framing indicates that there is
* no message body.
*/
hio_bch_t msgbuf[64];
hio_oow_t msglen;
msglen = hio_fmttobcstr(hio, msgbuf, HIO_COUNTOF(msgbuf), "HTTP/%d.%d 100 Continue\r\n\r\n", fcgi->req_version.major, fcgi->req_version.minor);
if (fcgi_write_to_client(fcgi, msgbuf, msglen) <= -1) goto oops;
fcgi->ever_attempted_to_write_to_client = 0; /* reset this as it's polluted for 100 continue */
}
}
else if (req->flags & HIO_HTRE_ATTR_EXPECT)
{
/* 417 Expectation Failed */
fcgi_send_final_status_to_client(fcgi, 417, 1);
goto oops;
}
#if defined(FCGI_ALLOW_UNLIMITED_REQ_CONTENT_LENGTH)
if (fcgi->req_content_length_unlimited)
{
/* change the callbacks to subscribe to contents to be uploaded */
fcgi->client_htrd_org_recbs = *hio_htrd_getrecbs(fcgi->client->htrd);
fcgi_client_htrd_recbs.peek = fcgi->client_htrd_org_recbs.peek;
hio_htrd_setrecbs (fcgi->client->htrd, &fcgi_client_htrd_recbs);
fcgi->client_htrd_recbs_changed = 1;
}
else
{
#endif
if (fcgi->req_content_length > 0)
{
/* change the callbacks to subscribe to contents to be uploaded */
fcgi->client_htrd_org_recbs = *hio_htrd_getrecbs(fcgi->client->htrd);
fcgi_client_htrd_recbs.peek = fcgi->client_htrd_org_recbs.peek;
hio_htrd_setrecbs (fcgi->client->htrd, &fcgi_client_htrd_recbs);
fcgi->client_htrd_recbs_changed = 1;
}
else
{
/* no content to be uploaded from the client */
/* indicate EOF to the peer and disable input wathching from the client */
if (fcgi_write_to_peer(fcgi, HIO_NULL, 0) <= -1) goto oops;
fcgi_mark_over (fcgi, FCGI_OVER_READ_FROM_CLIENT | FCGI_OVER_WRITE_TO_PEER);
}
#if defined(FCGI_ALLOW_UNLIMITED_REQ_CONTENT_LENGTH)
}
#endif
/* this may change later if Content-Length is included in the cgi output */
if (req->flags & HIO_HTRE_ATTR_KEEPALIVE)
{
fcgi->keep_alive = 1;
fcgi->res_mode_to_cli = FCGI_RES_MODE_CHUNKED;
/* the mode still can get switched to FCGI_RES_MODE_LENGTH if the cgi script emits Content-Length */
}
else
{
fcgi->keep_alive = 0;
fcgi->res_mode_to_cli = FCGI_RES_MODE_CLOSE;
}
/* TODO: store current input watching state and use it when destroying the cgi data */
if (hio_dev_sck_read(csck, !(fcgi->over & FCGI_OVER_READ_FROM_CLIENT)) <= -1) goto oops;
return 0;
oops:
HIO_DEBUG2 (hio, "HTTS(%p) - FAILURE in dofcgi - socket(%p)\n", htts, csck);
if (fcgi) fcgi_halt_participating_devices (fcgi);
return -1;
}

View File

@ -1649,13 +1649,13 @@ int hio_equal_skads (const hio_skad_t* addr1, const hio_skad_t* addr2, int stric
if (strict)
{
/* don't care about scope id */
return HIO_MEMCMP(&((struct sockaddr_in6*)addr1)->sin6_addr, &((struct sockaddr_in6*)addr2)->sin6_addr, HIO_SIZEOF(((struct sockaddr_in6*)addr2)->sin6_addr)) == 0 &&
((struct sockaddr_in6*)addr1)->sin6_port == ((struct sockaddr_in6*)addr2)->sin6_port &&
((struct sockaddr_in6*)addr1)->sin6_scope_id == ((struct sockaddr_in6*)addr2)->sin6_scope_id;
}
else
{
/* don't care about scope id */
return HIO_MEMCMP(&((struct sockaddr_in6*)addr1)->sin6_addr, &((struct sockaddr_in6*)addr2)->sin6_addr, HIO_SIZEOF(((struct sockaddr_in6*)addr2)->sin6_addr)) == 0 &&
((struct sockaddr_in6*)addr1)->sin6_port == ((struct sockaddr_in6*)addr2)->sin6_port;
}

60
hio/m4/libtool.m4 generated vendored
View File

@ -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.
@ -1042,8 +1041,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
$AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@ -1493,7 +1492,7 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
: ${AR_FLAGS=cru}
: ${AR_FLAGS=cr}
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
@ -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
@ -4695,6 +4704,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
# flang / f18. f95 an alias for gfortran or flang on Debian
flang* | f18* | f95*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
@ -4939,6 +4954,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 +5019,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 +5276,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 +5797,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 +5819,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
@ -6423,7 +6445,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# 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
GXX=no
@ -6798,7 +6820,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# 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
@ -6863,7 +6885,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# 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
@ -7202,7 +7224,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# 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
# FIXME: insert proper C++ library support
@ -7286,7 +7308,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# 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
# g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
@ -7297,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# 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
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,