From e8fe8ed8117bb1a58cd588b295352875d3c08c1a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 21 Jul 2018 11:16:11 +0000 Subject: Remove mininetstring, absolutepath, absolutepath_tmp --- NEWS | 2 ++ doc/upgrade.html | 6 +++++- package/deps.mak | 8 ++----- src/include/skalibs/djbunix.h | 3 --- src/include/skalibs/mininetstring.h | 12 ----------- src/include/skalibs/stddjb.h | 1 - src/libstddjb/mininetstring_read.c | 43 ------------------------------------- src/libstddjb/mininetstring_write.c | 36 ------------------------------- src/libstddjb/sarealpath.c | 2 +- src/libstddjb/sarealpath_tmp.c | 11 ---------- 10 files changed, 10 insertions(+), 114 deletions(-) delete mode 100644 src/include/skalibs/mininetstring.h delete mode 100644 src/libstddjb/mininetstring_read.c delete mode 100644 src/libstddjb/mininetstring_write.c delete mode 100644 src/libstddjb/sarealpath_tmp.c diff --git a/NEWS b/NEWS index 4cdcec5..8acb502 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ In 2.7.0.0 - Bugfixes. - New functions: ipc_timed_sendv(), unlink_void() - dir_close() now returns void and leaves errno unchanged + - absolutepath(), sarealpath_tmp(), mininetstring functions removed + - djbunix.h doesn't include env.h anymore In 2.6.4.0 diff --git a/doc/upgrade.html b/doc/upgrade.html index ee20c3b..eb10441 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -20,8 +20,12 @@

in 2.6.4.0

diff --git a/package/deps.mak b/package/deps.mak index 1564d7a..e2751a4 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -18,7 +18,7 @@ src/include/skalibs/cdb.h: src/include/skalibs/gccattributes.h src/include/skalibs/cdb_make.h: src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/diuint32.h src/include/skalibs/genalloc.h src/include/skalibs/datastruct.h: src/include/skalibs/avlnode.h src/include/skalibs/avltree.h src/include/skalibs/avltreen.h src/include/skalibs/genqdyn.h src/include/skalibs/genset.h src/include/skalibs/gensetdyn.h src/include/skalibs/djbtime.h: src/include/skalibs/tai.h src/include/skalibs/uint64.h -src/include/skalibs/djbunix.h: src/include/skalibs/env.h src/include/skalibs/envalloc.h src/include/skalibs/gccattributes.h src/include/skalibs/posixplz.h src/include/skalibs/stralloc.h +src/include/skalibs/djbunix.h: src/include/skalibs/envalloc.h src/include/skalibs/gccattributes.h src/include/skalibs/posixplz.h src/include/skalibs/stralloc.h src/include/skalibs/env.h: src/include/skalibs/gccattributes.h src/include/skalibs/stralloc.h src/include/skalibs/envalloc.h: src/include/skalibs/genalloc.h src/include/skalibs/environ.h: src/include/skalibs/posixplz.h @@ -32,7 +32,6 @@ src/include/skalibs/iobuffer.h: src/include/skalibs/buffer.h src/include/skalibs src/include/skalibs/iopause.h: src/include/skalibs/tai.h src/include/skalibs/kolbak.h: src/include/skalibs/unixmessage.h src/include/skalibs/lolstdio.h: src/include/skalibs/bufalloc.h src/include/skalibs/buffer.h src/include/skalibs/strerr2.h -src/include/skalibs/mininetstring.h: src/include/skalibs/stralloc.h src/include/skalibs/netstring.h: src/include/skalibs/buffer.h src/include/skalibs/stralloc.h src/include/skalibs/posixplz.h: src/include/skalibs/gccattributes.h src/include/skalibs/random.h: src/include/skalibs/stralloc.h @@ -45,7 +44,7 @@ src/include/skalibs/skalibs.h: src/include/skalibs/biguint.h src/include/skalibs src/include/skalibs/skamisc.h: src/include/skalibs/buffer.h src/include/skalibs/stralloc.h src/include/skalibs/socket.h: src/include/skalibs/djbunix.h src/include/skalibs/gccattributes.h src/include/skalibs/tai.h src/include/skalibs/webipc.h src/include/skalibs/stdcrypto.h: src/include/skalibs/md5.h src/include/skalibs/rc4.h src/include/skalibs/sha1.h src/include/skalibs/sha256.h src/include/skalibs/sha512.h -src/include/skalibs/stddjb.h: src/include/skalibs/alarm.h src/include/skalibs/alloc.h src/include/skalibs/allreadwrite.h src/include/skalibs/bitarray.h src/include/skalibs/bufalloc.h src/include/skalibs/buffer.h src/include/skalibs/bytestr.h src/include/skalibs/cbuffer.h src/include/skalibs/cdb.h src/include/skalibs/cdb_make.h src/include/skalibs/config.h src/include/skalibs/direntry.h src/include/skalibs/disize.h src/include/skalibs/diuint.h src/include/skalibs/diuint32.h src/include/skalibs/djbtime.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/envalloc.h src/include/skalibs/error.h src/include/skalibs/fmtscan.h src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h src/include/skalibs/genalloc.h src/include/skalibs/genwrite.h src/include/skalibs/iobuffer.h src/include/skalibs/iopause.h src/include/skalibs/ip46.h src/include/skalibs/lolstdio.h src/include/skalibs/mininetstring.h src/include/skalibs/netstring.h src/include/skalibs/nsig.h src/include/skalibs/segfault.h src/include/skalibs/selfpipe.h src/include/skalibs/setgroups.h src/include/skalibs/sgetopt.h src/include/skalibs/sig.h src/include/skalibs/siovec.h src/include/skalibs/skamisc.h src/include/skalibs/socket.h src/include/skalibs/stralloc.h src/include/skalibs/strerr.h src/include/skalibs/strerr2.h src/include/skalibs/tai.h src/include/skalibs/types.h src/include/skalibs/uint16.h src/include/skalibs/uint32.h src/include/skalibs/uint64.h src/include/skalibs/webipc.h +src/include/skalibs/stddjb.h: src/include/skalibs/alarm.h src/include/skalibs/alloc.h src/include/skalibs/allreadwrite.h src/include/skalibs/bitarray.h src/include/skalibs/bufalloc.h src/include/skalibs/buffer.h src/include/skalibs/bytestr.h src/include/skalibs/cbuffer.h src/include/skalibs/cdb.h src/include/skalibs/cdb_make.h src/include/skalibs/config.h src/include/skalibs/direntry.h src/include/skalibs/disize.h src/include/skalibs/diuint.h src/include/skalibs/diuint32.h src/include/skalibs/djbtime.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/envalloc.h src/include/skalibs/error.h src/include/skalibs/fmtscan.h src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h src/include/skalibs/genalloc.h src/include/skalibs/genwrite.h src/include/skalibs/iobuffer.h src/include/skalibs/iopause.h src/include/skalibs/ip46.h src/include/skalibs/lolstdio.h src/include/skalibs/netstring.h src/include/skalibs/nsig.h src/include/skalibs/segfault.h src/include/skalibs/selfpipe.h src/include/skalibs/setgroups.h src/include/skalibs/sgetopt.h src/include/skalibs/sig.h src/include/skalibs/siovec.h src/include/skalibs/skamisc.h src/include/skalibs/socket.h src/include/skalibs/stralloc.h src/include/skalibs/strerr.h src/include/skalibs/strerr2.h src/include/skalibs/tai.h src/include/skalibs/types.h src/include/skalibs/uint16.h src/include/skalibs/uint32.h src/include/skalibs/uint64.h src/include/skalibs/webipc.h src/include/skalibs/strerr.h: src/include/skalibs/gccattributes.h src/include/skalibs/strerr2.h: src/include/skalibs/strerr.h src/include/skalibs/tai.h: src/include/skalibs/gccattributes.h src/include/skalibs/uint64.h @@ -419,8 +418,6 @@ src/libstddjb/ltm64_from_localtm.o src/libstddjb/ltm64_from_localtm.lo: src/libs src/libstddjb/ltm64_from_sysclock.o src/libstddjb/ltm64_from_sysclock.lo: src/libstddjb/ltm64_from_sysclock.c src/include/skalibs/config.h src/include/skalibs/djbtime.h src/include/skalibs/tai.h src/libstddjb/ltm64_from_tai.o src/libstddjb/ltm64_from_tai.lo: src/libstddjb/ltm64_from_tai.c src/libstddjb/djbtime-internal.h src/include/skalibs/djbtime.h src/libstddjb/ltm64_from_utc.o src/libstddjb/ltm64_from_utc.lo: src/libstddjb/ltm64_from_utc.c src/libstddjb/djbtime-internal.h src/include/skalibs/djbtime.h src/include/skalibs/uint64.h -src/libstddjb/mininetstring_read.o src/libstddjb/mininetstring_read.lo: src/libstddjb/mininetstring_read.c src/include/skalibs/allreadwrite.h src/include/skalibs/mininetstring.h src/include/skalibs/stralloc.h -src/libstddjb/mininetstring_write.o src/libstddjb/mininetstring_write.lo: src/libstddjb/mininetstring_write.c src/include/skalibs/allreadwrite.h src/include/skalibs/mininetstring.h src/include/skalibs/uint16.h src/libstddjb/ndelay_off.o src/libstddjb/ndelay_off.lo: src/libstddjb/ndelay_off.c src/include/skalibs/djbunix.h src/libstddjb/ndelay_on.o src/libstddjb/ndelay_on.lo: src/libstddjb/ndelay_on.c src/include/skalibs/djbunix.h src/libstddjb/netstring_append.o src/libstddjb/netstring_append.lo: src/libstddjb/netstring_append.c src/include/skalibs/netstring.h src/include/skalibs/stralloc.h src/include/skalibs/uint64.h @@ -472,7 +469,6 @@ src/libstddjb/sagethostname.o src/libstddjb/sagethostname.lo: src/libstddjb/sage src/libstddjb/sanitize_read.o src/libstddjb/sanitize_read.lo: src/libstddjb/sanitize_read.c src/include/skalibs/allreadwrite.h src/include/skalibs/error.h src/libstddjb/sareadlink.o src/libstddjb/sareadlink.lo: src/libstddjb/sareadlink.c src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h src/libstddjb/sarealpath.o src/libstddjb/sarealpath.lo: src/libstddjb/sarealpath.c src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h -src/libstddjb/sarealpath_tmp.o src/libstddjb/sarealpath_tmp.lo: src/libstddjb/sarealpath_tmp.c src/include/skalibs/djbunix.h src/libstddjb/satmp.o src/libstddjb/satmp.lo: src/libstddjb/satmp.c src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h src/libstddjb/sauniquename.o src/libstddjb/sauniquename.lo: src/libstddjb/sauniquename.c src/include/skalibs/djbunix.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h src/include/skalibs/tai.h src/include/skalibs/types.h src/libstddjb/selfpipe_finish.o src/libstddjb/selfpipe_finish.lo: src/libstddjb/selfpipe_finish.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/nsig.h src/libstddjb/selfpipe-internal.h src/include/skalibs/selfpipe.h src/include/skalibs/sig.h src/include/skalibs/sysdeps.h diff --git a/src/include/skalibs/djbunix.h b/src/include/skalibs/djbunix.h index d3edc97..b8bb85c 100644 --- a/src/include/skalibs/djbunix.h +++ b/src/include/skalibs/djbunix.h @@ -9,7 +9,6 @@ #include #include #include -#include /* will disappear */ #include #define DJBUNIX_FLAG_NB 0x01U @@ -92,9 +91,7 @@ extern int waitn_reap (pid_t *, unsigned int) ; extern int fd_chdir (int) ; -#define absolutepath(sa, s) sarealpath(sa, s) /* will disappear */ extern int sarealpath (stralloc *, char const *) ; -extern int sarealpath_tmp (stralloc *, char const *, stralloc *) ; extern int sabasename (stralloc *, char const *, size_t) ; extern int sadirname (stralloc *, char const *, size_t) ; extern int sagetcwd (stralloc *) ; diff --git a/src/include/skalibs/mininetstring.h b/src/include/skalibs/mininetstring.h deleted file mode 100644 index 1997b18..0000000 --- a/src/include/skalibs/mininetstring.h +++ /dev/null @@ -1,12 +0,0 @@ -/* ISC license. */ - -#ifndef MININETSTRING_H -#define MININETSTRING_H - -#include -#include - -extern int mininetstring_read (int, stralloc *, uint32_t *) ; -extern int mininetstring_write (int, char const *, uint16_t, uint32_t *) ; - -#endif diff --git a/src/include/skalibs/stddjb.h b/src/include/skalibs/stddjb.h index 87f72d0..aa90f6a 100644 --- a/src/include/skalibs/stddjb.h +++ b/src/include/skalibs/stddjb.h @@ -37,7 +37,6 @@ #include #include #include -#include /* will disappear */ #include #include #include diff --git a/src/libstddjb/mininetstring_read.c b/src/libstddjb/mininetstring_read.c deleted file mode 100644 index 34f7a75..0000000 --- a/src/libstddjb/mininetstring_read.c +++ /dev/null @@ -1,43 +0,0 @@ -/* ISC license. */ - -#include -#include -#include -#include - -int mininetstring_read (int fd, stralloc *sa, uint32_t *w) -{ - if (!*w) - { - char pack[2] ; - switch (fd_read(fd, pack, 2)) - { - case -1 : return -1 ; - case 0 : return 0 ; - case 1 : *w = ((uint32_t)pack[0] << 8) | (1U << 31) ; break ; - case 2 : *w = ((uint32_t)pack[0] << 8) | (uint32_t)pack[1] | (1U << 30) ; break ; - default : return (errno = EDOM, -1) ; - } - } - if (*w & (1U << 31)) - { - unsigned char c ; - switch (fd_read(fd, (char *)&c, 1)) - { - case -1 : return -1 ; - case 0 : return (errno = EPIPE, -1) ; - case 1 : *w |= (uint32_t)c | (1U << 30) ; *w &= ~(1U << 31) ; break ; - default : return (errno = EDOM, -1) ; - } - } - if (*w & (1U << 30)) - { - if (!stralloc_readyplus(sa, *w & ~(1U << 30))) return -1 ; - *w &= ~(1U << 30) ; - } - { - size_t r = allread(fd, sa->s + sa->len, *w) ; - sa->len += r ; *w -= r ; - } - return *w ? -1 : 1 ; -} diff --git a/src/libstddjb/mininetstring_write.c b/src/libstddjb/mininetstring_write.c deleted file mode 100644 index c5b3aba..0000000 --- a/src/libstddjb/mininetstring_write.c +++ /dev/null @@ -1,36 +0,0 @@ -/* ISC license. */ - -#include -#include -#include -#include - -int mininetstring_write (int fd, char const *s, uint16_t len, uint32_t *w) -{ - if (!*w) - { - char pack[2] ; - uint16_pack_big(pack, len) ; - switch (fd_write(fd, pack, 2)) - { - case -1 : return -1 ; - case 0 : return (errno = EAGAIN, -1) ; - case 1 : *w = (1U << 31) ; break ; - case 2 : *w = len ; break ; - default : return (errno = EDOM, -1) ; - } - } - if (*w & (1U << 31)) - { - unsigned char c = len & 0xFFU ; - switch (fd_write(fd, (char const *)&c, 1)) - { - case -1 : return -1 ; - case 0 : return (errno = EAGAIN, -1) ; - case 1 : *w = len ; break ; - default : return (errno = EDOM, -1) ; - } - } - *w -= allwrite(fd, s + len - *w, *w) ; - return *w ? -1 : 1 ; -} diff --git a/src/libstddjb/sarealpath.c b/src/libstddjb/sarealpath.c index 0cf1825..28631c6 100644 --- a/src/libstddjb/sarealpath.c +++ b/src/libstddjb/sarealpath.c @@ -18,7 +18,7 @@ int sarealpath (stralloc *sa, char const *path) { char *p = realpath(path, 0) ; if (!p) return -1 ; - sa->s = p ; + sa->s = p ; /* XXX: incompatible with alloc() interposition */ sa->len = strlen(p) ; sa->a = sa->len + 1 ; } diff --git a/src/libstddjb/sarealpath_tmp.c b/src/libstddjb/sarealpath_tmp.c deleted file mode 100644 index 31aeeb2..0000000 --- a/src/libstddjb/sarealpath_tmp.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* This function is now obsolete. */ - -#include - -int sarealpath_tmp (stralloc *sa, char const *path, stralloc *tmp) -{ - (void)tmp ; - return sarealpath(sa, path) ; -} -- cgit v1.2.3