summaryrefslogtreecommitdiff
path: root/src/libunixonacid
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-09 17:16:40 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-09 17:16:40 +0000
commite557bab0dcaf35f003fa755b74e4c80000e05e42 (patch)
tree3bc4d8aeb04117b324f1b9b182c923e259a657c7 /src/libunixonacid
parent86312d159d55e99db5a5c82d9c50f31a1fe28199 (diff)
downloadskalibs-e557bab0dcaf35f003fa755b74e4c80000e05e42.tar.xz
Get rid of webipc.h and DJBUNIX_FLAG_*
Decent semantic header separation is hard. It's always an ongoing process. Here socket.h always included webipc.h for listen(), and webipc.h always included djbunix.h for socket_internal() and socketpair_internal(). That's ugh. Just move all the socket stuff into one socket header. Of course, djbunix.h is still needed most of the time for fd_close() and other operations on fds, but those are generic anyway. Also, O_CLOEXEC exists everywhere now, so we can use it as well as O_NONBLOCK instead of redefining the flags in djbunix.h.
Diffstat (limited to 'src/libunixonacid')
-rw-r--r--src/libunixonacid/ipc_timed_recv.c2
-rw-r--r--src/libunixonacid/skaclient_server_ack.c2
-rw-r--r--src/libunixonacid/skaclient_start_async.c4
-rw-r--r--src/libunixonacid/textclient_start.c2
4 files changed, 6 insertions, 4 deletions
diff --git a/src/libunixonacid/ipc_timed_recv.c b/src/libunixonacid/ipc_timed_recv.c
index ca3b57f..5710a8c 100644
--- a/src/libunixonacid/ipc_timed_recv.c
+++ b/src/libunixonacid/ipc_timed_recv.c
@@ -2,7 +2,7 @@
#include <skalibs/functypes.h>
#include <skalibs/allreadwrite.h>
-#include <skalibs/webipc.h>
+#include <skalibs/socket.h>
#include <skalibs/unix-timed.h>
struct blah_s
diff --git a/src/libunixonacid/skaclient_server_ack.c b/src/libunixonacid/skaclient_server_ack.c
index 9bad7cc..cec61d1 100644
--- a/src/libunixonacid/skaclient_server_ack.c
+++ b/src/libunixonacid/skaclient_server_ack.c
@@ -6,7 +6,7 @@
#include <skalibs/djbunix.h>
#include <skalibs/skaclient.h>
#include <skalibs/unixmessage.h>
-#include <skalibs/webipc.h>
+#include <skalibs/socket.h>
#include <skalibs/posixishard.h>
int skaclient_server_ack (unixmessage_t const *clientmsg, unixmessage_sender_t *out, unixmessage_sender_t *asyncout, char const *before, size_t beforelen, char const *after, size_t afterlen)
diff --git a/src/libunixonacid/skaclient_start_async.c b/src/libunixonacid/skaclient_start_async.c
index d678a85..3847ec0 100644
--- a/src/libunixonacid/skaclient_start_async.c
+++ b/src/libunixonacid/skaclient_start_async.c
@@ -1,11 +1,13 @@
/* ISC license. */
#include <errno.h>
+
#include <skalibs/error.h>
#include <skalibs/kolbak.h>
#include <skalibs/skaclient.h>
#include <skalibs/unixmessage.h>
-#include <skalibs/webipc.h>
+#include <skalibs/djbunix.h>
+#include <skalibs/socket.h>
#include "skaclient-internal.h"
int skaclient_start_async (
diff --git a/src/libunixonacid/textclient_start.c b/src/libunixonacid/textclient_start.c
index e8a6d0c..ee2f800 100644
--- a/src/libunixonacid/textclient_start.c
+++ b/src/libunixonacid/textclient_start.c
@@ -4,7 +4,7 @@
#include <string.h>
#include <errno.h>
-#include <skalibs/webipc.h>
+#include <skalibs/socket.h>
#include <skalibs/djbunix.h>
#include <skalibs/textmessage.h>
#include <skalibs/textclient.h>