[Pcsclite-cvs-commit] r2651 - in /trunk/HandlerTest/Host: Makefile handler_test.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Sat Oct 13 20:47:12 UTC 2007
Author: rousseau
Date: Sat Oct 13 20:47:12 2007
New Revision: 2651
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2651
Log:
add support of Mac OS X
Modified:
trunk/HandlerTest/Host/Makefile
trunk/HandlerTest/Host/handler_test.c
Modified: trunk/HandlerTest/Host/Makefile
URL: http://svn.debian.org/wsvn/pcsclite/trunk/HandlerTest/Host/Makefile?rev=2651&op=diff
==============================================================================
--- trunk/HandlerTest/Host/Makefile (original)
+++ trunk/HandlerTest/Host/Makefile Sat Oct 13 20:47:12 2007
@@ -9,6 +9,8 @@
LDFLAGS = -ldl -rdynamic
# *BSD
#LDFLAGS = -rdynamic
+# Mac OS X
+#CFLAGS = -framework PCSC -I. -DRESPONSECODE_DEFINED_IN_WINTYPES_H -DMAX_BUFFER_SIZE_EXTENDED="(4 + 3 + (1<<16) + 3)"
targets = handler_test.o debug.o tokenparser.o
Modified: trunk/HandlerTest/Host/handler_test.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/HandlerTest/Host/handler_test.c?rev=2651&op=diff
==============================================================================
--- trunk/HandlerTest/Host/handler_test.c (original)
+++ trunk/HandlerTest/Host/handler_test.c Sat Oct 13 20:47:12 2007
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <getopt.h>
#include <PCSC/winscard.h>
+#include <PCSC/wintypes.h>
#include <PCSC/ifdhandler.h>
#include "debug.h"
@@ -299,6 +300,7 @@
#define IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE SCARD_CTL_CODE(1)
+#ifndef __APPLE__
if (f.version >= IFD_HVERSION_3_0)
{
unsigned char cmd[] = "\x02";
@@ -317,6 +319,7 @@
PCSC_ERROR("IFDHControl");
//printf("IFDHControl: %s\n", ifd_error(rv));
}
+#endif
rv = f.IFDHICCPresence(LUN);
PCSC_ERROR("IFDHICCPresence");
@@ -329,6 +332,15 @@
PCSC_ERROR("IFDHPowerICC");
goto end;
}
+
+#ifdef __APPLE__
+ rv = f.IFDHPowerICC(LUN, IFD_POWER_UP, atr, &atrlength);
+ if (rv != IFD_SUCCESS)
+ {
+ PCSC_ERROR("IFDHPowerICC");
+ goto end;
+ }
+#endif
log_xxd(0, "ATR: ", atr, atrlength);
More information about the Pcsclite-cvs-commit
mailing list