diff options
Diffstat (limited to 'src/libunixonacid')
-rw-r--r-- | src/libunixonacid/textclient_server_init_fromsocket.c | 3 | ||||
-rw-r--r-- | src/libunixonacid/unixmessage_put.c | 22 | ||||
-rw-r--r-- | src/libunixonacid/unixmessage_receive.c | 6 | ||||
-rw-r--r-- | src/libunixonacid/unixmessage_sender_flush.c | 3 | ||||
-rw-r--r-- | src/libunixonacid/unixmessage_sender_free.c | 4 |
5 files changed, 0 insertions, 38 deletions
diff --git a/src/libunixonacid/textclient_server_init_fromsocket.c b/src/libunixonacid/textclient_server_init_fromsocket.c index 5b71463..e58df2b 100644 --- a/src/libunixonacid/textclient_server_init_fromsocket.c +++ b/src/libunixonacid/textclient_server_init_fromsocket.c @@ -1,6 +1,5 @@ /* ISC license. */ -#include <skalibs/sysdeps.h> #include <skalibs/nonposix.h> #include <sys/uio.h> #include <errno.h> @@ -60,9 +59,7 @@ static int sendit (void *p) do r = sendmsg(fd[0], &hdr, MSG_NOSIGNAL) ; while (r < 0 && errno == EINTR) ; if (r <= 0) return 0 ; -#ifndef SKALIBS_HASANCILAUTOCLOSE fd_close(fd[1]) ; -#endif return 1 ; } diff --git a/src/libunixonacid/unixmessage_put.c b/src/libunixonacid/unixmessage_put.c index 528c3b8..a8701ee 100644 --- a/src/libunixonacid/unixmessage_put.c +++ b/src/libunixonacid/unixmessage_put.c @@ -1,9 +1,5 @@ /* ISC license. */ -#include <skalibs/sysdeps.h> -#ifdef SKALIBS_HASANCILAUTOCLOSE -#include <unistd.h> -#endif #include <string.h> #include <errno.h> #include <skalibs/bitarray.h> @@ -22,24 +18,6 @@ static inline int copyfds (char *s, int const *fds, unsigned int n, unsigned cha int fd = fds[i] ; if (fd < 0) return (errno = EINVAL, -1) ; if (bitarray_peek(bits, i)) fd = - fd - 1 ; -#ifdef SKALIBS_HASANCILAUTOCLOSE - else - { - fd = dup(fd) ; - if (fd < 0) - { - int e = errno ; - while (i--) - { - s -= sizeof(int) ; - memcpy((char *)fd, s, sizeof(int)) ; - if (fd >= 0) (*closecb)(fd, closecbdata) ; - } - errno = e ; - return 0 ; - } - } -#endif memcpy(s, (char const *)&fd, sizeof(int)) ; s += sizeof(int) ; } diff --git a/src/libunixonacid/unixmessage_receive.c b/src/libunixonacid/unixmessage_receive.c index ec12e09..15d08ae 100644 --- a/src/libunixonacid/unixmessage_receive.c +++ b/src/libunixonacid/unixmessage_receive.c @@ -27,12 +27,6 @@ static int const awesomeflags = 0 #endif | -#ifdef SKALIBS_HASNBWAITALL - MSG_WAITALL -#else - 0 -#endif - | #ifdef SKALIBS_HASCMSGCLOEXEC MSG_CMSG_CLOEXEC #else diff --git a/src/libunixonacid/unixmessage_sender_flush.c b/src/libunixonacid/unixmessage_sender_flush.c index eb2645c..fa1438f 100644 --- a/src/libunixonacid/unixmessage_sender_flush.c +++ b/src/libunixonacid/unixmessage_sender_flush.c @@ -1,6 +1,5 @@ /* ISC license. */ -#include <skalibs/sysdeps.h> #include <skalibs/nonposix.h> #include <sys/socket.h> #include <sys/uio.h> @@ -104,7 +103,6 @@ int unixmessage_sender_flush (unixmessage_sender_t *b) do r = sendmsg(b->fd, &hdr, MSG_NOSIGNAL) ; while (r < 0 && errno == EINTR) ; if (r <= 0) return 0 ; -#ifndef SKALIBS_HASANCILAUTOCLOSE if (nfds) { size_t i = 0 ; @@ -114,7 +112,6 @@ int unixmessage_sender_flush (unixmessage_sender_t *b) if (fd < 0) (*b->closecb)(-(fd+1), b->closecbdata) ; } } -#endif if ((size_t)r < 6 + len) { b->shorty = 6 + len - r ; diff --git a/src/libunixonacid/unixmessage_sender_free.c b/src/libunixonacid/unixmessage_sender_free.c index da127c2..4c07952 100644 --- a/src/libunixonacid/unixmessage_sender_free.c +++ b/src/libunixonacid/unixmessage_sender_free.c @@ -1,6 +1,5 @@ /* ISC license. */ -#include <skalibs/sysdeps.h> #include <sys/types.h> #include <skalibs/disize.h> #include <skalibs/stralloc.h> @@ -18,9 +17,6 @@ void unixmessage_sender_free (unixmessage_sender_t *b) { int fd = genalloc_s(int, &b->fds)[i] ; if (fd < 0) (*b->closecb)(-(fd+1), b->closecbdata) ; -#ifdef SKALIBS_HASANCILAUTOCLOSE - else (*b->closecb)(fd, b->closecbdata) ; -#endif } } genalloc_free(disize, &b->offsets) ; |