1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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.
This commit is contained in:
Werner Koch 2014-05-02 08:06:10 +02:00
parent 8416c875a7
commit 84289e85c7
9 changed files with 42 additions and 68 deletions

View file

@ -156,18 +156,12 @@ _init_common_subsystems (gpg_err_source_t errsource, int *argcp, char ***argvp)
#ifdef HAVE_W32_SYSTEM
/* For W32 we need to initialize the socket layer. This is because
we use recv and send in libassuan as well as at some other
places. If we are building with PTH we let pth_init do it. We
can't do much on error so we ignore them. An error would anyway
later pop up if one of the socket functions is used. */
# ifdef HAVE_NPTH
pth_init ();
# else
places. */
{
WSADATA wsadat;
WSAStartup (0x202, &wsadat);
}
# endif /*!HAVE_NPTH*/
#endif
#ifdef HAVE_W32CE_SYSTEM