diff --git a/src/rpc/virkeepalive.h b/src/rpc/virkeepalive.h
index 6b9524b6baeb9f957a318998c1a39f1666e28898..41d65d08d0cd5c6e04536ce3b0a6af206bfad676 100644
--- a/src/rpc/virkeepalive.h
+++ b/src/rpc/virkeepalive.h
@@ -18,11 +18,10 @@
* .
*/
-#ifndef LIBVIRT_VIRKEEPALIVE_H
-# define LIBVIRT_VIRKEEPALIVE_H
+#pragma once
-# include "virnetmessage.h"
-# include "virobject.h"
+#include "virnetmessage.h"
+#include "virobject.h"
typedef int (*virKeepAliveSendFunc)(void *client, virNetMessagePtr msg);
typedef void (*virKeepAliveDeadFunc)(void *client);
@@ -52,5 +51,3 @@ bool virKeepAliveTrigger(virKeepAlivePtr ka,
bool virKeepAliveCheckMessage(virKeepAlivePtr ka,
virNetMessagePtr msg,
virNetMessagePtr *response);
-
-#endif /* LIBVIRT_VIRKEEPALIVE_H */
diff --git a/src/rpc/virnetclient.h b/src/rpc/virnetclient.h
index 40c7df9f5dd1bb133ba733acf3ce8982f8b4f6d0..07b399c1a9707c88d433407e0c08d9f48478e2b0 100644
--- a/src/rpc/virnetclient.h
+++ b/src/rpc/virnetclient.h
@@ -18,20 +18,19 @@
* .
*/
-#ifndef LIBVIRT_VIRNETCLIENT_H
-# define LIBVIRT_VIRNETCLIENT_H
-
-# ifdef WITH_GNUTLS
-# include "virnettlscontext.h"
-# endif
-# include "virnetmessage.h"
-# ifdef WITH_SASL
-# include "virnetsaslcontext.h"
-# endif
-# include "virnetclientprogram.h"
-# include "virnetclientstream.h"
-# include "virobject.h"
-# include "viruri.h"
+#pragma once
+
+#ifdef WITH_GNUTLS
+# include "virnettlscontext.h"
+#endif
+#include "virnetmessage.h"
+#ifdef WITH_SASL
+# include "virnetsaslcontext.h"
+#endif
+#include "virnetclientprogram.h"
+#include "virnetclientstream.h"
+#include "virobject.h"
+#include "viruri.h"
virNetClientPtr virNetClientNewUNIX(const char *path,
@@ -116,15 +115,15 @@ int virNetClientSendStream(virNetClientPtr client,
virNetMessagePtr msg,
virNetClientStreamPtr st);
-# ifdef WITH_SASL
+#ifdef WITH_SASL
void virNetClientSetSASLSession(virNetClientPtr client,
virNetSASLSessionPtr sasl);
-# endif
+#endif
-# ifdef WITH_GNUTLS
+#ifdef WITH_GNUTLS
int virNetClientSetTLSSession(virNetClientPtr client,
virNetTLSContextPtr tls);
-# endif
+#endif
bool virNetClientIsEncrypted(virNetClientPtr client);
bool virNetClientIsOpen(virNetClientPtr client);
@@ -132,9 +131,9 @@ bool virNetClientIsOpen(virNetClientPtr client);
const char *virNetClientLocalAddrStringSASL(virNetClientPtr client);
const char *virNetClientRemoteAddrStringSASL(virNetClientPtr client);
-# ifdef WITH_GNUTLS
+#ifdef WITH_GNUTLS
int virNetClientGetTLSKeySize(virNetClientPtr client);
-# endif
+#endif
void virNetClientClose(virNetClientPtr client);
@@ -144,5 +143,3 @@ int virNetClientKeepAliveStart(virNetClientPtr client,
unsigned int count);
void virNetClientKeepAliveStop(virNetClientPtr client);
-
-#endif /* LIBVIRT_VIRNETCLIENT_H */
diff --git a/src/rpc/virnetclientprogram.h b/src/rpc/virnetclientprogram.h
index 36d331cbf0e6091965f446e63e58d5b1f2db5309..1ac0f30023d7b07e890f75d092a423cadcb2ee57 100644
--- a/src/rpc/virnetclientprogram.h
+++ b/src/rpc/virnetclientprogram.h
@@ -18,14 +18,13 @@
* .
*/
-#ifndef LIBVIRT_VIRNETCLIENTPROGRAM_H
-# define LIBVIRT_VIRNETCLIENTPROGRAM_H
+#pragma once
-# include
-# include
+#include
+#include
-# include "virnetmessage.h"
-# include "virobject.h"
+#include "virnetmessage.h"
+#include "virobject.h"
typedef struct _virNetClient virNetClient;
typedef virNetClient *virNetClientPtr;
@@ -78,7 +77,3 @@ int virNetClientProgramCall(virNetClientProgramPtr prog,
int **infds,
xdrproc_t args_filter, void *args,
xdrproc_t ret_filter, void *ret);
-
-
-
-#endif /* LIBVIRT_VIRNETCLIENTPROGRAM_H */
diff --git a/src/rpc/virnetclientstream.h b/src/rpc/virnetclientstream.h
index 33a2af357f657c0ba7c4e3993c050083acaca896..166adb0b22732960d96d588a6a2eaa1f1f6ba940 100644
--- a/src/rpc/virnetclientstream.h
+++ b/src/rpc/virnetclientstream.h
@@ -18,11 +18,10 @@
* .
*/
-#ifndef LIBVIRT_VIRNETCLIENTSTREAM_H
-# define LIBVIRT_VIRNETCLIENTSTREAM_H
+#pragma once
-# include "virnetclientprogram.h"
-# include "virobject.h"
+#include "virnetclientprogram.h"
+#include "virobject.h"
typedef struct _virNetClientStream virNetClientStream;
typedef virNetClientStream *virNetClientStreamPtr;
@@ -92,5 +91,3 @@ int virNetClientStreamEventRemoveCallback(virNetClientStreamPtr st);
bool virNetClientStreamEOF(virNetClientStreamPtr st)
ATTRIBUTE_NONNULL(1);
-
-#endif /* LIBVIRT_VIRNETCLIENTSTREAM_H */
diff --git a/src/rpc/virnetdaemon.h b/src/rpc/virnetdaemon.h
index 2ad85f265bf1ba732f046756712e078bec2b8468..b7511ffd2764593d3fce209c852c531308dbb57e 100644
--- a/src/rpc/virnetdaemon.h
+++ b/src/rpc/virnetdaemon.h
@@ -18,18 +18,17 @@
* .
*/
-#ifndef LIBVIRT_VIRNETDAEMON_H
-# define LIBVIRT_VIRNETDAEMON_H
+#pragma once
-# include
+#include
-# include "virnettlscontext.h"
-# include "virobject.h"
-# include "virjson.h"
-# include "virnetserverprogram.h"
-# include "virnetserverclient.h"
-# include "virnetserverservice.h"
-# include "virnetserver.h"
+#include "virnettlscontext.h"
+#include "virobject.h"
+#include "virjson.h"
+#include "virnetserverprogram.h"
+#include "virnetserverclient.h"
+#include "virnetserverservice.h"
+#include "virnetserver.h"
virNetDaemonPtr virNetDaemonNew(void);
@@ -81,5 +80,3 @@ virNetServerPtr virNetDaemonGetServer(virNetDaemonPtr dmn,
ssize_t virNetDaemonGetServers(virNetDaemonPtr dmn, virNetServerPtr **servers);
bool virNetDaemonHasServer(virNetDaemonPtr dmn,
const char *serverName);
-
-#endif /* LIBVIRT_VIRNETDAEMON_H */
diff --git a/src/rpc/virnetlibsshsession.h b/src/rpc/virnetlibsshsession.h
index bb89267835da23428b3753228c5ff1e844373545..231c2591b20fa0b265001bcff3d875f657c6d3ed 100644
--- a/src/rpc/virnetlibsshsession.h
+++ b/src/rpc/virnetlibsshsession.h
@@ -18,11 +18,10 @@
* .
*/
-#ifndef LIBVIRT_VIRNETLIBSSHSESSION_H
-# define LIBVIRT_VIRNETLIBSSHSESSION_H
+#pragma once
-# include "internal.h"
-# include "viruri.h"
+#include "internal.h"
+#include "viruri.h"
typedef struct _virNetLibsshSession virNetLibsshSession;
typedef virNetLibsshSession *virNetLibsshSessionPtr;
@@ -72,5 +71,3 @@ ssize_t virNetLibsshChannelWrite(virNetLibsshSessionPtr sess,
size_t len);
bool virNetLibsshSessionHasCachedData(virNetLibsshSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETLIBSSHSESSION_H */
diff --git a/src/rpc/virnetmessage.h b/src/rpc/virnetmessage.h
index c787eecb7d633d5fd8619733e121eaa2eb7f221d..748421a9fd1f48d2df01713a8a96cba2853b8990 100644
--- a/src/rpc/virnetmessage.h
+++ b/src/rpc/virnetmessage.h
@@ -18,10 +18,9 @@
* .
*/
-#ifndef LIBVIRT_VIRNETMESSAGE_H
-# define LIBVIRT_VIRNETMESSAGE_H
+#pragma once
-# include "virnetprotocol.h"
+#include "virnetprotocol.h"
typedef struct virNetMessageHeader *virNetMessageHeaderPtr;
typedef struct virNetMessageError *virNetMessageErrorPtr;
@@ -100,5 +99,3 @@ int virNetMessageDupFD(virNetMessagePtr msg,
int virNetMessageAddFD(virNetMessagePtr msg,
int fd);
-
-#endif /* LIBVIRT_VIRNETMESSAGE_H */
diff --git a/src/rpc/virnetsaslcontext.h b/src/rpc/virnetsaslcontext.h
index 6d8f16ecd00718069e3388184e86ec09811f5186..4d1845e6439cff4cd0acd54c97c232892e125ca7 100644
--- a/src/rpc/virnetsaslcontext.h
+++ b/src/rpc/virnetsaslcontext.h
@@ -18,13 +18,12 @@
* .
*/
-#ifndef LIBVIRT_VIRNETSASLCONTEXT_H
-# define LIBVIRT_VIRNETSASLCONTEXT_H
+#pragma once
-# include "internal.h"
-# include
+#include "internal.h"
+#include
-# include "virobject.h"
+#include "virobject.h"
typedef struct _virNetSASLContext virNetSASLContext;
typedef virNetSASLContext *virNetSASLContextPtr;
@@ -109,5 +108,3 @@ ssize_t virNetSASLSessionDecode(virNetSASLSessionPtr sasl,
size_t inputLen,
const char **output,
size_t *outputlen);
-
-#endif /* LIBVIRT_VIRNETSASLCONTEXT_H */
diff --git a/src/rpc/virnetserver.h b/src/rpc/virnetserver.h
index 92a856fb03c5528b2333b8ed1658757fc4757f2a..e46a717c15c4de571cb3c8e59cc03fffff9cb5c1 100644
--- a/src/rpc/virnetserver.h
+++ b/src/rpc/virnetserver.h
@@ -19,15 +19,14 @@
* .
*/
-#ifndef LIBVIRT_VIRNETSERVER_H
-# define LIBVIRT_VIRNETSERVER_H
+#pragma once
-# include "virnettlscontext.h"
-# include "virnetserverprogram.h"
-# include "virnetserverclient.h"
-# include "virnetserverservice.h"
-# include "virobject.h"
-# include "virjson.h"
+#include "virnettlscontext.h"
+#include "virnetserverprogram.h"
+#include "virnetserverclient.h"
+#include "virnetserverservice.h"
+#include "virobject.h"
+#include "virjson.h"
virNetServerPtr virNetServerNew(const char *name,
@@ -112,5 +111,3 @@ size_t virNetServerGetCurrentUnauthClients(virNetServerPtr srv);
int virNetServerSetClientLimits(virNetServerPtr srv,
long long int maxClients,
long long int maxClientsUnauth);
-
-#endif /* LIBVIRT_VIRNETSERVER_H */
diff --git a/src/rpc/virnetserverclient.h b/src/rpc/virnetserverclient.h
index 2d6fa7ec5682cd7c0ac8f8559699f3248676285e..1b01bedbcbffb3b57aa8c2d4891db7843d2a8078 100644
--- a/src/rpc/virnetserverclient.h
+++ b/src/rpc/virnetserverclient.h
@@ -19,14 +19,13 @@
* .
*/
-#ifndef LIBVIRT_VIRNETSERVERCLIENT_H
-# define LIBVIRT_VIRNETSERVERCLIENT_H
+#pragma once
-# include "viridentity.h"
-# include "virnetsocket.h"
-# include "virnetmessage.h"
-# include "virobject.h"
-# include "virjson.h"
+#include "viridentity.h"
+#include "virnetsocket.h"
+#include "virnetmessage.h"
+#include "virobject.h"
+#include "virjson.h"
typedef struct _virNetServer virNetServer;
typedef virNetServer *virNetServerPtr;
@@ -103,12 +102,12 @@ bool virNetServerClientHasTLSSession(virNetServerClientPtr client);
virNetTLSSessionPtr virNetServerClientGetTLSSession(virNetServerClientPtr client);
int virNetServerClientGetTLSKeySize(virNetServerClientPtr client);
-# ifdef WITH_SASL
+#ifdef WITH_SASL
bool virNetServerClientHasSASLSession(virNetServerClientPtr client);
void virNetServerClientSetSASLSession(virNetServerClientPtr client,
virNetSASLSessionPtr sasl);
virNetSASLSessionPtr virNetServerClientGetSASLSession(virNetServerClientPtr client);
-# endif
+#endif
int virNetServerClientGetFD(virNetServerClientPtr client);
@@ -169,5 +168,3 @@ int virNetServerClientGetInfo(virNetServerClientPtr client,
virIdentityPtr *identity);
void virNetServerClientSetQuietEOF(virNetServerClientPtr client);
-
-#endif /* LIBVIRT_VIRNETSERVERCLIENT_H */
diff --git a/src/rpc/virnetservermdns.h b/src/rpc/virnetservermdns.h
index 64511a65c8f9d2759fb97bdd2ec15c67691b89cb..5f8e4da581557beb78af88a9c93f658884121d50 100644
--- a/src/rpc/virnetservermdns.h
+++ b/src/rpc/virnetservermdns.h
@@ -21,10 +21,9 @@
* .
*/
-#ifndef LIBVIRT_VIRNETSERVERMDNS_H
-# define LIBVIRT_VIRNETSERVERMDNS_H
+#pragma once
-# include "internal.h"
+#include "internal.h"
typedef struct _virNetServerMDNS virNetServerMDNS;
typedef virNetServerMDNS *virNetServerMDNSPtr;
@@ -103,5 +102,3 @@ void virNetServerMDNSRemoveEntry(virNetServerMDNSGroupPtr group,
void virNetServerMDNSFree(virNetServerMDNSPtr ptr);
void virNetServerMDNSGroupFree(virNetServerMDNSGroupPtr ptr);
void virNetServerMDNSEntryFree(virNetServerMDNSEntryPtr ptr);
-
-#endif /* LIBVIRT_VIRNETSERVERMDNS_H */
diff --git a/src/rpc/virnetserverprogram.h b/src/rpc/virnetserverprogram.h
index b37fc40c9b34b07927cd9b40f1e5198b2b976b50..851bbf01837cce2bc7b50850caf13afefe89501c 100644
--- a/src/rpc/virnetserverprogram.h
+++ b/src/rpc/virnetserverprogram.h
@@ -19,12 +19,11 @@
* .
*/
-#ifndef LIBVIRT_VIRNETSERVERPROGRAM_H
-# define LIBVIRT_VIRNETSERVERPROGRAM_H
+#pragma once
-# include "virnetmessage.h"
-# include "virnetserverclient.h"
-# include "virobject.h"
+#include "virnetmessage.h"
+#include "virnetserverclient.h"
+#include "virobject.h"
typedef struct _virNetDaemon virNetDaemon;
typedef virNetDaemon *virNetDaemonPtr;
@@ -106,5 +105,3 @@ int virNetServerProgramSendStreamHole(virNetServerProgramPtr prog,
unsigned int serial,
long long length,
unsigned int flags);
-
-#endif /* LIBVIRT_VIRNETSERVERPROGRAM_H */
diff --git a/src/rpc/virnetserverservice.h b/src/rpc/virnetserverservice.h
index 5c73bdeab1d715505b1d59e48c8b6022d3f54b17..5dd22bd929f5862608a3a4513b2feca49a96b890 100644
--- a/src/rpc/virnetserverservice.h
+++ b/src/rpc/virnetserverservice.h
@@ -19,11 +19,10 @@
* .
*/
-#ifndef LIBVIRT_VIRNETSERVERSERVICE_H
-# define LIBVIRT_VIRNETSERVERSERVICE_H
+#pragma once
-# include "virnetserverprogram.h"
-# include "virobject.h"
+#include "virnetserverprogram.h"
+#include "virobject.h"
typedef enum {
VIR_NET_SERVER_SERVICE_AUTH_NONE = 0,
@@ -87,5 +86,3 @@ void virNetServerServiceToggle(virNetServerServicePtr svc,
bool enabled);
void virNetServerServiceClose(virNetServerServicePtr svc);
-
-#endif /* LIBVIRT_VIRNETSERVERSERVICE_H */
diff --git a/src/rpc/virnetsocket.h b/src/rpc/virnetsocket.h
index 334036aafc1244c5a4d8201d624327eefa20ebba..343c8f43e00a575514a02d2e1dfced8a4878b110 100644
--- a/src/rpc/virnetsocket.h
+++ b/src/rpc/virnetsocket.h
@@ -19,20 +19,19 @@
* .
*/
-#ifndef LIBVIRT_VIRNETSOCKET_H
-# define LIBVIRT_VIRNETSOCKET_H
-
-# include "virsocketaddr.h"
-# include "vircommand.h"
-# ifdef WITH_GNUTLS
-# include "virnettlscontext.h"
-# endif
-# include "virobject.h"
-# ifdef WITH_SASL
-# include "virnetsaslcontext.h"
-# endif
-# include "virjson.h"
-# include "viruri.h"
+#pragma once
+
+#include "virsocketaddr.h"
+#include "vircommand.h"
+#ifdef WITH_GNUTLS
+# include "virnettlscontext.h"
+#endif
+#include "virobject.h"
+#ifdef WITH_SASL
+# include "virnetsaslcontext.h"
+#endif
+#include "virjson.h"
+#include "viruri.h"
typedef struct _virNetSocket virNetSocket;
typedef virNetSocket *virNetSocketPtr;
@@ -151,15 +150,15 @@ ssize_t virNetSocketWrite(virNetSocketPtr sock, const char *buf, size_t len);
int virNetSocketSendFD(virNetSocketPtr sock, int fd);
int virNetSocketRecvFD(virNetSocketPtr sock, int *fd);
-# ifdef WITH_GNUTLS
+#ifdef WITH_GNUTLS
void virNetSocketSetTLSSession(virNetSocketPtr sock,
virNetTLSSessionPtr sess);
-# endif
+#endif
-# ifdef WITH_SASL
+#ifdef WITH_SASL
void virNetSocketSetSASLSession(virNetSocketPtr sock,
virNetSASLSessionPtr sess);
-# endif
+#endif
bool virNetSocketHasCachedData(virNetSocketPtr sock);
bool virNetSocketHasPendingData(virNetSocketPtr sock);
@@ -183,6 +182,3 @@ void virNetSocketUpdateIOCallback(virNetSocketPtr sock,
void virNetSocketRemoveIOCallback(virNetSocketPtr sock);
void virNetSocketClose(virNetSocketPtr sock);
-
-
-#endif /* LIBVIRT_VIRNETSOCKET_H */
diff --git a/src/rpc/virnetsshsession.h b/src/rpc/virnetsshsession.h
index 840054c51a82ac65b4780e1e09316c507b29b989..010148930238e5d6b27b25e3ab9210e0d5e8d5f5 100644
--- a/src/rpc/virnetsshsession.h
+++ b/src/rpc/virnetsshsession.h
@@ -18,11 +18,10 @@
* .
*/
-#ifndef LIBVIRT_VIRNETSSHSESSION_H
-# define LIBVIRT_VIRNETSSHSESSION_H
+#pragma once
-# include "internal.h"
-# include "viruri.h"
+#include "internal.h"
+#include "viruri.h"
typedef struct _virNetSSHSession virNetSSHSession;
typedef virNetSSHSession *virNetSSHSessionPtr;
@@ -84,5 +83,3 @@ ssize_t virNetSSHChannelWrite(virNetSSHSessionPtr sess,
size_t len);
bool virNetSSHSessionHasCachedData(virNetSSHSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETSSHSESSION_H */
diff --git a/src/rpc/virnettlscontext.h b/src/rpc/virnettlscontext.h
index 82ecd8267dec094d76337048a593d2e44781ec3e..f3273bc26ab793606619dcef874693a680698f72 100644
--- a/src/rpc/virnettlscontext.h
+++ b/src/rpc/virnettlscontext.h
@@ -18,11 +18,10 @@
* .
*/
-#ifndef LIBVIRT_VIRNETTLSCONTEXT_H
-# define LIBVIRT_VIRNETTLSCONTEXT_H
+#pragma once
-# include "internal.h"
-# include "virobject.h"
+#include "internal.h"
+#include "virobject.h"
typedef struct _virNetTLSContext virNetTLSContext;
typedef virNetTLSContext *virNetTLSContextPtr;
@@ -99,5 +98,3 @@ virNetTLSSessionGetHandshakeStatus(virNetTLSSessionPtr sess);
int virNetTLSSessionGetKeySize(virNetTLSSessionPtr sess);
const char *virNetTLSSessionGetX509DName(virNetTLSSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETTLSCONTEXT_H */