X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=CODING_STYLE;h=0340ff0fa31e0beb53248e5c28f957532114c304;hp=1d1d97049257332671706b1810169feabc1000c4;hb=bcf88fc3f14867f1cabc911c27b661d738281df0;hpb=699eee62d1b1ad8af1ca944a1b500b6c3096de0d diff --git a/CODING_STYLE b/CODING_STYLE index 1d1d97049..0340ff0fa 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -202,3 +202,13 @@ b) socket() and socketpair() must get SOCK_CLOEXEC passed 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() + 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! + +- 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" + is C99 and in our public APIs we try to stick to C89 (with a few extension).