GNUPG-1-9-BRANCH gnupg (11 files)
cvs user wk
cvs at cvs.gnupg.org
Sat Dec 18 19:48:53 CET 2004
Date: Saturday, December 18, 2004 @ 19:53:32
Author: wk
Path: /cvs/gnupg/gnupg
Tag: GNUPG-1-9-BRANCH
Modified: ChangeLog agent/ChangeLog agent/gpg-agent.c autogen.sh
common/exechelp.c configure.ac jnlib/ChangeLog jnlib/w32-pth.c
scd/ChangeLog scd/scdaemon.c sm/gpgsm.c
* configure.ac (AH_BOTTOM): Define EXEEXT_S.
* autogen.sh: Updated --build-w32 feature.
* gpg-agent.c (main): Remove special Pth initialize.
* w32-pth.c (pth_init): Reverse return values. Use TRUE and FALSE
constants.
(pth_kill, pth_mutex_acquire, pth_attr_set, pth_join, pth_cancel):
Ditto.
* scdaemon.c (main) [W32]: Remove special Pth initialize..
-------------------+
ChangeLog | 6 ++
agent/ChangeLog | 2
agent/gpg-agent.c | 6 --
autogen.sh | 98 +++++++++++++++++++++++-----------------------
common/exechelp.c | 2
configure.ac | 12 +++--
jnlib/ChangeLog | 7 +++
jnlib/w32-pth.c | 110 +++++++++++++++++++++++++++++++++-------------------
scd/ChangeLog | 2
scd/scdaemon.c | 6 --
sm/gpgsm.c | 1
11 files changed, 147 insertions(+), 105 deletions(-)
Index: gnupg/ChangeLog
diff -u gnupg/ChangeLog:1.131.2.61 gnupg/ChangeLog:1.131.2.62
--- gnupg/ChangeLog:1.131.2.61 Wed Dec 15 15:15:09 2004
+++ gnupg/ChangeLog Sat Dec 18 19:53:32 2004
@@ -1,3 +1,9 @@
+2004-12-18 Werner Koch <wk at g10code.com>
+
+ * configure.ac (AH_BOTTOM): Define EXEEXT_S.
+
+ * autogen.sh: Updated --build-w32 feature.
+
2004-12-15 Werner Koch <wk at g10code.com>
* Makefile.am (SUBDIRS) [W32]: Do not build in tests/.
Index: gnupg/agent/ChangeLog
diff -u gnupg/agent/ChangeLog:1.59.2.47 gnupg/agent/ChangeLog:1.59.2.48
--- gnupg/agent/ChangeLog:1.59.2.47 Sat Dec 18 11:22:10 2004
+++ gnupg/agent/ChangeLog Sat Dec 18 19:53:32 2004
@@ -1,5 +1,7 @@
2004-12-18 Werner Koch <wk at g10code.com>
+ * gpg-agent.c (main): Remove special Pth initialize.
+
* agent.h (map_assuan_err): Define in terms of
map_assuan_err_with_source.
Index: gnupg/agent/gpg-agent.c
diff -u gnupg/agent/gpg-agent.c:1.31.2.24 gnupg/agent/gpg-agent.c:1.31.2.25
--- gnupg/agent/gpg-agent.c:1.31.2.24 Wed Dec 15 15:15:09 2004
+++ gnupg/agent/gpg-agent.c Sat Dec 18 19:53:32 2004
@@ -179,9 +179,7 @@
static void handle_connections (int listen_fd);
/* Pth wrapper function definitions. */
-#ifndef HAVE_W32_SYSTEM
GCRY_THREAD_OPTION_PTH_IMPL;
-#endif
#endif /*USE_GNU_PTH*/
static void check_for_running_agent (void);
@@ -439,16 +437,12 @@
/* Libgcrypt requires us to register the threading model first.
Note that this will also do the pth_init. */
#ifdef USE_GNU_PTH
-# ifdef HAVE_W32_SYSTEM
- pth_init ();
-# else /*!HAVE_W32_SYSTEM*/
err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
if (err)
{
log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
gpg_strerror (err));
}
-# endif/*!HAVE_W32_SYSTEM*/
#endif /*USE_GNU_PTH*/
/* Check that the libraries are suitable. Do it here because
Index: gnupg/autogen.sh
diff -u gnupg/autogen.sh:1.2.4.6 gnupg/autogen.sh:1.2.4.7
--- gnupg/autogen.sh:1.2.4.6 Mon Apr 19 16:15:57 2004
+++ gnupg/autogen.sh Sat Dec 18 19:53:32 2004
@@ -40,64 +40,66 @@
DIE=no
-if [ "$1" = "--build-w32" ]; then
+# ***** W32 build script *******
+# Used to cross-compile for Windows.
+if test "$1" = "--build-w32"; then
+ tmp=`dirname $0`
+ tsdir=`cd "$tmp"; pwd`
shift
- target=i386--mingw32
- if [ ! -f ./config.guess ]; then
- echo "./config.guess not found" >&2
- exit 1
- fi
- host=`./config.guess`
-
- if ! mingw32 --version >/dev/null; then
- echo "We need at least version 0.3 of MingW32/CPD" >&2
+ if [ ! -f $tsdir/scripts/config.guess ]; then
+ echo "$tsdir/scripts/config.guess not found" >&2
exit 1
fi
+ build=`$tsdir/scripts/config.guess`
- if [ -f config.h ]; then
- if grep HAVE_DOSISH_SYSTEM config.h | grep undef >/dev/null; then
+ [ -z "$w32root" ] && w32root="$HOME/w32root"
+ echo "Using $w32root as standard install directory" >&2
+
+ # See whether we have the Debian cross compiler package or the
+ # old mingw32/cpd system
+ if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then
+ host=i586-mingw32msvc
+ crossbindir=/usr/$host/bin
+ else
+ host=i386--mingw32
+ if ! mingw32 --version >/dev/null; then
+ echo "We need at least version 0.3 of MingW32/CPD" >&2
+ exit 1
+ fi
+ crossbindir=`mingw32 --install-dir`/bin
+ # Old autoconf version required us to setup the environment
+ # with the proper tool names.
+ CC=`mingw32 --get-path gcc`
+ CPP=`mingw32 --get-path cpp`
+ AR=`mingw32 --get-path ar`
+ RANLIB=`mingw32 --get-path ranlib`
+ export CC CPP AR RANLIB
+ fi
+
+ if [ -f "$tsdir/config.log" ]; then
+ if ! head $tsdir/config.log | grep "$host" >/dev/null; then
echo "Pease run a 'make distclean' first" >&2
exit 1
fi
fi
- crossinstalldir=`mingw32 --install-dir`
- crossbindir=`mingw32 --get-bindir 2>/dev/null` \
- || crossbindir="$crossinstalldir/bin"
- crossdatadir=`mingw32 --get-datadir 2>/dev/null` \
- || crossdatadir="$crossinstalldir/share"
- crosslibdir=`mingw32 --get-libdir 2>/dev/null` \
- || crosslibdir="$crossinstalldir/i386--mingw32/lib"
- crossincdir=`mingw32 --get-includedir 2>/dev/null` \
- || crossincdir="$crossinstalldir/i386--mingw32/include"
- CC=`mingw32 --get-path gcc`
- CPP=`mingw32 --get-path cpp`
- AR=`mingw32 --get-path ar`
- RANLIB=`mingw32 --get-path ranlib`
- export CC CPP AR RANLIB
-
- disable_foo_tests=""
- if [ -n "$lib_config_files" ]; then
- for i in $lib_config_files; do
- j=`echo $i | tr '[a-z-]' '[A-Z_]'`
- eval "$j=${crossbindir}/$i"
- export $j
- disable_foo_tests="$disable_foo_tests --disable-`echo $i| \
- sed 's,-config$,,'`-test"
- if [ ! -f "${crossbindir}/$i" ]; then
- echo "$i not installed for MingW32" >&2
- DIE=yes
- fi
- done
- fi
- [ $DIE = yes ] && exit 1
-
- ./configure --host=${host} --target=${target} ${disable_foo_tests} \
- --bindir=${crossbindir} --libdir=${crosslibdir} \
- --datadir=${crossdatadir} --includedir=${crossincdir} \
- --enable-maintainer-mode $*
- exit $?
+ ./configure --enable-maintainer-mode --prefix=${w32root} \
+ --host=i586-mingw32msvc --build=${build} \
+ --with-gpg-error-prefix=${w32root} \
+ --with-ksba-prefix=${w32root} \
+ --with-libgcrypt-prefix=${w32root} \
+ --with-libassuan-prefix=${w32root} \
+ --with-zlib=${w32root} \
+ --with-pth-prefix=${w32root}
+ rc=$?
+ # Ugly hack to overcome a gettext problem. Someone should look into
+ # gettext to figure out why the po directory is not ignored as it used
+ # to be.
+ [ $rc = 0 ] && touch $tsdir/po/all
+ exit $rc
fi
+# ***** end W32 build script *******
+
Index: gnupg/common/exechelp.c
diff -u gnupg/common/exechelp.c:1.1.2.2 gnupg/common/exechelp.c:1.1.2.3
--- gnupg/common/exechelp.c:1.1.2.2 Wed Dec 15 15:15:09 2004
+++ gnupg/common/exechelp.c Sat Dec 18 19:53:32 2004
@@ -231,7 +231,7 @@
cr_flags = (CREATE_DEFAULT_ERROR_MODE
| GetPriorityClass (GetCurrentProcess ())
| CREATE_SUSPENDED);
- log_debug ("CreateProcess, path=`%s' cmdline=`%s'", pgmname, cmdline);
+ log_debug ("CreateProcess, path=`%s' cmdline=`%s'\n", pgmname, cmdline);
if (!CreateProcess (pgmname, /* Program to start. */
cmdline, /* Command line arguments. */
&sec_attr, /* Process security attributes. */
Index: gnupg/configure.ac
diff -u gnupg/configure.ac:1.36.2.73 gnupg/configure.ac:1.36.2.74
--- gnupg/configure.ac:1.36.2.73 Wed Dec 15 15:15:09 2004
+++ gnupg/configure.ac Sat Dec 18 19:53:32 2004
@@ -255,11 +255,13 @@
#define EXTSEP_C '.'
#define DIRSEP_S "\\"
#define EXTSEP_S "."
+#define EXEEXT_S ".exe"
#else
#define DIRSEP_C '/'
#define EXTSEP_C '.'
#define DIRSEP_S "/"
#define EXTSEP_S "."
+#define EXEEXT_S ""
#endif
/* This is the same as VERSION, but should be overridden if the
@@ -283,20 +285,20 @@
/* Setup the hardwired names of modules. */
#ifndef GNUPG_DEFAULT_AGENT
-#define GNUPG_DEFAULT_AGENT ( GNUPG_BINDIR DIRSEP_S "gpg-agent" )
+#define GNUPG_DEFAULT_AGENT ( GNUPG_BINDIR DIRSEP_S "gpg-agent" EXEEXT_S )
#endif
#ifndef GNUPG_DEFAULT_PINENTRY
-#define GNUPG_DEFAULT_PINENTRY ( GNUPG_BINDIR DIRSEP_S "pinentry" )
+#define GNUPG_DEFAULT_PINENTRY ( GNUPG_BINDIR DIRSEP_S "pinentry" EXEEXT_S )
#endif
#ifndef GNUPG_DEFAULT_SCDAEMON
-#define GNUPG_DEFAULT_SCDAEMON ( GNUPG_BINDIR DIRSEP_S "scdaemon" )
+#define GNUPG_DEFAULT_SCDAEMON ( GNUPG_BINDIR DIRSEP_S "scdaemon" EXEEXT_S )
#endif
#ifndef GNUPG_DEFAULT_DIRMNGR
-#define GNUPG_DEFAULT_DIRMNGR ( GNUPG_BINDIR DIRSEP_S "dirmngr" )
+#define GNUPG_DEFAULT_DIRMNGR ( GNUPG_BINDIR DIRSEP_S "dirmngr" EXEEXT_S )
#endif
#ifndef GNUPG_DEFAULT_PROTECT_TOOL
#define GNUPG_DEFAULT_PROTECT_TOOL \
- ( GNUPG_LIBEXECDIR DIRSEP_S "gpg-protect-tool" )
+ ( GNUPG_LIBEXECDIR DIRSEP_S "gpg-protect-tool" EXEEXT_S )
#endif
Index: gnupg/jnlib/ChangeLog
diff -u gnupg/jnlib/ChangeLog:1.3.2.27 gnupg/jnlib/ChangeLog:1.3.2.28
--- gnupg/jnlib/ChangeLog:1.3.2.27 Wed Dec 15 15:15:08 2004
+++ gnupg/jnlib/ChangeLog Sat Dec 18 19:53:32 2004
@@ -1,3 +1,10 @@
+2004-12-18 Werner Koch <wk at g10code.com>
+
+ * w32-pth.c (pth_init): Reverse return values. Use TRUE and FALSE
+ constants.
+ (pth_kill, pth_mutex_acquire, pth_attr_set, pth_join, pth_cancel):
+ Ditto.
+
2004-12-15 Werner Koch <wk at g10code.com>
* logging.c [W32]: Don't include unavailable headers.
Index: gnupg/jnlib/w32-pth.c
diff -u gnupg/jnlib/w32-pth.c:1.1.2.7 gnupg/jnlib/w32-pth.c:1.1.2.8
--- gnupg/jnlib/w32-pth.c:1.1.2.7 Tue Dec 14 20:20:36 2004
+++ gnupg/jnlib/w32-pth.c Sat Dec 18 19:53:32 2004
@@ -33,11 +33,24 @@
#include <io.h>
#include <signal.h>
+#include "logging.h" /* For log_get_prefix () */
+
/* We don't want to have any Windows specific code in the header, thus
we use a macro which defaults to a compatible type in w32-pth.h. */
#define W32_PTH_HANDLE_INTERNAL HANDLE
#include "w32-pth.h"
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#if FALSE != 0 || TRUE != 1
+#error TRUE or FALSE defined to wrong values
+#endif
+
+
static int pth_initialized = 0;
@@ -107,10 +120,12 @@
SECURITY_ATTRIBUTES sa;
WSADATA wsadat;
- fprintf (stderr, "pth_init: called.\n");
- pth_initialized = 1;
+ if (pth_initialized)
+ return TRUE;
+
+ fprintf (stderr, "%s: pth_init: called.\n", log_get_prefix (NULL));
if (WSAStartup (0x202, &wsadat))
- abort ();
+ return FALSE;
pth_signo = 0;
InitializeCriticalSection (&pth_shd);
if (pth_signo_ev)
@@ -121,9 +136,11 @@
sa.nLength = sizeof sa;
pth_signo_ev = CreateEvent (&sa, TRUE, FALSE, NULL);
if (!pth_signo_ev)
- abort ();
+ return FALSE;
+
+ pth_initialized = 1;
EnterCriticalSection (&pth_shd);
- return 0;
+ return TRUE;
}
@@ -140,7 +157,7 @@
DeleteCriticalSection (&pth_shd);
WSACleanup ();
pth_initialized = 0;
- return 0;
+ return TRUE;
}
@@ -160,7 +177,8 @@
{
/* Fixme: I am not sure whether the same thread my enter a critical
section twice. */
- fprintf (stderr, "enter_pth (%s)\n", function? function:"");
+/* fprintf (stderr, "%s: enter_pth (%s)\n",
+ log_get_prefix (NULL), function? function:""); */
LeaveCriticalSection (&pth_shd);
}
@@ -169,7 +187,8 @@
leave_pth (const char *function)
{
EnterCriticalSection (&pth_shd);
- fprintf (stderr, "leave_pth (%s)\n", function? function:"");
+/* fprintf (stderr, "%s: leave_pth (%s)\n",
+ log_get_prefix (NULL), function? function:""); */
}
@@ -234,7 +253,8 @@
{
char strerr[256];
- fprintf (stderr, "pth_read(%d) failed read from file: %s\n", fd,
+ fprintf (stderr, "%s: pth_read(%d) failed read from file: %s\n",
+ log_get_prefix (NULL), fd,
w32_strerror (strerr, sizeof strerr));
n = -1;
}
@@ -273,7 +293,8 @@
n = WriteFile ((HANDLE)fd, buffer, size, &nwrite, NULL);
if (!n)
{
- fprintf (stderr, "pth_write(%d) failed in write: %s\n", fd,
+ fprintf (stderr, "%s: pth_write(%d) failed in write: %s\n",
+ log_get_prefix (NULL), fd,
w32_strerror (strerr, sizeof strerr));
n = -1;
}
@@ -437,7 +458,7 @@
if (!hd || !hd->mx)
{
leave_pth (__FUNCTION__);
- return -1;
+ return FALSE;
}
#if 0
@@ -488,7 +509,7 @@
hd->mx_state |= PTH_MUTEX_LOCKED;
leave_pth (__FUNCTION__);
- return 0;
+ return TRUE;
}
@@ -513,7 +534,7 @@
hd->mx_state = PTH_MUTEX_INITIALIZED;
leave_pth (__FUNCTION__);
- return 0;
+ return TRUE;
}
@@ -537,7 +558,7 @@
if (hd->name)
free (hd->name);
free (hd);
- return 0;
+ return TRUE;
}
@@ -547,7 +568,7 @@
va_list args;
char * str;
int val;
- int rc = 0;
+ int rc = TRUE;
implicit_init ();
@@ -559,7 +580,8 @@
if (val)
{
hd->flags |= PTH_ATTR_JOINABLE;
- fprintf (stderr, "pth_attr_set: PTH_ATTR_JOINABLE\n");
+ fprintf (stderr, "%s: pth_attr_set: PTH_ATTR_JOINABLE\n",
+ log_get_prefix (NULL));
}
break;
@@ -569,7 +591,8 @@
{
hd->flags |= PTH_ATTR_STACK_SIZE;
hd->stack_size = val;
- fprintf (stderr, "pth_attr_set: PTH_ATTR_STACK_SIZE %d\n", val);
+ fprintf (stderr, "%s: pth_attr_set: PTH_ATTR_STACK_SIZE %d\n",
+ log_get_prefix (NULL), val);
}
break;
@@ -581,14 +604,15 @@
{
hd->name = strdup (str);
if (!hd->name)
- return -1;
+ return FALSE;
hd->flags |= PTH_ATTR_NAME;
- fprintf (stderr, "pth_attr_set: PTH_ATTR_NAME %s\n", hd->name);
+ fprintf (stderr, "%s: pth_attr_set: PTH_ATTR_NAME %s\n",
+ log_get_prefix (NULL), hd->name);
}
break;
default:
- rc = -1;
+ rc = FALSE;
break;
}
va_end (args);
@@ -627,12 +651,14 @@
FIXME: We should no use th W32's Thread handle directly but keep
our own thread control structure. CTX may be used for that. */
- fprintf (stderr, "do_pth_spawn creating thread ...\n");
+ fprintf (stderr, "%s: do_pth_spawn creating thread ...\n",
+ log_get_prefix (NULL));
th = CreateThread (&sa, hd->stack_size,
(LPTHREAD_START_ROUTINE)launch_thread,
ctx, CREATE_SUSPENDED, &tid);
ctx->th = th;
- fprintf (stderr, "do_pth_spawn created thread %p\n", th);
+ fprintf (stderr, "%s: do_pth_spawn created thread %p\n",
+ log_get_prefix (NULL),th);
if (!th)
free (ctx);
else
@@ -660,7 +686,7 @@
int
pth_join (pth_t hd, void **value)
{
- return 0;
+ return TRUE;
}
@@ -675,7 +701,7 @@
WaitForSingleObject (hd, 1000);
TerminateThread (hd, 0);
leave_pth (__FUNCTION__);
- return 0;
+ return TRUE;
}
@@ -689,7 +715,7 @@
enter_pth (__FUNCTION__);
TerminateThread (hd, 0);
leave_pth (__FUNCTION__);
- return 0;
+ return TRUE;
}
@@ -759,7 +785,7 @@
case CTRL_BREAK_EVENT: pth_signo = SIGTERM; break;
}
SetEvent (pth_signo_ev);
- fprintf (stderr, "sig_handler=%d\n", pth_signo);
+ fprintf (stderr, "%s: sig_handler=%d\n", log_get_prefix (NULL), pth_signo);
return TRUE;
}
@@ -771,7 +797,7 @@
pth_event_t ev;
int rc;
- fprintf (stderr, "pth_event spec=%lu\n", spec);
+ fprintf (stderr, "%s: pth_event spec=%lu\n", log_get_prefix (NULL), spec);
ev = calloc (1, sizeof *ev);
if (!ev)
return NULL;
@@ -783,7 +809,8 @@
ev->u_type = PTH_EVENT_SIGS;
ev->val = va_arg (arg, int *);
rc = SetConsoleCtrlHandler (sig_handler, TRUE);
- fprintf (stderr, "pth_event: sigs rc=%d\n", rc);
+ fprintf (stderr, "%s: pth_event: sigs rc=%d\n",
+ log_get_prefix (NULL), rc);
}
else if (spec & PTH_EVENT_FD)
{
@@ -794,7 +821,8 @@
ev->u_type = PTH_EVENT_FD;
va_arg (arg, pth_key_t);
ev->u.fd = va_arg (arg, int);
- fprintf (stderr, "pth_event: fd=%d\n", ev->u.fd);
+ fprintf (stderr, "%s: pth_event: fd=%d\n",
+ log_get_prefix (NULL), ev->u.fd);
}
else if (spec & PTH_EVENT_TIME)
{
@@ -908,7 +936,8 @@
while (1)
{
n = select (fd+1, &r, &w, NULL, &tv);
- fprintf (stderr, "wait_for_fd=%d fd %d (ec=%d)\n", n, fd,(int)WSAGetLastError ());
+ fprintf (stderr, "%s: wait_for_fd=%d fd %d (ec=%d)\n",
+ log_get_prefix (NULL), n, fd,(int)WSAGetLastError ());
if (n == -1)
break;
if (!n)
@@ -1005,7 +1034,8 @@
if (sigpresent (ev->u.sig, pth_signo) &&
WaitForSingleObject (pth_signo_ev, 0) == WAIT_OBJECT_0)
{
- fprintf (stderr, "pth_event_occurred: sig signaled.\n");
+ fprintf (stderr, "%s: pth_event_occurred: sig signaled.\n",
+ log_get_prefix (NULL));
(*ev->val) = pth_signo;
ret = 1;
}
@@ -1080,7 +1110,7 @@
free (ev);
}
- return 0;
+ return TRUE;
}
int
@@ -1134,11 +1164,13 @@
sa.lpSecurityDescriptor = NULL;
sa.nLength = sizeof sa;
- fprintf (stderr, "spawn_helper_thread creating thread ...\n");
+ fprintf (stderr, "%s: spawn_helper_thread creating thread ...\n",
+ log_get_prefix (NULL));
th = CreateThread (&sa, 32*1024,
(LPTHREAD_START_ROUTINE)func,
arg, 0, &tid);
- fprintf (stderr, "spawn_helper_thread created thread %p\n", th);
+ fprintf (stderr, "%s: spawn_helper_thread created thread %p\n",
+ log_get_prefix (NULL), th);
return th;
}
@@ -1163,7 +1195,7 @@
pth_event_t ev = ctx;
wait_for_fd (ev->u.fd, ev->flags & PTH_UNTIL_FD_READABLE, 3600);
- fprintf (stderr, "wait_fd_thread: exit.\n");
+ fprintf (stderr, "%s: wait_fd_thread: exit.\n", log_get_prefix (NULL));
SetEvent (ev->hd);
ExitThread (0);
return NULL;
@@ -1177,7 +1209,7 @@
int n = ev->u.tv.tv_sec*1000;
Sleep (n);
SetEvent (ev->hd);
- fprintf (stderr, "wait_timer_thread: exit.\n");
+ fprintf (stderr, "%s: wait_timer_thread: exit.\n", log_get_prefix (NULL));
ExitThread (0);
return NULL;
}
@@ -1199,7 +1231,7 @@
if (n > MAXIMUM_WAIT_OBJECTS/2)
return -1;
- fprintf (stderr, "pth_wait: cnt %lu\n", n);
+ fprintf (stderr, "%s: pth_wait: cnt %lu\n", log_get_prefix (NULL), n);
for (tmp = ev; tmp; tmp = tmp->next)
{
switch (tmp->u_type)
@@ -1233,10 +1265,10 @@
break;
}
}
- fprintf (stderr, "pth_wait: set %d\n", pos);
+ fprintf (stderr, "%s: pth_wait: set %d\n", log_get_prefix (NULL), pos);
n = WaitForMultipleObjects (pos, waitbuf, FALSE, INFINITE);
free_helper_threads (waitbuf, hdidx, i);
- fprintf (stderr, "pth_wait: n %ld\n", n);
+ fprintf (stderr, "%s: pth_wait: n %ld\n", log_get_prefix (NULL), n);
if (n != WAIT_TIMEOUT)
return 1;
Index: gnupg/scd/ChangeLog
diff -u gnupg/scd/ChangeLog:1.25.2.61 gnupg/scd/ChangeLog:1.25.2.62
--- gnupg/scd/ChangeLog:1.25.2.61 Sat Dec 18 11:22:09 2004
+++ gnupg/scd/ChangeLog Sat Dec 18 19:53:31 2004
@@ -1,5 +1,7 @@
2004-12-18 Werner Koch <wk at g10code.com>
+ * scdaemon.c (main) [W32]: Remove special Pth initialize..
+
* scdaemon.h (map_assuan_err): Define in terms of
map_assuan_err_with_source.
Index: gnupg/scd/scdaemon.c
diff -u gnupg/scd/scdaemon.c:1.12.2.21 gnupg/scd/scdaemon.c:1.12.2.22
--- gnupg/scd/scdaemon.c:1.12.2.21 Wed Dec 15 15:15:08 2004
+++ gnupg/scd/scdaemon.c Sat Dec 18 19:53:31 2004
@@ -158,10 +158,8 @@
#ifndef HAVE_OPENSC
#ifdef USE_GNU_PTH
-#ifndef HAVE_W32_SYSTEM
/* Pth wrapper function definitions. */
GCRY_THREAD_OPTION_PTH_IMPL;
-#endif
static void *ticker_thread (void *arg);
#endif /*USE_GNU_PTH*/
@@ -353,16 +351,12 @@
Note that this will also do the pth_init. */
#ifndef HAVE_OPENSC
#ifdef USE_GNU_PTH
-# ifdef HAVE_W32_SYSTEM
- pth_init ();
-# else /*!HAVE_W32_SYSTEM*/
err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
if (err)
{
log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
gpg_strerror (err));
}
-# endif /*!HAVE_W32_SYSTEM*/
#endif /*USE_GNU_PTH*/
#endif /*!HAVE_OPENSC*/
Index: gnupg/sm/gpgsm.c
diff -u gnupg/sm/gpgsm.c:1.67.2.34 gnupg/sm/gpgsm.c:1.67.2.35
--- gnupg/sm/gpgsm.c:1.67.2.34 Wed Dec 15 15:15:08 2004
+++ gnupg/sm/gpgsm.c Sat Dec 18 19:53:31 2004
@@ -740,6 +740,7 @@
}
#ifdef HAVE_W32_SYSTEM
+ /* For W32 we need pth. */
pth_init ();
#endif
More information about the Gnupg-commits
mailing list