diff -Nru vpb-driver-4.2.55/ac-aux/config.guess vpb-driver-4.2.57/ac-aux/config.guess --- vpb-driver-4.2.55/ac-aux/config.guess 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/ac-aux/config.guess 2013-08-10 23:34:02.000000000 +0000 @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2013-06-10' # 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 -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # 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. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright 1992-2013 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." @@ -140,12 +132,33 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -202,6 +215,10 @@ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -304,7 +321,7 @@ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -792,21 +809,26 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -852,15 +874,22 @@ exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -872,56 +901,54 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -940,54 +967,63 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1191,6 +1227,9 @@ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1217,19 +1256,21 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1246,7 +1287,7 @@ NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1315,11 +1356,11 @@ i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -75,9 +68,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright 1992-2013 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." @@ -125,13 +116,17 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -154,7 +149,7 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -223,6 +218,12 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,20 +248,27 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -278,20 +286,21 @@ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | 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 \ | sh64 | sh64le \ @@ -300,7 +309,7 @@ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +324,7 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +337,10 @@ strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,25 +363,30 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -388,19 +404,20 @@ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +425,11 @@ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +729,6 @@ i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -769,11 +786,15 @@ basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -808,10 +829,18 @@ ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -992,7 +1021,11 @@ basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1120,13 +1153,8 @@ basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1324,21 +1352,21 @@ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1470,9 +1498,6 @@ -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1521,6 +1546,12 @@ c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1548,9 +1579,6 @@ ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout @@ -1564,6 +1592,9 @@ mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff -Nru vpb-driver-4.2.55/configure vpb-driver-4.2.57/configure --- vpb-driver-4.2.55/configure 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/configure 2013-08-10 23:34:02.000000000 +0000 @@ -1,19 +1,17 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for vpb-driver 4.2.55. +# Generated by GNU Autoconf 2.69 for vpb-driver 4.2.57. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # -# Copyright (C) 1997 - 2012, Voicetronix +# Copyright (C) 1997 - 2013, Voicetronix ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## @@ -93,6 +91,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -137,6 +136,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -170,7 +194,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -214,14 +239,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -324,6 +360,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -445,6 +489,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -479,16 +527,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -500,28 +548,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -553,8 +581,8 @@ # Identity of this package. PACKAGE_NAME='vpb-driver' PACKAGE_TARNAME='vpb-driver' -PACKAGE_VERSION='4.2.55' -PACKAGE_STRING='vpb-driver 4.2.55' +PACKAGE_VERSION='4.2.57' +PACKAGE_STRING='vpb-driver 4.2.57' PACKAGE_BUGREPORT='support@voicetronix.com.au' PACKAGE_URL='' @@ -1061,7 +1089,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1112,8 +1140,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1199,7 +1225,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures vpb-driver 4.2.55 to adapt to many kinds of systems. +\`configure' configures vpb-driver 4.2.57 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1264,7 +1290,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of vpb-driver 4.2.55:";; + short | recursive ) echo "Configuration of vpb-driver 4.2.57:";; esac cat <<\_ACEOF @@ -1374,14 +1400,14 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -vpb-driver configure 4.2.55 -generated by GNU Autoconf 2.67 +vpb-driver configure 4.2.57 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (C) 1997 - 2012, Voicetronix +Copyright (C) 1997 - 2013, Voicetronix _ACEOF exit fi @@ -1423,7 +1449,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1460,7 +1486,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1498,7 +1524,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1535,7 +1561,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp @@ -1567,7 +1593,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1581,7 +1607,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1589,8 +1615,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by vpb-driver $as_me 4.2.55, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by vpb-driver $as_me 4.2.57, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1848,7 +1874,7 @@ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -1986,7 +2012,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -2002,7 +2028,7 @@ $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2020,7 +2046,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -2035,7 +2061,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2087,7 +2113,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2099,7 +2125,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2127,7 +2153,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2139,7 +2165,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2180,7 +2206,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2192,7 +2218,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2220,7 +2246,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2233,7 +2259,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2279,7 +2305,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2291,7 +2317,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2323,7 +2349,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2335,7 +2361,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2378,7 +2404,7 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2493,7 +2519,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -2536,7 +2562,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -2595,7 +2621,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -2606,7 +2632,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2647,7 +2673,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -2657,7 +2683,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2694,7 +2720,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -2772,7 +2798,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -2781,8 +2807,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -2879,7 +2904,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -2995,7 +3020,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3020,7 +3045,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -3032,7 +3057,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3064,7 +3089,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -3076,7 +3101,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3142,7 +3167,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3179,7 +3204,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -3269,7 +3294,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -3385,7 +3410,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3400,7 +3425,7 @@ set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -3412,7 +3437,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3440,7 +3465,7 @@ set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -3452,7 +3477,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3615,7 +3640,7 @@ { $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 test "${ac_cv_lib_pthread_pthread_create+set}" = set; then : +if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3649,7 +3674,7 @@ 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" = x""yes; then : +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -3664,7 +3689,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 $as_echo_n "checking for gzopen in -lz... " >&6; } -if test "${ac_cv_lib_z_gzopen+set}" = set; then : +if ${ac_cv_lib_z_gzopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3698,7 +3723,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzopen" >&5 $as_echo "$ac_cv_lib_z_gzopen" >&6; } -if test "x$ac_cv_lib_z_gzopen" = x""yes; then : +if test "x$ac_cv_lib_z_gzopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF @@ -3712,7 +3737,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pci_read_block in -lpci" >&5 $as_echo_n "checking for pci_read_block in -lpci... " >&6; } -if test "${ac_cv_lib_pci_pci_read_block+set}" = set; then : +if ${ac_cv_lib_pci_pci_read_block+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3746,7 +3771,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pci_pci_read_block" >&5 $as_echo "$ac_cv_lib_pci_pci_read_block" >&6; } -if test "x$ac_cv_lib_pci_pci_read_block" = x""yes; then : +if test "x$ac_cv_lib_pci_pci_read_block" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPCI 1 _ACEOF @@ -3778,7 +3803,7 @@ # Checks for typedefs, structures, and compiler characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3787,11 +3812,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -3808,8 +3833,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -3825,10 +3851,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -3927,10 +3953,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -3998,7 +4035,7 @@ -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -4099,6 +4136,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4294,16 +4332,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -4363,28 +4401,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -4405,8 +4431,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by vpb-driver $as_me 4.2.55, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by vpb-driver $as_me 4.2.57, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -4458,11 +4484,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -vpb-driver config.status 4.2.55 -configured by $0, generated by GNU Autoconf 2.67, +vpb-driver config.status 4.2.57 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -4539,7 +4565,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -4579,7 +4605,7 @@ "vpb-detect/Makefile") CONFIG_FILES="$CONFIG_FILES vpb-detect/Makefile" ;; "src/utils/VpbConfigurator") CONFIG_FILES="$CONFIG_FILES src/utils/VpbConfigurator" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -4600,9 +4626,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -4610,12 +4637,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -4637,7 +4665,7 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -4665,7 +4693,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -4713,7 +4741,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -4745,7 +4773,7 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -4785,7 +4813,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -4804,7 +4832,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -4813,7 +4841,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -4839,8 +4867,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -4965,21 +4993,22 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; diff -Nru vpb-driver-4.2.55/configure.ac vpb-driver-4.2.57/configure.ac --- vpb-driver-4.2.55/configure.ac 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/configure.ac 2013-08-10 23:34:02.000000000 +0000 @@ -1,7 +1,7 @@ # Configuration script for vpb-driver. -AC_INIT([vpb-driver], [4.2.55], [support@voicetronix.com.au]) -AC_COPYRIGHT([Copyright (C) 1997 - 2012, Voicetronix]) +AC_INIT([vpb-driver], [4.2.57], [support@voicetronix.com.au]) +AC_COPYRIGHT([Copyright (C) 1997 - 2013, Voicetronix]) AC_PREREQ(2.59) AC_CONFIG_SRCDIR([README.VTCore]) diff -Nru vpb-driver-4.2.55/debian/changelog vpb-driver-4.2.57/debian/changelog --- vpb-driver-4.2.55/debian/changelog 2013-12-06 03:43:13.000000000 +0000 +++ vpb-driver-4.2.57/debian/changelog 2013-12-06 03:43:14.000000000 +0000 @@ -1,9 +1,17 @@ -vpb-driver (4.2.55-1ubuntu1) saucy; urgency=low +vpb-driver (4.2.57-1) unstable; urgency=low - * Use the autotools-dev dh addon to update config.guess/config.sub for - arm64. + * Updates for kernel 3.10, Closes: #719136 + Disabling hotplug is not longer an option. + The proc API has changed, create_proc_{,read_}entry no longer exist. + The asm/system.h header has been disintegrated. - -- Colin Watson Wed, 16 Oct 2013 23:01:13 +0100 + -- Ron Lee Sun, 11 Aug 2013 04:58:07 +0930 + +vpb-driver (4.2.56-1) unstable; urgency=low + + * Tweak the OpenPCI ring validation parameters. + + -- Ron Lee Fri, 12 Apr 2013 02:31:20 +0930 vpb-driver (4.2.55-1) unstable; urgency=low diff -Nru vpb-driver-4.2.55/debian/control vpb-driver-4.2.57/debian/control --- vpb-driver-4.2.55/debian/control 2013-12-06 03:43:13.000000000 +0000 +++ vpb-driver-4.2.57/debian/control 2013-12-06 03:43:14.000000000 +0000 @@ -1,11 +1,10 @@ Source: vpb-driver Section: comm Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Ron Lee -Build-Depends: debhelper (>= 5.0.24), po-debconf, bzip2, zlib1g-dev, libpci-dev | pciutils-dev, autotools-dev +Maintainer: Ron Lee +Build-Depends: debhelper (>= 5.0.24), po-debconf, bzip2, zlib1g-dev, libpci-dev | pciutils-dev Build-Depends-Indep: doxygen, graphviz -Standards-Version: 3.9.2.0 +Standards-Version: 3.9.4.0 Package: vpb-driver-source Section: kernel diff -Nru vpb-driver-4.2.55/debian/control.modules.in vpb-driver-4.2.57/debian/control.modules.in --- vpb-driver-4.2.55/debian/control.modules.in 2013-12-06 03:43:13.000000000 +0000 +++ vpb-driver-4.2.57/debian/control.modules.in 2013-12-06 03:43:14.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ron Lee Build-Depends: debhelper (>> 5.0.37) -Standards-Version: 3.8.4.0 +Standards-Version: 3.9.4.0 Package: vpb-driver-modules-_KVERS_ Section: kernel diff -Nru vpb-driver-4.2.55/debian/rules vpb-driver-4.2.57/debian/rules --- vpb-driver-4.2.55/debian/rules 2013-12-06 03:43:13.000000000 +0000 +++ vpb-driver-4.2.57/debian/rules 2013-12-06 03:43:14.000000000 +0000 @@ -91,7 +91,6 @@ $(RM) build-arch-stamp build-indep-stamp $(RM) -r obj_shared obj_static - dh_autotools-dev_restoreconfig dh_clean # We don't need to run this in the module build, there are no templates @@ -105,7 +104,6 @@ obj_shared/config.status: configure dh_testdir - dh_autotools-dev_updateconfig mkdir obj_shared cd obj_shared && ../configure --host=$(DEB_HOST_GNU_TYPE) \ @@ -116,7 +114,6 @@ obj_static/config.status: configure dh_testdir - dh_autotools-dev_updateconfig mkdir obj_static cd obj_static && ../configure --host=$(DEB_HOST_GNU_TYPE) \ diff -Nru vpb-driver-4.2.55/src/libvpb/callmonitor.cpp vpb-driver-4.2.57/src/libvpb/callmonitor.cpp --- vpb-driver-4.2.55/src/libvpb/callmonitor.cpp 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/libvpb/callmonitor.cpp 2013-08-10 23:34:02.000000000 +0000 @@ -151,7 +151,7 @@ pthread_mutex_unlock(&LogThreads[h].mutex); - if( pthread_create( &LogThreads[h].thread, NULL, logging_thread, (void*)h ) ) { + if( pthread_create( &LogThreads[h].thread, NULL, logging_thread, (void*)(intptr_t)h ) ) { LogThreads[h].active = false; throw VpbException("Failed to start logging thread for handle %d", h); } diff -Nru vpb-driver-4.2.55/src/libvpb/hip.cpp vpb-driver-4.2.57/src/libvpb/hip.cpp --- vpb-driver-4.2.55/src/libvpb/hip.cpp 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/libvpb/hip.cpp 2013-08-10 23:34:02.000000000 +0000 @@ -106,7 +106,7 @@ unsigned short length, uint16_t *buf); void EeRead(unsigned short board, unsigned short addr, unsigned short length, uint16_t *buf); - void *GethndFile() {return (void*)hndFile;} + void *GethndFile() {return (void*)(intptr_t)hndFile;} int GetDeviceDriverModel() { return DeviceDriverModel; } }; diff -Nru vpb-driver-4.2.55/src/libvpb/playrec.cpp vpb-driver-4.2.57/src/libvpb/playrec.cpp --- vpb-driver-4.2.55/src/libvpb/playrec.cpp 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/libvpb/playrec.cpp 2013-08-10 23:34:02.000000000 +0000 @@ -755,7 +755,7 @@ PLAY_FILE_ASYNC_ARGS *args = (PLAY_FILE_ASYNC_ARGS*)p; int handle = args->handle; - pthread_cleanup_push(play_file_thread_cleanup, (void*)handle); + pthread_cleanup_push(play_file_thread_cleanup, (void*)(intptr_t)handle); WFILE *wout = args->wout; FILE *vout = args->vout; @@ -858,7 +858,7 @@ // this should only be needed during app shutdown then // we will tolerate it for now. This should not be an // issue in later versions. - pthread_cleanup_push(play_file_thread_cleanup, (void*)handle); + pthread_cleanup_push(play_file_thread_cleanup, (void*)(intptr_t)handle); playloop(handle, bytes, wout, vout, file_type); Play::list[handle].state = VPB_AUDIO_TERMINATE_SYNC; pthread_cleanup_pop(1); @@ -1342,7 +1342,7 @@ RECORD_FILE_ASYNC_ARGS *args = (RECORD_FILE_ASYNC_ARGS*)p; int handle = args->handle; - pthread_cleanup_push(record_file_thread_cleanup, (void*)handle); + pthread_cleanup_push(record_file_thread_cleanup, (void*)(intptr_t)handle); WFILE *win = args->win; FILE *vin = args->vin; @@ -1448,7 +1448,7 @@ // this should only be needed during app shutdown then // we will tolerate it for now. This should not be an // issue in later versions. - pthread_cleanup_push(record_file_sync_cleanup, (void*)handle); + pthread_cleanup_push(record_file_sync_cleanup, (void*)(intptr_t)handle); recordloop(handle, bytes, win, vin, file_type); pthread_cleanup_pop(0); } diff -Nru vpb-driver-4.2.55/src/utils/tonegen.cpp vpb-driver-4.2.57/src/utils/tonegen.cpp --- vpb-driver-4.2.55/src/utils/tonegen.cpp 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/utils/tonegen.cpp 2013-08-10 23:34:02.000000000 +0000 @@ -98,7 +98,7 @@ if( pthread_create(&contest_id, &detached_thread, contest_thread, - (void*)h) ) + (void*)(intptr_t)h) ) { fprintf(stderr, "Failed to create contest thread\n"); @@ -283,7 +283,7 @@ pthread_attr_init(&detached_thread); pthread_attr_setdetachstate(&detached_thread, PTHREAD_CREATE_DETACHED); - if( pthread_create(&worker_id, NULL, worker_thread, (void*)h) ) + if( pthread_create(&worker_id, NULL, worker_thread, (void*)(intptr_t)h) ) { fprintf(stderr, "Failed to create worker thread. Aborting.\n"); return EXIT_FAILURE; diff -Nru vpb-driver-4.2.55/src/utils/vpbecho.cpp vpb-driver-4.2.57/src/utils/vpbecho.cpp --- vpb-driver-4.2.55/src/utils/vpbecho.cpp 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/utils/vpbecho.cpp 2013-08-10 23:34:02.000000000 +0000 @@ -199,7 +199,7 @@ int h = vpb_open(i,j); vpb_record_set(h, record); - pthread_create(&port_threads[x++], NULL, port_thread, (void*)h); + pthread_create(&port_threads[x++], NULL, port_thread, (void*)(intptr_t)h); //int y = arg_exists(argc, argv, "--hookthreshold"); //if( y != 0 && (y+1) < argc) diff -Nru vpb-driver-4.2.55/src/vpb/vpb.c vpb-driver-4.2.57/src/vpb/vpb.c --- vpb-driver-4.2.55/src/vpb/vpb.c 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/vpb/vpb.c 2013-08-10 23:34:02.000000000 +0000 @@ -36,8 +36,8 @@ Voicetronix Voice Processing Board (VPB) Software - Copyright (C) 1999-2007 Voicetronix www.voicetronix.com.au - Copyright (C) 2006 Ron Lee + Copyright (C) 1999-2013 Voicetronix www.voicetronix.com.au + Copyright (C) 2006-2013 Ron Lee This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -117,7 +117,6 @@ #include #include #include -#include #include #include #include diff -Nru vpb-driver-4.2.55/src/vtcore/vtcommon.h vpb-driver-4.2.57/src/vtcore/vtcommon.h --- vpb-driver-4.2.55/src/vtcore/vtcommon.h 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/vtcore/vtcommon.h 2013-08-10 23:34:02.000000000 +0000 @@ -5,7 +5,7 @@ Date: 21 June 2006 - Copyright (C) 2006, 2007 Voicetronix www.voicetronix.com.au + Copyright (C) 2006 - 2013, Voicetronix www.voicetronix.com.au This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -92,14 +92,6 @@ #define mutex_unlock(x) up(x) #endif -// struct proc_dir_entry dropped its owner field in Linus' tree at commit -// 99b76233803beab302123d243eea9e41149804f3. -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) - #define set_proc_owner(p,o) (p)->owner = o; -#else - #define set_proc_owner(p,o) -#endif - /* boolean return values */ #define RET_OK 1 #define RET_FAIL 0 diff -Nru vpb-driver-4.2.55/src/vtcore/vtcore_main.c vpb-driver-4.2.57/src/vtcore/vtcore_main.c --- vpb-driver-4.2.55/src/vtcore/vtcore_main.c 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/vtcore/vtcore_main.c 2013-08-10 23:34:02.000000000 +0000 @@ -5,8 +5,8 @@ Ron Lee, 8 Jun 2006 - Copyright (C) 2005, 2006 Voicetronix www.voicetronix.com.au - Copyright (C) 2006, 2007 Ron Lee + Copyright (C) 2005 - 2013, Voicetronix www.voicetronix.com.au + Copyright (C) 2006 - 2013, Ron Lee This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -124,6 +125,20 @@ #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) +static inline void *PDE_DATA(const struct inode *inode) +{ + return PROC_I(inode)->pde->data; +} +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) +static inline struct inode *file_inode(struct file *f) +{ + return f->f_path.dentry->d_inode; +} +#endif + /* Convenience macros for logging */ #define boardinfo(board,format,...) info("[%d] " format, (board)->boardnum , ## __VA_ARGS__) @@ -199,32 +214,41 @@ } //}}} -int vt_proc_read_int(char *page, char **start, off_t off, - int count, int *eof, void *data) +static int vt_int_proc_show(struct seq_file *m, void *v) { //{{{ - /* We assume off < count here, and that our caller has sanity checked - * this before we get here, if not, expect Bad Things to follow */ - if( off > 0 ) return off; - else { - int len = scnprintf(page, count, "%ld", (long)data); - if( len > 0 ) *eof = 1; - return len; - } -} //}}} + seq_printf(m, "%ld", (long)m->private); + return 0; +} + +static int vt_int_proc_open(struct inode *inode, struct file *file) +{ + return single_open(file, vt_int_proc_show, PDE_DATA(inode)); +} -int vt_proc_read_string(char *page, char **start, off_t off, - int count, int *eof, void *data) +const struct file_operations vt_int_proc_fops = { + .open = vt_int_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; //}}} + +static int vt_string_proc_show(struct seq_file *m, void *v) { //{{{ - /* We assume off < count here, and that our caller has sanity checked - * this before we get here, if not, expect Bad Things to follow */ - int datalen = strlen(data); - if( off >= datalen ) return off; - else { - int len = scnprintf(page + off, count - off, "%s", ((char*)data) + off); - if( len == datalen ) *eof = 1; - return len; - } -} //}}} + seq_puts(m, (const char*)m->private); + return 0; +} + +static int vt_string_proc_open(struct inode *inode, struct file *file) +{ + return single_open(file, vt_string_proc_show, PDE_DATA(inode)); +} + +const struct file_operations vt_string_proc_fops = { + .open = vt_string_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; //}}} int __init vtcore_init(void) @@ -310,15 +334,8 @@ vtcore->procfs_root = proc_mkdir("vt", NULL); if( vtcore->procfs_root ) { - struct proc_dir_entry *p; - - set_proc_owner(vtcore->procfs_root, THIS_MODULE); - p = create_proc_read_entry("maxboards", 0444, - vtcore->procfs_root, - vt_proc_read_int, (void*)MAX_BOARDS); - if (p) { - set_proc_owner(p, THIS_MODULE); - } else + if (!proc_create_data("maxboards", S_IRUGO, vtcore->procfs_root, + &vt_int_proc_fops, (void*)MAX_BOARDS)) crit("failed to create procfs maxboards"); } else crit("failed to create procfs root"); @@ -1002,133 +1019,183 @@ } //}}} -int proc_read_country(char *page, char **start, off_t off, int count, int *eof, void *data) +static int vt_country_proc_show(struct seq_file *m, void *v) { //{{{ struct vtboard *board; + unsigned boardnum = (long)m->private >> 16; + unsigned portnum = (long)m->private & 0xff; mutex_lock(&vtcore_mutex); - board = vtcore->boards[ (long)data >> 16 ]; - if( off > 0 ) goto done; - if( try_module_get( board->owner ) ){ - int len = scnprintf(page, count, "%s", - board->chans[(long)data & 0xff].country); - if( len > 0 ) *eof = 1; - module_put( board->owner ); - mutex_unlock(&vtcore_mutex); - dbgport(4,board,(int)(long)data & 0xff,"proc_read_country '%s'", page); - return len; - } else *eof = 1; + board = vtcore->boards[boardnum]; + + if (try_module_get(board->owner)) { + seq_puts(m, board->chans[portnum].country); + module_put(board->owner); + } - done: mutex_unlock(&vtcore_mutex); - return off; -} //}}} + return 0; +} -int proc_write_country(struct file *file, const char *buffer, unsigned long count, void *data) -{ //{{{ - struct vtboard *board; - char buf[16] = { 0 }; - char *b = buf; - int ret; +static int vt_country_proc_open(struct inode *inode, struct file *file) +{ + return single_open(file, vt_country_proc_show, PDE_DATA(inode)); +} - if( count >= sizeof(buf) ) return -EINVAL; - if( copy_from_user(buf, buffer, count) ) return -EFAULT; +static ssize_t vt_country_proc_write(struct file *file, const char *buffer, + size_t count, loff_t *pos) +{ + struct vtboard *board; + void *data = PDE_DATA(file_inode(file)); + unsigned boardnum = (long)data >> 16; + unsigned portnum = (long)data & 0xff; + char buf[16] = { 0 }; + char *b; + int ret; + + if (count >= sizeof(buf)) + return -EINVAL; + + if (copy_from_user(buf, buffer, count)) + return -EFAULT; + + for (b = buf; *b != '\0'; ++b) { + if (*b == '\n') { + *b = '\0'; + break; + } + } - while( *b != '\0' ) if(*b == '\n'){ *b = '\0'; break; } else ++b; mutex_lock(&vtcore_mutex); - board = vtcore->boards[ (long)data >> 16 ]; - if( try_module_get( board->owner ) ){ - ret = board->set_country(board, (long)data & 0xff, buf); - if( ret == 0 ) ret = count; - module_put( board->owner ); - } else ret = -ENODEV; + board = vtcore->boards[boardnum]; + + if (try_module_get(board->owner)) { + ret = board->set_country(board, portnum, buf); + if (ret == 0) + ret = count; + module_put(board->owner); + } else + ret = -ENODEV; + mutex_unlock(&vtcore_mutex); - dbgport(4,board,(int)(long)data & 0xff,"proc_write_country '%s'", buf); return ret; -} //}}} +} + +static const struct file_operations vt_country_proc_fops = { + .owner = THIS_MODULE, + .open = vt_country_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = vt_country_proc_write, +}; //}}} // Template definitions for port ops that communicate a single integer value. // {{{ -#define PROC_READ_PORT(attrib) \ -int proc_read_##attrib(char *page, char **start, off_t off, int count, \ - int *eof, void *data) \ -{ \ - struct vtboard *board; \ - \ - mutex_lock(&vtcore_mutex); \ - board = vtcore->boards[ (long)data >> 16 ]; \ - if( off > 0 ) goto done; \ - if( try_module_get( board->owner ) ){ \ - int err; \ - int ret = board->get_##attrib(board, (long)data & 0xff, &err);\ - int len = err ? scnprintf(page, count, "ERR: %d", err) \ - : scnprintf(page, count, "%d", ret); \ - if( len > 0 ) *eof = 1; \ - module_put( board->owner ); \ - mutex_unlock(&vtcore_mutex); \ - dbgport(4,board,(int)(long)data & 0xff,"proc_read_"#attrib " '%s'", page);\ - return len; \ - } else *eof = 1; \ - \ - done: \ - mutex_unlock(&vtcore_mutex); \ - return off; \ -} - -#define PROC_WRITE_PORT(attrib) \ -int proc_write_##attrib(struct file *file, const char *buffer, \ - unsigned long count, void *data) \ -{ \ - struct vtboard *board; \ - long val; \ - char buf[8] = { 0 }; \ - char *end; \ - int ret; \ - \ - if( count >= sizeof(buf) ) return -EINVAL; \ - if( copy_from_user(buf, buffer, count) ) return -EFAULT; \ - val = simple_strtol(buf,&end,0); \ - if( buf == end ) return -EINVAL; \ - \ - mutex_lock(&vtcore_mutex); \ - board = vtcore->boards[ (long)data >> 16 ]; \ - if( try_module_get( board->owner ) ){ \ - ret = board->set_##attrib(board, (long)data & 0xff, val); \ - if( ret == 0 ) ret = count; \ - module_put( board->owner ); \ - } else ret = -ENODEV; \ - mutex_unlock(&vtcore_mutex); \ - dbgport(4,board,(int)(long)data & 0xff,"proc_write_"#attrib" '%s'", buf); \ - return ret; \ +#define PROC_READ_PORT_(attrib) \ +static int vt_##attrib##_proc_show(struct seq_file *m, void *v) \ +{ \ + struct vtboard *board; \ + unsigned boardnum = (long)m->private >> 16; \ + unsigned portnum = (long)m->private & 0xff; \ + \ + mutex_lock(&vtcore_mutex); \ + board = vtcore->boards[boardnum]; \ + \ + if (try_module_get(board->owner)) { \ + int err; \ + int ret = board->get_##attrib(board, portnum, &err); \ + if (err) \ + seq_printf(m, "ERR: %d", err); \ + else \ + seq_printf(m, "%d", ret); \ + module_put(board->owner); \ + } \ + mutex_unlock(&vtcore_mutex); \ + return 0; \ +} \ + \ +static int vt_##attrib##_proc_open(struct inode *inode, struct file *file) \ +{ \ + return single_open(file, vt_##attrib##_proc_show, PDE_DATA(inode)); \ +} + +#define PROC_WRITE_PORT_(attrib) \ +static ssize_t vt_##attrib##_proc_write(struct file *file, const char *buffer, \ + size_t count, loff_t *pos) \ +{ \ + struct vtboard *board; \ + void *data = PDE_DATA(file_inode(file)); \ + unsigned boardnum = (long)data >> 16; \ + unsigned portnum = (long)data & 0xff; \ + long val; \ + char buf[8] = { 0 }; \ + char *end; \ + int ret; \ + \ + if (count >= sizeof(buf)) \ + return -EINVAL; \ + \ + if (copy_from_user(buf, buffer, count)) \ + return -EFAULT; \ + \ + val = simple_strtol(buf, &end, 0); \ + if (buf == end) \ + return -EINVAL; \ + \ + mutex_lock(&vtcore_mutex); \ + board = vtcore->boards[boardnum]; \ + \ + if (try_module_get(board->owner)) { \ + ret = board->set_##attrib(board, portnum, val); \ + if (ret == 0) \ + ret = count; \ + module_put(board->owner); \ + } else \ + ret = -ENODEV; \ + \ + mutex_unlock(&vtcore_mutex); \ + return ret; \ } + +#define PROC_READ_PORT(attrib) \ + PROC_READ_PORT_(attrib) \ + \ +static const struct file_operations vt_##attrib##_proc_fops = { \ + .open = vt_##attrib##_proc_open, \ + .read = seq_read, \ + .llseek = seq_lseek, \ + .release = single_release, \ +}; + +#define PROC_READWRITE_PORT(attrib) \ + PROC_READ_PORT_(attrib) \ + PROC_WRITE_PORT_(attrib) \ + \ +static const struct file_operations vt_##attrib##_proc_fops = { \ + .owner = THIS_MODULE, \ + .open = vt_##attrib##_proc_open, \ + .read = seq_read, \ + .llseek = seq_lseek, \ + .release = single_release, \ + .write = vt_##attrib##_proc_write, \ +}; //}}} -PROC_READ_PORT(playgain) -PROC_READ_PORT(recgain) -PROC_READ_PORT(hook) -PROC_READ_PORT(ring) -PROC_READ_PORT(polarity) +PROC_READWRITE_PORT(playgain) +PROC_READWRITE_PORT(recgain) +PROC_READWRITE_PORT(hook) +PROC_READWRITE_PORT(ring) +PROC_READWRITE_PORT(polarity) PROC_READ_PORT(linevolt) -PROC_WRITE_PORT(playgain) -PROC_WRITE_PORT(recgain) -PROC_WRITE_PORT(hook) -PROC_WRITE_PORT(ring) -PROC_WRITE_PORT(polarity) // Create a read only proc entry 'node' for 'board', // returning the constant integer 'val'. -int vt_create_board_proc_const_int(struct vtboard *board, const char *node, long val) +void vt_create_board_proc_const_int(struct vtboard *board, const char *node, long val) { //{{{ - struct proc_dir_entry *p; - - p = create_proc_read_entry(node, 0444, board->procfs_root, - vt_proc_read_int, (void*)val); - if( p ){ - set_proc_owner(p, board->owner); - return RET_OK; - } - crit("failed to create procfs board%d/%s", board->boardnum, node); - return RET_FAIL; + if (!proc_create_data(node, S_IRUGO, board->procfs_root, + &vt_int_proc_fops, (void*)val)) + crit("failed to create procfs board%d/%s", board->boardnum, node); } //}}} @@ -1321,31 +1388,18 @@ snprintf(dirname, sizeof(dirname)-1, "board%d", i); board->procfs_root = proc_mkdir(dirname, vtcore->procfs_root); if( board->procfs_root ) { - struct proc_dir_entry *p; - - set_proc_owner(board->procfs_root, board->owner); + if (!proc_create_data("name", S_IRUGO, board->procfs_root, + &vt_string_proc_fops, (void*)board->name)) + crit("failed to create procfs board%d/name", i); - p = create_proc_read_entry("name", 0444, - board->procfs_root, - vt_proc_read_string, - (void*)board->name); - if (p) { - set_proc_owner(p, board->owner); - } else - crit("failed to create procfs board%d/maxports", i); - - p = create_proc_read_entry("id", 0444, - board->procfs_root, - vt_proc_read_string, - board->serial); - if (p) { - set_proc_owner(p, board->owner); - } else + if (!proc_create_data("id", S_IRUGO, board->procfs_root, + &vt_string_proc_fops, board->serial)) crit("failed to create procfs board%d/id", i); vt_create_board_proc_const_int(board,"maxports", board->maxports); - } else crit("failed to create procfs board%d entry", board->boardnum); + } else + crit("failed to create procfs board%d entry", board->boardnum); } //}}} for(i=0; i < board->maxports; ++i) @@ -1412,54 +1466,40 @@ snprintf(dirname, sizeof(dirname)-1, "port%d", i); chan->procfs_root = proc_mkdir(dirname, board->procfs_root); if( chan->procfs_root ) { - struct proc_dir_entry *p; - int mode = 0; - - set_proc_owner(chan->procfs_root, board->owner); + int mode; - p = create_proc_read_entry("type", 0444, - chan->procfs_root, - vt_proc_read_string, - (void*)porttype(chan->porttype)); - if (p) { - set_proc_owner(p, board->owner); - } else + if (!proc_create_data("type", S_IRUGO, chan->procfs_root, + &vt_string_proc_fops, + (void*)porttype(chan->porttype))) { crit("failed to create board%d/port%d/type", board->boardnum, i); + } - mode = board->set_country ? 0200 : 0; - mode |= chan->country ? 0444 : 0; - if( mode ){ //{{{ - p = create_proc_entry("country", - board->set_country ? 0644 : 0444, - chan->procfs_root); - if (p) { - set_proc_owner(p, board->owner); - p->read_proc = proc_read_country; - p->write_proc = proc_write_country; - p->data = (void*)(((long)board->boardnum << 16) | i); - } else - crit("failed to create board%d/port%d/country", - board->boardnum, i); - } //}}} + if (board->set_country || chan->country) { + if (!proc_create_data("country", + S_IRUGO | (board->set_country ? S_IWUSR : 0), + chan->procfs_root, + &vt_country_proc_fops, + (void*)(((long)board->boardnum << 16) | i))) { + crit("failed to create board%d/port%d/country", + board->boardnum, i); + } + } // Template for a port op passing a single int value. - #define DEFINE_PROC_PORT_OP_(attrib,mode) \ - if( mode ){ \ - p = create_proc_entry(#attrib, mode, \ - chan->procfs_root); \ - if (p) { \ - set_proc_owner(p, board->owner); \ - p->read_proc = proc_read_##attrib; \ - p->write_proc = proc_write_##attrib; \ - p->data = (void*)(((long)board->boardnum << 16) | i); \ - } else crit("failed to create board%d/port%d/"#attrib, \ - board->boardnum, i); \ + #define DEFINE_PROC_PORT_OP_(attrib,mode) \ + if (mode) { \ + if (!proc_create_data(#attrib, mode, chan->procfs_root, \ + &vt_##attrib##_proc_fops, \ + (void*)(((long)board->boardnum << 16) | i))) { \ + crit("failed to create board%d/port%d/"#attrib, \ + board->boardnum, i); \ + } \ } - #define DEFINE_PROC_PORT_OP(attrib) \ - mode = board->set_##attrib ? 0200 : 0; \ - mode |= board->get_##attrib ? 0444 : 0; \ + #define DEFINE_PROC_PORT_OP(attrib) \ + mode = board->set_##attrib ? S_IWUSR : 0; \ + mode |= board->get_##attrib ? S_IRUGO : 0; \ DEFINE_PROC_PORT_OP_(attrib,mode) DEFINE_PROC_PORT_OP(playgain) @@ -1468,23 +1508,14 @@ switch( chan->porttype ){ case VT_FXO_AN: DEFINE_PROC_PORT_OP(hook) - DEFINE_PROC_PORT_OP_(ring,0444) - if( board->get_linevolt ) { - p = create_proc_read_entry("linevolt", 0444, - chan->procfs_root, - proc_read_linevolt, - (void*)(((long)board->boardnum << 16) | i)); - if (p) { - set_proc_owner(p, board->owner); - } else - crit("failed to create board%d/" - "port%d/linevolt", - board->boardnum, i); - } + DEFINE_PROC_PORT_OP_(ring, S_IRUGO) + + if (board->get_linevolt) + DEFINE_PROC_PORT_OP_(linevolt, S_IRUGO) break; case VT_FXS_AN: - DEFINE_PROC_PORT_OP_(hook,0444) + DEFINE_PROC_PORT_OP_(hook, S_IRUGO) DEFINE_PROC_PORT_OP(ring) DEFINE_PROC_PORT_OP(polarity) } @@ -1564,6 +1595,11 @@ if( board->procfs_root ){ char dirname[8] = { 0 }; + // We could just replace all of this (and the above lot) with: + // proc_remove(board->procfs_root); + // but it and remove_proc_subtree didn't appear until v3.9-rc5 + // so stick with what works with older kernels for a bit longer. + snprintf(dirname, sizeof(dirname)-1, "board%d", board->boardnum); remove_proc_entry("name", board->procfs_root); remove_proc_entry("id", board->procfs_root); @@ -1587,14 +1623,8 @@ mutex_lock(&vtcore_mutex); vtcore->echo_can = ec; if( vtcore->procfs_root ) { - struct proc_dir_entry *p = create_proc_read_entry("echo_canceller", - 0444, - vtcore->procfs_root, - vt_proc_read_string, - ec->desc); - if (p) { - set_proc_owner(p, THIS_MODULE); - } else + if (!proc_create_data("echo_canceller", S_IRUGO, vtcore->procfs_root, + &vt_string_proc_fops, ec->desc)) crit("failed to create procfs echo_canceller"); } info("echo canceller [%s] registered",ec->desc); @@ -2185,7 +2215,6 @@ } -/* Export Symbols - functions to be used by other kernel modules */ EXPORT_SYMBOL(vt_board_register); EXPORT_SYMBOL(vt_board_unregister); EXPORT_SYMBOL(vt_echo_register); @@ -2193,8 +2222,8 @@ EXPORT_SYMBOL(vt_write); EXPORT_SYMBOL(vt_read); EXPORT_SYMBOL(vt_send_event); -EXPORT_SYMBOL(vt_proc_read_int); -EXPORT_SYMBOL(vt_proc_read_string); +EXPORT_SYMBOL(vt_int_proc_fops); +EXPORT_SYMBOL(vt_string_proc_fops); EXPORT_SYMBOL(vt_create_board_proc_const_int); module_init(vtcore_init); diff -Nru vpb-driver-4.2.55/src/vtcore/vtecho_fp.c vpb-driver-4.2.57/src/vtcore/vtecho_fp.c --- vpb-driver-4.2.55/src/vtcore/vtecho_fp.c 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/vtcore/vtecho_fp.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,360 +0,0 @@ -/*---------------------------------------------------------------------------*\ - vtecho_fp.c - Echo canceller kernel module using floating point echo canceller - Author: Ben Kramer, 14 February 2006 - Ron Lee, 16 July 2006 - -\*---------------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------------*\ - - Copyright (C) 2005, 2006 Voicetronix www.voicetronix.com.au - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ -\*---------------------------------------------------------------------------*/ - -/* Driver constants */ -#define DRIVER_DESCRIPTION "VoiceTronix floating point echo canceller" -#define DRIVER_AUTHOR "VoiceTronix " - -#define NAME "vtecho_fp" - -#include -#include -#include - -#include "vtcommon.h" -#include "vtmodule.h" -#include "vtecho_fp.h" - - -static struct vtecho reg; - - -/* macros to save/restore FPU, this allows floats to be used in ISR */ -/* ref: http://www.aero.polimi.it/~rtai/documentation/articles/paolo-floatingpoint.html */ - -#define save_cr0_and_clts(x) __asm__ __volatile__ ("movl %%cr0,%0; clts" :"=r" (x)) -#define restore_cr0(x) __asm__ __volatile__ ("movl %0,%%cr0": :"r" (x)); -#define save_fpenv(x) __asm__ __volatile__ ("fnsave %0" : "=m" (x)) -#define restore_fpenv(x) __asm__ __volatile__ ("frstor %0" : "=m" (x)); - -inline double fabs(double x) { return __builtin_fabs(x); } - - -static int proc_read_adaptcount(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ //{{{ - ECHO_SV *sv = data; - int len = 0; - - //len += scnprintf(page + len, count - len, "%ld\n", sv->adapt_count); - len += scnprintf(page + len, count - len, - "adapts[%ld] CUTOFF[%d] okcount[%d]\n", - sv->adapt_count, 130, sv->ok_count); - len += scnprintf(page + len, count - len, - "Ls[%d] < Ly*Minus6DB[%d](Ly[%d]) : Le2[%d] < Le*MINUS3DB[%d] \n", - (int)sv->Ls, (int)(sv->Ly*MINUS6DB), (int)sv->Ly, (int)sv->Le2, - (int)(sv->Le*MINUS3DB)); //Le2 < MINUS3DB*Le - if( len > 0 ) *eof = 1; - return len; -} //}}} - - -void vtecho_fp_open(struct channel *chan) -{ //{{{ - ECHO_SV *sv = kzalloc(sizeof(ECHO_SV), GFP_KERNEL); - int i; - - if( ! sv ){ - crit("FAILED to allocate state memory"); - return; - } - sv->echoy = kmalloc(sizeof(float) * (FRAME + ECHO_TAPS), GFP_KERNEL); - if( ! sv->echoy ){ - crit("FAILED to allocate input buffer"); - kfree(sv); - return; - } - for(i=0; i < ECHO_TAPS; ++i){ - sv->a[i] = 0.0; - sv->a2[i] = 0.0; - sv->a3[i] = 0.0; - sv->echoy[i] = 0.0; - sv->memLy[i] = 0.0; - } - for (; i < ECHO_TAPS + FRAME; ++i){ - sv->echoy[i] = 0.0; - } - - sv->Ly = 130.0; - sv->Le = 130.0; - sv->Le2 = 130.0; - sv->Le3 = 130.0; - sv->Ls = 130.0; - sv->lyi = 0; - sv->hang = 0; - sv->adapt = 1; - sv->sup = 0; - sv->dt = 0; - sv->beta = BETA; - sv->ok_count = 0; - sv->Ey = 1.0; - sv->y_oldest = 0.0; - sv->seed = 1000; - sv->adapt_count = 0; - - if( chan->procfs_root ) { - struct proc_dir_entry *p = create_proc_read_entry("echo_adapt_count", - 0444, - chan->procfs_root, - proc_read_adaptcount, - sv); - if (p) { - set_proc_owner(p, THIS_MODULE); - } else - crit("failed to create procfs echo_adapt_count"); - } - chan->echocan = sv; -} //}}} - -void vtecho_fp_close(struct channel *chan) -{ //{{{ - ECHO_SV *sv = chan->echocan; - - if (sv != NULL){ - if( chan->procfs_root ) { - remove_proc_entry("echo_adapt_count", chan->procfs_root); - } - kfree(sv->echoy); - kfree(sv); - chan->echocan = NULL; - } -} //}}} - - -static inline float float_dotprod_vanilla(float a[], float y[],unsigned int n) -{ //{{{ - float *ap = a, *yp = y, *ep = a + (n<<2); - float inner = 0.0; - for(; ap != ep; ++ap, ++yp) inner += *ap * *yp; - return inner; -} //}}} - -static inline void update_loop(float a[], float x, float y[], int n) -{ //{{{ - float *ap = a, *yp = y, *ep = a + n; - for(; ap != ep; ++ap, ++yp) *ap += x * *yp; -} //}}} - -void vtecho_fp_proc(struct channel *chan, short *output, short *input, - short *reference, int samples) -{ //{{{ - /* - output (e) => is to be transmited out the card - input (y) => is what we are about to use to model the reference signal(s), aka - what we are about to send out the card - reference (s) => is what we have just received from the card, which may have echo in it - samples => the number of linear samples in each array - */ - - // state variables for FPU - unsigned long cr0; - unsigned long linux_fpe[27]; - - ECHO_SV *sv = chan->echocan; - float echo; - int i; - int k; - float *a; - float *a2; - float *a3; - float *echoy; - float *y; - float Ly; - float Le; - float Le2; - float Le3; - float Ls; - int lyi; - int hang; - float Ey; - int adapt; - float beta; - int ok_count; - float y_oldest; - float e2; - float x; - float tmp; - - save_cr0_and_clts(cr0); - save_fpenv(linux_fpe); - - a = sv->a; - a2 = sv->a2; - a3 = sv->a3; - echoy = sv->echoy; - Ly = sv->Ly; - Le = sv->Le; - Le2 = sv->Le2; - Le3 = sv->Le3; - Ls = sv->Ls; - lyi = sv->lyi; - hang = sv->hang; - Ey = sv->Ey; - adapt = sv->adapt; - beta = sv->beta; - ok_count = sv->ok_count; - y_oldest = sv->y_oldest; - - // Copy samples to echoy - for(i=0;i 32767.0) tmp = 32767.0; - if (tmp < -32767.0) tmp = -32767.0; - output[i] = (short)tmp; - //ret = (int)(echo*100); - - echo = 0.0; - // Model echo for adaptive echo model - echo = float_dotprod_vanilla(a2, &y[i-ECHO_TAPS+1], ECHO_TAPS/4); - e2 = (float)reference[i] - echo; - if (e2 >32767.0) e2 = 32767.0; - if (e2 <-32767.0) e2 = -32767.0; - - // update echo pwr short term ests, note these float - // around and are not frozen during doubletalk - - Le2 = (1.0-ALPHA)*Le2 + ALPHA*(fabs(e2)+1); - Le = (1.0-ALPHA)*Le + ALPHA*(fabs(tmp)+1); - - // update energy in filter est - Ey = Ey + (y[i]*y[i]) - y_oldest*y_oldest; - y_oldest = y[i-ECHO_TAPS+1]; - - // update filter if: - // Ls (ref pwr) is at least 3dB less than Ly (input pwr) - // and Ly > certain minimum - - if ((Ls < Ly*MINUS3DB) && (Ly > 130.0) && (adapt)) { - - // if adap error est is at least 3dB better than - // fixed, see if it stays that way for WINDOW - // samples - - #ifndef FORCE_ADAPT - if (Le2 < MINUS3DB*Le) { - #endif - ok_count++; - - // half way thru, take snap shot of adap coeffs - if (ok_count == WINDOW/2) { - for(k=0; kadapt_count++; - } - #ifndef FORCE_ADAPT - } - else { - // didnt make it for the whole window, reset - ok_count = 0; - } - #endif - - // adaption - x = 2*beta*e2/(Ey+1000); - update_loop(a2,x,&y[i-ECHO_TAPS+1],ECHO_TAPS); - } - else { - // window must be continuous - ok_count = 0; - } - } - - // Move history back - for(i=0; i < ECHO_TAPS; ++i){ - echoy[i] = echoy[i+FRAME]; - } - - sv->Ly = Ly; - sv->Ls = Ls; - sv->Le = Le; - sv->Le2 = Le2; - sv->Le3 = Le3; - sv->hang = hang; - sv->lyi = lyi; - sv->ok_count = ok_count; - sv->Ey = Ey; - sv->y_oldest = y_oldest; - - restore_fpenv(linux_fpe); - restore_cr0(cr0); -} //}}} - - -int __init vtechofp_init(void) -{ //{{{ - info(DRIVER_DESCRIPTION " " VT_VERSION " for linux " UTS_RELEASE); - - reg.owner = THIS_MODULE; - strncpy(reg.desc, "Floating Point Echo Canceller", ID_DATA_MAXSIZE); - reg.vtecho_open = vtecho_fp_open; - reg.vtecho_close = vtecho_fp_close; - reg.vtecho_proc = vtecho_fp_proc; - vt_echo_register(®); - - return 0; -} //}}} - -void __exit vtechofp_exit(void) -{ //{{{ - vt_echo_unregister(®); - info("module exit"); -} //}}} - -module_init(vtechofp_init); -module_exit(vtechofp_exit); - -MODULE_DESCRIPTION(DRIVER_DESCRIPTION); -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_VERSION(VT_VERSION); -MODULE_LICENSE("GPL"); - diff -Nru vpb-driver-4.2.55/src/vtcore/vtecho_fp.h vpb-driver-4.2.57/src/vtcore/vtecho_fp.h --- vpb-driver-4.2.55/src/vtcore/vtecho_fp.h 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/vtcore/vtecho_fp.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -/*---------------------------------------------------------------------------*\ - vtecho_fp.h - Echo canceller kernel module using floating point echo canceller - Author: Ben Kramer - Date: 14 February 2006 - -\*---------------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------------*\ - - Copyright (C) 2005 Voicetronix www.voicetronix.com.au - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#ifndef __VTECHO_FP_H__ -#define __VTECHO_FP_H__ - -//#define FORCE_ADAPT -#define ADAPT_RATE 1000 - -#define ECHO_TAPS 128 -//#define ECHO_TAPS 256 -#define ALPHA 0.02 // short term coeff -#define BETA 0.2 // adap const -#define CUTOFF 130.0 // -48dBm0 Ly adaption cutoff -#define HANGT 600 // echo supp hangover 75ms at Fs=8000Hz -//#define THRESHOLD 0.125 // -18dB echo supressor threshold -#define THRESHOLD 0.03125 // -30 echo supressor threshold -//#define WINDOW 2000 // analysis window size for two path model -#define WINDOW (4*ECHO_TAPS) // analysis window size for two path model -#define MINUS3DB 0.71 // -3dB threshold -#define MINUS6DB 0.5 // -6dB threshold - - -typedef struct { - float a[ECHO_TAPS]; // fixed echo model - float a2[ECHO_TAPS]; // adaptive echo model - float a3[ECHO_TAPS]; // snap-shot of a2 mid way thru WINDOW - float *echoy; // input (y) buffer pointer - float Ly; // input (y) short term average - float Le; // fixed output (e) short average - float Le2; // adaptive output (e) short average - float Le3; // snap shot of Le2, when a2 is sampled - float Ls; // ref (y) short term average - float memLy[ECHO_TAPS]; // previous Ly values - int lyi; // index into memLy array - int hang; // hangover counter - int dt; // non-zero when Geigel detects doubletalk - int sup; // non-zero when supressor active - int adapt; // zero to disable adaption - long adapt_count; // number of times it has adapted - float beta; // adaption constant - int ok_count; // number of ok samples so far in WINDOW - float Ey; - float y_oldest; - unsigned long seed; -} ECHO_SV; - -#endif diff -Nru vpb-driver-4.2.55/src/vtcore/vtmodule.h vpb-driver-4.2.57/src/vtcore/vtmodule.h --- vpb-driver-4.2.55/src/vtcore/vtmodule.h 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/vtcore/vtmodule.h 2013-08-10 23:34:02.000000000 +0000 @@ -159,10 +159,8 @@ void vt_read(struct vtboard *board); int vt_send_event(struct vtboard *board, char *mess, int size); -int vt_proc_read_int(char *page, char **start, off_t off, - int count, int *eof, void *data); -int vt_proc_read_string(char *page, char **start, off_t off, - int count, int *eof, void *data); -int vt_create_board_proc_const_int(struct vtboard *board, const char *node, long val); +const struct file_operations vt_int_proc_fops; +const struct file_operations vt_string_proc_fops; +void vt_create_board_proc_const_int(struct vtboard *board, const char *node, long val); #endif diff -Nru vpb-driver-4.2.55/src/vtcore/vtopenpci.c vpb-driver-4.2.57/src/vtcore/vtopenpci.c --- vpb-driver-4.2.55/src/vtcore/vtopenpci.c 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/vtcore/vtopenpci.c 2013-08-10 23:34:02.000000000 +0000 @@ -4,8 +4,8 @@ Author: Ben Kramer, 24 October 2005 Ron Lee, 8 Jun 2006 - Copyright (C) 2005, 2006 Voicetronix www.voicetronix.com.au - Copyright (C) 2006, 2007 Ron Lee + Copyright (C) 2005 - 2013 Voicetronix www.voicetronix.com.au + Copyright (C) 2006 - 2013 Ron Lee This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -262,13 +262,13 @@ return (const char*)ent->driver_data; } -static int __devinit openpci_probe_board(struct pci_dev *pdev, const struct pci_device_id *ent); -static void __devexit openpci_remove_board(struct pci_dev *pdev); +static int openpci_probe_board(struct pci_dev *pdev, const struct pci_device_id *ent); +static void openpci_remove_board(struct pci_dev *pdev); static struct pci_driver vtopenpci_driver = { .name = NAME, .probe = openpci_probe_board, - .remove = __devexit_p(openpci_remove_board), + .remove = openpci_remove_board, .suspend = NULL, .resume = NULL, .id_table = openpci_idtable @@ -277,7 +277,7 @@ //XXX Use me! //static struct workqueue_struct *openpci_workqueue; // = NULL -static int shareirq = 1; +static bool shareirq = 1; static char *country = DEFAULT_COUNTRY; static char *program; // = NULL static int debug; // = 0; @@ -642,6 +642,12 @@ return -EIO; } card->chans[port].country = country_regs[i].country; + + if( ! write_reg_fxo(card, port, VDAR_RVC1, 0x16) ){ + cardcrit(card->cardnum, + "write VDAR_RVC1=0x16 failed on port %d", port); + return -EIO; + } return 0; } //}}} @@ -2201,34 +2207,20 @@ cardinfo(card->cardnum, "failed to get module info"); } //}}} -static int create_module_proc_const_int(struct openpci *card, int module, +static void create_module_proc_const_int(struct openpci *card, int module, const char *node, long val) { //{{{ - struct proc_dir_entry *p; - - p = create_proc_read_entry(node, 0444, card->moduleinfo[module].procfs_root, - vt_proc_read_int, (void*)val); - if (p) { - set_proc_owner(p, THIS_MODULE); - return RET_OK; - } - crit("failed to create procfs module%d/%s", module, node); - return RET_FAIL; + if (!proc_create_data(node, S_IRUGO, card->moduleinfo[module].procfs_root, + &vt_int_proc_fops, (void*)val)) + crit("failed to create procfs module%d/%s", module, node); } //}}} -static int create_module_proc_const_string(struct openpci *card, int module, +static void create_module_proc_const_string(struct openpci *card, int module, const char *node, const char *str) { //{{{ - struct proc_dir_entry *p; - - p = create_proc_read_entry(node, 0444, card->moduleinfo[module].procfs_root, - vt_proc_read_string, (void*)str); - if( p ){ - set_proc_owner(p, THIS_MODULE); - return RET_OK; - } - crit("failed to create procfs module%d/%s", module, node); - return RET_FAIL; + if (!proc_create_data(node, S_IRUGO, card->moduleinfo[module].procfs_root, + &vt_string_proc_fops, (void*)str)) + crit("failed to create procfs module%d/%s", module, node); } //}}} // The card must be registered with vtcore before this function is called. @@ -2252,7 +2244,6 @@ cardcrit(card->cardnum, "failed to create procfs module%d", i); continue; } - set_proc_owner(*modroot, THIS_MODULE); create_module_proc_const_string(card, i, "type", mod->type ); create_module_proc_const_int(card, i, "ports", mod->ports ); @@ -2271,6 +2262,11 @@ char dirname[16] = { 0 }; struct proc_dir_entry *modroot = card->moduleinfo[i].procfs_root; + // We could just replace all of this with a call to: + // proc_remove(modroot); + // but it and remove_proc_subtree didn't appear until v3.9-rc5 + // so stick with what works with older kernels for a bit longer. + snprintf(dirname, sizeof(dirname)-1, "module%d", i); remove_proc_entry("type", modroot); @@ -2321,8 +2317,7 @@ vt_board_unregister(board); } //}}} -static int __devinit openpci_probe_board(struct pci_dev *pdev, - const struct pci_device_id *ent) +static int openpci_probe_board(struct pci_dev *pdev, const struct pci_device_id *ent) { //{{{ struct openpci *card; int cardnum = 0; @@ -2556,7 +2551,7 @@ } } //}}} -static void __devexit openpci_remove_board(struct pci_dev *pdev) +static void openpci_remove_board(struct pci_dev *pdev) { //{{{ struct openpci *card = pci_get_drvdata(pdev); unsigned long flags; diff -Nru vpb-driver-4.2.55/src/vtcore/vtopenswitch.c vpb-driver-4.2.57/src/vtcore/vtopenswitch.c --- vpb-driver-4.2.55/src/vtcore/vtopenswitch.c 2012-05-09 11:57:34.000000000 +0000 +++ vpb-driver-4.2.57/src/vtcore/vtopenswitch.c 2013-08-10 23:34:02.000000000 +0000 @@ -11,8 +11,8 @@ Peter Wintulich, 2003. - Copyright (C) Voicetronix 2005, 2006 support@voicetronix.com.au - Copyright (C) 2006, 2007 Ron Lee + Copyright (C) 2005 - 2013 Voicetronix www.voicetronix.com.au + Copyright (C) 2006 - 2013, Ron Lee This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -273,21 +273,20 @@ }; MODULE_DEVICE_TABLE(pci, openswitch_idtable); -static int __devinit openswitch_probe_board(struct pci_dev *pdev, - const struct pci_device_id *ent); -static void __devexit openswitch_remove_board(struct pci_dev *pdev); +static int openswitch_probe_board(struct pci_dev *pdev, const struct pci_device_id *ent); +static void openswitch_remove_board(struct pci_dev *pdev); static struct pci_driver vtopenswitch_driver = { .name = NAME, .probe = openswitch_probe_board, - .remove = __devexit_p(openswitch_remove_board), + .remove = openswitch_remove_board, .suspend = NULL, .resume = NULL, .id_table = openswitch_idtable }; -static int shareirq = 1; +static bool shareirq = 1; static int debug; module_param(shareirq, bool, 0444); @@ -1582,8 +1581,7 @@ return RET_OK; } //}}} -static int __devinit openswitch_probe_board(struct pci_dev *pdev, - const struct pci_device_id *ent) +static int openswitch_probe_board(struct pci_dev *pdev, const struct pci_device_id *ent) { //{{{ struct openswitch *card; int cardnum = 0; @@ -1858,7 +1856,7 @@ set_audio_off( card, port ); } //}}} -static void __devexit openswitch_remove_board(struct pci_dev *pdev) +static void openswitch_remove_board(struct pci_dev *pdev) { //{{{ struct openswitch *card = pci_get_drvdata(pdev); int i = 0;