From 84289e85c72ae58c321dfdb96816700a6b7f7122 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 2 May 2014 08:06:10 +0200 Subject: common: Cleanup the use of USE_NPTH and HAVE_NPTH macros. * configure.ac (HAVE_NPTH): New ac_define. * common/estream.c: Use USE_NPTH instead of HAVE_NPTH. * common/http.c: Ditto. Replace remaining calls to pth by npth calls. (connect_server): Remove useless _(). * common/exechelp-posix.c, common/exechelp-w32.c * common/exechelp-w32ce.c: Use HAVE_PTH to include npth.h. * common/init.c (_init_common_subsystems): Remove call to pth_init. * common/sysutils.c (gnupg_sleep): Use npth_sleep. * scd/ccid-driver.c (my_sleep): Ditto. -- USE_NPTH is used in case were we may build with and without nPth. The missing definition HAVE_NPTH didn't allowed us to build outher sources with nPTh support. --- scd/ccid-driver.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'scd') diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index 0ac5aaf90..60ac5766b 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -315,18 +315,8 @@ set_msg_len (unsigned char *msg, unsigned int length) static void my_sleep (int seconds) { -#ifdef HAVE_NPTH - /* With Pth we also call the standard sleep(0) so that the process - may give up its timeslot. */ - if (!seconds) - { -# ifdef HAVE_W32_SYSTEM - Sleep (0); -# else - sleep (0); -# endif - } - pth_sleep (seconds); +#ifdef USE_NPTH + npth_sleep (seconds); #else # ifdef HAVE_W32_SYSTEM Sleep (seconds*1000); -- cgit v1.2.3