diff options
author | Marcus Brinkmann <[email protected]> | 2012-01-03 21:12:37 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2012-01-25 13:07:08 +0000 |
commit | e917c07b2664bb01a5f7b5975723b90da0f396c9 (patch) | |
tree | e31e737fe07e96b596f8bbbaf16a1e122ac683ae /common/http.c | |
parent | Require gitlog-to-changelog to be installed. (diff) | |
download | gnupg-npth-3.tar.gz gnupg-npth-3.zip |
Port to npth.npth-3
* configure.ac: Don't check for PTH but for NPTH.
(AH_BOTTOM): Remove PTH_SYSCALL_SOFT.
(have_pth): Rename to ...
(have_npth): ... this.
(USE_GNU_NPTH): Rename to ...
(USE_GNU_PTH): ... this.
* m4/npth.m4: New file.
* agent/Makefile.am, agent/cache.c, agent/call-pinentry.c,
agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c,
agent/trustlist.c, common/Makefile.am, common/estream.c,
common/exechelp-posix.c, common/exechelp-w32.c,
common/exechelp-w32ce.c, common/http.c, common/init.c,
common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c,
dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c,
dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am,
g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am,
scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c,
scd/scdaemon.c, tools/Makefile.am: Port to npth.
Diffstat (limited to 'common/http.c')
-rw-r--r-- | common/http.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/common/http.c b/common/http.c index 7df84576f..ac5928bc1 100644 --- a/common/http.c +++ b/common/http.c @@ -59,13 +59,13 @@ # include <netdb.h> #endif /*!HAVE_W32_SYSTEM*/ -#ifdef WITHOUT_GNU_PTH /* Give the Makefile a chance to build without Pth. */ -# undef HAVE_PTH -# undef USE_GNU_PTH +#ifdef WITHOUT_NPTH /* Give the Makefile a chance to build without Pth. */ +# undef HAVE_NPTH +# undef USE_NPTH #endif -#ifdef HAVE_PTH -# include <pth.h> +#ifdef HAVE_NPTH +# include <npth.h> #endif @@ -105,7 +105,7 @@ struct srventry #endif/*!USE_DNS_SRV*/ -#ifdef HAVE_PTH +#ifdef HAVE_NPTH # define my_select(a,b,c,d,e) pth_select ((a), (b), (c), (d), (e)) # define my_connect(a,b,c) pth_connect ((a), (b), (c)) # define my_accept(a,b,c) pth_accept ((a), (b), (c)) @@ -1887,15 +1887,15 @@ write_server (int sock, const char *data, size_t length) nleft = length; while (nleft > 0) { -#if defined(HAVE_W32_SYSTEM) && !defined(HAVE_PTH) +#if defined(HAVE_W32_SYSTEM) && !defined(HAVE_NPTH) nwritten = send (sock, data, nleft, 0); if ( nwritten == SOCKET_ERROR ) { log_info ("network write failed: ec=%d\n", (int)WSAGetLastError ()); return gpg_error (GPG_ERR_NETWORK); } -#else /*!HAVE_W32_SYSTEM || HAVE_PTH*/ -# ifdef HAVE_PTH +#else /*!HAVE_W32_SYSTEM || HAVE_NPTH*/ +# ifdef HAVE_NPTH nwritten = pth_write (sock, data, nleft); # else nwritten = write (sock, data, nleft); @@ -1916,7 +1916,7 @@ write_server (int sock, const char *data, size_t length) log_info ("network write failed: %s\n", strerror (errno)); return gpg_error_from_syserror (); } -#endif /*!HAVE_W32_SYSTEM || HAVE_PTH*/ +#endif /*!HAVE_W32_SYSTEM || HAVE_NPTH*/ nleft -= nwritten; data += nwritten; } @@ -1971,7 +1971,7 @@ cookie_read (void *cookie, void *buffer, size_t size) { do { -#ifdef HAVE_PTH +#ifdef HAVE_NPTH nread = pth_read (c->sock->fd, buffer, size); #elif defined(HAVE_W32_SYSTEM) /* Under Windows we need to use recv for a socket. */ |