[PATCH 19/28] Rename HAVE_GNUTLS to WITH_GNUTLS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

---
 configure.ac                  |  4 ++--
 daemon/libvirtd.c             | 14 +++++++-------
 daemon/remote.c               |  2 +-
 src/Makefile.am               |  2 +-
 src/libvirt.c                 |  8 ++++----
 src/locking/lock_daemon.c     |  4 ++--
 src/lxc/lxc_controller.c      |  2 +-
 src/qemu/qemu_migration.c     | 10 +++++-----
 src/remote/remote_driver.c    | 10 +++++-----
 src/rpc/virnetclient.c        | 12 ++++++------
 src/rpc/virnetclient.h        |  6 +++---
 src/rpc/virnetserver.c        |  6 +++---
 src/rpc/virnetserver.h        |  4 ++--
 src/rpc/virnetserverclient.c  | 40 ++++++++++++++++++++--------------------
 src/rpc/virnetserverclient.h  |  4 ++--
 src/rpc/virnetserverservice.c | 18 +++++++++---------
 src/rpc/virnetserverservice.h |  8 ++++----
 src/rpc/virnetsocket.c        | 16 ++++++++--------
 src/rpc/virnetsocket.h        |  4 ++--
 tests/Makefile.am             |  4 ++--
 20 files changed, 89 insertions(+), 89 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6b18ef0..cd00899 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1086,10 +1086,10 @@ if test "x$with_gnutls" != "xno"; then
 fi
 
 if test "x$with_gnutls" = "xyes" ; then
-  AC_DEFINE_UNQUOTED([HAVE_GNUTLS], 1,
+  AC_DEFINE_UNQUOTED([WITH_GNUTLS], 1,
       [whether GNUTLS is available for encryption])
 fi
-AM_CONDITIONAL([HAVE_GNUTLS], [test "x$with_gnutls" = "xyes"])
+AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_gnutls" = "xyes"])
 AC_SUBST([GNUTLS_CFLAGS])
 AC_SUBST([GNUTLS_LIBS])
 
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 7a51387..9cdf4d9 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -449,7 +449,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
     virNetServerServicePtr svc = NULL;
     virNetServerServicePtr svcRO = NULL;
     virNetServerServicePtr svcTCP = NULL;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetServerServicePtr svcTLS = NULL;
 #endif
     gid_t unix_sock_gid = 0;
@@ -476,7 +476,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
                                            unix_sock_rw_mask,
                                            unix_sock_gid,
                                            config->auth_unix_rw,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                            NULL,
 #endif
                                            false,
@@ -488,7 +488,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
                                                  unix_sock_ro_mask,
                                                  unix_sock_gid,
                                                  config->auth_unix_ro,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                  NULL,
 #endif
                                                  true,
@@ -513,7 +513,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
             if (!(svcTCP = virNetServerServiceNewTCP(config->listen_addr,
                                                      config->tcp_port,
                                                      config->auth_tcp,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                      NULL,
 #endif
                                                      false,
@@ -525,7 +525,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
                 goto error;
         }
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
         if (config->listen_tls) {
             virNetTLSContextPtr ctxt = NULL;
 
@@ -581,7 +581,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
 #if WITH_SASL
     if (config->auth_unix_rw == REMOTE_AUTH_SASL ||
         config->auth_unix_ro == REMOTE_AUTH_SASL ||
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
         config->auth_tls == REMOTE_AUTH_SASL ||
 # endif
         config->auth_tcp == REMOTE_AUTH_SASL) {
@@ -595,7 +595,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
     return 0;
 
 error:
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(svcTLS);
 #endif
     virObjectUnref(svcTCP);
diff --git a/daemon/remote.c b/daemon/remote.c
index 1a0af7e..7b1f8eb 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -2464,7 +2464,7 @@ remoteDispatchAuthSaslInit(virNetServerPtr server ATTRIBUTE_UNUSED,
     if (!sasl)
         goto authfail;
 
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
     /* Inform SASL that we've got an external SSF layer from TLS */
     if (virNetServerClientHasTLSSession(client)) {
         int ssf;
diff --git a/src/Makefile.am b/src/Makefile.am
index 8d6e53b..ede67e9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1779,7 +1779,7 @@ else
 EXTRA_DIST += \
 	rpc/virnetsshsession.h rpc/virnetsshsession.c
 endif
-if HAVE_GNUTLS
+if WITH_GNUTLS
 libvirt_net_rpc_la_SOURCES += \
 	rpc/virnettlscontext.h rpc/virnettlscontext.c
 else
diff --git a/src/libvirt.c b/src/libvirt.c
index a783fa6..1490738 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -55,7 +55,7 @@
 #include "configmake.h"
 #include "intprops.h"
 #include "virconf.h"
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 # include "rpc/virnettlscontext.h"
 #endif
 #include "vircommand.h"
@@ -271,7 +271,7 @@ winsock_init(void)
 #endif
 
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 static int virTLSMutexInit(void **priv)
 {
     virMutexPtr lock = NULL;
@@ -408,14 +408,14 @@ virGlobalInit(void)
         virErrorInitialize() < 0)
         goto error;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     gcry_control(GCRYCTL_SET_THREAD_CBS, &virTLSThreadImpl);
     gcry_check_version(NULL);
 #endif
 
     virLogSetFromEnv();
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     virNetTLSInit();
 #endif
 
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index ba42c00..f0eba48 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -655,7 +655,7 @@ virLockDaemonSetupNetworkingSystemD(virNetServerPtr srv)
     /* Systemd passes FDs, starting immediately after stderr,
      * so the first FD we'll get is '3'. */
     if (!(svc = virNetServerServiceNewFD(3, 0,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                          NULL,
 #endif
                                          false, 1)))
@@ -677,7 +677,7 @@ virLockDaemonSetupNetworkingNative(virNetServerPtr srv, const char *sock_path)
     VIR_DEBUG("Setting up networking natively");
 
     if (!(svc = virNetServerServiceNewUNIX(sock_path, 0700, 0, 0,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                            NULL,
 #endif
                                            false, 1)))
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 76b2986..2673f72 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -631,7 +631,7 @@ static int virLXCControllerSetupServer(virLXCControllerPtr ctrl)
                                            0700,
                                            0,
                                            0,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                            NULL,
 #endif
                                            false,
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index e235677..f17c7ff 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -23,7 +23,7 @@
 #include <config.h>
 
 #include <sys/time.h>
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 # include <gnutls/gnutls.h>
 # include <gnutls/x509.h>
 #endif
@@ -198,7 +198,7 @@ static void qemuMigrationCookieFree(qemuMigrationCookiePtr mig)
 }
 
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 static char *
 qemuDomainExtractTLSSubject(const char *certdir)
 {
@@ -276,7 +276,7 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
         if (!listenAddr)
             listenAddr = driver->vncListen;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
         if (driver->vncTLS &&
             !(mig->tlsSubject = qemuDomainExtractTLSSubject(driver->vncTLSx509certdir)))
             goto error;
@@ -291,7 +291,7 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
         if (!listenAddr)
             listenAddr = driver->spiceListen;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
         if (driver->spiceTLS &&
             !(mig->tlsSubject = qemuDomainExtractTLSSubject(driver->spiceTLSx509certdir)))
             goto error;
@@ -304,7 +304,7 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
 
 no_memory:
     virReportOOMError();
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 error:
 #endif
     qemuMigrationCookieGraphicsFree(mig);
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 862e474..dcb06c9 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -80,7 +80,7 @@ struct private_data {
 
     int counter; /* Serial number for RPC */
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     virNetTLSContextPtr tls;
 #endif
 
@@ -598,7 +598,7 @@ doRemoteOpen(virConnectPtr conn,
     /* Connect to the remote service. */
     switch (transport) {
     case trans_tls:
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
         priv->tls = virNetTLSContextNewClientPath(pkipath,
                                                   geteuid() != 0 ? true : false,
                                                   sanity, verify);
@@ -618,7 +618,7 @@ doRemoteOpen(virConnectPtr conn,
         if (!priv->client)
             goto failed;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
         if (priv->tls) {
             VIR_DEBUG("Starting TLS session");
             if (virNetClientSetTLSSession(priv->client, priv->tls) < 0)
@@ -1012,7 +1012,7 @@ doRemoteClose(virConnectPtr conn, struct private_data *priv)
              (xdrproc_t) xdr_void, (char *) NULL) == -1)
         ret = -1;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     virObjectUnref(priv->tls);
     priv->tls = NULL;
 #endif
@@ -3893,7 +3893,7 @@ remoteAuthSASL(virConnectPtr conn, struct private_data *priv,
                                             saslcb)))
         goto cleanup;
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
     /* Initialize some connection props we care about */
     if (priv->tls) {
         if ((ssf = virNetClientGetTLSKeySize(priv->client)) < 0)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 10ed4f0..69c4478 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -70,7 +70,7 @@ struct _virNetClient {
     virNetSocketPtr sock;
     bool asyncIO;
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetTLSSessionPtr tls;
 #endif
     char *hostname;
@@ -629,7 +629,7 @@ void virNetClientDispose(void *obj)
     if (client->sock)
         virNetSocketRemoveIOCallback(client->sock);
     virObjectUnref(client->sock);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(client->tls);
 #endif
 #if WITH_SASL
@@ -667,7 +667,7 @@ virNetClientCloseLocked(virNetClientPtr client)
 
     virObjectUnref(client->sock);
     client->sock = NULL;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(client->tls);
     client->tls = NULL;
 #endif
@@ -751,7 +751,7 @@ void virNetClientSetSASLSession(virNetClientPtr client,
 #endif
 
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 int virNetClientSetTLSSession(virNetClientPtr client,
                               virNetTLSContextPtr tls)
 {
@@ -860,7 +860,7 @@ bool virNetClientIsEncrypted(virNetClientPtr client)
 {
     bool ret = false;
     virNetClientLock(client);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (client->tls)
         ret = true;
 #endif
@@ -966,7 +966,7 @@ const char *virNetClientRemoteAddrString(virNetClientPtr client)
     return virNetSocketRemoteAddrString(client->sock);
 }
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 int virNetClientGetTLSKeySize(virNetClientPtr client)
 {
     int ret = 0;
diff --git a/src/rpc/virnetclient.h b/src/rpc/virnetclient.h
index 7e35b9c..99ea263 100644
--- a/src/rpc/virnetclient.h
+++ b/src/rpc/virnetclient.h
@@ -23,7 +23,7 @@
 #ifndef __VIR_NET_CLIENT_H__
 # define __VIR_NET_CLIENT_H__
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 #  include "virnettlscontext.h"
 # endif
 # include "virnetmessage.h"
@@ -109,7 +109,7 @@ void virNetClientSetSASLSession(virNetClientPtr client,
                                 virNetSASLSessionPtr sasl);
 # endif
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 int virNetClientSetTLSSession(virNetClientPtr client,
                               virNetTLSContextPtr tls);
 # endif
@@ -120,7 +120,7 @@ bool virNetClientIsOpen(virNetClientPtr client);
 const char *virNetClientLocalAddrString(virNetClientPtr client);
 const char *virNetClientRemoteAddrString(virNetClientPtr client);
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 int virNetClientGetTLSKeySize(virNetClientPtr client);
 # endif
 
diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index b9df71b..a937eda 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -98,7 +98,7 @@ struct _virNetServer {
 
     unsigned int quit :1;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     virNetTLSContextPtr tls;
 #endif
 
@@ -311,7 +311,7 @@ static int virNetServerDispatchNewClient(virNetServerServicePtr svc,
                                          virNetServerServiceGetAuth(svc),
                                          virNetServerServiceIsReadonly(svc),
                                          virNetServerServiceGetMaxRequests(svc),
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                          virNetServerServiceGetTLSContext(svc),
 #endif
                                          srv->clientPrivNew,
@@ -1038,7 +1038,7 @@ no_memory:
     return -1;
 }
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 int virNetServerSetTLSContext(virNetServerPtr srv,
                               virNetTLSContextPtr tls)
 {
diff --git a/src/rpc/virnetserver.h b/src/rpc/virnetserver.h
index d906dd1..1a85c02 100644
--- a/src/rpc/virnetserver.h
+++ b/src/rpc/virnetserver.h
@@ -26,7 +26,7 @@
 
 # include <signal.h>
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 #  include "virnettlscontext.h"
 # endif
 # include "virnetserverprogram.h"
@@ -81,7 +81,7 @@ int virNetServerAddService(virNetServerPtr srv,
 int virNetServerAddProgram(virNetServerPtr srv,
                            virNetServerProgramPtr prog);
 
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
 int virNetServerSetTLSContext(virNetServerPtr srv,
                               virNetTLSContextPtr tls);
 # endif
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index 05e0e06..bd4e66f 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -66,7 +66,7 @@ struct _virNetServerClient
     int auth;
     bool readonly;
     char *identity;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetTLSContextPtr tlsCtxt;
     virNetTLSSessionPtr tls;
 #endif
@@ -149,7 +149,7 @@ virNetServerClientCalculateHandleMode(virNetServerClientPtr client) {
 
 
     VIR_DEBUG("tls=%p hs=%d, rx=%p tx=%p",
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
               client->tls,
               client->tls ? virNetTLSSessionGetHandshakeStatus(client->tls) : -1,
 #else
@@ -160,7 +160,7 @@ virNetServerClientCalculateHandleMode(virNetServerClientPtr client) {
     if (!client->sock || client->wantClose)
         return 0;
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (client->tls) {
         switch (virNetTLSSessionGetHandshakeStatus(client->tls)) {
         case VIR_NET_TLS_HANDSHAKE_RECVING:
@@ -188,7 +188,7 @@ virNetServerClientCalculateHandleMode(virNetServerClientPtr client) {
            then monitor for writability on socket */
         if (client->tx)
             mode |= VIR_EVENT_HANDLE_WRITABLE;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     }
 #endif
     VIR_DEBUG("mode=%o", mode);
@@ -297,7 +297,7 @@ void virNetServerClientRemoveFilter(virNetServerClientPtr client,
 }
 
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 /* Check the client's access. */
 static int
 virNetServerClientCheckAccess(virNetServerClientPtr client)
@@ -353,7 +353,7 @@ static void virNetServerClientSockTimerFunc(int timer,
 static virNetServerClientPtr
 virNetServerClientNewInternal(virNetSocketPtr sock,
                               int auth,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
                               virNetTLSContextPtr tls,
 #endif
                               bool readonly,
@@ -375,7 +375,7 @@ virNetServerClientNewInternal(virNetSocketPtr sock,
     client->sock = virObjectRef(sock);
     client->auth = auth;
     client->readonly = readonly;
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     client->tlsCtxt = virObjectRef(tls);
 #endif
     client->nrequests_max = nrequests_max;
@@ -411,7 +411,7 @@ virNetServerClientPtr virNetServerClientNew(virNetSocketPtr sock,
                                             int auth,
                                             bool readonly,
                                             size_t nrequests_max,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
                                             virNetTLSContextPtr tls,
 #endif
                                             virNetServerClientPrivNew privNew,
@@ -422,7 +422,7 @@ virNetServerClientPtr virNetServerClientNew(virNetSocketPtr sock,
     virNetServerClientPtr client;
 
     VIR_DEBUG("sock=%p auth=%d tls=%p", sock, auth,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
               tls
 #else
               NULL
@@ -430,7 +430,7 @@ virNetServerClientPtr virNetServerClientNew(virNetSocketPtr sock,
         );
 
     if (!(client = virNetServerClientNewInternal(sock, auth,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
                                                  tls,
 #endif
                                                  readonly, nrequests_max)))
@@ -499,7 +499,7 @@ virNetServerClientPtr virNetServerClientNewPostExecRestart(virJSONValuePtr objec
 
     if (!(client = virNetServerClientNewInternal(sock,
                                                  auth,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
                                                  NULL,
 #endif
                                                  readonly,
@@ -602,7 +602,7 @@ bool virNetServerClientGetReadonly(virNetServerClientPtr client)
 }
 
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 bool virNetServerClientHasTLSSession(virNetServerClientPtr client)
 {
     bool has;
@@ -648,7 +648,7 @@ bool virNetServerClientIsSecure(virNetServerClientPtr client)
 {
     bool secure = false;
     virNetServerClientLock(client);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (client->tls)
         secure = true;
 #endif
@@ -765,7 +765,7 @@ void virNetServerClientDispose(void *obj)
 #endif
     if (client->sockTimer > 0)
         virEventRemoveTimeout(client->sockTimer);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(client->tls);
     virObjectUnref(client->tlsCtxt);
 #endif
@@ -821,7 +821,7 @@ void virNetServerClientClose(virNetServerClientPtr client)
     if (client->sock)
         virNetSocketRemoveIOCallback(client->sock);
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (client->tls) {
         virObjectUnref(client->tls);
         client->tls = NULL;
@@ -886,13 +886,13 @@ int virNetServerClientInit(virNetServerClientPtr client)
 {
     virNetServerClientLock(client);
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (!client->tlsCtxt) {
 #endif
         /* Plain socket, so prepare to read first message */
         if (virNetServerClientRegisterEvent(client) < 0)
             goto error;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     } else {
         int ret;
 
@@ -1224,7 +1224,7 @@ virNetServerClientDispatchWrite(virNetServerClientPtr client)
 }
 
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 static void
 virNetServerClientDispatchHandshake(virNetServerClientPtr client)
 {
@@ -1264,7 +1264,7 @@ virNetServerClientDispatchEvent(virNetSocketPtr sock, int events, void *opaque)
 
     if (events & (VIR_EVENT_HANDLE_WRITABLE |
                   VIR_EVENT_HANDLE_READABLE)) {
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
         if (client->tls &&
             virNetTLSSessionGetHandshakeStatus(client->tls) !=
             VIR_NET_TLS_HANDSHAKE_COMPLETE) {
@@ -1276,7 +1276,7 @@ virNetServerClientDispatchEvent(virNetSocketPtr sock, int events, void *opaque)
             if (events & VIR_EVENT_HANDLE_READABLE &&
                 client->rx)
                 virNetServerClientDispatchRead(client);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
         }
 #endif
     }
diff --git a/src/rpc/virnetserverclient.h b/src/rpc/virnetserverclient.h
index 40010c8..325f5d9 100644
--- a/src/rpc/virnetserverclient.h
+++ b/src/rpc/virnetserverclient.h
@@ -52,7 +52,7 @@ virNetServerClientPtr virNetServerClientNew(virNetSocketPtr sock,
                                             int auth,
                                             bool readonly,
                                             size_t nrequests_max,
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
                                             virNetTLSContextPtr tls,
 # endif
                                             virNetServerClientPrivNew privNew,
@@ -78,7 +78,7 @@ void virNetServerClientRemoveFilter(virNetServerClientPtr client,
 int virNetServerClientGetAuth(virNetServerClientPtr client);
 bool virNetServerClientGetReadonly(virNetServerClientPtr client);
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 bool virNetServerClientHasTLSSession(virNetServerClientPtr client);
 int virNetServerClientGetTLSKeySize(virNetServerClientPtr client);
 # endif
diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
index 61dd682..b39f0ef 100644
--- a/src/rpc/virnetserverservice.c
+++ b/src/rpc/virnetserverservice.c
@@ -41,7 +41,7 @@ struct _virNetServerService {
     bool readonly;
     size_t nrequests_client_max;
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetTLSContextPtr tls;
 #endif
 
@@ -92,7 +92,7 @@ cleanup:
 virNetServerServicePtr virNetServerServiceNewTCP(const char *nodename,
                                                  const char *service,
                                                  int auth,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                  virNetTLSContextPtr tls,
 #endif
                                                  bool readonly,
@@ -110,7 +110,7 @@ virNetServerServicePtr virNetServerServiceNewTCP(const char *nodename,
     svc->auth = auth;
     svc->readonly = readonly;
     svc->nrequests_client_max = nrequests_client_max;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     svc->tls = virObjectRef(tls);
 #endif
 
@@ -150,7 +150,7 @@ virNetServerServicePtr virNetServerServiceNewUNIX(const char *path,
                                                   mode_t mask,
                                                   gid_t grp,
                                                   int auth,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                   virNetTLSContextPtr tls,
 #endif
                                                   bool readonly,
@@ -168,7 +168,7 @@ virNetServerServicePtr virNetServerServiceNewUNIX(const char *path,
     svc->auth = auth;
     svc->readonly = readonly;
     svc->nrequests_client_max = nrequests_client_max;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     svc->tls = virObjectRef(tls);
 #endif
 
@@ -212,7 +212,7 @@ error:
 
 virNetServerServicePtr virNetServerServiceNewFD(int fd,
                                                 int auth,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                 virNetTLSContextPtr tls,
 #endif
                                                 bool readonly,
@@ -230,7 +230,7 @@ virNetServerServicePtr virNetServerServiceNewFD(int fd,
     svc->auth = auth;
     svc->readonly = readonly;
     svc->nrequests_client_max = nrequests_client_max;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     svc->tls = virObjectRef(tls);
 #endif
 
@@ -415,7 +415,7 @@ size_t virNetServerServiceGetMaxRequests(virNetServerServicePtr svc)
     return svc->nrequests_client_max;
 }
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 virNetTLSContextPtr virNetServerServiceGetTLSContext(virNetServerServicePtr svc)
 {
     return svc->tls;
@@ -440,7 +440,7 @@ void virNetServerServiceDispose(void *obj)
         virObjectUnref(svc->socks[i]);
     VIR_FREE(svc->socks);
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(svc->tls);
 #endif
 }
diff --git a/src/rpc/virnetserverservice.h b/src/rpc/virnetserverservice.h
index 934b8d3..1ece503 100644
--- a/src/rpc/virnetserverservice.h
+++ b/src/rpc/virnetserverservice.h
@@ -40,7 +40,7 @@ typedef int (*virNetServerServiceDispatchFunc)(virNetServerServicePtr svc,
 virNetServerServicePtr virNetServerServiceNewTCP(const char *nodename,
                                                  const char *service,
                                                  int auth,
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
                                                  virNetTLSContextPtr tls,
 # endif
                                                  bool readonly,
@@ -49,14 +49,14 @@ virNetServerServicePtr virNetServerServiceNewUNIX(const char *path,
                                                   mode_t mask,
                                                   gid_t grp,
                                                   int auth,
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
                                                   virNetTLSContextPtr tls,
 # endif
                                                   bool readonly,
                                                   size_t nrequests_client_max);
 virNetServerServicePtr virNetServerServiceNewFD(int fd,
                                                 int auth,
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
                                                 virNetTLSContextPtr tls,
 # endif
                                                 bool readonly,
@@ -71,7 +71,7 @@ int virNetServerServiceGetPort(virNetServerServicePtr svc);
 int virNetServerServiceGetAuth(virNetServerServicePtr svc);
 bool virNetServerServiceIsReadonly(virNetServerServicePtr svc);
 size_t virNetServerServiceGetMaxRequests(virNetServerServicePtr svc);
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 virNetTLSContextPtr virNetServerServiceGetTLSContext(virNetServerServicePtr svc);
 # endif
 
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 549aabe..7364482 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -79,7 +79,7 @@ struct _virNetSocket {
     char *localAddrStr;
     char *remoteAddrStr;
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetTLSSessionPtr tlsSession;
 #endif
 #if WITH_SASL
@@ -950,7 +950,7 @@ virJSONValuePtr virNetSocketPreExecRestart(virNetSocketPtr sock)
         goto error;
     }
 #endif
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (sock->tlsSession) {
         virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                        _("Unable to save socket state when TLS session is active"));
@@ -1015,7 +1015,7 @@ void virNetSocketDispose(void *obj)
         unlink(sock->localAddr.data.un.sun_path);
 #endif
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     /* Make sure it can't send any more I/O during shutdown */
     if (sock->tlsSession)
         virNetTLSSessionSetIOCallbacks(sock->tlsSession, NULL, NULL, NULL);
@@ -1184,7 +1184,7 @@ const char *virNetSocketRemoteAddrString(virNetSocketPtr sock)
 }
 
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 static ssize_t virNetSocketTLSSessionWrite(const char *buf,
                                            size_t len,
                                            void *opaque)
@@ -1287,7 +1287,7 @@ static ssize_t virNetSocketReadWire(virNetSocketPtr sock, char *buf, size_t len)
 #endif
 
 reread:
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (sock->tlsSession &&
         virNetTLSSessionGetHandshakeStatus(sock->tlsSession) ==
         VIR_NET_TLS_HANDSHAKE_COMPLETE) {
@@ -1295,7 +1295,7 @@ reread:
     } else {
 #endif
         ret = read(sock->fd, buf, len);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     }
 #endif
 
@@ -1346,7 +1346,7 @@ static ssize_t virNetSocketWriteWire(virNetSocketPtr sock, const char *buf, size
 #endif
 
 rewrite:
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (sock->tlsSession &&
         virNetTLSSessionGetHandshakeStatus(sock->tlsSession) ==
         VIR_NET_TLS_HANDSHAKE_COMPLETE) {
@@ -1354,7 +1354,7 @@ rewrite:
     } else {
 #endif
         ret = write(sock->fd, buf, len);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     }
 #endif
 
diff --git a/src/rpc/virnetsocket.h b/src/rpc/virnetsocket.h
index f1cb2ab..13583f8 100644
--- a/src/rpc/virnetsocket.h
+++ b/src/rpc/virnetsocket.h
@@ -26,7 +26,7 @@
 
 # include "virsocketaddr.h"
 # include "vircommand.h"
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 #  include "virnettlscontext.h"
 # endif
 # include "virobject.h"
@@ -124,7 +124,7 @@ ssize_t virNetSocketWrite(virNetSocketPtr sock, const char *buf, size_t len);
 int virNetSocketSendFD(virNetSocketPtr sock, int fd);
 int virNetSocketRecvFD(virNetSocketPtr sock, int *fd);
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 void virNetSocketSetTLSSession(virNetSocketPtr sock,
                                virNetTLSSessionPtr sess);
 # endif
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0e5aec4..6f0dde5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -100,7 +100,7 @@ test_programs = virshtest sockettest \
 	sysinfotest \
 	$(NULL)
 
-if HAVE_GNUTLS
+if WITH_GNUTLS
 test_programs += virnettlscontexttest
 endif
 
@@ -530,7 +530,7 @@ virnetsockettest_SOURCES = \
 virnetsockettest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
 virnetsockettest_LDADD = $(LDADDS)
 
-if HAVE_GNUTLS
+if WITH_GNUTLS
 virnettlscontexttest_SOURCES = \
 	virnettlscontexttest.c testutils.h testutils.c
 virnettlscontexttest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]