From 44bf2d0ae4adbcf5b6b404bfc6526c461ae6a92a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 22 Jul 2004 10:52:56 +0000 Subject: * configure.ac: Define AM conditional HAVE_OPENSC. * Makefile.am: Make OpenSC lib link after libgcrypt. Do not link to pth. * apdu.c: Don't use Pth if we use OpenSC. * sc-investigate.c, scdaemon.c: Disable use of pth if OpenSC is used. * scdaemon.c (main): Bumbed thread stack size up to 512k. --- scd/sc-investigate.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scd/sc-investigate.c') diff --git a/scd/sc-investigate.c b/scd/sc-investigate.c index be985533c..8d34ab77e 100644 --- a/scd/sc-investigate.c +++ b/scd/sc-investigate.c @@ -90,12 +90,12 @@ static ARGPARSE_OPTS opts[] = { {0} }; - +#ifndef HAVE_OPENSC #ifdef USE_GNU_PTH /* Pth wrapper function definitions. */ GCRY_THREAD_OPTION_PTH_IMPL; #endif /*USE_GNU_PTH*/ - +#endif /*!HAVE_OPENSC*/ static void interactive_shell (int slot); static void dump_other_cards (int slot); @@ -160,8 +160,10 @@ main (int argc, char **argv ) /* Try to auto set the character set. */ set_native_charset (NULL); - /* Libgcrypt requires us to register the threading model first. - Note that this will also do the pth_init. */ + /* Libgcrypt requires us to register the threading model first. We + can't use pth at all if we are using OpenSC becuase OpenSC uses + ptreads. Note that this will also do the pth_init. */ +#ifndef HAVE_OPENSC #ifdef USE_GNU_PTH rc = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth); if (rc) @@ -170,6 +172,7 @@ main (int argc, char **argv ) gpg_strerror (rc)); } #endif /*USE_GNU_PTH*/ +#endif /*!HAVE_OPENSC*/ /* Check that the libraries are suitable. Do it here because the option parsing may need services of the library */ -- cgit v1.2.3