util: misc: use #pragma once in headers

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jonathon Jongsma 2019-06-18 11:13:08 -05:00 committed by Ján Tomko
parent 336d682d14
commit 2ad45811e2
64 changed files with 248 additions and 434 deletions

View File

@ -18,10 +18,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRARPTABLE_H #pragma once
# define LIBVIRT_VIRARPTABLE_H
# include "internal.h" #include "internal.h"
typedef struct _virArpTableEntry virArpTableEntry; typedef struct _virArpTableEntry virArpTableEntry;
typedef virArpTableEntry *virArpTableEntryPtr; typedef virArpTableEntry *virArpTableEntryPtr;
@ -40,5 +39,3 @@ struct _virArpTable {
virArpTablePtr virArpTableGet(void); virArpTablePtr virArpTableGet(void);
void virArpTableFree(virArpTablePtr table); void virArpTableFree(virArpTablePtr table);
#endif /* LIBVIRT_VIRARPTABLE_H */

View File

@ -19,11 +19,10 @@
* *
*/ */
#ifndef LIBVIRT_VIRAUDIT_H #pragma once
# define LIBVIRT_VIRAUDIT_H
# include "internal.h" #include "internal.h"
# include "virlog.h" #include "virlog.h"
typedef enum { typedef enum {
VIR_AUDIT_RECORD_MACHINE_CONTROL, VIR_AUDIT_RECORD_MACHINE_CONTROL,
@ -46,15 +45,13 @@ char *virAuditEncode(const char *key, const char *value);
void virAuditClose(void); void virAuditClose(void);
# define VIR_AUDIT(type, success, ...) \ #define VIR_AUDIT(type, success, ...) \
virAuditSend(&virLogSelf, __FILE__, __LINE__, __func__, \ virAuditSend(&virLogSelf, __FILE__, __LINE__, __func__, \
NULL, NULL, type, success, __VA_ARGS__); NULL, NULL, type, success, __VA_ARGS__);
# define VIR_AUDIT_USER(type, success, clienttty, clientaddr, ...) \ #define VIR_AUDIT_USER(type, success, clienttty, clientaddr, ...) \
virAuditSend(&virLogSelf, __FILE__, __LINE__, __func__, \ virAuditSend(&virLogSelf, __FILE__, __LINE__, __func__, \
clienttty, clientaddr, type, success, __VA_ARGS__); clienttty, clientaddr, type, success, __VA_ARGS__);
# define VIR_AUDIT_STR(str) \ #define VIR_AUDIT_STR(str) \
((str) ? (str) : "?") ((str) ? (str) : "?")
#endif /* LIBVIRT_VIRAUDIT_H */

View File

@ -20,11 +20,10 @@
* *
*/ */
#ifndef LIBVIRT_VIRAUTH_H #pragma once
# define LIBVIRT_VIRAUTH_H
# include "internal.h" #include "internal.h"
# include "viruri.h" #include "viruri.h"
int virAuthGetConfigFilePath(virConnectPtr conn, int virAuthGetConfigFilePath(virConnectPtr conn,
char **path); char **path);
@ -53,4 +52,3 @@ char * virAuthGetPasswordPath(const char *path,
const char *servicename, const char *servicename,
const char *username, const char *username,
const char *hostname); const char *hostname);
#endif /* LIBVIRT_VIRAUTH_H */

View File

@ -18,11 +18,10 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRAUTHCONFIG_H #pragma once
# define LIBVIRT_VIRAUTHCONFIG_H
# include "internal.h" #include "internal.h"
# include "virautoclean.h" #include "virautoclean.h"
typedef struct _virAuthConfig virAuthConfig; typedef struct _virAuthConfig virAuthConfig;
typedef virAuthConfig *virAuthConfigPtr; typedef virAuthConfig *virAuthConfigPtr;
@ -42,5 +41,3 @@ int virAuthConfigLookup(virAuthConfigPtr auth,
const char **value); const char **value);
VIR_DEFINE_AUTOPTR_FUNC(virAuthConfig, virAuthConfigFree); VIR_DEFINE_AUTOPTR_FUNC(virAuthConfig, virAuthConfigFree);
#endif /* LIBVIRT_VIRAUTHCONFIG_H */

View File

@ -18,10 +18,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRAUTOCLEAN_H #pragma once
# define LIBVIRT_VIRAUTOCLEAN_H
# define VIR_AUTOPTR_FUNC_NAME(type) type##AutoPtrFree #define VIR_AUTOPTR_FUNC_NAME(type) type##AutoPtrFree
/** /**
* VIR_DEFINE_AUTOPTR_FUNC: * VIR_DEFINE_AUTOPTR_FUNC:
@ -32,7 +31,7 @@
* resources allocated to a variable of type @type. This newly * resources allocated to a variable of type @type. This newly
* defined function works as a necessary wrapper around @func. * defined function works as a necessary wrapper around @func.
*/ */
# define VIR_DEFINE_AUTOPTR_FUNC(type, func) \ #define VIR_DEFINE_AUTOPTR_FUNC(type, func) \
static inline void VIR_AUTOPTR_FUNC_NAME(type)(type **_ptr) \ static inline void VIR_AUTOPTR_FUNC_NAME(type)(type **_ptr) \
{ \ { \
if (*_ptr) \ if (*_ptr) \
@ -40,7 +39,7 @@
*_ptr = NULL; \ *_ptr = NULL; \
} }
# define VIR_AUTOCLEAN_FUNC_NAME(type) type##AutoClean #define VIR_AUTOCLEAN_FUNC_NAME(type) type##AutoClean
/** /**
* VIR_DEFINE_AUTOCLEAN_FUNC: * VIR_DEFINE_AUTOCLEAN_FUNC:
@ -51,7 +50,7 @@
* resources in a stack'd variable of type @type. Note that @func must * resources in a stack'd variable of type @type. Note that @func must
* take pointer to @type. * take pointer to @type.
*/ */
# define VIR_DEFINE_AUTOCLEAN_FUNC(type, func) \ #define VIR_DEFINE_AUTOCLEAN_FUNC(type, func) \
static inline void VIR_AUTOCLEAN_FUNC_NAME(type)(type *_ptr) \ static inline void VIR_AUTOCLEAN_FUNC_NAME(type)(type *_ptr) \
{ \ { \
(func)(_ptr); \ (func)(_ptr); \
@ -69,7 +68,7 @@
* Note that this macro must NOT be used with vectors! The freeing function * Note that this macro must NOT be used with vectors! The freeing function
* will not free any elements beyond the first. * will not free any elements beyond the first.
*/ */
# define VIR_AUTOPTR(type) \ #define VIR_AUTOPTR(type) \
__attribute__((cleanup(VIR_AUTOPTR_FUNC_NAME(type)))) type * __attribute__((cleanup(VIR_AUTOPTR_FUNC_NAME(type)))) type *
/** /**
@ -84,7 +83,5 @@
* Note that this macro must NOT be used with vectors! The cleaning function * Note that this macro must NOT be used with vectors! The cleaning function
* will not clean any elements beyond the first. * will not clean any elements beyond the first.
*/ */
# define VIR_AUTOCLEAN(type) \ #define VIR_AUTOCLEAN(type) \
__attribute__((cleanup(VIR_AUTOCLEAN_FUNC_NAME(type)))) type __attribute__((cleanup(VIR_AUTOCLEAN_FUNC_NAME(type)))) type
#endif /* LIBVIRT_VIRAUTOCLEAN_H */

View File

@ -19,13 +19,12 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRBITMAP_H #pragma once
# define LIBVIRT_VIRBITMAP_H
# include "internal.h" #include "internal.h"
# include "virautoclean.h" #include "virautoclean.h"
# include <sys/types.h> #include <sys/types.h>
typedef struct _virBitmap virBitmap; typedef struct _virBitmap virBitmap;
@ -159,5 +158,3 @@ void virBitmapSubtract(virBitmapPtr a, virBitmapPtr b)
void virBitmapShrink(virBitmapPtr map, size_t b); void virBitmapShrink(virBitmapPtr map, size_t b);
VIR_DEFINE_AUTOPTR_FUNC(virBitmap, virBitmapFree); VIR_DEFINE_AUTOPTR_FUNC(virBitmap, virBitmapFree);
#endif /* LIBVIRT_VIRBITMAP_H */

View File

@ -18,13 +18,12 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRBUFFER_H #pragma once
# define LIBVIRT_VIRBUFFER_H
# include <stdarg.h> #include <stdarg.h>
# include "internal.h" #include "internal.h"
# include "virautoclean.h" #include "virautoclean.h"
/** /**
@ -35,7 +34,7 @@
typedef struct _virBuffer virBuffer; typedef struct _virBuffer virBuffer;
typedef virBuffer *virBufferPtr; typedef virBuffer *virBufferPtr;
# define VIR_BUFFER_INITIALIZER { 0, 0, 0, 0, NULL } #define VIR_BUFFER_INITIALIZER { 0, 0, 0, 0, NULL }
struct _virBuffer { struct _virBuffer {
size_t size; size_t size;
@ -66,7 +65,7 @@ VIR_DEFINE_AUTOCLEAN_FUNC(virBuffer, virBufferFreeAndReset);
* Returns 0 if no error has occurred, otherwise an error is reported * Returns 0 if no error has occurred, otherwise an error is reported
* and -1 is returned. * and -1 is returned.
*/ */
# define virBufferCheckError(buf) \ #define virBufferCheckError(buf) \
virBufferCheckErrorInternal(buf, VIR_FROM_THIS, __FILE__, __FUNCTION__, \ virBufferCheckErrorInternal(buf, VIR_FROM_THIS, __FILE__, __FUNCTION__, \
__LINE__) __LINE__)
size_t virBufferUse(const virBuffer *buf); size_t virBufferUse(const virBuffer *buf);
@ -96,7 +95,7 @@ void virBufferEscapeSQL(virBufferPtr buf,
void virBufferEscapeShell(virBufferPtr buf, const char *str); void virBufferEscapeShell(virBufferPtr buf, const char *str);
void virBufferURIEncodeString(virBufferPtr buf, const char *str); void virBufferURIEncodeString(virBufferPtr buf, const char *str);
# define virBufferAddLit(buf_, literal_string_) \ #define virBufferAddLit(buf_, literal_string_) \
virBufferAdd(buf_, "" literal_string_ "", sizeof(literal_string_) - 1) virBufferAdd(buf_, "" literal_string_ "", sizeof(literal_string_) - 1)
void virBufferAdjustIndent(virBufferPtr buf, int indent); void virBufferAdjustIndent(virBufferPtr buf, int indent);
@ -108,12 +107,10 @@ void virBufferSetIndent(virBufferPtr, int indent);
* Gets the parent indentation, increments it by 2 and sets it to * Gets the parent indentation, increments it by 2 and sets it to
* child buffer. * child buffer.
*/ */
# define virBufferSetChildIndent(childBuf_, parentBuf_) \ #define virBufferSetChildIndent(childBuf_, parentBuf_) \
virBufferSetIndent(childBuf_, virBufferGetIndent(parentBuf_, false) + 2) virBufferSetIndent(childBuf_, virBufferGetIndent(parentBuf_, false) + 2)
int virBufferGetIndent(const virBuffer *buf, bool dynamic); int virBufferGetIndent(const virBuffer *buf, bool dynamic);
void virBufferTrim(virBufferPtr buf, const char *trim, int len); void virBufferTrim(virBufferPtr buf, const char *trim, int len);
void virBufferAddStr(virBufferPtr buf, const char *str); void virBufferAddStr(virBufferPtr buf, const char *str);
#endif /* LIBVIRT_VIRBUFFER_H */

View File

@ -18,10 +18,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRCLOSECALLBACKS_H #pragma once
# define LIBVIRT_VIRCLOSECALLBACKS_H
# include "conf/virdomainobjlist.h" #include "conf/virdomainobjlist.h"
typedef struct _virCloseCallbacks virCloseCallbacks; typedef struct _virCloseCallbacks virCloseCallbacks;
typedef virCloseCallbacks *virCloseCallbacksPtr; typedef virCloseCallbacks *virCloseCallbacksPtr;
@ -49,4 +48,3 @@ virCloseCallbacksRun(virCloseCallbacksPtr closeCallbacks,
virConnectPtr conn, virConnectPtr conn,
virDomainObjListPtr domains, virDomainObjListPtr domains,
void *opaque); void *opaque);
#endif /* LIBVIRT_VIRCLOSECALLBACKS_H */

View File

@ -18,11 +18,10 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRCONF_H #pragma once
# define LIBVIRT_VIRCONF_H
# include "virutil.h" #include "virutil.h"
# include "virenum.h" #include "virenum.h"
/** /**
* virConfType: * virConfType:
@ -128,5 +127,3 @@ int virConfWriteMem(char *memory,
int *len, int *len,
virConfPtr conf); virConfPtr conf);
int virConfLoadConfig(virConfPtr *conf, const char *name); int virConfLoadConfig(virConfPtr *conf, const char *name);
#endif /* LIBVIRT_VIRCONF_H */

View File

@ -18,13 +18,12 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRCRYPTO_H #pragma once
# define LIBVIRT_VIRCRYPTO_H
# include "internal.h" #include "internal.h"
# define VIR_CRYPTO_HASH_SIZE_MD5 16 #define VIR_CRYPTO_HASH_SIZE_MD5 16
# define VIR_CRYPTO_HASH_SIZE_SHA256 32 #define VIR_CRYPTO_HASH_SIZE_SHA256 32
typedef enum { typedef enum {
VIR_CRYPTO_HASH_MD5, /* Don't use this except for historic compat */ VIR_CRYPTO_HASH_MD5, /* Don't use this except for historic compat */
@ -64,5 +63,3 @@ int virCryptoEncryptData(virCryptoCipher algorithm,
uint8_t **ciphertext, size_t *ciphertextlen) uint8_t **ciphertext, size_t *ciphertextlen)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(6) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(6)
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(9) ATTRIBUTE_RETURN_CHECK; ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(9) ATTRIBUTE_RETURN_CHECK;
#endif /* LIBVIRT_VIRCRYPTO_H */

View File

@ -18,11 +18,8 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRDEVMAPPER_H #pragma once
# define LIBVIRT_VIRDEVMAPPER_H
int int
virDevMapperGetTargets(const char *path, virDevMapperGetTargets(const char *path,
char ***devPaths); char ***devPaths);
#endif /* LIBVIRT_VIRDEVMAPPER_H */

View File

@ -21,11 +21,10 @@
* based on iptables.h * based on iptables.h
*/ */
#ifndef LIBVIRT_VIRDNSMASQ_H #pragma once
# define LIBVIRT_VIRDNSMASQ_H
# include "virobject.h" #include "virobject.h"
# include "virsocketaddr.h" #include "virsocketaddr.h"
typedef struct typedef struct
{ {
@ -106,17 +105,16 @@ bool dnsmasqCapsGet(dnsmasqCapsPtr caps, dnsmasqCapsFlags flag);
const char *dnsmasqCapsGetBinaryPath(dnsmasqCapsPtr caps); const char *dnsmasqCapsGetBinaryPath(dnsmasqCapsPtr caps);
unsigned long dnsmasqCapsGetVersion(dnsmasqCapsPtr caps); unsigned long dnsmasqCapsGetVersion(dnsmasqCapsPtr caps);
# define DNSMASQ_DHCPv6_MAJOR_REQD 2 #define DNSMASQ_DHCPv6_MAJOR_REQD 2
# define DNSMASQ_DHCPv6_MINOR_REQD 64 #define DNSMASQ_DHCPv6_MINOR_REQD 64
# define DNSMASQ_RA_MAJOR_REQD 2 #define DNSMASQ_RA_MAJOR_REQD 2
# define DNSMASQ_RA_MINOR_REQD 64 #define DNSMASQ_RA_MINOR_REQD 64
# define DNSMASQ_DHCPv6_SUPPORT(CAPS) \ #define DNSMASQ_DHCPv6_SUPPORT(CAPS) \
(dnsmasqCapsGetVersion(CAPS) >= \ (dnsmasqCapsGetVersion(CAPS) >= \
(DNSMASQ_DHCPv6_MAJOR_REQD * 1000000) + \ (DNSMASQ_DHCPv6_MAJOR_REQD * 1000000) + \
(DNSMASQ_DHCPv6_MINOR_REQD * 1000)) (DNSMASQ_DHCPv6_MINOR_REQD * 1000))
# define DNSMASQ_RA_SUPPORT(CAPS) \ #define DNSMASQ_RA_SUPPORT(CAPS) \
(dnsmasqCapsGetVersion(CAPS) >= \ (dnsmasqCapsGetVersion(CAPS) >= \
(DNSMASQ_RA_MAJOR_REQD * 1000000) + \ (DNSMASQ_RA_MAJOR_REQD * 1000000) + \
(DNSMASQ_RA_MINOR_REQD * 1000)) (DNSMASQ_RA_MINOR_REQD * 1000))
#endif /* LIBVIRT_VIRDNSMASQ_H */

View File

@ -19,10 +19,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIREBTABLES_H #pragma once
# define LIBVIRT_VIREBTABLES_H
# include "virmacaddr.h" #include "virmacaddr.h"
typedef struct _ebtablesContext ebtablesContext; typedef struct _ebtablesContext ebtablesContext;
@ -37,5 +36,3 @@ int ebtablesRemoveForwardAllowIn (ebtablesContext *ctx,
const virMacAddr *mac); const virMacAddr *mac);
int ebtablesAddForwardPolicyReject(ebtablesContext *ctx); int ebtablesAddForwardPolicyReject(ebtablesContext *ctx);
#endif /* LIBVIRT_VIREBTABLES_H */

View File

@ -19,10 +19,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRENDIAN_H #pragma once
# define LIBVIRT_VIRENDIAN_H
# include "internal.h" #include "internal.h"
/* The interfaces in this file are provided as macros for speed. */ /* The interfaces in this file are provided as macros for speed. */
@ -34,7 +33,7 @@
* Read 8 bytes at BUF as a big-endian 64-bit number. Caller is * Read 8 bytes at BUF as a big-endian 64-bit number. Caller is
* responsible to avoid reading beyond array bounds. * responsible to avoid reading beyond array bounds.
*/ */
# define virReadBufInt64BE(buf) \ #define virReadBufInt64BE(buf) \
(((uint64_t)(uint8_t)((buf)[0]) << 56) | \ (((uint64_t)(uint8_t)((buf)[0]) << 56) | \
((uint64_t)(uint8_t)((buf)[1]) << 48) | \ ((uint64_t)(uint8_t)((buf)[1]) << 48) | \
((uint64_t)(uint8_t)((buf)[2]) << 40) | \ ((uint64_t)(uint8_t)((buf)[2]) << 40) | \
@ -52,7 +51,7 @@
* Read 8 bytes at BUF as a little-endian 64-bit number. Caller is * Read 8 bytes at BUF as a little-endian 64-bit number. Caller is
* responsible to avoid reading beyond array bounds. * responsible to avoid reading beyond array bounds.
*/ */
# define virReadBufInt64LE(buf) \ #define virReadBufInt64LE(buf) \
((uint64_t)(uint8_t)((buf)[0]) | \ ((uint64_t)(uint8_t)((buf)[0]) | \
((uint64_t)(uint8_t)((buf)[1]) << 8) | \ ((uint64_t)(uint8_t)((buf)[1]) << 8) | \
((uint64_t)(uint8_t)((buf)[2]) << 16) | \ ((uint64_t)(uint8_t)((buf)[2]) << 16) | \
@ -70,7 +69,7 @@
* Read 4 bytes at BUF as a big-endian 32-bit number. Caller is * Read 4 bytes at BUF as a big-endian 32-bit number. Caller is
* responsible to avoid reading beyond array bounds. * responsible to avoid reading beyond array bounds.
*/ */
# define virReadBufInt32BE(buf) \ #define virReadBufInt32BE(buf) \
(((uint32_t)(uint8_t)((buf)[0]) << 24) | \ (((uint32_t)(uint8_t)((buf)[0]) << 24) | \
((uint32_t)(uint8_t)((buf)[1]) << 16) | \ ((uint32_t)(uint8_t)((buf)[1]) << 16) | \
((uint32_t)(uint8_t)((buf)[2]) << 8) | \ ((uint32_t)(uint8_t)((buf)[2]) << 8) | \
@ -84,7 +83,7 @@
* Read 4 bytes at BUF as a little-endian 32-bit number. Caller is * Read 4 bytes at BUF as a little-endian 32-bit number. Caller is
* responsible to avoid reading beyond array bounds. * responsible to avoid reading beyond array bounds.
*/ */
# define virReadBufInt32LE(buf) \ #define virReadBufInt32LE(buf) \
((uint32_t)(uint8_t)((buf)[0]) | \ ((uint32_t)(uint8_t)((buf)[0]) | \
((uint32_t)(uint8_t)((buf)[1]) << 8) | \ ((uint32_t)(uint8_t)((buf)[1]) << 8) | \
((uint32_t)(uint8_t)((buf)[2]) << 16) | \ ((uint32_t)(uint8_t)((buf)[2]) << 16) | \
@ -98,7 +97,7 @@
* Read 2 bytes at BUF as a big-endian 16-bit number. Caller is * Read 2 bytes at BUF as a big-endian 16-bit number. Caller is
* responsible to avoid reading beyond array bounds. * responsible to avoid reading beyond array bounds.
*/ */
# define virReadBufInt16BE(buf) \ #define virReadBufInt16BE(buf) \
(((uint16_t)(uint8_t)((buf)[0]) << 8) | \ (((uint16_t)(uint8_t)((buf)[0]) << 8) | \
(uint16_t)(uint8_t)((buf)[1])) (uint16_t)(uint8_t)((buf)[1]))
@ -110,8 +109,6 @@
* Read 2 bytes at BUF as a little-endian 16-bit number. Caller is * Read 2 bytes at BUF as a little-endian 16-bit number. Caller is
* responsible to avoid reading beyond array bounds. * responsible to avoid reading beyond array bounds.
*/ */
# define virReadBufInt16LE(buf) \ #define virReadBufInt16LE(buf) \
((uint16_t)(uint8_t)((buf)[0]) | \ ((uint16_t)(uint8_t)((buf)[0]) | \
((uint16_t)(uint8_t)((buf)[1]) << 8)) ((uint16_t)(uint8_t)((buf)[1]) << 8))
#endif /* LIBVIRT_VIRENDIAN_H */

View File

@ -16,10 +16,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRENUM_H #pragma once
# define LIBVIRT_VIRENUM_H
# include "internal.h" #include "internal.h"
int int
virEnumFromString(const char * const *types, virEnumFromString(const char * const *types,
@ -31,7 +30,7 @@ virEnumToString(const char * const *types,
unsigned int ntypes, unsigned int ntypes,
int type); int type);
# define VIR_ENUM_IMPL(name, lastVal, ...) \ #define VIR_ENUM_IMPL(name, lastVal, ...) \
static const char *const name ## TypeList[] = { __VA_ARGS__ }; \ static const char *const name ## TypeList[] = { __VA_ARGS__ }; \
const char *name ## TypeToString(int type) { \ const char *name ## TypeToString(int type) { \
return virEnumToString(name ## TypeList, \ return virEnumToString(name ## TypeList, \
@ -45,7 +44,7 @@ virEnumToString(const char * const *types,
} \ } \
verify(ARRAY_CARDINALITY(name ## TypeList) == lastVal) verify(ARRAY_CARDINALITY(name ## TypeList) == lastVal)
# define VIR_ENUM_DECL(name) \ #define VIR_ENUM_DECL(name) \
const char *name ## TypeToString(int type); \ const char *name ## TypeToString(int type); \
int name ## TypeFromString(const char*type) int name ## TypeFromString(const char*type)
@ -76,5 +75,3 @@ virTristateSwitch virTristateSwitchFromBool(bool val);
verify((int)VIR_TRISTATE_BOOL_YES == (int)VIR_TRISTATE_SWITCH_ON); verify((int)VIR_TRISTATE_BOOL_YES == (int)VIR_TRISTATE_SWITCH_ON);
verify((int)VIR_TRISTATE_BOOL_NO == (int)VIR_TRISTATE_SWITCH_OFF); verify((int)VIR_TRISTATE_BOOL_NO == (int)VIR_TRISTATE_SWITCH_OFF);
verify((int)VIR_TRISTATE_BOOL_ABSENT == (int)VIR_TRISTATE_SWITCH_ABSENT); verify((int)VIR_TRISTATE_BOOL_ABSENT == (int)VIR_TRISTATE_SWITCH_ABSENT);
#endif /* LIBVIRT_VIRENUM_H */

View File

@ -19,8 +19,5 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIREVENT_H #pragma once
# define LIBVIRT_VIREVENT_H #include "internal.h"
# include "internal.h"
#endif /* LIBVIRT_VIREVENT_H */

View File

@ -19,10 +19,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIREVENTPOLL_H #pragma once
# define LIBVIRT_VIREVENTPOLL_H
# include "internal.h" #include "internal.h"
/** /**
* virEventPollAddHandle: register a callback for monitoring file handle events * virEventPollAddHandle: register a callback for monitoring file handle events
@ -125,6 +124,3 @@ int virEventPollToNativeEvents(int events);
* return -1 if wakeup failed * return -1 if wakeup failed
*/ */
int virEventPollInterrupt(void); int virEventPollInterrupt(void);
#endif /* LIBVIRT_VIREVENTPOLL_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRFCP_H #pragma once
# define LIBVIRT_VIRFCP_H
bool bool
virFCIsCapableRport(const char *rport); virFCIsCapableRport(const char *rport);
@ -28,5 +27,3 @@ int
virFCReadRportValue(const char *rport, virFCReadRportValue(const char *rport,
const char *entry, const char *entry,
char **result); char **result);
#endif /* LIBVIRT_VIRFCP_H */

View File

@ -19,10 +19,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRFDSTREAM_H #pragma once
# define LIBVIRT_VIRFDSTREAM_H
# include "internal.h" #include "internal.h"
/* internal callback, the generic one is used up by daemon stream driver */ /* internal callback, the generic one is used up by daemon stream driver */
/* the close callback is called with fdstream private data locked */ /* the close callback is called with fdstream private data locked */
@ -65,4 +64,3 @@ int virFDStreamSetInternalCloseCb(virStreamPtr st,
virFDStreamInternalCloseCb cb, virFDStreamInternalCloseCb cb,
void *opaque, void *opaque,
virFDStreamInternalCloseCbFreeOpaque fcb); virFDStreamInternalCloseCbFreeOpaque fcb);
#endif /* LIBVIRT_VIRFDSTREAM_H */

View File

@ -19,13 +19,12 @@
* *
*/ */
#ifndef LIBVIRT_VIRFILECACHE_H #pragma once
# define LIBVIRT_VIRFILECACHE_H
# include "internal.h" #include "internal.h"
# include "virobject.h" #include "virobject.h"
# include "virhash.h" #include "virhash.h"
typedef struct _virFileCache virFileCache; typedef struct _virFileCache virFileCache;
typedef virFileCache *virFileCachePtr; typedef virFileCache *virFileCachePtr;
@ -133,5 +132,3 @@ int
virFileCacheInsertData(virFileCachePtr cache, virFileCacheInsertData(virFileCachePtr cache,
const char *name, const char *name,
void *data); void *data);
#endif /* LIBVIRT_VIRFILECACHE_H */

View File

@ -18,10 +18,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRFIRMWARE_H #pragma once
# define LIBVIRT_VIRFIRMWARE_H
# include "internal.h" #include "internal.h"
typedef struct _virFirmware virFirmware; typedef struct _virFirmware virFirmware;
typedef virFirmware *virFirmwarePtr; typedef virFirmware *virFirmwarePtr;
@ -44,6 +43,3 @@ virFirmwareParseList(const char *list,
virFirmwarePtr **firmwares, virFirmwarePtr **firmwares,
size_t *nfirmwares) size_t *nfirmwares)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
#endif /* LIBVIRT_VIRFIRMWARE_H */

View File

@ -18,9 +18,6 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRGETTEXT_H #pragma once
# define LIBVIRT_VIRGETTEXT_H
int virGettextInitialize(void); int virGettextInitialize(void);
#endif /* LIBVIRT_VIRGETTEXT_H */

View File

@ -18,11 +18,10 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRGIC_H #pragma once
# define LIBVIRT_VIRGIC_H
# include "virutil.h" #include "virutil.h"
# include "virenum.h" #include "virenum.h"
typedef enum { typedef enum {
VIR_GIC_VERSION_NONE = 0, VIR_GIC_VERSION_NONE = 0,
@ -46,5 +45,3 @@ struct _virGICCapability {
virGICVersion version; virGICVersion version;
virGICImplementation implementation; virGICImplementation implementation;
}; };
#endif /* LIBVIRT_VIRGIC_H */

View File

@ -19,10 +19,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRHOOK_H #pragma once
# define LIBVIRT_VIRHOOK_H
# include "internal.h" #include "internal.h"
typedef enum { typedef enum {
VIR_HOOK_DRIVER_DAEMON = 0, /* Daemon related events */ VIR_HOOK_DRIVER_DAEMON = 0, /* Daemon related events */
@ -104,5 +103,3 @@ int virHookPresent(int driver);
int virHookCall(int driver, const char *id, int op, int sub_op, int virHookCall(int driver, const char *id, int op, int sub_op,
const char *extra, const char *input, char **output); const char *extra, const char *input, char **output);
#endif /* LIBVIRT_VIRHOOK_H */

View File

@ -19,10 +19,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRIDENTITY_H #pragma once
# define LIBVIRT_VIRIDENTITY_H
# include "virobject.h" #include "virobject.h"
typedef struct _virIdentity virIdentity; typedef struct _virIdentity virIdentity;
typedef virIdentity *virIdentityPtr; typedef virIdentity *virIdentityPtr;
@ -103,6 +102,3 @@ int virIdentitySetX509DName(virIdentityPtr ident,
const char *dname); const char *dname);
int virIdentitySetSELinuxContext(virIdentityPtr ident, int virIdentitySetSELinuxContext(virIdentityPtr ident,
const char *context); const char *context);
#endif /* LIBVIRT_VIRIDENTITY_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRINITCTL_H #pragma once
# define LIBVIRT_VIRINITCTL_H
typedef enum { typedef enum {
VIR_INITCTL_RUNLEVEL_POWEROFF = 0, VIR_INITCTL_RUNLEVEL_POWEROFF = 0,
@ -38,5 +37,3 @@ extern const char *virInitctlFifos[];
int virInitctlSetRunLevel(const char *fifo, int virInitctlSetRunLevel(const char *fifo,
virInitctlRunLevel level); virInitctlRunLevel level);
#endif /* LIBVIRT_VIRINITCTL_H */

View File

@ -18,11 +18,10 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRIPTABLES_H #pragma once
# define LIBVIRT_VIRIPTABLES_H
# include "virsocketaddr.h" #include "virsocketaddr.h"
# include "virfirewall.h" #include "virfirewall.h"
int iptablesSetupPrivateChains (virFirewallLayer layer); int iptablesSetupPrivateChains (virFirewallLayer layer);
@ -148,5 +147,3 @@ void iptablesAddOutputFixUdpChecksum (virFirewallPtr fw,
void iptablesRemoveOutputFixUdpChecksum (virFirewallPtr fw, void iptablesRemoveOutputFixUdpChecksum (virFirewallPtr fw,
const char *iface, const char *iface,
int port); int port);
#endif /* LIBVIRT_VIRIPTABLES_H */

View File

@ -19,10 +19,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRISCSI_H #pragma once
# define LIBVIRT_VIRISCSI_H
# include "internal.h" #include "internal.h"
char * char *
virISCSIGetSession(const char *devpath, virISCSIGetSession(const char *devpath,
@ -68,5 +67,3 @@ virISCSINodeUpdate(const char *portal,
const char *value) const char *value)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK; ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
#endif /* LIBVIRT_VIRISCSI_H */

View File

@ -20,15 +20,14 @@
* *
*/ */
#ifndef LIBVIRT_VIRJSON_H #pragma once
# define LIBVIRT_VIRJSON_H
# include "internal.h" #include "internal.h"
# include "virbitmap.h" #include "virbitmap.h"
# include "virbuffer.h" #include "virbuffer.h"
# include "virautoclean.h" #include "virautoclean.h"
# include <stdarg.h> #include <stdarg.h>
typedef enum { typedef enum {
@ -164,5 +163,3 @@ char *virJSONStringReformat(const char *jsonstr, bool pretty);
virJSONValuePtr virJSONValueObjectDeflatten(virJSONValuePtr json); virJSONValuePtr virJSONValueObjectDeflatten(virJSONValuePtr json);
VIR_DEFINE_AUTOPTR_FUNC(virJSONValue, virJSONValueFree); VIR_DEFINE_AUTOPTR_FUNC(virJSONValue, virJSONValueFree);
#endif /* LIBVIRT_VIRJSON_H */

View File

@ -19,16 +19,13 @@
* *
*/ */
#ifndef LIBVIRT_VIRKEYCODE_H #pragma once
# define LIBVIRT_VIRKEYCODE_H
# include "virutil.h" #include "virutil.h"
# include "virenum.h" #include "virenum.h"
VIR_ENUM_DECL(virKeycodeSet); VIR_ENUM_DECL(virKeycodeSet);
int virKeycodeValueFromString(virKeycodeSet codeset, const char *keyname); int virKeycodeValueFromString(virKeycodeSet codeset, const char *keyname);
int virKeycodeValueTranslate(virKeycodeSet from_codeset, int virKeycodeValueTranslate(virKeycodeSet from_codeset,
virKeycodeSet to_offset, virKeycodeSet to_offset,
int key_value); int key_value);
#endif /* LIBVIRT_VIRKEYCODE_H */

View File

@ -18,10 +18,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRKEYFILE_H #pragma once
# define LIBVIRT_VIRKEYFILE_H
# include "internal.h" #include "internal.h"
/** /**
* virKeyFilePtr: * virKeyFilePtr:
@ -57,5 +56,3 @@ const char *virKeyFileGetValueString(virKeyFilePtr conf,
const char *groupname, const char *groupname,
const char *valuename) const char *valuename)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
#endif /* LIBVIRT_VIRKEYFILE_H */

View File

@ -19,10 +19,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRKMOD_H #pragma once
# define LIBVIRT_VIRKMOD_H
# include "internal.h" #include "internal.h"
char *virKModConfig(void); char *virKModConfig(void);
char *virKModLoad(const char *, bool) char *virKModLoad(const char *, bool)
@ -31,4 +30,3 @@ char *virKModUnload(const char *)
ATTRIBUTE_NONNULL(1); ATTRIBUTE_NONNULL(1);
bool virKModIsBlacklisted(const char *) bool virKModIsBlacklisted(const char *)
ATTRIBUTE_NONNULL(1); ATTRIBUTE_NONNULL(1);
#endif /* LIBVIRT_VIRKMOD_H */

View File

@ -20,10 +20,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRLEASE_H #pragma once
# define LIBVIRT_VIRLEASE_H
# include "virjson.h" #include "virjson.h"
int virLeaseReadCustomLeaseFile(virJSONValuePtr leases_array_new, int virLeaseReadCustomLeaseFile(virJSONValuePtr leases_array_new,
const char *custom_lease_file, const char *custom_lease_file,
@ -41,5 +40,3 @@ int virLeaseNew(virJSONValuePtr *lease_ret,
const char *hostname, const char *hostname,
const char *iaid, const char *iaid,
const char *server_duid); const char *server_duid);
#endif /* LIBVIRT_VIRLEASE_H */

View File

@ -19,11 +19,10 @@
* *
*/ */
#ifndef LIBVIRT_VIRLOCKSPACE_H #pragma once
# define LIBVIRT_VIRLOCKSPACE_H
# include "internal.h" #include "internal.h"
# include "virjson.h" #include "virjson.h"
typedef struct _virLockSpace virLockSpace; typedef struct _virLockSpace virLockSpace;
typedef virLockSpace *virLockSpacePtr; typedef virLockSpace *virLockSpacePtr;
@ -58,5 +57,3 @@ int virLockSpaceReleaseResource(virLockSpacePtr lockspace,
int virLockSpaceReleaseResourcesForOwner(virLockSpacePtr lockspace, int virLockSpaceReleaseResourcesForOwner(virLockSpacePtr lockspace,
pid_t owner); pid_t owner);
#endif /* LIBVIRT_VIRLOCKSPACE_H */

View File

@ -16,14 +16,13 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRMDEV_H #pragma once
# define LIBVIRT_VIRMDEV_H
# include "internal.h" #include "internal.h"
# include "virobject.h" #include "virobject.h"
# include "virutil.h" #include "virutil.h"
# include "virautoclean.h" #include "virautoclean.h"
# include "virenum.h" #include "virenum.h"
typedef enum { typedef enum {
VIR_MDEV_MODEL_TYPE_VFIO_PCI = 0, VIR_MDEV_MODEL_TYPE_VFIO_PCI = 0,
@ -140,5 +139,3 @@ virMediatedDeviceTypeReadAttrs(const char *sysfspath,
VIR_DEFINE_AUTOPTR_FUNC(virMediatedDevice, virMediatedDeviceFree); VIR_DEFINE_AUTOPTR_FUNC(virMediatedDevice, virMediatedDeviceFree);
VIR_DEFINE_AUTOPTR_FUNC(virMediatedDeviceType, virMediatedDeviceTypeFree); VIR_DEFINE_AUTOPTR_FUNC(virMediatedDeviceType, virMediatedDeviceTypeFree);
#endif /* LIBVIRT_VIRMDEV_H */

View File

@ -19,11 +19,8 @@
* *
*/ */
#ifndef LIBVIRT_VIRMODULE_H #pragma once
# define LIBVIRT_VIRMODULE_H
int virModuleLoad(const char *path, int virModuleLoad(const char *path,
const char *regfunc, const char *regfunc,
bool required); bool required);
#endif /* LIBVIRT_VIRMODULE_H */

View File

@ -19,15 +19,12 @@
* *
*/ */
#ifndef LIBVIRT_VIRNODESUSPEND_H #pragma once
# define LIBVIRT_VIRNODESUSPEND_H
# include "internal.h" #include "internal.h"
int virNodeSuspend(unsigned int target, int virNodeSuspend(unsigned int target,
unsigned long long duration, unsigned long long duration,
unsigned int flags); unsigned int flags);
int virNodeSuspendGetTargetMask(unsigned int *bitmask); int virNodeSuspendGetTargetMask(unsigned int *bitmask);
#endif /* LIBVIRT_VIRNODESUSPEND_H */

View File

@ -19,12 +19,11 @@
* *
*/ */
#ifndef LIBVIRT_VIRNUMA_H #pragma once
# define LIBVIRT_VIRNUMA_H
# include "internal.h" #include "internal.h"
# include "virbitmap.h" #include "virbitmap.h"
# include "virutil.h" #include "virutil.h"
char *virNumaGetAutoPlacementAdvice(unsigned short vcpus, char *virNumaGetAutoPlacementAdvice(unsigned short vcpus,
@ -66,4 +65,3 @@ int virNumaSetPagePoolSize(int node,
unsigned int page_size, unsigned int page_size,
unsigned long long page_count, unsigned long long page_count,
bool add); bool add);
#endif /* LIBVIRT_VIRNUMA_H */

View File

@ -18,15 +18,14 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRPCI_H #pragma once
# define LIBVIRT_VIRPCI_H
# include "internal.h" #include "internal.h"
# include "virmdev.h" #include "virmdev.h"
# include "virobject.h" #include "virobject.h"
# include "virutil.h" #include "virutil.h"
# include "virautoclean.h" #include "virautoclean.h"
# include "virenum.h" #include "virenum.h"
typedef struct _virPCIDevice virPCIDevice; typedef struct _virPCIDevice virPCIDevice;
typedef virPCIDevice *virPCIDevicePtr; typedef virPCIDevice *virPCIDevicePtr;
@ -35,8 +34,8 @@ typedef virPCIDeviceAddress *virPCIDeviceAddressPtr;
typedef struct _virPCIDeviceList virPCIDeviceList; typedef struct _virPCIDeviceList virPCIDeviceList;
typedef virPCIDeviceList *virPCIDeviceListPtr; typedef virPCIDeviceList *virPCIDeviceListPtr;
# define VIR_DOMAIN_DEVICE_ZPCI_MAX_UID UINT16_MAX #define VIR_DOMAIN_DEVICE_ZPCI_MAX_UID UINT16_MAX
# define VIR_DOMAIN_DEVICE_ZPCI_MAX_FID UINT32_MAX #define VIR_DOMAIN_DEVICE_ZPCI_MAX_FID UINT32_MAX
typedef struct _virZPCIDeviceAddress virZPCIDeviceAddress; typedef struct _virZPCIDeviceAddress virZPCIDeviceAddress;
typedef virZPCIDeviceAddress *virZPCIDeviceAddressPtr; typedef virZPCIDeviceAddress *virZPCIDeviceAddressPtr;
@ -275,5 +274,3 @@ void virPCIDeviceAddressFree(virPCIDeviceAddressPtr address);
VIR_DEFINE_AUTOPTR_FUNC(virPCIDevice, virPCIDeviceFree); VIR_DEFINE_AUTOPTR_FUNC(virPCIDevice, virPCIDeviceFree);
VIR_DEFINE_AUTOPTR_FUNC(virPCIDeviceAddress, virPCIDeviceAddressFree); VIR_DEFINE_AUTOPTR_FUNC(virPCIDeviceAddress, virPCIDeviceAddressFree);
VIR_DEFINE_AUTOPTR_FUNC(virPCIEDeviceInfo, virPCIEDeviceInfoFree); VIR_DEFINE_AUTOPTR_FUNC(virPCIEDeviceInfo, virPCIEDeviceInfoFree);
#endif /* LIBVIRT_VIRPCI_H */

View File

@ -16,12 +16,11 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRPERF_H #pragma once
# define LIBVIRT_VIRPERF_H
# include "virutil.h" #include "virutil.h"
# include "virautoclean.h" #include "virautoclean.h"
# include "virenum.h" #include "virenum.h"
/* Some Intel processor families introduced some RDT (Resource Director /* Some Intel processor families introduced some RDT (Resource Director
* Technology) features to monitor or control shared resource based on * Technology) features to monitor or control shared resource based on
@ -84,5 +83,3 @@ int virPerfReadEvent(virPerfPtr perf,
uint64_t *value); uint64_t *value);
VIR_DEFINE_AUTOPTR_FUNC(virPerf, virPerfFree); VIR_DEFINE_AUTOPTR_FUNC(virPerf, virPerfFree);
#endif /* LIBVIRT_VIRPERF_H */

View File

@ -21,11 +21,10 @@
* *
*/ */
#ifndef LIBVIRT_VIRPIDFILE_H #pragma once
# define LIBVIRT_VIRPIDFILE_H
# include <sys/types.h> #include <sys/types.h>
# include "internal.h" #include "internal.h"
char *virPidFileBuildPath(const char *dir, char *virPidFileBuildPath(const char *dir,
const char *name); const char *name);
@ -75,5 +74,3 @@ int virPidFileConstructPath(bool privileged,
char **pidfile); char **pidfile);
int virPidFileForceCleanupPath(const char *path) ATTRIBUTE_NONNULL(1); int virPidFileForceCleanupPath(const char *path) ATTRIBUTE_NONNULL(1);
#endif /* LIBVIRT_VIRPIDFILE_H */

View File

@ -19,13 +19,12 @@
* *
*/ */
#ifndef LIBVIRT_VIRPOLKIT_H #pragma once
# define LIBVIRT_VIRPOLKIT_H
# include "internal.h" #include "internal.h"
# include "vircommand.h" #include "vircommand.h"
# define PKTTYAGENT "/usr/bin/pkttyagent" #define PKTTYAGENT "/usr/bin/pkttyagent"
int virPolkitCheckAuth(const char *actionid, int virPolkitCheckAuth(const char *actionid,
pid_t pid, pid_t pid,
@ -39,5 +38,3 @@ typedef virPolkitAgent *virPolkitAgentPtr;
void virPolkitAgentDestroy(virPolkitAgentPtr cmd); void virPolkitAgentDestroy(virPolkitAgentPtr cmd);
virPolkitAgentPtr virPolkitAgentCreate(void); virPolkitAgentPtr virPolkitAgentCreate(void);
#endif /* LIBVIRT_VIRPOLKIT_H */

View File

@ -19,11 +19,10 @@
* *
*/ */
#ifndef LIBVIRT_VIRPORTALLOCATOR_H #pragma once
# define LIBVIRT_VIRPORTALLOCATOR_H
# include "internal.h" #include "internal.h"
# include "virobject.h" #include "virobject.h"
typedef struct _virPortAllocatorRange virPortAllocatorRange; typedef struct _virPortAllocatorRange virPortAllocatorRange;
typedef virPortAllocatorRange *virPortAllocatorRangePtr; typedef virPortAllocatorRange *virPortAllocatorRangePtr;
@ -41,5 +40,3 @@ int virPortAllocatorAcquire(const virPortAllocatorRange *range,
int virPortAllocatorRelease(unsigned short port); int virPortAllocatorRelease(unsigned short port);
int virPortAllocatorSetUsed(unsigned short port); int virPortAllocatorSetUsed(unsigned short port);
#endif /* LIBVIRT_VIRPORTALLOCATOR_H */

View File

@ -19,15 +19,14 @@
* *
*/ */
#ifndef LIBVIRT_VIRPROCESS_H #pragma once
# define LIBVIRT_VIRPROCESS_H
# include <sys/types.h> #include <sys/types.h>
# include "internal.h" #include "internal.h"
# include "virbitmap.h" #include "virbitmap.h"
# include "virutil.h" #include "virutil.h"
# include "virenum.h" #include "virenum.h"
typedef enum { typedef enum {
VIR_PROC_POLICY_NONE = 0, VIR_PROC_POLICY_NONE = 0,
@ -125,5 +124,3 @@ typedef enum {
} virProcessNamespaceFlags; } virProcessNamespaceFlags;
int virProcessNamespaceAvailable(unsigned int ns); int virProcessNamespaceAvailable(unsigned int ns);
#endif /* LIBVIRT_VIRPROCESS_H */

View File

@ -20,13 +20,12 @@
* *
*/ */
#ifndef LIBVIRT_VIRQEMU_H #pragma once
# define LIBVIRT_VIRQEMU_H
# include "internal.h" #include "internal.h"
# include "virbuffer.h" #include "virbuffer.h"
# include "virjson.h" #include "virjson.h"
# include "virstorageencryption.h" #include "virstorageencryption.h"
typedef int (*virQEMUBuildCommandLineJSONArrayFormatFunc)(const char *key, typedef int (*virQEMUBuildCommandLineJSONArrayFormatFunc)(const char *key,
virJSONValuePtr array, virJSONValuePtr array,
@ -52,5 +51,3 @@ void virQEMUBuildQemuImgKeySecretOpts(virBufferPtr buf,
virStorageEncryptionInfoDefPtr enc, virStorageEncryptionInfoDefPtr enc,
const char *alias) const char *alias)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
#endif /* LIBVIRT_VIRQEMU_H */

View File

@ -16,10 +16,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRRANDOM_H #pragma once
# define LIBVIRT_VIRRANDOM_H
# include "internal.h" #include "internal.h"
uint64_t virRandomBits(int nbits) ATTRIBUTE_NOINLINE; uint64_t virRandomBits(int nbits) ATTRIBUTE_NOINLINE;
double virRandom(void); double virRandom(void);
@ -27,5 +26,3 @@ uint32_t virRandomInt(uint32_t max);
int virRandomBytes(unsigned char *buf, size_t buflen) int virRandomBytes(unsigned char *buf, size_t buflen)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE; ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
int virRandomGenerateWWN(char **wwn, const char *virt_type) ATTRIBUTE_NOINLINE; int virRandomGenerateWWN(char **wwn, const char *virt_type) ATTRIBUTE_NOINLINE;
#endif /* LIBVIRT_VIRRANDOM_H */

View File

@ -16,14 +16,13 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRRESCTRL_H #pragma once
# define LIBVIRT_VIRRESCTRL_H
# include "internal.h" #include "internal.h"
# include "virbitmap.h" #include "virbitmap.h"
# include "virutil.h" #include "virutil.h"
# include "virenum.h" #include "virenum.h"
typedef enum { typedef enum {
VIR_CACHE_TYPE_BOTH, VIR_CACHE_TYPE_BOTH,
@ -235,4 +234,3 @@ virResctrlMonitorGetCacheOccupancy(virResctrlMonitorPtr monitor,
void void
virResctrlMonitorFreeStats(virResctrlMonitorStatsPtr *stats, virResctrlMonitorFreeStats(virResctrlMonitorStatsPtr *stats,
size_t nstats); size_t nstats);
#endif /* LIBVIRT_VIRRESCTRL_H */

View File

@ -20,12 +20,9 @@
# error "virresctrlpriv.h may only be included by virresctrl.c or test suites" # error "virresctrlpriv.h may only be included by virresctrl.c or test suites"
#endif /* LIBVIRT_VIRRESCTRLPRIV_H_ALLOW */ #endif /* LIBVIRT_VIRRESCTRLPRIV_H_ALLOW */
#ifndef LIBVIRT_VIRRESCTRLPRIV_H #pragma once
# define LIBVIRT_VIRRESCTRLPRIV_H
# include "virresctrl.h" #include "virresctrl.h"
virResctrlAllocPtr virResctrlAllocPtr
virResctrlAllocGetUnused(virResctrlInfoPtr resctrl); virResctrlAllocGetUnused(virResctrlInfoPtr resctrl);
#endif /* LIBVIRT_VIRRESCTRLPRIV_H */

View File

@ -19,10 +19,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRROTATINGFILE_H #pragma once
# define LIBVIRT_VIRROTATINGFILE_H
# include "internal.h" #include "internal.h"
typedef struct virRotatingFileWriter virRotatingFileWriter; typedef struct virRotatingFileWriter virRotatingFileWriter;
typedef virRotatingFileWriter *virRotatingFileWriterPtr; typedef virRotatingFileWriter *virRotatingFileWriterPtr;
@ -58,5 +57,3 @@ ssize_t virRotatingFileReaderConsume(virRotatingFileReaderPtr file,
void virRotatingFileWriterFree(virRotatingFileWriterPtr file); void virRotatingFileWriterFree(virRotatingFileWriterPtr file);
void virRotatingFileReaderFree(virRotatingFileReaderPtr file); void virRotatingFileReaderFree(virRotatingFileReaderPtr file);
#endif /* LIBVIRT_VIRROTATINGFILE_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRSECLABEL_H #pragma once
# define LIBVIRT_VIRSECLABEL_H
typedef enum { typedef enum {
VIR_DOMAIN_SECLABEL_DEFAULT, VIR_DOMAIN_SECLABEL_DEFAULT,
@ -67,5 +66,3 @@ virSecurityDeviceLabelDefCopy(const virSecurityDeviceLabelDef *src)
void virSecurityLabelDefFree(virSecurityLabelDefPtr def); void virSecurityLabelDefFree(virSecurityLabelDefPtr def);
void virSecurityDeviceLabelDefFree(virSecurityDeviceLabelDefPtr def); void virSecurityDeviceLabelDefFree(virSecurityDeviceLabelDefPtr def);
#endif /* LIBVIRT_VIRSECLABEL_H */

View File

@ -19,14 +19,13 @@
* *
*/ */
#ifndef LIBVIRT_VIRSECRET_H #pragma once
# define LIBVIRT_VIRSECRET_H
# include "internal.h" #include "internal.h"
# include "virutil.h" #include "virutil.h"
# include "virxml.h" #include "virxml.h"
# include "virenum.h" #include "virenum.h"
VIR_ENUM_DECL(virSecretUsage); VIR_ENUM_DECL(virSecretUsage);
@ -57,4 +56,3 @@ int virSecretLookupParseSecret(xmlNodePtr secretnode,
void virSecretLookupFormatSecret(virBufferPtr buf, void virSecretLookupFormatSecret(virBufferPtr buf,
const char *secrettype, const char *secrettype,
virSecretLookupTypeDefPtr def); virSecretLookupTypeDefPtr def);
#endif /* LIBVIRT_VIRSECRET_H */

View File

@ -20,11 +20,10 @@
* *
*/ */
#ifndef LIBVIRT_VIRSEXPR_H #pragma once
# define LIBVIRT_VIRSEXPR_H
# include "internal.h" #include "internal.h"
# include "virbuffer.h" #include "virbuffer.h"
enum sexpr_type { enum sexpr_type {
SEXPR_NIL, SEXPR_NIL,
@ -65,5 +64,3 @@ int sexpr_has(const struct sexpr *sexpr, const char *node);
int sexpr_int(const struct sexpr *sexpr, const char *name); int sexpr_int(const struct sexpr *sexpr, const char *name);
double sexpr_float(const struct sexpr *sexpr, const char *name); double sexpr_float(const struct sexpr *sexpr, const char *name);
uint64_t sexpr_u64(const struct sexpr *sexpr, const char *name); uint64_t sexpr_u64(const struct sexpr *sexpr, const char *name);
#endif /* LIBVIRT_VIRSEXPR_H */

View File

@ -19,10 +19,9 @@
* *
*/ */
#ifndef LIBVIRT_VIRSYSTEMD_H #pragma once
# define LIBVIRT_VIRSYSTEMD_H
# include "internal.h" #include "internal.h"
char *virSystemdMakeScopeName(const char *name, char *virSystemdMakeScopeName(const char *name,
const char *drivername, const char *drivername,
@ -50,5 +49,3 @@ int virSystemdCanHibernate(bool *result);
int virSystemdCanHybridSleep(bool *result); int virSystemdCanHybridSleep(bool *result);
char *virSystemdGetMachineNameByPID(pid_t pid); char *virSystemdGetMachineNameByPID(pid_t pid);
#endif /* LIBVIRT_VIRSYSTEMD_H */

View File

@ -23,11 +23,8 @@
# error "virsystemdpriv.h may only be included by virsystemd.c or test suites" # error "virsystemdpriv.h may only be included by virsystemd.c or test suites"
#endif /* LIBVIRT_VIRSYSTEMDPRIV_H_ALLOW */ #endif /* LIBVIRT_VIRSYSTEMDPRIV_H_ALLOW */
#ifndef LIBVIRT_VIRSYSTEMDPRIV_H #pragma once
# define LIBVIRT_VIRSYSTEMDPRIV_H
# include "virsystemd.h" #include "virsystemd.h"
void virSystemdHasMachinedResetCachedValue(void); void virSystemdHasMachinedResetCachedValue(void);
#endif /* LIBVIRT_VIRSYSTEMDPRIV_H */

View File

@ -18,12 +18,11 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRTIME_H #pragma once
# define LIBVIRT_VIRTIME_H
# include <time.h> #include <time.h>
# include "internal.h" #include "internal.h"
/* The format string we intend to use is: /* The format string we intend to use is:
* *
@ -31,7 +30,7 @@
* %4d-%02d-%02d %02d:%02d:%02d.%03d+0000 * %4d-%02d-%02d %02d:%02d:%02d.%03d+0000
* *
*/ */
# define VIR_TIME_STRING_BUFLEN \ #define VIR_TIME_STRING_BUFLEN \
(4 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 3 + 5 + 1) (4 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 3 + 5 + 1)
/* Yr Mon Day Hour Min Sec Ms TZ NULL */ /* Yr Mon Day Hour Min Sec Ms TZ NULL */
@ -72,5 +71,3 @@ int virTimeBackOffStart(virTimeBackOffVar *var,
unsigned long long first, unsigned long long timeout); unsigned long long first, unsigned long long timeout);
bool virTimeBackOffWait(virTimeBackOffVar *var); bool virTimeBackOffWait(virTimeBackOffVar *var);
#endif /* LIBVIRT_VIRTIME_H */

View File

@ -18,9 +18,6 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRTPM_H #pragma once
# define LIBVIRT_VIRTPM_H
char *virTPMCreateCancelPath(const char *devpath) ATTRIBUTE_NOINLINE; char *virTPMCreateCancelPath(const char *devpath) ATTRIBUTE_NOINLINE;
#endif /* LIBVIRT_VIRTPM_H */

View File

@ -19,12 +19,11 @@
* *
*/ */
#ifndef LIBVIRT_VIRTYPEDPARAM_H #pragma once
# define LIBVIRT_VIRTYPEDPARAM_H
# include "internal.h" #include "internal.h"
# include "virutil.h" #include "virutil.h"
# include "virenum.h" #include "virenum.h"
/** /**
* VIR_TYPED_PARAM_MULTIPLE: * VIR_TYPED_PARAM_MULTIPLE:
@ -32,7 +31,7 @@
* Flag indicating that the params has multiple occurrences of the parameter. * Flag indicating that the params has multiple occurrences of the parameter.
* Only used as a flag for @type argument of the virTypedParamsValidate. * Only used as a flag for @type argument of the virTypedParamsValidate.
*/ */
# define VIR_TYPED_PARAM_MULTIPLE (1U << 31) #define VIR_TYPED_PARAM_MULTIPLE (1U << 31)
verify(!(VIR_TYPED_PARAM_LAST & VIR_TYPED_PARAM_MULTIPLE)); verify(!(VIR_TYPED_PARAM_LAST & VIR_TYPED_PARAM_MULTIPLE));
@ -120,7 +119,7 @@ int virTypedParamsSerialize(virTypedParameterPtr params,
VIR_ENUM_DECL(virTypedParameter); VIR_ENUM_DECL(virTypedParameter);
# define VIR_TYPED_PARAMS_DEBUG(params, nparams) \ #define VIR_TYPED_PARAMS_DEBUG(params, nparams) \
do { \ do { \
int _i; \ int _i; \
if (!params) \ if (!params) \
@ -134,5 +133,3 @@ VIR_ENUM_DECL(virTypedParameter);
VIR_FREE(_value); \ VIR_FREE(_value); \
} \ } \
} while (0) } while (0)
#endif /* LIBVIRT_VIRTYPEDPARAM_H */

View File

@ -18,14 +18,13 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRURI_H #pragma once
# define LIBVIRT_VIRURI_H
# include <libxml/uri.h> #include <libxml/uri.h>
# include "internal.h" #include "internal.h"
# include "virconf.h" #include "virconf.h"
# include "virautoclean.h" #include "virautoclean.h"
typedef struct _virURI virURI; typedef struct _virURI virURI;
typedef virURI *virURIPtr; typedef virURI *virURIPtr;
@ -64,6 +63,4 @@ void virURIFree(virURIPtr uri);
VIR_DEFINE_AUTOPTR_FUNC(virURI, virURIFree); VIR_DEFINE_AUTOPTR_FUNC(virURI, virURIFree);
int virURIResolveAlias(virConfPtr conf, const char *alias, char **uri); int virURIResolveAlias(virConfPtr conf, const char *alias, char **uri);
# define VIR_URI_SERVER(uri) ((uri) && (uri)->server ? (uri)->server : "localhost") #define VIR_URI_SERVER(uri) ((uri) && (uri)->server ? (uri)->server : "localhost")
#endif /* LIBVIRT_VIRURI_H */

View File

@ -18,14 +18,13 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRUSB_H #pragma once
# define LIBVIRT_VIRUSB_H
# include "internal.h" #include "internal.h"
# include "virobject.h" #include "virobject.h"
# include "virautoclean.h" #include "virautoclean.h"
# define USB_DEVFS "/dev/bus/usb/" #define USB_DEVFS "/dev/bus/usb/"
typedef struct _virUSBDevice virUSBDevice; typedef struct _virUSBDevice virUSBDevice;
typedef virUSBDevice *virUSBDevicePtr; typedef virUSBDevice *virUSBDevicePtr;
@ -97,5 +96,3 @@ virUSBDevicePtr virUSBDeviceListFind(virUSBDeviceListPtr list,
virUSBDevicePtr dev); virUSBDevicePtr dev);
VIR_DEFINE_AUTOPTR_FUNC(virUSBDevice, virUSBDeviceFree); VIR_DEFINE_AUTOPTR_FUNC(virUSBDevice, virUSBDeviceFree);
#endif /* LIBVIRT_VIRUSB_H */

View File

@ -20,19 +20,18 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRUTIL_H #pragma once
# define LIBVIRT_VIRUTIL_H
# include "internal.h" #include "internal.h"
# include <unistd.h> #include <unistd.h>
# include <sys/types.h> #include <sys/types.h>
# ifndef MIN #ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b)) # define MIN(a, b) ((a) < (b) ? (a) : (b))
# endif #endif
# ifndef MAX #ifndef MAX
# define MAX(a, b) ((a) > (b) ? (a) : (b)) # define MAX(a, b) ((a) > (b) ? (a) : (b))
# endif #endif
int virSetBlocking(int fd, bool blocking) ATTRIBUTE_RETURN_CHECK; int virSetBlocking(int fd, bool blocking) ATTRIBUTE_RETURN_CHECK;
@ -69,28 +68,28 @@ int virDiskNameToIndex(const char* str);
char *virIndexToDiskName(int idx, const char *prefix); char *virIndexToDiskName(int idx, const char *prefix);
/* No-op workarounds for functionality missing in mingw. */ /* No-op workarounds for functionality missing in mingw. */
# ifndef HAVE_GETUID #ifndef HAVE_GETUID
static inline int getuid(void) static inline int getuid(void)
{ return 0; } { return 0; }
# endif #endif
# ifndef HAVE_GETEUID #ifndef HAVE_GETEUID
static inline int geteuid(void) static inline int geteuid(void)
{ return 0; } { return 0; }
# endif #endif
# ifndef HAVE_GETGID #ifndef HAVE_GETGID
static inline int getgid(void) static inline int getgid(void)
{ return 0; } { return 0; }
# endif #endif
# ifndef HAVE_GETEGID #ifndef HAVE_GETEGID
static inline int getegid(void) static inline int getegid(void)
{ return 0; } { return 0; }
# endif #endif
# ifdef FUNC_PTHREAD_SIGMASK_BROKEN #ifdef FUNC_PTHREAD_SIGMASK_BROKEN
# undef pthread_sigmask # undef pthread_sigmask
static inline int pthread_sigmask(int how, static inline int pthread_sigmask(int how,
const void *set, const void *set,
void *old) void *old)
@ -100,7 +99,7 @@ static inline int pthread_sigmask(int how,
(void) old; (void) old;
return 0; return 0;
} }
# endif #endif
char *virGetHostname(void); char *virGetHostname(void);
char *virGetHostnameQuiet(void); char *virGetHostnameQuiet(void);
@ -172,7 +171,5 @@ char *virHostGetDRMRenderNode(void) ATTRIBUTE_NOINLINE;
* This macro assigns @lvalue to @rvalue and evaluates as true if the value of * This macro assigns @lvalue to @rvalue and evaluates as true if the value of
* @rvalue did not fit into the @lvalue. * @rvalue did not fit into the @lvalue.
*/ */
# define VIR_ASSIGN_IS_OVERFLOW(lvalue, rvalue) \ #define VIR_ASSIGN_IS_OVERFLOW(lvalue, rvalue) \
(((lvalue) = (rvalue)) != (rvalue)) (((lvalue) = (rvalue)) != (rvalue))
#endif /* LIBVIRT_VIRUTIL_H */

View File

@ -18,10 +18,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRUUID_H #pragma once
# define LIBVIRT_VIRUUID_H
# include "internal.h" #include "internal.h"
/** /**
@ -29,7 +28,7 @@
* @conn: connection * @conn: connection
* @uuid: possibly null UUID array * @uuid: possibly null UUID array
*/ */
# define VIR_UUID_DEBUG(conn, uuid) \ #define VIR_UUID_DEBUG(conn, uuid) \
do { \ do { \
if (uuid) { \ if (uuid) { \
char _uuidstr[VIR_UUID_STRING_BUFLEN]; \ char _uuidstr[VIR_UUID_STRING_BUFLEN]; \
@ -54,5 +53,3 @@ int virUUIDParse(const char *uuidstr,
const char *virUUIDFormat(const unsigned char *uuid, const char *virUUIDFormat(const unsigned char *uuid,
char *uuidstr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); char *uuidstr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
#endif /* LIBVIRT_VIRUUID_H */

View File

@ -16,10 +16,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRVHBA_H #pragma once
# define LIBVIRT_VIRVHBA_H
# include "internal.h" #include "internal.h"
enum { enum {
VPORT_CREATE, VPORT_CREATE,
@ -58,5 +57,3 @@ char *
virVHBAGetHostByFabricWWN(const char *sysfs_prefix, virVHBAGetHostByFabricWWN(const char *sysfs_prefix,
const char *fabric_wwn) const char *fabric_wwn)
ATTRIBUTE_NONNULL(2); ATTRIBUTE_NONNULL(2);
#endif /* LIBVIRT_VIRVHBA_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRVSOCK_H #pragma once
# define LIBVIRT_VIRVSOCK_H
int int
virVsockSetGuestCid(int fd, virVsockSetGuestCid(int fd,
@ -26,4 +25,3 @@ virVsockSetGuestCid(int fd,
int int
virVsockAcquireGuestCid(int fd, virVsockAcquireGuestCid(int fd,
unsigned int *guest_cid); unsigned int *guest_cid);
#endif /* LIBVIRT_VIRVSOCK_H */

View File

@ -18,26 +18,23 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRXDRDEFS_H #pragma once
# define LIBVIRT_VIRXDRDEFS_H
/* cygwin's xdr implementation defines xdr_u_int64_t instead of xdr_uint64_t /* cygwin's xdr implementation defines xdr_u_int64_t instead of xdr_uint64_t
* and lacks IXDR_PUT_INT32 and IXDR_GET_INT32 * and lacks IXDR_PUT_INT32 and IXDR_GET_INT32
*/ */
# ifdef HAVE_XDR_U_INT64_T #ifdef HAVE_XDR_U_INT64_T
# define xdr_uint64_t xdr_u_int64_t # define xdr_uint64_t xdr_u_int64_t
# endif #endif
# ifndef IXDR_PUT_INT32 #ifndef IXDR_PUT_INT32
# define IXDR_PUT_INT32 IXDR_PUT_LONG # define IXDR_PUT_INT32 IXDR_PUT_LONG
# endif #endif
# ifndef IXDR_GET_INT32 #ifndef IXDR_GET_INT32
# define IXDR_GET_INT32 IXDR_GET_LONG # define IXDR_GET_INT32 IXDR_GET_LONG
# endif #endif
# ifndef IXDR_PUT_U_INT32 #ifndef IXDR_PUT_U_INT32
# define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG # define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG
# endif #endif
# ifndef IXDR_GET_U_INT32 #ifndef IXDR_GET_U_INT32
# define IXDR_GET_U_INT32 IXDR_GET_U_LONG # define IXDR_GET_U_INT32 IXDR_GET_U_LONG
# endif #endif
#endif /* LIBVIRT_VIRXDRDEFS_H */