From bc6b452129178658da7241903ca2174c79281752 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 22 Jul 2014 16:16:33 +0200 Subject: [PATCH] scd: Do not use the pcsc-wrapper. * scd/apdu.c (NEED_PCSC_WRAPPER): Do not define. * scd/Makefile.am (libexec_PROGRAMS): Remove gnupg-pcsc-wrapper (gnupg_pcsc_wrapper_SOURCES): Remove. (gnupg_pcsc_wrapper_LDADD): Remove. (gnupg_pcsc_wrapper_CFLAGS): Remove. --- scd/Makefile.am | 7 ------- scd/apdu.c | 5 +++-- scd/pcsc-wrapper.c | 3 ++- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/scd/Makefile.am b/scd/Makefile.am index 577b4a092..215933afc 100644 --- a/scd/Makefile.am +++ b/scd/Makefile.am @@ -19,11 +19,7 @@ EXTRA_DIST = ChangeLog-2011 scdaemon-w32info.rc -if HAVE_W32_SYSTEM libexec_PROGRAMS = scdaemon -else -libexec_PROGRAMS = scdaemon gnupg-pcsc-wrapper -endif AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common @@ -72,6 +68,3 @@ scdaemon_LDADD = $(libcommonpth) ../gl/libgnu.a \ # $(LIBUSB_LIBS) \ # -lgpg-error @LIBINTL@ @DL_LIBS@ # -gnupg_pcsc_wrapper_SOURCES = pcsc-wrapper.c -gnupg_pcsc_wrapper_LDADD = $(DL_LIBS) -gnupg_pcsc_wrapper_CFLAGS = diff --git a/scd/apdu.c b/scd/apdu.c index c7d4735a5..609103f7e 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -66,8 +66,9 @@ #include "ccid-driver.h" /* Due to conflicting use of threading libraries we usually can't link - against libpcsclite. Instead we use a wrapper program. */ -#ifdef USE_NPTH + against libpcsclite if we are using Pth. Instead we use a wrapper + program. Note that with nPth there is no need for a wrapper. */ +#ifdef USE_PTH /* Right, plain old Pth. */ #if !defined(HAVE_W32_SYSTEM) && !defined(__CYGWIN__) #define NEED_PCSC_WRAPPER 1 #endif diff --git a/scd/pcsc-wrapper.c b/scd/pcsc-wrapper.c index e20e111a9..b3060e115 100644 --- a/scd/pcsc-wrapper.c +++ b/scd/pcsc-wrapper.c @@ -20,7 +20,8 @@ /* This wrapper is required to handle problems with the libpscslite library. That library assumes that pthreads are used and fails - badly if one tries to use it with a procerss using Pth. + badly if one tries to use it with a process using Pth. Note that + the wrapper is not required if nPth is used. The operation model is pretty simple: It reads requests from stdin and returns the answer on stdout. There is no direct mapping to the