Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 89868 Details for
Bug 137680
[ebuilds] librfid - A Free Software RFID stack
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
librfid.patch
librfid.patch (text/plain), 26.57 KB, created by
Bryan Jacobs
on 2006-06-22 19:15:06 UTC
(
hide
)
Description:
librfid.patch
Filename:
MIME Type:
Creator:
Bryan Jacobs
Created:
2006-06-22 19:15:06 UTC
Size:
26.57 KB
patch
obsolete
>diff -urN openct-0.6.8/config.guess openct-0.6.8-patched/config.guess >--- openct-0.6.8/config.guess 2005-10-25 02:14:37.000000000 -0400 >+++ openct-0.6.8-patched/config.guess 2006-06-22 20:47:50.683036760 -0400 >@@ -1,9 +1,10 @@ > #! /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 Free Software Foundation, Inc. >+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, >+# Inc. > >-timestamp='2005-08-03' >+timestamp='2006-02-27' > > # 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 >@@ -106,7 +107,7 @@ > trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; > trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; > : ${TMPDIR=/tmp} ; >- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || >+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || > { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || > { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || > { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; >@@ -138,6 +139,23 @@ > UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown > UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown > >+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then >+ eval $set_cc_for_build >+ cat << EOF > $dummy.c >+ #include <features.h> >+ #ifdef __UCLIBC__ >+ # ifdef __UCLIBC_CONFIG_VERSION__ >+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__ >+ # else >+ LIBC=uclibc >+ # endif >+ #else >+ LIBC=gnu >+ #endif >+EOF >+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` >+fi >+ > # Note: order is significant - the case branches are not exclusive. > > case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in >@@ -206,6 +224,9 @@ > *:ekkoBSD:*:*) > echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} > exit ;; >+ *:SolidBSD:*:*) >+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} >+ exit ;; > macppc:MirBSD:*:*) > echo powerppc-unknown-mirbsd${UNAME_RELEASE} > exit ;; >@@ -764,7 +785,12 @@ > echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} > exit ;; > *:FreeBSD:*:*) >- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` >+ case ${UNAME_MACHINE} in >+ pc98) >+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; >+ *) >+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; >+ esac > exit ;; > i*:CYGWIN*:*) > echo ${UNAME_MACHINE}-pc-cygwin >@@ -772,6 +798,9 @@ > i*:MINGW*:*) > echo ${UNAME_MACHINE}-pc-mingw32 > exit ;; >+ i*:MSYS_NT-*:*:*) >+ echo ${UNAME_MACHINE}-pc-mingw32 >+ exit ;; > i*:windows32*:*) > # uname -m includes "-pc" on this system. > echo ${UNAME_MACHINE}-mingw32 >@@ -779,8 +808,11 @@ > i*:PW*:*) > echo ${UNAME_MACHINE}-pc-pw32 > exit ;; >- x86:Interix*:[34]*) >- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' >+ x86:Interix*:[345]*) >+ echo i586-pc-interix${UNAME_RELEASE} >+ exit ;; >+ EM64T:Interix*:[345]*) >+ echo x86_64-unknown-interix${UNAME_RELEASE} > exit ;; > [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) > echo i${UNAME_MACHINE}-pc-mks >@@ -815,25 +847,25 @@ > echo ${UNAME_MACHINE}-pc-minix > exit ;; > arm*:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > cris:Linux:*:*) >- echo cris-axis-linux-gnu >+ echo cris-axis-linux-${LIBC} > exit ;; > crisv32:Linux:*:*) >- echo crisv32-axis-linux-gnu >+ echo crisv32-axis-linux-${LIBC} > exit ;; > frv:Linux:*:*) >- echo frv-unknown-linux-gnu >+ echo frv-unknown-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:*:*) > eval $set_cc_for_build >@@ -851,8 +883,12 @@ > #endif > #endif > EOF >- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` >- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } >+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' >+ /^CPU/{ >+ s: ::g >+ p >+ }'`" >+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } > ;; > mips64:Linux:*:*) > eval $set_cc_for_build >@@ -870,17 +906,21 @@ > #endif > #endif > EOF >- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` >- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } >+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' >+ /^CPU/{ >+ s: ::g >+ p >+ }'`" >+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } > ;; > or32:Linux:*:*) >- echo or32-unknown-linux-gnu >+ echo or32-unknown-linux-${LIBC} > exit ;; > ppc:Linux:*:*) >- echo powerpc-unknown-linux-gnu >+ echo powerpc-unknown-linux-${LIBC} > exit ;; > ppc64:Linux:*:*) >- echo powerpc64-unknown-linux-gnu >+ echo powerpc64-unknown-linux-${LIBC} > exit ;; > alpha:Linux:*:*) > case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in >@@ -893,34 +933,37 @@ > EV68*) UNAME_MACHINE=alphaev68 ;; > esac > objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null >- 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 ;; > 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 ;; > parisc64:Linux:*:* | hppa64:Linux:*:*) >- echo hppa64-unknown-linux-gnu >+ echo hppa64-unknown-linux-${LIBC} > exit ;; > s390:Linux:*:* | s390x:Linux:*:*) > echo ${UNAME_MACHINE}-ibm-linux > 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 ;; >+ vax:Linux:*:*) >+ echo ${UNAME_MACHINE}-dec-linux-${LIBC} > exit ;; > x86_64:Linux:*:*) >- echo x86_64-unknown-linux-gnu >+ echo x86_64-unknown-linux-${LIBC} > exit ;; > i*86:Linux:*:*) > # The BFD linker knows what the default object file format is, so >@@ -935,20 +978,22 @@ > p'` > case "$ld_supported_targets" in > elf32-i386) >- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" >+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" > ;; > a.out-i386-linux) >- echo "${UNAME_MACHINE}-pc-linux-gnuaout" >+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" > exit ;; > coff-i386) >- echo "${UNAME_MACHINE}-pc-linux-gnucoff" >+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" > exit ;; > "") > # Either a pre-BFD a.out linker (linux-gnuoldld) or > # one that does not give us useful --help. >- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" >+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" > exit ;; > esac >+ # This should get integrated into the C code below, but now we hack >+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi > # Determine whether the default compiler is a.out or elf > eval $set_cc_for_build > sed 's/^ //' << EOF >$dummy.c >@@ -964,7 +1009,7 @@ > LIBC=gnulibc1 > # endif > #else >- #ifdef __INTEL_COMPILER >+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun) > LIBC=gnu > #else > LIBC=gnuaout >@@ -974,7 +1019,11 @@ > LIBC=dietlibc > #endif > EOF >- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` >+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' >+ /^LIBC/{ >+ s: ::g >+ p >+ }'`" > test x"${LIBC}" != x && { > echo "${UNAME_MACHINE}-pc-linux-${LIBC}" > exit >@@ -1185,7 +1234,6 @@ > *:Darwin:*:*) > UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown > case $UNAME_PROCESSOR in >- *86) UNAME_PROCESSOR=i686 ;; > unknown) UNAME_PROCESSOR=powerpc ;; > esac > echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} >@@ -1264,6 +1312,9 @@ > i*86:skyos:*:*) > echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' > exit ;; >+ i*86:rdos:*:*) >+ echo ${UNAME_MACHINE}-pc-rdos >+ exit ;; > esac > > #echo '(No uname command or uname output not recognized.)' 1>&2 >diff -urN openct-0.6.8/config.sub openct-0.6.8-patched/config.sub >--- openct-0.6.8/config.sub 2005-10-25 02:14:37.000000000 -0400 >+++ openct-0.6.8-patched/config.sub 2006-06-22 20:47:50.674038128 -0400 >@@ -1,9 +1,10 @@ > #! /bin/sh > # Configuration validation subroutine script. > # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, >-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. >+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, >+# Inc. > >-timestamp='2005-07-08' >+timestamp='2006-02-27' > > # This file is (in principle) common to ALL GNU software. > # The presence of a machine in this file suggests that SOME GNU software >@@ -119,8 +120,9 @@ > # Here we must recognize all the valid KERNEL-OS combinations. > maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` > case $maybe_os in >- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ >- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) >+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ >+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ >+ storm-chaos* | os2-emx* | rtmk-nova*) > os=-$maybe_os > basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` > ;; >@@ -171,6 +173,10 @@ > -hiux*) > os=-hiuxwe2 > ;; >+ -sco6) >+ os=-sco5v6 >+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` >+ ;; > -sco5) > os=-sco3.2v5 > basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` >@@ -187,6 +193,10 @@ > # Don't forget version if it is 3.2v4 or newer. > basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` > ;; >+ -sco5v6*) >+ # Don't forget version if it is 3.2v4 or newer. >+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` >+ ;; > -sco*) > os=-sco3.2v2 > basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` >@@ -234,12 +244,12 @@ > | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ > | bfin \ > | c4x | clipper \ >- | d10v | d30v | dlx | dsp16xx \ >+ | d10v | d30v | dlx | dsp16xx | dvp \ > | fr30 | frv \ > | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ > | i370 | i860 | i960 | ia64 \ > | ip2k | iq2000 \ >- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ >+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ > | mips | mipsbe | mipseb | mipsel | mipsle \ > | mips16 \ > | mips64 | mips64el \ >@@ -257,17 +267,18 @@ > | mipsisa64sr71k | mipsisa64sr71kel \ > | mipstx39 | mipstx39el \ > | mn10200 | mn10300 \ >- | ms1 \ >+ | mt \ > | msp430 \ >+ | nios | nios2 \ > | ns16k | ns32k \ > | or32 \ > | pdp10 | pdp11 | pj | pjl \ > | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ > | pyramid \ >- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ >+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | sheb | shle | sh[1234]le | sh3ele \ > | sh64 | sh64le \ >- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ >- | sparcv8 | sparcv9 | sparcv9b \ >+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ >+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ > | strongarm \ > | tahoe | thumb | tic4x | tic80 | tron \ > | v850 | v850e \ >@@ -286,6 +297,9 @@ > ;; > m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) > ;; >+ ms1) >+ basic_machine=mt-unknown >+ ;; > > # We use `pc' rather than `unknown' > # because (1) that's what they normally are, and >@@ -336,19 +350,20 @@ > | mipsisa64sr71k-* | mipsisa64sr71kel-* \ > | mipstx39-* | mipstx39el-* \ > | mmix-* \ >- | ms1-* \ >+ | mt-* \ > | msp430-* \ >+ | nios-* | nios2-* \ > | none-* | np1-* | ns16k-* | ns32k-* \ > | orion-* \ > | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ > | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ > | pyramid-* \ > | romp-* | rs6000-* \ >- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ >+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | shbe-* | sheb-* \ > | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ >- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ >+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ > | sparclite-* \ >- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ >+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ > | tahoe-* | thumb-* \ > | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ > | tron-* \ >@@ -678,6 +693,24 @@ > basic_machine=m68k-atari > os=-mint > ;; >+ mipsEE* | ee | ps2) >+ basic_machine=mips64r5900el-scei >+ case $os in >+ -linux*) >+ ;; >+ *) >+ os=-elf >+ ;; >+ esac >+ ;; >+ iop) >+ basic_machine=mipsel-scei >+ os=-irx >+ ;; >+ dvp) >+ basic_machine=dvp-scei >+ os=-elf >+ ;; > mips3*-*) > basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` > ;; >@@ -696,6 +729,9 @@ > basic_machine=i386-pc > os=-msdos > ;; >+ ms1-*) >+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` >+ ;; > mvs) > basic_machine=i370-ibm > os=-mvs >@@ -803,6 +839,12 @@ > pc532 | pc532-*) > basic_machine=ns32k-pc532 > ;; >+ pc98) >+ basic_machine=i386-pc >+ ;; >+ pc98-*) >+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` >+ ;; > pentium | p5 | k5 | k6 | nexgen | viac3) > basic_machine=i586-pc > ;; >@@ -859,6 +901,10 @@ > basic_machine=i586-unknown > os=-pw32 > ;; >+ rdos) >+ basic_machine=i386-pc >+ os=-rdos >+ ;; > rom68k) > basic_machine=m68k-rom68k > os=-coff >@@ -1101,7 +1147,7 @@ > sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) > basic_machine=sh-unknown > ;; >- sparc | sparcv8 | sparcv9 | sparcv9b) >+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) > basic_machine=sparc-sun > ;; > cydra) >@@ -1174,21 +1220,23 @@ > | -aos* \ > | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ > | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ >- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ >+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ >+ | -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* \ > | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ >- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ >+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ >+ | -uxpv* | -beos* | -mpeix* | -udk* \ > | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ > | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ > | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ > | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ > | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ > | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ >- | -skyos* | -haiku*) >+ | -skyos* | -haiku* | -rdos* | -irx*) > # Remember, each alternative MUST END IN *, to match a version number. > ;; > -qnx*) >diff -urN openct-0.6.8/src/ifd/ifd-ccid.c openct-0.6.8-patched/src/ifd/ifd-ccid.c >--- openct-0.6.8/src/ifd/ifd-ccid.c 2006-06-16 13:38:16.000000000 -0400 >+++ openct-0.6.8-patched/src/ifd/ifd-ccid.c 2006-06-22 20:47:50.635044056 -0400 >@@ -5,6 +5,9 @@ > * > * 2005-04-20: Harald Welte <laforge@gnumonks.org> > * Add support for PCMCIA based CCID Device (CardMan 4040) >+ * >+ * 2005-05-22: Harald Welte <laforge at gnumonks.org> >+ * Add suport for OmniKey Cardman 5121 RFID extensions > */ > > #include "internal.h" >@@ -122,6 +125,7 @@ > > #define SUPPORT_T0 0x1 > #define SUPPORT_T1 0x2 >+#define SUPPORT_ESCAPE 0x80 > > #define SUPPORT_50V 1 > #define SUPPORT_33V 2 >@@ -457,6 +461,27 @@ > return ccid_extract_data(&recvbuf, r, rbuf, rlen); > } > >+static int ccid_escape(ifd_reader_t *reader, int slot, void *sbuf, >+ size_t slen, void *rbuf, size_t rlen) >+{ >+ unsigned char sendbuf[CCID_MAX_MSG_LEN]; >+ unsigned char recvbuf[CCID_MAX_MSG_LEN]; >+ int r; >+ >+ ifd_debug(1, "slot: %d, slen %d, rlen %d", slot, slen, rlen); >+ >+ r = ccid_prepare_cmd(reader, sendbuf, sizeof(sendbuf), slot, >+ CCID_CMD_ESCAPE, NULL, sbuf, slen); >+ if (r < 0) >+ return r; >+ >+ r = ccid_command(reader, &sendbuf[0], r, recvbuf, sizeof(recvbuf)); >+ if (r < 0) >+ return r; >+ >+ return ccid_extract_data(&recvbuf, r, rbuf, rlen); >+} >+ > static int ccid_open_usb(ifd_device_t * dev, ifd_reader_t * reader) > { > ccid_status_t *st; >@@ -740,6 +765,12 @@ > st->reader_type = TYPE_TPDU; > } > >+ if (de.idVendor == 0x076b && de.idProduct == 0x5121) { >+ /* special handling of RFID part of OmniKey 5121 */ >+ reader->nslots++; /* one virtual slot for RFID escape channel */ >+ st->proto_support |= SUPPORT_ESCAPE; >+ } >+ > return 0; > } > >@@ -816,6 +847,13 @@ > int any = 0; > int i, j, bits, stat; > >+ if (st->proto_support & SUPPORT_ESCAPE >+ && slot == reader->nslots-1) { >+ ifd_debug(1, "virtual escape slot, setting card present\n"); >+ *status = IFD_CARD_PRESENT; >+ return 0; >+ } >+ > i = 1 + (slot / 4); > j = 2 * (slot % 4); > stat = 0; >@@ -880,6 +918,8 @@ > return 0; > } > >+static int ccid_set_protocol(ifd_reader_t *reader, int s, int proto); >+ > /* > * Reset > */ >@@ -898,6 +938,14 @@ > if (!(status & IFD_CARD_PRESENT)) > return IFD_ERROR_NO_CARD; > >+ if (st->proto_support & SUPPORT_ESCAPE >+ && slot == reader->nslots-1) { >+ ifd_debug(1, "slot: %d, setting atr to 0xff", slot); >+ *((char *)atr) = 0xff; >+ ccid_set_protocol(reader, slot, IFD_PROTOCOL_ESCAPE); >+ return 1; >+ } >+ > memset(ctlbuf, 0, 3); > > n = -1; >@@ -940,6 +988,17 @@ > ifd_atr_info_t atr_info; > int r; > >+ slot = &reader->slot[s]; >+ >+ /* If we support RFID escaping, we only allow ESCAPE protocol >+ * at the last (== virtual) slot */ >+ if ((st->proto_support & SUPPORT_ESCAPE) >+ && (proto != IFD_PROTOCOL_ESCAPE) >+ && (s == reader->nslots-1)) { >+ ct_error("reader doesn't support this protocol at this slot\n"); >+ return IFD_ERROR_NOT_SUPPORTED; >+ } >+ > switch (proto) { > case IFD_PROTOCOL_T0: > if (!(st->proto_support & SUPPORT_T0)) { >@@ -953,13 +1012,36 @@ > return IFD_ERROR_NOT_SUPPORTED; > } > break; >+ case IFD_PROTOCOL_ESCAPE: >+ /* virtual "escape" fallthrough protocol for stacking RFID >+ * protocol stack on top of openct */ >+ if (!(st->proto_support & SUPPORT_ESCAPE)) { >+ ct_error("reader does not support this protocol"); >+ return IFD_ERROR_NOT_SUPPORTED; >+ } >+ if (s != reader->nslots-1) { >+ ct_error("reader doesn't suport this protocol at this slot"); >+ return IFD_ERROR_NOT_SUPPORTED; >+ } >+ p = ifd_protocol_new(IFD_PROTOCOL_ESCAPE, reader, slot->dad); >+ if (!p) { >+ ct_error("%s: internal error", reader->name); >+ return -1; >+ } >+ if (slot->proto) { >+ ifd_protocol_free(slot->proto); >+ slot->proto = NULL; >+ } >+ slot->proto = p; >+ st->icc_proto[s] = proto; >+ ifd_debug(1, "set prtoocol to ESCAPE\n"); >+ return 0; >+ break; > default: > ct_error("protocol unknown"); > return IFD_ERROR_NOT_SUPPORTED; > } > >- slot = &reader->slot[s]; >- > if (st->reader_type == TYPE_APDU) { > p = ifd_protocol_new(IFD_PROTOCOL_TRANSPARENT, > reader, slot->dad); >@@ -1177,6 +1259,7 @@ > ccid_driver.transparent = ccid_transparent; > ccid_driver.send = ccid_send; > ccid_driver.recv = ccid_recv; >+ ccid_driver.escape = ccid_escape; > > ifd_driver_register("ccid", &ccid_driver); > } >diff -urN openct-0.6.8/src/ifd/init.c openct-0.6.8-patched/src/ifd/init.c >--- openct-0.6.8/src/ifd/init.c 2006-06-16 13:38:15.000000000 -0400 >+++ openct-0.6.8-patched/src/ifd/init.c 2006-06-22 20:47:50.630044816 -0400 >@@ -54,7 +54,8 @@ > ifd_protocol_register(&ifd_protocol_2wire); > ifd_protocol_register(&ifd_protocol_3wire); > ifd_protocol_register(&ifd_protocol_eurochip); >- >+ ifd_protocol_register(&ifd_protocol_escape); >+ > if (ifd_conf_get_integer("debug", &ival) >= 0 && ival > ct_config.debug) > ct_config.debug = ival; > >diff -urN openct-0.6.8/src/ifd/internal.h openct-0.6.8-patched/src/ifd/internal.h >--- openct-0.6.8/src/ifd/internal.h 2006-06-16 13:38:16.000000000 -0400 >+++ openct-0.6.8-patched/src/ifd/internal.h 2006-06-22 20:47:50.631044664 -0400 >@@ -118,6 +118,7 @@ > extern struct ifd_protocol_ops ifd_protocol_2wire; > extern struct ifd_protocol_ops ifd_protocol_3wire; > extern struct ifd_protocol_ops ifd_protocol_eurochip; >+extern struct ifd_protocol_ops ifd_protocol_escape; > > extern void ifd_acr30u_register(void); > extern void ifd_cardman_register(void); >diff -urN openct-0.6.8/src/ifd/Makefile.am openct-0.6.8-patched/src/ifd/Makefile.am >--- openct-0.6.8/src/ifd/Makefile.am 2006-06-16 13:38:16.000000000 -0400 >+++ openct-0.6.8-patched/src/ifd/Makefile.am 2006-06-22 20:47:50.636043904 -0400 >@@ -20,7 +20,7 @@ > ifd-wbeiuu.c \ > \ > proto-gbp.c proto-sync.c proto-t0.c proto-t1.c \ >- proto-trans.c \ >+ proto-trans.c proto-escape.c \ > \ > sys-sunray.c sys-solaris.c sys-bsd.c sys-linux.c sys-null.c sys-osx.c \ > \ >diff -urN openct-0.6.8/src/ifd/Makefile.in openct-0.6.8-patched/src/ifd/Makefile.in >--- openct-0.6.8/src/ifd/Makefile.in 2006-06-19 02:38:24.000000000 -0400 >+++ openct-0.6.8-patched/src/ifd/Makefile.in 2006-06-22 21:33:59.540106504 -0400 >@@ -71,7 +71,7 @@ > ifd-ikey2k.lo ifd-ikey3k.lo ifd-kaan.lo ifd-pertosmart1030.lo \ > ifd-pertosmart1038.lo ifd-smartboard.lo ifd-smph.lo \ > ifd-starkey.lo ifd-towitoko.lo ifd-wbeiuu.lo proto-gbp.lo \ >- proto-sync.lo proto-t0.lo proto-t1.lo proto-trans.lo \ >+ proto-sync.lo proto-t0.lo proto-t1.lo proto-escape.lo proto-trans.lo \ > sys-sunray.lo sys-solaris.lo sys-bsd.lo sys-linux.lo \ > sys-null.lo sys-osx.lo ria.lo > libifd_la_OBJECTS = $(am_libifd_la_OBJECTS) >@@ -243,7 +243,7 @@ > ifd-smartboard.c ifd-smph.c ifd-starkey.c ifd-towitoko.c cardman.h \ > ifd-wbeiuu.c \ > \ >- proto-gbp.c proto-sync.c proto-t0.c proto-t1.c \ >+ proto-gbp.c proto-sync.c proto-t0.c proto-escape.c proto-proto-t1.c \ > proto-trans.c \ > \ > sys-sunray.c sys-solaris.c sys-bsd.c sys-linux.c sys-null.c sys-osx.c \ >@@ -379,6 +379,7 @@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-gbp.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-sync.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-t0.Plo@am__quote@ >+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-escape.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-t1.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-trans.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@ >diff -urN openct-0.6.8/src/ifd/proto-escape.c openct-0.6.8-patched/src/ifd/proto-escape.c >--- openct-0.6.8/src/ifd/proto-escape.c 1969-12-31 19:00:00.000000000 -0500 >+++ openct-0.6.8-patched/src/ifd/proto-escape.c 2006-06-22 20:47:50.632044512 -0400 >@@ -0,0 +1,77 @@ >+/* >+ * Escape protocol - simply pass everything to the reader driver's escape() >+ * >+ * This is required for exporting access to vendorp-specific CCID extensions, >+ * such as the Omnikey CardMan 5121 RFID support. >+ * >+ * The higher-level applications select a virtual slot (the last available slot >+ * number). This virtual slot will automatically get the IFD_PROTOCOL_ESCAPE >+ * assgigned to it and can then be used to transceive() data to/from the CCID. >+ * >+ * It's a bit ugly, but I was unable to come up with something cleaner. >+ * >+ * Copyright (C) 2005, Harald Welte <laforge at gnumonks.org> >+ */ >+ >+#include "internal.h" >+#include <unistd.h> >+#include <stdlib.h> >+#include <string.h> >+ >+static int >+escape_init(ifd_protocol_t *prot) >+{ >+ ifd_reader_t *reader = prot->reader; >+ const ifd_driver_t *drv; >+ >+ if (!reader || !(drv = reader->driver) >+ || !drv->ops || !drv->ops->escape) >+ return -1; >+ return 0; >+} >+ >+static void >+escape_release(ifd_protocol_t *prot) >+{ >+ /* NOP */ >+} >+ >+static int >+escape_set_param(ifd_protocol_t *prot, int type, long value) >+{ >+ ct_error("set_pameter not supported"); >+ return -1; >+} >+ >+static int >+escape_get_param(ifd_protocol_t *prot, int type, long *result) >+{ >+ ct_error("get_pameter not supported"); >+ return -1; >+} >+ >+static int >+escape_transceive(ifd_protocol_t *prot, int dad, >+ const void *sbuf, size_t slen, >+ void *rbuf, size_t rlen) >+{ >+ ifd_reader_t *reader = prot->reader; >+ const ifd_driver_t *drv = reader->driver; >+ >+ return drv->ops->escape(reader, dad, sbuf, slen, rbuf, rlen); >+} >+ >+struct ifd_protocol_ops ifd_protocol_escape = { >+ IFD_PROTOCOL_ESCAPE, /* id */ >+ "escape", /* name */ >+ sizeof(ifd_protocol_t), /* size */ >+ escape_init, /* init */ >+ escape_release, /* release */ >+ escape_set_param, /* set_param */ >+ escape_get_param, /* get_param */ >+ NULL, /* resynchronize */ >+ escape_transceive, /* transceive */ >+ NULL, /* sync_read */ >+ NULL, /* sync_write */ >+}; >+ >diff -urN openct-0.6.8/src/include/openct/driver.h openct-0.6.8-patched/src/include/openct/driver.h >--- openct-0.6.8/src/include/openct/driver.h 2006-06-16 13:38:16.000000000 -0400 >+++ openct-0.6.8-patched/src/include/openct/driver.h 2006-06-22 20:47:50.637043752 -0400 >@@ -318,6 +318,11 @@ > int (*sync_write)(ifd_reader_t *reader, int slot, int proto, > unsigned short addr, > const unsigned char *sbuf, size_t slen); >+ >+ /*Support for transparent access to "escape" */ >+ int (*escape)(ifd_reader_t *reader, int slot, >+ void *sbuf, size_t slen, >+ void *rbuf, size_t rlen); > }; > > extern void ifd_driver_register(const char *, >diff -urN openct-0.6.8/src/include/openct/ifd.h openct-0.6.8-patched/src/include/openct/ifd.h >--- openct-0.6.8/src/include/openct/ifd.h 2006-06-16 13:38:16.000000000 -0400 >+++ openct-0.6.8-patched/src/include/openct/ifd.h 2006-06-22 20:47:50.638043600 -0400 >@@ -29,6 +29,8 @@ > IFD_PROTOCOL_TLP, /* older Gemplus protocol */ > IFD_PROTOCOL_GBP, /* Gemplus block protocol */ > IFD_PROTOCOL_EUROCHIP, /* Eurochip Countercard */ >+ IFD_PROTOCOL_TCL, /* ISO 14443-4 T=CL */ >+ IFD_PROTOCOL_ESCAPE, /* Virtual 'escape' protocol */ > IFD_PROTOCOL_TRANSPARENT = 128 > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 137680
: 89868 |
89869
|
89870