moving a number of string functions to utl-str.c.m4

This commit is contained in:
hyung-hwan 2021-07-20 14:40:46 +00:00
parent e4afd9378b
commit 052b79f452
12 changed files with 2055 additions and 2486 deletions

View File

@ -164,8 +164,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/ar-lib \
$(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \ $(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \
$(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \ $(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \
$(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing ac/ar-lib \ $(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing ac/ar-lib \
ac/compile ac/config.guess ac/config.sub ac/depcomp \ ac/compile ac/config.guess ac/config.sub ac/install-sh \
ac/install-sh ac/ltmain.sh ac/missing ac/ltmain.sh ac/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)

114
mio/ac/config.guess generated vendored
View File

@ -2,7 +2,7 @@
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright 1992-2018 Free Software Foundation, Inc. # Copyright 1992-2018 Free Software Foundation, Inc.
timestamp='2018-02-24' timestamp='2018-08-29'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -84,8 +84,6 @@ if test $# != 0; then
exit 1 exit 1
fi fi
trap 'exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires # compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a # temporary files to be created and, as you can see below, it is a
@ -96,34 +94,39 @@ trap 'exit 1' 1 2 15
# Portable tmp directory creation inspired by the Autoconf team. # Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build=' tmp=
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; # shellcheck disable=SC2172
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
: ${TMPDIR=/tmp} ; trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
set_cc_for_build() {
: "${TMPDIR=/tmp}"
# shellcheck disable=SC2039
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
dummy=$tmp/dummy ; dummy=$tmp/dummy
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > "$dummy.c"
,,) echo "int x;" > "$dummy.c" ; for driver in cc gcc c89 c99 ; do
for c in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$driver"
CC_FOR_BUILD="$c"; break ; break
fi ; fi
done ; done
if test x"$CC_FOR_BUILD" = x ; then if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ; CC_FOR_BUILD=no_compiler_found
fi fi
;; ;;
,,*) CC_FOR_BUILD=$CC ;; ,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;' esac
}
# This is needed to find uname on a Pyramid OSx when run in the BSD universe. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24) # (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then if test -f /.attbin/uname ; then
PATH=$PATH:/.attbin ; export PATH PATH=$PATH:/.attbin ; export PATH
fi fi
@ -138,7 +141,7 @@ Linux|GNU|GNU/*)
# We could probably try harder. # We could probably try harder.
LIBC=gnu LIBC=gnu
eval "$set_cc_for_build" set_cc_for_build
cat <<-EOF > "$dummy.c" cat <<-EOF > "$dummy.c"
#include <features.h> #include <features.h>
#if defined(__UCLIBC__) #if defined(__UCLIBC__)
@ -199,7 +202,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
os=netbsdelf os=netbsdelf
;; ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax) arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval "$set_cc_for_build" set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__ | grep -q __ELF__
then then
@ -237,7 +240,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form: # contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "$machine-${os}${release}${abi}" echo "$machine-${os}${release}${abi-}"
exit ;; exit ;;
*:Bitrig:*:*) *:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@ -389,20 +392,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo i386-pc-auroraux"$UNAME_RELEASE" echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;; exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval "$set_cc_for_build" UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
SUN_ARCH=i386 case `isainfo -b` in
# If there is a compiler, see if it is configured for 64-bit objects. 32)
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does. echo i386-pc-solaris2"$UNAME_REL"
# This test works for both compilers. ;;
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 64)
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ echo x86_64-pc-solaris2"$UNAME_REL"
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ ;;
grep IS_64BIT_ARCH >/dev/null esac
then
SUN_ARCH=x86_64
fi
fi
echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;; exit ;;
sun4*:SunOS:6*:*) sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize # According to config.sub, this is the proper way to canonicalize
@ -482,7 +480,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo clipper-intergraph-clix"$UNAME_RELEASE" echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;; exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos) mips:*:*:UMIPS | mips:*:*:RISCos)
eval "$set_cc_for_build" set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c" sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus #ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */ #include <stdio.h> /* for printf() prototype */
@ -579,7 +577,7 @@ EOF
exit ;; exit ;;
*:AIX:2:3) *:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval "$set_cc_for_build" set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c" sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h> #include <sys/systemcfg.h>
@ -660,7 +658,7 @@ EOF
esac esac
fi fi
if [ "$HP_ARCH" = "" ]; then if [ "$HP_ARCH" = "" ]; then
eval "$set_cc_for_build" set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c" sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE #define _HPUX_SOURCE
@ -700,7 +698,7 @@ EOF
esac esac
if [ "$HP_ARCH" = hppa2.0w ] if [ "$HP_ARCH" = hppa2.0w ]
then then
eval "$set_cc_for_build" set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@ -726,7 +724,7 @@ EOF
echo ia64-hp-hpux"$HPUX_REV" echo ia64-hp-hpux"$HPUX_REV"
exit ;; exit ;;
3050*:HI-UX:*:*) 3050*:HI-UX:*:*)
eval "$set_cc_for_build" set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c" sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h> #include <unistd.h>
int int
@ -840,6 +838,17 @@ EOF
*:BSD/OS:*:*) *:BSD/OS:*:*)
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;; exit ;;
arm:FreeBSD:*:*)
UNAME_PROCESSOR=`uname -p`
set_cc_for_build
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
else
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
fi
exit ;;
*:FreeBSD:*:*) *:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p` UNAME_PROCESSOR=`/usr/bin/uname -p`
case "$UNAME_PROCESSOR" in case "$UNAME_PROCESSOR" in
@ -894,8 +903,8 @@ EOF
# other systems with GNU libc and userland # other systems with GNU libc and userland
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;; exit ;;
i*86:Minix:*:*) *:Minix:*:*)
echo "$UNAME_MACHINE"-pc-minix echo "$UNAME_MACHINE"-unknown-minix
exit ;; exit ;;
aarch64:Linux:*:*) aarch64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@ -922,7 +931,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;; exit ;;
arm*:Linux:*:*) arm*:Linux:*:*)
eval "$set_cc_for_build" set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__ | grep -q __ARM_EABI__
then then
@ -971,7 +980,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;; exit ;;
mips:Linux:*:* | mips64:Linux:*:*) mips:Linux:*:* | mips64:Linux:*:*)
eval "$set_cc_for_build" set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c" sed 's/^ //' << EOF > "$dummy.c"
#undef CPU #undef CPU
#undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}
@ -1046,11 +1055,7 @@ EOF
echo "$UNAME_MACHINE"-dec-linux-"$LIBC" echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;; exit ;;
x86_64:Linux:*:*) x86_64:Linux:*:*)
if objdump -f /bin/sh | grep -q elf32-x86-64; then
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
else
echo "$UNAME_MACHINE"-pc-linux-"$LIBC" echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
fi
exit ;; exit ;;
xtensa*:Linux:*:*) xtensa*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@ -1289,7 +1294,7 @@ EOF
exit ;; exit ;;
*:Darwin:*:*) *:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
eval "$set_cc_for_build" set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc UNAME_PROCESSOR=powerpc
fi fi
@ -1362,6 +1367,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386 # "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86 # is converted to i386 for consistency with other x86
# operating systems. # operating systems.
# shellcheck disable=SC2154
if test "$cputype" = 386; then if test "$cputype" = 386; then
UNAME_MACHINE=i386 UNAME_MACHINE=i386
else else
@ -1473,7 +1479,7 @@ EOF
exit 1 exit 1
# Local variables: # Local variables:
# eval: (add-hook 'write-file-functions 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='" # time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d" # time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'" # time-stamp-end: "'"

2695
mio/ac/config.sub generated vendored

File diff suppressed because it is too large Load Diff

198
mio/ac/ltmain.sh generated
View File

@ -31,7 +31,7 @@
PROGRAM=libtool PROGRAM=libtool
PACKAGE=libtool PACKAGE=libtool
VERSION="2.4.6 Debian-2.4.6-9" VERSION=2.4.6
package_revision=2.4.6 package_revision=2.4.6
@ -1370,7 +1370,7 @@ func_lt_ver ()
#! /bin/sh #! /bin/sh
# Set a version string for this script. # Set a version string for this script.
scriptversion=2015-10-07.11; # UTC scriptversion=2014-01-07.03; # UTC
# A portable, pluggable option parser for Bourne shell. # A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010 # Written by Gary V. Vaughan, 2010
@ -1530,8 +1530,6 @@ func_run_hooks ()
{ {
$debug_cmd $debug_cmd
_G_rc_run_hooks=false
case " $hookable_fns " in case " $hookable_fns " in
*" $1 "*) ;; *" $1 "*) ;;
*) func_fatal_error "'$1' does not support hook funcions.n" ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;;
@ -1540,16 +1538,16 @@ func_run_hooks ()
eval _G_hook_fns=\$$1_hooks; shift eval _G_hook_fns=\$$1_hooks; shift
for _G_hook in $_G_hook_fns; do for _G_hook in $_G_hook_fns; do
if eval $_G_hook '"$@"'; then eval $_G_hook '"$@"'
# store returned options list back into positional # store returned options list back into positional
# parameters for next 'cmd' execution. # parameters for next 'cmd' execution.
eval _G_hook_result=\$${_G_hook}_result eval _G_hook_result=\$${_G_hook}_result
eval set dummy "$_G_hook_result"; shift eval set dummy "$_G_hook_result"; shift
_G_rc_run_hooks=:
fi
done done
$_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result func_quote_for_eval ${1+"$@"}
func_run_hooks_result=$func_quote_for_eval_result
} }
@ -1559,16 +1557,10 @@ func_run_hooks ()
## --------------- ## ## --------------- ##
# In order to add your own option parsing hooks, you must accept the # In order to add your own option parsing hooks, you must accept the
# full positional parameter list in your hook function, you may remove/edit # full positional parameter list in your hook function, remove any
# any options that you action, and then pass back the remaining unprocessed # options that you action, and then pass back the remaining unprocessed
# options in '<hooked_function_name>_result', escaped suitably for # options in '<hooked_function_name>_result', escaped suitably for
# 'eval'. In this case you also must return $EXIT_SUCCESS to let the # 'eval'. Like this:
# hook's caller know that it should pay attention to
# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
# arguments are left untouched by the hook and therefore caller will ignore the
# result variable.
#
# Like this:
# #
# my_options_prep () # my_options_prep ()
# { # {
@ -1578,11 +1570,9 @@ func_run_hooks ()
# usage_message=$usage_message' # usage_message=$usage_message'
# -s, --silent don'\''t print informational messages # -s, --silent don'\''t print informational messages
# ' # '
# # No change in '$@' (ignored completely by this hook). There is #
# # no need to do the equivalent (but slower) action: # func_quote_for_eval ${1+"$@"}
# # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result
# # my_options_prep_result=$func_quote_for_eval_result
# false
# } # }
# func_add_hook func_options_prep my_options_prep # func_add_hook func_options_prep my_options_prep
# #
@ -1591,37 +1581,25 @@ func_run_hooks ()
# { # {
# $debug_cmd # $debug_cmd
# #
# args_changed=false
#
# # Note that for efficiency, we parse as many options as we can # # Note that for efficiency, we parse as many options as we can
# # recognise in a loop before passing the remainder back to the # # recognise in a loop before passing the remainder back to the
# # caller on the first unrecognised argument we encounter. # # caller on the first unrecognised argument we encounter.
# while test $# -gt 0; do # while test $# -gt 0; do
# opt=$1; shift # opt=$1; shift
# case $opt in # case $opt in
# --silent|-s) opt_silent=: # --silent|-s) opt_silent=: ;;
# args_changed=:
# ;;
# # Separate non-argument short options: # # Separate non-argument short options:
# -s*) func_split_short_opt "$_G_opt" # -s*) func_split_short_opt "$_G_opt"
# set dummy "$func_split_short_opt_name" \ # set dummy "$func_split_short_opt_name" \
# "-$func_split_short_opt_arg" ${1+"$@"} # "-$func_split_short_opt_arg" ${1+"$@"}
# shift # shift
# args_changed=:
# ;; # ;;
# *) # Make sure the first unrecognised option "$_G_opt" # *) set dummy "$_G_opt" "$*"; shift; break ;;
# # is added back to "$@", we could need that later
# # if $args_changed is true.
# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
# esac # esac
# done # done
# #
# if $args_changed; then
# func_quote_for_eval ${1+"$@"} # func_quote_for_eval ${1+"$@"}
# my_silent_option_result=$func_quote_for_eval_result # my_silent_option_result=$func_quote_for_eval_result
# fi
#
# $args_changed
# } # }
# func_add_hook func_parse_options my_silent_option # func_add_hook func_parse_options my_silent_option
# #
@ -1633,32 +1611,16 @@ func_run_hooks ()
# $opt_silent && $opt_verbose && func_fatal_help "\ # $opt_silent && $opt_verbose && func_fatal_help "\
# '--silent' and '--verbose' options are mutually exclusive." # '--silent' and '--verbose' options are mutually exclusive."
# #
# false # func_quote_for_eval ${1+"$@"}
# my_option_validation_result=$func_quote_for_eval_result
# } # }
# func_add_hook func_validate_options my_option_validation # func_add_hook func_validate_options my_option_validation
# #
# You'll also need to manually amend $usage_message to reflect the extra # You'll alse need to manually amend $usage_message to reflect the extra
# options you parse. It's preferable to append if you can, so that # options you parse. It's preferable to append if you can, so that
# multiple option parsing hooks can be added safely. # multiple option parsing hooks can be added safely.
# func_options_finish [ARG]...
# ----------------------------
# Finishing the option parse loop (call 'func_options' hooks ATM).
func_options_finish ()
{
$debug_cmd
_G_func_options_finish_exit=false
if func_run_hooks func_options ${1+"$@"}; then
func_options_finish_result=$func_run_hooks_result
_G_func_options_finish_exit=:
fi
$_G_func_options_finish_exit
}
# func_options [ARG]... # func_options [ARG]...
# --------------------- # ---------------------
# All the functions called inside func_options are hookable. See the # All the functions called inside func_options are hookable. See the
@ -1668,28 +1630,17 @@ func_options ()
{ {
$debug_cmd $debug_cmd
_G_rc_options=false func_options_prep ${1+"$@"}
eval func_parse_options \
${func_options_prep_result+"$func_options_prep_result"}
eval func_validate_options \
${func_parse_options_result+"$func_parse_options_result"}
for my_func in options_prep parse_options validate_options options_finish eval func_run_hooks func_options \
do ${func_validate_options_result+"$func_validate_options_result"}
if eval func_$my_func '${1+"$@"}'; then
eval _G_res_var='$'"func_${my_func}_result"
eval set dummy "$_G_res_var" ; shift
_G_rc_options=:
fi
done
# Save modified positional parameters for caller. As a top-level # save modified positional parameters for caller
# options-parser function we always need to set the 'func_options_result' func_options_result=$func_run_hooks_result
# variable (regardless the $_G_rc_options value).
if $_G_rc_options; then
func_options_result=$_G_res_var
else
func_quote_for_eval ${1+"$@"}
func_options_result=$func_quote_for_eval_result
fi
$_G_rc_options
} }
@ -1698,9 +1649,9 @@ func_options ()
# All initialisations required before starting the option parse loop. # All initialisations required before starting the option parse loop.
# Note that when calling hook functions, we pass through the list of # Note that when calling hook functions, we pass through the list of
# positional parameters. If a hook function modifies that list, and # positional parameters. If a hook function modifies that list, and
# needs to propagate that back to rest of this script, then the complete # needs to propogate that back to rest of this script, then the complete
# modified list must be put in 'func_run_hooks_result' before # modified list must be put in 'func_run_hooks_result' before
# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). # returning.
func_hookable func_options_prep func_hookable func_options_prep
func_options_prep () func_options_prep ()
{ {
@ -1710,14 +1661,10 @@ func_options_prep ()
opt_verbose=false opt_verbose=false
opt_warning_types= opt_warning_types=
_G_rc_options_prep=false func_run_hooks func_options_prep ${1+"$@"}
if func_run_hooks func_options_prep ${1+"$@"}; then
_G_rc_options_prep=:
# save modified positional parameters for caller # save modified positional parameters for caller
func_options_prep_result=$func_run_hooks_result func_options_prep_result=$func_run_hooks_result
fi
$_G_rc_options_prep
} }
@ -1731,20 +1678,18 @@ func_parse_options ()
func_parse_options_result= func_parse_options_result=
_G_rc_parse_options=false
# this just eases exit handling # this just eases exit handling
while test $# -gt 0; do while test $# -gt 0; do
# Defer to hook functions for initial option parsing, so they # Defer to hook functions for initial option parsing, so they
# get priority in the event of reusing an option name. # get priority in the event of reusing an option name.
if func_run_hooks func_parse_options ${1+"$@"}; then func_run_hooks func_parse_options ${1+"$@"}
# Adjust func_parse_options positional parameters to match
eval set dummy "$func_run_hooks_result"; shift eval set dummy "$func_run_hooks_result"; shift
_G_rc_parse_options=:
fi
# Break out of the loop if we already parsed every option. # Break out of the loop if we already parsed every option.
test $# -gt 0 || break test $# -gt 0 || break
_G_match_parse_options=:
_G_opt=$1 _G_opt=$1
shift shift
case $_G_opt in case $_G_opt in
@ -1759,10 +1704,7 @@ func_parse_options ()
;; ;;
--warnings|--warning|-W) --warnings|--warning|-W)
if test $# = 0 && func_missing_arg $_G_opt; then test $# = 0 && func_missing_arg $_G_opt && break
_G_rc_parse_options=:
break
fi
case " $warning_categories $1" in case " $warning_categories $1" in
*" $1 "*) *" $1 "*)
# trailing space prevents matching last $1 above # trailing space prevents matching last $1 above
@ -1815,25 +1757,15 @@ func_parse_options ()
shift shift
;; ;;
--) _G_rc_parse_options=: ; break ;; --) break ;;
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
*) set dummy "$_G_opt" ${1+"$@"}; shift *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
_G_match_parse_options=false
break
;;
esac esac
$_G_match_parse_options && _G_rc_parse_options=:
done done
if $_G_rc_parse_options; then
# save modified positional parameters for caller # save modified positional parameters for caller
func_quote_for_eval ${1+"$@"} func_quote_for_eval ${1+"$@"}
func_parse_options_result=$func_quote_for_eval_result func_parse_options_result=$func_quote_for_eval_result
fi
$_G_rc_parse_options
} }
@ -1846,21 +1778,16 @@ func_validate_options ()
{ {
$debug_cmd $debug_cmd
_G_rc_validate_options=false
# Display all warnings if -W was not given. # Display all warnings if -W was not given.
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
if func_run_hooks func_validate_options ${1+"$@"}; then func_run_hooks func_validate_options ${1+"$@"}
# save modified positional parameters for caller
func_validate_options_result=$func_run_hooks_result
_G_rc_validate_options=:
fi
# Bail if the options were screwed! # Bail if the options were screwed!
$exit_cmd $EXIT_FAILURE $exit_cmd $EXIT_FAILURE
$_G_rc_validate_options # save modified positional parameters for caller
func_validate_options_result=$func_run_hooks_result
} }
@ -2141,12 +2068,12 @@ include the following information:
compiler: $LTCC compiler: $LTCC
compiler flags: $LTCFLAGS compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld) linker: $LD (gnu? $with_gnu_ld)
version: $progname $scriptversion Debian-2.4.6-9 version: $progname (GNU libtool) 2.4.6
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
Report bugs to <bug-libtool@gnu.org>. Report bugs to <bug-libtool@gnu.org>.
GNU libtool home page: <http://www.gnu.org/s/libtool/>. GNU libtool home page: <http://www.gnu.org/software/libtool/>.
General help using GNU software: <http://www.gnu.org/gethelp/>." General help using GNU software: <http://www.gnu.org/gethelp/>."
exit 0 exit 0
} }
@ -2197,7 +2124,7 @@ fi
# a configuration failure hint, and exit. # a configuration failure hint, and exit.
func_fatal_configuration () func_fatal_configuration ()
{ {
func__fatal_error ${1+"$@"} \ func_fatal_error ${1+"$@"} \
"See the $PACKAGE documentation for more information." \ "See the $PACKAGE documentation for more information." \
"Fatal configuration error." "Fatal configuration error."
} }
@ -2343,8 +2270,6 @@ libtool_options_prep ()
nonopt= nonopt=
preserve_args= preserve_args=
_G_rc_lt_options_prep=:
# Shorthand for --mode=foo, only valid as the first argument # Shorthand for --mode=foo, only valid as the first argument
case $1 in case $1 in
clean|clea|cle|cl) clean|clea|cle|cl)
@ -2368,18 +2293,11 @@ libtool_options_prep ()
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
shift; set dummy --mode uninstall ${1+"$@"}; shift shift; set dummy --mode uninstall ${1+"$@"}; shift
;; ;;
*)
_G_rc_lt_options_prep=false
;;
esac esac
if $_G_rc_lt_options_prep; then
# Pass back the list of options. # Pass back the list of options.
func_quote_for_eval ${1+"$@"} func_quote_for_eval ${1+"$@"}
libtool_options_prep_result=$func_quote_for_eval_result libtool_options_prep_result=$func_quote_for_eval_result
fi
$_G_rc_lt_options_prep
} }
func_add_hook func_options_prep libtool_options_prep func_add_hook func_options_prep libtool_options_prep
@ -2391,12 +2309,9 @@ libtool_parse_options ()
{ {
$debug_cmd $debug_cmd
_G_rc_lt_parse_options=false
# Perform our own loop to consume as many options as possible in # Perform our own loop to consume as many options as possible in
# each iteration. # each iteration.
while test $# -gt 0; do while test $# -gt 0; do
_G_match_lt_parse_options=:
_G_opt=$1 _G_opt=$1
shift shift
case $_G_opt in case $_G_opt in
@ -2472,21 +2387,14 @@ libtool_parse_options ()
;; ;;
# An option not handled by this hook function: # An option not handled by this hook function:
*) set dummy "$_G_opt" ${1+"$@"} ; shift *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
_G_match_lt_parse_options=false
break
;;
esac esac
$_G_match_lt_parse_options && _G_rc_lt_parse_options=:
done done
if $_G_rc_lt_parse_options; then
# save modified positional parameters for caller # save modified positional parameters for caller
func_quote_for_eval ${1+"$@"} func_quote_for_eval ${1+"$@"}
libtool_parse_options_result=$func_quote_for_eval_result libtool_parse_options_result=$func_quote_for_eval_result
fi
$_G_rc_lt_parse_options
} }
func_add_hook func_parse_options libtool_parse_options func_add_hook func_parse_options libtool_parse_options
@ -7366,12 +7274,10 @@ func_mode_link ()
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
# -specs=* GCC specs files # -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang # -stdlib=* select c++ std lib with clang
# -fsanitize=* Clang/GCC memory and address sanitizer
# -fuse-ld=* Linker select flags for GCC
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-specs=*|-fsanitize=*|-fuse-ld=*) -specs=*)
func_quote_for_eval "$arg" func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result arg=$func_quote_for_eval_result
func_append compile_command " $arg" func_append compile_command " $arg"
@ -7664,10 +7570,7 @@ func_mode_link ()
case $pass in case $pass in
dlopen) libs=$dlfiles ;; dlopen) libs=$dlfiles ;;
dlpreopen) libs=$dlprefiles ;; dlpreopen) libs=$dlprefiles ;;
link) link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
libs="$deplibs %DEPLIBS%"
test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
;;
esac esac
fi fi
if test lib,dlpreopen = "$linkmode,$pass"; then if test lib,dlpreopen = "$linkmode,$pass"; then
@ -7986,6 +7889,9 @@ func_mode_link ()
# It is a libtool convenience library, so add in its objects. # It is a libtool convenience library, so add in its objects.
func_append convenience " $ladir/$objdir/$old_library" func_append convenience " $ladir/$objdir/$old_library"
func_append old_convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library"
elif test prog != "$linkmode" && test lib != "$linkmode"; then
func_fatal_error "'$lib' is not a convenience library"
fi
tmp_libs= tmp_libs=
for deplib in $dependency_libs; do for deplib in $dependency_libs; do
deplibs="$deplib $deplibs" deplibs="$deplib $deplibs"
@ -7996,9 +7902,6 @@ func_mode_link ()
fi fi
func_append tmp_libs " $deplib" func_append tmp_libs " $deplib"
done done
elif test prog != "$linkmode" && test lib != "$linkmode"; then
func_fatal_error "'$lib' is not a convenience library"
fi
continue continue
fi # $pass = conv fi # $pass = conv
@ -8922,9 +8825,6 @@ func_mode_link ()
revision=$number_minor revision=$number_minor
lt_irix_increment=no lt_irix_increment=no
;; ;;
*)
func_fatal_configuration "$modename: unknown library version type '$version_type'"
;;
esac esac
;; ;;
no) no)

35
mio/configure vendored
View File

@ -6535,7 +6535,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
netbsd* | netbsdelf*-gnu) netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else else
@ -7398,8 +7398,11 @@ _LT_EOF
test $ac_status = 0; }; then test $ac_status = 0; }; then
# Now try to grab the symbols. # Now try to grab the symbols.
nlist=conftest.nm nlist=conftest.nm
$ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "$nlist"; then
# Try sorting and uniquifying the output. # Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist" mv -f "$nlist"T "$nlist"
@ -10224,9 +10227,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
openbsd* | bitrig*) openbsd* | bitrig*)
with_gnu_ld=no with_gnu_ld=no
;; ;;
linux* | k*bsd*-gnu | gnu*)
link_all_deplibs=no
;;
esac esac
ld_shlibs=yes ld_shlibs=yes
@ -10481,7 +10481,7 @@ _LT_EOF
fi fi
;; ;;
netbsd* | netbsdelf*-gnu) netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc= wlarc=
@ -11151,7 +11151,6 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
if test yes = "$lt_cv_irix_exported_symbol"; then if test yes = "$lt_cv_irix_exported_symbol"; then
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi fi
link_all_deplibs=no
else else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
@ -11173,7 +11172,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
esac esac
;; ;;
netbsd* | netbsdelf*-gnu) netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else else
@ -12268,6 +12267,9 @@ fi
# before this can be enabled. # before this can be enabled.
hardcode_into_libs=yes hardcode_into_libs=yes
# Add ABI-specific directories to the system library path.
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
# Ideally, we could use ldconfig to report *all* directores which are # Ideally, we could use ldconfig to report *all* directores which are
# searched for libraries, however this is still not possible. Aside from not # searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command # being certain /sbin/ldconfig is available, command
@ -12276,7 +12278,7 @@ fi
# appending ld.so.conf contents (and includes) to the search path. # appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
fi fi
# We used to test for /lib/ld.so.1 and disable shared libraries on # We used to test for /lib/ld.so.1 and disable shared libraries on
@ -12288,18 +12290,6 @@ fi
dynamic_linker='GNU/Linux ld.so' dynamic_linker='GNU/Linux ld.so'
;; ;;
netbsdelf*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='NetBSD ld.elf_so'
;;
netbsd*) netbsd*)
version_type=sunos version_type=sunos
need_lib_prefix=no need_lib_prefix=no
@ -20722,6 +20712,7 @@ See \`config.log' for more details" "$LINENO" 5; }
cat <<_LT_EOF >> "$cfgfile" cat <<_LT_EOF >> "$cfgfile"
#! $SHELL #! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION # Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services. # Provide generalized library-building support services.

View File

@ -8,6 +8,8 @@ CPPFLAGS_ALL_COMMON = \
CFLAGS_ALL_COMMON = CFLAGS_ALL_COMMON =
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir) LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
EXTRA_DIST = utl-str.c.m4
################################################## ##################################################
# MAIN LIBRARY # MAIN LIBRARY
################################################## ##################################################
@ -93,7 +95,8 @@ libmio_la_SOURCES = \
tmr.c \ tmr.c \
utf8.c \ utf8.c \
utl.c \ utl.c \
utl-siph.c utl-siph.c \
utl-str.c
libmio_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) libmio_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
@ -124,3 +127,5 @@ install-data-hook:
uninstall-hook: uninstall-hook:
@rm -f "$(DESTDIR)$(includedir)/mio-cfg.h" @rm -f "$(DESTDIR)$(includedir)/mio-cfg.h"
utl-str.c: utl-str.c.m4
m4 $(abs_srcdir)/utl-str.c.m4 > $(abs_srcdir)/utl-str.c

View File

@ -153,7 +153,7 @@ am__libmio_la_SOURCES_DIST = chr.c dns.c dns-cli.c ecs.c ecs-imp.h \
mio-prv.h mio.c nwif.c opt.c opt-imp.h path.c pipe.c pro.c \ mio-prv.h mio.c nwif.c opt.c opt-imp.h path.c pipe.c pro.c \
sck.c skad.c sys.c sys-ass.c sys-err.c sys-log.c sys-mux.c \ sck.c skad.c sys.c sys-ass.c sys-err.c sys-log.c sys-mux.c \
sys-prv.h sys-tim.c thr.c uch-case.h uch-prop.h tmr.c utf8.c \ sys-prv.h sys-tim.c thr.c uch-case.h uch-prop.h tmr.c utf8.c \
utl.c utl-siph.c mar.c mar-cli.c utl.c utl-siph.c utl-str.c mar.c mar-cli.c
@ENABLE_MARIADB_TRUE@am__objects_1 = libmio_la-mar.lo \ @ENABLE_MARIADB_TRUE@am__objects_1 = libmio_la-mar.lo \
@ENABLE_MARIADB_TRUE@ libmio_la-mar-cli.lo @ENABLE_MARIADB_TRUE@ libmio_la-mar-cli.lo
am_libmio_la_OBJECTS = libmio_la-chr.lo libmio_la-dns.lo \ am_libmio_la_OBJECTS = libmio_la-chr.lo libmio_la-dns.lo \
@ -168,7 +168,7 @@ am_libmio_la_OBJECTS = libmio_la-chr.lo libmio_la-dns.lo \
libmio_la-sys-ass.lo libmio_la-sys-err.lo libmio_la-sys-log.lo \ libmio_la-sys-ass.lo libmio_la-sys-err.lo libmio_la-sys-log.lo \
libmio_la-sys-mux.lo libmio_la-sys-tim.lo libmio_la-thr.lo \ libmio_la-sys-mux.lo libmio_la-sys-tim.lo libmio_la-thr.lo \
libmio_la-tmr.lo libmio_la-utf8.lo libmio_la-utl.lo \ libmio_la-tmr.lo libmio_la-utf8.lo libmio_la-utl.lo \
libmio_la-utl-siph.lo $(am__objects_1) libmio_la-utl-siph.lo libmio_la-utl-str.lo $(am__objects_1)
libmio_la_OBJECTS = $(am_libmio_la_OBJECTS) libmio_la_OBJECTS = $(am_libmio_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@) AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@ -218,6 +218,7 @@ am__depfiles_remade = ./$(DEPDIR)/libmio_la-chr.Plo \
./$(DEPDIR)/libmio_la-sys.Plo ./$(DEPDIR)/libmio_la-thr.Plo \ ./$(DEPDIR)/libmio_la-sys.Plo ./$(DEPDIR)/libmio_la-thr.Plo \
./$(DEPDIR)/libmio_la-tmr.Plo ./$(DEPDIR)/libmio_la-utf8.Plo \ ./$(DEPDIR)/libmio_la-tmr.Plo ./$(DEPDIR)/libmio_la-utf8.Plo \
./$(DEPDIR)/libmio_la-utl-siph.Plo \ ./$(DEPDIR)/libmio_la-utl-siph.Plo \
./$(DEPDIR)/libmio_la-utl-str.Plo \
./$(DEPDIR)/libmio_la-utl.Plo ./$(DEPDIR)/libmio_la-utl.Plo
am__mv = mv -f am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@ -420,6 +421,7 @@ CPPFLAGS_ALL_COMMON = \
CFLAGS_ALL_COMMON = CFLAGS_ALL_COMMON =
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir) LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
EXTRA_DIST = utl-str.c.m4
################################################## ##################################################
# MAIN LIBRARY # MAIN LIBRARY
@ -447,7 +449,7 @@ libmio_la_SOURCES = chr.c dns.c dns-cli.c ecs.c ecs-imp.h err.c fmt.c \
mio.c nwif.c opt.c opt-imp.h path.c pipe.c pro.c sck.c skad.c \ mio.c nwif.c opt.c opt-imp.h path.c pipe.c pro.c sck.c skad.c \
sys.c sys-ass.c sys-err.c sys-log.c sys-mux.c sys-prv.h \ sys.c sys-ass.c sys-err.c sys-log.c sys-mux.c sys-prv.h \
sys-tim.c thr.c uch-case.h uch-prop.h tmr.c utf8.c utl.c \ sys-tim.c thr.c uch-case.h uch-prop.h tmr.c utf8.c utl.c \
utl-siph.c $(am__append_2) utl-siph.c utl-str.c $(am__append_2)
libmio_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) libmio_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
libmio_la_CFLAGS = $(CFLAGS_LIB_COMMON) $(am__append_3) libmio_la_CFLAGS = $(CFLAGS_LIB_COMMON) $(am__append_3)
libmio_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) $(am__append_4) libmio_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) $(am__append_4)
@ -583,6 +585,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-tmr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-tmr.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-utf8.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-utf8.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-utl-siph.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-utl-siph.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-utl-str.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-utl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmio_la-utl.Plo@am__quote@ # am--include-marker
$(am__depfiles_remade): $(am__depfiles_remade):
@ -860,6 +863,13 @@ libmio_la-utl-siph.lo: utl-siph.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmio_la_CPPFLAGS) $(CPPFLAGS) $(libmio_la_CFLAGS) $(CFLAGS) -c -o libmio_la-utl-siph.lo `test -f 'utl-siph.c' || echo '$(srcdir)/'`utl-siph.c @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmio_la_CPPFLAGS) $(CPPFLAGS) $(libmio_la_CFLAGS) $(CFLAGS) -c -o libmio_la-utl-siph.lo `test -f 'utl-siph.c' || echo '$(srcdir)/'`utl-siph.c
libmio_la-utl-str.lo: utl-str.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmio_la_CPPFLAGS) $(CPPFLAGS) $(libmio_la_CFLAGS) $(CFLAGS) -MT libmio_la-utl-str.lo -MD -MP -MF $(DEPDIR)/libmio_la-utl-str.Tpo -c -o libmio_la-utl-str.lo `test -f 'utl-str.c' || echo '$(srcdir)/'`utl-str.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmio_la-utl-str.Tpo $(DEPDIR)/libmio_la-utl-str.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utl-str.c' object='libmio_la-utl-str.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmio_la_CPPFLAGS) $(CPPFLAGS) $(libmio_la_CFLAGS) $(CFLAGS) -c -o libmio_la-utl-str.lo `test -f 'utl-str.c' || echo '$(srcdir)/'`utl-str.c
libmio_la-mar.lo: mar.c libmio_la-mar.lo: mar.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmio_la_CPPFLAGS) $(CPPFLAGS) $(libmio_la_CFLAGS) $(CFLAGS) -MT libmio_la-mar.lo -MD -MP -MF $(DEPDIR)/libmio_la-mar.Tpo -c -o libmio_la-mar.lo `test -f 'mar.c' || echo '$(srcdir)/'`mar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmio_la_CPPFLAGS) $(CPPFLAGS) $(libmio_la_CFLAGS) $(CFLAGS) -MT libmio_la-mar.lo -MD -MP -MF $(DEPDIR)/libmio_la-mar.Tpo -c -o libmio_la-mar.lo `test -f 'mar.c' || echo '$(srcdir)/'`mar.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmio_la-mar.Tpo $(DEPDIR)/libmio_la-mar.Plo @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmio_la-mar.Tpo $(DEPDIR)/libmio_la-mar.Plo
@ -1065,6 +1075,7 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/libmio_la-tmr.Plo -rm -f ./$(DEPDIR)/libmio_la-tmr.Plo
-rm -f ./$(DEPDIR)/libmio_la-utf8.Plo -rm -f ./$(DEPDIR)/libmio_la-utf8.Plo
-rm -f ./$(DEPDIR)/libmio_la-utl-siph.Plo -rm -f ./$(DEPDIR)/libmio_la-utl-siph.Plo
-rm -f ./$(DEPDIR)/libmio_la-utl-str.Plo
-rm -f ./$(DEPDIR)/libmio_la-utl.Plo -rm -f ./$(DEPDIR)/libmio_la-utl.Plo
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \ distclean-am: clean-am distclean-compile distclean-generic \
@ -1148,6 +1159,7 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/libmio_la-tmr.Plo -rm -f ./$(DEPDIR)/libmio_la-tmr.Plo
-rm -f ./$(DEPDIR)/libmio_la-utf8.Plo -rm -f ./$(DEPDIR)/libmio_la-utf8.Plo
-rm -f ./$(DEPDIR)/libmio_la-utl-siph.Plo -rm -f ./$(DEPDIR)/libmio_la-utl-siph.Plo
-rm -f ./$(DEPDIR)/libmio_la-utl-str.Plo
-rm -f ./$(DEPDIR)/libmio_la-utl.Plo -rm -f ./$(DEPDIR)/libmio_la-utl.Plo
-rm -f Makefile -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic maintainer-clean-am: distclean-am maintainer-clean-generic
@ -1200,6 +1212,9 @@ install-data-hook:
uninstall-hook: uninstall-hook:
@rm -f "$(DESTDIR)$(includedir)/mio-cfg.h" @rm -f "$(DESTDIR)$(includedir)/mio-cfg.h"
utl-str.c: utl-str.c.m4
m4 $(abs_srcdir)/utl-str.c.m4 > $(abs_srcdir)/utl-str.c
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:

View File

@ -176,6 +176,14 @@ void mio_sys_resetlog (
mio_t* mio mio_t* mio
); );
void mio_sys_locklog (
mio_t* mio
);
void mio_sys_unlocklog (
mio_t* mio
);
void mio_sys_writelog ( void mio_sys_writelog (
mio_t* mio, mio_t* mio,
mio_bitmask_t mask, mio_bitmask_t mask,

View File

@ -141,15 +141,6 @@ void mio_sys_finilog (
mio_t* mio mio_t* mio
); );
void mio_sys_locklog (
mio_t* mio
);
void mio_sys_locklog (
mio_t* mio
);
int mio_sys_initmux ( int mio_sys_initmux (
mio_t* mio mio_t* mio
); );

505
mio/lib/utl-str.c.m4 Normal file
View File

@ -0,0 +1,505 @@
/*
* $Id$
*
Copyright (c) 2016-2020 Chung, Hyung-Hwan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAfRRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Do NOT edit utl-str.c.
*
* Generate utl-str.c with m4
* $ m4 utl-str.c.m4 > utl-str.c
*/
#include "mio-prv.h"
#include <mio-chr.h>
dnl ---------------------------------------------------------------------------
changequote(`[[', `]]')
dnl ---------------------------------------------------------------------------
define([[fn_equal_chars]], [[ define([[fn_name]], $1) define([[char_type]], $2)
int fn_name (const char_type* str1, const char_type* str2, mio_oow_t len)
{
mio_oow_t i;
/* NOTE: you should call this function after having ensured that
* str1 and str2 are in the same length */
for (i = 0; i < len; i++)
{
if (str1[i] != str2[i]) return 0;
}
return 1;
}
]])
fn_equal_chars(mio_equal_uchars, mio_uch_t)
fn_equal_chars(mio_equal_bchars, mio_bch_t)
dnl ---------------------------------------------------------------------------
define([[fn_comp_chars]], [[ define([[fn_name]], $1) define([[char_type]], $2) define([[chau_type]], $3)
int fn_name (const char_type* str1, mio_oow_t len1, const char_type* str2, mio_oow_t len2, int ignorecase)
{
chau_type c1, c2;
const char_type* end1 = str1 + len1;
const char_type* end2 = str2 + len2;
if (ignorecase)
{
while (str1 < end1)
{
c1 = $4(*str1);
if (str2 < end2)
{
c2 = $4(*str2);
if (c1 > c2) return 1;
if (c1 < c2) return -1;
}
else return 1;
str1++; str2++;
}
}
else
{
while (str1 < end1)
{
c1 = *str1;
if (str2 < end2)
{
c2 = *str2;
if (c1 > c2) return 1;
if (c1 < c2) return -1;
}
else return 1;
str1++; str2++;
}
}
return (str2 < end2)? -1: 0;
}
]])
fn_comp_chars(mio_comp_uchars, mio_uch_t, mio_uchu_t, mio_to_uch_lower)
fn_comp_chars(mio_comp_bchars, mio_bch_t, mio_bchu_t, mio_to_bch_lower)
dnl ---------------------------------------------------------------------------
define([[fn_comp_cstr]], [[ define([[fn_name]], $1) define([[char_type]], $2) define([[chau_type]], $3)
int fn_name (const char_type* str1, const char_type* str2, int ignorecase)
{
if (ignorecase)
{
while ($4(*str1) == $4(*str2))
{
if (*str1 == '\0') return 0;
str1++; str2++;
}
return ((chau_type)$4(*str1) > (chau_type)$4(*str2))? 1: -1;
}
else
{
while (*str1 == *str2)
{
if (*str1 == '\0') return 0;
str1++; str2++;
}
return ((chau_type)*str1 > (chau_type)*str2)? 1: -1;
}
}
]])
fn_comp_cstr(mio_comp_ucstr, mio_uch_t, mio_uchu_t, mio_to_uch_lower)
fn_comp_cstr(mio_comp_bcstr, mio_bch_t, mio_bchu_t, mio_to_bch_lower)
dnl ---------------------------------------------------------------------------
define([[fn_fill_chars]], [[ define([[fn_name]], $1) define([[char_type]], $2)
void fn_name (char_type* dst, char_type ch, mio_oow_t len)
{
mio_oow_t i;
for (i = 0; i < len; i++) dst[i] = ch;
}
]])
fn_fill_chars(mio_fill_uchars, mio_uch_t)
fn_fill_chars(mio_fill_bchars, mio_bch_t)
dnl ---------------------------------------------------------------------------
define([[fn_count_cstr]], [[ define([[fn_name]], $1) define([[char_type]], $2)
mio_oow_t fn_name (const char_type* str)
{
const char_type* ptr = str;
while (*ptr != '\0') ptr++;
return ptr - str;
}
]])
fn_count_cstr(mio_count_ucstr, mio_uch_t)
fn_count_cstr(mio_count_bcstr, mio_bch_t)
dnl ---------------------------------------------------------------------------
define([[fn_find_char]], [[ define([[fn_name]], $1) define([[char_type]], $2)
char_type* fn_name (const char_type* ptr, mio_oow_t len, char_type c)
{
const char_type* end;
end = ptr + len;
while (ptr < end)
{
if (*ptr == c) return (char_type*)ptr;
ptr++;
}
return MIO_NULL;
}
]])
fn_find_char(mio_find_uchar, mio_uch_t)
fn_find_char(mio_find_bchar, mio_bch_t)
dnl ---------------------------------------------------------------------------
define([[fn_rfind_char]], [[ define([[fn_name]], $1) define([[char_type]], $2)
char_type* fn_name (const char_type* ptr, mio_oow_t len, char_type c)
{
const char_type* cur;
cur = ptr + len;
while (cur > ptr)
{
--cur;
if (*cur == c) return (char_type*)cur;
}
return MIO_NULL;
}
]])
fn_rfind_char(mio_rfind_uchar, mio_uch_t)
fn_rfind_char(mio_rfind_bchar, mio_bch_t)
dnl ---------------------------------------------------------------------------
define([[fn_find_char_in_cstr]], [[ define([[fn_name]], $1) define([[char_type]], $2)
char_type* fn_name (const char_type* ptr, char_type c)
{
while (*ptr != '\0')
{
if (*ptr == c) return (char_type*)ptr;
ptr++;
}
return MIO_NULL;
}
]])
fn_find_char_in_cstr(mio_find_uchar_in_ucstr, mio_uch_t)
fn_find_char_in_cstr(mio_find_bchar_in_bcstr, mio_bch_t)
dnl ---------------------------------------------------------------------------
define([[fn_trim_chars]], [[define([[fn_name]], $1) define([[char_type]], $2) dnl $3: is_space $4: prefix for option values
char_type* fn_name (const char_type* str, mio_oow_t* len, int flags)
{
const char_type* p = str, * end = str + *len;
if (p < end)
{
const char_type* s = MIO_NULL, * e = MIO_NULL;
do
{
if (!$3(*p))
{
if (s == MIO_NULL) s = p;
e = p;
}
p++;
}
while (p < end);
if (e)
{
if (flags & $4_RIGHT)
{
*len -= end - e - 1;
}
if (flags & $4_LEFT)
{
*len -= s - str;
str = s;
}
}
else
{
/* the entire string need to be deleted */
if ((flags & $4_RIGHT) ||
(flags & $4_LEFT)) *len = 0;
}
}
return (char_type*)str;
}
]])
fn_trim_chars(mio_trim_uchars, mio_uch_t, mio_is_uch_space, MIO_TRIM_UCHARS)
fn_trim_chars(mio_trim_bchars, mio_bch_t, mio_is_bch_space, MIO_TRIM_BCHARS)
dnl ---------------------------------------------------------------------------
define([[fn_split_cstr]], [[ define([[fn_name]], $1) define([[char_type]], $2) dnl: $3 is_space $4: copy_str_unlimited
int fn_name (char_type* s, const char_type* delim, char_type lquote, char_type rquote, char_type escape)
{
char_type* p = s, *d;
char_type* sp = MIO_NULL, * ep = MIO_NULL;
int delim_mode;
int cnt = 0;
if (delim == MIO_NULL) delim_mode = 0;
else
{
delim_mode = 1;
for (d = (char_type*)delim; *d != '\0'; d++)
if (!$3(*d)) delim_mode = 2;
}
if (delim_mode == 0)
{
/* skip preceding space characters */
while ($3(*p)) p++;
/* when 0 is given as "delim", it has an effect of cutting
preceding and trailing space characters off "s". */
if (lquote != '\0' && *p == lquote)
{
$4 (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
$4 (p, p + 1);
}
else
{
if (*p == rquote)
{
p++;
break;
}
}
if (sp == 0) sp = p;
ep = p;
p++;
}
while ($3(*p)) p++;
if (*p != '\0') return -1;
if (sp == 0 && ep == 0) s[0] = '\0';
else
{
ep[1] = '\0';
if (s != (char_type*)sp) $4 (s, sp);
cnt++;
}
}
else
{
while (*p)
{
if (!$3(*p))
{
if (sp == 0) sp = p;
ep = p;
}
p++;
}
if (sp == 0 && ep == 0) s[0] = '\0';
else
{
ep[1] = '\0';
if (s != (char_type*)sp) $4 (s, sp);
cnt++;
}
}
}
else if (delim_mode == 1)
{
char_type* o;
while (*p)
{
o = p;
while ($3(*p)) p++;
if (o != p) { $4 (o, p); p = o; }
if (lquote != '\0' && *p == lquote)
{
$4 (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
$4 (p, p + 1);
}
else
{
if (*p == rquote)
{
*p++ = '\0';
cnt++;
break;
}
}
p++;
}
}
else
{
o = p;
for (;;)
{
if (*p == '\0')
{
if (o != p) cnt++;
break;
}
if ($3(*p))
{
*p++ = '\0';
cnt++;
break;
}
p++;
}
}
}
}
else /* if (delim_mode == 2) */
{
char_type* o;
int ok;
while (*p != '\0')
{
o = p;
while ($3(*p)) p++;
if (o != p) { $4 (o, p); p = o; }
if (lquote != '\0' && *p == lquote)
{
$4 (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
$4 (p, p + 1);
}
else
{
if (*p == rquote)
{
*p++ = '\0';
cnt++;
break;
}
}
p++;
}
ok = 0;
while ($3(*p)) p++;
if (*p == '\0') ok = 1;
for (d = (char_type*)delim; *d != '\0'; d++)
{
if (*p == *d)
{
ok = 1;
$4 (p, p + 1);
break;
}
}
if (ok == 0) return -1;
}
else
{
o = p; sp = ep = 0;
for (;;)
{
if (*p == '\0')
{
if (ep)
{
ep[1] = '\0';
p = &ep[1];
}
cnt++;
break;
}
for (d = (char_type*)delim; *d != '\0'; d++)
{
if (*p == *d)
{
if (sp == MIO_NULL)
{
$4 (o, p); p = o;
*p++ = '\0';
}
else
{
$4 (&ep[1], p);
$4 (o, sp);
o[ep - sp + 1] = '\0';
p = &o[ep - sp + 2];
}
cnt++;
/* last empty field after delim */
if (*p == '\0') cnt++;
goto exit_point;
}
}
if (!$3(*p))
{
if (sp == MIO_NULL) sp = p;
ep = p;
}
p++;
}
exit_point:
;
}
}
}
return cnt;
}
]])
fn_split_cstr(mio_split_ucstr, mio_uch_t, mio_is_uch_space, mio_copy_ucstr_unlimited)
fn_split_cstr(mio_split_bcstr, mio_bch_t, mio_is_bch_space, mio_copy_bcstr_unlimited)

View File

@ -29,164 +29,6 @@
/* ========================================================================= */ /* ========================================================================= */
int mio_equal_uchars (const mio_uch_t* str1, const mio_uch_t* str2, mio_oow_t len)
{
mio_oow_t i;
/* NOTE: you should call this function after having ensured that
* str1 and str2 are in the same length */
for (i = 0; i < len; i++)
{
if (str1[i] != str2[i]) return 0;
}
return 1;
}
int mio_equal_bchars (const mio_bch_t* str1, const mio_bch_t* str2, mio_oow_t len)
{
mio_oow_t i;
/* NOTE: you should call this function after having ensured that
* str1 and str2 are in the same length */
for (i = 0; i < len; i++)
{
if (str1[i] != str2[i]) return 0;
}
return 1;
}
int mio_comp_uchars (const mio_uch_t* str1, mio_oow_t len1, const mio_uch_t* str2, mio_oow_t len2, int ignorecase)
{
mio_uchu_t c1, c2;
const mio_uch_t* end1 = str1 + len1;
const mio_uch_t* end2 = str2 + len2;
if (ignorecase)
{
while (str1 < end1)
{
c1 = mio_to_uch_lower(*str1);
if (str2 < end2)
{
c2 = mio_to_uch_lower(*str2);
if (c1 > c2) return 1;
if (c1 < c2) return -1;
}
else return 1;
str1++; str2++;
}
}
else
{
while (str1 < end1)
{
c1 = *str1;
if (str2 < end2)
{
c2 = *str2;
if (c1 > c2) return 1;
if (c1 < c2) return -1;
}
else return 1;
str1++; str2++;
}
}
return (str2 < end2)? -1: 0;
}
int mio_comp_bchars (const mio_bch_t* str1, mio_oow_t len1, const mio_bch_t* str2, mio_oow_t len2, int ignorecase)
{
mio_bchu_t c1, c2;
const mio_bch_t* end1 = str1 + len1;
const mio_bch_t* end2 = str2 + len2;
if (ignorecase)
{
while (str1 < end1)
{
c1 = mio_to_bch_lower(*str1);
if (str2 < end2)
{
c2 = mio_to_bch_lower(*str2);
if (c1 > c2) return 1;
if (c1 < c2) return -1;
}
else return 1;
str1++; str2++;
}
}
else
{
while (str1 < end1)
{
c1 = *str1;
if (str2 < end2)
{
c2 = *str2;
if (c1 > c2) return 1;
if (c1 < c2) return -1;
}
else return 1;
str1++; str2++;
}
}
return (str2 < end2)? -1: 0;
}
int mio_comp_ucstr (const mio_uch_t* str1, const mio_uch_t* str2, int ignorecase)
{
if (ignorecase)
{
while (mio_to_uch_lower(*str1) == mio_to_uch_lower(*str2))
{
if (*str1 == '\0') return 0;
str1++; str2++;
}
return ((mio_uchu_t)mio_to_uch_lower(*str1) > (mio_uchu_t)mio_to_uch_lower(*str2))? 1: -1;
}
else
{
while (*str1 == *str2)
{
if (*str1 == '\0') return 0;
str1++; str2++;
}
return ((mio_uchu_t)*str1 > (mio_uchu_t)*str2)? 1: -1;
}
}
int mio_comp_bcstr (const mio_bch_t* str1, const mio_bch_t* str2, int ignorecase)
{
if (ignorecase)
{
while (mio_to_bch_lower(*str1) == mio_to_bch_lower(*str2))
{
if (*str1 == '\0') return 0;
str1++; str2++;
}
return ((mio_bchu_t)mio_to_bch_lower(*str1) > (mio_bchu_t)mio_to_bch_lower(*str2))? 1: -1;
}
else
{
while (*str1 == *str2)
{
if (*str1 == '\0') return 0;
str1++; str2++;
}
return ((mio_bchu_t)*str1 > (mio_bchu_t)*str2)? 1: -1;
}
}
int mio_comp_ucstr_limited (const mio_uch_t* str1, const mio_uch_t* str2, mio_oow_t maxlen, int ignorecase) int mio_comp_ucstr_limited (const mio_uch_t* str1, const mio_uch_t* str2, mio_oow_t maxlen, int ignorecase)
{ {
if (maxlen == 0) return 0; if (maxlen == 0) return 0;
@ -495,109 +337,6 @@ mio_oow_t mio_copy_bcstr_unlimited (mio_bch_t* dst, const mio_bch_t* src)
} }
/* ========================================================================= */ /* ========================================================================= */
void mio_fill_uchars (mio_uch_t* dst, mio_uch_t ch, mio_oow_t len)
{
mio_oow_t i;
for (i = 0; i < len; i++) dst[i] = ch;
}
void mio_fill_bchars (mio_bch_t* dst, mio_bch_t ch, mio_oow_t len)
{
mio_oow_t i;
for (i = 0; i < len; i++) dst[i] = ch;
}
mio_oow_t mio_count_ucstr (const mio_uch_t* str)
{
const mio_uch_t* ptr = str;
while (*ptr != '\0') ptr++;
return ptr - str;
}
mio_oow_t mio_count_bcstr (const mio_bch_t* str)
{
const mio_bch_t* ptr = str;
while (*ptr != '\0') ptr++;
return ptr - str;
}
mio_uch_t* mio_find_uchar (const mio_uch_t* ptr, mio_oow_t len, mio_uch_t c)
{
const mio_uch_t* end;
end = ptr + len;
while (ptr < end)
{
if (*ptr == c) return (mio_uch_t*)ptr;
ptr++;
}
return MIO_NULL;
}
mio_bch_t* mio_find_bchar (const mio_bch_t* ptr, mio_oow_t len, mio_bch_t c)
{
const mio_bch_t* end;
end = ptr + len;
while (ptr < end)
{
if (*ptr == c) return (mio_bch_t*)ptr;
ptr++;
}
return MIO_NULL;
}
mio_uch_t* mio_rfind_uchar (const mio_uch_t* ptr, mio_oow_t len, mio_uch_t c)
{
const mio_uch_t* cur;
cur = ptr + len;
while (cur > ptr)
{
--cur;
if (*cur == c) return (mio_uch_t*)cur;
}
return MIO_NULL;
}
mio_bch_t* mio_rfind_bchar (const mio_bch_t* ptr, mio_oow_t len, mio_bch_t c)
{
const mio_bch_t* cur;
cur = ptr + len;
while (cur > ptr)
{
--cur;
if (*cur == c) return (mio_bch_t*)cur;
}
return MIO_NULL;
}
mio_uch_t* mio_find_uchar_in_ucstr (const mio_uch_t* ptr, mio_uch_t c)
{
while (*ptr != '\0')
{
if (*ptr == c) return (mio_uch_t*)ptr;
ptr++;
}
return MIO_NULL;
}
mio_bch_t* mio_find_bchar_in_bcstr (const mio_bch_t* ptr, mio_bch_t c)
{
while (*ptr != '\0')
{
if (*ptr == c) return (mio_bch_t*)ptr;
ptr++;
}
return MIO_NULL;
}
#define IS_BCH_WORD_DELIM(x,delim) (mio_is_bch_space(x) || (x) == delim) #define IS_BCH_WORD_DELIM(x,delim) (mio_is_bch_space(x) || (x) == delim)
#define IS_UCH_WORD_DELIM(x,delim) (mio_is_uch_space(x) || (x) == delim) #define IS_UCH_WORD_DELIM(x,delim) (mio_is_uch_space(x) || (x) == delim)
@ -652,570 +391,6 @@ const mio_uch_t* mio_find_ucstr_word_in_ucstr (const mio_uch_t* str, const mio_u
/* ========================================================================= */ /* ========================================================================= */
mio_uch_t* mio_trim_uchars (const mio_uch_t* str, mio_oow_t* len, int flags)
{
const mio_uch_t* p = str, * end = str + *len;
if (p < end)
{
const mio_uch_t* s = MIO_NULL, * e = MIO_NULL;
do
{
if (!mio_is_uch_space(*p))
{
if (s == MIO_NULL) s = p;
e = p;
}
p++;
}
while (p < end);
if (e)
{
if (flags & MIO_TRIM_UCHARS_RIGHT)
{
*len -= end - e - 1;
}
if (flags & MIO_TRIM_UCHARS_LEFT)
{
*len -= s - str;
str = s;
}
}
else
{
/* the entire string need to be deleted */
if ((flags & MIO_TRIM_UCHARS_RIGHT) ||
(flags & MIO_TRIM_UCHARS_LEFT)) *len = 0;
}
}
return (mio_uch_t*)str;
}
mio_bch_t* mio_trim_bchars (const mio_bch_t* str, mio_oow_t* len, int flags)
{
const mio_bch_t* p = str, * end = str + *len;
if (p < end)
{
const mio_bch_t* s = MIO_NULL, * e = MIO_NULL;
do
{
if (!mio_is_bch_space(*p))
{
if (s == MIO_NULL) s = p;
e = p;
}
p++;
}
while (p < end);
if (e)
{
if (flags & MIO_TRIM_BCHARS_RIGHT)
{
*len -= end - e - 1;
}
if (flags & MIO_TRIM_BCHARS_LEFT)
{
*len -= s - str;
str = s;
}
}
else
{
/* the entire string need to be deleted */
if ((flags & MIO_TRIM_BCHARS_RIGHT) ||
(flags & MIO_TRIM_BCHARS_LEFT)) *len = 0;
}
}
return (mio_bch_t*)str;
}
/* ========================================================================= */
int mio_split_ucstr (mio_uch_t* s, const mio_uch_t* delim, mio_uch_t lquote, mio_uch_t rquote, mio_uch_t escape)
{
mio_uch_t* p = s, *d;
mio_uch_t* sp = MIO_NULL, * ep = MIO_NULL;
int delim_mode;
int cnt = 0;
if (delim == MIO_NULL) delim_mode = 0;
else
{
delim_mode = 1;
for (d = (mio_uch_t*)delim; *d != '\0'; d++)
if (!mio_is_uch_space(*d)) delim_mode = 2;
}
if (delim_mode == 0)
{
/* skip preceding space characters */
while (mio_is_uch_space(*p)) p++;
/* when 0 is given as "delim", it has an effect of cutting
preceding and trailing space characters off "s". */
if (lquote != '\0' && *p == lquote)
{
mio_copy_ucstr_unlimited (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
mio_copy_ucstr_unlimited (p, p + 1);
}
else
{
if (*p == rquote)
{
p++;
break;
}
}
if (sp == 0) sp = p;
ep = p;
p++;
}
while (mio_is_uch_space(*p)) p++;
if (*p != '\0') return -1;
if (sp == 0 && ep == 0) s[0] = '\0';
else
{
ep[1] = '\0';
if (s != (mio_uch_t*)sp) mio_copy_ucstr_unlimited (s, sp);
cnt++;
}
}
else
{
while (*p)
{
if (!mio_is_uch_space(*p))
{
if (sp == 0) sp = p;
ep = p;
}
p++;
}
if (sp == 0 && ep == 0) s[0] = '\0';
else
{
ep[1] = '\0';
if (s != (mio_uch_t*)sp) mio_copy_ucstr_unlimited (s, sp);
cnt++;
}
}
}
else if (delim_mode == 1)
{
mio_uch_t* o;
while (*p)
{
o = p;
while (mio_is_uch_space(*p)) p++;
if (o != p) { mio_copy_ucstr_unlimited (o, p); p = o; }
if (lquote != '\0' && *p == lquote)
{
mio_copy_ucstr_unlimited (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
mio_copy_ucstr_unlimited (p, p + 1);
}
else
{
if (*p == rquote)
{
*p++ = '\0';
cnt++;
break;
}
}
p++;
}
}
else
{
o = p;
for (;;)
{
if (*p == '\0')
{
if (o != p) cnt++;
break;
}
if (mio_is_uch_space(*p))
{
*p++ = '\0';
cnt++;
break;
}
p++;
}
}
}
}
else /* if (delim_mode == 2) */
{
mio_uch_t* o;
int ok;
while (*p != '\0')
{
o = p;
while (mio_is_uch_space(*p)) p++;
if (o != p) { mio_copy_ucstr_unlimited (o, p); p = o; }
if (lquote != '\0' && *p == lquote)
{
mio_copy_ucstr_unlimited (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
mio_copy_ucstr_unlimited (p, p + 1);
}
else
{
if (*p == rquote)
{
*p++ = '\0';
cnt++;
break;
}
}
p++;
}
ok = 0;
while (mio_is_uch_space(*p)) p++;
if (*p == '\0') ok = 1;
for (d = (mio_uch_t*)delim; *d != '\0'; d++)
{
if (*p == *d)
{
ok = 1;
mio_copy_ucstr_unlimited (p, p + 1);
break;
}
}
if (ok == 0) return -1;
}
else
{
o = p; sp = ep = 0;
for (;;)
{
if (*p == '\0')
{
if (ep)
{
ep[1] = '\0';
p = &ep[1];
}
cnt++;
break;
}
for (d = (mio_uch_t*)delim; *d != '\0'; d++)
{
if (*p == *d)
{
if (sp == MIO_NULL)
{
mio_copy_ucstr_unlimited (o, p); p = o;
*p++ = '\0';
}
else
{
mio_copy_ucstr_unlimited (&ep[1], p);
mio_copy_ucstr_unlimited (o, sp);
o[ep - sp + 1] = '\0';
p = &o[ep - sp + 2];
}
cnt++;
/* last empty field after delim */
if (*p == '\0') cnt++;
goto exit_point;
}
}
if (!mio_is_uch_space(*p))
{
if (sp == MIO_NULL) sp = p;
ep = p;
}
p++;
}
exit_point:
;
}
}
}
return cnt;
}
int mio_split_bcstr (mio_bch_t* s, const mio_bch_t* delim, mio_bch_t lquote, mio_bch_t rquote, mio_bch_t escape)
{
mio_bch_t* p = s, *d;
mio_bch_t* sp = MIO_NULL, * ep = MIO_NULL;
int delim_mode;
int cnt = 0;
if (delim == MIO_NULL) delim_mode = 0;
else
{
delim_mode = 1;
for (d = (mio_bch_t*)delim; *d != '\0'; d++)
if (!mio_is_bch_space(*d)) delim_mode = 2;
}
if (delim_mode == 0)
{
/* skip preceding space characters */
while (mio_is_bch_space(*p)) p++;
/* when 0 is given as "delim", it has an effect of cutting
preceding and trailing space characters off "s". */
if (lquote != '\0' && *p == lquote)
{
mio_copy_bcstr_unlimited (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
mio_copy_bcstr_unlimited (p, p + 1);
}
else
{
if (*p == rquote)
{
p++;
break;
}
}
if (sp == 0) sp = p;
ep = p;
p++;
}
while (mio_is_bch_space(*p)) p++;
if (*p != '\0') return -1;
if (sp == 0 && ep == 0) s[0] = '\0';
else
{
ep[1] = '\0';
if (s != (mio_bch_t*)sp) mio_copy_bcstr_unlimited (s, sp);
cnt++;
}
}
else
{
while (*p)
{
if (!mio_is_bch_space(*p))
{
if (sp == 0) sp = p;
ep = p;
}
p++;
}
if (sp == 0 && ep == 0) s[0] = '\0';
else
{
ep[1] = '\0';
if (s != (mio_bch_t*)sp) mio_copy_bcstr_unlimited (s, sp);
cnt++;
}
}
}
else if (delim_mode == 1)
{
mio_bch_t* o;
while (*p)
{
o = p;
while (mio_is_bch_space(*p)) p++;
if (o != p) { mio_copy_bcstr_unlimited (o, p); p = o; }
if (lquote != '\0' && *p == lquote)
{
mio_copy_bcstr_unlimited (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
mio_copy_bcstr_unlimited (p, p + 1);
}
else
{
if (*p == rquote)
{
*p++ = '\0';
cnt++;
break;
}
}
p++;
}
}
else
{
o = p;
for (;;)
{
if (*p == '\0')
{
if (o != p) cnt++;
break;
}
if (mio_is_bch_space(*p))
{
*p++ = '\0';
cnt++;
break;
}
p++;
}
}
}
}
else /* if (delim_mode == 2) */
{
mio_bch_t* o;
int ok;
while (*p != '\0')
{
o = p;
while (mio_is_bch_space(*p)) p++;
if (o != p) { mio_copy_bcstr_unlimited (o, p); p = o; }
if (lquote != '\0' && *p == lquote)
{
mio_copy_bcstr_unlimited (p, p + 1);
for (;;)
{
if (*p == '\0') return -1;
if (escape != '\0' && *p == escape)
{
mio_copy_bcstr_unlimited (p, p + 1);
}
else
{
if (*p == rquote)
{
*p++ = '\0';
cnt++;
break;
}
}
p++;
}
ok = 0;
while (mio_is_bch_space(*p)) p++;
if (*p == '\0') ok = 1;
for (d = (mio_bch_t*)delim; *d != '\0'; d++)
{
if (*p == *d)
{
ok = 1;
mio_copy_bcstr_unlimited (p, p + 1);
break;
}
}
if (ok == 0) return -1;
}
else
{
o = p; sp = ep = 0;
for (;;)
{
if (*p == '\0')
{
if (ep)
{
ep[1] = '\0';
p = &ep[1];
}
cnt++;
break;
}
for (d = (mio_bch_t*)delim; *d != '\0'; d++)
{
if (*p == *d)
{
if (sp == MIO_NULL)
{
mio_copy_bcstr_unlimited (o, p); p = o;
*p++ = '\0';
}
else
{
mio_copy_bcstr_unlimited (&ep[1], p);
mio_copy_bcstr_unlimited (o, sp);
o[ep - sp + 1] = '\0';
p = &o[ep - sp + 2];
}
cnt++;
/* last empty field after delim */
if (*p == '\0') cnt++;
goto exit_point;
}
}
if (!mio_is_bch_space(*p))
{
if (sp == MIO_NULL) sp = p;
ep = p;
}
p++;
}
exit_point:
;
}
}
}
return cnt;
}
/* ========================================================================= */
mio_oow_t mio_byte_to_bcstr (mio_uint8_t byte, mio_bch_t* buf, mio_oow_t size, int flagged_radix, mio_bch_t fill) mio_oow_t mio_byte_to_bcstr (mio_uint8_t byte, mio_bch_t* buf, mio_oow_t size, int flagged_radix, mio_bch_t fill)
{ {
mio_bch_t tmp[(MIO_SIZEOF(mio_uint8_t) * MIO_BITS_PER_BYTE)]; mio_bch_t tmp[(MIO_SIZEOF(mio_uint8_t) * MIO_BITS_PER_BYTE)];

36
mio/m4/libtool.m4 generated vendored
View File

@ -728,6 +728,7 @@ _LT_CONFIG_SAVE_COMMANDS([
cat <<_LT_EOF >> "$cfgfile" cat <<_LT_EOF >> "$cfgfile"
#! $SHELL #! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION # Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services. # Provide generalized library-building support services.
@ -2866,6 +2867,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# before this can be enabled. # before this can be enabled.
hardcode_into_libs=yes hardcode_into_libs=yes
# Add ABI-specific directories to the system library path.
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
# Ideally, we could use ldconfig to report *all* directores which are # Ideally, we could use ldconfig to report *all* directores which are
# searched for libraries, however this is still not possible. Aside from not # searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command # being certain /sbin/ldconfig is available, command
@ -2874,7 +2878,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# appending ld.so.conf contents (and includes) to the search path. # appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
fi fi
# We used to test for /lib/ld.so.1 and disable shared libraries on # We used to test for /lib/ld.so.1 and disable shared libraries on
@ -2886,18 +2890,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
dynamic_linker='GNU/Linux ld.so' dynamic_linker='GNU/Linux ld.so'
;; ;;
netbsdelf*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='NetBSD ld.elf_so'
;;
netbsd*) netbsd*)
version_type=sunos version_type=sunos
need_lib_prefix=no need_lib_prefix=no
@ -3557,7 +3549,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
netbsd* | netbsdelf*-gnu) netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else else
@ -4063,8 +4055,7 @@ _LT_EOF
if AC_TRY_EVAL(ac_compile); then if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols. # Now try to grab the symbols.
nlist=conftest.nm nlist=conftest.nm
$ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
# Try sorting and uniquifying the output. # Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist" mv -f "$nlist"T "$nlist"
@ -4436,7 +4427,7 @@ m4_if([$1], [CXX], [
;; ;;
esac esac
;; ;;
netbsd* | netbsdelf*-gnu) netbsd*)
;; ;;
*qnx* | *nto*) *qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise # QNX uses GNU C++, but need to define -shared option too, otherwise
@ -4948,9 +4939,6 @@ m4_if([$1], [CXX], [
;; ;;
esac esac
;; ;;
linux* | k*bsd*-gnu | gnu*)
_LT_TAGVAR(link_all_deplibs, $1)=no
;;
*) *)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;; ;;
@ -5013,9 +5001,6 @@ dnl Note also adjust exclude_expsyms for C++ above.
openbsd* | bitrig*) openbsd* | bitrig*)
with_gnu_ld=no with_gnu_ld=no
;; ;;
linux* | k*bsd*-gnu | gnu*)
_LT_TAGVAR(link_all_deplibs, $1)=no
;;
esac esac
_LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(ld_shlibs, $1)=yes
@ -5270,7 +5255,7 @@ _LT_EOF
fi fi
;; ;;
netbsd* | netbsdelf*-gnu) netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc= wlarc=
@ -5791,7 +5776,6 @@ _LT_EOF
if test yes = "$lt_cv_irix_exported_symbol"; then if test yes = "$lt_cv_irix_exported_symbol"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi fi
_LT_TAGVAR(link_all_deplibs, $1)=no
else else
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
@ -5813,7 +5797,7 @@ _LT_EOF
esac esac
;; ;;
netbsd* | netbsdelf*-gnu) netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else else