Age | Commit message (Collapse) | Author |
|
|
|
The goal is to make late channel creation easy, as opposed to
textclient which always creates a new channel at start time.
This commit also moves posixishard.h inclusions as late as possible.
|
|
|
|
|
|
|
|
void ** does not exist: the address of a generic pointer is not
properly defined (different pointer types may have different
representations). So, alloc_realloc cannot exist as is without UB.
Fortunately, it's not supposed to be used in the skalibs programming
style, and skalibs itself only uses it in two places
(stralloc_ready_tuned and stralloc_shrink) where the pointer is a
char *.
So we just fix the UB by making alloc_realloc() take a char **,
and it's only defined for that pointer type.
Nothing to see here folks, nothing happened at all.
|
|
|
|
|
|
This is arguably a bugfix, since selfpipe without signalfd
relies on signals being actually delivered, and a process may
have inherited a nonempty sigprocmask.
Also use SIG_BLOCK instead of SIG_SETMASK when using
selfpipe_trapset() with signalfd, because we shouldn't unblock
signals that may have previously been blocked. This is also
arguably a bugfix.
This commit is essential for using the version of s6-linux-init
that blocks SIGINT before disablecad on kernels without signalfd.
Without it, SIGINT never gets unblocked, so it's never delivered
to s6-svscan.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__GLIBC__ and similar ftms are not defined in the compiler, but
in features.h, which isn't POSIX so cannot be included, and
standard headers can't be included either because nonposix.h
defines ftms that must exist *prior to* std headers inclusion.
The kernel ftms, however, are defined by the compiler, so we can
use them.
|
|
|
|
|
|
|
|
|
|
Remaining clr:
emptyregex: can be safely guessed to no
nullispointer: can't be safely guessed, but do we need the test?
devurandom: can't be safely guessed
malloc0: can more or less be safely guessed to no
|
|
|
|
|
|
|
|
* --enable-clock and --enable-monotonic are gone
* tain_sysclock() has been renamed tain_wallclock_read()
* tain_wallclock_read() reads from CLOCK_REALTIME (or gettimeofday())
* tain_clockmon[_init]() have been renamed to tain_stopwatch_[read|init]()
and now accept a monotonic clock name as an extra argument
* tain_now() points to the system (wall) clock by default
* tain_now_set_[stopwatch|wallclock]() can be used to switch
Now to make a pass on all skarnet.org programs and add a
tain_now_set_stopwatch() call everywhere needed... >.>
|
|
|
|
|
|
|
|
|
|
Also move a conformance workaround from nonposix.h to posixishard.h
This may break things on MacOS, needs testing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This will break things. It's a known issue. Patches to other
packages will come later, to adapt them to the new API.
To work around brokenness, there needs to be *two* different
headers:
1. one to be used before including system headers, that maximizes
visibility by enabling system-dependent feature test macros
(that will be tested by system headers)
2. one to be used after including system headers, that performs
preprocessor tests and defines.
skalibs/nonposix.h is the first one.
Previously, there was no second one, and the tests were scattered
all over. There was a strnlen declaration in skalibs/posixplz.h
(which serves a totally different function: declaring things that
should be in POSIX, but *are not*, i.e. working around problems in
the standard, instead of problems in systems failing to respect
the standard), a build-time sysdep for error.h, #defines for
MSG_NOSIGNAL, etc. etc.
skalibs/posixishard.h now is the second one, and centralizes
all the tests.
As a result, the eproto sysdep is unnecessary and has been removed.
skalibs/error.h is now a static header, it is not built anymore.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This fixes a segfault when a user calls uint320_fmt(NULL,...),
and makes the fmtlist functions return the correct number of
characters when called with NULL.
|