提交 c664bbff 编写于 作者: J Jonathon Jongsma 提交者: Ján Tomko

util: dbus: use #pragma once in headers

Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 e7bacd3d
...@@ -19,19 +19,18 @@ ...@@ -19,19 +19,18 @@
* *
*/ */
#ifndef LIBVIRT_VIRDBUS_H #pragma once
# define LIBVIRT_VIRDBUS_H
# ifdef WITH_DBUS #ifdef WITH_DBUS
# undef interface /* Work around namespace pollution in mingw's rpc.h */ # undef interface /* Work around namespace pollution in mingw's rpc.h */
# include <dbus/dbus.h> # include <dbus/dbus.h>
# else #else
# define DBusConnection void # define DBusConnection void
# define DBusMessage void # define DBusMessage void
# endif #endif
# include "internal.h" #include "internal.h"
# include <stdarg.h> #include <stdarg.h>
void virDBusSetSharedBus(bool shared); void virDBusSetSharedBus(bool shared);
...@@ -75,4 +74,3 @@ int virDBusIsServiceEnabled(const char *name); ...@@ -75,4 +74,3 @@ int virDBusIsServiceEnabled(const char *name);
int virDBusIsServiceRegistered(const char *name); int virDBusIsServiceRegistered(const char *name);
bool virDBusErrorIsUnknownMethod(virErrorPtr err); bool virDBusErrorIsUnknownMethod(virErrorPtr err);
#endif /* LIBVIRT_VIRDBUS_H */
...@@ -23,12 +23,11 @@ ...@@ -23,12 +23,11 @@
# error "virdbuspriv.h may only be included by virdbus.c or test suites" # error "virdbuspriv.h may only be included by virdbus.c or test suites"
#endif /* LIBVIRT_VIRDBUSPRIV_H_ALLOW */ #endif /* LIBVIRT_VIRDBUSPRIV_H_ALLOW */
#ifndef LIBVIRT_VIRDBUSPRIV_H #pragma once
# define LIBVIRT_VIRDBUSPRIV_H
# include "virdbus.h" #include "virdbus.h"
# if defined(WITH_DBUS) && !HAVE_DBUSBASICVALUE #if defined(WITH_DBUS) && !HAVE_DBUSBASICVALUE
/* Copied (and simplified) from dbus 1.6.12, for use with older dbus headers */ /* Copied (and simplified) from dbus 1.6.12, for use with older dbus headers */
typedef union typedef union
{ {
...@@ -42,7 +41,7 @@ typedef union ...@@ -42,7 +41,7 @@ typedef union
double dbl; /**< as double */ double dbl; /**< as double */
unsigned char byt; /**< as byte */ unsigned char byt; /**< as byte */
} DBusBasicValue; } DBusBasicValue;
# endif #endif
int virDBusMessageEncodeArgs(DBusMessage* msg, int virDBusMessageEncodeArgs(DBusMessage* msg,
const char *types, const char *types,
...@@ -55,5 +54,3 @@ int virDBusMessageDecodeArgs(DBusMessage* msg, ...@@ -55,5 +54,3 @@ int virDBusMessageDecodeArgs(DBusMessage* msg,
int virDBusMessageEncode(DBusMessage* msg, int virDBusMessageEncode(DBusMessage* msg,
const char *types, const char *types,
...); ...);
#endif /* LIBVIRT_VIRDBUSPRIV_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册