--- sqsh-2.5.16.1.orig/aclocal.m4
+++ sqsh-2.5.16.1/aclocal.m4
@@ -111,57 +111,6 @@
fi
])
-#
-# AC_FIND_LIB([lib_name],[path],[action_found],[action_notfound])
-#
-AC_DEFUN(AC_FIND_LIB, [
- AC_MSG_CHECKING(for lib$1)
- AC_CACHE_VAL(ac_cv_lib$1,
- [
- if test "$ac_cv_bit_mode" = "64"; then
- SEARCH_PATH="/lib64:/usr/lib64:/usr/local/lib64:${HOME}/lib64:${HOME}/usr/lib64:/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- else
- SEARCH_PATH="/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- fi
- libdir=""
-
- if test "${LD_LIBRARY_PATH}" != ""; then
- SEARCH_PATH="${LD_LIBRARY_PATH}:${SEARCH_PATH}"
- fi
-
- if test "$2" != ""; then
- SEARCH_PATH="$2:${SEARCH_PATH}"
- fi
-
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for dir in ${SEARCH_PATH}; do
- for lib in ${dir}/lib$1.*; do
- if test -f "${lib}"; then
- libdir=${dir}
- break;
- fi
- done
-
- if test "${libdir}" != ""; then
- break;
- fi
- done
- IFS="$ac_save_ifs"
-
- ac_cv_lib$1="${libdir}"
- ])
-
- libdir=$ac_cv_lib$1
-
- if test "${libdir}" != ""; then
- AC_MSG_RESULT($libdir)
- $3
- else
- AC_MSG_RESULT(not found)
- $4
- fi
-])
-
dnl # AC_BIT_MODE (M Wesdorp)
dnl #
dnl # Determines whether we are compiling and running code in 32 or 64 bit mode
@@ -171,13 +120,12 @@
AC_MSG_CHECKING(Compiling 32/64 bit mode)
AC_CACHE_VAL(ac_cv_bit_mode,
[
- AC_TRY_RUN(
+ AC_TRY_COMPILE(
[
main() {
#if defined (__LP64__) || defined (__LP64) || defined (_LP64) || defined (__arch64__)
- exit (0);
#else
- exit (1);
+# error not 64 bit
#endif
}
], ac_cv_bit_mode=64, ac_cv_bit_mode=32)
@@ -237,47 +185,51 @@
if [[ "$SYBASE" = "" ]]; then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to locate Sybase installation. Check your SYBASE environment variable setting.])
+ else
+ AC_MSG_RESULT(yes)
fi
- SYBASE_OCOS=
- for subdir in $SYBASE $SYBASE/OCS $SYBASE/OCS-[[0-9]]*
+ found_sybase=
+ for subdir in "" $SYBASE $SYBASE/OCS $SYBASE/OCS-[[0-9]]*
do
if [[ -d $subdir/include ]]; then
SYBASE_OCOS=$subdir
break
fi
+ AC_CHECK_HEADER([cspublic.h],[
+ SYBASE_OCOS=$subdir
+ found_sybase=1
+ break])
done
- if [[ "$SYBASE_OCOS" = "" ]]; then
+ if [[ "$found_sybase" = "" ]]; then
AC_MSG_RESULT(fail)
AC_MSG_ERROR([Sybase include files not found in \$SYBASE. Check your SYBASE environment variable setting.])
fi
AC_MSG_RESULT($SYBASE_OCOS)
- AC_MSG_CHECKING(Open Client libraries)
+ if test -z "$SYBASE_OCOS"; then
+ SYBASE_OCOS=$SYBASE
+ fi
#
# SYBASE_VERSION=`strings $SYBASE_OCOS/lib/lib*ct*.a 2>/dev/null | \
# cut -c1-80 | fgrep 'Sybase Client-Library' | cut -d '/' -f 2 | uniq`
#
- SYBASE_VERSION=`$SYBASE_OCOS/bin/isql -v 2>/dev/null | cut -c1-80 | $EGREP "[[SAP|Sybase]] CTISQL Utility" | \
- cut -d '/' -f 2 | cut -d . -f 1`
+ if [[ -f $SYBASE_OCOS/bin/isql64 ]]; then
+ SYBASE_VERSION=`$SYBASE_OCOS/bin/isql64 -v 2>/dev/null | cut -c1-80 | $EGREP "[[SAP|Sybase]] CTISQL Utility" | \
+ cut -d '/' -f 2 | cut -d . -f 1`
+ else
+ SYBASE_VERSION=`$SYBASE_OCOS/bin/isql -v 2>/dev/null | cut -c1-80 | $EGREP "[[SAP|Sybase]] CTISQL Utility" | \
+ cut -d '/' -f 2 | cut -d . -f 1`
+ fi
if [[ "$SYBASE_VERSION" = "" ]]; then
#
# Assume this is a FreeTDS build
#
SYBASE_VERSION="FreeTDS"
- if [[ "$ac_cv_bit_mode" = "64" -a -f $SYBASE_OCOS/lib64/libct.so ]]; then
- SYBASE_LIBDIR="$SYBASE_OCOS/lib64"
- else
- SYBASE_LIBDIR="$SYBASE_OCOS/lib"
- fi
- if [[ ! -f $SYBASE_LIBDIR/libct.so ]]; then
- AC_MSG_RESULT(fail)
- AC_MSG_ERROR([No properly installed FreeTDS or Sybase environment found in ${SYBASE_OCOS}.])
- fi
case "${host_os}" in
*cygwin)
SYBASE_LIBS="-lct"
@@ -363,7 +315,7 @@
AC_MSG_CHECKING(Open Client OS libraries)
case "${host_os}" in
linux*)
- SYBASE_OS="-ldl -lm";;
+ ;;
irix*)
SYBASE_OS="-lnsl -lm";;
ncr*)
@@ -390,8 +342,8 @@
AC_MSG_RESULT($SYBASE_OS)
- SYBASE_INCDIR="-I${SYBASE_OCOS}/include"
- SYBASE_LIBDIR="-L${SYBASE_LIBDIR}"
+ SYBASE_INCDIR=""
+ SYBASE_LIBDIR=""
AC_SUBST(CPPFLAGS)
AC_SUBST(SYBASE)
--- sqsh-2.5.16.1.orig/autoconf/config.guess
+++ sqsh-2.5.16.1/autoconf/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2014 Free Software Foundation, Inc.
+# Copyright 1992-2015 Free Software Foundation, Inc.
-timestamp='2014-03-13'
+timestamp='2015-07-03'
# 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
@@ -24,12 +24,12 @@
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# 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
#
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to .
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2015 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,20 +168,27 @@
# 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.
case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
@@ -197,6 +204,13 @@
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 +221,13 @@
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.//'`
@@ -579,8 +593,9 @@
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
@@ -932,6 +947,9 @@
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 ;;
@@ -969,10 +987,10 @@
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
exit ;;
- or32:Linux:*:*)
+ or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
@@ -1020,7 +1038,7 @@
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}
--- sqsh-2.5.16.1.orig/autoconf/config.sub
+++ sqsh-2.5.16.1/autoconf/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2014 Free Software Foundation, Inc.
+# Copyright 1992-2015 Free Software Foundation, Inc.
-timestamp='2014-01-01'
+timestamp='2015-07-07'
# 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
@@ -25,7 +25,7 @@
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to .
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -68,7 +68,7 @@
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2015 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,7 +117,7 @@
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* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -259,8 +259,8 @@
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
@@ -283,8 +283,10 @@
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
@@ -296,11 +298,11 @@
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or1k | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| 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 \
@@ -311,6 +313,7 @@
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -325,6 +328,9 @@
c6x)
basic_machine=tic6x-unknown
;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
@@ -375,7 +381,7 @@
| 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-* \
@@ -402,8 +408,10 @@
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
@@ -415,6 +423,7 @@
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
@@ -424,7 +433,7 @@
| 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*-* \
@@ -432,6 +441,7 @@
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -508,6 +518,9 @@
basic_machine=i386-pc
os=-aros
;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -769,6 +782,9 @@
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
@@ -824,6 +840,10 @@
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -1356,7 +1376,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -cloudabi* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1369,14 +1389,14 @@
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1594,9 +1614,6 @@
mips*-*)
os=-elf
;;
- or1k-*)
- os=-elf
- ;;
or32-*)
os=-coff
;;
--- sqsh-2.5.16.1.orig/conf.sh
+++ sqsh-2.5.16.1/conf.sh
@@ -16,12 +16,12 @@
# Note that it is not needed anymore in sqsh-2.5 to explicitly set the -DSYB_LP64
# precompiler flag for 64 bit compilations. "configure" will set this flag for
# 64 bit compilations automatically in the src/Makefile.
-export CC="gcc"
-export CPPFLAGS=""
+#export CC="gcc"
+#export CPPFLAGS=""
# export CPPFLAGS="-DSYB_LP64"
-export CFLAGS="-g -O2 -Wall -m64"
-export LDFLAGS="-s -m64"
-./configure
+#export CFLAGS="-g -O2 -Wall -m64"
+#export LDFLAGS="-s -m64"
+#./configure
#
# Below are some additional examples
@@ -50,11 +50,11 @@
#
# An example with some paranoia compiler settings
#
-# CC="gcc" \
-# CFLAGS="-g -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fomit-frame-pointer \
-# -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 \
-# -mtune=generic -fasynchronous-unwind-tables" \
-# LDFLAGS="-s -m64" \
-# ./configure --prefix=/usr/local --sysconfdir=/usr/local/etc --with-readline \
-# --with-debug --without-devlib --without-static --with-gcc --with-x --with-motif
-#
+CC="gcc" \
+CFLAGS="-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fomit-frame-pointer \
+-fexceptions -fstack-protector --param=ssp-buffer-size=4 \
+-mtune=generic -fasynchronous-unwind-tables" \
+LDFLAGS="" \
+./configure --prefix=/usr/local --sysconfdir=/usr/local/etc --with-readline \
+ --with-debug --without-devlib --without-static --with-gcc --with-x --with-motif
+
--- sqsh-2.5.16.1.orig/configure
+++ sqsh-2.5.16.1/configure
@@ -697,6 +697,7 @@
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -776,6 +777,7 @@
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1028,6 +1030,15 @@
| -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=* \
@@ -1165,7 +1176,7 @@
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.
@@ -1318,6 +1329,7 @@
--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]
@@ -3902,18 +3914,30 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "Unable to locate Sybase installation. Check your SYBASE environment variable setting." "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
- SYBASE_OCOS=
- for subdir in $SYBASE $SYBASE/OCS $SYBASE/OCS-[0-9]*
+ found_sybase=
+ for subdir in "" $SYBASE $SYBASE/OCS $SYBASE/OCS-[0-9]*
do
if [ -d $subdir/include ]; then
SYBASE_OCOS=$subdir
break
fi
+ ac_fn_c_check_header_mongrel "$LINENO" "cspublic.h" "ac_cv_header_cspublic_h" "$ac_includes_default"
+if test "x$ac_cv_header_cspublic_h" = xyes; then :
+
+ SYBASE_OCOS=$subdir
+ found_sybase=1
+ break
+fi
+
+
done
- if [ "$SYBASE_OCOS" = "" ]; then
+ if [ "$found_sybase" = "" ]; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: fail" >&5
$as_echo "fail" >&6; }
as_fn_error $? "Sybase include files not found in \$SYBASE. Check your SYBASE environment variable setting." "$LINENO" 5
@@ -3922,31 +3946,27 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYBASE_OCOS" >&5
$as_echo "$SYBASE_OCOS" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Open Client libraries" >&5
-$as_echo_n "checking Open Client libraries... " >&6; }
+ if test -z "$SYBASE_OCOS"; then
+ SYBASE_OCOS=$SYBASE
+ fi
#
# SYBASE_VERSION=`strings $SYBASE_OCOS/lib/lib*ct*.a 2>/dev/null | \
# cut -c1-80 | fgrep 'Sybase Client-Library' | cut -d '/' -f 2 | uniq`
#
- SYBASE_VERSION=`$SYBASE_OCOS/bin/isql -v 2>/dev/null | cut -c1-80 | $EGREP "[SAP|Sybase] CTISQL Utility" | \
- cut -d '/' -f 2 | cut -d . -f 1`
+ if [ -f $SYBASE_OCOS/bin/isql64 ]; then
+ SYBASE_VERSION=`$SYBASE_OCOS/bin/isql64 -v 2>/dev/null | cut -c1-80 | $EGREP "[SAP|Sybase] CTISQL Utility" | \
+ cut -d '/' -f 2 | cut -d . -f 1`
+ else
+ SYBASE_VERSION=`$SYBASE_OCOS/bin/isql -v 2>/dev/null | cut -c1-80 | $EGREP "[SAP|Sybase] CTISQL Utility" | \
+ cut -d '/' -f 2 | cut -d . -f 1`
+ fi
if [ "$SYBASE_VERSION" = "" ]; then
#
# Assume this is a FreeTDS build
#
SYBASE_VERSION="FreeTDS"
- if [ "$ac_cv_bit_mode" = "64" -a -f $SYBASE_OCOS/lib64/libct.so ]; then
- SYBASE_LIBDIR="$SYBASE_OCOS/lib64"
- else
- SYBASE_LIBDIR="$SYBASE_OCOS/lib"
- fi
- if [ ! -f $SYBASE_LIBDIR/libct.so ]; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: fail" >&5
-$as_echo "fail" >&6; }
- as_fn_error $? "No properly installed FreeTDS or Sybase environment found in ${SYBASE_OCOS}." "$LINENO" 5
- fi
case "${host_os}" in
*cygwin)
SYBASE_LIBS="-lct"
@@ -4034,7 +4054,7 @@
$as_echo_n "checking Open Client OS libraries... " >&6; }
case "${host_os}" in
linux*)
- SYBASE_OS="-ldl -lm";;
+ ;;
irix*)
SYBASE_OS="-lnsl -lm";;
ncr*)
@@ -4062,8 +4082,8 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYBASE_OS" >&5
$as_echo "$SYBASE_OS" >&6; }
- SYBASE_INCDIR="-I${SYBASE_OCOS}/include"
- SYBASE_LIBDIR="-L${SYBASE_LIBDIR}"
+ SYBASE_INCDIR=""
+ SYBASE_LIBDIR=""
@@ -4087,214 +4107,48 @@
else
DEF_READLINE="-DUSE_READLINE"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libreadline" >&5
-$as_echo_n "checking for libreadline... " >&6; }
- if ${ac_cv_libreadline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$ac_cv_bit_mode" = "64"; then
- SEARCH_PATH="/lib64:/usr/lib64:/usr/local/lib64:${HOME}/lib64:${HOME}/usr/lib64:/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- else
- SEARCH_PATH="/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- fi
- libdir=""
-
- if test "${LD_LIBRARY_PATH}" != ""; then
- SEARCH_PATH="${LD_LIBRARY_PATH}:${SEARCH_PATH}"
- fi
-
- if test "$LIBDIRS" != ""; then
- SEARCH_PATH="$LIBDIRS:${SEARCH_PATH}"
- fi
-
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for dir in ${SEARCH_PATH}; do
- for lib in ${dir}/libreadline.*; do
- if test -f "${lib}"; then
- libdir=${dir}
- break;
- fi
- done
-
- if test "${libdir}" != ""; then
- break;
- fi
- done
- IFS="$ac_save_ifs"
-
- ac_cv_libreadline="${libdir}"
-
-fi
-
-
- libdir=$ac_cv_libreadline
-
- if test "${libdir}" != ""; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdir" >&5
-$as_echo "$libdir" >&6; }
-
- READLINE_LIBDIR="${libdir}"
- inc_search="`echo ${libdir} | sed -e 's,/[^/]*$,,g'`/include"
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-
- READLINE_LIBDIR=""
- inc_search=""
-
- fi
-
-
- if test "$INCDIRS" != ""; then
- if test "$inc_search" = ""; then
- inc_search=$INCDIRS
- else
- inc_search=$inc_search:$INCDIRS
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline/readline.h" >&5
-$as_echo_n "checking for readline/readline.h... " >&6; }
- ac_cache_var=ac_cv_hdr_`echo readline/readline.h | sed -e 's,[/.],_,g'`
-
- if eval \${$ac_cache_var+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- SEARCH_PATH="/usr/include:/usr/local/include:${HOME}/include:${HOME}/usr/include"
- include_dir=""
-
- if test "$inc_search" != ""; then
- SEARCH_PATH="$inc_search:${SEARCH_PATH}"
- fi
-
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for dir in ${SEARCH_PATH}; do
- if test -f ${dir}/readline/readline.h; then
- include_dir=${dir}
- break;
- fi
- done
- IFS="$ac_save_ifs"
-
- eval ${ac_cache_var}=${include_dir}
-
-fi
-
-
- include_dir=${ac_cache_var}
- include_dir=`eval echo '$'${include_dir}`
-
- if test "${include_dir}" != ""; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $include_dir" >&5
-$as_echo "$include_dir" >&6; }
- READLINE_INCDIR="${include_dir}"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- READLINE_INCDIR=""
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline link" >&5
-$as_echo_n "checking for readline link... " >&6; }
-
- if ${ac_cv_readline_libs+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+$as_echo_n "checking for readline in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_readline+:} false; then :
$as_echo_n "(cached) " >&6
else
-
- readline_libs=""
-
- ORIG_CPPFLAGS="${CPPFLAGS}"
- ORIG_LDFLAGS="${LDFLAGS}"
- ORIG_LIBS="${LIBS}"
-
- if test "${READLINE_INCDIR}" != ""; then
- CPPFLAGS="${CPPFLAGS} -I${READLINE_INCDIR}"
- fi
-
- if test "${READLINE_LIBDIR}" != ""; then
- LDFLAGS="${LDFLAGS} -L${READLINE_LIBDIR}"
- fi
-
- for lib in "-lHcurses" "-lncurses" "-lcurses" "-ltermcap" "-lucb" "-lhistory"
- do
- LIBS="${ORIG_LIBS} -lreadline ${lib}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include
-#include
-#include
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
int
main ()
{
-
- char *c;
- add_history( c );
- readline( c );
-
+return readline ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
-
- readline_libs="${lib}"
-
+ ac_cv_lib_readline_readline=yes
+else
+ ac_cv_lib_readline_readline=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-
- if test "${readline_libs}" != ""; then
- break;
- fi
- done
-
- CPPFLAGS="${ORIG_CPPFLAGS}"
- LDFLAGS="${ORIG_LDFLAGS}"
- LIBS="${ORIG_LIBS}"
-
- ac_cv_readline_libs=${readline_libs}
-
+LIBS=$ac_check_lib_save_LIBS
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
+$as_echo "$ac_cv_lib_readline_readline" >&6; }
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
+ READLINE_LIBS=-lreadline
+ inc_search=/usr/include
+fi
- READLINE_LIBS=${ac_cv_readline_libs}
-
- if test "${READLINE_LIBS}" = ""; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- READLINE_LIBS="-lreadline -lcurses"
- else
- READLINE_LIBS="-lreadline ${READLINE_LIBS}"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${READLINE_LIBS}" >&5
-$as_echo "${READLINE_LIBS}" >&6; }
- fi
-
- if test "$READLINE_INCDIR" = ""; then
- READLINE_INCDIR="-I/usr/local/include"
- else
- if test "$READLINE_INCDIR" = "/usr/include"; then
- READLINE_INCDIR="# -I${READLINE_INCDIR}"
- else
- READLINE_INCDIR="-I${READLINE_INCDIR}"
- fi
- fi
-
- if test "$READLINE_LIBDIR" = ""; then
- READLINE_LIBDIR="-L/usr/local/lib"
- else
- if test "$READLINE_LIBDIR" = "/usr/lib" -o ${READLINE_LIBDIR} = "/lib"; then
- READLINE_LIBDIR=""
- else
- READLINE_LIBDIR="-L${READLINE_LIBDIR}"
- fi
- fi
if [ "$with_old_readline" = "yes" ]; then
DEF_READLINE="${DEF_READLINE} -DOLD_READLINE"
@@ -4309,7 +4163,7 @@
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline ${READLINE_LIBDIR} ${READLINE_LIBS} $LIBS"
+LIBS="-lreadline $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4660,7 +4514,10 @@
# but hopefuly it'll work for most systems; besides the linker
# should clean things up for us.
- X_LIBS="${X_WIDGETLIB} -lXt -lXext -lXmu ${X_PRE_LIBS} -lX11 ${X_EXTRA_LIBS}"
+ # Yeah, let's not link against X libs we're not using, thanks.
+ # there's no guarantee they're even available at build-time! -srl 20110903
+
+ X_LIBS="${X_WIDGETLIB} -lXt ${X_PRE_LIBS} ${X_EXTRA_LIBS}"
else
DEF_X11="# ${DEF_X11}"
X_LIBS="# -lXaw -lXt -lXext -lXmu -lX11"
@@ -4828,7 +4685,7 @@
fi
-for ac_header in stropts.h memory.h stdlib.h time.h sys/time.h sys/types.h string.h strings.h fcntl.h unistd.h errno.h limits.h sys/param.h crypt.h shadow.h locale.h
+for ac_header in stropts.h memory.h stdlib.h time.h sys/time.h sys/types.h string.h strings.h fcntl.h unistd.h errno.h limits.h sys/param.h crypt.h shadow.h locale.h readline/history.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -4842,170 +4699,128 @@
done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcrypt" >&5
-$as_echo_n "checking for libcrypt... " >&6; }
- if ${ac_cv_libcrypt+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for encrypt in -lcrypt" >&5
+$as_echo_n "checking for encrypt in -lcrypt... " >&6; }
+if ${ac_cv_lib_crypt_encrypt+:} false; then :
$as_echo_n "(cached) " >&6
else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- if test "$ac_cv_bit_mode" = "64"; then
- SEARCH_PATH="/lib64:/usr/lib64:/usr/local/lib64:${HOME}/lib64:${HOME}/usr/lib64:/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- else
- SEARCH_PATH="/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- fi
- libdir=""
-
- if test "${LD_LIBRARY_PATH}" != ""; then
- SEARCH_PATH="${LD_LIBRARY_PATH}:${SEARCH_PATH}"
- fi
-
- if test "$LIBDIRS" != ""; then
- SEARCH_PATH="$LIBDIRS:${SEARCH_PATH}"
- fi
-
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for dir in ${SEARCH_PATH}; do
- for lib in ${dir}/libcrypt.*; do
- if test -f "${lib}"; then
- libdir=${dir}
- break;
- fi
- done
-
- if test "${libdir}" != ""; then
- break;
- fi
- done
- IFS="$ac_save_ifs"
-
- ac_cv_libcrypt="${libdir}"
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char encrypt ();
+int
+main ()
+{
+return encrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_crypt_encrypt=yes
+else
+ ac_cv_lib_crypt_encrypt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_encrypt" >&5
+$as_echo "$ac_cv_lib_crypt_encrypt" >&6; }
+if test "x$ac_cv_lib_crypt_encrypt" = xyes; then :
+ LIBS="${LIBS} -lcrypt"
fi
-
-
- libdir=$ac_cv_libcrypt
-
- if test "${libdir}" != ""; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdir" >&5
-$as_echo "$libdir" >&6; }
- LIBS="${LIBS} -lcrypt"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-
- fi
if test "$with_static" = "yes"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpthread" >&5
-$as_echo_n "checking for libpthread... " >&6; }
- if ${ac_cv_libpthread+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- if test "$ac_cv_bit_mode" = "64"; then
- SEARCH_PATH="/lib64:/usr/lib64:/usr/local/lib64:${HOME}/lib64:${HOME}/usr/lib64:/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- else
- SEARCH_PATH="/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- fi
- libdir=""
-
- if test "${LD_LIBRARY_PATH}" != ""; then
- SEARCH_PATH="${LD_LIBRARY_PATH}:${SEARCH_PATH}"
- fi
-
- if test "$LIBDIRS" != ""; then
- SEARCH_PATH="$LIBDIRS:${SEARCH_PATH}"
- fi
-
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for dir in ${SEARCH_PATH}; do
- for lib in ${dir}/libpthread.*; do
- if test -f "${lib}"; then
- libdir=${dir}
- break;
- fi
- done
-
- if test "${libdir}" != ""; then
- break;
- fi
- done
- IFS="$ac_save_ifs"
-
- ac_cv_libpthread="${libdir}"
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pthread_pthread_create=yes
+else
+ ac_cv_lib_pthread_pthread_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
+ LIBS="${LIBS} -lpthread"
fi
-
-
- libdir=$ac_cv_libpthread
-
- if test "${libdir}" != ""; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdir" >&5
-$as_echo "$libdir" >&6; }
- LIBS="${LIBS} -lpthread"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-
- fi
fi
if test "$SYBASE_VERSION" = "FreeTDS"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv" >&5
-$as_echo_n "checking for libiconv... " >&6; }
- if ${ac_cv_libiconv+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
+$as_echo_n "checking for iconv in -liconv... " >&6; }
+if ${ac_cv_lib_iconv_iconv+:} false; then :
$as_echo_n "(cached) " >&6
else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- if test "$ac_cv_bit_mode" = "64"; then
- SEARCH_PATH="/lib64:/usr/lib64:/usr/local/lib64:${HOME}/lib64:${HOME}/usr/lib64:/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- else
- SEARCH_PATH="/lib:/usr/lib:/usr/local/lib:${HOME}/lib:${HOME}/usr/lib"
- fi
- libdir=""
-
- if test "${LD_LIBRARY_PATH}" != ""; then
- SEARCH_PATH="${LD_LIBRARY_PATH}:${SEARCH_PATH}"
- fi
-
- if test "$LIBDIRS" != ""; then
- SEARCH_PATH="$LIBDIRS:${SEARCH_PATH}"
- fi
-
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for dir in ${SEARCH_PATH}; do
- for lib in ${dir}/libiconv.*; do
- if test -f "${lib}"; then
- libdir=${dir}
- break;
- fi
- done
-
- if test "${libdir}" != ""; then
- break;
- fi
- done
- IFS="$ac_save_ifs"
-
- ac_cv_libiconv="${libdir}"
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char iconv ();
+int
+main ()
+{
+return iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_iconv_iconv=yes
+else
+ ac_cv_lib_iconv_iconv=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
+$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
+if test "x$ac_cv_lib_iconv_iconv" = xyes; then :
+ LIBS="${LIBS} -liconv"
fi
-
-
- libdir=$ac_cv_libiconv
-
- if test "${libdir}" != ""; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdir" >&5
-$as_echo "$libdir" >&6; }
- LIBS="${LIBS} -liconv"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-
- fi
fi
--- sqsh-2.5.16.1.orig/configure.in
+++ sqsh-2.5.16.1/configure.in
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.12 2014/03/17 17:19:43 mwesdorp Exp $
+dnl $Id: configure.in,v 1.13 2015/07/10 11:07:03 mwesdorp Exp $
dnl
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
@@ -136,99 +136,9 @@
else
DEF_READLINE="-DUSE_READLINE"
- AC_FIND_LIB(readline, [$LIBDIRS],
- [
- READLINE_LIBDIR="${libdir}"
- inc_search="`echo ${libdir} | sed -e 's,/[[^/]]*$,,g'`/include"
- ],[
- READLINE_LIBDIR=""
- inc_search=""
- ])
-
- if test "$INCDIRS" != ""; then
- if test "$inc_search" = ""; then
- inc_search=$INCDIRS
- else
- inc_search=$inc_search:$INCDIRS
- fi
- fi
- AC_FIND_HDR([readline/readline.h],[$inc_search],
- [READLINE_INCDIR="${include_dir}"],[READLINE_INCDIR=""])
-
- AC_MSG_CHECKING(for readline link)
-
- AC_CACHE_VAL(ac_cv_readline_libs,
- [
- readline_libs=""
-
- ORIG_CPPFLAGS="${CPPFLAGS}"
- ORIG_LDFLAGS="${LDFLAGS}"
- ORIG_LIBS="${LIBS}"
-
- if test "${READLINE_INCDIR}" != ""; then
- CPPFLAGS="${CPPFLAGS} -I${READLINE_INCDIR}"
- fi
-
- if test "${READLINE_LIBDIR}" != ""; then
- LDFLAGS="${LDFLAGS} -L${READLINE_LIBDIR}"
- fi
-
- for lib in "-lHcurses" "-lncurses" "-lcurses" "-ltermcap" "-lucb" "-lhistory"
- do
- LIBS="${ORIG_LIBS} -lreadline ${lib}"
- AC_TRY_LINK([
-#include
-#include
-#include
- ],[
- char *c;
- add_history( c );
- readline( c );
- ],[
- readline_libs="${lib}"
- ])
-
- if test "${readline_libs}" != ""; then
- break;
- fi
- done
-
- CPPFLAGS="${ORIG_CPPFLAGS}"
- LDFLAGS="${ORIG_LDFLAGS}"
- LIBS="${ORIG_LIBS}"
-
- ac_cv_readline_libs=${readline_libs}
- ])
-
- READLINE_LIBS=${ac_cv_readline_libs}
-
- if test "${READLINE_LIBS}" = ""; then
- AC_MSG_RESULT(not found)
- READLINE_LIBS="-lreadline -lcurses"
- else
- READLINE_LIBS="-lreadline ${READLINE_LIBS}"
- AC_MSG_RESULT(${READLINE_LIBS})
- fi
-
- if test "$READLINE_INCDIR" = ""; then
- READLINE_INCDIR="-I/usr/local/include"
- else
- if test "$READLINE_INCDIR" = "/usr/include"; then
- READLINE_INCDIR="# -I${READLINE_INCDIR}"
- else
- READLINE_INCDIR="-I${READLINE_INCDIR}"
- fi
- fi
-
- if test "$READLINE_LIBDIR" = ""; then
- READLINE_LIBDIR="-L/usr/local/lib"
- else
- if test "$READLINE_LIBDIR" = "/usr/lib" -o ${READLINE_LIBDIR} = "/lib"; then
- READLINE_LIBDIR=""
- else
- READLINE_LIBDIR="-L${READLINE_LIBDIR}"
- fi
- fi
+ AC_CHECK_LIB(readline, [readline], [
+ READLINE_LIBS=-lreadline
+ inc_search=/usr/include])
if [[ "$with_old_readline" = "yes" ]]; then
DEF_READLINE="${DEF_READLINE} -DOLD_READLINE"
@@ -238,8 +148,7 @@
LDFLAGS="${LDFLAGS} -L${READLINE_LIBDIR}"
fi
AC_CHECK_LIB(readline,
- rl_completion_matches,:,DEF_READLINE="${DEF_READLINE} -DOLD_READLINE",
- ${READLINE_LIBDIR} ${READLINE_LIBS})
+ rl_completion_matches,:,DEF_READLINE="${DEF_READLINE} -DOLD_READLINE")
LDFLAGS=${ORIG_LDFLAGS}
fi
@@ -327,7 +236,10 @@
# but hopefuly it'll work for most systems; besides the linker
# should clean things up for us.
- X_LIBS="${X_WIDGETLIB} -lXt -lXext -lXmu ${X_PRE_LIBS} -lX11 ${X_EXTRA_LIBS}"
+ # Yeah, let's not link against X libs we're not using, thanks.
+ # there's no guarantee they're even available at build-time! -srl 20110903
+
+ X_LIBS="${X_WIDGETLIB} -lXt ${X_PRE_LIBS} ${X_EXTRA_LIBS}"
else
DEF_X11="# ${DEF_X11}"
X_LIBS="# -lXaw -lXt -lXext -lXmu -lX11"
@@ -347,17 +259,17 @@
dnl
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(stropts.h memory.h stdlib.h time.h sys/time.h sys/types.h string.h strings.h fcntl.h unistd.h errno.h limits.h sys/param.h crypt.h shadow.h locale.h)
+AC_CHECK_HEADERS(stropts.h memory.h stdlib.h time.h sys/time.h sys/types.h string.h strings.h fcntl.h unistd.h errno.h limits.h sys/param.h crypt.h shadow.h locale.h readline/history.h)
dnl
dnl Check for crypt, pthread and iconv libraries
dnl
-AC_FIND_LIB(crypt, [$LIBDIRS], [ LIBS="${LIBS} -lcrypt" ],[ ])
+AC_CHECK_LIB(crypt, [encrypt], [LIBS="${LIBS} -lcrypt"])
if test "$with_static" = "yes"; then
- AC_FIND_LIB(pthread, [$LIBDIRS], [ LIBS="${LIBS} -lpthread" ],[ ])
+ AC_CHECK_LIB(pthread, [pthread_create], [LIBS="${LIBS} -lpthread"])
fi
if test "$SYBASE_VERSION" = "FreeTDS"; then
- AC_FIND_LIB(iconv, [$LIBDIRS], [ LIBS="${LIBS} -liconv" ],[ ])
+ AC_CHECK_LIB(iconv, [iconv], [LIBS="${LIBS} -liconv"])
fi
dnl
--- sqsh-2.5.16.1.orig/debian/changelog
+++ sqsh-2.5.16.1/debian/changelog
@@ -0,0 +1,184 @@
+sqsh (2.5.16.1-2build2) eoan; urgency=medium
+
+ * No-change upload with strops.h and sys/strops.h removed in glibc.
+
+ -- Matthias Klose Thu, 05 Sep 2019 11:12:21 +0000
+
+sqsh (2.5.16.1-2build1) disco; urgency=medium
+
+ * No-change rebuild for readline soname change.
+
+ -- Matthias Klose Mon, 14 Jan 2019 20:04:29 +0000
+
+sqsh (2.5.16.1-2) unstable; urgency=medium
+
+ * Bump debhelper compat to 11.
+ * Drop manual handling of config.sub, long obsolete.
+ * Bump standards-version.
+ * aclocal.m4: use AC_TRY_COMPILE instead of AC_TRY_RUN, for
+ cross-buildability. Thanks to Helmut Grohne for the patch.
+ Closes: #910129.
+
+ -- Steve Langasek Sun, 07 Oct 2018 21:54:29 -0700
+
+sqsh (2.5.16.1-1) unstable; urgency=medium
+
+ * New upstream release. Closes: #717870.
+ - debian/examples: adjust for new config example names.
+ * Update Vcs-* fields. Closes: #780466.
+ * Add watch file.
+ * Fix up further upstream regressions in multiarch library detection.
+ * Cherry-pick compatibility with current FreeTDS from upstream CVS.
+ Closes: #891671.
+ * src/dsp_csv.c: Fix broken invocation of dsp_col() introduced in
+ cherry-pick.
+ * src/Makefile.in: handle building of the requisite sqsh_parse.a library
+ (which should be done using automake + libtool, but, well)
+ * Add build-depends on lemon.
+ * Link against libXt, which is now used directly.
+
+ -- Steve Langasek Tue, 25 Sep 2018 07:09:33 +0000
+
+sqsh (2.1.7-4) unstable; urgency=high
+
+ * src/sqsh_readline.c: update function prototype for compatibility with
+ current readline. Closes: #741753.
+ * src/sqsh_readline.c: fix a latent bug where the wrong function was being
+ passed to readline as the rl_completion_entry_function...
+
+ -- Steve Langasek Mon, 17 Mar 2014 03:01:03 +0000
+
+sqsh (2.1.7-3) unstable; urgency=low
+
+ * Transition from lesstif2-dev to libmotif-dev. Closes: #714666.
+
+ -- Steve Langasek Sat, 02 Nov 2013 08:47:00 -0700
+
+sqsh (2.1.7-2) unstable; urgency=low
+
+ * Explicitly link to libXt instead of relying on lesstif to provide this.
+ Thanks to Graham Inggs for the patch. (LP: #1134233)
+ * Fix up LDFLAGS handling so we get relro hardening.
+
+ -- Steve Langasek Wed, 27 Feb 2013 18:50:59 +0000
+
+sqsh (2.1.7-1) unstable; urgency=low
+
+ * New upstream release. Closes: #645277, LP: #783527.
+ - fixes segfault when specifying password in ~/.sqshrc. Closes: #194065.
+ - fixes hang on SIGPIPE from the pager. Closes: #236374.
+ - update build rules; we can now use DESTDIR instead of prefix.
+ - and we can use dh_auto_build without modification
+ * Bump debhelper compat to 9 for dpkg-buildflags.
+ * Add Vcs-Bzr, Vcs-Browser headers.
+
+ -- Steve Langasek Thu, 10 Nov 2011 01:03:19 +0000
+
+sqsh (2.1-10) unstable; urgency=low
+
+ * configure.in, aclocal.m4: nuke the custom 'AC_FIND_LIB' macro and
+ sybase library filesystem walking from orbit; this does all the wrong
+ things that AC_CHECK_LIB is designed to avoid, and results in us not
+ finding freetds now that it's multiarched. Closes: #639195.
+ * configure.in, aclocal.m4: call 'test' instead of the non-portable '[[',
+ just in case.
+ * aclocal.m4: don't link against extra libraries on Linux that we don't
+ need.
+ * Bump to debhelper 7 and dh.
+ * Bump Standards Version to 3.9.2, no changes needed.
+
+ -- Steve Langasek Sun, 04 Sep 2011 01:04:47 +0000
+
+sqsh (2.1-9) unstable; urgency=low
+
+ * Build-depend on libreadline-dev instead of libreadline5-dev.
+ Closes: #553860.
+ * Build-conflict with tcl-dev, to avoid incorrectly linking against libtcl.
+ This is not the libtcl you're looking for.
+ * Add a Homepage: field.
+ * Bump Standards-Version to 3.8.3, no changes required.
+ * Bump debhelper compat level to 7, adding ${misc:Depends} and dropping a
+ few bits from debian/rules that are now redundant (but no dh conversion
+ yet).
+ * Don't ignore make clean failures.
+ * Build-depend on autotools-dev, and pull in an updated config.sub at
+ build time. Closes: #536834.
+
+ -- Steve Langasek Wed, 20 Jan 2010 03:56:58 -0800
+
+sqsh (2.1-8) unstable; urgency=low
+
+ * Rebuild against lesstif2-dev. Closes: #374238.
+
+ -- Steve Langasek Sun, 18 Jun 2006 12:59:19 -0700
+
+sqsh (2.1-7) unstable; urgency=low
+
+ * Rebuild against freetds 0.63 and libreadline5.
+
+ -- Steve Langasek Mon, 18 Jul 2005 18:11:22 -0700
+
+sqsh (2.1-6) unstable; urgency=low
+
+ * Update the upstream url in debian/copyright
+ * Remove references to libXmu in the configure script, since it's
+ not used at all by the binary (closes: #249554).
+ * Since we're now building with a newer autoconf, drop the --host
+ option again.
+
+ -- Steve Langasek Thu, 20 May 2004 22:10:59 -0500
+
+sqsh (2.1-5) unstable; urgency=low
+
+ * re-add the --host option to configure, since autoconf 2.13 doesn't
+ work quite right without it; also, grab an updated config.sub script
+ just in case. (closes: #184302)
+
+ -- Steve Langasek Thu, 3 Apr 2003 13:39:44 -0600
+
+sqsh (2.1-4) unstable; urgency=low
+
+ * Call setlocale() on program startup, to properly initialize TDS
+ locale settings from the environment.
+ * Rebuild against libct1.
+ * Update rules to comply with current version of policy.
+ * Fix the manpage to point to the correct path for /etc/sqshrc.
+ * Ship some more example sqshrc files.
+
+ -- Steve Langasek Sun, 22 Sep 2002 13:45:57 -0500
+
+sqsh (2.1-3) unstable; urgency=low
+
+ * Rebuild against new freetds lib package name. Adjust build-dep
+ versioning accordingly.
+
+ -- Steve Langasek Fri, 20 Sep 2002 17:37:20 -0500
+
+sqsh (2.1-2) unstable; urgency=low
+
+ * The "I am cas, hear me roar" release; correct style mistake in
+ package description, thanks to mdz. (closes: #125376)
+
+ -- Steve Langasek Tue, 18 Dec 2001 21:39:19 -0600
+
+sqsh (2.1-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Steve Langasek Sun, 25 Nov 2001 22:03:50 -0600
+
+sqsh (1.7-2) unstable; urgency=low
+
+ * Recompile against freetds 0.52 to fix binary compatibility issue
+ (closes: #108591)
+ * Manually specify --build and --host options to configure,
+ eliminating the need for updated config.guess
+
+ -- Steve Langasek Sun, 26 Aug 2001 12:12:14 -0500
+
+sqsh (1.7-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Steve Langasek Wed, 30 May 2001 12:14:10 -0500
+
--- sqsh-2.5.16.1.orig/debian/compat
+++ sqsh-2.5.16.1/debian/compat
@@ -0,0 +1 @@
+11
--- sqsh-2.5.16.1.orig/debian/control
+++ sqsh-2.5.16.1/debian/control
@@ -0,0 +1,21 @@
+Source: sqsh
+Section: utils
+Priority: optional
+Maintainer: Steve Langasek
+Build-Depends: debhelper (>= 11~), freetds-dev (>= 0.63), libmotif-dev, libxt-dev, libreadline-dev, autotools-dev, lemon
+Build-Conflicts: tcl-dev
+Standards-Version: 4.2.1
+Homepage: http://sourceforge.net/projects/sqsh/
+Vcs-Git: https://salsa.debian.org/vorlon/sqsh.git
+Vcs-Browser: https://salsa.debian.org/vorlon/sqsh
+
+Package: sqsh
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: commandline SQL client for MS SQL and Sybase servers
+ sqsh is a flexible commandline utility that uses the freetds libraries
+ to connect to Sybase or Microsoft SQL servers. It is a useful debugging
+ tool for identifying problems with other SQL applications, and it can be
+ used as a productivity tool in its own right: unlike most SQL CLIs, sqsh's
+ interactive shell lets you pipe the output of SQL queries directly to other
+ Unix commands for further processing.
--- sqsh-2.5.16.1.orig/debian/copyright
+++ sqsh-2.5.16.1/debian/copyright
@@ -0,0 +1,13 @@
+This package was debianized by Steve Langasek on
+Wed, 30 May 2001 12:14:10 -0500.
+
+It was downloaded from http://www.sqsh.org/sqsh_download.html
+
+Upstream Author: Scott C. Gray
+
+Copyright:
+
+sqsh is copyright (C) 1995-1999 Scott C. Gray and is licensed under the
+GNU GPL license.
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL.
--- sqsh-2.5.16.1.orig/debian/docs
+++ sqsh-2.5.16.1/debian/docs
@@ -0,0 +1,2 @@
+doc/FAQ
+README
--- sqsh-2.5.16.1.orig/debian/examples
+++ sqsh-2.5.16.1/debian/examples
@@ -0,0 +1,3 @@
+doc/global.sqshrc
+doc/sqshrc-2.5
+debian/tmp/etc/sqshrc
--- sqsh-2.5.16.1.orig/debian/rules
+++ sqsh-2.5.16.1/debian/rules
@@ -0,0 +1,15 @@
+#!/usr/bin/make -f
+
+export DEB_CFLAGS_MAINT_APPEND = -Wall
+
+%:
+ dh $@
+
+override_dh_auto_configure:
+ SYBASE=/usr dh_auto_configure -- --with-readline --with-motif
+
+override_dh_auto_build:
+ dh_auto_build -- LDFLAGS="$$(dpkg-buildflags --get LDFLAGS)"
+
+override_dh_auto_install:
+ dh_auto_install --destdir=debian/tmp
--- sqsh-2.5.16.1.orig/debian/source.lintian-overrides
+++ sqsh-2.5.16.1/debian/source.lintian-overrides
@@ -0,0 +1,3 @@
+# updated at build time, we don't care about the copies in the upstream source
+sqsh source: ancient-autotools-helper-file autoconf/config.guess
+sqsh source: ancient-autotools-helper-file autoconf/config.sub
--- sqsh-2.5.16.1.orig/debian/sqsh.install
+++ sqsh-2.5.16.1/debian/sqsh.install
@@ -0,0 +1 @@
+usr/bin/sqsh
--- sqsh-2.5.16.1.orig/debian/sqsh.manpages
+++ sqsh-2.5.16.1/debian/sqsh.manpages
@@ -0,0 +1 @@
+doc/sqsh.1
--- sqsh-2.5.16.1.orig/debian/watch
+++ sqsh-2.5.16.1/debian/watch
@@ -0,0 +1,5 @@
+version=4
+ # qa.debian.org runs a redirector which allows a simpler form of URL
+ # for SourceForge based projects. The format below will automatically
+ # be rewritten to use the redirector.
+ http://sf.net/sqsh/sqsh-(\d\S+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
--- sqsh-2.5.16.1.orig/doc/sqsh.1
+++ sqsh-2.5.16.1/doc/sqsh.1
@@ -456,7 +456,7 @@
.IX Subsection "Initialization"
Upon startup, sqsh initializes all internal environment variables, commands, and
aliases to their default values, it then looks in the system-wide configuration
-file (usually /usr/local/etc/sqshrc), followed by a local configuration file
+file, /etc/sqshrc, followed by a local configuration file
\&\fB\f(CB$HOME\fB\fR/.sqshrc (this may be overridden via the \s-1SQSHRC\s0 external environment
variable). If this file is found it is executed just like a script would be
using the \fB\-i\fR flag.
@@ -2987,8 +2987,7 @@
.IP "rcfile (path)" 4
.IX Item "rcfile (path)"
Contains a colon (:) delimited list of sqsh resource (sqshrc) files. The default
-setting is /usr/local/etc/sqshrc (unless overridden by the \-\-prefix option when
-sqsh was compiled) followed by \fI\f(CI$HOME\fI/.sqshrc\fR).
+setting is /etc/sqshrc followed by \fI\f(CI$HOME\fI/.sqshrc\fR).
.IP "readline_histignore (string)" 4
.IX Item "readline_histignore (string)"
If readline support has been compiled into \fIsqsh\fR, you can control which
@@ -3205,20 +3204,20 @@
like so:
.PP
.Vb 3
-\& #!/usr/local/bin/sqsh \-i
+\& #!/usr/bin/sqsh \-i
\& sp_who
\& go
.Ve
.PP
Thus, if your \fBsp_who\fR script is executed directly, it will automatically
-launch "\fB/usr/local/bin/sqsh \-i sp_who\fR" for you.
+launch "\fB/usr/bin/sqsh \-i sp_who\fR" for you.
.PP
And, to make things even more flexible, \fIsqsh\fR supports positional parameters,
similar to most shells, of the form \fB${n}\fR which will expand to the \fBn\fRth
argument to your \fIsqsh\fR script. For example:
.PP
.Vb 3
-\& #!/usr/local/bin/sqsh \-i
+\& #!/usr/bin/sqsh \-i
\& sp_who ${1}
\& go
.Ve
--- sqsh-2.5.16.1.orig/doc/sqsh.html
+++ sqsh-2.5.16.1/doc/sqsh.html
@@ -529,7 +529,7 @@
Upon startup, sqsh initializes all internal environment variables, commands, and
aliases to their default values, it then looks in the system-wide configuration
-file (usually /usr/local/etc/sqshrc), followed by a local configuration file
+file, /etc/sqshrc, followed by a local configuration file
$HOME/.sqshrc (this may be overridden via the SQSHRC external environment
variable). If this file is found it is executed just like a script would be
using the -i flag.
@@ -3303,8 +3303,7 @@
Contains a colon (:) delimited list of sqsh resource (sqshrc) files. The default
-setting is /usr/local/etc/sqshrc (unless overridden by the --prefix option when
-sqsh was compiled) followed by $HOME/.sqshrc).
+setting is /etc/sqshrc followed by $HOME/.sqshrc.
readline_histignore (string)
@@ -3566,16 +3565,16 @@
executable sqsh script to run sp_who, you simply need to create a file
like so:
- #!/usr/local/bin/sqsh -i
+ #!/usr/bin/sqsh -i
sp_who
go
Thus, if your sp_who script is executed directly, it will automatically
-launch "/usr/local/bin/sqsh -i sp_who" for you.
+launch "/usr/bin/sqsh -i sp_who" for you.
And, to make things even more flexible, sqsh supports positional parameters,
similar to most shells, of the form ${n} which will expand to the nth
argument to your sqsh script. For example:
- #!/usr/local/bin/sqsh -i
+ #!/usr/bin/sqsh -i
sp_who ${1}
go
will cause the sp_who stored procedure to be executed with an argument of the
--- sqsh-2.5.16.1.orig/src/Makefile.in
+++ sqsh-2.5.16.1/src/Makefile.in
@@ -15,7 +15,6 @@
# these include things that GNU autoconf has a little trouble
# figuring out for itself.
-SYBASE_OCOS = @SYBASE_OCOS@
SYBASE_INCDIR = @SYBASE_INCDIR@
SYBASE_LIBDIR = @SYBASE_LIBDIR@
@@ -44,8 +43,6 @@
# include directories are correct.
#
DEF_READLINE = @DEF_READLINE@
-READLINE_LIBDIR = @READLINE_LIBDIR@
-READLINE_INCDIR = @READLINE_INCDIR@
#
# On most systems, -lreadline and -lcurses is enough to link with
@@ -207,10 +204,10 @@
SRCS = $(OBJS:.o=.c)
HEADERS =
-$(TARGET) : $(OBJS) sqsh_main.o
+$(TARGET) : $(OBJS) sqsh_main.o @SQSH_PARSE_LIB@
$(CC) $(LDFLAGS) $(OBJS) sqsh_main.o $(LIBS) -o $@
-sqsh_test : $(OBJS) sqsh_test.o
+sqsh_test : $(OBJS) sqsh_test.o @SQSH_PARSE_LIB@
$(CC) $(LDFLAGS) $(OBJS) sqsh_test.o $(LIBS) -o $@
sig_test : sqsh_debug.o sqsh_error.o sqsh_sig.c
@@ -226,6 +223,8 @@
distclean : realclean
rm -f Makefile config.h core
+sqsh_parser/sqsh_parser.a:
+ make -C sqsh_parser libsqsh
#
# The following absolutely disgusting list of dependancies was
# automatically generated via 'gcc -MM'
--- sqsh-2.5.16.1.orig/src/cmd_connect.c
+++ sqsh-2.5.16.1/src/cmd_connect.c
@@ -47,6 +47,17 @@
#endif /* !defined(lint) */
/*
+ * sqsh-3.0: Define FreeTDS enumerated values to prevent compile errors
+ * when using different versions of FreeTDS.
+*/
+#define CS_TDS_70 7365
+#define CS_TDS_71 7366
+#define CS_TDS_72 7367
+#define CS_TDS_73 7368
+#define CS_TDS_74 7369
+#define CS_TDS_80 CS_TDS_71
+
+/*
* sqsh-2.1.6 - Structure for Network Security Options
*/
typedef struct _NetSecService {
@@ -116,6 +127,9 @@
static int sg_interrupted;
static void connect_run_sigint ( int, void *);
+/* sqsh-3.0 - Function execute_cmd to run a simple SQL command */
+static CS_RETCODE execute_cmd _ANSI_ARGS((CS_CONNECTION *, CS_CHAR *));
+
/*
* cmd_connect:
*
@@ -187,6 +201,9 @@
char *secure_options;
char *login_timeout;
char *query_timeout;
+ char *clientname;
+ char *clienthostname;
+ char *clientapplname;
CS_INT SybTimeOut;
CS_BOOL NetAuthRequired;
varbuf_t *exp_buf = NULL;
@@ -201,9 +218,7 @@
int ctlib_fd;
#endif
- CS_RETCODE result_type;
CS_LOCALE *locale = NULL;
- CS_COMMAND *cmd;
#if !defined(_WINDOZE_)
CS_INT netio_type;
#endif
@@ -860,6 +875,14 @@
/* Then we use freetds which uses enum instead of defines */
else if (strcmp(tds_version, "7.0") == 0)
version = CS_TDS_70;
+ else if (strcmp(tds_version, "7.1") == 0)
+ version = CS_TDS_71;
+ else if (strcmp(tds_version, "7.2") == 0)
+ version = CS_TDS_72;
+ else if (strcmp(tds_version, "7.3") == 0)
+ version = CS_TDS_73;
+ else if (strcmp(tds_version, "7.4") == 0)
+ version = CS_TDS_74;
else if (strcmp(tds_version, "8.0") == 0)
version = CS_TDS_80;
#endif
@@ -1258,8 +1281,17 @@
case CS_TDS_70:
env_set( g_env, "tds_version", "7.0" );
break;
- case CS_TDS_80:
- env_set( g_env, "tds_version", "8.0" );
+ case CS_TDS_71:
+ env_set( g_env, "tds_version", "7.1" );
+ break;
+ case CS_TDS_72:
+ env_set( g_env, "tds_version", "7.2" );
+ break;
+ case CS_TDS_73:
+ env_set( g_env, "tds_version", "7.3" );
+ break;
+ case CS_TDS_74:
+ env_set( g_env, "tds_version", "7.4" );
break;
#endif
default:
@@ -1280,30 +1312,8 @@
/*-- If autouse has been set, use it --*/
if (autouse != NULL && *autouse != '\0')
{
- if (ct_cmd_alloc( g_connection, &cmd ) != CS_SUCCEED)
- goto connect_succeed;
-
sprintf( sqlbuf, "use %s", autouse );
-
- if (ct_command( cmd, /* Command Structure */
- CS_LANG_CMD, /* Command Type */
- sqlbuf, /* Buffer */
- CS_NULLTERM, /* Buffer Length */
- CS_UNUSED /* Options */
- ) != CS_SUCCEED)
- {
- ct_cmd_drop( cmd );
- goto connect_fail;
- }
-
- if (ct_send( cmd ) != CS_SUCCEED)
- {
- ct_cmd_drop( cmd );
- goto connect_fail;
- }
-
- while (ct_results( cmd, &result_type ) != CS_END_RESULTS);
- ct_cmd_drop( cmd );
+ (void) execute_cmd (g_connection, sqlbuf);
/*
* sqsh-2.4 - Check in batch mode if the -D is correctly set.
@@ -1319,7 +1329,6 @@
}
}
-connect_succeed:
/*
* Now, since the connection was succesfull, we want to change
* any environment variables to accurately reflect the current
@@ -1337,17 +1346,35 @@
if ( check_opt_capability( g_connection ) )
{
CS_BOOL value = (*chained == '1' ? CS_TRUE : CS_FALSE);
- retcode = ct_options( g_connection, CS_SET, CS_OPT_CHAINXACTS,
- &value, CS_UNUSED, NULL);
- if (retcode != CS_SUCCEED)
+ if (ct_options( g_connection, CS_SET, CS_OPT_CHAINXACTS, &value, CS_UNUSED, NULL) != CS_SUCCEED)
{
- fprintf (stderr,
- "\\connect: WARNING: Unable to set transaction mode %s\n",
- (*chained == '1' ? "on" : "off"));
+ fprintf (stderr, "\\connect: WARNING: Unable to set transaction mode %s\n", (*chained == '1' ? "on" : "off"));
}
}
}
+ /*
+ * sqsh-3.0: Set clientapplname, clienthostname and clientname.
+ */
+ env_get( g_env, "clientapplname", &clientapplname );
+ if ( clientapplname != NULL && *clientapplname != '\0' )
+ {
+ sprintf (sqlbuf, "set clientapplname '%s'", clientapplname);
+ (void) execute_cmd (g_connection, sqlbuf);
+ }
+ env_get( g_env, "clienthostname", &clienthostname );
+ if ( clienthostname != NULL && *clienthostname != '\0' )
+ {
+ sprintf (sqlbuf, "set clienthostname '%s'", clienthostname);
+ (void) execute_cmd (g_connection, sqlbuf);
+ }
+ env_get( g_env, "clientname", &clientname );
+ if ( clientname != NULL && *clientname != '\0' )
+ {
+ sprintf (sqlbuf, "set clientname '%s'", clientname);
+ (void) execute_cmd (g_connection, sqlbuf);
+ }
+
return_code = CMD_LEAVEBUF;
goto connect_leave;
@@ -1421,7 +1448,6 @@
return_code = CMD_FAIL;
connect_leave:
-
if ( exp_buf != NULL)
varbuf_destroy( exp_buf );
@@ -1463,9 +1489,9 @@
CS_OPTION_GET, (CS_VOID*)&val
);
if (ret != CS_SUCCEED || val == CS_FALSE)
- return 0;
+ return False;
- return 1;
+ return True;
}
static int wrap_print( outfile, str )
@@ -2181,3 +2207,39 @@
}
#endif
+
+/*
+ * sqsh-3.0 - Function to execute a simple SQL command without any result set processing.
+*/
+static CS_RETCODE execute_cmd (g_connection, sqlbuf)
+ CS_CONNECTION *g_connection;
+ CS_CHAR *sqlbuf;
+{
+ CS_COMMAND *cmd;
+ CS_RETCODE result_type;
+
+ if (ct_cmd_alloc( g_connection, &cmd ) != CS_SUCCEED)
+ return CS_FAIL;
+
+ if (ct_command( cmd, /* Command Structure */
+ CS_LANG_CMD, /* Command Type */
+ sqlbuf, /* Buffer */
+ CS_NULLTERM, /* Buffer Length */
+ CS_UNUSED /* Options */
+ ) != CS_SUCCEED)
+ {
+ ct_cmd_drop( cmd );
+ return CS_FAIL;
+ }
+
+ if (ct_send( cmd ) != CS_SUCCEED)
+ {
+ ct_cmd_drop( cmd );
+ return CS_FAIL;
+ }
+
+ while (ct_results( cmd, &result_type ) != CS_END_RESULTS);
+ ct_cmd_drop( cmd );
+
+ return CS_SUCCEED;
+}
--- sqsh-2.5.16.1.orig/src/config.h.in
+++ sqsh-2.5.16.1/src/config.h.in
@@ -30,6 +30,7 @@
#undef HAVE_CRYPT_H
#undef HAVE_SHADOW_H
#undef HAVE_STROPTS_H
+#undef HAVE_READLINE_HISTORY_H
/*
* If you compiler doesn't fully support the keyword 'const'
--- sqsh-2.5.16.1.orig/src/dsp.h
+++ sqsh-2.5.16.1/src/dsp.h
@@ -83,6 +83,12 @@
*/
CS_INT c_width;
+ /*
+ * sqsh-3.0
+ * Used in dsp_csv.c to skip quotes for integer datatypes.
+ */
+ CS_INT c_is_int_type; /* Datatype belongs to group of integers */
+
} dsp_col_t;
/*
--- sqsh-2.5.16.1.orig/src/dsp_csv.c
+++ sqsh-2.5.16.1/src/dsp_csv.c
@@ -38,7 +38,7 @@
USE(RCS_Id)
#endif /* !defined(lint) */
- static void dsp_col _ANSI_ARGS(( dsp_out_t*, char*, int ));
+ static void dsp_col _ANSI_ARGS(( dsp_out_t*, char*, int, int ));
/*
* dsp_bcp:
@@ -58,7 +58,7 @@
CS_INT ret; /* ct_results return code */
CS_INT nrows; /* Number of rows fetch */
dsp_desc_t *desc; /* Result set description */
- dsp_col_t *col;
+ dsp_col_t *col;
/*
* Start blasting through result sets...
@@ -137,11 +137,12 @@
{
dsp_col( output,
desc->d_cols[i].c_data,
- strlen( desc->d_cols[i].c_data ) );
+ strlen( desc->d_cols[i].c_data ),
+ desc->d_cols[i].c_is_int_type );
}
else
{
- dsp_col( output, "", 0 );
+ dsp_col( output, "", 0, False );
}
if (i < (desc->d_ncols-1))
@@ -180,10 +181,11 @@
* dsp_col():
*
*/
-static void dsp_col( output, col_value, col_width )
+static void dsp_col( output, col_value, col_width, col_int_type )
dsp_out_t *output;
char *col_value;
int col_width;
+ int col_int_type;
{
char *end;
@@ -196,24 +198,21 @@
if (g_dsp_props.p_bcp_trim == True)
{
- for (; end >= col_value && (*end == '\0' || isspace((int)*end));
+ for (; end > col_value && (*end == '\0' || isspace((int)*end));
--end);
}
- /* FIXME
- Check for numeric only fields so that you don't have to quote
- everything... */
- if (end > col_value || (end == col_value && !isspace((int)*end))) {
- dsp_fputc('"', output);
- for (; col_value <= end; ++col_value)
- {
- /* sqsh-2.1.9 - Bug fix 3525302 */
- if (*col_value == '"')
- dsp_fputc('"', output);
- dsp_fputc( *col_value, output );
- }
- dsp_fputc('"', output);
- }
+ if (col_int_type == False)
+ dsp_fputc('"', output);
+ for (; col_value <= end; ++col_value)
+ {
+ /* sqsh-2.1.9 - Bug fix 3525302 */
+ if (col_int_type == False && *col_value == '"')
+ dsp_fputc('"', output);
+ dsp_fputc( *col_value, output );
+ }
+ if (col_int_type == False)
+ dsp_fputc('"', output);
}
return;
--- sqsh-2.5.16.1.orig/src/dsp_desc.c
+++ sqsh-2.5.16.1/src/dsp_desc.c
@@ -32,7 +32,7 @@
/*-- Current Version --*/
#if !defined(lint) && !defined(__LINT__)
-static char RCS_Id[] = "$Id: dsp_desc.c,v 1.13 2013/12/03 09:22:23 mwesdorp Exp $";
+static char RCS_Id[] = "$Id: dsp_desc.c,v 1.14 2015/07/10 11:07:04 mwesdorp Exp $";
USE(RCS_Id)
#endif /* !defined(lint) */
@@ -107,6 +107,29 @@
)
#endif
+/*
+ * sqsh-3.0
+ * Determine if datatype is a integer kind of datatype.
+ */
+#if defined(CS_BIGINT_TYPE) && defined(CS_USMALLINT_TYPE) && defined(CS_UINT_TYPE) && defined(CS_UBIGINT_TYPE)
+#define IS_INT_TYPE(t) ( \
+ ((t) == CS_INT_TYPE) \
+ || ((t) == CS_SMALLINT_TYPE) \
+ || ((t) == CS_TINYINT_TYPE) \
+ || ((t) == CS_BIT_TYPE) \
+ || ((t) == CS_BIGINT_TYPE) \
+ || ((t) == CS_UBIGINT_TYPE) \
+ || ((t) == CS_UINT_TYPE) \
+ || ((t) == CS_USMALLINT_TYPE) \
+ )
+#else
+#define IS_INT_TYPE(t) ( \
+ ((t) == CS_INT_TYPE) \
+ || ((t) == CS_SMALLINT_TYPE) \
+ || ((t) == CS_TINYINT_TYPE) \
+ || ((t) == CS_BIT_TYPE) \
+ )
+#endif
/*
* dsp_desc_bind():
@@ -230,10 +253,11 @@
return NULL;
}
+ d->d_cols[i].c_colid = i + 1;
d->d_cols[i].c_justification= dsp_just( d->d_cols[i].c_format.datatype );
d->d_cols[i].c_maxlength = dsp_dlen( &d->d_cols[i].c_format );
d->d_cols[i].c_processed = False;
- d->d_cols[i].c_colid = i + 1;
+ d->d_cols[i].c_is_int_type = IS_INT_TYPE(d->d_cols[i].c_format.datatype); /* sqsh-3.0 */
d->d_cols[i].c_native = NULL;
d->d_cols[i].c_data = NULL;
--- sqsh-2.5.16.1.orig/src/sqsh_debug.h
+++ sqsh-2.5.16.1/src/sqsh_debug.h
@@ -41,6 +41,7 @@
#define DEBUG_SIG (1<<13) /* Debug signal handlers */
#define DEBUG_HISTORY (1<<14) /* Debug history processing */
#define DEBUG_TDS (1<<15) /* Debug TDS protocol CS communications */
+#define DEBUG_MISC (1<<16) /* Debug Miscellaneous actions*/
#define DEBUG_ALL ~(0) /* Turn on all debugging */
#if defined(DEBUG)
--- sqsh-2.5.16.1.orig/src/sqsh_getopt.c
+++ sqsh-2.5.16.1/src/sqsh_getopt.c
@@ -33,10 +33,11 @@
/*-- Current Version --*/
#if !defined(lint) && !defined(__LINT__)
-static char RCS_Id[] = "$Id: sqsh_getopt.c,v 1.4 2013/02/24 22:21:10 mwesdorp Exp $" ;
+static char RCS_Id[] = "$Id: sqsh_getopt.c,v 1.5 2015/07/10 11:07:04 mwesdorp Exp $" ;
USE(RCS_Id)
#endif /* !defined(lint) */
+
/*
* The following variables don't following my usual naming convention
* for global variables, primarily because I wanted them to look
@@ -52,12 +53,13 @@
/*
* The is_flag() macro is used to test a string to see if it is
- * potentially a flag (that is, it is of the format -[a-zA-Z0-9] or -\250).
+ * potentially a flag (that is, it is of the format -- or -[a-zA-Z0-9] or -\250).
*/
-#define is_flag(s) (*(s) == '-' && (isalnum((int)*((s)+1)) || *((s)+1) == '\250'))
+#define is_flag(s) (*(s) == '-' && (isalnum((int)*((s)+1)) || *((s)+1) == '-' || *((s)+1) == '\250'))
/*-- Prototypes --*/
-static int sqsh_move _ANSI_ARGS(( int, char**, int ));
+static int sqsh_move _ANSI_ARGS(( int, char**, int ));
+static int sqsh_nextopt _ANSI_ARGS(( int, char** )) ;
int sqsh_getopt( argc, argv, opt_flags )
int argc;
@@ -128,7 +130,7 @@
/*
* Now, figure out which options are available for this particular
* flag. Currently there are three supported: A ':' indicates that
- * the flag requires and argument, a ';' indicates that it may have
+ * the flag requires an argument, a ';' indicates that it may have
* an optional argument, and a '-' indicates that we are to ignore
* the current argument. Note that the '-' may be used in combination
* with the other two.
@@ -465,3 +467,65 @@
sg_argv = NULL ;
return True ;
}
+
+/*
+ * sqsh-3.0
+ * Process long options that are specfied as --xxxxx yyyyy
+ * or --xxxxx=yyyyy
+ */
+int sqsh_getopt_long ( argc, argv, option, slt )
+ int argc ;
+ char **argv ;
+ char *option;
+ sqsh_longopt_t slt[];
+{
+ int i;
+ char *ch;
+
+
+ /*
+ * The long option maybe specified as --option=argument
+ */
+ if ( (ch = strchr( option, '=' )) != NULL )
+ *ch = '\0';
+
+ for ( i = 0; slt[i].name != NULL; ++i )
+ {
+ if ( strcasecmp (option, slt[i].name) == 0 )
+ {
+ if ( slt[i].reqarg == 1 )
+ {
+ if (ch != NULL)
+ sqsh_optarg = ch + 1;
+ else
+ if ( sqsh_nextopt ( argc, argv ) == False )
+ return '?';
+ }
+ return slt[i].shortopt;
+ }
+ }
+ return '?';
+}
+
+/*
+ * sqsh-3.0
+ * Set sqsh_optarg to next option in the arglist.
+ * Return False if there are no more options available or if the next option is the
+ * password option -\250.
+*/
+static int sqsh_nextopt ( argc, argv )
+ int argc ;
+ char **argv ;
+{
+
+ if (sqsh_optind < sg_nargs)
+ {
+ if (argv[sqsh_optind][0] == '-' && argv[sqsh_optind][1] == '\250' )
+ return False;
+ sqsh_optarg = argv[sqsh_optind++];
+ }
+ else
+ return False;
+
+ return True ;
+}
--- sqsh-2.5.16.1.orig/src/sqsh_getopt.h
+++ sqsh-2.5.16.1/src/sqsh_getopt.h
@@ -25,10 +25,17 @@
#ifndef sqsh_getopt_h_included
#define sqsh_getopt_h_included
+typedef struct sqsh_longopt_st {
+ char *name;
+ int reqarg;
+ int shortopt;
+} sqsh_longopt_t;
+
/*-- Prototypes --*/
int sqsh_getopt _ANSI_ARGS(( int, char**, char* )) ;
int sqsh_getopt_env _ANSI_ARGS(( char*, char* )) ;
int sqsh_getopt_combined _ANSI_ARGS(( char*, int, char**, char* )) ;
int sqsh_getopt_reset _ANSI_ARGS(( void )) ;
+int sqsh_getopt_long _ANSI_ARGS(( int, char**, char*, sqsh_longopt_t[] )) ;
#endif /* sqsh_getopt_h_included */
--- sqsh-2.5.16.1.orig/src/sqsh_init.c
+++ sqsh-2.5.16.1/src/sqsh_init.c
@@ -73,7 +73,7 @@
* sqsh-2.3 : Initialize locale to the default of C.
*/
#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
- setlocale ( LC_ALL, "C" );
+ setlocale ( LC_ALL, "" );
#endif
/*
--- sqsh-2.5.16.1.orig/src/sqsh_main.c
+++ sqsh-2.5.16.1/src/sqsh_main.c
@@ -48,6 +48,9 @@
/*-- Prototypes --*/
static void print_usage _ANSI_ARGS(( void ));
+#if 0
+static void print_arglist _ANSI_ARGS(( int argc, char *argv[] ));
+#endif
#define SQSH_HIDEPWD
@@ -105,7 +108,7 @@
{ "-L", "var=value", "Set the value of a given variable" },
{ "-m", "style", "Set display mode" },
{ "-n", "{on|off}", "Set chained transaction mode" },
- { "-N", "appname", "Set Application Name (sqsh)" },
+ { "-N", "appname", "Set application name (sqsh-3.0)" },
{ "-o", "filename", "Direct all output to file" },
{ "-p", "", "Display performance stats" },
{ "-P", "[password]", "Sybase password (NULL)" },
@@ -124,6 +127,36 @@
{ "-y", "directory", "Override value of $SYBASE" },
{ "-z", "language", "Alternate display language" },
{ "-Z", "[secmech]", "Network security mechanism" },
+ { "--appname ", "appname", "Set application name" },
+ { "--clientapplname", "clientapplname", "Set client appl name" },
+ { "--clienthostname", "clienthostname", "Set client host name" },
+ { "--clientname ", "clientname", "Set client name" },
+ { "--hostname ", "hostname", "Set hostname" },
+ { "--help ", "", "Show help text only" },
+ { "--version ", "", "Show version only" },
+};
+
+/*
+ * Define values for sqsh long options
+*/
+#define SLO_HELP 1
+#define SLO_VERSION 2
+#define SLO_APPNAME 3
+#define SLO_CANAME 4
+#define SLO_CHNAME 5
+#define SLO_CNAME 6
+#define SLO_HOSTNAME 7
+
+static sqsh_longopt_t sg_longopt[] = {
+/*--- long option --- required parm -- short option */
+ { "help", 0, SLO_HELP },
+ { "version", 0, SLO_VERSION },
+ { "appname", 1, SLO_APPNAME },
+ { "clientapplname", 1, SLO_CANAME },
+ { "clienthostname", 1, SLO_CHNAME },
+ { "clientname", 1, SLO_CNAME },
+ { "hostname", 1, SLO_HOSTNAME },
+ { NULL, 0, 0 },
};
int
@@ -306,11 +339,41 @@
* sqsh-2.1.6 - New parameters added to the list and cases neatly ordered
*/
while ((ch = sqsh_getopt_combined( "SQSH", argc, argv,
- "a:A:bBc;C:d:D:eE:f:G:hH:i:I:J:k:K:l:L:m:n:N:o:pP;Q:r;R:s:S:t;T:U:vV;w:Xy:z:Z;\250:" )) != EOF)
+ "-:a:A:bBc;C:d:D:eE:f:G:hH:i:I:J:k:K:l:L:m:n:N:o:pP;Q:r;R:s:S:t;T:U:vV;w:Xy:z:Z;\250:" )) != EOF)
{
ret = 0;
switch (ch)
{
+ case '-' : /* Process sqsh long options */
+ switch (sqsh_getopt_long (argc, argv, sqsh_optarg, sg_longopt))
+ {
+ case SLO_HELP:
+ print_usage();
+ sqsh_exit(0);
+ break;
+ case SLO_VERSION:
+ printf( "%s\n", g_version );
+ sqsh_exit(0);
+ break;
+ case SLO_APPNAME:
+ ret = env_set( g_env, "appname", sqsh_optarg );
+ break;
+ case SLO_CANAME:
+ ret = env_set( g_env, "clientapplname", sqsh_optarg );
+ break;
+ case SLO_CHNAME:
+ ret = env_set( g_env, "clienthostname", sqsh_optarg );
+ break;
+ case SLO_CNAME:
+ ret = env_set( g_env, "clientname", sqsh_optarg );
+ break;
+ case SLO_HOSTNAME:
+ ret = env_set( g_env, "hostname", sqsh_optarg );
+ break;
+ default :
+ sqsh_set_error( SQSH_E_BADPARAM, "Unkown option --%s or missing argument error", sqsh_optarg ) ;
+ }
+ break;
case 'a' :
ret = env_set( g_env, "thresh_exit", sqsh_optarg );
break;
@@ -544,6 +607,7 @@
}
close(fdin);
close(fdout);
+ DBG(sqsh_debug(DEBUG_MISC,"sqsh_main: : password read from pipe: %s\n", buf));
} else {
fprintf(stderr, "sqsh: Error: Missing pipe file descriptors for password option 250\n");
ret = False;
@@ -565,7 +629,7 @@
*/
if (ret == False)
{
- fprintf( stderr, "sqsh: -%c: %s\n", ch, sqsh_get_errstr() );
+ fprintf( stderr, "sqsh: Option -%c: %s\n", ch, sqsh_get_errstr() );
sqsh_exit( 255 );
}
}
@@ -1128,3 +1192,21 @@
#endif
+#if 0
+/*
+ * Print arglist for debugging purposes.
+*/
+static void print_arglist ( argc, argv )
+ int argc;
+ char **argv;
+{
+ int i;
+
+ fprintf ( stdout, "Current argument list:\n" );
+ for (i = 0; i < argc; ++i)
+ fprintf ( stdout, "Argv[%d] = %s\n", i, argv[i] );
+ fprintf ( stdout, "\n" );
+ fflush ( stdout );
+}
+#endif
+
--- sqsh-2.5.16.1.orig/src/sqsh_readline.c
+++ sqsh-2.5.16.1/src/sqsh_readline.c
@@ -49,6 +49,7 @@
#if defined(OLD_READLINE)
#define rl_compentry_func_t Function
+#define rl_completion_func_t CPPFunction
#define rl_completion_matches completion_matches
#endif
@@ -158,7 +159,7 @@
(void) sqsh_readline_load ();
rl_readline_name = "sqsh" ;
- rl_completion_entry_function = (rl_compentry_func_t *) sqsh_completion ;
+ rl_completion_entry_function = (rl_compentry_func_t *) sqsh_generator ;
rl_attempted_completion_function = (rl_completion_func_t *) sqsh_completion ;
/*
--- sqsh-2.5.16.1.orig/src/sqsh_readline.h
+++ sqsh-2.5.16.1/src/sqsh_readline.h
@@ -25,9 +25,15 @@
#ifndef sqsh_readline_h_included
#define sqsh_readline_h_included
+#include "config.h"
+
#if defined(USE_READLINE)
#include
+#if defined(HAVE_READLINE_HISTORY_H)
+ #include
+#endif
+
/*
* Readline history functions - for some reason not all
* readline installs have history.h available, so we do
--- sqsh-2.5.16.1.orig/src/var_debug.c
+++ sqsh-2.5.16.1/src/var_debug.c
@@ -32,7 +32,7 @@
/*-- Current Version --*/
#if !defined(lint) && !defined(__LINT__)
-static char RCS_Id[] = "$Id: var_debug.c,v 1.5 2014/03/12 14:40:42 mwesdorp Exp $" ;
+static char RCS_Id[] = "$Id: var_debug.c,v 1.6 2015/07/10 11:07:04 mwesdorp Exp $" ;
USE(RCS_Id)
#endif /* !defined(lint) */
@@ -58,6 +58,7 @@
{ "HISTORY", DEBUG_HISTORY },
{ "HIST", DEBUG_HISTORY },
{ "JOB", DEBUG_JOB },
+ { "MISC", DEBUG_MISC },
{ "READLINE", DEBUG_READLINE},
{ "RL", DEBUG_READLINE},
{ "RPC", DEBUG_RPC },