util-lib: move CONF_DIRS_NULSTR definition to def.h
authorLennart Poettering <lennart@poettering.net>
Tue, 3 Nov 2015 11:26:12 +0000 (12:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 3 Nov 2015 16:45:11 +0000 (17:45 +0100)
After all, this is not some compiler or C magic, but something very
specific to how systemd works, hence let's move it into def.h, and out
of macro.h

14 files changed:
src/basic/def.h
src/basic/macro.h
src/binfmt/binfmt.c
src/bootchart/bootchart.c
src/journal-remote/journal-remote.c
src/journal-remote/journal-upload.c
src/login/logind.c
src/modules-load/modules-load.c
src/resolve/resolved-conf.c
src/shared/sleep-config.c
src/sysctl/sysctl.c
src/sysusers/sysusers.c
src/timesync/timesyncd-conf.c
src/tmpfiles/tmpfiles.c

index b33f9ae..950f693 100644 (file)
 
 #define NOTIFY_FD_MAX 768
 #define NOTIFY_BUFFER_MAX PIPE_BUF
+
+/* Return a nulstr for a standard cascade of configuration directories,
+ * suitable to pass to conf_files_list_nulstr or config_parse_many. */
+#define CONF_DIRS_NULSTR(n) \
+        "/etc/" n ".d\0" \
+        "/run/" n ".d\0" \
+        "/usr/local/lib/" n ".d\0" \
+        "/usr/lib/" n ".d\0" \
+        CONF_DIR_SPLIT_USR(n)
+
+#ifdef HAVE_SPLIT_USR
+#define CONF_DIR_SPLIT_USR(n) "/lib/" n ".d\0"
+#else
+#define CONF_DIR_SPLIT_USR(n)
+#endif
index daa7c41..5088e67 100644 (file)
@@ -334,21 +334,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
                 _found;                                                 \
         })
 
-/* Return a nulstr for a standard cascade of configuration directories,
- * suitable to pass to conf_files_list_nulstr or config_parse_many. */
-#define CONF_DIRS_NULSTR(n) \
-        "/etc/" n ".d\0" \
-        "/run/" n ".d\0" \
-        "/usr/local/lib/" n ".d\0" \
-        "/usr/lib/" n ".d\0" \
-        CONF_DIR_SPLIT_USR(n)
-
-#ifdef HAVE_SPLIT_USR
-#define CONF_DIR_SPLIT_USR(n) "/lib/" n ".d\0"
-#else
-#define CONF_DIR_SPLIT_USR(n)
-#endif
-
 /* Define C11 thread_local attribute even on older gcc compiler
  * version */
 #ifndef thread_local
index 8e63153..594c9eb 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "alloc-util.h"
 #include "conf-files.h"
+#include "def.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "log.h"
index 6723fa5..852febb 100644 (file)
@@ -51,6 +51,7 @@
 #include "alloc-util.h"
 #include "bootchart.h"
 #include "conf-parser.h"
+#include "def.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "io-util.h"
index dc69bb8..6326f90 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "alloc-util.h"
 #include "conf-parser.h"
+#include "def.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
index 7d274d2..42d14dc 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "alloc-util.h"
 #include "conf-parser.h"
+#include "def.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "formats-util.h"
index 4b8c834..d1e2ea2 100644 (file)
@@ -31,6 +31,7 @@
 #include "bus-error.h"
 #include "bus-util.h"
 #include "conf-parser.h"
+#include "def.h"
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
index 830ca7b..b90c507 100644 (file)
@@ -27,6 +27,7 @@
 #include <sys/stat.h>
 
 #include "conf-files.h"
+#include "def.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "log.h"
index c9919ce..42e3be3 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "alloc-util.h"
 #include "conf-parser.h"
+#include "def.h"
 #include "extract-word.h"
 #include "parse-util.h"
 #include "resolved-conf.h"
index bbbb346..102c5cc 100644 (file)
 
 #include "alloc-util.h"
 #include "conf-parser.h"
+#include "def.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "log.h"
+#include "parse-util.h"
 #include "sleep-config.h"
 #include "string-util.h"
 #include "strv.h"
 #include "util.h"
-#include "parse-util.h"
 
 #define USE(x, y) do{ (x) = (y); (y) = NULL; } while(0)
 
index 5e15dfb..24cfe58 100644 (file)
@@ -28,6 +28,7 @@
 #include <string.h>
 
 #include "conf-files.h"
+#include "def.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "hashmap.h"
index 36d310b..9a1c88d 100644 (file)
@@ -29,6 +29,8 @@
 #include "alloc-util.h"
 #include "conf-files.h"
 #include "copy.h"
+#include "def.h"
+#include "fd-util.h"
 #include "fileio-label.h"
 #include "formats-util.h"
 #include "hashmap.h"
 #include "string-util.h"
 #include "strv.h"
 #include "uid-range.h"
+#include "user-util.h"
 #include "utf8.h"
 #include "util.h"
-#include "fd-util.h"
-#include "user-util.h"
 
 typedef enum ItemType {
         ADD_USER = 'u',
index be651fc..001a0f4 100644 (file)
 ***/
 
 #include "alloc-util.h"
+#include "def.h"
+#include "extract-word.h"
 #include "string-util.h"
+#include "timesyncd-conf.h"
 #include "timesyncd-manager.h"
 #include "timesyncd-server.h"
-#include "timesyncd-conf.h"
-#include "extract-word.h"
 
 int manager_parse_server_string(Manager *m, ServerType type, const char *string) {
         ServerName *first;
index 4533542..ffae91a 100644 (file)
@@ -45,6 +45,7 @@
 #include "chattr-util.h"
 #include "conf-files.h"
 #include "copy.h"
+#include "def.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"