summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-12-23 13:05:25 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-12-23 13:05:25 +0000
commit07491df186d562d0efa6a7fca2b7f8d07dbd0652 (patch)
treed66a8709a82b4c621c5f21a7f346362e8a243a3f /src/include
parent8bbfc319248c0cbeb57edc45f26d1c972d32f505 (diff)
downloads6-07491df186d562d0efa6a7fca2b7f8d07dbd0652.tar.xz
Make execline dependency optional
This includes: - adding a configure option to disable execline support - duplicating el_semicolon() and el_getstrict() into the s6 library when execline is disabled at build time, making a compat shim and using it where needed (s6-svlisten, s6-ftrig-listen) - Creating alternatives for execlineb script spawning: * s6-log: '?' directive (done in the previous commit) * s6-notifyoncheck: require hardcoding the check in ./data/check * s6-ipcserver-access: no support for exec files, add a warning - Updating the relevant parts of the doc --enable-execline will remain the default, and whiners can choke on their tears.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/s6/compat.h20
-rw-r--r--src/include/s6/s6.h1
2 files changed, 21 insertions, 0 deletions
diff --git a/src/include/s6/compat.h b/src/include/s6/compat.h
new file mode 100644
index 0000000..151db07
--- /dev/null
+++ b/src/include/s6/compat.h
@@ -0,0 +1,20 @@
+/* ISC license. */
+
+#ifndef S6_COMPAT_H
+#define S6_COMPAT_H
+
+#include <s6/config.h>
+
+#ifdef S6_USE_EXECLINE
+
+#include <execline/execline.h>
+#define s6_el_semicolon(argv) el_semicolon(argv)
+
+#else
+
+extern int s6_compat_el_semicolon (char const **) ;
+#define s6_el_semicolon(argv) s6_compat_el_semicolon(argv)
+
+#endif
+
+#endif
diff --git a/src/include/s6/s6.h b/src/include/s6/s6.h
index 98e23e1..aabcc13 100644
--- a/src/include/s6/s6.h
+++ b/src/include/s6/s6.h
@@ -3,6 +3,7 @@
#ifndef S6_H
#define S6_H
+#include <s6/compat.h>
#include <s6/s6-supervise.h>
#include <s6/ftrigr.h>
#include <s6/ftrigw.h>