aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-07-13 01:46:09 +0000
committerLaurent Bercot <ska@appnovation.com>2025-07-13 01:46:09 +0000
commit139a898a9ce4a64ecc8de6d65da1824ff3e0fb37 (patch)
tree63357ee144bd52b53ffe05e75b5c77322b0d76bf
parent5bc6d77b08b39f863a7d8767a588f839c19d3113 (diff)
downloadskalibs-139a898a9ce4a64ecc8de6d65da1824ff3e0fb37.tar.gz
gol_argv bugfix, tai.html doc fix
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--doc/libstddjb/tai.html4
-rw-r--r--src/libstddjb/gol_argv.c8
-rw-r--r--src/libstddjb/openreadnclose.c2
-rw-r--r--src/libunixonacid/emulate_at.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/doc/libstddjb/tai.html b/doc/libstddjb/tai.html
index 65c90d8..4a69011 100644
--- a/doc/libstddjb/tai.html
+++ b/doc/libstddjb/tai.html
@@ -64,8 +64,8 @@ on UTC, TAI and Unix time</a>. </li>
<p>
The meat and potatoes of all this is that programmers cannot simply rely on
standard Unix APIs such as
-<a href="https://pubs.opengroup.org/onlinepubs/9799919799/functions/gettimeofday.html">gettimeofday()</a>
-(which, by the way, is marked as obsolescent, but it's not going to disappear tomorrow)
+<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html">gettimeofday()</a>
+(which has disappeared in POSIX.1-2024, but is still available in most libcs)
to measure time intervals or even to give precise absolute time, and in
any case those APIs will become obsolete in 2038.
</p>
diff --git a/src/libstddjb/gol_argv.c b/src/libstddjb/gol_argv.c
index 21dc790..9e648e3 100644
--- a/src/libstddjb/gol_argv.c
+++ b/src/libstddjb/gol_argv.c
@@ -12,15 +12,15 @@ unsigned int gol_argv (char const *const *argv, gol_bool const *b, unsigned int
{
if (problem > 0)
{
- char s[2] = { argv[-r][problem], 0 } ;
+ char s[2] = { argv[-r-1][problem], 0 } ;
strerr_dief4x(100, "unrecognized ", "short ", "option: ", s) ;
}
else if (!problem)
- strerr_dief3x(100, "invalid ", "option: ", argv[-r]) ;
+ strerr_dief3x(100, "invalid ", "option: ", argv[-r-1]) ;
else if (problem == -1)
- strerr_dief4x(100, "unrecognized ", "boolean ", "option: ", argv[-r]) ;
+ strerr_dief4x(100, "unrecognized ", "boolean ", "option: ", argv[-r-1]) ;
else
- strerr_dief3x(100, "unrecognized ", "option with argument: ", argv[-r]) ;
+ strerr_dief3x(100, "unrecognized ", "option with argument: ", argv[-r-1]) ;
}
else return r ;
}
diff --git a/src/libstddjb/openreadnclose.c b/src/libstddjb/openreadnclose.c
index 5f39c43..9492c52 100644
--- a/src/libstddjb/openreadnclose.c
+++ b/src/libstddjb/openreadnclose.c
@@ -5,5 +5,5 @@
ssize_t openreadnclose (char const *file, char *s, size_t n)
{
int fd = openbc_read(file) ;
- return fd == -1 ? fd : readnclose(fd, s, n) ;
+ return fd == -1 ? -1 : readnclose(fd, s, n) ;
}
diff --git a/src/libunixonacid/emulate_at.c b/src/libunixonacid/emulate_at.c
index 0bb194a..dc72c70 100644
--- a/src/libunixonacid/emulate_at.c
+++ b/src/libunixonacid/emulate_at.c
@@ -16,7 +16,7 @@
int emulate_at (int dirfd, init_func_ref f, deinit_func_ref g, void *p)
{
int r ;
- int fdhere = open_read(".") ;
+ int fdhere = open_read(".", O_DIRECTORY) ;
if (fdhere < 0) return -1 ;
if (fd_chdir(dirfd) < 0) goto errclose ;
r = (*f)(p) ;