diff --git a/hio/Makefile.in b/hio/Makefile.in index 4a0d88f..fcde838 100644 --- a/hio/Makefile.in +++ b/hio/Makefile.in @@ -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 diff --git a/hio/ac/ar-lib b/hio/ac/ar-lib index 1e9388e..0baa4f6 100755 --- a/hio/ac/ar-lib +++ b/hio/ac/ar-lib @@ -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 . # # 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 diff --git a/hio/ac/compile b/hio/ac/compile index 23fcba0..99e5052 100755 --- a/hio/ac/compile +++ b/hio/ac/compile @@ -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 . # # 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/*) diff --git a/hio/ac/config.guess b/hio/ac/config.guess index b33c9e8..f50dcdb 100755 --- a/hio/ac/config.guess +++ b/hio/ac/config.guess @@ -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 #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 /* 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 @@ -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 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: "'" diff --git a/hio/ac/config.sub b/hio/ac/config.sub index b51fb8c..1d8e98b 100755 --- a/hio/ac/config.sub +++ b/hio/ac/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-08-29' +timestamp='2018-02-22' # 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 @@ -110,1159 +110,1223 @@ case $# in exit 1;; esac -# Split fields of configuration type -IFS="-" read -r field1 field2 field3 field4 <&2 - exit 1 +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. ;; - *-*-*-*) - basic_machine=$field1-$field2 - os=$field3-$field4 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 ;; - *-*-*) - # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two - # parts - maybe_os=$field2-$field3 - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ - | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ - | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ - | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) - basic_machine=$field1 - os=$maybe_os - ;; - android-linux) - basic_machine=$field1-unknown - os=linux-android - ;; - *) - basic_machine=$field1-$field2 - os=$field3 - ;; - esac + -bluegene*) + os=-cnk ;; - *-*) - # A lone config we happen to match not fitting any patern - case $field1-$field2 in - decstation-3100) - basic_machine=mips-dec - os= - ;; - *-*) - # Second component is usually, but not always the OS - case $field2 in - # Prevent following clause from handling this valid os - sun*os*) - basic_machine=$field1 - os=$field2 - ;; - # Manufacturers - dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ - | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ - | unicom* | ibm* | next | hp | isi* | apollo | altos* \ - | convergent* | ncr* | news | 32* | 3600* | 3100* \ - | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ - | ultra | tti* | harris | dolphin | highlevel | gould \ - | cbm | ns | masscomp | apple | axis | knuth | cray \ - | microblaze* | sim | cisco \ - | oki | wec | wrs | winbond) - basic_machine=$field1-$field2 - os= - ;; - *) - basic_machine=$field1 - os=$field2 - ;; - esac - ;; - esac + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 ;; - *) - # Convert single-component short-hands not valid as part of - # multi-component configurations. - case $field1 in - 386bsd) - basic_machine=i386-pc - os=bsd - ;; - a29khif) - basic_machine=a29k-amd - os=udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=scout - ;; - alliant) - basic_machine=fx80-alliant - os= - ;; - altos | altos3068) - basic_machine=m68k-altos - os= - ;; - am29k) - basic_machine=a29k-none - os=bsd - ;; - amdahl) - basic_machine=580-amdahl - os=sysv - ;; - amiga) - basic_machine=m68k-unknown - os= - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=bsd - ;; - aros) - basic_machine=i386-pc - os=aros - ;; - aux) - basic_machine=m68k-apple - os=aux - ;; - balance) - basic_machine=ns32k-sequent - os=dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=linux - ;; - cegcc) - basic_machine=arm-unknown - os=cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=bsd - ;; - convex-c2) - basic_machine=c2-convex - os=bsd - ;; - convex-c32) - basic_machine=c32-convex - os=bsd - ;; - convex-c34) - basic_machine=c34-convex - os=bsd - ;; - convex-c38) - basic_machine=c38-convex - os=bsd - ;; - cray) - basic_machine=j90-cray - os=unicos - ;; - crds | unos) - basic_machine=m68k-crds - os= - ;; - da30) - basic_machine=m68k-da30 - os= - ;; - decstation | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - os= - ;; - delta88) - basic_machine=m88k-motorola - os=sysv3 - ;; - dicos) - basic_machine=i686-pc - os=dicos - ;; - djgpp) - basic_machine=i586-pc - os=msdosdjgpp - ;; - ebmon29k) - basic_machine=a29k-amd - os=ebmon - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=ose - ;; - gmicro) - basic_machine=tron-gmicro - os=sysv - ;; - go32) - basic_machine=i386-pc - os=go32 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=hms - ;; - harris) - basic_machine=m88k-harris - os=sysv3 - ;; - hp300) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=hpux - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=proelf - ;; - i386mach) - basic_machine=i386-mach - os=mach - ;; - vsta) - basic_machine=i386-pc - os=vsta - ;; - isi68 | isi) - basic_machine=m68k-isi - os=sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=sysv - ;; - merlin) - basic_machine=ns32k-utek - os=sysv - ;; - mingw64) - basic_machine=x86_64-pc - os=mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=mingw32ce - ;; - monitor) - basic_machine=m68k-rom68k - os=coff - ;; - morphos) - basic_machine=powerpc-unknown - os=morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=moxiebox - ;; - msdos) - basic_machine=i386-pc - os=msdos - ;; - msys) - basic_machine=i686-pc - os=msys - ;; - mvs) - basic_machine=i370-ibm - os=mvs - ;; - nacl) - basic_machine=le32-unknown - os=nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=sysv4 - ;; - netbsd386) - basic_machine=i386-pc - os=netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=newsos - ;; - news1000) - basic_machine=m68030-sony - os=newsos - ;; - necv70) - basic_machine=v70-nec - os=sysv - ;; - nh3000) - basic_machine=m68k-harris - os=cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=cxux - ;; - nindy960) - basic_machine=i960-intel - os=nindy - ;; - mon960) - basic_machine=i960-intel - os=mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=nonstopux - ;; - os400) - basic_machine=powerpc-ibm - os=os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=ose - ;; - os68k) - basic_machine=m68k-none - os=os68k - ;; - paragon) - basic_machine=i860-intel - os=osf - ;; - parisc) - basic_machine=hppa-unknown - os=linux - ;; - pw32) - basic_machine=i586-unknown - os=pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=rdos - ;; - rdos32) - basic_machine=i386-pc - os=rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=coff - ;; - sa29200) - basic_machine=a29k-amd - os=udi - ;; - sei) - basic_machine=mips-sei - os=seiux - ;; - sequent) - basic_machine=i386-sequent - os= - ;; - sps7) - basic_machine=m68k-bull - os=sysv2 - ;; - st2000) - basic_machine=m68k-tandem - os= - ;; - stratus) - basic_machine=i860-stratus - os=sysv4 - ;; - sun2) - basic_machine=m68000-sun - os= - ;; - sun2os3) - basic_machine=m68000-sun - os=sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=sunos4 - ;; - sun3) - basic_machine=m68k-sun - os= - ;; - sun3os3) - basic_machine=m68k-sun - os=sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=sunos4 - ;; - sun4) - basic_machine=sparc-sun - os= - ;; - sun4os3) - basic_machine=sparc-sun - os=sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=solaris2 - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - os= - ;; - sv1) - basic_machine=sv1-cray - os=unicos - ;; - symmetry) - basic_machine=i386-sequent - os=dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=unicos - ;; - t90) - basic_machine=t90-cray - os=unicos - ;; - toad1) - basic_machine=pdp10-xkl - os=tops20 - ;; - tpf) - basic_machine=s390x-ibm - os=tpf - ;; - udi29k) - basic_machine=a29k-amd - os=udi - ;; - ultra3) - basic_machine=a29k-nyu - os=sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=none - ;; - vaxv) - basic_machine=vax-dec - os=sysv - ;; - vms) - basic_machine=vax-dec - os=vms - ;; - vxworks960) - basic_machine=i960-wrs - os=vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=vxworks - ;; - xbox) - basic_machine=i686-pc - os=mingw32 - ;; - ymp) - basic_machine=ymp-cray - os=unicos - ;; - *) - basic_machine=$1 - os= - ;; - esac + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint ;; esac -# Decode 1-component or ad-hoc basic machines +# Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in - # Here we handle the default manufacturer of certain CPU types. It is in - # some cases the only manufacturer, in others, it is the most popular. - w89k) - cpu=hppa1.1 - vendor=winbond + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown ;; - op50n) - cpu=hppa1.1 - vendor=oki + c54x) + basic_machine=tic54x-unknown ;; - op60c) - cpu=hppa1.1 - vendor=oki + c55x) + basic_machine=tic55x-unknown ;; - ibm*) - cpu=i370 - vendor=ibm - ;; - orion105) - cpu=clipper - vendor=highlevel - ;; - mac | mpw | mac-mpw) - cpu=m68k - vendor=apple - ;; - pmac | pmac-mpw) - cpu=powerpc - vendor=apple - ;; - - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - cpu=m68000 - vendor=att - ;; - 3b*) - cpu=we32k - vendor=att - ;; - bluegene*) - cpu=powerpc - vendor=ibm - os=cnk - ;; - decsystem10* | dec10*) - cpu=pdp10 - vendor=dec - os=tops10 - ;; - decsystem20* | dec20*) - cpu=pdp10 - vendor=dec - os=tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - cpu=m68k - vendor=motorola - ;; - dpx2*) - cpu=m68k - vendor=bull - os=sysv3 - ;; - encore | umax | mmax) - cpu=ns32k - vendor=encore - ;; - elxsi) - cpu=elxsi - vendor=elxsi - os=${os:-bsd} - ;; - fx2800) - cpu=i860 - vendor=alliant - ;; - genix) - cpu=ns32k - vendor=ns - ;; - h3050r* | hiux*) - cpu=hppa1.1 - vendor=hitachi - os=hiuxwe2 - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - cpu=m68000 - vendor=hp - ;; - hp9k3[2-9][0-9]) - cpu=m68k - vendor=hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv32 - ;; - i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv4 - ;; - i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv - ;; - i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=solaris2 - ;; - j90 | j90-cray) - cpu=j90 - vendor=cray - os=${os:-unicos} - ;; - iris | iris4d) - cpu=mips - vendor=sgi - case $os in - irix*) - ;; - *) - os=irix4 - ;; - esac - ;; - miniframe) - cpu=m68000 - vendor=convergent - ;; - *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) - cpu=m68k - vendor=atari - os=mint - ;; - news-3600 | risc-news) - cpu=mips - vendor=sony - os=newsos - ;; - next | m*-next) - cpu=m68k - vendor=next - case $os in - nextstep* ) - ;; - ns2*) - os=nextstep2 - ;; - *) - os=nextstep3 - ;; - esac - ;; - np1) - cpu=np1 - vendor=gould - ;; - op50n-* | op60c-*) - cpu=hppa1.1 - vendor=oki - os=proelf - ;; - pa-hitachi) - cpu=hppa1.1 - vendor=hitachi - os=hiuxwe2 - ;; - pbd) - cpu=sparc - vendor=tti - ;; - pbb) - cpu=m68k - vendor=tti - ;; - pc532) - cpu=ns32k - vendor=pc532 - ;; - pn) - cpu=pn - vendor=gould - ;; - power) - cpu=power - vendor=ibm - ;; - ps2) - cpu=i386 - vendor=ibm - ;; - rm[46]00) - cpu=mips - vendor=siemens - ;; - rtpc | rtpc-*) - cpu=romp - vendor=ibm - ;; - sde) - cpu=mipsisa32 - vendor=sde - os=${os:-elf} - ;; - simso-wrs) - cpu=sparclite - vendor=wrs - os=vxworks - ;; - tower | tower-32) - cpu=m68k - vendor=ncr - ;; - vpp*|vx|vx-*) - cpu=f301 - vendor=fujitsu - ;; - w65) - cpu=w65 - vendor=wdc - ;; - w89k-*) - cpu=hppa1.1 - vendor=winbond - os=proelf - ;; - none) - cpu=none - vendor=none + c6x) + basic_machine=tic6x-unknown ;; leon|leon[3-9]) - cpu=sparc - vendor=$basic_machine + basic_machine=sparc-$basic_machine ;; - leon-*|leon[3-9]-*) - cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + ms1) + basic_machine=mt-unknown ;; - *-*) - IFS="-" read -r cpu vendor <&2 + exit 1 ;; - # These rules are duplicated from below for sake of the special case above; - # i.e. things that normalized to x86 arches should also default to "pc" - pc98) - cpu=i386 - vendor=pc + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) ;; - x64 | amd64) - cpu=x86_64 - vendor=pc + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; - # Recognize the basic CPU types without company name. - *) - cpu=$basic_machine - vendor=unknown + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd ;; -esac - -unset -v basic_machine - -# Decode basic machines in the full and proper CPU-Company form. -case $cpu-$vendor in - # Here we handle the default manufacturer of certain CPU types in cannonical form. It is in - # some cases the only manufacturer, in others, it is the most popular. - craynv-unknown) - vendor=cray - os=${os:-unicosmp} + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att ;; - c90-unknown | c90-cray) - vendor=cray - os=${os:-unicos} + 3b*) + basic_machine=we32k-att ;; - fx80-unknown) - vendor=alliant + a29khif) + basic_machine=a29k-amd + os=-udi ;; - romp-unknown) - vendor=ibm + abacus) + basic_machine=abacus-unknown ;; - mmix-unknown) - vendor=knuth + adobe68k) + basic_machine=m68010-adobe + os=-scout ;; - microblaze-unknown | microblazeel-unknown) - vendor=xilinx + alliant | fx80) + basic_machine=fx80-alliant ;; - rs6000-unknown) - vendor=ibm + altos | altos3068) + basic_machine=m68k-altos ;; - vax-unknown) - vendor=dec + am29k) + basic_machine=a29k-none + os=-bsd ;; - pdp11-unknown) - vendor=dec + amd64) + basic_machine=x86_64-pc ;; - we32k-unknown) - vendor=att - ;; - cydra-unknown) - vendor=cydrome - ;; - i370-ibm*) - vendor=ibm - ;; - orion-unknown) - vendor=highlevel - ;; - xps-unknown | xps100-unknown) - cpu=xps100 - vendor=honeywell - ;; - - # Here we normalize CPU types with a missing or matching vendor - dpx20-unknown | dpx20-bull) - cpu=rs6000 - vendor=bull - os=${os:-bosx} - ;; - - # Here we normalize CPU types irrespective of the vendor amd64-*) - cpu=x86_64 + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux ;; blackfin-*) - cpu=bfin - os=linux + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk ;; c54x-*) - cpu=tic54x + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - cpu=tic55x + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - cpu=tic6x + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - e500v[12]-*) - cpu=powerpc + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown os=$os"spe" ;; - mips3*-*) - cpu=mips64 + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" ;; - ms1-*) - cpu=mt + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux ;; m68knommu-*) - cpu=m68k - os=linux + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux ;; - m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) - cpu=s12z + magnum | m3230) + basic_machine=mips-mips + os=-sysv ;; - openrisc-*) - cpu=or32 + merlin) + basic_machine=ns32k-utek + os=-sysv ;; - parisc-*) - cpu=hppa - os=linux + microblaze*) + basic_machine=microblaze-xilinx ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - cpu=i586 + mingw64) + basic_machine=x86_64-pc + os=-mingw64 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) - cpu=i686 + mingw32) + basic_machine=i686-pc + os=-mingw32 ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - cpu=i686 + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce ;; - pentium4-*) - cpu=i786 + miniframe) + basic_machine=m68000-convergent ;; - pc98-*) - cpu=i386 + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint ;; - ppc-* | ppcbe-*) - cpu=powerpc + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; - ppcle-* | powerpclittle-*) - cpu=powerpcle + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; - ppc64-*) - cpu=powerpc64 + monitor) + basic_machine=m68k-rom68k + os=-coff ;; - ppc64le-* | powerpc64little-*) - cpu=powerpc64le + morphos) + basic_machine=powerpc-unknown + os=-morphos ;; - sb1-*) - cpu=mipsisa64sb1 + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox ;; - sb1el-*) - cpu=mipsisa64sb1el + msdos) + basic_machine=i386-pc + os=-msdos ;; - sh5e[lb]-*) - cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; - spur-*) - cpu=spur + msys) + basic_machine=i686-pc + os=-msys ;; - strongarm-* | thumb-*) - cpu=arm + mvs) + basic_machine=i370-ibm + os=-mvs ;; - tx39-*) - cpu=mipstx39 + nacl) + basic_machine=le32-unknown + os=-nacl ;; - tx39el-*) - cpu=mipstx39el + ncr3000) + basic_machine=i486-ncr + os=-sysv4 ;; - x64-*) - cpu=x86_64 + netbsd386) + basic_machine=i386-unknown + os=-netbsd ;; - xscale-* | xscalee[bl]-*) - cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + netwinder) + basic_machine=armv4l-rebel + os=-linux ;; - - # Recognize the cannonical CPU Types that limit and/or modify the - # company names they are paired with. - cr16-*) - os=${os:-elf} + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos ;; - crisv32-* | etraxfs*-*) - cpu=crisv32 - vendor=axis + news1000) + basic_machine=m68030-sony + os=-newsos ;; - cris-* | etrax*-*) - cpu=cris - vendor=axis + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos ;; - crx-*) - os=${os:-elf} + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould ;; neo-tandem) - cpu=neo - vendor=tandem + basic_machine=neo-tandem ;; nse-tandem) - cpu=nse - vendor=tandem + basic_machine=nse-tandem ;; nsr-tandem) - cpu=nsr - vendor=tandem + basic_machine=nsr-tandem ;; nsv-tandem) - cpu=nsv - vendor=tandem + basic_machine=nsv-tandem ;; nsx-tandem) - cpu=nsx - vendor=tandem + basic_machine=nsx-tandem ;; - s390-*) - cpu=s390 - vendor=ibm + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf ;; - s390x-*) - cpu=s390x - vendor=ibm + openrisc | openrisc-*) + basic_machine=or32-unknown ;; - tile*-*) - os=${os:-linux-gnu} + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none ;; +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) - # Recognize the cannonical CPU types that are allowed with any - # company name. - case $cpu in - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | abacus \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ - | alphapca5[67] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[lb]e | arme[lb] | armv* \ - | avr | avr32 \ - | asmjs \ - | ba \ - | be32 | be64 \ - | bfin | bs2000 \ - | c[123]* | c30 | [cjt]90 | c4x \ - | c8051 | clipper | craynv | csky | cydra \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | elxsi | epiphany \ - | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ - | h8300 | h8500 \ - | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i*86 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle \ - | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ - | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ - | m88110 | m88k | maxq | mb | mcore | mep | metag \ - | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mmix \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nfp \ - | nios | nios2 | nios2eb | nios2el \ - | none | np1 | ns16k | ns32k \ - | open8 \ - | or1k* \ - | or32 \ - | orion \ - | pdp10 | pdp11 | pj | pjl | pn | power \ - | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ - | pru \ - | pyramid \ - | riscv | riscv32 | riscv64 \ - | rl78 | romp | rs6000 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ - | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ - | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ - | spu \ - | tahoe \ - | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ - | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ - | vax \ - | visium \ - | wasm32 \ - | we32k \ - | x86 | x86_64 | xc16x | xgate | xps100 \ - | xstormy16 | xtensa* \ - | ymp \ - | z8k | z80) - ;; - - *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 - exit 1 - ;; - esac + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. -case $vendor in - digital*) - vendor=dec +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; - commodore*) - vendor=cbm + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1270,245 +1334,199 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x$os != x ] +if [ x"$os" != x"" ] then case $os in # First match some system type aliases that might get confused # with valid system types. - # solaris* is a basic system type, with this one exception. - auroraux) - os=auroraux + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux ;; - bluegene*) - os=cnk - ;; - solaris1 | solaris1.*) + -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - solaris) - os=solaris2 + -solaris) + os=-solaris2 ;; - unixware*) - os=sysv4.2uw + -unixware*) + os=-sysv4.2uw ;; - gnu/linux*) + -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) - es1800*) - os=ose - ;; - # Some version numbers need modification - chorusos*) - os=chorusos - ;; - isc) - os=isc2.2 - ;; - sco6) - os=sco5v6 - ;; - sco5) - os=sco3.2v5 - ;; - sco4) - os=sco3.2v4 - ;; - sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - ;; - sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - scout) - # Don't match below - ;; - sco*) - os=sco3.2v2 - ;; - psos*) - os=psos + -es1800*) + os=-ose ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. - # sysv* is not here because it comes later, after sysvr4. - gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ - | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ - | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ - | sym* | kopensolaris* | plan9* \ - | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* \ - | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ - | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ - | knetbsd* | mirbsd* | netbsd* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* \ - | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ - | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ - | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ - | linux-newlib* | linux-musl* | linux-uclibc* \ - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ - | openstep* | oskit* | conix* | pw32* | nonstopux* \ - | storm-chaos* | tops10* | tenex* | tops20* | its* \ - | os2* | vos* | palmos* | uclinux* | nucleus* \ - | morphos* | superux* | rtmk* | windiss* \ - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd*) + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; - qnx*) - case $cpu in - x86 | i*86) + -qnx*) + case $basic_machine in + x86-* | i*86-*) ;; *) - os=nto-$os + os=-nto$os ;; esac ;; - hiux*) - os=hiuxwe2 + -nto-qnx*) ;; - nto-qnx*) - ;; - nto*) + -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - sim | xray | os68k* | v88r* \ - | windows* | osx | abug | netware* | os9* \ - | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; - linux-dietlibc) - os=linux-dietlibc - ;; - linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - lynx*178) - os=lynxos178 - ;; - lynx*5) - os=lynxos5 - ;; - lynx*) - os=lynxos - ;; - mac*) + -mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; - opened*) - os=openedition + -linux-dietlibc) + os=-linux-dietlibc ;; - os400*) - os=os400 + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; - sunos5*) + -sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - sunos6*) + -sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - wince*) - os=wince + -opened*) + os=-openedition ;; - utek*) - os=bsd + -os400*) + os=-os400 ;; - dynix*) - os=bsd + -wince*) + os=-wince ;; - acis*) - os=aos + -utek*) + os=-bsd ;; - atheos*) - os=atheos + -dynix*) + os=-bsd ;; - syllable*) - os=syllable + -acis*) + os=-aos ;; - 386bsd) - os=bsd + -atheos*) + os=-atheos ;; - ctix* | uts*) - os=sysv + -syllable*) + os=-syllable ;; - nova*) - os=rtmk-nova + -386bsd) + os=-bsd ;; - ns2) - os=nextstep2 + -ctix* | -uts*) + os=-sysv ;; - nsk*) - os=nsk + -nova*) + os=-rtmk-nova + ;; + -ns2) + os=-nextstep2 + ;; + -nsk*) + os=-nsk ;; # Preserve the version number of sinix5. - sinix5.*) + -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - sinix*) - os=sysv4 + -sinix*) + os=-sysv4 ;; - tpf*) - os=tpf + -tpf*) + os=-tpf ;; - triton*) - os=sysv3 + -triton*) + os=-sysv3 ;; - oss*) - os=sysv3 + -oss*) + os=-sysv3 ;; - svr4*) - os=sysv4 + -svr4*) + os=-sysv4 ;; - svr3) - os=sysv3 + -svr3) + os=-sysv3 ;; - sysvr4) - os=sysv4 + -sysvr4) + os=-sysv4 ;; - # This must come after sysvr4. - sysv*) + # This must come after -sysvr4. + -sysv*) ;; - ose*) - os=ose + -ose*) + os=-ose ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) - os=mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint ;; - zvmoe) - os=zvmoe + -zvmoe) + os=-zvmoe ;; - dicos*) - os=dicos + -dicos*) + os=-dicos ;; - pikeos*) + -pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $cpu in + case $basic_machine in arm*) - os=eabi + os=-eabi ;; *) - os=elf + os=-elf ;; esac ;; - nacl*) + -nacl*) ;; - ios) + -ios) ;; - none) - ;; - *-eabi) + -none) ;; *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; @@ -1525,265 +1543,258 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $cpu-$vendor in +case $basic_machine in score-*) - os=elf + os=-elf ;; spu-*) - os=elf + os=-elf ;; *-acorn) - os=riscix1.2 + os=-riscix1.2 ;; arm*-rebel) - os=linux + os=-linux ;; arm*-semi) - os=aout + os=-aout ;; c4x-* | tic4x-*) - os=coff + os=-coff ;; c8051-*) - os=elf - ;; - clipper-intergraph) - os=clix + os=-elf ;; hexagon-*) - os=elf + os=-elf ;; tic54x-*) - os=coff + os=-coff ;; tic55x-*) - os=coff + os=-coff ;; tic6x-*) - os=coff + os=-coff ;; # This must come before the *-dec entry. pdp10-*) - os=tops20 + os=-tops20 ;; pdp11-*) - os=none + os=-none ;; *-dec | vax-*) - os=ultrix4.2 + os=-ultrix4.2 ;; m68*-apollo) - os=domain + os=-domain ;; i386-sun) - os=sunos4.0.2 + os=-sunos4.0.2 ;; m68000-sun) - os=sunos3 + os=-sunos3 ;; m68*-cisco) - os=aout + os=-aout ;; mep-*) - os=elf + os=-elf ;; mips*-cisco) - os=elf + os=-elf ;; mips*-*) - os=elf + os=-elf ;; or32-*) - os=coff + os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=sysv3 + os=-sysv3 ;; sparc-* | *-sun) - os=sunos4.1.1 + os=-sunos4.1.1 ;; pru-*) - os=elf + os=-elf ;; *-be) - os=beos + os=-beos ;; *-ibm) - os=aix + os=-aix ;; *-knuth) - os=mmixware + os=-mmixware ;; *-wec) - os=proelf + os=-proelf ;; *-winbond) - os=proelf + os=-proelf ;; *-oki) - os=proelf + os=-proelf ;; *-hp) - os=hpux + os=-hpux ;; *-hitachi) - os=hiux + os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=sysv + os=-sysv ;; *-cbm) - os=amigaos + os=-amigaos ;; *-dg) - os=dgux + os=-dgux ;; *-dolphin) - os=sysv3 + os=-sysv3 ;; m68k-ccur) - os=rtu + os=-rtu ;; m88k-omron*) - os=luna + os=-luna ;; *-next) - os=nextstep + os=-nextstep ;; *-sequent) - os=ptx + os=-ptx ;; *-crds) - os=unos + os=-unos ;; *-ns) - os=genix + os=-genix ;; i370-*) - os=mvs + os=-mvs ;; *-gould) - os=sysv + os=-sysv ;; *-highlevel) - os=bsd + os=-bsd ;; *-encore) - os=bsd + os=-bsd ;; *-sgi) - os=irix + os=-irix ;; *-siemens) - os=sysv4 + os=-sysv4 ;; *-masscomp) - os=rtu + os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=uxpv + os=-uxpv ;; *-rom68k) - os=coff + os=-coff ;; *-*bug) - os=coff + os=-coff ;; *-apple) - os=macos + os=-macos ;; *-atari*) - os=mint - ;; - *-wrs) - os=vxworks + os=-mint ;; *) - os=none + os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -case $vendor in - unknown) +vendor=unknown +case $basic_machine in + *-unknown) case $os in - riscix*) + -riscix*) vendor=acorn ;; - sunos*) + -sunos*) vendor=sun ;; - cnk*|-aix*) + -cnk*|-aix*) vendor=ibm ;; - beos*) + -beos*) vendor=be ;; - hpux*) + -hpux*) vendor=hp ;; - mpeix*) + -mpeix*) vendor=hp ;; - hiux*) + -hiux*) vendor=hitachi ;; - unos*) + -unos*) vendor=crds ;; - dgux*) + -dgux*) vendor=dg ;; - luna*) + -luna*) vendor=omron ;; - genix*) + -genix*) vendor=ns ;; - clix*) - vendor=intergraph - ;; - mvs* | opened*) + -mvs* | -opened*) vendor=ibm ;; - os400*) + -os400*) vendor=ibm ;; - ptx*) + -ptx*) vendor=sequent ;; - tpf*) + -tpf*) vendor=ibm ;; - vxsim* | vxworks* | windiss*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; - aux*) + -aux*) vendor=apple ;; - hms*) + -hms*) vendor=hitachi ;; - mpw* | macos*) + -mpw* | -macos*) vendor=apple ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; - vos*) + -vos*) vendor=stratus ;; esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$cpu-$vendor-$os" +echo "$basic_machine$os" exit # 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: "'" diff --git a/hio/ac/depcomp b/hio/ac/depcomp index 6b39162..65cbf70 100755 --- a/hio/ac/depcomp +++ b/hio/ac/depcomp @@ -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 diff --git a/hio/ac/install-sh b/hio/ac/install-sh index 20d8b2e..8175c64 100755 --- a/hio/ac/install-sh +++ b/hio/ac/install-sh @@ -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. # diff --git a/hio/ac/ltmain.sh b/hio/ac/ltmain.sh index 7f3523d..0cb7f90 100644 --- a/hio/ac/ltmain.sh +++ b/hio/ac/ltmain.sh @@ -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 '_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 +# '_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 . -GNU libtool home page: . +GNU libtool home page: . General help using GNU software: ." 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) diff --git a/hio/ac/missing b/hio/ac/missing index 8d0eaad..625aeb1 100755 --- a/hio/ac/missing +++ b/hio/ac/missing @@ -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 , 1996. # This program is free software; you can redistribute it and/or modify diff --git a/hio/ac/test-driver b/hio/ac/test-driver index 89dba1e..b8521a4 100755 --- a/hio/ac/test-driver +++ b/hio/ac/test-driver @@ -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 diff --git a/hio/aclocal.m4 b/hio/aclocal.m4 index 4c455ae..261f6b0 100644 --- a/hio/aclocal.m4 +++ b/hio/aclocal.m4 @@ -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, diff --git a/hio/bin/Makefile.in b/hio/bin/Makefile.in index e1d4c68..343bf80 100644 --- a/hio/bin/Makefile.in +++ b/hio/bin/Makefile.in @@ -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, diff --git a/hio/configure b/hio/configure index e42fce4..6907168 100755 --- a/hio/configure +++ b/hio/configure @@ -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. diff --git a/hio/configure.ac b/hio/configure.ac index 6b6f346..672e261 100644 --- a/hio/configure.ac +++ b/hio/configure.ac @@ -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]) diff --git a/hio/lib/Makefile.am b/hio/lib/Makefile.am index 45ba405..33c5533 100644 --- a/hio/lib/Makefile.am +++ b/hio/lib/Makefile.am @@ -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 \ diff --git a/hio/lib/Makefile.in b/hio/lib/Makefile.in index 47b1650..0d187ac 100644 --- a/hio/lib/Makefile.in +++ b/hio/lib/Makefile.in @@ -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 diff --git a/hio/lib/fcgi-cli.c b/hio/lib/fcgi-cli.c new file mode 100644 index 0000000..826ae76 --- /dev/null +++ b/hio/lib/fcgi-cli.c @@ -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 +#include +#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); +} + diff --git a/hio/lib/hio-fcgi.h b/hio/lib/hio-fcgi.h new file mode 100644 index 0000000..bb9d1d9 --- /dev/null +++ b/hio/lib/hio-fcgi.h @@ -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 +#include +/* ---------------------------------------------------------------- */ + +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 diff --git a/hio/lib/http-cgi.c b/hio/lib/http-cgi.c index b15a2e0..31d9c3b 100644 --- a/hio/lib/http-cgi.c +++ b/hio/lib/http-cgi.c @@ -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) diff --git a/hio/lib/http-fcgi.c b/hio/lib/http-fcgi.c index f4318c9..5bf3699 100644 --- a/hio/lib/http-fcgi.c +++ b/hio/lib/http-fcgi.c @@ -1,25 +1,59 @@ +#include "http-prv.h" +#include +#include -#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; +} diff --git a/hio/lib/skad.c b/hio/lib/skad.c index 1b714b7..c7e376c 100644 --- a/hio/lib/skad.c +++ b/hio/lib/skad.c @@ -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; } diff --git a/hio/m4/libtool.m4 b/hio/m4/libtool.m4 index a644432..a6d21ae 100644 --- a/hio/m4/libtool.m4 +++ b/hio/m4/libtool.m4 @@ -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' diff --git a/hio/t/Makefile.in b/hio/t/Makefile.in index 924c472..31eda54 100644 --- a/hio/t/Makefile.in +++ b/hio/t/Makefile.in @@ -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,