Rename HAVE_LIBSSH2 to WITH_SSH2

This commit is contained in:
Daniel P. Berrange 2013-01-08 21:34:15 +00:00
parent 40541c2a6b
commit e1e94f2ed9
3 changed files with 13 additions and 13 deletions

View File

@ -1426,11 +1426,11 @@ if test "$with_phyp" = "yes"; then
AC_DEFINE_UNQUOTED([WITH_PHYP], 1, [whether IBM HMC / IVM driver is enabled])
fi
if test "$with_libssh2_transport" = "yes"; then
AC_DEFINE_UNQUOTED([HAVE_LIBSSH2], 1, [whether libssh2 transport is enabled])
AC_DEFINE_UNQUOTED([WITH_SSH2], 1, [whether libssh2 transport is enabled])
fi
AM_CONDITIONAL([WITH_PHYP],[test "$with_phyp" = "yes"])
AM_CONDITIONAL([HAVE_LIBSSH2], [test "$with_libssh2_transport" = "yes"])
AM_CONDITIONAL([WITH_SSH2], [test "$with_libssh2_transport" = "yes"])
AC_SUBST([LIBSSH2_CFLAGS])
AC_SUBST([LIBSSH2_LIBS])

View File

@ -1426,7 +1426,7 @@ if WITH_SASL
USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms
endif
if HAVE_LIBSSH2
if WITH_SSH2
USED_SYM_FILES += $(srcdir)/libvirt_libssh2.syms
endif
@ -1772,7 +1772,7 @@ libvirt_net_rpc_la_SOURCES = \
rpc/virnetsocket.h rpc/virnetsocket.c \
rpc/virkeepaliveprotocol.h rpc/virkeepaliveprotocol.c \
rpc/virkeepalive.h rpc/virkeepalive.c
if HAVE_LIBSSH2
if WITH_SSH2
libvirt_net_rpc_la_SOURCES += \
rpc/virnetsshsession.h rpc/virnetsshsession.c
else

View File

@ -51,7 +51,7 @@
#include "passfd.h"
#if HAVE_LIBSSH2
#if WITH_SSH2
# include "virnetsshsession.h"
#endif
@ -93,7 +93,7 @@ struct _virNetSocket {
size_t saslEncodedLength;
size_t saslEncodedOffset;
#endif
#if HAVE_LIBSSH2
#if WITH_SSH2
virNetSSHSessionPtr sshSession;
#endif
};
@ -738,7 +738,7 @@ int virNetSocketNewConnectSSH(const char *nodename,
return virNetSocketNewConnectCommand(cmd, retsock);
}
#if HAVE_LIBSSH2
#if WITH_SSH2
int
virNetSocketNewConnectLibSSH2(const char *host,
const char *port,
@ -870,7 +870,7 @@ virNetSocketNewConnectLibSSH2(const char *host ATTRIBUTE_UNUSED,
_("libssh2 transport support was not enabled"));
return -1;
}
#endif /* HAVE_LIBSSH2 */
#endif /* WITH_SSH2 */
int virNetSocketNewConnectExternal(const char **cmdargv,
virNetSocketPtr *retsock)
@ -1025,7 +1025,7 @@ void virNetSocketDispose(void *obj)
virObjectUnref(sock->saslSession);
#endif
#if HAVE_LIBSSH2
#if WITH_SSH2
virObjectUnref(sock->sshSession);
#endif
@ -1234,7 +1234,7 @@ bool virNetSocketHasCachedData(virNetSocketPtr sock ATTRIBUTE_UNUSED)
bool hasCached = false;
virMutexLock(&sock->lock);
#if HAVE_LIBSSH2
#if WITH_SSH2
if (virNetSSHSessionHasCachedData(sock->sshSession))
hasCached = true;
#endif
@ -1247,7 +1247,7 @@ bool virNetSocketHasCachedData(virNetSocketPtr sock ATTRIBUTE_UNUSED)
return hasCached;
}
#if HAVE_LIBSSH2
#if WITH_SSH2
static ssize_t virNetSocketLibSSH2Read(virNetSocketPtr sock,
char *buf,
size_t len)
@ -1281,7 +1281,7 @@ static ssize_t virNetSocketReadWire(virNetSocketPtr sock, char *buf, size_t len)
char *errout = NULL;
ssize_t ret;
#if HAVE_LIBSSH2
#if WITH_SSH2
if (sock->sshSession)
return virNetSocketLibSSH2Read(sock, buf, len);
#endif
@ -1340,7 +1340,7 @@ static ssize_t virNetSocketWriteWire(virNetSocketPtr sock, const char *buf, size
{
ssize_t ret;
#if HAVE_LIBSSH2
#if WITH_SSH2
if (sock->sshSession)
return virNetSocketLibSSH2Write(sock, buf, len);
#endif