From 25b71a48001c113f9169f22111c36057a8d0558e Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 14 Mar 2018 14:40:05 +0000 Subject: [PATCH] exported hcl_seterrbfmtv(), hcl_seterrufmtv() added hcl_server_seterrbfmt(), hcl_server_seterrufmt(), hcl_server_seterrbfmtv(), hcl_server_seterrufmtv() added socket address conversion functions --- Makefile.in | 16 +- ac/config.guess | 165 +++++---- ac/config.sub | 56 ++- ac/install-sh | 23 +- ac/ltmain.sh | 39 ++- aclocal.m4 | 1 + configure | 888 ++++++++++++++++++++++++++++++++++++++++++++++- configure.ac | 133 +++++++ lib/Makefile.am | 5 + lib/Makefile.in | 56 +-- lib/hcl-cfg.h.in | 57 +++ lib/hcl-prv.h | 20 -- lib/hcl-s.c | 241 +++++++++---- lib/hcl-s.h | 30 +- lib/hcl.h | 14 + lib/logfmt.c | 4 +- lib/main2.c | 4 +- lib/sa-utl.h | 362 +++++++++++++++++++ lib/utl.c | 4 +- m4/libtool.m4 | 33 +- mod/Makefile.in | 4 +- 21 files changed, 1891 insertions(+), 264 deletions(-) create mode 100644 lib/sa-utl.h diff --git a/Makefile.in b/Makefile.in index 31c9b81..ea0c943 100644 --- a/Makefile.in +++ b/Makefile.in @@ -91,7 +91,8 @@ host_triplet = @host@ @ENABLE_STATIC_MODULE_FALSE@am__append_2 = lib mod subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_namespace.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \ + $(top_srcdir)/m4/ax_cxx_namespace.m4 \ $(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ @@ -165,8 +166,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/ar-lib \ $(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \ $(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \ $(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing ac/ar-lib \ - ac/compile ac/config.guess ac/config.sub ac/install-sh \ - ac/ltmain.sh ac/missing + ac/compile ac/config.guess ac/config.sub ac/depcomp \ + ac/install-sh ac/ltmain.sh ac/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -352,6 +353,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -582,7 +584,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -608,7 +610,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -626,7 +628,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -636,7 +638,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff --git a/ac/config.guess b/ac/config.guess index dbfb978..2e9ad7f 100755 --- a/ac/config.guess +++ b/ac/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2016-10-02' # 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 @@ -27,7 +27,7 @@ timestamp='2015-01-01' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -168,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -197,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -207,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -223,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -235,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -251,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -359,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + 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 [ "$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) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -393,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -618,13 +642,13 @@ EOF sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -663,11 +687,11 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -680,12 +704,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -790,14 +814,14 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -879,7 +903,7 @@ EOF exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix @@ -902,7 +926,7 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) @@ -933,6 +957,9 @@ EOF crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -945,6 +972,9 @@ EOF ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -970,6 +1000,9 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; @@ -1002,6 +1035,9 @@ EOF ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; @@ -1021,7 +1057,7 @@ EOF echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} @@ -1100,7 +1136,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1249,6 +1285,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1262,9 +1301,9 @@ EOF UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in @@ -1286,7 +1325,7 @@ EOF exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1317,7 +1356,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1359,7 +1398,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1370,23 +1409,25 @@ EOF x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp diff --git a/ac/config.sub b/ac/config.sub index 6467c95..dd2ca93 100755 --- a/ac/config.sub +++ b/ac/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2016-11-04' # 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 @@ -33,7 +33,7 @@ timestamp='2015-01-01' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,8 +53,7 @@ timestamp='2015-01-01' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -68,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -117,8 +116,8 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 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* | \ - kopensolaris*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -255,11 +254,12 @@ case $basic_machine in | 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 \ - | epiphany \ + | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ @@ -301,11 +301,12 @@ case $basic_machine in | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | 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[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | 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 \ @@ -376,12 +377,13 @@ case $basic_machine in | 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-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ @@ -427,13 +429,15 @@ case $basic_machine in | 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?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -518,6 +522,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -638,6 +645,14 @@ case $basic_machine in basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -1017,7 +1032,7 @@ case $basic_machine in ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -1025,9 +1040,9 @@ case $basic_machine in ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -1373,18 +1388,18 @@ case $os in | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -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* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ @@ -1393,7 +1408,8 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1525,6 +1541,8 @@ case $os in ;; -nacl*) ;; + -ios) + ;; -none) ;; *) diff --git a/ac/install-sh b/ac/install-sh index 0b0fdcb..59990a1 100755 --- a/ac/install-sh +++ b/ac/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2013-12-25.23; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -324,34 +324,41 @@ do # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi - rmdir "$tmpdir/d" "$tmpdir" + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; diff --git a/ac/ltmain.sh b/ac/ltmain.sh index 0f0a2da..a736cf9 100644 --- a/ac/ltmain.sh +++ b/ac/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.6 +VERSION="2.4.6 Debian-2.4.6-2" package_revision=2.4.6 @@ -2068,12 +2068,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-2 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 } @@ -7272,10 +7272,13 @@ func_mode_link () # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -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 -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=*) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*|-fsanitize=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" @@ -7568,7 +7571,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 @@ -7887,19 +7893,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 @@ -8823,6 +8829,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/aclocal.m4 b/aclocal.m4 index dae08a0..2d89abd 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1210,6 +1210,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_check_sign.m4]) m4_include([m4/ax_cxx_namespace.m4]) m4_include([m4/ax_numval.m4]) m4_include([m4/ax_pthread.m4]) diff --git a/configure b/configure index 84fb241..1e041e0 100755 --- a/configure +++ b/configure @@ -651,6 +651,8 @@ HCL_SIZEOF_LONG_LONG HCL_SIZEOF_CHAR32_T HCL_SIZEOF_CHAR16_T HCL_SIZEOF_WCHAR_T +ENABLE_HCLS_FALSE +ENABLE_HCLS_TRUE ENABLE_LIBLTDL_FALSE ENABLE_LIBLTDL_TRUE ENABLE_STATIC_MODULE_FALSE @@ -777,6 +779,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -815,6 +818,7 @@ enable_cxx enable_dynamic_module enable_static_module enable_libltdl +enable_hcls ' ac_precious_vars='build_alias host_alias @@ -868,6 +872,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1120,6 +1125,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1257,7 +1271,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1410,6 +1424,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1469,6 +1484,7 @@ Optional Features: --enable-static-module build modules statically into the main library(default. no) --enable-libltdl use libltdl(default. no) + --enable-hcls build libhcls and hcls(default. no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -7038,7 +7054,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 @@ -10740,6 +10756,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 @@ -10994,7 +11013,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= @@ -11664,6 +11683,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' @@ -11685,7 +11705,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 @@ -12780,9 +12800,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 @@ -12791,7 +12808,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 @@ -12803,6 +12820,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 @@ -15697,7 +15726,7 @@ lt_prog_compiler_static_CXX= ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -16072,6 +16101,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs_CXX=no + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -16745,9 +16777,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 @@ -16756,7 +16785,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 @@ -16768,6 +16797,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 @@ -19531,6 +19572,759 @@ _ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking numeric value of PATH_MAX" >&5 +$as_echo_n "checking numeric value of PATH_MAX... " >&6; } +if ${ax_cv_numvalof_PATH_MAX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(PATH_MAX)" "ax_cv_numvalof_PATH_MAX" "#include +"; then : + +else + ax_cv_numvalof_PATH_MAX=0 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_numvalof_PATH_MAX" >&5 +$as_echo "$ax_cv_numvalof_PATH_MAX" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define NUMVALOF_PATH_MAX $ax_cv_numvalof_PATH_MAX +_ACEOF + + + + +if test "x${platform_win32}" = "xyes" +then + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_in" >&5 +$as_echo_n "checking size of struct sockaddr_in... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_in+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_in))" "ac_cv_sizeof_struct_sockaddr_in" " + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_in" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_in) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_in=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_in" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_in" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_IN $ac_cv_sizeof_struct_sockaddr_in +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_in6" >&5 +$as_echo_n "checking size of struct sockaddr_in6... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_in6+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_in6))" "ac_cv_sizeof_struct_sockaddr_in6" " + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_in6" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_in6) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_in6=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_in6" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_in6" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_IN6 $ac_cv_sizeof_struct_sockaddr_in6 +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_un" >&5 +$as_echo_n "checking size of struct sockaddr_un... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_un+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_un))" "ac_cv_sizeof_struct_sockaddr_un" " + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_un" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_un) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_un=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_un" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_un" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_UN $ac_cv_sizeof_struct_sockaddr_un +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_ll" >&5 +$as_echo_n "checking size of struct sockaddr_ll... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_ll+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_ll))" "ac_cv_sizeof_struct_sockaddr_ll" " + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_ll" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_ll) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_ll=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_ll" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_ll" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_LL $ac_cv_sizeof_struct_sockaddr_ll +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_dl" >&5 +$as_echo_n "checking size of struct sockaddr_dl... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_dl+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_dl))" "ac_cv_sizeof_struct_sockaddr_dl" " + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_dl" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_dl) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_dl=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_dl" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_dl" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_DL $ac_cv_sizeof_struct_sockaddr_dl +_ACEOF + + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of socklen_t" >&5 +$as_echo_n "checking size of socklen_t... " >&6; } +if ${ac_cv_sizeof_socklen_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (socklen_t))" "ac_cv_sizeof_socklen_t" " + #include + #include +"; then : + +else + if test "$ac_cv_type_socklen_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (socklen_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_socklen_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_socklen_t" >&5 +$as_echo "$ac_cv_sizeof_socklen_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SOCKLEN_T $ac_cv_sizeof_socklen_t +_ACEOF + + + if test ${ac_cv_sizeof_socklen_t} -gt 0 + then + + typename=`echo socklen_t | sed "s/[^a-zA-Z0-9_]/_/g"` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether socklen_t is signed" >&5 +$as_echo_n "checking whether socklen_t is signed... " >&6; } +if eval \${ax_cv_decl_${typename}_signed+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ + int foo [ 1 - 2 * !(((socklen_t) -1) < 0) ] + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "ax_cv_decl_${typename}_signed=\"yes\"" +else + eval "ax_cv_decl_${typename}_signed=\"no\"" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$ax_cv_decl_${typename}_signed + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + symbolname=`echo socklen_t | sed "s/[^a-zA-Z0-9_]/_/g" | tr "a-z" "A-Z"` + if eval "test \"\${ax_cv_decl_${typename}_signed}\" = \"yes\""; then + +$as_echo "#define HCL_SOCKLEN_T_IS_SIGNED 1" >>confdefs.h + + elif eval "test \"\${ax_cv_decl_${typename}_signed}\" = \"no\""; then + $as_echo_n "" + fi + + fi + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of sa_family_t" >&5 +$as_echo_n "checking size of sa_family_t... " >&6; } +if ${ac_cv_sizeof_sa_family_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (sa_family_t))" "ac_cv_sizeof_sa_family_t" " + #include + #include +"; then : + +else + if test "$ac_cv_type_sa_family_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (sa_family_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_sa_family_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_sa_family_t" >&5 +$as_echo "$ac_cv_sizeof_sa_family_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SA_FAMILY_T $ac_cv_sizeof_sa_family_t +_ACEOF + + + if test ${ac_cv_sizeof_sa_family_t} -gt 0 + then + + typename=`echo sa_family_t | sed "s/[^a-zA-Z0-9_]/_/g"` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sa_family_t is signed" >&5 +$as_echo_n "checking whether sa_family_t is signed... " >&6; } +if eval \${ax_cv_decl_${typename}_signed+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ + int foo [ 1 - 2 * !(((sa_family_t) -1) < 0) ] + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "ax_cv_decl_${typename}_signed=\"yes\"" +else + eval "ax_cv_decl_${typename}_signed=\"no\"" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$ax_cv_decl_${typename}_signed + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + symbolname=`echo sa_family_t | sed "s/[^a-zA-Z0-9_]/_/g" | tr "a-z" "A-Z"` + if eval "test \"\${ax_cv_decl_${typename}_signed}\" = \"yes\""; then + +$as_echo "#define HCL_SA_FAMILY_T_IS_SIGNED 1" >>confdefs.h + + elif eval "test \"\${ax_cv_decl_${typename}_signed}\" = \"no\""; then + $as_echo_n "" + fi + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking offset of sa_family in struct sockaddr" >&5 +$as_echo_n "checking offset of sa_family in struct sockaddr... " >&6; } + if ac_fn_c_compute_int "$LINENO" "offsetof(struct sockaddr, sa_family)" "ac_cv_offsetof_sa_family" "#include + #include + #include "; then : + +else + ac_cv_offsteof_sa_family=0 +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_offsetof_sa_family" >&5 +$as_echo "$ac_cv_offsetof_sa_family" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HCL_OFFSETOF_SA_FAMILY ${ac_cv_offsetof_sa_family} +_ACEOF + + +else + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_in" >&5 +$as_echo_n "checking size of struct sockaddr_in... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_in+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_in))" "ac_cv_sizeof_struct_sockaddr_in" " + #include + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_in" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_in) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_in=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_in" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_in" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_IN $ac_cv_sizeof_struct_sockaddr_in +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_in6" >&5 +$as_echo_n "checking size of struct sockaddr_in6... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_in6+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_in6))" "ac_cv_sizeof_struct_sockaddr_in6" " + #include + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_in6" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_in6) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_in6=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_in6" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_in6" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_IN6 $ac_cv_sizeof_struct_sockaddr_in6 +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_un" >&5 +$as_echo_n "checking size of struct sockaddr_un... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_un+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_un))" "ac_cv_sizeof_struct_sockaddr_un" " + #include + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_un" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_un) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_un=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_un" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_un" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_UN $ac_cv_sizeof_struct_sockaddr_un +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_ll" >&5 +$as_echo_n "checking size of struct sockaddr_ll... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_ll+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_ll))" "ac_cv_sizeof_struct_sockaddr_ll" " + #include + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_ll" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_ll) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_ll=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_ll" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_ll" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_LL $ac_cv_sizeof_struct_sockaddr_ll +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct sockaddr_dl" >&5 +$as_echo_n "checking size of struct sockaddr_dl... " >&6; } +if ${ac_cv_sizeof_struct_sockaddr_dl+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct sockaddr_dl))" "ac_cv_sizeof_struct_sockaddr_dl" " + #include + #include + #include +"; then : + +else + if test "$ac_cv_type_struct_sockaddr_dl" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct sockaddr_dl) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_sockaddr_dl=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_sockaddr_dl" >&5 +$as_echo "$ac_cv_sizeof_struct_sockaddr_dl" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_SOCKADDR_DL $ac_cv_sizeof_struct_sockaddr_dl +_ACEOF + + + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of socklen_t" >&5 +$as_echo_n "checking size of socklen_t... " >&6; } +if ${ac_cv_sizeof_socklen_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (socklen_t))" "ac_cv_sizeof_socklen_t" " + #include + #include +"; then : + +else + if test "$ac_cv_type_socklen_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (socklen_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_socklen_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_socklen_t" >&5 +$as_echo "$ac_cv_sizeof_socklen_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SOCKLEN_T $ac_cv_sizeof_socklen_t +_ACEOF + + + if test ${ac_cv_sizeof_socklen_t} -gt 0 + then + + typename=`echo socklen_t | sed "s/[^a-zA-Z0-9_]/_/g"` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether socklen_t is signed" >&5 +$as_echo_n "checking whether socklen_t is signed... " >&6; } +if eval \${ax_cv_decl_${typename}_signed+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ + int foo [ 1 - 2 * !(((socklen_t) -1) < 0) ] + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "ax_cv_decl_${typename}_signed=\"yes\"" +else + eval "ax_cv_decl_${typename}_signed=\"no\"" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$ax_cv_decl_${typename}_signed + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + symbolname=`echo socklen_t | sed "s/[^a-zA-Z0-9_]/_/g" | tr "a-z" "A-Z"` + if eval "test \"\${ax_cv_decl_${typename}_signed}\" = \"yes\""; then + +$as_echo "#define HCL_SOCKLEN_T_IS_SIGNED 1" >>confdefs.h + + elif eval "test \"\${ax_cv_decl_${typename}_signed}\" = \"no\""; then + $as_echo_n "" + fi + + fi + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of sa_family_t" >&5 +$as_echo_n "checking size of sa_family_t... " >&6; } +if ${ac_cv_sizeof_sa_family_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (sa_family_t))" "ac_cv_sizeof_sa_family_t" " + #include + #include + #include +"; then : + +else + if test "$ac_cv_type_sa_family_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (sa_family_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_sa_family_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_sa_family_t" >&5 +$as_echo "$ac_cv_sizeof_sa_family_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SA_FAMILY_T $ac_cv_sizeof_sa_family_t +_ACEOF + + + if test ${ac_cv_sizeof_sa_family_t} -gt 0 + then + + typename=`echo sa_family_t | sed "s/[^a-zA-Z0-9_]/_/g"` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sa_family_t is signed" >&5 +$as_echo_n "checking whether sa_family_t is signed... " >&6; } +if eval \${ax_cv_decl_${typename}_signed+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include +int +main () +{ + int foo [ 1 - 2 * !(((sa_family_t) -1) < 0) ] + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "ax_cv_decl_${typename}_signed=\"yes\"" +else + eval "ax_cv_decl_${typename}_signed=\"no\"" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$ax_cv_decl_${typename}_signed + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + symbolname=`echo sa_family_t | sed "s/[^a-zA-Z0-9_]/_/g" | tr "a-z" "A-Z"` + if eval "test \"\${ax_cv_decl_${typename}_signed}\" = \"yes\""; then + +$as_echo "#define HCL_SA_FAMILY_T_IS_SIGNED 1" >>confdefs.h + + elif eval "test \"\${ax_cv_decl_${typename}_signed}\" = \"no\""; then + $as_echo_n "" + fi + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking offset of sa_family in struct sockaddr" >&5 +$as_echo_n "checking offset of sa_family in struct sockaddr... " >&6; } + if ac_fn_c_compute_int "$LINENO" "offsetof(struct sockaddr, sa_family)" "ac_cv_offsetof_sa_family" "#include + #include + #include "; then : + +else + ac_cv_offsteof_sa_family=0 +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_offsetof_sa_family" >&5 +$as_echo "$ac_cv_offsetof_sa_family" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HCL_OFFSETOF_SA_FAMILY ${ac_cv_offsetof_sa_family} +_ACEOF + +fi + if test ${ac_cv_sizeof___int128_t} -gt 0 then { $as_echo "$as_me:${as_lineno-$LINENO}: checking __int128_t with %" >&5 @@ -19838,6 +20632,52 @@ cat >>confdefs.h <<_ACEOF #define HCL_MBLEN_MAX ${ax_cv_numvalof_MB_LEN_MAX} _ACEOF +if test ${ax_cv_numvalof_PATH_MAX} -gt 0 +then + +cat >>confdefs.h <<_ACEOF +#define HCL_PATH_MAX ${ax_cv_numvalof_PATH_MAX} +_ACEOF + +fi + + +cat >>confdefs.h <<_ACEOF +#define HCL_SIZEOF_STRUCT_SOCKADDR_IN ${ac_cv_sizeof_struct_sockaddr_in} +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HCL_SIZEOF_STRUCT_SOCKADDR_IN6 ${ac_cv_sizeof_struct_sockaddr_in6} +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HCL_SIZEOF_STRUCT_SOCKADDR_LL ${ac_cv_sizeof_struct_sockaddr_ll} +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HCL_SIZEOF_STRUCT_SOCKADDR_UN ${ac_cv_sizeof_struct_sockaddr_un} +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HCL_SIZEOF_STRUCT_SOCKADDR_DL ${ac_cv_sizeof_struct_sockaddr_dl} +_ACEOF + + + + +cat >>confdefs.h <<_ACEOF +#define HCL_SIZEOF_SOCKLEN_T ${ac_cv_sizeof_socklen_t} +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HCL_SIZEOF_SA_FAMILY_T ${ac_cv_sizeof_sa_family_t} +_ACEOF + hcl_package_version_major="`echo ${PACKAGE_VERSION} | cut -d. -f1`" hcl_package_version_minor="`echo ${PACKAGE_VERSION} | cut -d. -f2`" @@ -20289,6 +21129,23 @@ else fi +# Check whether --enable-hcls was given. +if test "${enable_hcls+set}" = set; then : + enableval=$enable_hcls; enable_hcls_is=$enableval +else + enable_hcls_is=no + +fi + + if test "${enable_hcls_is}" = "yes"; then + ENABLE_HCLS_TRUE= + ENABLE_HCLS_FALSE='#' +else + ENABLE_HCLS_TRUE='#' + ENABLE_HCLS_FALSE= +fi + + HCL_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t HCL_SIZEOF_CHAR16_T=$ac_cv_sizeof_char16_t @@ -20487,6 +21344,10 @@ if test -z "${ENABLE_LIBLTDL_TRUE}" && test -z "${ENABLE_LIBLTDL_FALSE}"; then as_fn_error $? "conditional \"ENABLE_LIBLTDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_HCLS_TRUE}" && test -z "${ENABLE_HCLS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_HCLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -22170,7 +23031,6 @@ $as_echo X"$file" | 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/configure.ac b/configure.ac index c7aee5d..016e89c 100644 --- a/configure.ac +++ b/configure.ac @@ -257,6 +257,117 @@ AC_CHECK_SIZEOF(off64_t) AC_CHECK_SIZEOF(mbstate_t,,[#include ]) AX_CHECK_NUMVALOF(MB_LEN_MAX,[32],[#include ]) +AX_CHECK_NUMVALOF(PATH_MAX,[0],[#include ]) + +if test "x${platform_win32}" = "xyes" +then + AC_CHECK_SIZEOF(struct sockaddr_in,,[ + #include + #include ]) + AC_CHECK_SIZEOF(struct sockaddr_in6,,[ + #include + #include ]) + AC_CHECK_SIZEOF(struct sockaddr_un,,[ + #include + #include ]) + AC_CHECK_SIZEOF(struct sockaddr_ll,,[ + #include + #include ]) + AC_CHECK_SIZEOF(struct sockaddr_dl,,[ + #include + #include ]) + + AC_CHECK_SIZEOF(socklen_t,, [ + #include + #include ]) + if test ${ac_cv_sizeof_socklen_t} -gt 0 + then + AX_CHECK_SIGN([socklen_t], + [ AC_DEFINE(HCL_SOCKLEN_T_IS_SIGNED, 1, [Define if socklen_t is signed]) ], + [ AS_ECHO_N("") ], + [#include + #include ]) + fi + + AC_CHECK_SIZEOF(sa_family_t,, [ + #include + #include ]) + if test ${ac_cv_sizeof_sa_family_t} -gt 0 + then + AX_CHECK_SIGN([sa_family_t], + [ AC_DEFINE(HCL_SA_FAMILY_T_IS_SIGNED, 1, [Define if sa_family_t is signed]) ], + [ AS_ECHO_N("") ], + [#include + #include ]) + fi + + AC_MSG_CHECKING([offset of sa_family in struct sockaddr]) + AC_COMPUTE_INT([ac_cv_offsetof_sa_family], + [[offsetof(struct sockaddr, sa_family)]], + [#include + #include + #include ], [ac_cv_offsteof_sa_family=0]) + AC_MSG_RESULT([$ac_cv_offsetof_sa_family]) + AC_DEFINE_UNQUOTED(HCL_OFFSETOF_SA_FAMILY, ${ac_cv_offsetof_sa_family}, [offsetof(struct sockaddr, sa_family)]) + +else + AC_CHECK_SIZEOF(struct sockaddr_in,,[ + #include + #include + #include ]) + AC_CHECK_SIZEOF(struct sockaddr_in6,,[ + #include + #include + #include ]) + AC_CHECK_SIZEOF(struct sockaddr_un,,[ + #include + #include + #include ]) + AC_CHECK_SIZEOF(struct sockaddr_ll,,[ + #include + #include + #include ]) + AC_CHECK_SIZEOF(struct sockaddr_dl,,[ + #include + #include + #include ]) + + + AC_CHECK_SIZEOF(socklen_t,, [ + #include + #include ]) + if test ${ac_cv_sizeof_socklen_t} -gt 0 + then + AX_CHECK_SIGN([socklen_t], + [ AC_DEFINE(HCL_SOCKLEN_T_IS_SIGNED, 1, [Define if socklen_t is signed]) ], + [ AS_ECHO_N("") ], + [#include + #include ]) + fi + + AC_CHECK_SIZEOF(sa_family_t,, [ + #include + #include + #include ]) + if test ${ac_cv_sizeof_sa_family_t} -gt 0 + then + AX_CHECK_SIGN([sa_family_t], + [ AC_DEFINE(HCL_SA_FAMILY_T_IS_SIGNED, 1, [Define if sa_family_t is signed]) ], + [ AS_ECHO_N("") ], + [#include + #include + #include ]) + fi + + AC_MSG_CHECKING([offset of sa_family in struct sockaddr]) + AC_COMPUTE_INT([ac_cv_offsetof_sa_family], + [[offsetof(struct sockaddr, sa_family)]], + [#include + #include + #include ], [ac_cv_offsteof_sa_family=0]) + AC_MSG_RESULT([$ac_cv_offsetof_sa_family]) + AC_DEFINE_UNQUOTED(HCL_OFFSETOF_SA_FAMILY, ${ac_cv_offsetof_sa_family}, [offsetof(struct sockaddr, sa_family)]) +fi dnl gcc 3.4.3 on opensolaris x86 gave this warning without -msse or dnl something similar. @@ -384,6 +495,20 @@ AC_DEFINE_UNQUOTED(HCL_SIZEOF_OFF64_T, ${ac_cv_sizeof_off64_t}, [sizeof(off64_t) AC_DEFINE_UNQUOTED(HCL_SIZEOF_MBSTATE_T, ${ac_cv_sizeof_mbstate_t}, [sizeof(mbstate_t)]) AC_DEFINE_UNQUOTED(HCL_MBLEN_MAX, ${ax_cv_numvalof_MB_LEN_MAX}, [MB_LEN_MAX]) +if test ${ax_cv_numvalof_PATH_MAX} -gt 0 +then + AC_DEFINE_UNQUOTED(HCL_PATH_MAX, ${ax_cv_numvalof_PATH_MAX}, [PATH_MAX]) +fi + +AC_DEFINE_UNQUOTED(HCL_SIZEOF_STRUCT_SOCKADDR_IN, ${ac_cv_sizeof_struct_sockaddr_in}, [sizeof(struct sockaddr_in)]) +AC_DEFINE_UNQUOTED(HCL_SIZEOF_STRUCT_SOCKADDR_IN6, ${ac_cv_sizeof_struct_sockaddr_in6}, [sizeof(struct sockaddr_in6)]) +AC_DEFINE_UNQUOTED(HCL_SIZEOF_STRUCT_SOCKADDR_LL, ${ac_cv_sizeof_struct_sockaddr_ll}, [sizeof(struct sockaddr_ll)]) +AC_DEFINE_UNQUOTED(HCL_SIZEOF_STRUCT_SOCKADDR_UN, ${ac_cv_sizeof_struct_sockaddr_un}, [sizeof(struct sockaddr_un)]) +AC_DEFINE_UNQUOTED(HCL_SIZEOF_STRUCT_SOCKADDR_DL, ${ac_cv_sizeof_struct_sockaddr_dl}, [sizeof(struct sockaddr_dl)]) + + +AC_DEFINE_UNQUOTED(HCL_SIZEOF_SOCKLEN_T, ${ac_cv_sizeof_socklen_t}, [sizeof(socklen_t)]) +AC_DEFINE_UNQUOTED(HCL_SIZEOF_SA_FAMILY_T, ${ac_cv_sizeof_sa_family_t}, [sizeof(sa_family_t)]) hcl_package_version_major="`echo ${PACKAGE_VERSION} | cut -d. -f1`" hcl_package_version_minor="`echo ${PACKAGE_VERSION} | cut -d. -f2`" @@ -510,6 +635,14 @@ then fi AM_CONDITIONAL(ENABLE_LIBLTDL, test "${enable_libltdl_is}" = "yes") +dnl ===== enable-hcls ===== +AC_ARG_ENABLE([hcls], + [AS_HELP_STRING([--enable-hcls],[build libhcls and hcls(default. no)])], + enable_hcls_is=$enableval, + enable_hcls_is=no +) +AM_CONDITIONAL(ENABLE_HCLS, test "${enable_hcls_is}" = "yes") + AC_SUBST(HCL_SIZEOF_WCHAR_T, $ac_cv_sizeof_wchar_t) AC_SUBST(HCL_SIZEOF_CHAR16_T, $ac_cv_sizeof_char16_t) AC_SUBST(HCL_SIZEOF_CHAR32_T, $ac_cv_sizeof_char32_t) diff --git a/lib/Makefile.am b/lib/Makefile.am index d6e32b3..7c15928 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -43,6 +43,7 @@ pkglib_LTLIBRARIES = libhcl.la libhcl_la_SOURCES = \ hcl-prv.h \ logfmtv.h \ + sa-utl.h \ bigint.c \ comp.c \ debug.c \ @@ -69,12 +70,14 @@ libhcl_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) libhcl_la_LIBADD = $(LIBADD_LIB_COMMON) libhcl_la_DEPENDENCIES = +if ENABLE_HCLS pkglib_LTLIBRARIES += libhcls.la libhcls_la_SOURCES = hcl-s.c hcl-s.h libhcls_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) libhcls_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) libhcls_la_LIBADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) libhcls_la_DEPENDENCIES = +endif if ENABLE_STATIC_MODULE libhcl_la_LIBADD += -lhcl-arr @@ -94,6 +97,7 @@ if ENABLE_STATIC_MODULE hcl_DEPENDENCIES = libhcl.la endif +if ENABLE_HCLS bin_PROGRAMS += hcls hcls_SOURCES = main2.c hcls_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) @@ -102,6 +106,7 @@ hcls_LDADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) -lhcl -lhcls #-ldyncall_s if ENABLE_STATIC_MODULE hcls_DEPENDENCIES = libhcl.la libhcls.la endif +endif install-data-hook: @echo "#ifndef _HCL_CFG_H_" > "$(DESTDIR)$(pkgincludedir)/hcl-cfg.h" diff --git a/lib/Makefile.in b/lib/Makefile.in index cfd9f27..caa866e 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -90,18 +90,21 @@ build_triplet = @build@ host_triplet = @host@ @ENABLE_LIBLTDL_TRUE@am__append_1 = $(LTDL_LIBS) @ENABLE_LIBLTDL_FALSE@am__append_2 = $(DL_LIBS) -@ENABLE_STATIC_MODULE_TRUE@am__append_3 = -lhcl-arr -lhcl-dic \ +@ENABLE_HCLS_TRUE@am__append_3 = libhcls.la +@ENABLE_STATIC_MODULE_TRUE@am__append_4 = -lhcl-arr -lhcl-dic \ @ENABLE_STATIC_MODULE_TRUE@ -lhcl-str -@ENABLE_STATIC_MODULE_TRUE@am__append_4 = $(abs_builddir)/../mod/libhcl-arr.la \ +@ENABLE_STATIC_MODULE_TRUE@am__append_5 = $(abs_builddir)/../mod/libhcl-arr.la \ @ENABLE_STATIC_MODULE_TRUE@ $(abs_builddir)/../mod/libhcl-dic.la \ @ENABLE_STATIC_MODULE_TRUE@ $(abs_builddir)/../mod/libhcl-str.la -bin_PROGRAMS = hcl$(EXEEXT) hcls$(EXEEXT) +bin_PROGRAMS = hcl$(EXEEXT) $(am__EXEEXT_1) @ENABLE_STATIC_MODULE_FALSE@hcl_DEPENDENCIES = $(am__DEPENDENCIES_4) -@ENABLE_STATIC_MODULE_FALSE@hcls_DEPENDENCIES = $(am__DEPENDENCIES_4) \ -@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) +@ENABLE_HCLS_TRUE@am__append_6 = hcls +@ENABLE_HCLS_TRUE@@ENABLE_STATIC_MODULE_FALSE@hcls_DEPENDENCIES = $(am__DEPENDENCIES_4) \ +@ENABLE_HCLS_TRUE@@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_namespace.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \ + $(top_srcdir)/m4/ax_cxx_namespace.m4 \ $(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ @@ -164,18 +167,22 @@ am__v_lt_1 = libhcl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libhcl_la_LDFLAGS) $(LDFLAGS) -o $@ -am_libhcls_la_OBJECTS = libhcls_la-hcl-s.lo +am__libhcls_la_SOURCES_DIST = hcl-s.c hcl-s.h +@ENABLE_HCLS_TRUE@am_libhcls_la_OBJECTS = libhcls_la-hcl-s.lo libhcls_la_OBJECTS = $(am_libhcls_la_OBJECTS) libhcls_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libhcls_la_LDFLAGS) $(LDFLAGS) -o $@ +@ENABLE_HCLS_TRUE@am_libhcls_la_rpath = -rpath $(pkglibdir) +@ENABLE_HCLS_TRUE@am__EXEEXT_1 = hcls$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_hcl_OBJECTS = hcl-main.$(OBJEXT) hcl_OBJECTS = $(am_hcl_OBJECTS) hcl_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(hcl_LDFLAGS) $(LDFLAGS) -o $@ -am_hcls_OBJECTS = hcls-main2.$(OBJEXT) +am__hcls_SOURCES_DIST = main2.c +@ENABLE_HCLS_TRUE@am_hcls_OBJECTS = hcls-main2.$(OBJEXT) hcls_OBJECTS = $(am_hcls_OBJECTS) hcls_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -216,8 +223,8 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libhcl_la_SOURCES) $(libhcls_la_SOURCES) $(hcl_SOURCES) \ $(hcls_SOURCES) -DIST_SOURCES = $(libhcl_la_SOURCES) $(libhcls_la_SOURCES) \ - $(hcl_SOURCES) $(hcls_SOURCES) +DIST_SOURCES = $(libhcl_la_SOURCES) $(am__libhcls_la_SOURCES_DIST) \ + $(hcl_SOURCES) $(am__hcls_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -392,6 +399,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -423,7 +431,7 @@ pkginclude_HEADERS = \ hcl-utl.h \ hcl.h -pkglib_LTLIBRARIES = libhcl.la libhcls.la +pkglib_LTLIBRARIES = libhcl.la $(am__append_3) libhcl_la_SOURCES = \ hcl-prv.h \ logfmtv.h \ @@ -451,23 +459,23 @@ libhcl_la_SOURCES = \ libhcl_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) libhcl_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) -libhcl_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_3) -libhcl_la_DEPENDENCIES = $(am__append_4) -libhcls_la_SOURCES = hcl-s.c hcl-s.h -libhcls_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) -libhcls_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) -libhcls_la_LIBADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) -libhcls_la_DEPENDENCIES = +libhcl_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_4) +libhcl_la_DEPENDENCIES = $(am__append_5) +@ENABLE_HCLS_TRUE@libhcls_la_SOURCES = hcl-s.c hcl-s.h +@ENABLE_HCLS_TRUE@libhcls_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) +@ENABLE_HCLS_TRUE@libhcls_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) +@ENABLE_HCLS_TRUE@libhcls_la_LIBADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) +@ENABLE_HCLS_TRUE@libhcls_la_DEPENDENCIES = hcl_SOURCES = main.c hcl_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) hcl_LDFLAGS = $(LDFLAGS_LIB_COMMON) hcl_LDADD = $(LIBADD_LIB_COMMON) -lhcl #-ldyncall_s @ENABLE_STATIC_MODULE_TRUE@hcl_DEPENDENCIES = libhcl.la -hcls_SOURCES = main2.c -hcls_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) -hcls_LDFLAGS = $(LDFLAGS_LIB_COMMON) -hcls_LDADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) -lhcl -lhcls #-ldyncall_s -@ENABLE_STATIC_MODULE_TRUE@hcls_DEPENDENCIES = libhcl.la libhcls.la +@ENABLE_HCLS_TRUE@hcls_SOURCES = main2.c +@ENABLE_HCLS_TRUE@hcls_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) +@ENABLE_HCLS_TRUE@hcls_LDFLAGS = $(LDFLAGS_LIB_COMMON) +@ENABLE_HCLS_TRUE@hcls_LDADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) -lhcl -lhcls #-ldyncall_s +@ENABLE_HCLS_TRUE@@ENABLE_STATIC_MODULE_TRUE@hcls_DEPENDENCIES = libhcl.la libhcls.la all: hcl-cfg.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -557,7 +565,7 @@ libhcl.la: $(libhcl_la_OBJECTS) $(libhcl_la_DEPENDENCIES) $(EXTRA_libhcl_la_DEPE $(AM_V_CCLD)$(libhcl_la_LINK) -rpath $(pkglibdir) $(libhcl_la_OBJECTS) $(libhcl_la_LIBADD) $(LIBS) libhcls.la: $(libhcls_la_OBJECTS) $(libhcls_la_DEPENDENCIES) $(EXTRA_libhcls_la_DEPENDENCIES) - $(AM_V_CCLD)$(libhcls_la_LINK) -rpath $(pkglibdir) $(libhcls_la_OBJECTS) $(libhcls_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libhcls_la_LINK) $(am_libhcls_la_rpath) $(libhcls_la_OBJECTS) $(libhcls_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ diff --git a/lib/hcl-cfg.h.in b/lib/hcl-cfg.h.in index 99457aa..dd346c7 100644 --- a/lib/hcl-cfg.h.in +++ b/lib/hcl-cfg.h.in @@ -264,6 +264,9 @@ /* MB_LEN_MAX */ #undef HCL_MBLEN_MAX +/* offsetof(struct sockaddr, sa_family) */ +#undef HCL_OFFSETOF_SA_FAMILY + /* Author */ #undef HCL_PACKAGE_AUTHOR @@ -285,6 +288,12 @@ /* Patch level */ #undef HCL_PACKAGE_VERSION_PATCH +/* PATH_MAX */ +#undef HCL_PATH_MAX + +/* Define if sa_family_t is signed */ +#undef HCL_SA_FAMILY_T_IS_SIGNED + /* sizeof(char) */ #undef HCL_SIZEOF_CHAR @@ -315,9 +324,30 @@ /* sizeof(off_t) */ #undef HCL_SIZEOF_OFF_T +/* sizeof(sa_family_t) */ +#undef HCL_SIZEOF_SA_FAMILY_T + /* sizeof(short) */ #undef HCL_SIZEOF_SHORT +/* sizeof(socklen_t) */ +#undef HCL_SIZEOF_SOCKLEN_T + +/* sizeof(struct sockaddr_dl) */ +#undef HCL_SIZEOF_STRUCT_SOCKADDR_DL + +/* sizeof(struct sockaddr_in) */ +#undef HCL_SIZEOF_STRUCT_SOCKADDR_IN + +/* sizeof(struct sockaddr_in6) */ +#undef HCL_SIZEOF_STRUCT_SOCKADDR_IN6 + +/* sizeof(struct sockaddr_ll) */ +#undef HCL_SIZEOF_STRUCT_SOCKADDR_LL + +/* sizeof(struct sockaddr_un) */ +#undef HCL_SIZEOF_STRUCT_SOCKADDR_UN + /* sizeof(void*) */ #undef HCL_SIZEOF_VOID_P @@ -348,6 +378,9 @@ /* sizeof(__uint128_t) */ #undef HCL_SIZEOF___UINT128_T +/* Define if socklen_t is signed */ +#undef HCL_SOCKLEN_T_IS_SIGNED + /* Unicode character type size */ #undef HCL_UNICODE_SIZE @@ -357,6 +390,9 @@ /* The size of `MB_LEN_MAX', as computed by valueof. */ #undef NUMVALOF_MB_LEN_MAX +/* The size of `PATH_MAX', as computed by valueof. */ +#undef NUMVALOF_PATH_MAX + /* Name of package */ #undef PACKAGE @@ -418,9 +454,30 @@ /* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T +/* The size of `sa_family_t', as computed by sizeof. */ +#undef SIZEOF_SA_FAMILY_T + /* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT +/* The size of `socklen_t', as computed by sizeof. */ +#undef SIZEOF_SOCKLEN_T + +/* The size of `struct sockaddr_dl', as computed by sizeof. */ +#undef SIZEOF_STRUCT_SOCKADDR_DL + +/* The size of `struct sockaddr_in', as computed by sizeof. */ +#undef SIZEOF_STRUCT_SOCKADDR_IN + +/* The size of `struct sockaddr_in6', as computed by sizeof. */ +#undef SIZEOF_STRUCT_SOCKADDR_IN6 + +/* The size of `struct sockaddr_ll', as computed by sizeof. */ +#undef SIZEOF_STRUCT_SOCKADDR_LL + +/* The size of `struct sockaddr_un', as computed by sizeof. */ +#undef SIZEOF_STRUCT_SOCKADDR_UN + /* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P diff --git a/lib/hcl-prv.h b/lib/hcl-prv.h index 594bb61..1083d41 100644 --- a/lib/hcl-prv.h +++ b/lib/hcl-prv.h @@ -29,7 +29,6 @@ #include "hcl.h" #include "hcl-utl.h" -#include /* you can define this to either 1 or 2 */ #define HCL_BCODE_LONG_PARAM_SIZE 2 @@ -661,25 +660,6 @@ typedef hcl_ooi_t (*hcl_outbfmt_t) ( extern "C" { #endif -/* ========================================================================= */ -/* err.c */ -/* ========================================================================= */ - -void hcl_seterrbfmtv ( - hcl_t* hcl, - hcl_errnum_t errnum, - const hcl_bch_t* fmt, - va_list ap -); - -void hcl_seterrufmtv ( - hcl_t* hcl, - hcl_errnum_t errnum, - const hcl_uch_t* fmt, - va_list ap -); - - /* ========================================================================= */ /* heap.c */ /* ========================================================================= */ diff --git a/lib/hcl-s.c b/lib/hcl-s.c index ada6c21..1c2766e 100644 --- a/lib/hcl-s.c +++ b/lib/hcl-s.c @@ -28,13 +28,8 @@ #include "hcl-prv.h" #include -#include #include -#include #include -#include -#include - #if defined(_WIN32) # include @@ -95,7 +90,6 @@ # include # include # include -# include # include # include # include @@ -129,13 +123,6 @@ # endif #endif -typedef union sck_addr_t sck_addr_t; -union sck_addr_t -{ - struct sockaddr_in in4; - struct sockaddr_in6 in6; -}; - typedef struct bb_t bb_t; struct bb_t { @@ -259,12 +246,6 @@ struct hcl_server_t hcl_errnum_t errnum; struct { - union - { - hcl_ooch_t ooch[2048]; - hcl_bch_t bch[2048]; - hcl_uch_t uch[2048]; - } tmpbuf; hcl_ooch_t buf[2048]; hcl_oow_t len; } errmsg; @@ -275,8 +256,9 @@ struct hcl_server_t unsigned int trait; unsigned int logmask; hcl_oow_t worker_stack_size; - hcl_oow_t worker_idle_timeout; + hcl_ntime_t worker_idle_timeout; hcl_oow_t actor_heap_size; + hcl_ntime_t actor_max_runtime; } cfg; struct @@ -431,7 +413,7 @@ static HCL_INLINE int read_input (hcl_t* hcl, hcl_ioinarg_t* arg) } else if (n >= 1) break; -/* TOOD: idle timeout check - compute idling time and check it against server->cfg.idle_timeout */ +/* TOOD: idle timeout check - compute idling time and check it against server->cfg.worker_idle_timeout */ } x = recv(bb->fd, &bb->buf[bb->len], HCL_COUNTOF(bb->buf) - bb->len, 0); @@ -911,30 +893,62 @@ static void vm_checkbc (hcl_t* hcl, hcl_oob_t bcode) worker_hcl_xtn_t* xtn = (worker_hcl_xtn_t*)hcl_getxtn(hcl); if (xtn->proto->worker->server->stopreq) hcl_abort(hcl); + /* TODO: check how to this vm has been running. too long? abort it */ - - /* TODO: check if the worker connection is ok? if not, abort it */ + /* check agains xtn->proto->worker->server->cfg.actor_max_runtime */ } /* static void gc_hcl (hcl_t* hcl) { + worker_hcl_xtn_t* xtn = (worker_hcl_xtn_t*)hcl_getxtn(hcl); } static void fini_hcl (hcl_t* hcl) { worker_hcl_xtn_t* xtn = (worker_hcl_xtn_t*)hcl_getxtn(hcl); - if (xtn->logfd >= 0) - { - close (xtn->logfd); - xtn->logfd = -1; - xtn->logfd_istty = 0; - } } */ /* ========================================================================= */ + +union sockaddr_t +{ + struct sockaddr_in in4; +#if (HCL_SIZEOF_STRUCT_SOCKADDR_IN6 > 0) + struct sockaddr_in6 in6; +#endif +}; +typedef union sockaddr_t sockaddr_t; + +#undef char_t +#undef oocs_t +#undef str_to_ipv4 +#undef str_to_ipv6 +#undef str_to_sockaddr + +#define ooch_t hcl_bch_t +#define oocs_t hcl_bcs_t +#define str_to_ipv4 bchars_to_ipv4 +#define str_to_ipv6 bchars_to_ipv6 +#define str_to_sockaddr bchars_to_sockaddr +#include "sa-utl.h" + +#undef ooch_t +#undef oocs_t +#undef str_to_ipv4 +#undef str_to_ipv6 +#undef str_to_sockaddr + +#define ooch_t hcl_uch_t +#define oocs_t hcl_ucs_t +#define str_to_ipv4 uchars_to_ipv4 +#define str_to_ipv6 uchars_to_ipv6 +#define str_to_sockaddr uchars_to_sockaddr +#include "sa-utl.h" +/* ========================================================================= */ + #define HCL_SERVER_PROTO_LOG_MASK (HCL_LOG_ERROR | HCL_LOG_APP) hcl_server_proto_t* hcl_server_proto_open (hcl_oow_t xtnsize, hcl_server_worker_t* worker) @@ -1044,8 +1058,10 @@ static int write_reply_chunk (hcl_server_proto_t* proto) /*nwritten = writev(proto->worker->sck, (const struct iovec*)&iov[index], count - index);*/ if (nwritten <= -1) { + /* error occurred inside the worker thread shouldn't affect the error information + * in the server object. so here, i just log a message */ hcl_logbfmt (proto->hcl, HCL_SERVER_PROTO_LOG_MASK, "sendmsg failure on %d - %hs\n", proto->worker->sck, strerror(errno)); - return -1; + return -1; } while (index < count && (size_t)nwritten >= iov[index].iov_len) @@ -1591,7 +1607,7 @@ static void free_worker (hcl_server_worker_t* worker) static void add_hcl_server_worker_to_server (hcl_server_t* server, hcl_server_worker_state_t wstate, hcl_server_worker_t* worker) { - assert (worker->server == server); + HCL_ASSERT (server->dummy_hcl, worker->server == server); if (server->worker_list[wstate].tail) { @@ -1615,7 +1631,7 @@ static void zap_worker_in_server (hcl_server_t* server, hcl_server_worker_t* wor { hcl_server_worker_state_t wstate; - assert (worker->server == server); + HCL_ASSERT (server->dummy_hcl, worker->server == server); wstate = worker->state; if (worker->prev_worker) worker->prev_worker->next_worker = worker->next_worker; @@ -1637,7 +1653,7 @@ static void* worker_main (void* ctx) pthread_sigmask (SIG_BLOCK, &set, HCL_NULL); worker->thr = pthread_self(); - worker->proto = hcl_server_proto_open(0, worker); /* TODO: get this from argumen */ + worker->proto = hcl_server_proto_open(0, worker); if (!worker->proto) { free_worker (worker); @@ -1711,9 +1727,71 @@ void hcl_server_logufmt (hcl_server_t* server, unsigned int mask, const hcl_uch_ va_end (ap); } -int hcl_server_start (hcl_server_t* server, const char* addrs) + +static void set_err_with_syserr (hcl_server_t* server, int syserr, const char* bfmt, ...) { - sck_addr_t srv_addr; + hcl_t* hcl = server->dummy_hcl; + hcl_errnum_t errnum; + hcl_oow_t tmplen, tmplen2; + va_list ap; + + static hcl_bch_t b_dash[] = { ' ', '-', ' ', '\0' }; + static hcl_uch_t u_dash[] = { ' ', '-', ' ', '\0' }; + + if (hcl->shuterr) return; + + errnum = hcl_syserr_to_errnum(syserr); + if (hcl->vmprim.syserrstrb) + { + hcl->vmprim.syserrstrb (hcl, syserr, hcl->errmsg.tmpbuf.bch, HCL_COUNTOF(hcl->errmsg.tmpbuf.bch)); + + va_start (ap, bfmt); + hcl_seterrbfmtv (hcl, errnum, bfmt, ap); + va_end (ap); + + #if defined(HCL_OOCH_IS_BCH) + hcl->errmsg.len += hcl_copybcstr (&hcl->errmsg.buf[hcl->errmsg.len], HCL_COUNTOF(hcl->errmsg.buf) - hcl->errmsg.len, b_dash); + hcl->errmsg.len += hcl_copybcstr (&hcl->errmsg.buf[hcl->errmsg.len], HCL_COUNTOF(hcl->errmsg.buf) - hcl->errmsg.len, hcl->errmsg.tmpbuf.bch); + #else + hcl->errmsg.len += hcl_copyucstr (&hcl->errmsg.buf[hcl->errmsg.len], HCL_COUNTOF(hcl->errmsg.buf) - hcl->errmsg.len, u_dash); + tmplen = hcl_countbcstr(hcl->errmsg.tmpbuf.bch); + tmplen2 = HCL_COUNTOF(hcl->errmsg.buf) - hcl->errmsg.len; + hcl_convbtouchars (hcl, hcl->errmsg.tmpbuf.bch, &tmplen, &hcl->errmsg.buf[hcl->errmsg.len], &tmplen2); + hcl->errmsg.len += tmplen2; /* ignore conversion errors */ + #endif + } + else + { + HCL_ASSERT (hcl, hcl->vmprim.syserrstru != HCL_NULL); + + hcl->vmprim.syserrstru (hcl, syserr, hcl->errmsg.tmpbuf.uch, HCL_COUNTOF(hcl->errmsg.tmpbuf.uch)); + + va_start (ap, bfmt); + hcl_seterrbfmtv (hcl, errnum, bfmt, ap); + va_end (ap); + + #if defined(HCL_OOCH_IS_BCH) + hcl->errmsg.len += hcl_copybcstr (&hcl->errmsg.buf[hcl->errmsg.len], HCL_COUNTOF(hcl->errmsg.buf) - hcl->errmsg.len, b_dash); + + tmplen = hcl_countucstr(hcl->errmsg.tmpbuf.uch); + tmplen2 = HCL_COUNTOF(hcl->errmsg.buf) - hcl->errmsg.len; + hcl_convutobchars (hcl, hcl->errmsg.tmpbuf.uch, &tmplen, &hcl->errmsg.buf[hcl->errmsg.len], &tmplen2); + hcl->errmsg.len += tmplen2; /* ignore conversion errors */ + #else + hcl->errmsg.len += hcl_copyucstr (&hcl->errmsg.buf[hcl->errmsg.len], HCL_COUNTOF(hcl->errmsg.buf) - hcl->errmsg.len, u_dash); + hcl->errmsg.len += hcl_copyucstr (&hcl->errmsg.buf[hcl->errmsg.len], HCL_COUNTOF(hcl->errmsg.buf) - hcl->errmsg.len, hcl->errmsg.tmpbuf.uch); + #endif + + } + + server->errnum = errnum; + hcl_copyoochars (server->errmsg.buf, server->dummy_hcl->errmsg.buf, HCL_COUNTOF(server->errmsg.buf)); + server->errmsg.len = server->dummy_hcl->errmsg.len; +} + +int hcl_server_start (hcl_server_t* server, const hcl_bch_t* addrs) +{ + sockaddr_t srv_addr; int srv_fd, sck_fam; int optval; socklen_t srv_len; @@ -1722,36 +1800,13 @@ int hcl_server_start (hcl_server_t* server, const char* addrs) /* TODO: interprete 'addrs' as a command-separated address list * 192.168.1.1:20,[::1]:20,127.0.0.1:345 */ - HCL_MEMSET (&srv_addr, 0, HCL_SIZEOF(srv_addr)); - if (inet_pton(AF_INET6, addrs, &srv_addr.in6.sin6_addr) != 1) - { - if (inet_pton(AF_INET, addrs, &srv_addr.in4.sin_addr) != 1) - { - fprintf (stderr, "cannot open convert server address %s - %s\n", addrs, strerror(errno)); - return -1; - } - else - { - srv_addr.in4.sin_family = AF_INET; - srv_addr.in4.sin_port = htons(8888); /* TODO: change it */ - srv_len = HCL_SIZEOF(srv_addr.in4); - sck_fam = AF_INET; - } - } - else - { - srv_addr.in6.sin6_family = AF_INET6; - srv_addr.in6.sin6_port = htons(8888); /* TODO: change it */ - srv_len = HCL_SIZEOF(srv_addr.in6); - sck_fam = AF_INET6; - } + sck_fam = bchars_to_sockaddr(server, addrs, hcl_countbcstr(addrs), &srv_addr, &srv_len); + if (sck_fam <= -1) return -1; srv_fd = socket(sck_fam, SOCK_STREAM, 0); if (srv_fd == -1) { - int xerrno = errno; - hcl_server_seterrnum (server, hcl_syserr_to_errnum(xerrno)); - hcl_server_logbfmt (server, HCL_SERVER_PROTO_LOG_MASK, "cannot open server socket - %s\n", strerror(xerrno)); + set_err_with_syserr (server, errno, "unable to open server socket"); return -1; } @@ -1760,18 +1815,14 @@ int hcl_server_start (hcl_server_t* server, const char* addrs) if (bind(srv_fd, (struct sockaddr*)&srv_addr, srv_len) == -1) { - int xerrno = errno; - hcl_server_seterrnum (server, hcl_syserr_to_errnum(xerrno)); - hcl_server_logbfmt (server, HCL_SERVER_PROTO_LOG_MASK, "cannot bind server socket %d - %s\n", srv_fd, strerror(xerrno)); + set_err_with_syserr (server, errno, "unable to bind server socket %d", srv_fd); close (srv_fd); return -1; } - if (listen (srv_fd, 128) == -1) + if (listen(srv_fd, 128) == -1) { - int xerrno = errno; - hcl_server_seterrnum (server, hcl_syserr_to_errnum(xerrno)); - hcl_server_logbfmt (server, HCL_SERVER_PROTO_LOG_MASK, "cannot listen on server socket %d - %s\n", srv_fd, strerror(xerrno)); + set_err_with_syserr (server, errno, "unable to listen on server socket %d", srv_fd); close (srv_fd); return -1; } @@ -1782,7 +1833,7 @@ int hcl_server_start (hcl_server_t* server, const char* addrs) server->stopreq = 0; while (!server->stopreq) { - sck_addr_t cli_addr; + sockaddr_t cli_addr; int cli_fd; socklen_t cli_len; pthread_t thr; @@ -1795,12 +1846,7 @@ int hcl_server_start (hcl_server_t* server, const char* addrs) cli_fd = accept(srv_fd, (struct sockaddr*)&cli_addr, &cli_len); if (cli_fd == -1) { - if (errno != EINTR || !server->stopreq) - { - int xerrno = errno; - hcl_server_seterrnum (server, hcl_syserr_to_errnum(xerrno)); - hcl_server_logbfmt (server, HCL_SERVER_PROTO_LOG_MASK, "cannot accept worker on socket %d - %s\n", srv_fd, strerror(xerrno)); - } + if (errno != EINTR || !server->stopreq) set_err_with_syserr (server, errno, "unable to accept worker on socket %d", srv_fd); break; } @@ -1838,11 +1884,18 @@ int hcl_server_setoption (hcl_server_t* server, hcl_server_option_t id, const vo case HCL_SERVER_WORKER_STACK_SIZE: server->cfg.worker_stack_size = *(hcl_oow_t*)value; return 0; + + case HCL_SERVER_WORKER_IDLE_TIMEOUT: + server->cfg.worker_idle_timeout = *(hcl_ntime_t*)value; + return 0; case HCL_SERVER_ACTOR_HEAP_SIZE: server->cfg.actor_heap_size = *(hcl_oow_t*)value; return 0; - + + case HCL_SERVER_ACTOR_MAX_RUNTIME: + server->cfg.actor_max_runtime = *(hcl_ntime_t*)value; + return 0; } hcl_server_seterrnum (server, HCL_EINVAL); @@ -1864,10 +1917,18 @@ int hcl_server_getoption (hcl_server_t* server, hcl_server_option_t id, void* va case HCL_SERVER_WORKER_STACK_SIZE: *(hcl_oow_t*)value = server->cfg.worker_stack_size; return 0; + + case HCL_SERVER_WORKER_IDLE_TIMEOUT: + *(hcl_ntime_t*)value = server->cfg.worker_idle_timeout; + return 0; case HCL_SERVER_ACTOR_HEAP_SIZE: *(hcl_oow_t*)value = server->cfg.actor_heap_size; return 0; + + case HCL_SERVER_ACTOR_MAX_RUNTIME: + *(hcl_ntime_t*)value = server->cfg.actor_max_runtime; + return 0; }; hcl_server_seterrnum (server, HCL_EINVAL); @@ -1916,3 +1977,31 @@ void hcl_server_seterrnum (hcl_server_t* server, hcl_errnum_t errnum) server->errnum = errnum; server->errmsg.len = 0; } + +void hcl_server_seterrbfmt (hcl_server_t* server, hcl_errnum_t errnum, const hcl_bch_t* fmt, ...) +{ + va_list ap; + + va_start (ap, fmt); + hcl_seterrbfmtv (server->dummy_hcl, errnum, fmt, ap); + va_end (ap); + + HCL_ASSERT (server->dummy_hcl, HCL_COUNTOF(server->errmsg.buf) == HCL_COUNTOF(server->dummy_hcl->errmsg.buf)); + server->errnum = errnum; + hcl_copyoochars (server->errmsg.buf, server->dummy_hcl->errmsg.buf, HCL_COUNTOF(server->errmsg.buf)); + server->errmsg.len = server->dummy_hcl->errmsg.len; +} + +void hcl_server_seterrufmt (hcl_server_t* server, hcl_errnum_t errnum, const hcl_uch_t* fmt, ...) +{ + va_list ap; + + va_start (ap, fmt); + hcl_seterrufmtv (server->dummy_hcl, errnum, fmt, ap); + va_end (ap); + + HCL_ASSERT (server->dummy_hcl, HCL_COUNTOF(server->errmsg.buf) == HCL_COUNTOF(server->dummy_hcl->errmsg.buf)); + server->errnum = errnum; + hcl_copyoochars (server->errmsg.buf, server->dummy_hcl->errmsg.buf, HCL_COUNTOF(server->errmsg.buf)); + server->errmsg.len = server->dummy_hcl->errmsg.len; +} diff --git a/lib/hcl-s.h b/lib/hcl-s.h index 2a7e762..9eb98bc 100644 --- a/lib/hcl-s.h +++ b/lib/hcl-s.h @@ -38,7 +38,9 @@ enum hcl_server_option_t HCL_SERVER_TRAIT, HCL_SERVER_LOG_MASK, HCL_SERVER_WORKER_STACK_SIZE, - HCL_SERVER_ACTOR_HEAP_SIZE + HCL_SERVER_WORKER_IDLE_TIMEOUT, + HCL_SERVER_ACTOR_HEAP_SIZE, + HCL_SERVER_ACTOR_MAX_RUNTIME }; typedef enum hcl_server_option_t hcl_server_option_t; @@ -86,8 +88,8 @@ HCL_EXPORT void hcl_server_close ( ); HCL_EXPORT int hcl_server_start ( - hcl_server_t* server, - const char* addrs + hcl_server_t* server, + const hcl_bch_t* addrs ); HCL_EXPORT void hcl_server_stop ( @@ -129,11 +131,33 @@ HCL_EXPORT hcl_errnum_t hcl_server_geterrnum ( hcl_server_t* server ); +HCL_EXPORT const hcl_ooch_t* hcl_server_geterrstr ( + hcl_server_t* server +); + +HCL_EXPORT const hcl_ooch_t* hcl_server_geterrmsg ( + hcl_server_t* server +); + HCL_EXPORT void hcl_server_seterrnum ( hcl_server_t* server, hcl_errnum_t errnum ); +HCL_EXPORT void hcl_server_seterrbfmt ( + hcl_server_t* server, + hcl_errnum_t errnum, + const hcl_bch_t* fmt, + ... +); + +HCL_EXPORT void hcl_server_seterrufmt ( + hcl_server_t* server, + hcl_errnum_t errnum, + const hcl_uch_t* fmt, + ... +); + HCL_EXPORT void hcl_server_logbfmt ( hcl_server_t* server, unsigned int mask, diff --git a/lib/hcl.h b/lib/hcl.h index 4b5508b..b7c421a 100644 --- a/lib/hcl.h +++ b/lib/hcl.h @@ -1471,6 +1471,20 @@ HCL_EXPORT void hcl_seterrufmt ( ... ); +HCL_EXPORT void hcl_seterrbfmtv ( + hcl_t* hcl, + hcl_errnum_t errnum, + const hcl_bch_t* fmt, + va_list ap +); + +HCL_EXPORT void hcl_seterrufmtv ( + hcl_t* hcl, + hcl_errnum_t errnum, + const hcl_uch_t* fmt, + va_list ap +); + HCL_EXPORT const hcl_ooch_t* hcl_geterrstr ( hcl_t* hcl ); diff --git a/lib/logfmt.c b/lib/logfmt.c index c2e8f19..1c8bcbd 100644 --- a/lib/logfmt.c +++ b/lib/logfmt.c @@ -426,7 +426,7 @@ hcl_ooi_t hcl_logbfmtv (hcl_t* hcl, int mask, const hcl_bch_t* fmt, va_list ap) fo.putch = put_logch; fo.putcs = put_logcs; - x = _logbfmtv (hcl, fmt, &fo, ap); + x = _logbfmtv(hcl, fmt, &fo, ap); if (hcl->log.len > 0 && hcl->log.ptr[hcl->log.len - 1] == '\n') { @@ -463,7 +463,7 @@ hcl_ooi_t hcl_logufmtv (hcl_t* hcl, int mask, const hcl_uch_t* fmt, va_list ap) fo.putch = put_logch; fo.putcs = put_logcs; - x = _logufmtv (hcl, fmt, &fo, ap); + x = _logufmtv(hcl, fmt, &fo, ap); if (hcl->log.len > 0 && hcl->log.ptr[hcl->log.len - 1] == '\n') { diff --git a/lib/main2.c b/lib/main2.c index cebe244..606bd52 100644 --- a/lib/main2.c +++ b/lib/main2.c @@ -234,7 +234,7 @@ static void log_write (hcl_server_t* server, int wid, unsigned int mask, const h } } #else - write_all (logfd, vmsg, len); + write_all (logfd, msg, len); #endif if (xtn->logfd_istty) @@ -310,7 +310,7 @@ static int handle_logopt (hcl_server_t* server, const hcl_bch_t* str) { /* i duplicate this string for open() below as open() doesn't * accept a length-bounded string */ - xstr = strdup (str); + xstr = strdup(str); if (!xstr) { fprintf (stderr, "ERROR: out of memory in duplicating %s\n", str); diff --git a/lib/sa-utl.h b/lib/sa-utl.h new file mode 100644 index 0000000..761083d --- /dev/null +++ b/lib/sa-utl.h @@ -0,0 +1,362 @@ +static int str_to_ipv4 (const ooch_t* str, hcl_oow_t len, struct in_addr* inaddr) +{ + const ooch_t* end; + int dots = 0, digits = 0; + hcl_uint32_t acc = 0, addr = 0; + ooch_t c; + + end = str + len; + + do + { + if (str >= end) + { + if (dots < 3 || digits == 0) return -1; + addr = (addr << 8) | acc; + break; + } + + c = *str++; + + if (c >= '0' && c <= '9') + { + if (digits > 0 && acc == 0) return -1; + acc = acc * 10 + (c - '0'); + if (acc > 255) return -1; + digits++; + } + else if (c == '.') + { + if (dots >= 3 || digits == 0) return -1; + addr = (addr << 8) | acc; + dots++; acc = 0; digits = 0; + } + else return -1; + } + while (1); + + inaddr->s_addr = hcl_hton32(addr); + return 0; + +} + +#if (HCL_SIZEOF_STRUCT_SOCKADDR_IN6 > 0) +static int str_to_ipv6 (const ooch_t* src, hcl_oow_t len, struct in6_addr* inaddr) +{ + hcl_uint8_t* tp, * endp, * colonp; + const ooch_t* curtok; + ooch_t ch; + int saw_xdigit; + unsigned int val; + const ooch_t* src_end; + + src_end = src + len; + + HCL_MEMSET (inaddr, 0, HCL_SIZEOF(*inaddr)); + tp = &inaddr->s6_addr[0]; + endp = &inaddr->s6_addr[HCL_COUNTOF(inaddr->s6_addr)]; + colonp = HCL_NULL; + + /* Leading :: requires some special handling. */ + if (src < src_end && *src == ':') + { + src++; + if (src >= src_end || *src != ':') return -1; + } + + curtok = src; + saw_xdigit = 0; + val = 0; + + while (src < src_end) + { + int v1; + + ch = *src++; + + if (ch >= '0' && ch <= '9') + v1 = ch - '0'; + else if (ch >= 'A' && ch <= 'F') + v1 = ch - 'A' + 10; + else if (ch >= 'a' && ch <= 'f') + v1 = ch - 'a' + 10; + else v1 = -1; + if (v1 >= 0) + { + val <<= 4; + val |= v1; + if (val > 0xffff) return -1; + saw_xdigit = 1; + continue; + } + + if (ch == ':') + { + curtok = src; + if (!saw_xdigit) + { + if (colonp) return -1; + colonp = tp; + continue; + } + else if (src >= src_end) + { + /* a colon can't be the last character */ + return -1; + } + + *tp++ = (hcl_uint8_t)(val >> 8) & 0xff; + *tp++ = (hcl_uint8_t)val & 0xff; + saw_xdigit = 0; + val = 0; + continue; + } + + if (ch == '.' && ((tp + HCL_SIZEOF(struct in_addr)) <= endp) && + str_to_ipv4(curtok, src_end - curtok, (struct in_addr*)tp) == 0) + { + tp += HCL_SIZEOF(struct in_addr*); + saw_xdigit = 0; + break; + } + + return -1; + } + + if (saw_xdigit) + { + if (tp + HCL_SIZEOF(hcl_uint16_t) > endp) return -1; + *tp++ = (hcl_uint8_t)(val >> 8) & 0xff; + *tp++ = (hcl_uint8_t)val & 0xff; + } + if (colonp != HCL_NULL) + { + /* + * Since some memmove()'s erroneously fail to handle + * overlapping regions, we'll do the shift by hand. + */ + hcl_oow_t n = tp - colonp; + hcl_oow_t i; + + for (i = 1; i <= n; i++) + { + endp[-i] = colonp[n - i]; + colonp[n - i] = 0; + } + tp = endp; + } + + if (tp != endp) return -1; + + return 0; +} +#endif + + +static int str_to_sockaddr (hcl_server_t* server, const ooch_t* str, hcl_oow_t len, sockaddr_t* nwad, socklen_t* socklen) +{ + const ooch_t* p; + const ooch_t* end; + oocs_t tmp; + + p = str; + end = str + len; + + if (p >= end) + { + hcl_server_seterrbfmt (server, HCL_EINVAL, "blank address"); + return -1; + } + + HCL_MEMSET (nwad, 0, HCL_SIZEOF(*nwad)); + +#if (HCL_SIZEOF_STRUCT_SOCKADDR_IN6 > 0) + if (*p == '[') + { + /* IPv6 address */ + tmp.ptr = (ooch_t*)++p; /* skip [ and remember the position */ + while (p < end && *p != '%' && *p != ']') p++; + + if (p >= end) goto no_rbrack; + + tmp.len = p - tmp.ptr; + if (*p == '%') + { + /* handle scope id */ + hcl_uint32_t x; + + p++; /* skip % */ + + if (p >= end) + { + /* premature end */ + hcl_server_seterrbfmt (server, HCL_EINVAL, "scope id blank"); + return -1; + } + + if (*p >= '0' && *p <= '9') + { + /* numeric scope id */ + nwad->in6.sin6_scope_id = 0; + do + { + x = nwad->in6.sin6_scope_id * 10 + (*p - '0'); + if (x < nwad->in6.sin6_scope_id) + { + hcl_server_seterrbfmt (server, HCL_EINVAL, "scope id too large"); + return -1; /* overflow */ + } + nwad->in6.sin6_scope_id = x; + p++; + } + while (p < end && *p >= '0' && *p <= '9'); + } + else + { +#if 0 +TODO: + /* interface name as a scope id? */ + const ooch_t* stmp = p; + unsigned int index; + do p++; while (p < end && *p != ']'); + if (hcl_nwifwcsntoindex (stmp, p - stmp, &index) <= -1) return -1; + tmpad.u.in6.scope = index; +#endif + } + + if (p >= end || *p != ']') goto no_rbrack; + } + p++; /* skip ] */ + + if (str_to_ipv6(tmp.ptr, tmp.len, &nwad->in6.sin6_addr) <= -1) goto unrecog; + nwad->in6.sin6_family = AF_INET6; + } + else + { +#endif + /* IPv4 address */ + tmp.ptr = (ooch_t*)p; + while (p < end && *p != ':') p++; + tmp.len = p - tmp.ptr; + + if (str_to_ipv4(tmp.ptr, tmp.len, &nwad->in4.sin_addr) <= -1) + { + #if (HCL_SIZEOF_STRUCT_SOCKADDR_IN6 > 0) + /* check if it is an IPv6 address not enclosed in []. + * the port number can't be specified in this format. */ + if (p >= end || *p != ':') + { + /* without :, it can't be an ipv6 address */ + goto unrecog; + } + + + while (p < end && *p != '%') p++; + tmp.len = p - tmp.ptr; + + if (str_to_ipv6(tmp.ptr, tmp.len, &nwad->in6.sin6_addr) <= -1) goto unrecog; + + if (p < end && *p == '%') + { + /* handle scope id */ + hcl_uint32_t x; + + p++; /* skip % */ + + if (p >= end) + { + /* premature end */ + hcl_server_seterrbfmt (server, HCL_EINVAL, "scope id blank"); + return -1; + } + + if (*p >= '0' && *p <= '9') + { + /* numeric scope id */ + nwad->in6.sin6_scope_id = 0; + do + { + x = nwad->in6.sin6_scope_id * 10 + (*p - '0'); + if (x < nwad->in6.sin6_scope_id) + { + hcl_server_seterrbfmt (server, HCL_EINVAL, "scope id too large"); + return -1; /* overflow */ + } + nwad->in6.sin6_scope_id = x; + p++; + } + while (p < end && *p >= '0' && *p <= '9'); + } + else + { +#if 0 +TODO + /* interface name as a scope id? */ + const ooch_t* stmp = p; + unsigned int index; + do p++; while (p < end); + if (hcl_nwifwcsntoindex(stmp, p - stmp, &index) <= -1) return -1; + nwad->in6.sin6_scope_id = index; +#endif + } + } + + if (p < end) goto unrecog; /* some gargage after the end? */ + + nwad->in6.sin6_family = AF_INET6; + *socklen = HCL_SIZEOF(nwad->in6); + return nwad->in6.sin6_family; + #else + goto unrecog; + #endif + } + + nwad->in4.sin_family = AF_INET; +#if (HCL_SIZEOF_STRUCT_SOCKADDR_IN6 > 0) + } +#endif + + if (p < end && *p == ':') + { + /* port number */ + hcl_uint32_t port = 0; + + p++; /* skip : */ + + tmp.ptr = (ooch_t*)p; + while (p < end && *p >= '0' && *p <= '9') + { + port = port * 10 + (*p - '0'); + p++; + } + + tmp.len = p - tmp.ptr; + if (tmp.len <= 0 || tmp.len >= 6 || + port > HCL_TYPE_MAX(hcl_uint16_t)) + { + hcl_server_seterrbfmt (server, HCL_EINVAL, "port number blank or too large"); + return -1; + } + + #if (HCL_SIZEOF_STRUCT_SOCKADDR_IN6 > 0) + if (nwad->in4.sin_family == AF_INET) + nwad->in4.sin_port = hcl_hton16(port); + else + nwad->in6.sin6_port = hcl_hton16(port); + #else + nwad->in4.sin_port = hcl_hton16(port); + #endif + } + + *socklen = (nwad->in4.sin_family == AF_INET)? HCL_SIZEOF(nwad->in4): HCL_SIZEOF(nwad->in6); + return nwad->in4.sin_family; + + +unrecog: + hcl_server_seterrbfmt (server, HCL_EINVAL, "unrecognized address"); + return -1; + +no_rbrack: + hcl_server_seterrbfmt (server, HCL_EINVAL, "missing right bracket"); + return -1; +} diff --git a/lib/utl.c b/lib/utl.c index d9e2e84..7a2cd54 100644 --- a/lib/utl.c +++ b/lib/utl.c @@ -827,7 +827,7 @@ HCL_INLINE hcl_bch_t* hcl_duputobcharswithheadroom (hcl_t* hcl, hcl_oow_t headro hcl_bch_t* ptr; inlen = ucslen; - if (hcl_convutobchars (hcl, ucs, &inlen, HCL_NULL, &outlen) <= -1) + if (hcl_convutobchars(hcl, ucs, &inlen, HCL_NULL, &outlen) <= -1) { /* note it's also an error if no full conversion is made in this function */ return HCL_NULL; @@ -858,7 +858,7 @@ HCL_INLINE hcl_uch_t* hcl_dupbtoucstrwithheadroom (hcl_t* hcl, hcl_oow_t headroo hcl_oow_t inlen, outlen; hcl_uch_t* ptr; - if (hcl_convbtoucstr (hcl, bcs, &inlen, HCL_NULL, &outlen) <= -1) + if (hcl_convbtoucstr(hcl, bcs, &inlen, HCL_NULL, &outlen) <= -1) { /* note it's also an error if no full conversion is made in this function */ return HCL_NULL; diff --git a/m4/libtool.m4 b/m4/libtool.m4 index a644432..ee80844 100644 --- a/m4/libtool.m4 +++ b/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. @@ -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 @@ -4427,7 +4435,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4939,6 +4947,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 +5012,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 +5269,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 +5790,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 +5812,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 diff --git a/mod/Makefile.in b/mod/Makefile.in index 7ba8bd3..40b1ca0 100644 --- a/mod/Makefile.in +++ b/mod/Makefile.in @@ -95,7 +95,8 @@ host_triplet = @host@ @WIN32_FALSE@am__append_2 = -DHCL_DEFAULT_PFMODPREFIX=\"$(libdir)/libhcl-\" -DHCL_DEFAULT_PFMODPOSTFIX=\"\" subdir = mod ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_namespace.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \ + $(top_srcdir)/m4/ax_cxx_namespace.m4 \ $(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ @@ -375,6 +376,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@