summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL6
-rw-r--r--doc/index.html6
-rw-r--r--doc/upgrade.html6
-rw-r--r--src/libs6rc/s6rc_db_read.c5
-rw-r--r--src/libs6rc/s6rc_db_read_sizes.c11
-rw-r--r--src/libs6rc/s6rc_lock.c12
6 files changed, 21 insertions, 25 deletions
diff --git a/INSTALL b/INSTALL
index 1718257..680fa88 100644
--- a/INSTALL
+++ b/INSTALL
@@ -24,6 +24,12 @@ POSIX.1-2008, available at:
It will install the binaries in /bin and the static libraries in
/usr/lib/s6-rc.
+ Please note that static libraries in /usr/lib/s6-rc *will not*
+be found by a default linker invocation: you need -L/usr/lib/s6-rc.
+Other skarnet.org software automatically handles that case if the
+default configuration is used, but if you change the configuration,
+remember to use the appropriate --with-lib configure option.
+
You can strip the binaries and libraries of their extra symbols via
"make strip" before the "make install" phase. It will shave a few bytes
off them.
diff --git a/doc/index.html b/doc/index.html
index 52759fa..71cb677 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -48,11 +48,11 @@ scripts are also run in a controlled environment.
<li> A POSIX-compliant system with a standard C development environment </li>
<li> GNU make, version 3.81 or later </li>
<li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version
-2.5.1.1 or later </li>
+2.6.0.0 or later </li>
<li> <a href="//skarnet.org/software/execline/">execline</a> version
-2.3.0.1 or later </li>
+2.3.0.2 or later </li>
<li> <a href="//skarnet.org/software/s6/">s6</a> version
-2.6.0.1 or later </li>
+2.6.1.0 or later </li>
</ul>
<h3> Licensing </h3>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index c5e944a..b49c13f 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -21,8 +21,12 @@
<h2> in 0.2.1.2 </h2>
<ul>
+ <li> <a href="//skarnet.org/software/skalibs/">skalibs</a>
+dependency bumped to 2.6.0.0. </li>
+ <li> <a href="//skarnet.org/software/execline/">execline</a>
+dependency bumped to 2.3.0.2. </li>
<li> <a href="//skarnet.org/software/s6/">s6</a>
-dependency bumped to 2.6.0.1. </li>
+dependency bumped to 2.6.1.0. </li>
</ul>
<h2> in 0.2.1.1 </h2>
diff --git a/src/libs6rc/s6rc_db_read.c b/src/libs6rc/s6rc_db_read.c
index 64a0eea..b3f9aed 100644
--- a/src/libs6rc/s6rc_db_read.c
+++ b/src/libs6rc/s6rc_db_read.c
@@ -2,7 +2,6 @@
#include <string.h>
#include <stdint.h>
-#include <errno.h>
#include <skalibs/bytestr.h>
#include <skalibs/buffer.h>
#include <skalibs/env.h>
@@ -158,15 +157,13 @@ static inline int s6rc_db_read_buffer (buffer *b, s6rc_db_t *db)
int s6rc_db_read (int fdcompiled, s6rc_db_t *db)
{
- int r, e ;
+ int r ;
buffer b ;
char buf[BUFFER_INSIZE] ;
int fd = open_readatb(fdcompiled, "db") ;
if (fd < 0) return -1 ;
buffer_init(&b, &buffer_read, fd, buf, BUFFER_INSIZE) ;
r = s6rc_db_read_buffer(&b, db) ;
- e = errno ;
fd_close(fd) ;
- errno = e ;
return r ;
}
diff --git a/src/libs6rc/s6rc_db_read_sizes.c b/src/libs6rc/s6rc_db_read_sizes.c
index 1c40469..c091ede 100644
--- a/src/libs6rc/s6rc_db_read_sizes.c
+++ b/src/libs6rc/s6rc_db_read_sizes.c
@@ -2,7 +2,6 @@
#include <sys/types.h>
#include <stdint.h>
-#include <errno.h>
#include <skalibs/buffer.h>
#include <skalibs/djbunix.h>
#include <skalibs/unix-transactional.h>
@@ -39,15 +38,7 @@ int s6rc_db_read_sizes (int fdcompiled, s6rc_db_t *db)
{
char c ;
ssize_t r = buffer_get(&b, &c, 1) ;
- if (r < 0)
- {
- r = errno ;
- fd_close(fd) ;
- errno = r ;
- return 0 ;
- }
fd_close(fd) ;
- if (r) return 0 ;
+ return !r ;
}
- return 1 ;
}
diff --git a/src/libs6rc/s6rc_lock.c b/src/libs6rc/s6rc_lock.c
index 43b60bb..d3ae2b5 100644
--- a/src/libs6rc/s6rc_lock.c
+++ b/src/libs6rc/s6rc_lock.c
@@ -17,7 +17,6 @@ static inline int locksh (int fd, int blocking)
int s6rc_lock (char const *live, int lwhat, int *llfd, char const *compiled, int cwhat, int *ccfd, int blocking)
{
- int e = 0 ;
int lfd = -1, cfd = -1 ;
if (lwhat)
@@ -28,8 +27,8 @@ int s6rc_lock (char const *live, int lwhat, int *llfd, char const *compiled, int
memcpy(lfn + llen, "/lock", 6) ;
lfd = open_create(lfn) ;
if (lfd < 0) return 0 ;
- if (coe(lfd) < 0) { e = errno ; goto lerr ; }
- if ((lwhat > 1 ? lockex(lfd, blocking) : locksh(lfd, blocking)) < 0) { e = errno ; goto lerr ; }
+ if (coe(lfd) < 0) goto lerr ;
+ if ((lwhat > 1 ? lockex(lfd, blocking) : locksh(lfd, blocking)) < 0) goto lerr ;
}
if (cwhat)
@@ -40,12 +39,12 @@ int s6rc_lock (char const *live, int lwhat, int *llfd, char const *compiled, int
memcpy(cfn + clen, "/lock", 6) ;
cfd = open_create(cfn) ;
if (cfd < 0)
- if (cwhat > 1 || errno != EROFS) { e = errno ; goto lerr ; }
+ if (cwhat > 1 || errno != EROFS) goto lerr ;
else cfd = -errno ;
else
{
- if (coe(cfd) < 0) { e = errno ; goto cerr ; }
- if ((cwhat > 1 ? lockex(cfd, blocking) : locksh(cfd, blocking)) < 0) { e = errno ; goto cerr ; }
+ if (coe(cfd) < 0) goto cerr ;
+ if ((cwhat > 1 ? lockex(cfd, blocking) : locksh(cfd, blocking)) < 0) goto cerr ;
}
}
@@ -57,6 +56,5 @@ int s6rc_lock (char const *live, int lwhat, int *llfd, char const *compiled, int
fd_close(cfd) ;
lerr:
if (lwhat) fd_close(lfd) ;
- errno = e ;
return 0 ;
}