summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-07-21 11:16:11 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-07-21 11:16:11 +0000
commite8fe8ed8117bb1a58cd588b295352875d3c08c1a (patch)
treeaa2aac4a2d2d356f8f3bb2daaa0ad19b5a616a55
parent0a181fc1b38a62e583f13ccc1550f7ffc8f5896b (diff)
downloadskalibs-e8fe8ed8117bb1a58cd588b295352875d3c08c1a.tar.xz
Remove mininetstring, absolutepath, absolutepath_tmp
-rw-r--r--NEWS2
-rw-r--r--doc/upgrade.html6
-rw-r--r--package/deps.mak8
-rw-r--r--src/include/skalibs/djbunix.h3
-rw-r--r--src/include/skalibs/mininetstring.h12
-rw-r--r--src/include/skalibs/stddjb.h1
-rw-r--r--src/libstddjb/mininetstring_read.c43
-rw-r--r--src/libstddjb/mininetstring_write.c36
-rw-r--r--src/libstddjb/sarealpath.c2
-rw-r--r--src/libstddjb/sarealpath_tmp.c11
10 files changed, 10 insertions, 114 deletions
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 @@
<ul>
<li> New functions: <tt>ipc_timed_sendv()</tt>, <tt>unlink_void()</tt> </li>
- <li> The <a href="djbunix.html">dir_close()</a> function now returns void
+ <li> The <a href="libstddjb/djbunix.html">dir_close()</a> function now returns void
and leaves errno unchanged. </li>
+ <li> The <tt>absolutepath()</tt> and <tt>sarealpath_tmp()</tt> functions, as well
+as the <tt>skalibs/mininetstring.h</tt> family of functions, have been removed. </li>
+ <li> <a href="libstddjb/djbunix.html">skalibs/djbunix.h</a> does not include
+<tt>skalibs/env.h</tt> anymore. </li>
</ul>
<h2> in 2.6.4.0 </h2>
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 <skalibs/gccattributes.h>
#include <skalibs/stralloc.h>
#include <skalibs/envalloc.h>
-#include <skalibs/env.h> /* will disappear */
#include <skalibs/posixplz.h>
#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 <stdint.h>
-#include <skalibs/stralloc.h>
-
-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 <skalibs/iobuffer.h>
#include <skalibs/iopause.h>
#include <skalibs/lolstdio.h>
-#include <skalibs/mininetstring.h> /* will disappear */
#include <skalibs/netstring.h>
#include <skalibs/nsig.h>
#include <skalibs/segfault.h>
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 <errno.h>
-#include <skalibs/allreadwrite.h>
-#include <skalibs/stralloc.h>
-#include <skalibs/mininetstring.h>
-
-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 <errno.h>
-#include <skalibs/uint16.h>
-#include <skalibs/allreadwrite.h>
-#include <skalibs/mininetstring.h>
-
-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 <skalibs/djbunix.h>
-
-int sarealpath_tmp (stralloc *sa, char const *path, stralloc *tmp)
-{
- (void)tmp ;
- return sarealpath(sa, path) ;
-}