summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CODING_STYLE7
-rw-r--r--man/sd_bus_creds_get_pid.xml2
-rw-r--r--man/sd_bus_creds_new_from_pid.xml2
-rw-r--r--man/sd_bus_default.xml2
-rw-r--r--man/sd_bus_error.xml2
-rw-r--r--man/sd_bus_message_append.xml2
-rw-r--r--man/sd_bus_message_append_array.xml2
-rw-r--r--man/sd_bus_message_append_basic.xml2
-rw-r--r--man/sd_bus_message_append_string_memfd.xml2
-rw-r--r--man/sd_bus_message_append_strv.xml2
-rw-r--r--man/sd_bus_message_get_cookie.xml2
-rw-r--r--man/sd_bus_message_get_monotonic_usec.xml2
-rw-r--r--man/sd_bus_negotiate_fds.xml2
-rw-r--r--man/sd_bus_new.xml2
-rw-r--r--man/sd_bus_path_encode.xml2
-rw-r--r--man/sd_bus_request_name.xml2
-rw-r--r--man/sd_event_add_child.xml2
-rw-r--r--man/sd_event_add_defer.xml2
-rw-r--r--man/sd_event_add_signal.xml2
-rw-r--r--man/sd_event_add_time.xml2
-rw-r--r--man/sd_event_get_fd.xml2
-rw-r--r--man/sd_event_new.xml2
-rw-r--r--man/sd_event_run.xml2
-rw-r--r--man/sd_event_set_name.xml2
-rw-r--r--man/sd_event_wait.xml2
-rw-r--r--src/basic/util.c4
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c4
-rw-r--r--src/machine/machine-dbus.c4
28 files changed, 34 insertions, 33 deletions
diff --git a/CODING_STYLE b/CODING_STYLE
index bdec988ce6..dbadfbdb54 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -210,11 +210,12 @@
c) recvmsg() must get MSG_CMSG_CLOEXEC set
d) F_DUPFD_CLOEXEC should be used instead of F_DUPFD, and so on
-- We never use the XDG version of basename(). glibc defines it in
- libgen.h. The only reason to include that file is because dirname()
+- We never use the POSIX version of basename() (which glibc defines it in
+ libgen.h), only the GNU version (which glibc defines in string.h).
+ The only reason to include libgen.h is because dirname()
is needed. Everytime you need that please immediately undefine
basename(), and add a comment about it, so that no code ever ends up
- using the XDG version!
+ using the POSIX version!
- Use the bool type for booleans, not integers. One exception: in public
headers (i.e those in src/systemd/sd-*.h) use integers after all, as "bool"
diff --git a/man/sd_bus_creds_get_pid.xml b/man/sd_bus_creds_get_pid.xml
index 8a193d5a59..b9e081101b 100644
--- a/man/sd_bus_creds_get_pid.xml
+++ b/man/sd_bus_creds_get_pid.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_creds_get_pid" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_creds_get_pid">
<refentryinfo>
<title>sd_bus_creds_get_pid</title>
diff --git a/man/sd_bus_creds_new_from_pid.xml b/man/sd_bus_creds_new_from_pid.xml
index 695d4e1f5a..36b6bef04e 100644
--- a/man/sd_bus_creds_new_from_pid.xml
+++ b/man/sd_bus_creds_new_from_pid.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_creds_new_from_pid" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_creds_new_from_pid">
<refentryinfo>
<title>sd_bus_creds_new_from_pid</title>
diff --git a/man/sd_bus_default.xml b/man/sd_bus_default.xml
index 55f1b8bb69..ae0b1a05c8 100644
--- a/man/sd_bus_default.xml
+++ b/man/sd_bus_default.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_default" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_default">
<refentryinfo>
<title>sd_bus_default</title>
diff --git a/man/sd_bus_error.xml b/man/sd_bus_error.xml
index bd2a27984c..762f0c0d6d 100644
--- a/man/sd_bus_error.xml
+++ b/man/sd_bus_error.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_error" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_error">
<refentryinfo>
<title>sd_bus_error</title>
diff --git a/man/sd_bus_message_append.xml b/man/sd_bus_message_append.xml
index 91a80792e1..5025bdfefb 100644
--- a/man/sd_bus_message_append.xml
+++ b/man/sd_bus_message_append.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_message_append" conditional="ENABLE_KDBUS"
+<refentry id="sd_bus_message_append"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
diff --git a/man/sd_bus_message_append_array.xml b/man/sd_bus_message_append_array.xml
index 5409893374..fc5ee2392b 100644
--- a/man/sd_bus_message_append_array.xml
+++ b/man/sd_bus_message_append_array.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_message_append_array" conditional="ENABLE_KDBUS"
+<refentry id="sd_bus_message_append_array"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
diff --git a/man/sd_bus_message_append_basic.xml b/man/sd_bus_message_append_basic.xml
index 81ac6de952..82c6957122 100644
--- a/man/sd_bus_message_append_basic.xml
+++ b/man/sd_bus_message_append_basic.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_message_append_basic" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_message_append_basic">
<refentryinfo>
<title>sd_bus_message_append_basic</title>
diff --git a/man/sd_bus_message_append_string_memfd.xml b/man/sd_bus_message_append_string_memfd.xml
index 1fecbd5773..61c513ad75 100644
--- a/man/sd_bus_message_append_string_memfd.xml
+++ b/man/sd_bus_message_append_string_memfd.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_message_append_string_memfd" conditional="ENABLE_KDBUS"
+<refentry id="sd_bus_message_append_string_memfd"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
diff --git a/man/sd_bus_message_append_strv.xml b/man/sd_bus_message_append_strv.xml
index d986b06a41..57a6864ace 100644
--- a/man/sd_bus_message_append_strv.xml
+++ b/man/sd_bus_message_append_strv.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_message_append_strv" conditional="ENABLE_KDBUS"
+<refentry id="sd_bus_message_append_strv"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
diff --git a/man/sd_bus_message_get_cookie.xml b/man/sd_bus_message_get_cookie.xml
index 7795acfec3..7f762a34f7 100644
--- a/man/sd_bus_message_get_cookie.xml
+++ b/man/sd_bus_message_get_cookie.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_message_get_cookie" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_message_get_cookie">
<refentryinfo>
<title>sd_bus_message_get_cookie</title>
diff --git a/man/sd_bus_message_get_monotonic_usec.xml b/man/sd_bus_message_get_monotonic_usec.xml
index c109fe10a3..c8deecffbb 100644
--- a/man/sd_bus_message_get_monotonic_usec.xml
+++ b/man/sd_bus_message_get_monotonic_usec.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_message_get_monotonic_usec" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_message_get_monotonic_usec">
<refentryinfo>
<title>sd_bus_message_get_monotonic_usec</title>
diff --git a/man/sd_bus_negotiate_fds.xml b/man/sd_bus_negotiate_fds.xml
index 4f9204e7bc..d31cb57e5f 100644
--- a/man/sd_bus_negotiate_fds.xml
+++ b/man/sd_bus_negotiate_fds.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_negotiate_fds" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_negotiate_fds">
<refentryinfo>
<title>sd_bus_negotiate_fds</title>
diff --git a/man/sd_bus_new.xml b/man/sd_bus_new.xml
index bc91dd2665..c1d82bbe53 100644
--- a/man/sd_bus_new.xml
+++ b/man/sd_bus_new.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_new" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_new">
<refentryinfo>
<title>sd_bus_new</title>
diff --git a/man/sd_bus_path_encode.xml b/man/sd_bus_path_encode.xml
index 0a6ac80473..41c35bde02 100644
--- a/man/sd_bus_path_encode.xml
+++ b/man/sd_bus_path_encode.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_path_encode" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_path_encode">
<refentryinfo>
<title>sd_bus_path_encode</title>
diff --git a/man/sd_bus_request_name.xml b/man/sd_bus_request_name.xml
index 78b440b7db..a7dc9fea89 100644
--- a/man/sd_bus_request_name.xml
+++ b/man/sd_bus_request_name.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_bus_request_name" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_request_name">
<refentryinfo>
<title>sd_bus_request_name</title>
diff --git a/man/sd_event_add_child.xml b/man/sd_event_add_child.xml
index 7de9f409e9..6b53c8422b 100644
--- a/man/sd_event_add_child.xml
+++ b/man/sd_event_add_child.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_add_child" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_add_child">
<refentryinfo>
<title>sd_event_add_child</title>
diff --git a/man/sd_event_add_defer.xml b/man/sd_event_add_defer.xml
index 4aabc0793a..b991b38650 100644
--- a/man/sd_event_add_defer.xml
+++ b/man/sd_event_add_defer.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_add_defer" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_add_defer">
<refentryinfo>
<title>sd_event_add_defer</title>
diff --git a/man/sd_event_add_signal.xml b/man/sd_event_add_signal.xml
index e84d5c7200..16414803f4 100644
--- a/man/sd_event_add_signal.xml
+++ b/man/sd_event_add_signal.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_add_signal" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_add_signal">
<refentryinfo>
<title>sd_event_add_signal</title>
diff --git a/man/sd_event_add_time.xml b/man/sd_event_add_time.xml
index 3c5de48cab..5fc917270c 100644
--- a/man/sd_event_add_time.xml
+++ b/man/sd_event_add_time.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_add_time" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_add_time">
<refentryinfo>
<title>sd_event_add_time</title>
diff --git a/man/sd_event_get_fd.xml b/man/sd_event_get_fd.xml
index 8f74c1e5c4..1e46665e47 100644
--- a/man/sd_event_get_fd.xml
+++ b/man/sd_event_get_fd.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_get_fd" conditional="ENABLE_KDBUS"
+<refentry id="sd_event_get_fd"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
diff --git a/man/sd_event_new.xml b/man/sd_event_new.xml
index d225330023..43b5b742f7 100644
--- a/man/sd_event_new.xml
+++ b/man/sd_event_new.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_new" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_new">
<refentryinfo>
<title>sd_event_new</title>
diff --git a/man/sd_event_run.xml b/man/sd_event_run.xml
index 036887d9f0..9b50b95459 100644
--- a/man/sd_event_run.xml
+++ b/man/sd_event_run.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_run" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_run">
<refentryinfo>
<title>sd_event_run</title>
diff --git a/man/sd_event_set_name.xml b/man/sd_event_set_name.xml
index 0b46414bba..eec34d1182 100644
--- a/man/sd_event_set_name.xml
+++ b/man/sd_event_set_name.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_set_name" conditional="ENABLE_KDBUS"
+<refentry id="sd_event_set_name"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
diff --git a/man/sd_event_wait.xml b/man/sd_event_wait.xml
index db74a96e8e..94f8b5ca45 100644
--- a/man/sd_event_wait.xml
+++ b/man/sd_event_wait.xml
@@ -24,7 +24,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="sd_event_wait" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_wait">
<refentryinfo>
<title>sd_event_wait</title>
diff --git a/src/basic/util.c b/src/basic/util.c
index b7c70af541..e0c5069ff8 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -60,8 +60,8 @@
#include <linux/fs.h>
/* When we include libgen.h because we need dirname() we immediately
- * undefine basename() since libgen.h defines it as a macro to the XDG
- * version which is really broken. */
+ * undefine basename() since libgen.h defines it as a macro to the POSIX
+ * version which is really broken. We prefer GNU basename(). */
#include <libgen.h>
#undef basename
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 3aaaabf4ed..f08db2da89 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -29,8 +29,8 @@
#include <sys/prctl.h>
/* When we include libgen.h because we need dirname() we immediately
- * undefine basename() since libgen.h defines it as a macro to the XDG
- * version which is really broken. */
+ * undefine basename() since libgen.h defines it as a macro to the POSIX
+ * version which is really broken. We prefer GNU basename(). */
#include <libgen.h>
#undef basename
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 0892479a9a..9f026beb13 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -24,8 +24,8 @@
#include <sys/mount.h>
/* When we include libgen.h because we need dirname() we immediately
- * undefine basename() since libgen.h defines it as a macro to the XDG
- * version which is really broken. */
+ * undefine basename() since libgen.h defines it as a macro to the POSIX
+ * version which is really broken. We prefer GNU basename(). */
#include <libgen.h>
#undef basename