File pcsc-perl-noSCardSetTimeout.patch of Package perl-pcsc

Index: pcsc-perl-1.4.10/PCSC.xs
===================================================================
--- pcsc-perl-1.4.10.orig/PCSC.xs
+++ pcsc-perl-1.4.10/PCSC.xs
@@ -369,13 +369,8 @@ _LoadPCSCLibrary ()
 			hConnect          = (TSCardConnect)          GET_FCT (ghDll, "SCardConnect");
 			hStatus           = (TSCardStatus)           GET_FCT (ghDll, "SCardStatus");
 			hGetStatusChange  = (TSCardGetStatusChange)  GET_FCT (ghDll, "SCardGetStatusChange");
-			/* SetTimeout is not part of the original PCSC yet it is still important */
-			hSetTimeout       = (TSCardSetTimeout)       GET_FCT (ghDll, "SCardSetTimeout");
 #endif
 			if (
-#ifndef WIN32
-				!hSetTimeout ||
-#endif
 				!hEstablishContext || !hReleaseContext || !hListReaders || !hConnect ||
 				!hReconnect || ! hDisconnect || !hBeginTransaction || !hEndTransaction ||
 				!hTransmit || !hStatus || !hGetStatusChange || !hCancel || !hControl)
@@ -1329,8 +1324,7 @@ _Cancel (hContext)
 #///////////////////////////////////////////////////////////////////////////////
 #//   SetTimeout ()
 #//
-#// This function is only defined for PCSClite that is why we build a
-#// stub after the #else processing command 
+#// This function is no more defined that is why we build a stub
 #//
 #// INPUT :
 #// - $hContext ->
@@ -1338,30 +1332,6 @@ _Cancel (hContext)
 #// OUTPUT :
 #// returns either true or false depending on successful completion
 
-#ifndef WIN32
-
-unsigned long
-_SetTimeout (hContext, dwTimeout)
-	unsigned long hContext;
-	unsigned long dwTimeout;
-	CODE:
-
-
-		gnLastError = hSetTimeout (hContext, dwTimeout);
-
-		/* Then we check for an error */
-		if (gnLastError != SCARD_S_SUCCESS)
-			RETVAL = FALSE;
-		else
-			RETVAL = TRUE;
-	OUTPUT:
-		RETVAL
-
-#else
-
-#// Win32 does not implement SetTimeout therefore we simply define
-#// a stub.
-
 unsigned long
 _SetTimeout (hContext, dwTimeout)
 	unsigned long hContext;
@@ -1371,6 +1341,4 @@ _SetTimeout (hContext, dwTimeout)
 	OUTPUT:
 		RETVAL
 
-#endif
-
 # End of File #
openSUSE Build Service is sponsored by