Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 137680
Collapse All | Expand All

(-)openct-0.6.8/config.guess (-37 / +88 lines)
Lines 1-9 Link Here
1
#! /bin/sh
1
#! /bin/sh
2
# Attempt to guess a canonical system name.
2
# Attempt to guess a canonical system name.
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
#   Inc.
5
6
6
timestamp='2005-08-03'
7
timestamp='2006-02-27'
7
8
8
# This file is free software; you can redistribute it and/or modify it
9
# This file is free software; you can redistribute it and/or modify it
9
# under the terms of the GNU General Public License as published by
10
# under the terms of the GNU General Public License as published by
Lines 106-112 Link Here
106
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108
: ${TMPDIR=/tmp} ;
109
: ${TMPDIR=/tmp} ;
109
 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
113
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
Lines 138-143 Link Here
138
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
139
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
139
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140
141
142
if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
143
	eval $set_cc_for_build
144
	cat << EOF > $dummy.c
145
	#include <features.h>
146
	#ifdef __UCLIBC__
147
	# ifdef __UCLIBC_CONFIG_VERSION__
148
	LIBC=uclibc __UCLIBC_CONFIG_VERSION__
149
	# else
150
	LIBC=uclibc
151
	# endif
152
	#else
153
	LIBC=gnu
154
	#endif
155
EOF
156
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
157
fi
158
141
# Note: order is significant - the case branches are not exclusive.
159
# Note: order is significant - the case branches are not exclusive.
142
160
143
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
161
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
Lines 206-211 Link Here
206
    *:ekkoBSD:*:*)
224
    *:ekkoBSD:*:*)
207
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
225
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
208
	exit ;;
226
	exit ;;
227
    *:SolidBSD:*:*)
228
	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
229
	exit ;;
209
    macppc:MirBSD:*:*)
230
    macppc:MirBSD:*:*)
210
	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
231
	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
211
	exit ;;
232
	exit ;;
Lines 764-770 Link Here
764
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
785
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
765
	exit ;;
786
	exit ;;
766
    *:FreeBSD:*:*)
787
    *:FreeBSD:*:*)
767
	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
788
	case ${UNAME_MACHINE} in
789
	    pc98)
790
		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
791
	    *)
792
		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
793
	esac
768
	exit ;;
794
	exit ;;
769
    i*:CYGWIN*:*)
795
    i*:CYGWIN*:*)
770
	echo ${UNAME_MACHINE}-pc-cygwin
796
	echo ${UNAME_MACHINE}-pc-cygwin
Lines 772-777 Link Here
772
    i*:MINGW*:*)
798
    i*:MINGW*:*)
773
	echo ${UNAME_MACHINE}-pc-mingw32
799
	echo ${UNAME_MACHINE}-pc-mingw32
774
	exit ;;
800
	exit ;;
801
    i*:MSYS_NT-*:*:*)
802
	echo ${UNAME_MACHINE}-pc-mingw32
803
	exit ;;
775
    i*:windows32*:*)
804
    i*:windows32*:*)
776
    	# uname -m includes "-pc" on this system.
805
    	# uname -m includes "-pc" on this system.
777
    	echo ${UNAME_MACHINE}-mingw32
806
    	echo ${UNAME_MACHINE}-mingw32
Lines 779-786 Link Here
779
    i*:PW*:*)
808
    i*:PW*:*)
780
	echo ${UNAME_MACHINE}-pc-pw32
809
	echo ${UNAME_MACHINE}-pc-pw32
781
	exit ;;
810
	exit ;;
782
    x86:Interix*:[34]*)
811
    x86:Interix*:[345]*)
783
	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
812
	echo i586-pc-interix${UNAME_RELEASE}
813
	exit ;;
814
    EM64T:Interix*:[345]*)
815
	echo x86_64-unknown-interix${UNAME_RELEASE}
784
	exit ;;
816
	exit ;;
785
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
817
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
786
	echo i${UNAME_MACHINE}-pc-mks
818
	echo i${UNAME_MACHINE}-pc-mks
Lines 815-839 Link Here
815
	echo ${UNAME_MACHINE}-pc-minix
847
	echo ${UNAME_MACHINE}-pc-minix
816
	exit ;;
848
	exit ;;
817
    arm*:Linux:*:*)
849
    arm*:Linux:*:*)
818
	echo ${UNAME_MACHINE}-unknown-linux-gnu
850
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
819
	exit ;;
851
	exit ;;
820
    cris:Linux:*:*)
852
    cris:Linux:*:*)
821
	echo cris-axis-linux-gnu
853
	echo cris-axis-linux-${LIBC}
822
	exit ;;
854
	exit ;;
823
    crisv32:Linux:*:*)
855
    crisv32:Linux:*:*)
824
	echo crisv32-axis-linux-gnu
856
	echo crisv32-axis-linux-${LIBC}
825
	exit ;;
857
	exit ;;
826
    frv:Linux:*:*)
858
    frv:Linux:*:*)
827
    	echo frv-unknown-linux-gnu
859
    	echo frv-unknown-linux-${LIBC}
828
	exit ;;
860
	exit ;;
829
    ia64:Linux:*:*)
861
    ia64:Linux:*:*)
830
	echo ${UNAME_MACHINE}-unknown-linux-gnu
862
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
831
	exit ;;
863
	exit ;;
832
    m32r*:Linux:*:*)
864
    m32r*:Linux:*:*)
833
	echo ${UNAME_MACHINE}-unknown-linux-gnu
865
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
834
	exit ;;
866
	exit ;;
835
    m68*:Linux:*:*)
867
    m68*:Linux:*:*)
836
	echo ${UNAME_MACHINE}-unknown-linux-gnu
868
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
837
	exit ;;
869
	exit ;;
838
    mips:Linux:*:*)
870
    mips:Linux:*:*)
839
	eval $set_cc_for_build
871
	eval $set_cc_for_build
Lines 851-858 Link Here
851
	#endif
883
	#endif
852
	#endif
884
	#endif
853
EOF
885
EOF
854
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
886
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
855
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
887
	    /^CPU/{
888
		s: ::g
889
		p
890
	    }'`"
891
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
856
	;;
892
	;;
857
    mips64:Linux:*:*)
893
    mips64:Linux:*:*)
858
	eval $set_cc_for_build
894
	eval $set_cc_for_build
Lines 870-886 Link Here
870
	#endif
906
	#endif
871
	#endif
907
	#endif
872
EOF
908
EOF
873
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
909
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
874
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
910
	    /^CPU/{
911
		s: ::g
912
		p
913
	    }'`"
914
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
875
	;;
915
	;;
876
    or32:Linux:*:*)
916
    or32:Linux:*:*)
877
	echo or32-unknown-linux-gnu
917
	echo or32-unknown-linux-${LIBC}
878
	exit ;;
918
	exit ;;
879
    ppc:Linux:*:*)
919
    ppc:Linux:*:*)
880
	echo powerpc-unknown-linux-gnu
920
	echo powerpc-unknown-linux-${LIBC}
881
	exit ;;
921
	exit ;;
882
    ppc64:Linux:*:*)
922
    ppc64:Linux:*:*)
883
	echo powerpc64-unknown-linux-gnu
923
	echo powerpc64-unknown-linux-${LIBC}
884
	exit ;;
924
	exit ;;
885
    alpha:Linux:*:*)
925
    alpha:Linux:*:*)
886
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
926
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
Lines 893-926 Link Here
893
	  EV68*) UNAME_MACHINE=alphaev68 ;;
933
	  EV68*) UNAME_MACHINE=alphaev68 ;;
894
        esac
934
        esac
895
	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
935
	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
896
	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
936
	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
897
	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
937
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
898
	exit ;;
938
	exit ;;
899
    parisc:Linux:*:* | hppa:Linux:*:*)
939
    parisc:Linux:*:* | hppa:Linux:*:*)
900
	# Look for CPU level
940
	# Look for CPU level
901
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
941
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
902
	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
942
	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
903
	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
943
	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
904
	  *)    echo hppa-unknown-linux-gnu ;;
944
	  *)    echo hppa-unknown-linux-${LIBC} ;;
905
	esac
945
	esac
906
	exit ;;
946
	exit ;;
907
    parisc64:Linux:*:* | hppa64:Linux:*:*)
947
    parisc64:Linux:*:* | hppa64:Linux:*:*)
908
	echo hppa64-unknown-linux-gnu
948
	echo hppa64-unknown-linux-${LIBC}
909
	exit ;;
949
	exit ;;
910
    s390:Linux:*:* | s390x:Linux:*:*)
950
    s390:Linux:*:* | s390x:Linux:*:*)
911
	echo ${UNAME_MACHINE}-ibm-linux
951
	echo ${UNAME_MACHINE}-ibm-linux
912
	exit ;;
952
	exit ;;
913
    sh64*:Linux:*:*)
953
    sh64*:Linux:*:*)
914
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
954
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915
	exit ;;
955
	exit ;;
916
    sh*:Linux:*:*)
956
    sh*:Linux:*:*)
917
	echo ${UNAME_MACHINE}-unknown-linux-gnu
957
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
918
	exit ;;
958
	exit ;;
919
    sparc:Linux:*:* | sparc64:Linux:*:*)
959
    sparc:Linux:*:* | sparc64:Linux:*:*)
920
	echo ${UNAME_MACHINE}-unknown-linux-gnu
960
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
961
	exit ;;
962
    vax:Linux:*:*)
963
	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
921
	exit ;;
964
	exit ;;
922
    x86_64:Linux:*:*)
965
    x86_64:Linux:*:*)
923
	echo x86_64-unknown-linux-gnu
966
	echo x86_64-unknown-linux-${LIBC}
924
	exit ;;
967
	exit ;;
925
    i*86:Linux:*:*)
968
    i*86:Linux:*:*)
926
	# The BFD linker knows what the default object file format is, so
969
	# The BFD linker knows what the default object file format is, so
Lines 935-954 Link Here
935
				    p'`
978
				    p'`
936
        case "$ld_supported_targets" in
979
        case "$ld_supported_targets" in
937
	  elf32-i386)
980
	  elf32-i386)
938
		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
981
		TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
939
		;;
982
		;;
940
	  a.out-i386-linux)
983
	  a.out-i386-linux)
941
		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
984
		echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
942
		exit ;;
985
		exit ;;
943
	  coff-i386)
986
	  coff-i386)
944
		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
987
		echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
945
		exit ;;
988
		exit ;;
946
	  "")
989
	  "")
947
		# Either a pre-BFD a.out linker (linux-gnuoldld) or
990
		# Either a pre-BFD a.out linker (linux-gnuoldld) or
948
		# one that does not give us useful --help.
991
		# one that does not give us useful --help.
949
		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
992
		echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
950
		exit ;;
993
		exit ;;
951
	esac
994
	esac
995
	# This should get integrated into the C code below, but now we hack
996
	if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
952
	# Determine whether the default compiler is a.out or elf
997
	# Determine whether the default compiler is a.out or elf
953
	eval $set_cc_for_build
998
	eval $set_cc_for_build
954
	sed 's/^	//' << EOF >$dummy.c
999
	sed 's/^	//' << EOF >$dummy.c
Lines 964-970 Link Here
964
	LIBC=gnulibc1
1009
	LIBC=gnulibc1
965
	# endif
1010
	# endif
966
	#else
1011
	#else
967
	#ifdef __INTEL_COMPILER
1012
	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
968
	LIBC=gnu
1013
	LIBC=gnu
969
	#else
1014
	#else
970
	LIBC=gnuaout
1015
	LIBC=gnuaout
Lines 974-980 Link Here
974
	LIBC=dietlibc
1019
	LIBC=dietlibc
975
	#endif
1020
	#endif
976
EOF
1021
EOF
977
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
1022
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1023
	    /^LIBC/{
1024
		s: ::g
1025
		p
1026
	    }'`"
978
	test x"${LIBC}" != x && {
1027
	test x"${LIBC}" != x && {
979
		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1028
		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
980
		exit
1029
		exit
Lines 1185-1191 Link Here
1185
    *:Darwin:*:*)
1234
    *:Darwin:*:*)
1186
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1235
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1187
	case $UNAME_PROCESSOR in
1236
	case $UNAME_PROCESSOR in
1188
	    *86) UNAME_PROCESSOR=i686 ;;
1189
	    unknown) UNAME_PROCESSOR=powerpc ;;
1237
	    unknown) UNAME_PROCESSOR=powerpc ;;
1190
	esac
1238
	esac
1191
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1239
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
Lines 1264-1269 Link Here
1264
    i*86:skyos:*:*)
1312
    i*86:skyos:*:*)
1265
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1313
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1266
	exit ;;
1314
	exit ;;
1315
    i*86:rdos:*:*)
1316
	echo ${UNAME_MACHINE}-pc-rdos
1317
	exit ;;
1267
esac
1318
esac
1268
1319
1269
#echo '(No uname command or uname output not recognized.)' 1>&2
1320
#echo '(No uname command or uname output not recognized.)' 1>&2
(-)openct-0.6.8/config.sub (-18 / +66 lines)
Lines 1-9 Link Here
1
#! /bin/sh
1
#! /bin/sh
2
# Configuration validation subroutine script.
2
# Configuration validation subroutine script.
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
#   Inc.
5
6
6
timestamp='2005-07-08'
7
timestamp='2006-02-27'
7
8
8
# This file is (in principle) common to ALL GNU software.
9
# This file is (in principle) common to ALL GNU software.
9
# The presence of a machine in this file suggests that SOME GNU software
10
# The presence of a machine in this file suggests that SOME GNU software
Lines 119-126 Link Here
119
# Here we must recognize all the valid KERNEL-OS combinations.
120
# Here we must recognize all the valid KERNEL-OS combinations.
120
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121
case $maybe_os in
122
case $maybe_os in
122
  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
123
  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
123
  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
124
  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
125
  storm-chaos* | os2-emx* | rtmk-nova*)
124
    os=-$maybe_os
126
    os=-$maybe_os
125
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
127
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
126
    ;;
128
    ;;
Lines 171-176 Link Here
171
	-hiux*)
173
	-hiux*)
172
		os=-hiuxwe2
174
		os=-hiuxwe2
173
		;;
175
		;;
176
	-sco6)
177
		os=-sco5v6
178
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
179
		;;
174
	-sco5)
180
	-sco5)
175
		os=-sco3.2v5
181
		os=-sco3.2v5
176
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
Lines 187-192 Link Here
187
		# Don't forget version if it is 3.2v4 or newer.
193
		# Don't forget version if it is 3.2v4 or newer.
188
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189
		;;
195
		;;
196
	-sco5v6*)
197
		# Don't forget version if it is 3.2v4 or newer.
198
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199
		;;
190
	-sco*)
200
	-sco*)
191
		os=-sco3.2v2
201
		os=-sco3.2v2
192
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
Lines 234-245 Link Here
234
	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
244
	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
235
	| bfin \
245
	| bfin \
236
	| c4x | clipper \
246
	| c4x | clipper \
237
	| d10v | d30v | dlx | dsp16xx \
247
	| d10v | d30v | dlx | dsp16xx | dvp \
238
	| fr30 | frv \
248
	| fr30 | frv \
239
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
249
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
240
	| i370 | i860 | i960 | ia64 \
250
	| i370 | i860 | i960 | ia64 \
241
	| ip2k | iq2000 \
251
	| ip2k | iq2000 \
242
	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
252
	| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
243
	| mips | mipsbe | mipseb | mipsel | mipsle \
253
	| mips | mipsbe | mipseb | mipsel | mipsle \
244
	| mips16 \
254
	| mips16 \
245
	| mips64 | mips64el \
255
	| mips64 | mips64el \
Lines 257-273 Link Here
257
	| mipsisa64sr71k | mipsisa64sr71kel \
267
	| mipsisa64sr71k | mipsisa64sr71kel \
258
	| mipstx39 | mipstx39el \
268
	| mipstx39 | mipstx39el \
259
	| mn10200 | mn10300 \
269
	| mn10200 | mn10300 \
260
	| ms1 \
270
	| mt \
261
	| msp430 \
271
	| msp430 \
272
	| nios | nios2 \
262
	| ns16k | ns32k \
273
	| ns16k | ns32k \
263
	| or32 \
274
	| or32 \
264
	| pdp10 | pdp11 | pj | pjl \
275
	| pdp10 | pdp11 | pj | pjl \
265
	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
276
	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
266
	| pyramid \
277
	| pyramid \
267
	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
278
	| sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | sheb | shle | sh[1234]le | sh3ele \
268
	| sh64 | sh64le \
279
	| sh64 | sh64le \
269
	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
280
	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
270
	| sparcv8 | sparcv9 | sparcv9b \
281
	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
271
	| strongarm \
282
	| strongarm \
272
	| tahoe | thumb | tic4x | tic80 | tron \
283
	| tahoe | thumb | tic4x | tic80 | tron \
273
	| v850 | v850e \
284
	| v850 | v850e \
Lines 286-291 Link Here
286
		;;
297
		;;
287
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
298
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
288
		;;
299
		;;
300
	ms1)
301
		basic_machine=mt-unknown
302
		;;
289
303
290
	# We use `pc' rather than `unknown'
304
	# We use `pc' rather than `unknown'
291
	# because (1) that's what they normally are, and
305
	# because (1) that's what they normally are, and
Lines 336-354 Link Here
336
	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
350
	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
337
	| mipstx39-* | mipstx39el-* \
351
	| mipstx39-* | mipstx39el-* \
338
	| mmix-* \
352
	| mmix-* \
339
	| ms1-* \
353
	| mt-* \
340
	| msp430-* \
354
	| msp430-* \
355
	| nios-* | nios2-* \
341
	| none-* | np1-* | ns16k-* | ns32k-* \
356
	| none-* | np1-* | ns16k-* | ns32k-* \
342
	| orion-* \
357
	| orion-* \
343
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
358
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
344
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
359
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
345
	| pyramid-* \
360
	| pyramid-* \
346
	| romp-* | rs6000-* \
361
	| romp-* | rs6000-* \
347
	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
362
	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | shbe-* | sheb-* \
348
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
363
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
349
	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
364
	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
350
	| sparclite-* \
365
	| sparclite-* \
351
	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
366
	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
352
	| tahoe-* | thumb-* \
367
	| tahoe-* | thumb-* \
353
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
368
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
354
	| tron-* \
369
	| tron-* \
Lines 678-683 Link Here
678
		basic_machine=m68k-atari
693
		basic_machine=m68k-atari
679
		os=-mint
694
		os=-mint
680
		;;
695
		;;
696
	mipsEE* | ee | ps2)
697
		basic_machine=mips64r5900el-scei
698
		case $os in
699
		    -linux*)
700
			;;
701
		    *)
702
			os=-elf
703
			;;
704
		esac
705
		;;
706
	iop)
707
		basic_machine=mipsel-scei
708
		os=-irx
709
		;;
710
	dvp)
711
		basic_machine=dvp-scei
712
		os=-elf
713
		;;
681
	mips3*-*)
714
	mips3*-*)
682
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
715
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
683
		;;
716
		;;
Lines 696-701 Link Here
696
		basic_machine=i386-pc
729
		basic_machine=i386-pc
697
		os=-msdos
730
		os=-msdos
698
		;;
731
		;;
732
	ms1-*)
733
		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
734
		;;
699
	mvs)
735
	mvs)
700
		basic_machine=i370-ibm
736
		basic_machine=i370-ibm
701
		os=-mvs
737
		os=-mvs
Lines 803-808 Link Here
803
	pc532 | pc532-*)
839
	pc532 | pc532-*)
804
		basic_machine=ns32k-pc532
840
		basic_machine=ns32k-pc532
805
		;;
841
		;;
842
	pc98)
843
		basic_machine=i386-pc
844
		;;
845
	pc98-*)
846
		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
847
		;;
806
	pentium | p5 | k5 | k6 | nexgen | viac3)
848
	pentium | p5 | k5 | k6 | nexgen | viac3)
807
		basic_machine=i586-pc
849
		basic_machine=i586-pc
808
		;;
850
		;;
Lines 859-864 Link Here
859
		basic_machine=i586-unknown
901
		basic_machine=i586-unknown
860
		os=-pw32
902
		os=-pw32
861
		;;
903
		;;
904
	rdos)
905
		basic_machine=i386-pc
906
		os=-rdos
907
		;;
862
	rom68k)
908
	rom68k)
863
		basic_machine=m68k-rom68k
909
		basic_machine=m68k-rom68k
864
		os=-coff
910
		os=-coff
Lines 1101-1107 Link Here
1101
	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1147
	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1102
		basic_machine=sh-unknown
1148
		basic_machine=sh-unknown
1103
		;;
1149
		;;
1104
	sparc | sparcv8 | sparcv9 | sparcv9b)
1150
	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1105
		basic_machine=sparc-sun
1151
		basic_machine=sparc-sun
1106
		;;
1152
		;;
1107
	cydra)
1153
	cydra)
Lines 1174-1194 Link Here
1174
	      | -aos* \
1220
	      | -aos* \
1175
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1221
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1176
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1222
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1177
	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1223
	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1224
	      | -openbsd* | -solidbsd* \
1178
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1225
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1179
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1226
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1180
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1227
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1181
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1228
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1182
	      | -chorusos* | -chorusrdb* \
1229
	      | -chorusos* | -chorusrdb* \
1183
	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1230
	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1184
	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1231
	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1232
	      | -uxpv* | -beos* | -mpeix* | -udk* \
1185
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1233
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1186
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1234
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1187
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1235
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1188
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1236
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1189
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1237
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1190
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1238
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1191
	      | -skyos* | -haiku*)
1239
	      | -skyos* | -haiku* | -rdos* | -irx*)
1192
	# Remember, each alternative MUST END IN *, to match a version number.
1240
	# Remember, each alternative MUST END IN *, to match a version number.
1193
		;;
1241
		;;
1194
	-qnx*)
1242
	-qnx*)
(-)openct-0.6.8/src/ifd/ifd-ccid.c (-2 / +85 lines)
Lines 5-10 Link Here
5
 *
5
 *
6
 * 2005-04-20: Harald Welte <laforge@gnumonks.org>
6
 * 2005-04-20: Harald Welte <laforge@gnumonks.org>
7
 * 	Add support for PCMCIA based CCID Device (CardMan 4040)
7
 * 	Add support for PCMCIA based CCID Device (CardMan 4040)
8
 *
9
 * 2005-05-22: Harald Welte <laforge at gnumonks.org>
10
 * 	Add suport for OmniKey Cardman 5121 RFID extensions
8
 */
11
 */
9
12
10
#include "internal.h"
13
#include "internal.h"
Lines 122-127 Link Here
122
125
123
#define SUPPORT_T0	0x1
126
#define SUPPORT_T0	0x1
124
#define SUPPORT_T1	0x2
127
#define SUPPORT_T1	0x2
128
#define SUPPORT_ESCAPE	0x80
125
129
126
#define SUPPORT_50V	1
130
#define SUPPORT_50V	1
127
#define SUPPORT_33V	2
131
#define SUPPORT_33V	2
Lines 457-462 Link Here
457
	return ccid_extract_data(&recvbuf, r, rbuf, rlen);
461
	return ccid_extract_data(&recvbuf, r, rbuf, rlen);
458
}
462
}
459
463
464
static int ccid_escape(ifd_reader_t *reader, int slot, void *sbuf,
465
		       size_t slen, void *rbuf, size_t rlen)
466
{
467
	unsigned char sendbuf[CCID_MAX_MSG_LEN];
468
	unsigned char recvbuf[CCID_MAX_MSG_LEN];
469
	int r;
470
471
	ifd_debug(1, "slot: %d, slen %d, rlen %d", slot, slen, rlen);
472
473
	r = ccid_prepare_cmd(reader, sendbuf, sizeof(sendbuf), slot,
474
			     CCID_CMD_ESCAPE, NULL, sbuf, slen);
475
	if (r < 0)
476
		return r;
477
478
	r = ccid_command(reader, &sendbuf[0], r, recvbuf, sizeof(recvbuf));
479
	if (r < 0)
480
		return r;
481
482
	return ccid_extract_data(&recvbuf, r, rbuf, rlen);
483
}
484
460
static int ccid_open_usb(ifd_device_t * dev, ifd_reader_t * reader)
485
static int ccid_open_usb(ifd_device_t * dev, ifd_reader_t * reader)
461
{
486
{
462
	ccid_status_t *st;
487
	ccid_status_t *st;
Lines 740-745 Link Here
740
		st->reader_type = TYPE_TPDU;
765
		st->reader_type = TYPE_TPDU;
741
	}
766
	}
742
767
768
	if (de.idVendor == 0x076b && de.idProduct == 0x5121) {
769
		/* special handling of RFID part of OmniKey 5121 */
770
		reader->nslots++;	/* one virtual slot for RFID escape channel */
771
		st->proto_support |= SUPPORT_ESCAPE;
772
	}
773
743
	return 0;
774
	return 0;
744
}
775
}
745
776
Lines 816-821 Link Here
816
		int any = 0;
847
		int any = 0;
817
		int i, j, bits, stat;
848
		int i, j, bits, stat;
818
849
850
		if (st->proto_support & SUPPORT_ESCAPE
851
	  	    && slot == reader->nslots-1) {
852
			ifd_debug(1, "virtual escape slot, setting card present\n");
853
			*status = IFD_CARD_PRESENT;
854
			return 0;
855
		}
856
819
		i = 1 + (slot / 4);
857
		i = 1 + (slot / 4);
820
		j = 2 * (slot % 4);
858
		j = 2 * (slot % 4);
821
		stat = 0;
859
		stat = 0;
Lines 880-885 Link Here
880
	return 0;
918
	return 0;
881
}
919
}
882
920
921
static int ccid_set_protocol(ifd_reader_t *reader, int s, int proto);
922
883
/*
923
/*
884
 * Reset
924
 * Reset
885
 */
925
 */
Lines 898-903 Link Here
898
	if (!(status & IFD_CARD_PRESENT))
938
	if (!(status & IFD_CARD_PRESENT))
899
		return IFD_ERROR_NO_CARD;
939
		return IFD_ERROR_NO_CARD;
900
940
941
	if (st->proto_support & SUPPORT_ESCAPE
942
	    && slot == reader->nslots-1) {
943
		ifd_debug(1, "slot: %d, setting atr to 0xff", slot);
944
		*((char *)atr) = 0xff;
945
		ccid_set_protocol(reader, slot, IFD_PROTOCOL_ESCAPE);
946
		return 1;
947
	}
948
901
	memset(ctlbuf, 0, 3);
949
	memset(ctlbuf, 0, 3);
902
950
903
	n = -1;
951
	n = -1;
Lines 940-945 Link Here
940
	ifd_atr_info_t atr_info;
988
	ifd_atr_info_t atr_info;
941
	int r;
989
	int r;
942
990
991
	slot = &reader->slot[s];
992
993
	/* If we support RFID escaping, we only allow ESCAPE protocol
994
	 * at the last (== virtual) slot */
995
	if ((st->proto_support & SUPPORT_ESCAPE)
996
	    && (proto != IFD_PROTOCOL_ESCAPE)
997
	    && (s == reader->nslots-1)) {
998
		ct_error("reader doesn't support this protocol at this slot\n");
999
		return IFD_ERROR_NOT_SUPPORTED;
1000
	}
1001
943
	switch (proto) {
1002
	switch (proto) {
944
	case IFD_PROTOCOL_T0:
1003
	case IFD_PROTOCOL_T0:
945
		if (!(st->proto_support & SUPPORT_T0)) {
1004
		if (!(st->proto_support & SUPPORT_T0)) {
Lines 953-965 Link Here
953
			return IFD_ERROR_NOT_SUPPORTED;
1012
			return IFD_ERROR_NOT_SUPPORTED;
954
		}
1013
		}
955
		break;
1014
		break;
1015
	case IFD_PROTOCOL_ESCAPE:
1016
		/* virtual "escape" fallthrough protocol for stacking RFID
1017
		 * protocol stack on top of openct */
1018
		if (!(st->proto_support & SUPPORT_ESCAPE)) {
1019
			ct_error("reader does not support this protocol");
1020
			return IFD_ERROR_NOT_SUPPORTED;
1021
		}
1022
		if (s != reader->nslots-1) {
1023
			ct_error("reader doesn't suport this protocol at this slot");
1024
			return IFD_ERROR_NOT_SUPPORTED;
1025
		}
1026
		p = ifd_protocol_new(IFD_PROTOCOL_ESCAPE, reader, slot->dad);
1027
		if (!p) {
1028
			ct_error("%s: internal error", reader->name);
1029
			return -1;
1030
		}
1031
		if (slot->proto) {
1032
			ifd_protocol_free(slot->proto);
1033
			slot->proto = NULL;
1034
		}
1035
		slot->proto = p;
1036
		st->icc_proto[s] = proto;
1037
		ifd_debug(1, "set prtoocol to ESCAPE\n");
1038
		return 0;
1039
		break;
956
	default:
1040
	default:
957
		ct_error("protocol unknown");
1041
		ct_error("protocol unknown");
958
		return IFD_ERROR_NOT_SUPPORTED;
1042
		return IFD_ERROR_NOT_SUPPORTED;
959
	}
1043
	}
960
1044
961
	slot = &reader->slot[s];
962
963
	if (st->reader_type == TYPE_APDU) {
1045
	if (st->reader_type == TYPE_APDU) {
964
		p = ifd_protocol_new(IFD_PROTOCOL_TRANSPARENT,
1046
		p = ifd_protocol_new(IFD_PROTOCOL_TRANSPARENT,
965
				     reader, slot->dad);
1047
				     reader, slot->dad);
Lines 1177-1182 Link Here
1177
	ccid_driver.transparent = ccid_transparent;
1259
	ccid_driver.transparent = ccid_transparent;
1178
	ccid_driver.send = ccid_send;
1260
	ccid_driver.send = ccid_send;
1179
	ccid_driver.recv = ccid_recv;
1261
	ccid_driver.recv = ccid_recv;
1262
	ccid_driver.escape = ccid_escape;
1180
1263
1181
	ifd_driver_register("ccid", &ccid_driver);
1264
	ifd_driver_register("ccid", &ccid_driver);
1182
}
1265
}
(-)openct-0.6.8/src/ifd/init.c (-1 / +2 lines)
Lines 54-60 Link Here
54
	ifd_protocol_register(&ifd_protocol_2wire);
54
	ifd_protocol_register(&ifd_protocol_2wire);
55
	ifd_protocol_register(&ifd_protocol_3wire);
55
	ifd_protocol_register(&ifd_protocol_3wire);
56
	ifd_protocol_register(&ifd_protocol_eurochip);
56
	ifd_protocol_register(&ifd_protocol_eurochip);
57
57
	ifd_protocol_register(&ifd_protocol_escape);
58
 
58
	if (ifd_conf_get_integer("debug", &ival) >= 0 && ival > ct_config.debug)
59
	if (ifd_conf_get_integer("debug", &ival) >= 0 && ival > ct_config.debug)
59
		ct_config.debug = ival;
60
		ct_config.debug = ival;
60
61
(-)openct-0.6.8/src/ifd/internal.h (+1 lines)
Lines 118-123 Link Here
118
extern struct ifd_protocol_ops ifd_protocol_2wire;
118
extern struct ifd_protocol_ops ifd_protocol_2wire;
119
extern struct ifd_protocol_ops ifd_protocol_3wire;
119
extern struct ifd_protocol_ops ifd_protocol_3wire;
120
extern struct ifd_protocol_ops ifd_protocol_eurochip;
120
extern struct ifd_protocol_ops ifd_protocol_eurochip;
121
extern struct ifd_protocol_ops ifd_protocol_escape;
121
122
122
extern void ifd_acr30u_register(void);
123
extern void ifd_acr30u_register(void);
123
extern void ifd_cardman_register(void);
124
extern void ifd_cardman_register(void);
(-)openct-0.6.8/src/ifd/Makefile.am (-1 / +1 lines)
Lines 20-26 Link Here
20
	ifd-wbeiuu.c \
20
	ifd-wbeiuu.c \
21
	\
21
	\
22
	proto-gbp.c proto-sync.c proto-t0.c proto-t1.c \
22
	proto-gbp.c proto-sync.c proto-t0.c proto-t1.c \
23
	proto-trans.c \
23
	proto-trans.c proto-escape.c \
24
	\
24
	\
25
	sys-sunray.c sys-solaris.c sys-bsd.c sys-linux.c sys-null.c sys-osx.c \
25
	sys-sunray.c sys-solaris.c sys-bsd.c sys-linux.c sys-null.c sys-osx.c \
26
	\
26
	\
(-)openct-0.6.8/src/ifd/Makefile.in (-2 / +3 lines)
Lines 71-77 Link Here
71
	ifd-ikey2k.lo ifd-ikey3k.lo ifd-kaan.lo ifd-pertosmart1030.lo \
71
	ifd-ikey2k.lo ifd-ikey3k.lo ifd-kaan.lo ifd-pertosmart1030.lo \
72
	ifd-pertosmart1038.lo ifd-smartboard.lo ifd-smph.lo \
72
	ifd-pertosmart1038.lo ifd-smartboard.lo ifd-smph.lo \
73
	ifd-starkey.lo ifd-towitoko.lo ifd-wbeiuu.lo proto-gbp.lo \
73
	ifd-starkey.lo ifd-towitoko.lo ifd-wbeiuu.lo proto-gbp.lo \
74
	proto-sync.lo proto-t0.lo proto-t1.lo proto-trans.lo \
74
	proto-sync.lo proto-t0.lo proto-t1.lo proto-escape.lo proto-trans.lo \
75
	sys-sunray.lo sys-solaris.lo sys-bsd.lo sys-linux.lo \
75
	sys-sunray.lo sys-solaris.lo sys-bsd.lo sys-linux.lo \
76
	sys-null.lo sys-osx.lo ria.lo
76
	sys-null.lo sys-osx.lo ria.lo
77
libifd_la_OBJECTS = $(am_libifd_la_OBJECTS)
77
libifd_la_OBJECTS = $(am_libifd_la_OBJECTS)
Lines 243-249 Link Here
243
	ifd-smartboard.c ifd-smph.c ifd-starkey.c ifd-towitoko.c cardman.h \
243
	ifd-smartboard.c ifd-smph.c ifd-starkey.c ifd-towitoko.c cardman.h \
244
	ifd-wbeiuu.c \
244
	ifd-wbeiuu.c \
245
	\
245
	\
246
	proto-gbp.c proto-sync.c proto-t0.c proto-t1.c \
246
	proto-gbp.c proto-sync.c proto-t0.c proto-escape.c proto-proto-t1.c \
247
	proto-trans.c \
247
	proto-trans.c \
248
	\
248
	\
249
	sys-sunray.c sys-solaris.c sys-bsd.c sys-linux.c sys-null.c sys-osx.c \
249
	sys-sunray.c sys-solaris.c sys-bsd.c sys-linux.c sys-null.c sys-osx.c \
Lines 379-384 Link Here
379
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-gbp.Plo@am__quote@
379
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-gbp.Plo@am__quote@
380
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-sync.Plo@am__quote@
380
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-sync.Plo@am__quote@
381
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-t0.Plo@am__quote@
381
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-t0.Plo@am__quote@
382
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-escape.Plo@am__quote@
382
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-t1.Plo@am__quote@
383
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-t1.Plo@am__quote@
383
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-trans.Plo@am__quote@
384
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto-trans.Plo@am__quote@
384
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@
385
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@
(-)openct-0.6.8/src/ifd/proto-escape.c (+77 lines)
Line 0 Link Here
1
/*
2
 * Escape protocol - simply pass everything to the reader driver's escape()
3
 *
4
 * This is required for exporting access to vendorp-specific CCID extensions,
5
 * such as the Omnikey CardMan 5121 RFID support.
6
 *
7
 * The higher-level applications select a virtual slot (the last available slot
8
 * number).  This virtual slot will automatically get the IFD_PROTOCOL_ESCAPE 
9
 * assgigned to it and can then be used to transceive() data to/from the CCID.
10
 *
11
 * It's a bit ugly, but I was unable to come up with something cleaner.
12
 *
13
 * Copyright (C) 2005, Harald Welte <laforge at gnumonks.org>
14
 */
15
16
#include "internal.h"
17
#include <unistd.h>
18
#include <stdlib.h>
19
#include <string.h>
20
21
static int
22
escape_init(ifd_protocol_t *prot)
23
{
24
	ifd_reader_t	*reader = prot->reader;
25
	const ifd_driver_t *drv;
26
27
	if (!reader || !(drv = reader->driver)
28
	 || !drv->ops || !drv->ops->escape)
29
	 	return -1;
30
	return 0;
31
}
32
33
static void
34
escape_release(ifd_protocol_t *prot)
35
{
36
	/* NOP */
37
}
38
39
static int
40
escape_set_param(ifd_protocol_t *prot, int type, long value)
41
{
42
	ct_error("set_pameter not supported");
43
	return -1;
44
}
45
46
static int
47
escape_get_param(ifd_protocol_t *prot, int type, long *result)
48
{
49
	ct_error("get_pameter not supported");
50
	return -1;
51
}
52
53
static int
54
escape_transceive(ifd_protocol_t *prot, int dad,
55
		const void *sbuf, size_t slen,
56
		void *rbuf, size_t rlen)
57
{
58
	ifd_reader_t	*reader = prot->reader;
59
	const ifd_driver_t *drv = reader->driver;
60
61
	return drv->ops->escape(reader, dad, sbuf, slen, rbuf, rlen);
62
}
63
64
struct ifd_protocol_ops	ifd_protocol_escape = {
65
	IFD_PROTOCOL_ESCAPE,		/* id */
66
	"escape",			/* name */
67
	sizeof(ifd_protocol_t),		/* size */
68
	escape_init,			/* init */
69
	escape_release,			/* release */
70
	escape_set_param,		/* set_param */
71
	escape_get_param,		/* get_param */
72
	NULL,				/* resynchronize */
73
	escape_transceive,		/* transceive */
74
	NULL,				/* sync_read */
75
	NULL,				/* sync_write */
76
};
77
(-)openct-0.6.8/src/include/openct/driver.h (+5 lines)
Lines 318-323 Link Here
318
	int		(*sync_write)(ifd_reader_t *reader, int slot, int proto,
318
	int		(*sync_write)(ifd_reader_t *reader, int slot, int proto,
319
				unsigned short addr,
319
				unsigned short addr,
320
				const unsigned char *sbuf, size_t slen);
320
				const unsigned char *sbuf, size_t slen);
321
322
	/*Support for transparent access to "escape" */
323
	int		(*escape)(ifd_reader_t *reader, int slot,
324
				void *sbuf, size_t slen,
325
				void *rbuf, size_t rlen);
321
};
326
};
322
327
323
extern void		ifd_driver_register(const char *,
328
extern void		ifd_driver_register(const char *,
(-)openct-0.6.8/src/include/openct/ifd.h (+2 lines)
Lines 29-34 Link Here
29
	IFD_PROTOCOL_TLP,		/* older Gemplus protocol */
29
	IFD_PROTOCOL_TLP,		/* older Gemplus protocol */
30
	IFD_PROTOCOL_GBP,		/* Gemplus block protocol */
30
	IFD_PROTOCOL_GBP,		/* Gemplus block protocol */
31
	IFD_PROTOCOL_EUROCHIP,		/* Eurochip Countercard */
31
	IFD_PROTOCOL_EUROCHIP,		/* Eurochip Countercard */
32
	IFD_PROTOCOL_TCL,		/* ISO 14443-4 T=CL */
33
	IFD_PROTOCOL_ESCAPE,		/* Virtual 'escape' protocol */
32
	IFD_PROTOCOL_TRANSPARENT = 128
34
	IFD_PROTOCOL_TRANSPARENT = 128
33
};
35
};
34
36

Return to bug 137680