summaryrefslogtreecommitdiff
path: root/CODING_STYLE
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-06-17 13:08:15 +0200
committerLennart Poettering <lennart@poettering.net>2015-06-17 13:08:15 +0200
commitafc4290e2c48b8a0803247880b6382d639990504 (patch)
treed1ad20280f17dc6ae7969c174989e02acb1fc619 /CODING_STYLE
parent49b59497485887e8ec3af8875f54f02fadb56203 (diff)
parent11c9f1e48a683fb2e78ee531016099d567baa19a (diff)
Merge pull request #246 from smcv/xpg-not-xdg
Stop talking about the "XDG" version of basename()
Diffstat (limited to 'CODING_STYLE')
-rw-r--r--CODING_STYLE7
1 files changed, 4 insertions, 3 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"