From: Simon McVittie Date: Fri, 12 Jan 2018 14:09:59 +0000 (+0000) Subject: Clarify which files are Unix-specific X-Git-Tag: dbus-1.13.0~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a0ac6521175081360919e6891d54aae292f952b5;p=thirdparty%2Fdbus.git 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 Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104588 --- diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index 4fc67b6df..82c9f8ae1 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 5ec68445f..7f719b262 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 317b502dc..e765e7945 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 * @{