[Pcsclite-cvs-commit] r1656 - in trunk/PCSC: . src/PCSC

Ludovic Rousseau rousseau at costa.debian.org
Thu Sep 15 12:25:16 UTC 2005


Author: rousseau
Date: 2005-09-15 12:25:15 +0000 (Thu, 15 Sep 2005)
New Revision: 1656

Modified:
   trunk/PCSC/configure.in
   trunk/PCSC/src/PCSC/reader.h.in
Log:
define HOST_TO_CCID_16() and HOST_TO_CCID_32 instead of just
HOST_TO_CCID()


Modified: trunk/PCSC/configure.in
===================================================================
--- trunk/PCSC/configure.in	2005-09-15 12:09:18 UTC (rev 1655)
+++ trunk/PCSC/configure.in	2005-09-15 12:25:15 UTC (rev 1656)
@@ -314,10 +314,12 @@
 
 dnl HOST_TO_CCID
 if test "x$ac_cv_c_bigendian" = "xyes"; then
-	AC_SUBST(host_to_ccid, ['((((x) >> 8) & 0xFF) + ((x & 0xFF) << 8))'])
+	AC_SUBST(host_to_ccid_16, ['((((x) >> 8) & 0xFF) + ((x & 0xFF) << 8))'])
+	AC_SUBST(host_to_ccid_32, ['((((x) >> 24) & 0xFF) + (((x) >> 8) & 0xFF00) + ((x & 0xFF00) << 8) + (((x) & 0xFF) << 24))'])
 	AC_MSG_RESULT([plateform endianess           : big endian])
 else
-	AC_SUBST(host_to_ccid, ['(x)'])
+	AC_SUBST(host_to_ccid_16, ['(x)'])
+	AC_SUBST(host_to_ccid_32, ['(x)'])
 	AC_MSG_RESULT([plateform endianess           : little endian])
 fi
 
@@ -327,7 +329,8 @@
 AC_SUBST(runpid)
 AC_SUBST(extended_apdu)
 AC_SUBST(muscledropdir)
-AC_SUBST(host_to_ccid)
+AC_SUBST(host_to_ccid_16)
+AC_SUBST(host_to_ccid_32)
 AS_AC_EXPAND(confdir_exp,$confdir)
 AS_AC_EXPAND(sysconfdir_exp,$sysconfdir)
 AS_AC_EXPAND(sbindir_exp,$sbindir)

Modified: trunk/PCSC/src/PCSC/reader.h.in
===================================================================
--- trunk/PCSC/src/PCSC/reader.h.in	2005-09-15 12:09:18 UTC (rev 1655)
+++ trunk/PCSC/src/PCSC/reader.h.in	2005-09-15 12:25:15 UTC (rev 1656)
@@ -124,9 +124,10 @@
 	int32_t value __attribute__ ((__packed__));
 } PCSC_TLV_STRUCTURE;
 
-/* the wLangId and wPINMaxExtraDigit are 16 bits so are subject to byte
+/* the wLangId and wPINMaxExtraDigit are 16-bits long so are subject to byte
  * ordering */
-#define HOST_TO_CCID(x) @host_to_ccid@
+#define HOST_TO_CCID_16(x) @host_to_ccid_16@
+#define HOST_TO_CCID_32(x) @host_to_ccid_32@
 
 typedef struct
 {




More information about the Pcsclite-cvs-commit mailing list