Re: patch for gpgpcsc (PC/SC interface)

"Ludovic Rousseau" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
On Wed, Oct 1, 2008 at 9:17 PM, Ludovic Rousseau
<[email protected]> wrote:
> The patch works for me. Please apply it to the CVS code.

Patch in unified format. Better now, sorry.

-- 
 Dr. Ludovic Rousseau

_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog
patch.txt (text/plain, 1.8 KB)
? linuxmag
? linuxmag.pl
? testapdu
Index: Makefile
===================================================================
RCS file: /cvsroot/gprolog/contribs/gplpcsc/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	13 May 2003 07:39:33 -0000	1.2
+++ Makefile	1 Oct 2008 19:46:14 -0000
@@ -1,10 +1,10 @@
-MUSCLE_HDRS = -I/usr/local/include
-MUSCLE_LIBS = -L/usr/local/lib -lpcsclite -lcrypto -lpthread
+MUSCLE_HDRS = `pkg-config --cflags libpcsclite`
+MUSCLE_LIBS = `pkg-config --libs libpcsclite` -lcrypto -lpthread
 
-CFLAGS='-Wall -g $(MUSCLE_HDRS)'
-LFLAGS='$(MUSCLE_LIBS)'
+CFLAGS="-Wall -g $(MUSCLE_HDRS)"
+LFLAGS="$(MUSCLE_LIBS)"
 
-EXECS = testapdu
+EXECS = testapdu linuxmag
 
 all: $(EXECS)
 
@@ -13,6 +13,9 @@
 	gplc -c -C $(CFLAGS)  pcsc/muscle_c.c
 
 
+linuxmag: linuxmag.pl pcsc/muscle_c.o
+	gplc -o linuxmag pcsc/muscle_c.o  -L $(LFLAGS)  linuxmag.pl util_pcsc/util.pl
+
 testapdu: testapdu.pl pcsc/muscle_c.o
 	gplc -o testapdu pcsc/muscle_c.o  -L $(LFLAGS)  testapdu.pl util_pcsc/util.pl
 
Index: pcsc/muscle_c.c
===================================================================
RCS file: /cvsroot/gprolog/contribs/gplpcsc/pcsc/muscle_c.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 muscle_c.c
--- pcsc/muscle_c.c	12 Apr 2002 13:24:46 -0000	1.1.1.1
+++ pcsc/muscle_c.c	1 Oct 2008 19:46:14 -0000
@@ -32,7 +32,7 @@
   LONG rv;
 
 	Set_C_Bip_Name("scard_establish_context", 2);
-	 rv = SCardEstablishContext( SCARD_SCOPE_GLOBAL, pcHost, NULL, hContext );
+	 rv = SCardEstablishContext( SCARD_SCOPE_SYSTEM, pcHost, NULL, hContext );
   if ( rv != SCARD_S_SUCCESS ) {
 		raise_sys_error(rv);
   }
@@ -125,7 +125,7 @@
 }
 
 Bool 
-scard_status_C(long hCard, long* state, PlTerm atrL)
+scard_status_C(long hCard, unsigned long* state, PlTerm atrL)
 {
   LONG rv;
 	DWORD dwProtocol, cbAtrLen, dwReaders = MAX_READERNAME;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.