summaryrefslogtreecommitdiff
path: root/src/libstddjb
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-02-19 16:23:24 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-02-19 16:23:24 +0000
commitff9333d473adb4ae1de2d9323394073793627823 (patch)
tree24780fca6ab8c57e5d8c5d98b61362af33bef4b8 /src/libstddjb
parent15eda3d33f9e1160d438d370acd442ef3dbba63f (diff)
downloadskalibs-ff9333d473adb4ae1de2d9323394073793627823.tar.xz
Add skalibs/posixishard.h
This will break things. It's a known issue. Patches to other packages will come later, to adapt them to the new API. To work around brokenness, there needs to be *two* different headers: 1. one to be used before including system headers, that maximizes visibility by enabling system-dependent feature test macros (that will be tested by system headers) 2. one to be used after including system headers, that performs preprocessor tests and defines. skalibs/nonposix.h is the first one. Previously, there was no second one, and the tests were scattered all over. There was a strnlen declaration in skalibs/posixplz.h (which serves a totally different function: declaring things that should be in POSIX, but *are not*, i.e. working around problems in the standard, instead of problems in systems failing to respect the standard), a build-time sysdep for error.h, #defines for MSG_NOSIGNAL, etc. etc. skalibs/posixishard.h now is the second one, and centralizes all the tests. As a result, the eproto sysdep is unnecessary and has been removed. skalibs/error.h is now a static header, it is not built anymore.
Diffstat (limited to 'src/libstddjb')
-rw-r--r--src/libstddjb/cdb_read.c3
-rw-r--r--src/libstddjb/ipc_bind.c4
-rw-r--r--src/libstddjb/ipc_connect.c4
-rw-r--r--src/libstddjb/ipc_recv.c4
-rw-r--r--src/libstddjb/ipc_send.c4
-rw-r--r--src/libstddjb/netstring_get.c3
-rw-r--r--src/libstddjb/string_unquote_withdelim.c3
7 files changed, 18 insertions, 7 deletions
diff --git a/src/libstddjb/cdb_read.c b/src/libstddjb/cdb_read.c
index fa7b1d3..85e8dea 100644
--- a/src/libstddjb/cdb_read.c
+++ b/src/libstddjb/cdb_read.c
@@ -3,7 +3,8 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include <skalibs/error.h>
+
+#include <skalibs/posixishard.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/cdb.h>
diff --git a/src/libstddjb/ipc_bind.c b/src/libstddjb/ipc_bind.c
index 8686591..b3388d7 100644
--- a/src/libstddjb/ipc_bind.c
+++ b/src/libstddjb/ipc_bind.c
@@ -1,11 +1,13 @@
/* ISC license. */
#include <skalibs/nonposix.h>
+
#include <sys/socket.h>
#include <sys/un.h>
#include <string.h>
#include <errno.h>
-#include <skalibs/error.h>
+
+#include <skalibs/posixishard.h>
#include <skalibs/webipc.h>
int ipc_bind (int s, char const *p)
diff --git a/src/libstddjb/ipc_connect.c b/src/libstddjb/ipc_connect.c
index 9aa4dd9..bb0422e 100644
--- a/src/libstddjb/ipc_connect.c
+++ b/src/libstddjb/ipc_connect.c
@@ -1,11 +1,13 @@
/* ISC license. */
#include <skalibs/nonposix.h>
+
#include <errno.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <string.h>
-#include <skalibs/error.h>
+
+#include <skalibs/posixishard.h>
#include <skalibs/webipc.h>
int ipc_connect (int s, char const *p)
diff --git a/src/libstddjb/ipc_recv.c b/src/libstddjb/ipc_recv.c
index 5aa1c2b..e15e3c5 100644
--- a/src/libstddjb/ipc_recv.c
+++ b/src/libstddjb/ipc_recv.c
@@ -1,11 +1,13 @@
/* ISC license. */
#include <skalibs/nonposix.h>
+
#include <errno.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <string.h>
-#include <skalibs/error.h>
+
+#include <skalibs/posixishard.h>
#include <skalibs/webipc.h>
ssize_t ipc_recv (int fd, char *s, size_t len, char *path)
diff --git a/src/libstddjb/ipc_send.c b/src/libstddjb/ipc_send.c
index 967a64f..65826a6 100644
--- a/src/libstddjb/ipc_send.c
+++ b/src/libstddjb/ipc_send.c
@@ -1,11 +1,13 @@
/* ISC license. */
#include <skalibs/nonposix.h>
+
#include <errno.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <string.h>
-#include <skalibs/error.h>
+
+#include <skalibs/posixishard.h>
#include <skalibs/webipc.h>
ssize_t ipc_send (int fd, char const *s, size_t len, char const *path)
diff --git a/src/libstddjb/netstring_get.c b/src/libstddjb/netstring_get.c
index 9756b2e..0dfa907 100644
--- a/src/libstddjb/netstring_get.c
+++ b/src/libstddjb/netstring_get.c
@@ -1,11 +1,12 @@
/* ISC license. */
#include <errno.h>
+
+#include <skalibs/posixishard.h>
#include <skalibs/types.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/bytestr.h>
#include <skalibs/buffer.h>
-#include <skalibs/error.h>
#include <skalibs/stralloc.h>
#include <skalibs/netstring.h>
diff --git a/src/libstddjb/string_unquote_withdelim.c b/src/libstddjb/string_unquote_withdelim.c
index 3ebd07d..702d3a5 100644
--- a/src/libstddjb/string_unquote_withdelim.c
+++ b/src/libstddjb/string_unquote_withdelim.c
@@ -1,7 +1,8 @@
/* ISC license. */
#include <errno.h>
-#include <skalibs/error.h>
+
+#include <skalibs/posixishard.h>
#include <skalibs/bytestr.h>
#include <skalibs/fmtscan.h>
#include <skalibs/skamisc.h>