#25: RESPONSECODE definition in pcsc-lite moved to ifdhandler.h --------------------------+------------------------------------------------- Reporter: aj | Owner: [EMAIL PROTECTED] Type: enhancement | Status: new Priority: normal | Component: general Version: 0.6.11 | Severity: normal Resolution: | Keywords: --------------------------+------------------------------------------------- Comment (by Ludovic):
A patch is available in http://www.opensc-project.org/pipermail/opensc- devel/2007-March/009616.html It is not possible to compile OpenCT with pcsc-lite 1.4.0 [http://archives.neohapsis.com/archives/dev/muscle/2007-q1/0144.html]. See Debian bug #414715 [http://bugs.debian.org/414715]. This is because of two problems: * OpenCT comes with its own version of ifdhandler.h instead of using the one provided by pcsc-lite * OpenCT uses the IFDhandler API v2 and IFDHControl() function is not defined the same with IFDhandler API v3 and so conflicts. A simple patch is to remove ifdhandler.h from OpenCT and do: {{{ Index: src/pcsc/Makefile.am =================================================================== --- src/pcsc/Makefile.am (révision 935) +++ src/pcsc/Makefile.am (copie de travail) @@ -14,8 +14,6 @@ openct_ifd_la_SOURCES = pcsc.c openct_ifd_la_LDFLAGS = -module -avoid-version openct_ifd_la_LIBADD = ../ctapi/libopenctapi.la -noinst_HEADERS = ifdhandler.h - # Don't use HAVE_BUNDLES for this case, pcsc-lite loads # USB drivers from MacOS X like bundles for all platforms install-exec-local: install-libLTLIBRARIES Index: src/pcsc/pcsc.c =================================================================== --- src/pcsc/pcsc.c (révision 935) +++ src/pcsc/pcsc.c (copie de travail) @@ -34,6 +34,7 @@ #endif #include <openct/openct.h> #include "ctapi.h" /* XXX: <openct/ctapi.h>? */ +#define IFDHANDLERv2 #include "ifdhandler.h" /* Maximum number of readers handled */ @@ -423,6 +424,8 @@ IFDHTransmitToICC(DWORD Lun, SCARD_IO_HE return rv; } +#ifdef IFDHANDLERv2 + RESPONSECODE IFDHControl(DWORD Lun, PUCHAR TxBuffer, DWORD TxLength, PUCHAR RxBuffer, PDWORD RxLength) @@ -469,6 +472,17 @@ IFDHControl(DWORD Lun, PUCHAR TxBuffer, return rv; } +#else + +RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode, + PUCHAR TxBuffer, DWORD TxLength, PUCHAR RxBuffer, DWORD RxLength, + PDWORD pdwBytesReturned) +{ + /* FIXME */ +} + +#endif + RESPONSECODE IFDHICCPresence(DWORD Lun) { char ret; }}} I have no idea if OpenCT should use the API v3 [http://pcsclite.alioth.debian.org/ifdhandler-3/] or stay at API v2. -- Ticket URL: <https://www.opensc-project.org/openct/ticket/25> OpenCT <http://www.opensc-project.org/>