From a76759d3b9cee9a7c7782bd339b343f560d4b16e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 12 Jan 2018 14:09:59 +0000 Subject: [PATCH 1/7] Clarify which files are Unix-specific dbus-spawn.c and dbus-userdb* don't have obviously-Unix-specific names, but are Unix-specific anyway. Signed-off-by: Simon McVittie --- dbus/dbus-spawn.c | 7 +++++++ dbus/dbus-userdb-util.c | 6 ++++++ dbus/dbus-userdb.c | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index 4fc67b6d..82c9f8ae 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -24,6 +24,13 @@ #include +/* It isn't obvious from its name, but this file is part of the Unix + * system-dependent part of libdbus. Windows has a parallel + * implementation in dbus-spawn-win.c. */ +#if defined(DBUS_WIN) || !defined(DBUS_UNIX) +#error "This file only makes sense on Unix OSs" +#endif + #include "dbus-spawn.h" #include "dbus-sysdeps-unix.h" #include "dbus-internals.h" diff --git a/dbus/dbus-userdb-util.c b/dbus/dbus-userdb-util.c index 5ec68445..7f719b26 100644 --- a/dbus/dbus-userdb-util.c +++ b/dbus/dbus-userdb-util.c @@ -30,6 +30,12 @@ #include #include +/* It isn't obvious from its name, but this file is part of the Unix + * system-dependent part of libdbus. */ +#if defined(DBUS_WIN) || !defined(DBUS_UNIX) +#error "This file only makes sense on Unix OSs" +#endif + #ifdef HAVE_SYSTEMD #include #endif diff --git a/dbus/dbus-userdb.c b/dbus/dbus-userdb.c index 4c42b7dd..a07214eb 100644 --- a/dbus/dbus-userdb.c +++ b/dbus/dbus-userdb.c @@ -30,6 +30,13 @@ #include "dbus-credentials.h" #include +/* It isn't obvious from its name, but this file is part of the Unix + * system-dependent part of libdbus. Windows has a parallel + * implementation of some of it in dbus-sysdeps-win.c. */ +#if defined(DBUS_WIN) || !defined(DBUS_UNIX) +#error "This file only makes sense on Unix OSs" +#endif + /** * @addtogroup DBusInternalsUtils * @{ -- 2.15.1