pax_global_header 0000666 0000000 0000000 00000000064 14630613211 0014507 g ustar 00root root 0000000 0000000 52 comment=0e86d31f6091903510fc5e6be2d0dea6ff54b1c8
skalibs-2.14.2.0/ 0000775 0000000 0000000 00000000000 14630613211 0013363 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/.gitignore 0000664 0000000 0000000 00000000412 14630613211 0015350 0 ustar 00root root 0000000 0000000 *.o
/*.a.xyzzy
*.lo
/*.so.xyzzy
/config.mak
/src/include/skalibs/config.h
/src/include/skalibs/ip46.h
/src/include/skalibs/sysdeps.h
/src/include/skalibs/types.h
/src/include/skalibs/uint16.h
/src/include/skalibs/uint32.h
/src/include/skalibs/uint64.h
/sysdeps.cfg/
skalibs-2.14.2.0/AUTHORS 0000664 0000000 0000000 00000003557 14630613211 0014445 0 ustar 00root root 0000000 0000000 Main author:
Laurent Bercot
Contributors:
Dan J. Bernstein
William E. Baxter
Olivier Brunel
Lionel Van Bemten
Rasmus Villemoes
Jesse Young
7heo <7heo@mail.com>
John Regan
Shengjing Zhu
Colin Booth
Petr Vanek
Peter Shkenev
Mobin "Hojjat" Aydinfar
Josiah Frentsos
Carlos Eduardo
Thanks to:
Jean Marot
Paul Jarc
Nicolas George
David Madore
Taj Khattra
Dan Kegel
Stefan Karrmann
Matthew R. Dempsky
Lasse Kliemann
Robert Ransom
Frans Haarman
Vincent De Ribou
Jorge Almeida
Roman I Khimov
Yannick Duchêne
Michael Zuo
Éric Le Bihan
Samuel Holland
Jan Bramkamp
Johannes Nixdorf
Casper Ti. Vector
Guillermo
Alex Raschi
Josuah Demangeon
Xavier Stonestreet
Jason Donenfeld
Amitai Schleier
psykose
Adam Beardwood
Cormac Stephenson
Henri Kemppainen
Jan Pobříslo
skalibs-2.14.2.0/CONTRIBUTING 0000664 0000000 0000000 00000000437 14630613211 0015221 0 ustar 00root root 0000000 0000000 Please add a Signed-Off-By: line at the end of your commit,
which certifies that you have the right and authority to pass
it on as an open-source patch, as explicited in the Developer's
Certificate of Origin available in this project's DCO file,
or at https://developercertificate.org/
skalibs-2.14.2.0/COPYING 0000664 0000000 0000000 00000001370 14630613211 0014417 0 ustar 00root root 0000000 0000000 Copyright (c) 2011-2024 Laurent Bercot
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
skalibs-2.14.2.0/DCO 0000664 0000000 0000000 00000002615 14630613211 0013717 0 ustar 00root root 0000000 0000000 Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
skalibs-2.14.2.0/INSTALL 0000664 0000000 0000000 00000015725 14630613211 0014426 0 ustar 00root root 0000000 0000000 Build Instructions
------------------
* Requirements
------------
- A POSIX-compliant C development environment
- GNU make version 3.81 or later
- If cross-compiling: you have to know the correct value for some
non-autodetectable sysdeps for your target architecture. See the
"Cross-compilation" section below.
This software will install on any operating system that implements
POSIX.1-2008, available at:
https://pubs.opengroup.org/onlinepubs/9699919799/
* Standard usage
--------------
./configure && make && sudo make install
will work for most users.
It will install the static libraries in /usr/lib/skalibs, the shared
libraries in /lib, and the sysdeps in /usr/lib/skalibs/sysdeps.
Please note that static libraries in /usr/lib/skalibs *will not*
be found by a default linker invocation: you need -L/usr/lib/skalibs.
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 libraries of their extra symbols via "make strip"
before the "make install" phase. It will shave a few bytes off them.
* Customization
-------------
You can customize the installation process via flags given to configure.
See ./configure --help for a list of all available configure options.
* Environment variables
---------------------
Controlling a build process via environment variables is a big and
dangerous hammer. You should try and pass flags to configure instead;
nevertheless, a few standard environment variables are recognized.
If the CC environment variable is set, its value will override compiler
detection by configure. The --host=HOST option will still add a HOST-
prefix to the value of CC.
The values of CFLAGS, CPPFLAGS and LDFLAGS will be appended to the
default flags set by configure. To override those defaults instead
of appending to them, use the CPPFLAGS, CFLAGS and LDFLAGS
_make variables_ instead of environment variables.
* Make variables
--------------
You can invoke make with a few variables for more configuration.
CC, CFLAGS, CPPFLAGS, LDFLAGS, LDLIBS, AR, RANLIB, STRIP, INSTALL and
CROSS_COMPILE can all be overridden on the make command line. This is
an even bigger hammer than running ./configure with environment
variables, so it is advised to only do this when it is the only way of
obtaining the behaviour you want.
DESTDIR can be given on the "make install" command line in order to
install to a staging directory.
* Shared libraries
----------------
Software from skarnet.org is small enough that shared libraries are
generally not worth using. Static linking is simpler and incurs less
runtime overhead and less points of failure: but since skalibs only
provides libraries, both versions are built by default.
Nevertheless, you can:
* avoid building shared libraries: --disable-shared
* avoid building static libraries: --disable-static
If you are using a GNU/Linux system, be aware that the GNU libc
behaves badly with static linking and produces huge executables,
so if you plan on making static executables, you should consider
using another libc, which you also need to use when compiling
skalibs. musl is recommended: http://musl-libc.org/
* Cross-compilation
-----------------
skarnet.org centralizes all the difficulty of cross-compilation
in skalibs.
The native skalibs build process runs some tests to gather "sysdeps",
i.e. system-dependent properties of the target, and stores those
into a sysdeps directory; software depending on skalibs is provided
the name of the sysdeps directory at build time, and can depend on
its contents - that's how skarnet.org packages are easily made
portable.
However, when the host differs from the target - the cross-compilation
case - some of those build-time tests, i.e. the ones that require
code execution on the target, are invalid. So you must manually
provide configure with appropriate values for the list of sysdeps that
cannot be autodetected.
For a sysdep named K with a value V, the correct option to give to
configure is: --with-sysdep-K=V
Most of the time, sysdeps have a boolean value, so the correct V is
"yes" or "no".
For instance, to say that the target has a working pseudorandom
number generator in /dev/urandom, you would give the following
option to configure: --with-sysdep-devurandom=yes
If there are additional arguments to the sysdep, such as linker
flags, give them separated by commas. Example:
--with-sysdep-posixspawn=yes,-lrt
./configure --help lists all the sysdeps you need to manually
provide a value for when cross-compiling.
Note that you can provide manual sysdeps values at any time,
for any existing sysdep, to bypass autodetection - and you can
even do it when building natively. It's just not recommended
(you should let skalibs autodetect everything it can), and
and it's only mandatory for a small subset of sysdeps in the
cross-compilation case.
* The slashpackage convention
---------------------------
The slashpackage convention (http://cr.yp.to/slashpackage.html)
is a package installation scheme that provides a few guarantees
over other conventions such as the FHS, for instance fixed
absolute pathnames. skarnet.org packages support it: use the
--enable-slashpackage option to configure, or
--enable-slashpackage=DIR for a prefixed DIR/package tree.
This option will activate slashpackage support during the build
and set slashpackage-compatible installation directories. If
$version is the current skalibs version number:
--bindir will be set to /package/prog/skalibs-$version/command
--includedir will be set to /package/prog/skalibs-$version/include
--libdir will be set to /package/prog/skalibs-$version/library
--dynlibdir will be set to /package/prog/skalibs-$version/library.so
--sysdepdir will be set to /package/prog/skalibs-$version/sysdeps
Note that --datadir will be unchanged, because the data exported
by skalibs, i.e. the leap second table, is system-wide. You should
manually specify --datadir=... if you want to deviate from the default.
--prefix is pretty much ignored when you use --enable-slashpackage:
it will only impact --datadir. You should probably not use both
--enable-slashpackage and --prefix.
When using slashpackage, two additional Makefile targets are
available after "make install":
- "make -L update" changes the default version of the software to the
freshly installed one. (This is useful when you have several installed
versions of the same software, which slashpackage supports.)
- "make -L global-links" adds links from DIR/command and DIR/library.so
to the default version of the binaries and shared libraries.
The "-L" option to make is necessary because targets are symbolic links,
and the default make behaviour is to check the pointed file's timestamp
and not the symlink's timestamp.
* Out-of-tree builds
------------------
skarnet.org packages do not support out-of-tree builds. They
are small, so it does not cost much to duplicate the entire
source tree if parallel builds are needed.
skalibs-2.14.2.0/Makefile 0000664 0000000 0000000 00000014121 14630613211 0015022 0 ustar 00root root 0000000 0000000 #
# This Makefile requires GNU make.
#
# Do not make changes here.
# Use the included .mak files.
#
it: all
make_need := 3.81
ifeq "" "$(strip $(filter $(make_need), $(firstword $(sort $(make_need) $(MAKE_VERSION)))))"
$(error Your make ($(MAKE_VERSION)) is too old. You need $(make_need) or newer)
endif
-include config.mak
include package/deps.mak
version_m := $(basename $(version))
version_M := $(basename $(version_m))
version_l := $(basename $(version_M))
CPPFLAGS_ALL := $(CPPFLAGS_AUTO) $(CPPFLAGS)
CFLAGS_ALL := $(CFLAGS_AUTO) $(CFLAGS)
LDFLAGS_ALL := $(LDFLAGS_AUTO) $(LDFLAGS)
LDLIBS_ALL := $(LDLIBS_AUTO) $(LDLIBS)
AR := $(CROSS_COMPILE)ar
RANLIB := $(CROSS_COMPILE)ranlib
STRIP := $(CROSS_COMPILE)strip
INSTALL := ./tools/install.sh
TYPES := size uid gid pid time dev ino
ALL_SRCS := $(sort $(wildcard src/lib*/*.c))
ALL_DOBJS := $(ALL_SRCS:%.c=%.lo)
ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),)
ALL_SOBJS := $(ALL_SRCS:%.c=%.o)
CFLAGS_SHARED := -fPIC
else
ALL_SOBJS := $(ALL_DOBJS)
CFLAGS_SHARED :=
endif
ALL_LIBS := $(SHARED_LIBS) $(STATIC_LIBS)
BUILT_INCLUDES := \
src/include/$(package)/sysdeps.h \
src/include/$(package)/uint16.h \
src/include/$(package)/uint32.h \
src/include/$(package)/uint64.h \
src/include/$(package)/types.h \
src/include/$(package)/ip46.h
ALL_INCLUDES := $(sort $(BUILT_INCLUDES) $(wildcard src/include/$(package)/*.h))
ALL_SYSDEPS := $(wildcard $(sysdeps)/*)
ALL_DATA := $(wildcard src/etc/*)
all: config.mak $(ALL_LIBS) $(ALL_INCLUDES) $(ALL_SYSDEPS) $(ALL_DATA)
clean:
@exec rm -f $(ALL_LIBS) $(ALL_BINS) $(ALL_SOBJS) $(ALL_DOBJS) $(BUILT_INCLUDES)
distclean: clean
@exec rm -rf config.mak src/include/$(package)/config.h sysdeps.cfg
tgz: distclean
@. package/info && \
rm -rf /tmp/$$package-$$version && \
cp -a . /tmp/$$package-$$version && \
cd /tmp && \
tar -zpcv --owner=0 --group=0 --numeric-owner --exclude=.git* -f /tmp/$$package-$$version.tar.gz $$package-$$version && \
exec rm -rf /tmp/$$package-$$version
strip: $(ALL_LIBS)
ifneq ($(strip $(STATIC_LIBS)),)
exec $(STRIP) -x -R .note -R .comment $(STATIC_LIBS)
endif
ifneq ($(strip $(SHARED_LIBS)),)
exec $(STRIP) -R .note -R .comment $(SHARED_LIBS)
endif
install: install-sysconf install-sysdeps install-dynlib install-lib install-include
install-sysconf: $(ALL_DATA:src/etc/%=$(DESTDIR)$(sysconfdir)/%)
install-sysdeps: $(ALL_SYSDEPS:$(sysdeps)/%=$(DESTDIR)$(sysdepdir)/%)
install-dynlib: $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(dynlibdir)/lib%.so)
install-lib: $(STATIC_LIBS:lib%.a.xyzzy=$(DESTDIR)$(libdir)/lib%.a)
install-include: $(ALL_INCLUDES:src/include/$(package)/%.h=$(DESTDIR)$(includedir)/$(package)/%.h)
ifneq ($(exthome),)
$(DESTDIR)$(exthome): $(DESTDIR)$(home)
exec $(INSTALL) -l $(notdir $(home)) $(DESTDIR)$(exthome)
update: $(DESTDIR)$(exthome)
global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M))
$(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M): $(DESTDIR)$(dynlibdir)/lib%.so.$(version_M)
exec $(INSTALL) -D -l ..$(subst $(sproot),,$(exthome))/library.so/$( $@
src/include/$(package)/uint16.h: $(sysdeps)/sysdeps src/headers/uint16-bswap src/headers/bits-header src/headers/bits-footer src/headers/bits-lendian src/headers/bits-bendian src/headers/bits-template src/headers/uint64-include src/include/$(package)/uint64.h
exec tools/gen-bits.sh $(sysdeps)/sysdeps 16 6 7 5 17 > $@
src/include/$(package)/uint32.h: $(sysdeps)/sysdeps src/headers/uint32-bswap src/headers/bits-header src/headers/bits-footer src/headers/bits-lendian src/headers/bits-bendian src/headers/bits-template src/headers/uint64-include src/include/$(package)/uint64.h
exec tools/gen-bits.sh $(sysdeps)/sysdeps 32 11 13 9 33 > $@
src/include/$(package)/uint64.h: $(sysdeps)/sysdeps src/headers/uint64-bswap src/headers/bits-header src/headers/bits-footer src/headers/bits-lendian src/headers/bits-bendian src/headers/bits-template src/headers/uint64-ulong64 src/headers/uint64-noulong64 src/headers/uint64-defs src/headers/uint64-macros
exec tools/gen-bits.sh $(sysdeps)/sysdeps 64 21 25 17 65 > $@
src/include/$(package)/types.h: src/include/$(package)/uint16.h src/include/$(package)/uint32.h src/include/$(package)/uint64.h $(sysdeps)/sysdeps src/headers/types-header src/headers/types-footer src/headers/unsigned-template src/headers/signed-template
exec tools/gen-types.sh $(sysdeps)/sysdeps $(TYPES) > $@
src/include/$(package)/ip46.h: src/include/$(package)/fmtscan.h src/include/$(package)/tai.h src/include/$(package)/socket.h $(sysdeps)/sysdeps src/headers/ip46-header src/headers/ip46-footer src/headers/ip46-with src/headers/ip46-without
@{ \
cat src/headers/ip46-header ; \
if $(ipv6) && grep -qF 'ipv6: yes' $(sysdeps)/sysdeps ; then cat src/headers/ip46-with ; \
else cat src/headers/ip46-without ; \
fi ; \
exec cat src/headers/ip46-footer ; \
} > $@
skalibs-2.14.2.0/NEWS 0000664 0000000 0000000 00000021501 14630613211 0014061 0 ustar 00root root 0000000 0000000 Changelog for skalibs.
In 2.4.2.0
----------
- Support for midipix and old MacOS X. (More sysdeps.)
- New gol.h header (a take on getopt_long)
- New mkptemp3 function
In 2.14.1.1
-----------
- Bugfixes.
In 2.14.1.0
-----------
- Bugfixes.
- Portability improvements.
- New socket_sendnb46_g() and socket_recvnb46_g() macros.
In 2.14.0.1
-----------
- Bugfixes.
In 2.14.0.0
-----------
- Bugfixes.
- New accessor function: selfpipe_fd().
- New functions: slurpn(), openslurpnclose().
- slurp() and openslurpclose() are now macros.
- New strerr macros to warn with a "fatal" message.
- New cdb functions: cdb_hashv(), cdbmake_addv().
- child_spawn() revamp. Prototype change (last arg is a size_t).
- case_lowerb() and friends now use ctype.h functions.
- case_str() removed, strcasestr() fallback implementation added.
- cspawn(): finally unifying fork() and posix_spawn().
- Better support for nonstandard posix_spawn subfunctions.
- Lots of new sysdeps.
In 2.13.1.1
-----------
- Bugfixes.
In 2.13.1.0
-----------
- New macro: SKALIBS_PATH_MAX, in posixishard.h.
Defined to 4096 on systems that do not define PATH_MAX.
- New function: sals().
In 2.13.0.0
-----------
- Bugfixes.
- New functions: buffer_timed_put(), buffer_timed_puts().
- strerr.h revamped. strerr_die, strerr_warn, strerr_diesys, strerr_warnsys
and all the previous strerr2 macros are now __VA_ARGS__ macros around
strerr_diev() and friends.
In 2.12.0.1
-----------
- Bugfixes.
In 2.12.0.0
-----------
- librandom revamped (again).
* random_init() and random_finish() removed.
* random_char() removed.
* random_string() renamed to random_buf().
* early versions added.
- New djbunix functions: waitn_posix(), waitn_reap_posix().
- readnclose() made public, now doesn't touch errno on success.
- openreadnclose_at() now returns a ssize_t.
In 2.11.2.0
-----------
- Bugfixes.
- User-provided CPPFLAGS, CFLAGS and LDFLAGS are now honored in
sysdep autodetection.
- envdir_internal() now supports a SKALIBS_ENVDIR_NOCLAMP option, for
unlimited-size variable reading.
In 2.11.1.0
-----------
- fd_close() doesn't retry if close() fails. (i.e. adapts to Linux's
behaviour over HP-UX's.)
- New function: opendir_at.
In 2.11.0.0
-----------
- libbiguint removed.
- Obsolete skalibs/environ.h and skalibs/getpeereid.h removed.
- rc4 and md5 removed.
- iobuffer removed.
- fd_cat and fd_catn changed signatures.
- All *_t types renamed to avoid treading on POSIX namespace.
- subgetopt() renamed to lgetopt().
- signal functions reworked; skasigaction removed; sig_stack removed
- Various functions removed: skaoffsetof(), selfpipe_untrap()
- cdb_make renamed to cdbmake; ui changed to 1=success/0=failure.
- cdb redesigned. cdb is now fixed, cdb_reader holds the state for cdb_find,
which puts data pointer and len directly into a cdb_data. A cdb
is always a map, pointers should always work.
- cdb_successor removed (unsafe to use); cdb_nextkey changed to
cdb_traverse_next, which puts key and data into two cdb_data's.
- cdb does not touch errno anymore.
- New posixplz function: munmap_void.
In 2.10.0.3
-----------
- Bugfixes.
In 2.10.0.2
-----------
- Bugfixes.
In 2.10.0.1
-----------
- Bugfixes.
In 2.10.0.0
-----------
- New openc_* functions.
- New function: ipc_bind_reuse_lock(), taking a lock before
unconditionally deleting the socket.
- ipc_bind_reuse() rewritten to use ipc_bind_reuse_lock(),
so it does the right thing instead of clobbering sockets.
- Complete revamping of the pathexec functions, see exec.h.
- Revamping of the locking functions.
- Use of standard O_NONBLOCK and O_CLOEXEC instead of adhoc
DJBUNIX_FLAG_NB and DJBUNIX_FLAG_COE.
- Better header separation; webipc.h removed (stuff moved to
socket.h)
- New function: mkptemp2(), creating a fifo with a templated
name (like mkptemp) but with options for O_NONBLOCK and O_CLOEXEC.
- New sysdep to test for chroot().
In 2.9.3.0
----------
- New stralloc_readyplus_tuned() function.
- Bugfixes.
In 2.9.2.1
----------
- Bugfixes.
In 2.9.2.0
----------
- Bugfixes.
- New bigkv_* set of functions in libdatastruct.
In 2.9.1.0
----------
- Bugfixes.
- Better support for GNU Hurd.
- Added path_canonicalize().
In 2.9.0.0
----------
- Bugfixes.
- Better support of out-of-path toolchains (among other things,
that means better autotools emulation).
- Build more friendly to recent glibc.
- Refactoring and optimization of scanning and formatting functions.
- Refactoring of stopwatch/wallclock functions. The --enable-clock
and --enable-monotonic configure switches have been removed.
tain_now() can now be set at run time to use a wall clock (default,
or via tain_now_set_wallclock()) or a stopwatch (via
tain_now_set_stopwatch()), instead of it being fixed at build time.
- Easy cross-compilation: no need to provide a whole sysdeps
directory anymore. Only a few sysdeps have to be provided manually,
via a --with-sysdep-K=V option to configure. Currently, that means
one: --with-sysdep-devurandom=yes|no
In 2.8.1.0
----------
- Added skalibs_regcomp(), accepting empty regexes on BSDs.
In 2.8.0.1
----------
- Bugfixes.
- Better reporting in utc_from_tai() and localtm_from_*()
In 2.8.0.0
----------
- Bugfixes.
- avltreeb removed. (It used VLAs inside of structures, which is
GNU C, not C99.) The AVLTREEN_DECLARE_AND_INIT() macro should be
used instead.
- New functions: env_dump(), mk?temp(), autosurf(), autosurf_name()
- mkdir_unique() removed. (Duplicate functionality with mkdtemp.)
- ancilautoclose and nbwaitall sysdeps removed.
- New header: skalibs/posixishard.h
- Static libraries are now PIC by default.
In 2.7.0.0
----------
- Bugfixes.
- New functions: ipc_timed_sendv(), unlink_void(), genset_deepfree(),
gensetdyn_deepfree(), skagetln_loose(), skagetlnsep_loose()
- dir_close() now returns void and leaves errno unchanged
- absolutepath(), sarealpath_tmp(), avl*_deletnode(), mininetstring, prot functions removed
- djbunix.h doesn't include env.h anymore
In 2.6.4.0
----------
- Bugfixes.
- New functions: execvep_loose(), byte_zzero(), openb_read(), sig0_scan()
- New function family: skalibs/genqdyn.h
In 2.6.3.1
----------
- Bugfixes.
In 2.6.3.0
----------
- New dir_fd function wrapping dirfd() (Solaris doesn't have dirfd())
- memmem implementation for platforms that don't provide it.
- memmem wrappers: byte_search, siovec_search.
- New functions: atomic_symlink, skagetlnmaxsep, child_spawn3
- New header: skalibs/posixplz.h, some header reorganization.
- New family of functions: textmessage and textclient
- skalibs/environ.h and skalibs/getpeereid.h are now obsolescent.
- Bugfixes.
In 2.6.2.0
----------
- New functions: access_at() (MacOS and Solaris don't support faccessat),
skaclient_timed_aflush().
- stralloc.h and tai.h are suitable for inclusion in C++ headers.
- New sysdep: SKALIBS_HASODIRECTORY. (MacOS doesn't support O_DIRECTORY.)
In 2.6.1.0
----------
- New function: lock_unx().
In 2.6.0.2
----------
- Bugfixes.
- Optimized packing/unpacking routines.
In 2.6.0.1
----------
- Better CPPFLAGS/CFLAGS/LDFLAGS management.
- openwritenclose() and openwritevnclose() now use mkstemp.
In 2.6.0.0
----------
- Bugfixes.
- New unixmessage_receiver_hasmsginbuf() function to address an issue
in unixmessage_handle().
- fd_close() now returns void. This mandates a major version bump.
- new skalibs_setgroups(), setgroups_with_egid() and setgroups_and_gid()
functions to work around supplementary group mismanagement in... can you
guess what operating system? (You get 3 tries. One for each BSD.)
In 2.5.1.1
----------
- Bugfixes.
In 2.5.1.0
----------
- Bugfixes.
- More workarounds for OpenBSD (who else).
- More workarounds for sysdeps detection by broken toolchains.
- Added the xpathexec_* family of functions (in djbunix.h).
In 2.5.0.0
----------
- Added this NEWS file. :)
- Dropped support for old versions of OpenBSD (at least 4.9 isn't working
anymore). Newer versions are still supported: 5.7 and up are working.
- --enable-replace-libc flag dropped. All supported systems now have a
compliant-enough libc for skalibs' purposes.
- Major types overhaul to be more POSIXly correct. 64-bit operations are
now supported on 64-bit archs where int is 32-bit. Use of POSIX types
wherever important, e.g. where pointers are used: datastruct.h indices,
for instance, are uint32_t. stralloc et al. lengths are size_t.
- Related API changes: skalibs/ushort.h, skalibs/uint.h and skalibs/ulong.h
have disappeared - replaced with skalibs/types.h that also includes basic
fmtscan support for common POSIX types. The uint16, uint32 and uint64
integer types have disappeared - replaced with stdint.h types. uint64_t is
defined by skalibs/uint64.h when stdint.h omits it.
- Lots of minor bugfixes and cleanups related to the types system.
- Better support for getrandom() and arc4random().
skalibs-2.14.2.0/README 0000664 0000000 0000000 00000001206 14630613211 0014242 0 ustar 00root root 0000000 0000000 skalibs - a general-purpose low-level C library
-----------------------------------------------
skalibs is a C library used by all the skarnet.org packages.
It provides APIs more suited to secure and efficient system
programming than the libc, especially where network programming
and IPCs are concerned.
See the enclosed doc/ subdirectory for the documentation, or
https://skarnet.org/software/skalibs/
* Installation
------------
See the INSTALL file.
* Contact information
-------------------
Laurent Bercot
Please use the mailing-list for
questions about skalibs.
skalibs-2.14.2.0/README.macos 0000664 0000000 0000000 00000000242 14630613211 0015342 0 ustar 00root root 0000000 0000000 This package will compile on Darwin (MacOS), but the building of
shared libraries is not supported.
Make sure you use the --disable-shared option to configure.
skalibs-2.14.2.0/README.solaris 0000664 0000000 0000000 00000000653 14630613211 0015722 0 ustar 00root root 0000000 0000000
This package assumes the existence of a POSIX shell in /bin/sh.
On Solaris, /bin/sh is not POSIX. Most versions of Solaris provide
a POSIX shell in /usr/xpg4/bin/sh.
To compile this package on Solaris, you will need to run
./patch-for-solaris
before you run ./configure. This script will change the #! invocation
of the configure script and various tools so that a POSIX shell is used
for the compilation process.
skalibs-2.14.2.0/configure 0000775 0000000 0000000 00000052323 14630613211 0015277 0 ustar 00root root 0000000 0000000 #!/bin/sh
cd `dirname "$0"`
. package/info
# Helper functions
usage () {
cat </dev/null 2>&1 && { echo "$1" ; return 0 ; }
$1
EOF
echo "$1" | sed -e "s/'/'\\\\''/g" -e "1s/^/'/" -e "\$s/\$/'/" -e "s#^'\([-[:alnum:]_,./:]*\)=\(.*\)\$#\1='\2#" -e "s|\*/|* /|g"
}
fail () {
echo "$*" 1>&2
exit 1
}
fnmatch () {
eval "case \"\$2\" in $1) return 0 ;; *) return 1 ;; esac"
}
cmdexists () {
type "$1" >/dev/null 2>&1
}
trycc () {
test -z "$CC_AUTO" && cmdexists "$1" && CC_AUTO="$*"
}
stripdir () {
while eval "fnmatch '*/' \"\${$1}\"" ; do
eval "$1=\${$1%/}"
done
}
tryflag () {
echo "Checking whether compiler accepts $2 ..."
echo "typedef int x;" > "$tmpc"
if $CC_AUTO $CPPFLAGS_POST $CFLAGS_POST "$2" -c -o "$tmpo" "$tmpc" >/dev/null 2>&1 ; then
echo " ... yes"
eval "$1=\"\${$1} \$2\""
eval "$1=\${$1# }"
return 0
else
echo " ... no"
return 1
fi
}
tryldflag () {
echo "Checking whether linker accepts $2 ..."
echo "typedef int x;" > "$tmpc"
if $CC_AUTO $CPPFLAGS_POST $CFLAGS_POST $LDFLAGS_POST -nostdlib "$2" -o "$tmpe" "$tmpc" >/dev/null 2>&1 ; then
echo " ... yes"
eval "$1=\"\${$1} \$2\""
eval "$1=\${$1# }"
return 0
else
echo " ... no"
return 1
fi
}
# Sysdeps determination functions
iscached ()
{
if test -r "$tmps" && grep -q "^${1}: " "$tmps" ; then
grep "^${1}: " "$tmps" | tail -n 1 |
{
IFS=' '
read -r k v ldlibs
if test -n "$ldlibs" ; then
echo " ... user-provided: $v with linker args: $ldlibs"
echo "$ldlibs" >&3
else
echo " ... user-provided: $v"
fi
echo "${1}: $v" >> "$sysdeps/sysdeps"
return 0 ;
}
else
return 1 ;
fi
}
choose () {
what="$1"
name="$2"
echo "Checking whether system has $3..."
if iscached "$name" ; then return ; fi
shift 3
libs="$*"
r=true
case "$what" in
*c*) $CC_AUTO $CPPFLAGS_AUTO $CPPFLAGS $CPPFLAGS_POST $CFLAGS_AUTO $CFLAGS $CFLAGS_POST -o "$tmpo" -c src/sysdeps/try$name.c 2>/dev/null || r=false ;;
esac
if $r ; then
case "$what" in
*l*) $CC_AUTO $CFLAGS_AUTO $CFLAGS $CFLAGS_POST $LDFLAGS_AUTO $LDFLAGS $LDFLAGS_POST -o try$name "$tmpo" $libs 2>/dev/null || r=false ;;
esac
fi
if $r ; then
case "$what" in
*r*) if test -n "$cross" ; then
rm -f try$name
fail "$0: sysdep $name cannot be autodetected when cross-compiling. Please manually provide a value with the --with-sysdep-${name}=yes|no|... option."
fi
./try$name >/dev/null 2>&1 ; r=$?
case "$r" in
111) fail "$0: test crashed, aborting." ;;
0) r=true ;;
*) r=false ;;
esac
esac
fi
rm -f try$name
if $r ; then
echo "$name: yes" >> $sysdeps/sysdeps
echo " ... yes"
else
echo "$name: no" >> $sysdeps/sysdeps
echo " ... no"
fi
}
trybasic () {
$CC_AUTO $CPPFLAGS_AUTO $CPPFLAGS $CPPFLAGS_POST $CFLAGS_AUTO $CFLAGS $CFLAGS_POST -o "$tmpo" -c "$1" 2>/dev/null
}
tryendianness () {
echo "Checking endianness..."
if iscached endianness ; then return ; fi
for i in endian.h sys/endian.h machine/endian.h sys/machine.h ; do
cat > "$tmpc" <
int a = LITTLE_ENDIAN ;
int b = BIG_ENDIAN ;
int c = BYTE_ORDER ;
EOF
trybasic "$tmpc" || continue
for j in little big pdp ; do
k=`echo $j | tr '[:lower:]' '[:upper:]'`
cat > "$tmpc" <
int a[BYTE_ORDER == ${k}_ENDIAN ? 1 : -1] ;
EOF
if trybasic "$tmpc" ; then
echo "endianness: $j" >> "$sysdeps/sysdeps"
echo " ... $j"
rm -f "$tmpc"
return
fi
done
rm -f "$tmpc"
fail "$0: error: unable to determine endianness according to $i"
done
for j in little big ; do
k=`echo $j | tr '[:lower:]' '[:upper:]'`
cat > "$tmpc" <
int a = _${k}_ENDIAN +1 ;
EOF
if trybasic "$tmpc" ; then
echo "endianness: $j" >> "$sysdeps/sysdeps"
echo " ... $j"
rm -f "$tmpc"
return
fi
done
rm -f "$tmpc"
fail "$0: error: unable to determine endianness: no suitable endian.h found"
}
trysigned () {
cat > "$tmpc" <
int a[($1)-1 < 0 ? 1 : -1] ;
EOF
trybasic "$tmpc"
r=$?
rm -f "$tmpc"
return $r
}
trysizes () {
t="$1" ; shift
for arg ; do
cat > "$tmpc" <
int a[sizeof($t) == $arg ? 1 : -1] ;
EOF
if trybasic "$tmpc" ; then
rm -f "$tmpc"
echo "$arg"
return
fi
done
rm -f "$tmpc"
fail "$0: error: unable to determine the size of $t on the target"
}
trystdtype () {
t="$1" ; shift
iscached "sizeofu$t" || { echon "sizeofu${t}: " ; trysizes "$t" "$@" ; } >> "$sysdeps/sysdeps"
}
trytypes () {
echo "Checking size and signedness of standard types..."
trystdtype short 2 4
trystdtype int 4 8 2
trystdtype long 8 4
for t in size uid gid pid time dev ino ; do
iscached "signed$t" || { echon "signed${t}: " ; if trysigned "${t}_t" ; then echo "yes" ; else echo "no" ; fi ; } >> "$sysdeps/sysdeps"
iscached "sizeof$t" || { echon "sizeof${t}: " ; trysizes "${t}_t" 4 8 2 ; } >> "$sysdeps/sysdeps"
done
echo " ... done"
}
detectlibs () {
args=
name=$1
shift
if $CC_AUTO $CPPFLAGS_AUTO $CPPFLAGS $CPPFLAGS_POST $CFLAGS_AUTO $CFLAGS $CFLAGS_POST -c -o try$name.o src/sysdeps/try$name.c 2>/dev/null ; then
until $CC_AUTO $CFLAGS_AUTO $CFLAGS $CFLAGS_POST $LDFLAGS_AUTO $LDFLAGS $LDFLAGS_POST -o "$tmpe" try$name.o $args 2>/dev/null ; do
if test -z "$*" ; then
rm -f try$name.o
return 1
fi
args="$args $1"
shift
done
echo ${args# }
rm -f try$name.o
return 0
else
return 1
fi
}
trylibs () {
name="$1"
libvar="$2"_lib
libfile="$2".lib
echo "Checking whether system has $3..."
shift 3
if { args=`iscached $name 3>&1 1>&4 4>&-` ; } 4>&1 ; then :
elif args=`detectlibs "$name" "$@"` ; then
echo "${name}: yes" >> "${sysdeps}/sysdeps"
if test -z "$args" ; then
echo " ... yes"
else
echo " ... yes, with linker args: $args"
fi
else
echo "${name}: no" >> ${sysdeps}/sysdeps
echo " ... no"
fi
eval "${libvar}=\"$args\""
echo "$args" > "${sysdeps}/$libfile"
}
# The script starts HERE.
# Initialize variables
CC_AUTO=
CPPFLAGS_AUTO="-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -Isrc/include"
CPPFLAGS_POST="$CPPFLAGS"
CPPFLAGS=
CFLAGS_AUTO="-pipe -Wall"
CFLAGS_POST="$CFLAGS"
CFLAGS="-O2"
LDFLAGS_AUTO=
LDFLAGS_POST="$LDFLAGS"
LDFLAGS=
LDFLAGS_NOSHARED=
LDFLAGS_SHARED=-shared
prefix=
dynlibdir='$prefix/lib'
libdir='$prefix/lib/$package'
includedir='$prefix/include'
sysconfdir='$prefix/etc'
sysdepdir='$prefix/lib/$package/sysdeps'
sysdeplist=
shared=true
static=true
allpic=true
slashpackage=false
ipv6=true
select=false
taiclock=false
ddefaultpath=/usr/bin:/bin
defaultpath=$ddefaultpath
dpathorig=true
sproot=
home=
exthome=
addincpath=''
addlibspath=''
addlibdpath=''
vpaths=''
vpathd=''
build=
# Parse command line
for arg ; do
case "$arg" in
--help) usage ;;
--prefix=*) prefix=${arg#*=} ;;
--dynlibdir=*) dynlibdir=${arg#*=} ;;
--libdir=*) libdir=${arg#*=} ;;
--includedir=*) includedir=${arg#*=} ;;
--sysconfdir=*) sysconfdir=${arg#*=} ;;
--sysdepdir=*) sysdepdir=${arg#*=} ;;
--with-include=*) var=${arg#*=} ; stripdir var ; addincpath="$addincpath -I$var" ;;
--with-lib=*) var=${arg#*=} ; stripdir var ; addlibspath="$addlibspath -L$var" ; vpaths="$vpaths $var" ;;
--with-dynlib=*) var=${arg#*=} ; stripdir var ; addlibdpath="$addlibdpath -L$var" ; vpathd="$vpathd $var" ;;
--enable-shared|--enable-shared=yes) shared=true ;;
--disable-shared|--enable-shared=no) shared=false ;;
--enable-static|--enable-static=yes) static=true ;;
--disable-static|--enable-static=no) static=false ;;
--enable-all-pic|--enable-all-pic=yes) allpic=true ;;
--disable-all-pic|--enable-all-pic=no) allpic=false ;;
--enable-slashpackage=*) sproot=${arg#*=} ; slashpackage=true ; ;;
--enable-slashpackage) sproot= ; slashpackage=true ;;
--disable-slashpackage) sproot= ; slashpackage=false ;;
--enable-ipv6|--enable-ipv6=yes) ipv6=true ;;
--disable-ipv6|--enable-ipv6=no) ipv6=false ;;
--enable-iopause-select|--enable-iopause-select=yes) select=true ;;
--disable-iopause-select|--enable-iopause-select=no) select=false ;;
--enable-tai-clock|--enable-tai-clock=yes) taiclock=true ;;
--disable-tai-clock|--enable-tai-clock=no) taiclock=false ;;
--enable-monotonic|--enable-monotonic=yes) echo "$0: warning: --enable-monotonic is now obsolete" 1>&2 ;;
--disable-monotonic|--enable-monotonic=no) ;;
--with-default-path=*) defaultpath=${arg#*=} ; dpathorig=false ;;
--without-default-path) defaultpath=$ddefaultpath ; dpathorig=true ;;
--with-sysdep-*=*) sysdeplist="$sysdeplist ${arg#--with-sysdep-}" ;;
--without-sysdep-*) sysdeplist="$sysdeplist ${arg#--without-sysdep-}=no" ;;
--enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
--host=*|--target=*) target=${arg#*=} ;;
--build=*) build=${arg#*=} ;;
-* ) echo "$0: unknown option $arg" ;;
*=*) eval "${arg%%=*}=\${arg#*=}" ;;
*) target=$arg ;;
esac
done
# Add /usr in the default default case
if test -z "$prefix" ; then
if test "$libdir" = '$prefix/lib/$package' ; then
libdir=/usr/lib/$package
fi
if test "$includedir" = '$prefix/include' ; then
includedir=/usr/include
fi
if test "$sysdepdir" = '$prefix/lib/$package/sysdeps' ; then
sysdepdir=/usr/lib/$package/sysdeps
fi
fi
# Expand installation directories
stripdir prefix
for i in exec_prefix dynlibdir libdir includedir sysconfdir sysdepdir sysdepspre sproot ; do
eval tmp=\${$i}
eval $i=$tmp
stripdir $i
done
# Set slashpackage values
if $slashpackage ; then
home=${sproot}/package/${category}/${package}-${version}
exthome=${sproot}/package/${category}/${package}
sysdepdir=${home}/sysdeps
binprefix=${home}/command
extbinprefix=${exthome}/command
dynlibdir=${home}/library.so
libdir=${home}/library
includedir=${home}/include
if $dpathorig ; then
if echo $defaultpath | tr : '\n' | grep -q '^/command$' ; then : ; else
defaultpath="/command:$defaultpath"
fi
fi
fi
# Get usable temp filenames
i=0
set -C
while test "$i" -lt 50 ; do
i=$(($i+1))
tmpc="./tmp-configure-$$-$PPID-$i.c"
tmpo="./tmp-configure-$$-$PPID-$i.o"
tmpe="./tmp-configure-$$-$PPID-$i.tmp"
tmps="./tmp-configure-$$-$PPID-$i.sysdeps"
2>|/dev/null > "$tmpc" && break
2>|/dev/null > "$tmpo" && break
2>|/dev/null > "$tmpe" && break
2>|/dev/null > "$tmps" && break
done
if test "$i" -gt 50 ; then
fail "$0: cannot create temporary files"
fi
set +C
trap 'rm -f "$tmpc" "$tmpo" "$tmpe" "$tmps"' EXIT ABRT INT QUIT TERM HUP
# Preprocess user-provided sysdeps
rm -f "$tmps"
if test -n "$sysdeplist" ; then
:> "$tmps"
for i in $sysdeplist ; do
k=${i%%=*}
echo ${i#*=} | sed 's/,/ /g' |
{
read v extras
if test -z "$k" || test -z "$v" ; then fail "$0: invalid user-provided sysdep: $i" ; fi
if test "$v" = "true" ; then v=yes
elif test "$v" = "false" ; then v=no
fi
if grep -q -e "^${k}: " "$tmps" ; then
grep -v -e "^${k}: " "$tmps" > "$tmpe"
mv -f "$tmpe" "$tmps"
fi
if test -n "$extras" ; then
echo "${k}: $v $extras"
else
echo "${k}: $v"
fi >> "$tmps"
}
done
fi
# Find a C compiler to use
if test -n "$target" && test x${build} != x${target} ; then
cross=${target}-
else
cross=
fi
echo "Checking for C compiler..."
trycc ${CC}
if test -n "$CC_AUTO" ; then
b=`basename "$CC"`
adjust_cross=false
if test "$b" != "$CC" ; then
adjust_cross=true
echo "$0: warning: compiler $CC is declared with its own path. If it's not accessible via PATH, you will need to pass AR, RANLIB and STRIP make variables to the make invocation." 1>&2
fi
if test -n "$cross" ; then
if test "$b" = "${b##$cross}" ; then
echo "$0: warning: compiler $CC is declared as a cross-compiler for target $target but does not start with prefix ${cross}" 1>&2
elif $adjust_cross ; then
cross=`dirname "$CC"`/"$cross"
fi
fi
fi
trycc ${cross}gcc
trycc ${cross}clang
trycc ${cross}cc
test -n "$CC_AUTO" || fail "$0: cannot find a C compiler"
echo " ... $CC_AUTO"
echo "Checking whether C compiler works... "
echo "typedef int x;" > "$tmpc"
if $CC_AUTO $CPPFLAGS_AUTO $CPPFLAGS $CPPFLAGS_POST $CFLAGS_AUTO $CFLAGS $CFLAGS_POST -c -o "$tmpo" "$tmpc" 2>"$tmpe" ; then
echo " ... yes"
else
echo " ... no. Compiler output follows:"
cat < "$tmpe"
exit 1
fi
echo "Checking target system type..."
if test -z "$target" ; then
if test -n "$build" ; then
target=$build ;
else
target=$($CC_AUTO -dumpmachine 2>/dev/null) || target=unknown
fi
fi
echo " ... $target"
# Produce automatic compilation flags
if $allpic ; then
tryflag CPPFLAGS_AUTO -fPIC
fi
tryflag CFLAGS_AUTO -std=c99
tryflag CFLAGS -fomit-frame-pointer
tryflag CFLAGS_AUTO -fno-exceptions
tryflag CFLAGS_AUTO -fno-unwind-tables
tryflag CFLAGS_AUTO -fno-asynchronous-unwind-tables
tryflag CPPFLAGS_AUTO -Werror=implicit-function-declaration
tryflag CPPFLAGS_AUTO -Werror=implicit-int
tryflag CPPFLAGS_AUTO -Werror=pointer-sign
tryflag CPPFLAGS_AUTO -Werror=pointer-arith
tryflag CPPFLAGS_AUTO -Wno-unused-value
tryflag CPPFLAGS_AUTO -Wno-parentheses
tryflag CFLAGS_AUTO -ffunction-sections
tryflag CFLAGS_AUTO -fdata-sections
tryldflag LDFLAGS_AUTO -Wl,--as-needed
tryldflag LDFLAGS_AUTO -Wl,--sort-section=alignment
tryldflag LDFLAGS_AUTO -Wl,--sort-common
if $shared ; then
tryldflag LDFLAGS -Wl,--hash-style=both
fi
# And now, determine a big fat batch of sysdeps.
sysdeps=sysdeps.cfg
mkdir -p $sysdeps
echo "$target" > $sysdeps/target
:> "$sysdeps/sysdeps"
util_lib=
echo > $sysdeps/util.lib
echo 'Checking required linker flags for socket functions...'
socket_lib=`detectlibs lsock -lsocket -lnsl` || fail "$0: unable to determine required linker flags for socket functions"
if test -n "$socket_lib" ; then
echo " ... $socket_lib"
else
echo " ... none"
fi
echo "$socket_lib" > $sysdeps/socket.lib
trylibs clockrt sysclock 'clock_gettime()' -lrt
choose cl clockmon CLOCK_MONOTONIC $sysclock_lib
choose cl clockboot CLOCK_BOOTTIME $sysclock_lib
trylibs posixspawn spawn 'posix_spawn()' -lrt
trylibs timer timer 'timer_create()' -lrt
trylibs pthread pthread 'pthread support' -lpthread -lrt
tryendianness
trytypes
choose cl accept4 'accept4()'
choose c cmsgcloexec 'MSG_CMSG_CLOEXEC'
choose cl dirfd 'dirfd()'
choose cl fdopendir 'fdopendir()'
choose cl eventfd 'eventfd()'
choose cl flock 'flock()'
choose cl getpeereid 'getpeereid()'
choose cl sopeercred 'SO_PEERCRED'
choose cl getpeerucred 'getpeerucred()'
choose cl ipv6 'IPv6 support' $socket_lib
choose c msgdontwait 'MSG_DONTWAIT'
choose c ocloexec 'O_CLOEXEC'
choose c odirectory 'O_DIRECTORY'
choose cl openat 'openat()'
choose cl linkat 'linkat()'
choose cl memmem 'memmem()'
choose cl pipe2 'pipe2()'
choose cl ppoll 'ppoll()'
choose cl revoke 'revoke()'
choose cl sendfile 'sendfile()'
choose cl setgroups 'setgroups()'
choose cl settimeofday 'settimeofday()'
choose cl signalfd 'signalfd()'
choose cl splice 'splice()'
choose c statim 'st.st_atim'
choose c statimespec 'st.st_atimespec'
choose cl strcasestr 'strcasestr()'
choose c strnlen 'strnlen()'
choose c uint64t 'uint64_t'
choose cl waitid 'waitid()'
choose cl futimens 'futimens()'
choose cl futimes 'futimes()'
choose cl arc4random 'arc4random()'
choose cl arc4random_addrandom 'arc4random_addrandom()'
choose cl itimer 'setitimer()'
choose cl namespaces 'namespaces'
choose cl nsgetparent 'NS_GET_PARENT'
choose cl explicit_bzero 'explicit_bzero()'
choose cl getrandom 'getrandom()'
choose cl grndinsecure 'GRND_INSECURE'
choose cl chroot 'chroot()'
choose cl posixspawnsetsid 'POSIX_SPAWN_SETSID' $spawn_lib
choose cl posixspawnsetsidnp 'POSIX_SPAWN_SETSID_NP' $spawn_lib
choose cl posixspawnchdir 'posix_spawn_file_actions_addchdir()' $spawn_lib
choose cl posixspawnchdirnp 'posix_spawn_file_actions_addchdir_np()' $spawn_lib
# Here are the evil irreducible run-time sysdeps.
choose clr devurandom '/dev/urandom'
choose clr posixspawnearlyreturn 'posix_spawn() return early' $spawn_lib
# Finally, produce config.mak and config.h
rm -f "$tmps"
echo "Creating config.mak..."
cmdline=$(quote "$0")
for i ; do cmdline="$cmdline $(quote "$i")" ; done
exec 3>&1 1>config.mak
cat << EOF
# This file was generated by:
# $cmdline
# Any changes made here will be lost if configure is re-run.
target := $target
package := $package
prefix := $prefix
sysconfdir := $sysconfdir
sysdepdir := $sysdepdir
dynlibdir := $dynlibdir
libdir := $libdir
includedir := $includedir
sysdeps := $sysdeps
version := $version
sproot := $sproot
home := $home
exthome := ${exthome}
ipv6 := ${ipv6}
SPAWN_LIB := ${spawn_lib}
SOCKET_LIB := ${socket_lib}
SYSCLOCK_LIB := ${sysclock_lib}
TIMER_LIB := ${timer_lib}
UTIL_LIB := ${util_lib}
CC := ${CC_AUTO}
CPPFLAGS_AUTO := $CPPFLAGS_AUTO
CPPFLAGS := $CPPFLAGS $CPPFLAGS_POST
CFLAGS_AUTO := $CFLAGS_AUTO
CFLAGS := $CFLAGS $CFLAGS_POST
LDFLAGS_AUTO := $LDFLAGS_AUTO
LDFLAGS := $LDFLAGS $LDFLAGS_POST
LDFLAGS_NOSHARED := $LDFLAGS_NOSHARED
LDFLAGS_SHARED := $LDFLAGS_SHARED
CROSS_COMPILE := ${cross}
EOF
if test -n "$vpaths" ; then
echo "vpath lib%a$vpaths"
fi
if test -n "$vpathd" ; then
echo "vpath lib%.so$vpathd"
fi
if $static ; then
echo "STATIC_LIBS := libskarnet.a.xyzzy"
else
echo "STATIC_LIBS :="
fi
if $shared ; then
echo "SHARED_LIBS := libskarnet.so.xyzzy"
else
echo "SHARED_LIBS :="
fi
if $allpic ; then
echo "STATIC_LIBS_ARE_PIC := 1"
else
echo "STATIC_LIBS_ARE_PIC :="
fi
exec 1>&3 3>&-
echo " ... done."
echo "Creating src/include/${package}/config.h..."
mkdir -p -m 0755 src/include/${package}
exec 3>&1 1> src/include/${package}/config.h
cat <&3 3>&-
echo " ... done."
skalibs-2.14.2.0/doc/ 0000775 0000000 0000000 00000000000 14630613211 0014130 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/doc/crosscompile.html 0000664 0000000 0000000 00000007335 14630613211 0017530 0 ustar 00root root 0000000 0000000
How to cross-compile skalibs
skalibs
Software
skarnet.org
How to cross-compile skalibs
There are three issues in the world of cross-compilation:
- support for parallel builds: the source directory must be read-only
and each build process must have its own build tree.
- support for compiler options: to specify the target architecture,
the header and library files that should be used, etc.
- build-time tests performed on the build architecture are invalid
if the target architecture is different.
Support for parallel builds
skalibs does not support out-of-tree builds at the moment,
but since the source code tree is small, it's not costly to duplicate it
to perform parallel builds. If the source code tree grows significantly
larger, out-of-tree build support will be considered.
Support for staging
The skalibs Makefile, as well as every other
skarnet.org package's
Makefile, supports the DESTDIR convention for staging. To install
skalibs under a stage fake root:
- Give the options you need to ./configure.
The arguments to the --prefix, --libdir and similar
options must be the valid paths for run-time.
- To install the software, run make install
DESTDIR=stage.
Support for build-time options and bypassing target execution tests
skalibs uses a standard ./configure && make && make install
process, and cross-compiling build-time options can be given on the
./configure command line.
skalibs performs a certain number of build-time tests, to collect
behaviour information on the target architecture. Most of these tests
work when cross-compiling, because they only involve characteristics
of the target that the cross-toolchain knows at build time; but some
actually require code execution on the target, and so they cannot be
performed when cross-compiling. For those, you have to manually
give a special option to configure, to tell the build system what the
behaviour of the target architecture is. The option is of the form
--with-sysdep-key=value, where key
is the name of the sysdep (i.e. the element of target behaviour that
is being tested), and value the associated value, most of
the time yes or no.
At all times, ./configure --help provides the list of sysdeps
you need to provide a --with-sysdep-* option for. As of
skalibs-2.14.0.1, there are two sysdeps in this case:
- devurandom: yes if the target has a valid
pseudorandom generation device in /dev/urandom, and no
otherwise.
- posixspawnearlyreturn: yes if the target has a broken
posix_spawn()
implementation that can return before the child has successfully exec'ed.
That happens with old glibcs and some virtual platforms.
skalibs-2.14.2.0/doc/djblegacy.html 0000664 0000000 0000000 00000012755 14630613211 0016754 0 ustar 00root root 0000000 0000000
skalibs: the djb legacy
skalibs
Software
skarnet.org
The DJB legacy
Who is this DJB guy, and why is he so special anyway ?
Dan J. Bernstein is a cryptologist and
a mathematician; he's also the author of a widely known and used MTA,
qmail, as well as a few
lesser known pieces of software.
For some time he was quite active in some Unix software-related
Internet newsgroups and mailing-lists; he quickly became a
controversial figure of the Unix programming community, mostly
by being extremely vocal against well-known authors of
"mainstream" Unix software and by suggesting designs so removed
from traditional software design that a normal human reaction is
to first view him as a complete nut.
I do not care for controversy. I am interested in the code. I was
a sysadmin at the time, and still learning to program in C beyond
what they teach you in school (i.e. not much). I had heard enough
horror stories with sendmail; so I gave a shot at qmail, trying to
understand its design principles and the way it was made. And then
I fell down the rabbit hole.
Look, I don't care what you think of the guy, I don't know him
anyway, and this is totally beside the point. The only thing that
matters is that DJB's software is right in so
many ways. This software works. DJB's design
principles are sound and elegant; they are
sound foundations to build reliable, secure, and
low resource-consuming software. And the design,
when you get used to it, feels so unix-ish: it's Unix the way it
should have been from the start.
Studying DJB's software was the best course in C/Unix programming
I ever had. Now I teach C/Unix; and I am really glad I
learned from the best.
Building beyond DJB's works.
There's already
a lot you can do with
pristine DJB software and some brains.
However, I mostly see DJB as a pioneer. He showed it was possible
to think Unix differently and build secure, reliable and efficient
software without investing millions of dollars into it; now it is
up to software architects and programmers to use the breakthrough
and build upon it. There's a real demand for quality Unix software
out there; it's time to supply. And
I am not the only
one thinking this way.
So, skalibs.
One of the "DJB philosophy" key points is to question the
interfaces. You have a task to do; you have existing interfaces.
What do you do?
- Most people don't even think about it and use the existing
interfaces, even if it amounts to cramming a square peg into a
round hole. This is why buffer overflows exist. This is why
people use abominations such as
gets(),
which is still in the Single Unix Specification as of version 4,
in freaking June 2011. This is why the System V
initialization scheme is still prevalent in Linux distributions,
despite being one of the slowest and most unreliable of all
initialization schemes. This is why people still use the
atrocious "libresolv" DNS client library.
- An alternative way of thinking is to ask yourself:
"Is the interface I have adequate for the task at hand?"
- If yes: perfect, use that interface.
- If no: then do not use that interface, duh. Design a
better one and use it: so the complexity will be split and the code
will be easier to maintain.
Interfaces should be questioned right down to the libc. You
cannot build strong software on flakey foundations. And from a system
and network programmer's point of view, one thing is clear: most
standard libc interfaces suck. There is no buffered asynchronous
I/O. There is no timed I/O. There is no heap management helper. Even
simple system calls are not
always guaranteed to succeed!
That is where skalibs comes from. skalibs results from questioning
the libc interfaces, and providing replacements or additions where
the existing interfaces do not make it easy to write reliable, secure
and efficient software. It is inspired by DJB's work. It is
not a shrine or anything of the kind.
Conclusion
So, in short, DJB is not a guru, I'm not a mindless brainwashed fan,
and the "DJB advocates" are not a cult. We just think DJB brought
something to Unix and more generally to the software programming world;
we learned from him, we write software following
sound principles that he was one of the first to really apply, and we give
credit where credit is due.
Use our software. You will never want to go back.
skalibs-2.14.2.0/doc/flags.html 0000664 0000000 0000000 00000020443 14630613211 0016115 0 ustar 00root root 0000000 0000000
skalibs: configuration flags
skalibs
Software
skarnet.org
skalibs configuration flags
The skalibs ./configure script comes with a few
uncommon options; this page explains what they are for.
--enable-slashpackage[=sproot]
This flag tells configure that you want to install skalibs according to
the slashpackage convention.
If you enable it, and $v is the version of skalibs you're compiling,
make install will install the skalibs header files in
/package/prog/skalibs-$v/include, the static libraries in
/package/prog/skalibs-$v/library, the dynamic libraries in
/package/prog/skalibs-$v/library.so and the data files in
/package/prog/skalibs-$v/etc, all prefixed by sproot
if present.
It will also prepend the default path with /command, unless an
explicit default path has been given via the
--with-default-path option.
Additionally, it will add two more "make" targets:
- make update will update the /package/prog/skalibs
symbolic link to point to skalibs-$v
- make -L global-links will make links from /library.so
to the installed skalibs shared libraries.
If this option is not given, no slashpackage support will be provided.
--enable-tai-clock
To understand what this flag is about - and the next two flags too - you
should start by reading
this
page about Unix time,
which David Madore wrote after
a long and fairly complete discussion we had on the subject. You can also
read what DJB says about Unix time.
Unfortunately, when he says "the POSIX rules are so outrageously dumb (...)
that no self-respecting engineer would obey them", DJB is wrong: a lot of
people follow the POSIX rules. Or maybe he's right... and there are very,
very few self-respecting engineers.
Basically, when you configure a Unix system, there are essentially two
ways to deal with your system clock.
- You can set your system clock to TAI-10, which is the "right", but
uncommon, thing to do:
- ↑ The main advantage of this setup is that it makes your system clock
linear. In other words,
gettimeofday()
becomes suitable for both timestamping (which needs absolute time) and timeout
computations (which need reliable interval measurements); if your clock is
accurate enough, it can function as both a wall clock and a stopwatch.
This simplifies keeping track of the current time considerably,
and makes event loop handling (with functions such as
iopause()) trivial.
- ↑ skalibs uses TAI internally; setting your system clock to TAI-10
saves a lot of conversions and makes time computations with skalibs more
efficient.
- → skalibs-aware software will display GMT or local time properly in
every case, but you have to
use the right/ timezones, from Arthur David Olson's timezone
library, to prevent your other software from being confused by a TAI-10 system clock.
If you do not use right/ timezones, utilities such as date
will not compute the proper time - they will have an offset of 24 seconds
or so.
- ↓ This setup is arguably not SUSv4 conformant (a strict
interpretation of Single Unix requires the system clock to be set to UTC).
- ↓ This setup is not compatible with
ntpd. ntpd's design
is flawed: it makes the mistake of setting the system clock itself - instead
of simply making the computed time available to other programs, one of which
could set the system clock - and it always sets it to UTC. (The
s6-networking
package provides alternate ways to synchronize your clock, though.)
- You can set your system clock to UTC, which is the common, strictly
POSIX setup:
- ↑ This is strictly SUSv4-compliant. Most Unix machines all over
the world are set up like this.
- ↑ This is compatible with ntpd.
- → You should use posix/ time zones in that case,
not right/ time zones.
- ↓ skalibs time computations will take a bit more processing power.
- ↓ Most importantly, you forsake all linearity - and even monotonicity
- on your system clock, which can now only be used as a wall clock,
not as a stopwatch. skalibs will try its best to do accurate time
computations, but there's no way gettimeofday() can be relied on
when a leap second is nearby; you have to use CLOCK_MONOTONIC as a stopwatch
for accurate interval measurement.
Use --enable-tai-clock if your system clock is set to TAI-10.
I generally recommend this setup
for computers you have full control on, on which you install and tweak
the software your way, like manually administered servers or embedded
boxes. If you do not run ntpd and do not mind breaking POSIX, it is the
sensible choice.
Do not use this option if your system clock is set to UTC, i.e. if
you're in none of the above cases: you are a
POSIX freak, or your Unix distribution is running ntpd for you, or
other software is assuming you're on UTC. This is the default.
--disable-ipv6
If you set this option, then skalibs will be compiled without IPv6 support,
even if your target architecture supports it. This can significantly
reduce the size of your networking applications if they don't need IPv6
support.
If you don't set this option, then skalibs will include IPv6 support in the
relevant networking functions if and only if the target architecture supports it.
This is the default, and it is safe.
--with-default-path=path
The execvep() function uses
the value of the PATH environment variable as its executable search path.
Specifying this option to configure tells execvep() what executable
search path to use when PATH is undefined (which should not happen
often anyway).
The default is /usr/bin:/bin, which is usually safe.
--with-sysdep-devurandom=yes
When compiling natively, skalibs probes the build system for sysdeps,
i.e. system-specific behaviours that influence the way skalibs must
implement certain interfaces. This autodetection can be overriden on the
configure command line: for a sysdep named K, if you want to
enforce the value V, you can use --with-sysdep-K=V
as a configure option.
(This is similar to the ac_cv_foobar_K=V environment
variable mechanism in autotools.)
When cross-compiling, there are a few sysdeps
that cannot be autodetected and have to be provided manually on the
command line. The devurandom sysdep, which encodes the existence of
a functional /dev/urandom device on the target, is one of those.
--with-sysdep-devurandom=yes tells skalibs to assume that there is
such a device it can rely on for random number generation.
skalibs-2.14.2.0/doc/index.html 0000664 0000000 0000000 00000010270 14630613211 0016125 0 ustar 00root root 0000000 0000000
skalibs: a C library for system programming
Software
skarnet.org
skalibs
What is it ?
skalibs is a package centralizing the free software / open source C development
files used for building all software at skarnet.org: it contains essentially
general-purpose libraries.
You will need to install skalibs if you plan to build skarnet.org software.
The point is that you won't have to download and compile big libraries, and care
about portability issues,
everytime you need to build a package: do it only once.
skalibs can also be used as a sound basic start for C development. There
are a lot of general-purpose libraries out there; but if your main goal is
to produce small and secure C code with a focus on system
programming, skalibs might be for you.
Installation
Requirements
Licensing
skalibs is free software. It is available under the
ISC license.
Download
Compilation
- See the enclosed INSTALL file for installation details.
- skalibs sports a few uncommon options to its ./configure script.
This page documents them in detail.
Upgrade notes
- This page lists the differences to be aware of between
the previous versions of skalibs and the current one.
Cross-compilation
Cross-compilation is tricky. skalibs provides system-agnostic interfaces, so all the
other skarnet.org packages cross-compile easily; but some effort needs to be made to
cross-compile skalibs, see this page.
Reference
Libraries
Similar work
Here are a few other libraries originating from the same place as
skalibs, i.e. people start to reuse and package, or rewrite,
code from Dan J. Bernstein, and then patch
after patch, addition after addition, the code evolves into a project
of its own:
Related resources
- skalibs is discussed on the
skaware mailing-list.
skalibs-2.14.2.0/doc/libdatastruct/ 0000775 0000000 0000000 00000000000 14630613211 0016775 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/doc/libdatastruct/genqdyn.html 0000664 0000000 0000000 00000010502 14630613211 0021326 0 ustar 00root root 0000000 0000000
skalibs: the genqdyn library interface
libdatastruct
libskarnet
skalibs
Software
skarnet.org
The genqdyn library interface
The following functions are declared in the skalibs/genqdyn.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
genqdyn is a set of functions implementing simple queues on
generic objects. The dyn prefix means the queues are dynamically
allocated (and live in heap memory): it is possible to enqueue an arbitrary
number of objects, up to the available memory.
Data structures
A genqdyn structure holds the information necessary to implement
a queue. It can be declared anywhere (including in the stack). All genqdyn
functions take a pointer to this structure as an argument.
Macros
genqdyn GENQDYN_INIT(type, num, den)
Returns an anonymous genqdyn structure suitable for holding objects of
type type. The num and den arguments are integers,
used to tune the amount of memory needed / management overhead balance.
num/den must be a fractional value between 0 and 1.
The closer to 0, the longer genqdyn will wait before performing a
cleanup (and the more memory it can consume). At 0, genqdyn can only
recycle memory when the queue becomes totally empty. The closer to 1,
the more genqdyn optimizes its memory usage (and the more often it
performs maintenance on its queue). At 1, it performs maintenance
every time an object is popped.
Anything between 1/4 and 3/4 is a reasonable value for num/den.
size_t genqdyn_n (genqdyn *g)
Returns the number of elements in the genqdyn *g, which must
have been initialized.
void *genqdyn_peek (genqdyn *g)
Peeks at the next object in the queue, i.e. the object that has
been pushed the earliest and that hasn't been popped yet.
You can use the GENQDYN_PEEK(type, g) macro to get a
type * pointer instead of a void * one.
Functions
void genqdyn_init (genqdyn *g, size_t esize, unsigned int num, unsigned int den)
Initializes the genqdyn *g to hold objects of size esize.
g must be unused, or have been freed. The num and den
arguments tune g's behaviour as described above in the GENQDYN_INIT
description. This function is similar to the GENQDYN_INIT macro, except that
it can be used dynamically and works on a pre-declared genqdyn, whereas the
macro can only be used as a static initializer.
void genqdyn_free (genqdyn *g)
Frees the resources used by *g, which is then considered
uninitialized.
int genqdyn_push (genqdyn *g, void const *p)
Pushes the object pointed to by p onto the queue. This object
must have the same size that has been given to the genqdyn_init()
invocation, or be of the same type that has been given to the
GENQDYN_INIT() invocation. The function returns 1 if it succeeds
and 0 (and sets errno) if it fails.
int genqdyn_unpush (genqdyn *g)
Undoes the last push. Returns 1, except if the queue is empty,
in which case it returns 0 and sets errno to EINVAL.
int genqdyn_pop (genqdyn *g)
Pops an object from the queue, and possibly performs maintenance
to reuse some memory. Returns 1, unless the queue is empty, in which
case it returns 0 and sets errno to EINVAL.
skalibs-2.14.2.0/doc/libdatastruct/index.html 0000664 0000000 0000000 00000002772 14630613211 0021002 0 ustar 00root root 0000000 0000000
skalibs: the datastruct library interface
libskarnet
skalibs
Software
skarnet.org
The datastruct library interface
libdatastruct implements generic data structures like chained
lists and AVL trees, in a memory-efficient and CPU-efficient way.
Compiling
- Use #include <skalibs/datastruct.h>
- You can also use the lower-level headers included by skalibs/datastruct.h instead.
Programming
skalibs/datastruct.h is a collection of several headers, each
one defining a specific data structure and providing functions to work on it.
- skalibs/genqdyn.h: dynamically allocated queues for generic objects
- FIXME: To be completed
skalibs-2.14.2.0/doc/libposixplz/ 0000775 0000000 0000000 00000000000 14630613211 0016507 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/doc/libposixplz/index.html 0000664 0000000 0000000 00000002160 14630613211 0020503 0 ustar 00root root 0000000 0000000
skalibs: the posixplz library interface
libskarnet
skalibs
Software
www.skarnet.org
The posixplz library interface
libposixplz is a thin layer of APIs addressing deficencies
in POSIX itself.
Compiling
- The libposixplz functions are available under the skalibs/posixplz.h
header.
Programming
- TODO: describe the functions.
skalibs-2.14.2.0/doc/librandom/ 0000775 0000000 0000000 00000000000 14630613211 0016077 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/doc/librandom/index.html 0000664 0000000 0000000 00000007547 14630613211 0020111 0 ustar 00root root 0000000 0000000
skalibs: the random library interface
libskarnet
skalibs
Software
skarnet.org
The random library interface
librandom is a small library designed to provide an
interface to some reasonable-quality pseudorandom number
generation. librandom uses arc4random when available,
or getrandom - else it defaults to /dev/urandom and a
a SURF PRNG.
Compiling
- Use #include <skalibs/random.h>
Programming
You should refer to the skalibs/random.h header for the exact
function prototypes.
Basic functions
unsigned char c ;
uint32_t max ;
uint32_t n ;
size_t b ;
char data[at least b] ;
int r ;
r = random_init() ;
c = random_char() ;
n = random_uint32(max) ;
random_string(data, b) ;
random_finish() ;
random_init() must be called before any other function in
the random library. It returns 0 (and sets errno) on failure, and
nonzero on success.
It is recommended that you let the library perform cleanups after you
are done using it, by calling random_finish() - unless your
process exits right away.
- random_char() returns a random character.
- random_uint32(max) returns a random integer
between 0 and max-1.
- random_string(data, b) fills
b bytes in data (which must be preallocated)
with random data.
Advanced functions
void random_unsort (char *s, unsigned int n, unsigned int chunksize)
Shuffles the array s (of size at least n*chunksize) by
performing a random permutation of the n blocks of chunksize bytes.
Bytes are not permuted inside chunks.
void random_name (char *s, size_t n)
Writes n random readable ASCII characters into s:
letters, numbers, hyphens or underscores. Does not terminate with a
null character.
int random_sauniquename (stralloc *sa, unsigned int n)
Appends a (non-null-terminated) unique, unpredictable ASCII name to the
stralloc *sa. That
name includes n randomly generated ASCII characters.
Notes
- The random library is a thin wrapper around the best
available random generator provided by the underlying system. By
decreasing order of preference, it will use the following
implementations if available:
- The random_init() function tries to automatically add some
reasonably random data to the underlying random generator's entropy pool.
However, that pseudorandom data is not 100% unpredictable, so it will not
replace proper seeding of the random generator at boot time.
skalibs-2.14.2.0/doc/libskarnet.html 0000664 0000000 0000000 00000011265 14630613211 0017161 0 ustar 00root root 0000000 0000000
skalibs: the skarnet library interface
skalibs
Software
skarnet.org
The skarnet library interface
libskarnet is the library exported by skalibs; both a static
library and a shared library (if they are supported on your system) are
available. Every skarnet.org binary needs this library.
Compiling
- Make sure the place you installed the skalibs header files in is in
your header directory list; the default is /usr/include,
which is normally browsed by default by your C preprocessor.
- Use #include <skalibs/foobar.h> where
foobar.h is the header you need.
- The skalibs/skalibs.h header is the general entry
point that will declare the near-entirety of the functions, variables
and constants in skalibs. Including this header
in your source files whenever you need a skalibs function will work;
however, it is rather heavy, and you might want to include lower-level
headers instead to reduce compilation time.
Linking
- For static linking:
add /usr/lib/skalibs, or wherever you installed
your .a files, to your library directory list.
- For dynamic linking:
make sure the place you installed the libskarnet.so shared library in
is in your shared library directory list; the default is /lib,
which is normally browsed by default by your build-time and run-time linker.
If you are using another place than the default (for instance, if you are
using the slashpackage convention), make sure to
edit your ld.so.conf file so your linker can find this place, and
to run ldconfig if needed.
- Take note of the place where your sysdeps directory has been
installed: by default, it's /usr/lib/skalibs/sysdeps. Let's call
it $sysdeps.
- Link with -lskarnet. If you are using socket functions, you
will also need to link with `cat $sysdeps/socket.lib`. If you are using
time functions such as tain_now(), you will also need to link with
`cat $sysdeps/sysclock.lib`. Also
`cat $sysdeps/spawn.lib`` for posix_spawn() functions,
timer.lib for timer_create functions, and so on. This
is, unfortunately, the only way to work with all the idiosyncrasies and
whimsies of various libcs; only
musl does the sensible thing and
exports all its functions from libc.a and libc.so,
without requiring any additional linker command line flags.
The skarnet library as a whole is big (945k for libskarnet.a and
179k for libskarnet.so.2.4.0.0 on x86_64-linux), but the utmost care has been
given to separate functions so that linkers never pull in any more than they
need. Linking against the static version of libskarnet actually produces
very small executables, and if your libc is suited for that, since skalibs
only uses very basic libc interfaces, it is very possible to produce small
static binaries - in many cases, a static program written with skalibs APIs
will be an order of magnitude smaller than the equivalent program written
using libc's or other utility libraries' APIs.
Programming
The skalibs source code is divided into several subdirectories, each
containing a logical unit of code implementing independent functions.
- libposixplz: workarounds for some POSIX
deficiencies and for systems that don't quite implement POSIX
- libstddjb: basic C API for system programming
- libdatastruct: efficient C implementation of
basic data structures like sets or trees
- libstdcrypto: a few crypto primitives
- librandom: cryptographically secure random or
pseudorandom number generation
- libunixonacid: more advanced C/Unix APIs,
mainly for safe asynchronous interprocess communication
skalibs-2.14.2.0/doc/libstdcrypto/ 0000775 0000000 0000000 00000000000 14630613211 0016652 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/doc/libstdcrypto/index.html 0000664 0000000 0000000 00000007706 14630613211 0020661 0 ustar 00root root 0000000 0000000
skalibs: the stdcrypto library interface
libskarnet
skalibs
Software
skarnet.org
The stdcrypto library interface
stdcrypto is a small collection of standard,
public-domain cryptographic primitives. Currently, the following
operations are provided:
- rc4
- md5
- sha1
- sha256
- sha512
Please bear in mind that rc4 and md5 are broken, and that sha1 is about to be.
Do not use them in security-critical applications.
Compiling
- Use #include <skalibs/stdcrypto.h>
Programming
You should refer to the skalibs/stdcrypto.h header and included headers
for the exact function prototypes.
RC4
RC4Schedule ctx ;
unsigned char const *key ;
size_t keylen ;
unsigned char const *in ;
unsigned char *out ;
size_t len ;
rc4_init(&ctx, key, keylen) ;
rc4(&ctx, in, out, len) ;
- rc4_init() initializes a RC4Schedule structure with a key key,
of length keylen. It then computes and throws away the first RC4_THROWAWAY
bytes, usually 100
- rc4() encrypts len bytes of in with the RC4 flow, and
stores the results into out
MD5
MD5Schedule ctx ;
char const *message ;
size_t messagelen ;
char digest[16] ;
md5_init(&ctx) ;
md5_update(&ctx, message, messagelen) ;
md5_final(&ctx, digest) ;
- md5_init() prepares a MD5Schedule structure for computation
- md5_update() adds message to the message to be digested
- md5_final() computes the digest
SHA1
SHA1Schedule ctx ;
char const *message ;
size_t messagelen ;
unsigned char digest[20] ;
sha1_init(&ctx) ;
sha1_update(&ctx, message, messagelen) ;
sha1_final(&ctx, digest) ;
- sha1_init() prepares a SHA1Schedule structure for computation
- sha1_update() adds message to the message to be digested
- sha1_final() computes the digest
SHA256
SHA256Schedule ctx ;
char const *message ;
size_t messagelen ;
char digest[32] ;
sha256_init(&ctx) ;
sha256_update(&ctx, message, messagelen) ;
sha256_final(&ctx, digest) ;
- sha256_init() prepares a SHA256Schedule structure for computation
- sha256_update() adds message to the message to be digested
- sha256_final() computes the digest
SHA512
SHA512Schedule ctx ;
char const *message ;
size_t messagelen ;
char digest[64] ;
sha512_init(&ctx) ;
sha512_update(&ctx, message, messagelen) ;
sha512_final(&ctx, digest) ;
- sha512_init() prepares a SHA512Schedule structure for computation
- sha512_update() adds message to the message to be digested
- sha512_final() computes the digest
skalibs-2.14.2.0/doc/libstddjb/ 0000775 0000000 0000000 00000000000 14630613211 0016071 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/doc/libstddjb/alarm.html 0000664 0000000 0000000 00000006602 14630613211 0020057 0 ustar 00root root 0000000 0000000
skalibs: the alarm library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The alarm library interface
The following functions are declared in the skalibs/alarm.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
alarm is a set of primitives to provide the same functionality as
alarm(),
but with sub-second precision.
Depending on the functionality the underlying system provides,
the precision can be 1 nanosecond (implementation via
timer_settime(),
1 microsecond (implementation via
setitimer(),
or 1 second (fallback implementation with
alarm()
when nothing better can be found).
Functions
int alarm_milliseconds (unsigned int n)
Sets a fuse that will raise a SIGALRM after n milliseconds.
If n is 0, the SIGALRM will be raised instantly.
Returns 1 on success and 0 (and sets errno) on failure.
int alarm_timeout (tain const *tto)
Sets a fuse that will raise a SIGALRM after some amount
of time has passed. The amount of time is described in
*tto, which is a relative
tain, i.e. a structure containing
a relative TAIN64 time.
Returns 1 on success and 0 (and sets errno) on failure.
int alarm_deadline (tain const *deadline)
Sets a fuse that will raise a SIGALRM when the clock reaches
*deadline, which is an absolute time expressed in
TAI64N format.
Returns 1 on success and 0 (and sets errno) on failure.
void alarm_disable (void)
Cancels a previously set fuse. No SIGALRM will be raised.
Notes
- Asynchronous programming via signals is bad. The best way
to handle situations where something happens after some time has
elapsed is to use an asynchronous loop primitive such as
iopause(). The problem is that some
external libraries only provide synchronous functions (including
functions talking to the network!) with no obvious way to set a
timeout. The alarm_* set of functions is meant to work
around that, with hopefully better granularity than the POSIX
alarm() function.
skalibs-2.14.2.0/doc/libstddjb/alloc.html 0000664 0000000 0000000 00000007430 14630613211 0020055 0 ustar 00root root 0000000 0000000
skalibs: the alloc library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The alloc library interface
The following functions are declared in the skalibs/alloc.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
alloc is the skalibs heap memory manager. It's actually a
wrapper for the
malloc()
series of functions; it unifies a few system-dependent malloc
behaviours. It's also the API to implement and preload if for some
reason you need to plug in your own allocator: replacing alloc()
is much easier than replacing malloc() safely.
As a general rule, you should not be using the alloc
interface directly. Allocating and freeing individual cells
in the heap is a recipe for heap fragmentation, as well as cell
tracking nightmares leading to memory leaks. You should use
the higher-level stralloc and
genalloc interfaces to handle dynamic
arrays of objects.
C's lack of automatic management of heap memory is not a drawback: it's
a feature of the language. It allows for code that is one or two orders
of magnitude faster than the equivalent in a higher-level language,
and very low on resources consumption. However, it requires more attention
from the programmer. Good APIs can significantly reduce the difficulty of
keeping track of every heap-allocated cell, and every smart programmer
should favor them over basic interfaces like malloc().
alloc is used internally by skalibs to implement
stralloc, and nowhere else.
Functions
void *alloc (size_t len)
Allocates a block of len bytes in the heap and returns a pointer
to the start of the block (or NULL if it failed).
If len is 0, the function returns a unique pointer that
cannot be written to, but that is not null. Note that this is
different from the required C99 behaviour for malloc().
void alloc_free (void *p)
Frees the block of heap memory pointed to by p.
int alloc_realloc (char **p, size_t newlen)
Redimension the block of heap memory pointed to by *p to
newlen bytes. The block may have to be moved, in which case
*p will be modified. Normally returns 1; if an error occurred,
returns 0 and sets errno, and neither *p nor its contents are
modified. Note that p must be a pointer to a char *,
because polymorphism isn't possible here (for reasons that have to do
with pointer representation in C).
int alloc_re (char **p, size_t oldlen, size_t newlen)
Legacy interface for reallocation. It works like alloc_realloc,
except that the original block length must be provided as the oldlen
argument.
skalibs-2.14.2.0/doc/libstddjb/allreadwrite.html 0000664 0000000 0000000 00000016571 14630613211 0021450 0 ustar 00root root 0000000 0000000
skalibs: the allreadwrite library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The allreadwrite library interface
The following functions are declared in the skalibs/allreadwrite.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
allreadwrite is a set of IO function helpers. It's the
basis for safe reading and writing, either in blocking or in
non-blocking mode. The buffer interface
relies heavily on allreadwrite.
Unless the IO you need is very simple, you generally should not
be using the allreadwrite functions directly; you should
use higher-level APIs such as buffer and
bufalloc.
Function types
typedef ssize_t io_func (int fd, char *buf, size_t len)
This is the simplified type of IO functions such as
read()
and
write().
typedef ssize_t iov_func (int fd, struct iovec const *v, unsigned int vlen)
This is the simplified type of IO functions such as
readv()
and
writev(),
where the content to perform IO on is specified as a
scatter/gather array of vlen
elements instead of a single string.
typedef size_t allio_func (int fd, char *buf, size_t len)
This is the type of an IO operation that expects all of its
len bytes to be sent or received, and that will loop around a
lower-level IO function until either len bytes have been
transmitted or an error has occurred. The return value is the actual
number of transmitted bytes; if this value is lesser than len,
it means that an error has occurred and errno is set.
Functions
ssize_t sanitize_read (ssize_t r)
Reading functions such as read() and fd_read return
a positive number when they succeed, -1 when they fail, and 0 when they
read an EOF. No data available on the descriptor when reading in
non-blocking mode is treated as a failure: -1 EWOULDBLOCK. But sometimes
(namely, in asynchronous IO loops) it's preferrable to handle EOF as an
exception condition and EWOULDBLOCK as a normal condition.
sanitize_read(), when applied to the result of a basic reading
function, returns 0 if r is -1 and errno is EWOULDBLOCK (or
EAGAIN). If r is zero, it returns -1 EPIPE. Else it returns r.
(No system reading function can ever set errno to EPIPE, and the
semantics are appropriate, so EPIPE is a good candidate to signal EOF
on reading.)
ssize_t unsanitize_read (ssize_t r)
Returns the inverse of sanitize_read
.
size_t allreadwrite (io_func *f, int fd, char *s, size_t len)
*f must be a basic reading or writing function such as
fd_read or fd_write. allreadwrite() performs
*f on fd, s and len until len
bytes have been read or written, or until an error occurs. It returns the
total number of handled bytes, and sets errno if this number is not
len. allreadwrite may block if fd is in
blocking mode; if fd is in non-blocking mode, it might
set errno to EWOULDBLOCK or EAGAIN.
size_t allreadwritev (iov_func *f, int fd, struct iovec const *v, unsigned int vlen)
Like allreadwrite
but the content to perform IO on is specified as a
scatter/gather array of vlen
elements instead of a single string.
ssize_t fd_read (int fd, char *s, size_t len)
Safe wrapper around the
read()
function.
ssize_t fd_write (int fd, char const *s, size_t len)
Safe wrapper around the
write()
function.
ssize_t fd_readv (int fd, struct iovec const *v, unsigned int vlen)
Safe wrapper around the
readv()
function.
ssize_t fd_writev (int fd, struct iovec const *v, unsigned int vlen)
Safe wrapper around the
writev()
function.
ssize_t fd_recv (int fd, char *s, size_t len, unsigned int flags)
Safe wrapper around the
recv()
function.
ssize_t fd_send (int fd, char const *s, size_t len, unsigned int flags)
Safe wrapper around the
send()
function.
size_t allread (int fd, char *s, size_t len)
Equivalent to allreadwrite(&fd_read, fd, s, len)
: attempts
to read len bytes from fd into s, looping around
fd_read() if necessary, until either len bytes are read or
an error occurs.
size_t allwrite (int fd, char const *s, size_t len)
Equivalent to allreadwrite((io_func *)&fd_write, fd, s, len)
:
attempts to write len bytes from s to fd, looping
around fd_write() if necessary, until either len bytes are
written or an error occurs.
size_t allreadv (int fd, struct iovec *v, unsigned int vlen)
Like allread, but the bytes from fd are read into a
scatter/gather array of vlen
elements instead of a single string.
size_t allwritev (int fd, struct iovec const *v, unsigned int vlen)
Like allwrite, but the content to write is taken from a
scatter/gather array of vlen
elements instead of a single string.
skalibs-2.14.2.0/doc/libstddjb/bitarray.html 0000664 0000000 0000000 00000012031 14630613211 0020571 0 ustar 00root root 0000000 0000000
skalibs: the bitarray library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The bitarray library interface
The following functions are declared in the skalibs/bitarray.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
bitarray is a set of primitives to operate efficiently on
large bitfields.
A bitfield is represented by a pre-allocated block of
unsigned char; bitarray does not care if that
block has been BSS-, stack- or heap-allocated. Bitfields that
can grow in size should be stored in a
stralloc.
Bits in a bitfield of length n are numbered from 0 to n-1.
Functions
size_t bitarray_div8 (size_t n)
Returns the minimum number of bytes needed to store a field of n bits.
void bitarray_clearsetn (unsigned char *s, size_t start, size_t len, int h)
Sets (if h is nonzero) or clears (if h is zero)
len bits in field s, starting at bit start.
void bitarray_clearn (unsigned char *s, size_t start, size_t len)
Clears len bits in field s, starting at bit start.
void bitarray_setn (unsigned char *s, size_t start, size_t len)
Sets len bits in field s, starting at bit start.
int bitarray_peek (unsigned char const *s, size_t n)
Returns the value of the nth bit in field s.
void bitarray_poke (unsigned char *s, size_t n, int h)
Sets (if h is nonzero) or clears (if h is zero)
the nth bit in field s.
void bitarray_clear (unsigned char *s, size_t n)
Clears the nth bit in field s.
void bitarray_set (unsigned char *s, size_t n)
Sets the nth bit in field s.
int bitarray_testandpoke (unsigned char *s, size_t n, int h)
Sets (if h is nonzero) or clears (if h is zero)
the nth bit in field s,
and returns the previous value of that bit.
int bitarray_testandclear (unsigned char *s, size_t n)
Clear the nth bit in field s,
and returns the previous value of that bit.
int bitarray_testandset (unsigned char *s, size_t n)
Sets the nth bit in field s,
and returns the previous value of that bit.
size_t bitarray_first (unsigned char const *s, size_t len, int h)
Returns the number of the first set (if h is nonzero) or clear
(if h is zero) bit in s, len being
the total number of bits. If all bits in s are the negation of
h, then len is returned.
size_t bitarray_firstclear (unsigned char const *s, size_t len)
Returns the number of the first clear bit in s, len being
the total number of bits. If all bits in s are set, len is returned.
size_t bitarray_firstclear_skip (unsigned char const *s, size_t len, size_t skip)
Like bitarray_firstclear, but the first skip bits are
ignored: the function cannot return less than skip. It is a
programming error if skip > len.
size_t bitarray_firstset (unsigned char const *s, size_t len)
Returns the number of the first set bit in s, len being
the total number of bits. If all bits in s are clear, len is returned.
size_t bitarray_firstset_skip (unsigned char const *s, size_t len, size_t skip)
Like bitarray_firstset, but the first skip bits are
ignored: the function cannot return less than skip. It is a
programming error if skip > len.
size_t bitarray_countones (unsigned char const *s, size_t len)
Returns the number of set bits in s, len being the
total number of bits being tested.
skalibs-2.14.2.0/doc/libstddjb/bufalloc.html 0000664 0000000 0000000 00000001575 14630613211 0020556 0 ustar 00root root 0000000 0000000
skalibs: the bufalloc header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/bufalloc.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/buffer.html 0000664 0000000 0000000 00000001560 14630613211 0020232 0 ustar 00root root 0000000 0000000
skalibs: the buffer header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/buffer.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/bytestr.html 0000664 0000000 0000000 00000020412 14630613211 0020452 0 ustar 00root root 0000000 0000000
skalibs: the bytestr header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/bytestr.h header
The following functions are declared in the skalibs/bytestr.h header
and implemented in the libskarnet.a or libskarnet.so library.
Purpose
These functions handle arrays of bytes (strings). They are similar to their
counterparts from the standard
string.h
header, but they return indices instead of pointers.
byte_* functions and macros work with strings that are not
necessarily null-terminated, but require sizes of the strings to be passed.
On the contary, str_* family accepts null-terminated strings.
case_* functions and macros are like their str_* counterparts,
but are case-insensitive.
Functions
size_t byte_chr (char const *s, size_t n, int c)
Looks for the first occurrence of byte c in array s of size
n. Returns its index, or n if there is no such byte in
s.
size_t byte_rchr (char const *s, size_t n, int c)
Looks for the last occurrence of byte c in array s of size
n. Returns its index, or n if there is no such byte in
s.
size_t byte_in (char const *s, size_t n, char const *sep, size_t len)
Looks for the first occurrence of any byte from array sep of size
len in array s of size n. Returns the index of such
an occurrence, or n if there are no bytes from sep in s.
size_t byte_count (char const *s, size_t len, char b)
Returns the amount of occurrences of byte b in string s of
size len.
size_t byte_search (char const *haystack, size_t hlen, char const *needle, size_t nlen)
Looks for the first occurrence of string needle of size nlen in
string haystack of size hlen. Returns the index of the first
byte of that occurrence, or hlen + 1 - nlen if needle cannot
be found in haystack.
void byte_zzero (char *s, size_t n)
Zeroes n bytes of memory beginning with address s. Special
measures are taken to prevent the compiler from optimizing out the call:
- If the explicit_bzero function is present on the system, it is
used. Calls to this function are guaranteed not to be removed by the compiler.
- Otherwise, byte_zzero performs a normal memset followed
by a special no-op function with a weak alias in order to trick the compiler.
This is useful for erasing sensitive data before returning from some
function, typically in cryptography settings. Compilers usually remove
memset calls since these have no observable effect for the rest of the code.
size_t str_chr (char const *s, int c)
Looks for the first occurrence of byte c in null-terminated string
s. Returns the index of this occurrence, or the length of the string
if there is no such byte in s.
size_t str_rchr (char const *s, int c)
Looks for the last occurrence of byte c in null-terminated string
s. Returns the index of this occurrence, or the length of the string
if there is no such byte in s.
int str_start (char const *s, char const *t)
Returns 1 if (null-terminated) string s begins with (null-terminated)
string t, and 0 otherwise.
size_t str_strn (char const *haystack, size_t hlen, char const *needle, size_t nlen)
Looks for the first occurrence of string needle of size nlen in
string haystack of size hlen. Returns the index of the first
character in this occurrence, or hlen if needle is not present
in haystack.
void case_lowers (char *s)
Turns all capital letters in null-terminated string s into lowercase
letters. This function only works with ASCII symbols.
void case_lowerb (char *s, size_t len)
Turns all capital letters in string s of size len into
lowercase letters. This function only works with ASCII symbols.
void case_uppers (char *s)
Turns all lowercase letters in null-terminated string s into capital
letters. This function only works with ASCII symbols.
void case_upperb (char *s, size_t len)
Turns all lowercase letters in string s of size len into
capital letters. This function only works with ASCII symbols.
int case_startb (char const *s, size_t slen, char const *t)
Returns 1 if string s of size slen begins with
null-terminated string t, ignoring case, and 0 otherwise.
size_t case_str (char const *haystack, char const *needle)
Looks for the first occurrence of null-terminated string needle in
null-terminated string haystack, ignoring case while comparing
bytes. Returns the index of the first byte of this occurrence or the length of
haystack if needle is not presented in haystack.
Macros
These macros are either wrappers around functions described above or C standard
library functions. They only exist for compatibility purposes. Programmers are
expected to use the standard functions directly: in the rare case where a
standard function interface is good, it is best to use it.
byte_copy(to, n, from)
byte_copyr(to, n, from)
Same as memmove(to, from, n).
byte_diff(a, n, b)
Same as memcmp(a, b, n).
byte_zero(p, n)
Same as memset(p, 0 ,n). There is a caveat in zeroing memory range with
memset — compiler may omit the call to memset if it is
called in the end of function. If you need to destroy sensitive data, use
byte_zzero instead.
str_len(s)
Same as strlen(s).
str_nlen(s)
Same as strnlen(s).
str_diff(s1, s2)
Same as strcmp(s1, s2).
str_diffn(s1, s2, n)
Same as strncmp(s1, s2, n).
str_copy(to, from)
Copies null-terminated string from, including null terminator, to
buffer to. Returns the length of the string.
case_diffs(s1, s2)
Same as strcasecmp(s1, s2).
case_diffn(s1, s2, n)
Same as strcasecmp(s1, s2, n).
byte_equal(s, n, t)
Same as !memcmp(s, t, n).
str_diffb(a, n, b)
Same as strncmp(a, b, n).
str_equal(s, t)
Same as !strcmp(s, t).
case_diffb(a, n, b)
Same as strncasecmp(a, b, n).
case_equals(a, b)
Same as !strcasecmp(a, b).
case_equalb(a, n, b)
Same as !strncasecmp(a, b, n).
case_starts(s, t)
Same as case_startb(s, strlen(s), t).
skalibs-2.14.2.0/doc/libstddjb/cdb.html 0000664 0000000 0000000 00000012576 14630613211 0017522 0 ustar 00root root 0000000 0000000
skalibs: the cdb header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/cdb.h header
General information
A cdb, for constant database,
is an immutable key-value store. In skalibs, a cdb is built once via the
cdbmake primitives and stored on disk; the cdb
primitives, documented here, are about accessing the information.
Data structures
- A cdb is an opaque structure, that must be initialized to CDB_ZERO when declared.
- A cdb_data is a structure that is passed by address to cdb-reading primitives, which fill
it with record information. It contains (at least) two fields:
- s, a char const *, which holds a pointer to the record; the const indicates
that a cdb is read-only, you cannot write to the record even when you have a pointer to it.
- len, a uint32_t, which holds the record length. It can be zero (records can be
empty). A cdb must fit into 4 GB, so record lengths always fit in 32 bits.
Pointers returned in a cdb_data are only valid while the cdb is mapped.
Make sure to copy the information before calling cdb_free().
- A cdb_find_state is an opaque structure, that should be initialized to CDB_FIND_STATE_ZERO
when declared. It is passed by address to cdb_findnext, to maintain position state when looking for
all the data records under one key.
Macros and functions
Starting and ending
int cdb_init (cdb *c, char const *file)
Maps the file named file to the cdb pointed to by c.
*c must be CDB_ZERO before the call. The function returns a
positive integer if it succeeds, and 0 (and sets errno) if it fails.
int cdb_init_at (cdb *c, int dfd, char const *file)
Like cdb_init, but file is interpreted relative to the
file descriptor dfd, which must be open on a directory.
int cdb_init_fromfd (cdb *c, int fd)
Like cdb_init, but the database file is already open and
readable via then file descriptor fd.
void cdb_free (cdb *c)
Frees the resources used by a cdb mapping. After the call, c
is immediately reusable by another cdb_init function.
cdb lookup
Single record lookup
int cdb_find (cdb const *c, cdb_data *data, char const *key, uint32_t klen)
Looks up key key of length klen in the cdb *c. The function returns
-1 if *c isn't a valid cdb; 0 if no record can be found for the key; and 1 on success, in
which case the corresponding value is returned in *data: data→s
points to the start of the value, and data→len contains the length of
the value. Only the first record with the same key can be obtained this way.
Multiple record lookup
void cdb_findstart (cdb_find_state *state)
Initializes state so that the next invocation of cdb_findnext()
finds the first record for a given key.
int cdb_findnext (cdb const *c, cdb_data *data, char const *key, uint32_t klen, cdb_find_state *state)
Like cdb_find, except that the extra argument state memorizes
internal cdb lookup data, so the next cdb_findnext() invocation with the
same key, klen and state will yield the next record
for the key. cdb_findnext returns 0 when all the records for the key have
been exhausted.
cdb enumeration
void cdb_traverse_init (uint32_t *pos)
Initializes *pos so that the next invocation of cdb_traverse_next
finds the first entry in the cdb. *pos can also be initialized to the
macro CDB_TRAVERSE_INIT() instead.
int cdb_traverse_next (cdb const *c, cdb_data *key, cdb_data *data, uint32_t *pos)
Gets the next entry in the cdb *c. On success, the key is stored in *key and the
data is stored in *data. *pos* is an opaque integer storing internal
state; it is automatically updated so that the next invocation of cdb_traverse_next()
yields the next entry. The function returns -1 if *c is not a valid cdb or *pos
is not valid state, 1 on success, and 0 if no entry can be found, i.e. the end of the cdb has
been reached.
skalibs-2.14.2.0/doc/libstddjb/cdbmake.html 0000664 0000000 0000000 00000001616 14630613211 0020351 0 ustar 00root root 0000000 0000000
skalibs: the cdbmake header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/cdbmake.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/cspawn.html 0000664 0000000 0000000 00000015226 14630613211 0020260 0 ustar 00root root 0000000 0000000
skalibs: the cspawn library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The cspawn library interface
The following functions are declared in the skalibs/cspawn.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
cspawn is a unifier API to spawn child processes with
posix_spawn()
as a backend if supported by the system, falling back on
fork() +
execve()
otherwise.
Functions
Primitive
pid_t cspawn (char const *file, char const *const *argv, char const *const *envp, uint32_t flags, cspawn_fileaction const *fa, size_t n)
Forks and execs a child as with exec_ae(file, argv, envp).
Returns 0 if it fails, and the pid of the child if it succeeds.
Before execing, the following operations are performed in the child:
- If flags contains (the or-able value) CSPAWN_FLAGS_SIGBLOCKNONE,
the child's signal processing mask is reset - no signal will be blocked.
- Alternatively, if flags contains (the or-able value) CSPAWN_FLAGS_SELFPIPE_FINISH,
the child's signal state is reset to what it was before the invocation of
selfpipe_init() in the parent.
- The file actions described in the array fa, which must have at least n elements,
are processed in order. For every i from 0 to n-1:
- if fa[i].type is CSPAWN_FA_CLOSE, then file descriptor fa[i].x.fd is closed
- else if fa[i].type is CSPAWN_FA_MOVE, then file descriptor fa[i].x.fd2[1]
is moved to fa[i].x.fd2[0]
- else if fa[i].type is CSPAWN_FA_COPY, then file descriptor fa[i].x.fd2[1]
is copied to fa[i].x.fd2[0], as with dup2(fa[i].x.fd2[1], fa[i].x.fd2[0])
- else if fa[i].type is CSPAWN_FA_OPEN, then file fa[i].x.openinfo.file is
opened with flags fa[i].x.openinfo.oflag and mode fa[i].x.openinfo.mode, and file
descriptor fa[i].x.openinfo.fd points to it.
Higher level interfaces
pid_t child_spawn1_pipe (char const *file, char const *const *argv, char const *const *envp, int *fd, int w)
Spawns file as with cspawn() with a flags value of CSPAWN_FLAGS_SIGBLOCKNONE;
a pipe is created between the child's
stdin (if w is 0) or stdout (if w is nonzero) and the parent.
The parent's end of the pipe will be stored in *fd.
pid_t child_spawn1_socket (char const *file, char const *const *argv, char const *const *envp, int *fd)
Like child_spawn1, except that a socket, not a pipe is created between the parent
and the child. Both the child's stdin and stdout point to the socket; the parent has
its end of the socket available in *fd.
pid_t child_spawn2 (char const *file, char const *const *argv, char const *const *envp, int *fds)
Two pipes are created between the
parent and the child. fds must point to an array of 2 ints: this
array is read as well as written by child_spawn2(). On function
call, the numbers in fds must describe what fds should be used
in the child to contain the communication pipes (for instance, if the child
will read from its parent on stdin and write to its parent on stdout, fds
must contain 0 and 1). On function return, fds contains the
descriptors for the pipes that read from / write to the child.
pid_t child_spawn3 (char const *file, char const *const *argv, char const *const *envp, int *fds)
Three pipes are created between the
parent and the child. fds must point to an array of 3 ints: this
array is read as well as written by child_spawn2(). On function
call, the numbers in fds[0] and fds[1] must describe what fds should be used
in the child to read from (resp. write to) the parent.
On function return, fds contains the
descriptors for the pipes that read from / write to the child. fds[2] is
the reading end of a pipe; the writing end is present in the child, and its number
is available as the value of the SKALIBS_CHILD_SPAWN_FDS environment variable.
pid_t child_spawn (char const *file, char const *const *argv, char const *const *envp, int *fds, unsigned int nfds)
More generic spawning function. fds must point to an array of at least nfds ints;
file descriptors reading from or writing to the child will be stored there. The function returns
0 on failure or the pid of the child on success.
- If nfds is 0, then the function behaves like cspawn with a flags value
of CSPAWN_FLAGS_SIGBLOCKNONE.
- If nfds is 1 or more, then fds will contain pipes between the
child and the parent. The parent will read on even-numbered ones
and write on odd-numbered ones. The child will read on fds[0], write on fds[1],
then any additional fds are available to it in the SKALIBS_CHILD_SPAWN_FDS environment
variable as a comma-separated list of integers.
pid_t gcspawn (char const *file, char const *const *argv, char const *const *envp, uint32_t flags, cspawn_fileaction const *fa, size_t n)
Like cspawn, but argv will be running as a grandchild of the
current process. The function forks once, invokes cspawn from the child,
and the child exits after passing the grandchild's pid to the parent.
skalibs-2.14.2.0/doc/libstddjb/direntry.html 0000664 0000000 0000000 00000001612 14630613211 0020617 0 ustar 00root root 0000000 0000000
skalibs: the direntry header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/direntry.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/djbtime.html 0000664 0000000 0000000 00000014653 14630613211 0020406 0 ustar 00root root 0000000 0000000
skalibs: the djbtime library interface
libstddjb
skalibs
skalibs
Software
skarnet.org
The djbtime library interface
The following functions are declared in the skalibs/djbtime.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
djbtime is a set of functions to convert
tai and tain structures, and
TAI time, from and to
other time formats and user-friendly representations.
Data structures
- TAI time with 1-second precision is represented as a tai.
- TAI time with more precision is represented as a tain.
- UTC time is represented as an unsigned 64-bit integer
equal to 2^62 added to the number of seconds since the Epoch. It's a trivial extension of
the standard 32-bit Unix time that will expire in 2038.
- Broken-down GMT or local time with more than a 1-second precision is stored in a
localtmn structure, containing a struct tm tm
field and an unsigned long nano field.
Functions
UTC
int utc_from_tai (uint64_t *u, tai const *t)
Converts the absolute TAI64 time in *t to an UTC time, stored in
*u as an unsigned 64-bit integer. *u is actually 2^62
plus the number of seconds since the Epoch.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs. If *t happens to hit a leap second, the function
returns 2 instead of 1.
int tai_from_utc (tai *t, uint64_t u)
Converts the UTC time in u, stored
as an unsigned 64-bit integer (2^62 plus the number of seconds since
the Epoch), to a TAI64 time in *t.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs.
NTP
int ntp_from_tain (uint64_t *ntp, tain const *a)
Converts the absolute TAI64N time in *a to a 64-bit NTP timestamp,
stored in *ntp. The higher 32 bits of *ntp represent a number
of seconds ; the lower 32 bits are the fractional part of the timestamp.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs (for instance:
*a cannot be represented in the valid NTP range).
int tain_from_ntp (tain *a, uint64_t ntp)
Converts the NTP timestamp in ntp to a TAI64N time in
*a.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs.
Local time
The following functions convert time between an internal representation
and a broken-down struct tm. Conversions are performed to
get leap seconds handling right, depending on whether skalibs has been
configured for a TAI-10 or a UTC system clock, and on whether the current
timezone takes leap seconds into account or not.
int localtm_from_tai (struct tm *tm, tai const *t, int lo)
Converts the TAI time in *t to broken-down GMT (if
lo is zero) or local (if lo is nonzero) time in
*tm.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs (for instance: *t cannot be validly represented
in a struct tm). If *t happens to hit a leap second, the
value of tm→tm_sec is 60.
int localtm_from_utc (struct tm *tm, uint64_t u, int lo)
Converts the UTC time in u to broken-down GMT (if
lo is zero) or local (if lo is nonzero) time in
*tm.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs (for instance: u cannot be validly represented
in a struct tm).
int localtm_from_sysclock (struct tm *tm, uint64_t u, int lo)
Converts the time in u to broken-down GMT (if
lo is zero) or local (if lo is nonzero) time in
*tm. u will be interpreted as a TAI-10 value (with
--enable-tai-clock) or as a UTC value (without --enable-tai-clock).
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs (for instance: u cannot be validly represented
in a struct tm).
int utc_from_localtm (uint64_t *u, struct tm const *tm)
Converts the broken-down local time in *tm to an UTC value
in *u.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs.
int tai_from_localtm (tai *t, struct tm const *tm)
Converts the broken-down local time in *tm to a TAI value
in *t.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs.
int sysclock_from_localtm (uint64_t *u, struct tm const *tm)
Converts the broken-down local time in *tm to a value
in *u - either TAI-10 or UTC depending on your system clock.
The function returns 1 if it succeeds, or 0 (and sets errno) if an
error occurs.
The following functions use the localtmn type to hold both
a broken-down time and a nanosecond count:
typedef struct localtmn_s localtmn, *localtmn_ref ;
struct localtmn_s
{
struct tm tm ;
uint32_t nano ;
} ;
The prototypes are self-explaining:
int localtmn_from_tain (localtmn *tmn, tain const *a, int lo) ;
int tain_from_localtmn (tain *a, localtmn const *tmn) ;
int localtmn_from_sysclock (localtmn *tmn, tain const *a, int lo) ;
int sysclock_from_localtmn (tain *a, localtmn const *tmn) ;
skalibs-2.14.2.0/doc/libstddjb/djbunix.html 0000664 0000000 0000000 00000064331 14630613211 0020431 0 ustar 00root root 0000000 0000000
skalibs: the djbunix library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The djbunix library interface
The following functions are declared in the skalibs/djbunix.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
djbunix is an alternative API to management of basic Unix
concepts: file descriptors, files, environment, and so on. It is a
rather chaotic mix of safe wrappers
around Unix system calls, better reimplementations of standard libc
functionalities, and higher-level manipulations of Unix concepts.
Understanding djbunix is essential to understanding any piece
of code depending on skalibs.
Functions
Basic fd operations
int coe (int fd)
Sets the close-on-exec flag on fd.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int uncoe (int fd)
Clears the close-on-exec flag on fd.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int ndelay_on (int fd)
Sets the O_NONBLOCK flag on fd: sets it to non-blocking mode.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int ndelay_off (int fd)
Clears the O_NONBLOCK flag on fd: sets it to blocking mode.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int pipenb (int *p)
Like
pipe(),
but both ends of the created pipe are in non-blocking mode.
int pipecoe (int *p)
Like
pipe(),
but both ends of the created pipe are close-on-exec.
int pipenbcoe (int *p)
Like
pipe(),
but both ends of the created pipe are in non-blocking mode and close-on-exec.
int fd_copy (int to, int from)
Copies the open fd from to number to. If to
was already open, it is closed before the copy.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int fd_copy2 (int to1, int from1, int to2, int from2)
Copies the open fd from1 to number to2. Also copies
from2 to to2 at the same time.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int fd_move (int to, int from)
Moves the open fd from to number to. If to
was already open, it is closed before the move.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int fd_move2 (int to1, int from1, int to2, int from2)
Moves the open fd from to number to. Also moves
from2 to to2 at the same time. This is useful for instance
when you want to swap two fds: fd_move2 will handle the situation
correctly.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
void fd_close (int fd)
Closes fd.
This is a safe wrapper around
close().
int fd_chmod (int fd, unsigned int mode)
Safe wrapper around
fchmod().
int fd_chown (int fd, uid_t uid, gid_t gid)
Safe wrapper around
fchown().
This function requires root privileges.
int fd_sync (int fd)
Safe wrapper around
fsync().
int fd_chdir (int fd)
Safe wrapper around
fchdir().
off_t fd_cat (int from, int to)
Synchronously copies data from fd from to fd to,
until it encounters EOF or an error. Returns -1 (and sets errno) if
it fails; returns the number of transmitted bytes if it gets an EOF.
When the underlying OS allows it, zero-copy transmission is
performed. Currently, the following zero-copy implementations are
supported:
off_t fd_catn (int from, int to, off_t n)
Synchronously copies at most n bytes from fd from to fd to.
Returns the total number of transmitted bytes; sets errno if this number
is lesser than n. EOF is reported as EPIPE. See above for zero-copy
transmission; zero-copy transmission is not attempted for less than 64k of data.
int fd_ensure_open (int fd, int w)
If fd is not open, opens it to /dev/null,
for reading if w is zero, and for writing otherwise.
Returns 1 if it succeeds and 0 if it fails.
int fd_sanitize (void)
Ensures stdin, stdout and stderr are open. If one of those
file descriptors was closed, it now points to /dev/null.
Returns 1 if it succeeds and 0 if it fails.
void fd_shutdown (int fd, int w)
Shuts down socket fd, for reading if w is zero,
and for writing otherwise. Does not return an error code; does
not modify errno. This is just a call to
shutdown()
with errno saved, used essentially to isolate application code from
sys/socket.h which is a portability nightmare.
int fd_lock (int fd, int w, int nb)
Gets an advisory lock on fd: shared if w is
zero, exclusive otherwise. fd must point to
a regular file, open for writing or reading depending on whether
you want an exclusive lock or not. If nb is zero, the
function blocks until the lock can be obtained; otherwise it
returns 0 immediately. On success, the function returns 1 ; it
returns 0 if it cannot take the lock, or -1 (and sets errno) if
an error occurs.
void fd_unlock (int fd)
Releases a previously held lock on fd.
int fd_islocked (int fd)
Returns 1 if a lock is currently held on fd, 0 otherwise.
Returns -1 (and sets errno) if an error occurs.
int open2 (char const *file, unsigned int flags)
Safe wrapper around
open()
when it takes 2 arguments.
int open3 (char const *file, unsigned int flags, unsigned int mode)
Safe wrapper around
open()
when it takes 3 arguments.
int open_read (char const *file)
Opens file in read-only, non-blocking mode.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int openc_read (char const *file)
Opens file in read-only, non-blocking mode, close-on-exec.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int openb_read (char const *file)
Opens file in read-only, blocking mode.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int openbc_read (char const *file)
Opens file in read-only, blocking mode, close-on-exec.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int open_readb (char const *file)
Opens file in read-only, blocking mode.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
This call does not block. The
open()
system call is actually performed with the O_NONBLOCK option, and blocking mode
is set afterwards; this behaviour allows for more transparent interactions
with FIFOs.
int openc_readb (char const *file)
Same as above, but the file is opened close-on-exec.
int open_excl (char const *file)
Opens file in write-only, non-blocking mode, with the
additional O_EXCL and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int openc_excl (char const *file)
Opens file in write-only, non-blocking mode, close-on-exec, with the
additional O_EXCL and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int open_append (char const *file)
Opens file in write-only, non-blocking mode, with the
additional O_APPEND and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int openc_append (char const *file)
Opens file in write-only, non-blocking mode, close-on-exec, with the
additional O_APPEND and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int open_trunc (char const *file)
Opens file in write-only, non-blocking mode, with the
additional O_TRUNC and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int openc_trunc (char const *file)
Opens file in write-only, non-blocking mode, close-on-exec, with the
additional O_TRUNC and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int open_create (char const *file)
Opens file in write-only, non-blocking mode, with the
additional O_CREAT flag.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int openc_create (char const *file)
Opens file in write-only, non-blocking mode, close-on-exec, with the
additional O_CREAT flag.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int open_write (char const *file)
Opens file in write-only, non-blocking mode.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
int openc_write (char const *file)
Opens file in write-only, non-blocking mode, close-on-exec.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
Forking children
pid_t doublefork ()
Performs a double fork. Returns -1 if it fails (and
sets errno, EINTR meaning that the intermediate process
was killed by a signal), 0 if the current process is the grandchild,
and the grandchild's PID if the current process is the parent.
The child_spawn family of functions has been moved to the
skalibs/cspawn.h header.
Waiting for children
unsigned int wait_reap ()
Instantly reaps all the pending zombies, without blocking, without a look at
the exit codes.
Returns the number of reaped zombies.
int waitn (pid_t *pids, unsigned int n)
Waits until all processes whose PIDs are stored in the
pids array, of size n, have died.
Returns 1 if it succeeds, and 0 (and sets errno) if it fails. The
pid array is not guaranteed to be unchanged.
int waitn_posix (pid_t *pids, unsigned int n, int *wstat)
Like waitn, but stores into *wstat the status
of the last process in the pids array (i.e. pids[n-1]).
int waitn_reap (pid_t *pids, unsigned int n)
Instantly reaps all zombies whose PIDs are stored in the
pids array, of size n.
Returns -1 (and sets errno) if it fails, and the number of reaped
zombies if it succeeds. The pid array is not guaranteed to
be unchanged.
int waitn_reap_posix (pid_t *pids, unsigned int n, int *wstat)
Like waitn_reap, but stores into *wstat the status
of the last process in the pids array (i.e. pids[n-1]),
if applicable; otherwise *wstat is unchanged.
pid_t wait_nohang (int *wstat)
Instantly reaps one zombie, and stores the status information into
*wstat.
Returns the PID of the reaped zombie if it succeeds, 0 if there was
nothing to reap (and the current process still has children), -1 ECHILD
if there was nothing to reap (and the current process has no children),
or -1 (and sets errno) if it fails.
pid_t waitpid_nointr (pid_t pid, int *wstat, int flags)
Safe wrapper around
waitpid().
pid_t wait_pid_nohang (pid_t pid, int *wstat)
Instantly reaps an undetermined number of zombies until it finds pid.
Stores the status information for dead pid into *wstat.
Returns pid if it succeeds, 0 if there was
nothing to reap (and the current process still has children), -1 ECHILD
if there was nothing to reap (and the current process has no children),
or -1 (and sets errno) if it fails.
int wait_pids_nohang (pid_t const *pids, unsigned int len, int *wstat)
Instantly reaps an undetermined number of zombies until it finds one whose
PID is in the pids array, of size len.
Stores the status information for that dead process into *wstat.
Returns the index of the found PID in pids, starting at 1.
Returns 0 if there was
nothing to reap (and the current process still has children), -1 ECHILD
if there was nothing to reap (and the current process has no children),
or -1 (and sets errno) if it fails.
When asynchronously dealing with a child (resp. several children) and
getting a SIGCHLD - which should be handled via a
selfpipe - it is generally a good idea to
use the wait_pid_nohang() (resp. wait_pids_nohang())
function over the basic Unix APIs. This allows a program to:
- Automatically and silently take care of children it does not know
it has. This situation can happen when a process forks and the parent
execs. When the child dies, the new parent process has to drag the
"zombie bastard" along, which is ugly; wait_pids_nohang()
prevents this.
- Still take appropriate care of its legitimate children, in
any order.
Reading and writing whole files
int slurp (stralloc *sa, int fd)
Slurps the contents of open descriptor fd into
the *sa stralloc. If you are
doing this, you should either have full control over the slurped
file, or run your process with suitable
limits
to the amount of heap memory it can get.
The function returns 1 if it succeeds, or 0 (and sets errno) if it fails.
int slurpn (stralloc *sa, int fd, size_t max)
Same as slurp, but only grows the stralloc to a maximum
of max bytes of total length. If there is still more to
read on fd after sa→len has reached max,
the function returns 0 with errno set to ENOBUFS.
int openslurpclose (stralloc *sa, char const *file)
Slurps the contents of file file into *sa.
Returns 1 if it succeeds, and 0 (and sets errno) if it fails.
ssize_t openreadnclose (char const *file, char *s, size_t n)
Reads at most n bytes from file file into preallocated
buffer s. Returns -1 (and sets errno) if it fails; else returns the
number of read bytes.
ssize_t openreadnclose_nb (char const *file, char *s, size_t n)
Like openreadnclose, but can fail with EAGAIN if the file cannot be
immediately read (for instance if it's a named pipe or other special file).
int openreadfileclose (char const *file, stralloc *sa, size_t n)
Reads at most n bytes from file file into the *sa
stralloc, which is grown (if needed) to just accommodate the file
size. Returns 1 if it succeeds and 0 (and sets errno) if it fails.
int openwritenclose_unsafe5 (char const *file, char const *s, size_t len, devino *devino, unsigned int options)
Writes the n bytes stored at s into file file.
The previous contents of file are destroyed even if the function
fails. If options has bit 0 set, the new contents of file
are synced to disk before the function returns. If devino is not null,
the device number of file is stored in devino→dev
and its inode number in devino&arr;ino.
The function returns 1 if it succeeds, or 0 (and sets errno) if it fails.
int openwritenclose_unsafe (char const *file, char const *s, size_t len)
int openwritenclose_unsafe_sync (char const *file, char const *s, size_t len)
Trivial shortcuts around openwritenclose_unsafe5(). The
reader can easily figure out what they do.
int openwritenclose_suffix6 (char const *file, char const *s, size_t len, devino *devino, unsigned int options, char const *suffix)
Writes the n bytes stored at s into file file,
by first writing into filesuffix and atomically renaming
filesuffix to file. IOW, the old contents of file
are preserved if the operation fails, and are atomically replaced with the
new contents if the operation succeeds.
If options has bit 0 set, the new contents of filesuffix
are synced to disk before the atomic replace. If devino is not null,
the device number of file is stored in devino→dev
and its inode number in devino&arr;ino.
The function returns 1 if it succeeds, or 0 (and sets errno) if it fails.
int openwritenclose_suffix (char const *file, char const *s, size_t len, char const *suffix)
int openwritenclose_suffix_sync (char const *file, char const *s, size_t len, char const *suffix)
Trivial shortcuts around openwritenclose_suffix_internal(). The
reader can easily figure out what they do.
int openwritevnclose_unsafe5 (char const *file, struct iovec const *v, unsigned int vlen, devino *devino, int dosync)
Like openwritenclose_unsafe5, but the content to
write is taken from a
scatter/gather array of vlen
elements instead of a single string.
int openwritevnclose_unsafe (char const *file, struct iovec const *v, unsigned int vlen)
int openwritevnclose_unsafe_sync (char const *file, struct iovec const *v, unsigned int vlen)
Trivial wrappers around openwritevnclose_unsafe5().
int openwritevnclose_suffix6 (char const *file, struct iovec const *v, unsigned int vlen, devino *devino, int dosync, char const *suffix)
Like openwritenclose_suffix6, but the content to
write is taken from a
scatter/gather array of vlen
elements instead of a single string.
int openwritevnclose_suffix (char const *file, struct iovec const *v, unsigned int vlen, char const *suffix)
int openwritevnclose_suffix_sync (char const *file, struct iovec const *v, unsigned int vlen, char const *suffix)
Trivial wrappers around openwritevnclose_suffix6().
Filesystem deletion
The following operations are not atomic, so if they fail, the
relevant subtree might end up partially deleted.
int rm_rf (char const *path)
Deletes the filesystem subtree at path.
Returns 0 if it succeeds or -1 (and sets errno) if it fails.
int rm_rf_tmp (char const *path, stralloc *tmp)
Deletes the filesystem subtree at path, using *tmp
as heap-allocated temporary space.
Returns 0 if it succeeds or -1 (and sets errno) if it fails.
int rm_rf_in_tmp (stralloc *tmp, size_t n)
Deletes a filesystem subtree, using *tmp
as heap-allocated temporary space.
Returns 0 if it succeeds or -1 (and sets errno) if it fails.
When the function is called, *tmp must contain the
null-terminated name of the subtree to delete at offset n.
int rmstar (char const *dir)
Deletes all the filesystem subtrees in directory dir.
Returns 0 if it succeeds or -1 (and sets errno) if it fails.
int rmstar_tmp (char const *dir, stralloc *tmp)
Deletes all the filesystem subtrees in directory dir,
using *tmp as heap-allocated temporary space.
Returns 0 if it succeeds or -1 (and sets errno) if it fails.
Filesystem copy
int hiercopy_tmp (char const *src, char const *dst, stralloc *tmp)
Recursively copies the filesystem hierarchy at src into
dst, preserving modes, and also preserving the uids/gids if the
process is running as the super-user.
Uses *tmp as heap-allocated temporary space.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
int hiercopy (char const *src, char const *dst)
Same as above, using the satmp global stralloc as
heap-allocated temporary space.
Directory listing
int sals (char const *dir, stralloc *sa, size_t *maxlen)
Appends the base names of all the files (save . and ..) in
dir to the stralloc *sa; each name is null-terminated.
On error, returns -1 and sets errno. On success, returns the number of files
it found, and writes to *maxlen the size of the largest file name
it found (0 for an empty directory).
Variable length wrappers around Single Unix calls
int sarealpath (stralloc *sa, char const *path)
Resolves path into a symlink-free absolute path, appending
the result to the *sa
stralloc.
Returns 0 if it succeeds and -1 (and sets errno) if it fails.
int sarealpath_tmp (stralloc *sa, char const *path, stralloc *tmp)
Resolves path into a symlink-free absolute path, appending
the result to *sa. Uses *tmp as heap-allocated
temporary space.
Returns 0 if it succeeds and -1 (and sets errno) if it fails.
int sabasename (stralloc *sa, char const *s, size_t len)
Appends the basename of filename s (of length len)
to *sa.
Returns 1 if it succeeds and 0 (and sets errno) if it fails.
int sadirname (stralloc *sa, char const *s, size_t len)
Appends the dirname of filename s (of length len)
to *sa.
Returns 1 if it succeeds and 0 (and sets errno) if it fails.
int sagetcwd (stralloc *sa)
Appends the current working directory to *sa.
Returns 0 if it succeeds and -1 (and sets errno) if it fails.
int sareadlink (stralloc *sa, char const *link)
Appends the contents of symbolic link link to *sa.
Returns 0 if it succeeds and -1 (and sets errno) if it fails.
int sagethostname (stralloc *sa)
Appends the machine's hostname to *sa.
Returns 0 if it succeeds and -1 (and sets errno) if it fails.
Temporization
void deepsleepuntil (tain const *deadline, tain *stamp)
Sleeps until the absolute time represented by the
tain *deadline. *stamp
must contain the current time. When the function returns, *stamp
has been updated to reflect the new current time.
void deepsleep (unsigned int n)
Sleeps n seconds. Signals received during that time are handled,
but do not interrupt the sleep.
void deepmillisleep (unsigned long n)
Sleeps n milliseconds. Signals received during that time are handled,
but do not interrupt the sleep.
Miscellaneous functions
size_t path_canonicalize (char *out, char const *in, int check)
Writes into out the canonical form of the Unix path given in
in. The out array must be preallocated with at least
strlen(in)+2 bytes. Returns the length of the out path, without
counting the terminating null byte. If check is nonzero, in is tested
for every foobar/.. element, and the function returns 0, and sets errno
appropriately, if foobar is not a valid directory; in that case, out
contains the problematic path.
skalibs-2.14.2.0/doc/libstddjb/env.html 0000664 0000000 0000000 00000014135 14630613211 0017553 0 ustar 00root root 0000000 0000000
skalibs: the env header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/env.h header
The following functions are declared in the skalibs/env.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
env.h contains functions that help shape the environment of programs
before spawning or executing them, without affecting the environment of the
main program.
Unless otherwise noted, all functions in this header return 1 on success or
0 (and set errno) on failure.
Bytestrings for environment modifications
A few functions in env.h (and many in exec.h)
have arguments named modifs and modiflen. A modif
is a byte-string that encodes a series of instructions to set/override
environment variables, or to remove them from the environment.
Functions
Fetching variables
char const *env_get (char const *s)
Deprecated alias of
getenv().
char const *ucspi_get (char const *s)
Prepends the current UCSPI protocol
to s and returns that environment variable. For instance,
uscpi_get("REMOTEEUID") would return the contents of the environment
variable IPCREMOTEEUID under s6-ipcserver. Returns NULL
EINVAL if it detects the program is not being run under UCSPI, or NULL ENOENT
if the variable that was specifically requested is not found.
char const *env_get2 (char const *const *envp, char const *s)
Similar to getenv(), but searches in envp instead of the current
process's environment.
Serialization
Despite the name, these functions also work for argvs.
size_t env_len (char const *const* envp)
Returns the number of elements in the array of strings envp up to, but
not including, the first null pointer.
int env_string (stralloc *sa, char const *const *envp, size_t envlen)
Serializes the array of NUL-terminated strings envp with envlen
elements into a series of contiguous NUL-terminated strings in the stralloc
*sa.
int env_make (char const **v, size_t n, char const *s, size_t len)
Deserializes the result of env_string: pointers to the first
n contiguous NUL-terminated strings contained in the byte-string
s of length len are written to v. Returns 1 on
success, or 0 EINVAL if s does not end in a NUL.
Note that this function does not write NULL to the final value of v.
Environment modification
int env_addmodif (stralloc *sa, char const *s, char const *t)
Adds an instruction to the modif contained in *sa. If t is
null, add an instruction to remove the variable s from the
environment. If t is not null, add an instruction to always set the
variable s to t.
size_t env_merge (char const **v, size_t vmax, char const *const *envp, size_t envlen, char const *modifs, size_t modiflen)
Takes the environment with envlen variables contained in envp,
applies the modifications encoded in the modif modifs of length
modiflen, and stores the result in v with a terminating NULL.
It only tries to store up to vmax-1 variables, which makes vmax
entries after the terminating NULL. Returns the number of elements now in
v, or 0 if the resulting v would be larger than vmax.
size_t env_merg (char const **v, size_t vmax, char const *const *envp, char const *modifs, size_t modiflen)
Similar to the above function, but envp is assumed to be NULL
terminated.
Envdir functions
int envdir_internal (char const *path, stralloc *modifs, unsigned int options, char nullis)
Essentially s6-envdir as library.
options is a bitwise OR of SKALIBS_ENVDIR_VERBATIM,
SKALIBS_ENVDIR_NOCHOMP and SKALIBS_ENVDIR_NOCLAMP, which
correspond to s6-envdir's -f, -n and -L options,
respectively.
It adds instructions to modifs that replicate the effect
s6-envdir [-f] [-n] [-L] -c nullis path would have on
the program it executes.
int envdir_chomp (char const *path, stralloc *modifs)
A macro that calls
envdir_internal(path, modifs, SKALIBS_ENVDIR_NOCHOMP, '\n').
int envdir (char const *path, stralloc *modifs)
int envdir_verbatim (char const *path, stralloc *modifs)
int envdir_verbatim_chomp (char const *path, stralloc *modifs)
Macros that call envdir_internal(path, modifs, options, '\n'), with
options set to self-explanatory values.
int env_dump (char const *dir, mode_t mode, char const *const *envp)
Turns the contents of the NULL terminated environment in envp into an
envdir located at dir. Files are created with mode mode.
skalibs-2.14.2.0/doc/libstddjb/envalloc.html 0000664 0000000 0000000 00000003560 14630613211 0020566 0 ustar 00root root 0000000 0000000
skalibs: the envalloc header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/envalloc.h header
The following functions are declared in the skalibs/env.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
envalloc.h is a supplement of env.h
header that lets one use genallocs of
char const * instead of fixed-size char const *[].
Functions
int envalloc_uniq (genalloc *v, char delim)
Removes strings in the v that share the same prefix up to the first
delim character. For instance, if delim is =, duplicate
environment variables are removed. Returns the number of removed entries on
success, -1 (and sets errno) on failure.
int envalloc_0 (genalloc *v)
Appends a null pointer to v. Returns 1 on sucess, 0 (and sets errno)
on failure.
envalloc_make and envalloc_merge work exactly like their
env.h counterparts.
skalibs-2.14.2.0/doc/libstddjb/exec.html 0000664 0000000 0000000 00000001553 14630613211 0017707 0 ustar 00root root 0000000 0000000
skalibs: the exec header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/exec.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/fmtscan.html 0000664 0000000 0000000 00000001575 14630613211 0020422 0 ustar 00root root 0000000 0000000
skalibs: the fmtscan header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/fmtscan.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/gccattributes.html 0000664 0000000 0000000 00000002572 14630613211 0021630 0 ustar 00root root 0000000 0000000
skalibs: the gccattributes header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/gccattributes.h header
skalibs/gccattributes.h is a set of wrappers around
gcc
attributes (duh). It defines macros that are always valid, and
that have no effect if the compiler is not gcc or the used version
of gcc does not support the wanted attribute.
For instance:
extern size_t str_len (char const *) gccattr_pure ;
defines the str_len function as pure if it is
supported.
The source code is self-explanatory.
skalibs-2.14.2.0/doc/libstddjb/genalloc.html 0000664 0000000 0000000 00000002727 14630613211 0020553 0 ustar 00root root 0000000 0000000
skalibs: the genalloc library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The genalloc library interface
The following functions are declared in the skalibs/genalloc.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
genalloc is the skalibs way of handling dynamic arrays, i.e.
dynamically growing arrays of fixed-size objects. Any array that needs
to be stored in heap memory can be implemented via genalloc.
Most genalloc functions are just macro calls around
stralloc functions.
The genalloc.h header is actually very simple and the
prototypes there are self-explaining.
skalibs-2.14.2.0/doc/libstddjb/genwrite.html 0000664 0000000 0000000 00000006612 14630613211 0020610 0 ustar 00root root 0000000 0000000
skalibs: the genwrite library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The genwrite library interface
The following functions are declared in the skalibs/genwrite.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
genwrite is syntactic sugar to help write functions that might
want to write either to memory or to a file descriptor.
Writing to memory is achieved via appending to a
stralloc; writing to a file descriptor is achieved
via appending to a buffer or a
bufalloc.
Usage
A genwrite_t structure contains a pointer to a function that writes
stuff to the target without flushing it
(which can be genwrite_put_stralloc, genwrite_put_buffer,
genwrite_put_bufalloc or any
compatible user-defined function) in .put, a pointer to a function
that flushes the target (which can be genwrite_flush_stralloc,
genwrite_flush_buffer, genwrite_flush_bufalloc or any
compatible user-defined function) in .flush, and a pointer to
the target writing structure in .target.
Users should define a genwrite_t first, using the provided functions,
and give applications a pointer gp to this structure. To write len
characters at position s to the target, the application should then call
(*gp->put)(gp->target, s, len)
. When it is done writing, the
application should call (*gp->flush)(gp->target)
to flush the
output.
genwrite_stdout and genwrite_stderr are predefined; they
write to buffer_1 and buffer_2 respectively.
Macros
GENWRITE_STRALLOC_INIT(sa)
Declares a genwrite_t writing to the stralloc *sa.
GENWRITE_BUFFER_INIT(b)
Declares a genwrite_t writing to the buffer *b. Use
of such a buffer might interact badly with nonblocking I/O.
GENWRITE_BUFALLOC_INIT(ba)
Declares a genwrite_t writing to the bufalloc *ba.
Note
Object-oriented programming in C is inefficient and cumbersome. It is
usually possible to avoid it in Unix system programming, because Unix
primitives are often generic enough. Unfortunately, it is not the case
here: Unix does not provide an abstraction representing either a file
or a memory buffer. So an object-oriented approach is unavoidable.
skalibs-2.14.2.0/doc/libstddjb/getpeereid.html 0000664 0000000 0000000 00000001560 14630613211 0021076 0 ustar 00root root 0000000 0000000
skalibs: the getpeereid header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/getpeereid.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/index.html 0000664 0000000 0000000 00000016060 14630613211 0020071 0 ustar 00root root 0000000 0000000
skalibs: the stddjb library interface
libskarnet
skalibs
Software
www.skarnet.org
The stddjb library interface
libstddjb is the base, and the most important part, of skalibs.
It is a set of general-purpose C functions wrapping some
system calls, hiding some Unix portability problems, providing some
basic low-level buffering functions and string handling, and generally
offering a nice API to Unix programming - in many ways nicer and safer
than the "standard" Unix APIs like stdio.h.
It is mostly based on some excellent code written and placed into the
public domain by D. J. Bernstein.
Compiling
- The libstddjb functions are available under the skalibs/stddjb.h
header, which includes a lot of lower-level headers. If you know what
lower-level headers to use, you might speed up your compilation process by
including them directly.
Programming
The following headers are automatically generated at compile-time, when the
headers subsystem is made. The skalibs/stddjb.h file also
includes them.
- skalibs/uint16.h: operations with 16-bit unsigned integers
- skalibs/uint32.h: operations with 32-bit unsigned integers
- skalibs/uint64.h: operations with 64-bit unsigned integers
- skalibs/types.h: portable helpers for common Unix types: size_t,
uid_t, gid_t, pid_t, time_t, dev_t and ino_t.
- skalibs/error.h: portable macros for errno management
- skalibs/setgroups.h: stub for the setgroups() function, for systems that do not define it
- skalibs/ip46.h: IPv4/IPv6 abstraction layer
Additionally, stddjb.h also includes the following headers, which
are not associated with any code and are mostly self-explanatory:
- skalibs/gccattributes.h: wrappers around a few GCC-specific optimizations
- skalibs/diuint.h: for associative arrays of unsigned integers
- skalibs/diuint32.h: for associative arrays of 32-bit unsigned integers
- skalibs/disize.h: for associative arrays of size_t
- skalibs/nsig.h: the number of system signals, for systems that do not define it
- skalibs/nonposix.h: feature test macros for non-POSIX-compliant systems
skalibs-2.14.2.0/doc/libstddjb/iopause.html 0000664 0000000 0000000 00000021325 14630613211 0020427 0 ustar 00root root 0000000 0000000
skalibs: the iopause library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The iopause library interface
The following functions are declared in the skalibs/iopause.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
iopause is the skalibs API for event loop selection. It's a
wrapper around the system's ppoll() or
poll()
(if available) or
select()
(if neither ppoll() nor poll() is available) function.
It works around some system-dependent quirks; also it works with
absolute dates instead of timeouts. This is a good thing:
see below.
iopause is a derived work from Dan J. Bernstein's
iopause library, but the
skalibs implementation is subtly different.
Data structures
An iopause_fd structure is similar to a
struct pollfd
structure, and must be filled the same way. Usually, the user declares
an array of iopause_fd and fills it, one element per descriptor
to select on. If x is an iopause_fd:
- x.fd must be set to the fd number to select on.
- x.events must be a disjunction of the following flags:
- IOPAUSE_READ if the fd is to be selected for reading.
- IOPAUSE_WRITE if the fd is to be selected for writing.
- When the selection function returns, x.revents contains
a disjunction of the following flags:
- IOPAUSE_READ if the fd is readable (this includes reception of an EOF).
- IOPAUSE_WRITE if the fd is writable.
- IOPAUSE_EXCEPT if an exception (such as EOF or an error) occurred on the fd.
Unlike poll() or select(), which use a timeout
argument, the iopause() function uses a deadline argument,
i.e. an absolute time at which it must return 0 if no event has happened
so far, as well as a stamp argument, i.e. an absolute time meaning
now. Those arguments are stored in
tains. Here is why:
The event loop pattern is mostly used to multiplex several asynchronous
events that can happen independently, at the same time or not. Let's
say you have 3 events, x, y and z. Each of
those has a separate timeout: if x happens before x-timeout
milliseconds, you call the x-event-handler function, but
if x-timeout milliseconds elapse without x happening,
you call x-timeout-handler function. And similarly with y
and z.
But the selection function returning does not mean x has happened
or that x has timed out. It might also mean that y has
happened, that y has timed out, that z has happened, that
z has timed out, or something else entirely. In the post-selection
part of the loop, the proper handler is called for the event or timeout
that has happened; then the loop is executed again, and in the
pre-selection part of the loop, the array describing the events is filled,
and the selection timeout is computed.
How are you going to compute that global selection timeout? Easy: it's the
shortest of the three. But we just spent some amount of time waiting, so the
individual timeouts must be recomputed! This means:
- You need a way to know the time spent in a selection primitive, which
basically means getting a timestamp before the selection and once again
after the timestamp.
- You need to recompute every individual timeout everytime you enter
the loop.
That is really cumbersome. A much simpler way of doing things is:
- Always keep a reasonably accurate estimation of the current
time in a stamp variable. That means getting the current time
at the start of the process, and updating it right after any
action that takes a significant amount of time. When to update stamp
can be difficult to estimate in CPU-bound processes; fortunately, most
processes using an event loop are IO-bound, and the only actions that take
a non-negligible amount of time in an IO-bound process are the blocking
primitives. So, stamp must be updated right after a selection
function returns, and if the program has been correctly written and
cannot block anywhere else, it's the only place where it needs to be.
- For every event, compute the deadline of that event:
x-deadline is x-timeout added to the current stamp
value when x enters the loop. This is done only once per event:
you never have to recompute event deadlines - unlike timeouts, which diminish
over time, deadlines do not change.
- At every iteration, the selection deadline is the earliest of all the
available event deadlines.
- As an added bonus: after the selection function returns and
stamp has been updated, it is easy to check which events have
timed out and which have not: x has timed out iff x-deadline
is earlier than stamp.
Maintaining a global timestamp and using absolute times instead of relative
times really is the right way to work with event loops, and the iopause
interface reflects that. Of course, you need a reliable, bug-free time library
and a monotonic, constant system clock to handle absolute times correctly;
that is why iopause relies on the tai library.
Functions
int iopause (iopause_fd *x, unsigned int len, tain const *deadline, tain const *stamp)
Blocks until one of the events described in the x array, of length
len, happens, or until the absolute date *deadline is
reached. deadline may be null, in which case the function blocks
indefinitely until an event happens. If deadline is not null, then
stamp must not be null, and must contain an accurate estimation
of the current time. The function returns the number of events that have
happened, 0 for a timeout, or -1 (and sets errno) for an error.
int iopause_stamp (iopause_fd *x, unsigned int len, tain const *deadline, tain *stamp)
Like iopause(), but if stamp is not null, it is updated
right before the function returns. This helps the user always keep a
reasonably accurate estimation of the current time in stamp;
it is recommended to use this function instead of the lower-level
iopause().
Underlying implementations
iopause is an alias to one of iopause_ppoll, iopause_poll or
iopause_select. It is always aliased to iopause_ppoll if
the ppoll() function is available on the system; else, it's aliased to
iopause_poll by default, and users can alias it to iopause_select
instead if they configure skalibs with the --enable-iopause-select option.
poll()
has a more comfortable API than
select(),
but its maximum precision is 1 millisecond, which might not be enough for some applications;
using select() instead incurs some CPU overhead for the API conversion, but has a
1 microsecond precision.
ppoll() gets the best of
both worlds with the same interface model as poll() and a 1 nanosecond precision,
which is why skalibs always uses it when available.
skalibs-2.14.2.0/doc/libstddjb/ip46.html 0000664 0000000 0000000 00000015413 14630613211 0017545 0 ustar 00root root 0000000 0000000
skalibs: the ip46 library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The ip46 library interface
The following functions and structures are declared in the skalibs/ip46.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
ip46 is a set of macros and functions to support both IPv4
and IPv6 network operations in an abstracted way.
If skalibs has been built with the --disable-ipv6
configure option, or it detects at build time than the target does not support IPv6, then
ip46 structures and functions will be directly aliased to their
IPv4 implementations with no overhead at all.
Data structures
An ip46full_t is a structure that contains either an IPv4 or an IPv6
address.
If a is an ip46full_t, then:
- ip46_is6(&a) is 1 if a is
IPv6 and 0 otherwise.
- a.ip points to 16 (if IPv6) or 4 (if IPv4) bytes containing
the address, in network byte order.
If skalibs has been build with IPv6 support, an ip46_t is
the same type as an ip46full_t. Otherwise, an ip46_t
is a structure that just contains an IPv4 address.
Functions
int ip46_from_ip4 (ip46_t *a, char const *ip)
Stores the IPv4 pointed to by ip into *a. Returns 1.
int ip46_from_ip6 (ip46_t *a, char const *ip)
Stores the IPv6 pointed to by ip into *a. Returns 1,
except if IPv6 is unavailable, in which case it returns 0 ENOSYS.
size_t ip46_fmt (char *s, ip46_t const *a)
Formats the address in *a into the string s, which
must be preallocated. Returns the number of bytes written. The address
will be accordingly formatted as IPv4 or IPv6.
size_t ip46_scan (char const *s, ip46_t *a)
Scans the string s for an IPv4 or IPv6 address. If it finds
one, writes it into *a and returns the number of bytes read.
If it cannot, returns 0.
size_t ip46_scanlist (ip46_t *list, size_t max, char const *s, size_t *n)
Scans the string s for a list of comma-, semicolon-, space-, tab- or
newline-separated IPv4 or IPv6 addresses, up to a maximum of max. It
stores them into the (preallocated) ip46_t array pointed to by list.
It returns the number of bytes read (0 if s does not contain a valid
IP list at all), and stores the number of found and scanned addresses into *n.
int socket_connect46 (int fd, ip46_t *a, uint16_t port)
Connects the socket fd to address *a and port port.
Returns 0 in case of success, and -1 (and sets errno) in case of failure.
int socket_bind46 (int fd, ip46_t *a, uint16_t port)
Binds the socket fd to address *a and port port.
Returns 0 in case of success, and -1 (and sets errno) in case of failure.
int socket_bind46_reuse (int fd, ip46_t *a, uint16_t port)
Same as the previous function, with the SO_REUSEADDR option.
int socket_deadlineconnstamp46 (int fd, ip46_t const *a, uint16_t port, tain const *deadline, tain *stamp)
Attempts to synchronously connect the socket fd to address aa
and port port. Returns 1 if it succeeds and 0 (and sets errno)
if it fails. stamp must contain an accurate enough
timestamp, and is updated when the function returns. If the connection is
still pending by deadline, then the attempt stops and the function
returns 0 ETIMEDOUT.
ssize_t socket_recv46 (int fd, char *s, size_t len, ip46_t *a, uint16_t *port)
Reads a datagram from socket fd. The message is stored into buffer s
of max length len, and stores the sender information into address *a
and port *port. Returns the length of the read datagram, or -1 if it fails.
ssize_t socket_send46 (int fd, char const *s, size_t len, ip46_t const *a, uint16_t port)
Writes a datagram to socket fd. The message is read from buffer s
of length len, and the recipient information is address *a
and port port. Returns the number of written bytes, or -1 if it fails.
int socket_local46 (int fd, ip46_t *a, uint16_t *port)
Gets the local information about bound socket fd: the local IP
address is stored into *a and the local port into *port.
Returns 0 in case of success, and -1 (and sets errno) in case of failure.
int socket_remote46 (int fd, ip46_t *a, uint16_t *port)
Gets the peer information about connected socket fd: the remote IP
address is stored into *a and the remote port into *port.
Returns 0 in case of success, and -1 (and sets errno) in case of failure.
ssize_t socket_recvnb46 (int fd, char *s, size_t len, ip46_t *a, uint16_t *port,
tain const *deadline, tain *stamp)
Like socket_recv46, except that the function blocks until a datagram
is received. *stamp must be an accurate enough approximation of the
current time, and is updated when the function returns. If no datagram has
arrived by absolute date *deadline, the function returns -1 ETIMEOUT.
ssize_t socket_sendnb46 (int fd, char const *s, size_t len, ip46_t const *a, uint16_t port,
tain const *deadline, tain *stamp)
Like socket_send46, except that the function blocks until a datagram
has been effectively sent. *stamp must be an accurate enough approximation of the
current time, and is updated when the function returns. If the message still has
not been sent by absolute date *deadline, the function returns -1 ETIMEOUT.
skalibs-2.14.2.0/doc/libstddjb/lolstdio.html 0000664 0000000 0000000 00000006575 14630613211 0020625 0 ustar 00root root 0000000 0000000
skalibs: the lolstdio library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The lolstdio library interface
The following functions are declared in the skalibs/lolstdio.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
lolstdio is a set of convenience functions providing
printf-style
formatting but interacting with buffers or
bufallocs instead of stdio FILEs.
Like any printf-style functions, the lolstdio functions are rather
complex and inefficient, and not recommended for general use; they are
provided as a quick and dirty way to debug or test things. Programmers
are advised to use type-specific formatting functions instead in
production-quality code.
Be aware that functions writing into buffers interact badly with
non-blocking fds (and asynchronism in general) - just as you cannot
use FILEs with non-blocking output. Functions writing into bufallocs,
however, are fine, because bufallocs are much more suited to asynchronous
writing than fixed-size buffers or FILEs are.
The current lolstdio implementation relies on the libc's
vsnprintf
function.
Functions
int vbprintf (buffer *b, char const *format, va_list args)
Like vfprintf
except that the result is written to the buffer b.
int bprintf (buffer *b, char const *format, ...)
Like fprintf
except that the result is written to the buffer b.
int lolprintf (char const *format, ...)
Like printf
except that the result is written to the buffer buffer_1.
int vbaprintf (bufalloc *ba, char const *format, va_list args)
Like vfprintf
except that the result is written to the bufalloc ba.
int baprintf (bufalloc *ba, char const *format, ...)
Like fprintf
except that the result is written to the bufalloc ba.
skalibs-2.14.2.0/doc/libstddjb/mininetstring.html 0000664 0000000 0000000 00000001600 14630613211 0021646 0 ustar 00root root 0000000 0000000
skalibs: the mininetstring header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/mininetstring.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/netstring.html 0000664 0000000 0000000 00000001554 14630613211 0021001 0 ustar 00root root 0000000 0000000
skalibs: the netstring header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/netstring.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/safewrappers.html 0000664 0000000 0000000 00000007643 14630613211 0021473 0 ustar 00root root 0000000 0000000
skalibs: safe wrappers
libstddjb
libskarnet
skalibs
Software
skarnet.org
Safe wrappers
Lots of functions in libstddjb, declared for instance in
allreadwrite.h or
djbunix.h, are just "safe wrappers"
around corresponding system functions. For instance,
fd_read() is a safe wrapper around the system read()
function.
The problem
Quite a lot of system calls are defined by
The
Open Group Base Specifications as interruptible: when the process is in
the middle of such a system call and receives a signal that it does not
ignore, the system call immediately returns -1 EINTR (after the signal
handler, if any, has been executed).
Most of the time, this is not an issue: unignored signals usually kill
the process anyway. Or stop it - and when it resumes, system calls are
simply restarted, not interrupted. EINTR can only happen when a signal
handler has been installed, and a signal is actually caught by the
signal handler during an interruptible system call. And to avoid EINTR,
users can use the SA_RESTART flag when installing the signal handler with
sigaction().
However, there is a common case where using SA_RESTART is a bad idea:
when writing an asynchronous event loop.
An asynchronous event loop is organized around a
select() or
poll()
system call that is the only blocking operation in the whole loop. That call takes a
timeout as an argument. If a signal handler is installed with SA_RESTART and a
signal arrives in the middle of the select/poll call - which happens often
since it is blocking - then the select/poll is restarted with the same arguments,
including the timeout. This is not good: time has elapsed, the timeout should be
recomputed. Some versions of select update the values in the struct timeval even
when select() is interrupted, but it is not portable, and not applicable to poll().
So it is necessary, in this case, to have select/poll return -1 EINTR when a
signal is caught. And that means SA_RESTART should not be used.
Which also means that other system calls performed when the signal handler has
been installed, for instance in the body of the loop, will not be
protected, and can return -1 EINTR if a signal is caught at the wrong time.
The solution
So, in order to be perfectly reliable, when a program has caught a signal
without SA_RESTART and makes an interruptible system call, it must check whether
the return value is -1 EINTR, and restart the system call if it is the case.
This is annoying to write; so, skalibs provides small wrappers around
interruptible system calls, so that programmers can just call those safe wrappers
and never bother with this again.
The performance loss from having a wrapper layer is totally negligible
compared to the cost of using a system call in the first place.
skalibs-2.14.2.0/doc/libstddjb/segfault.html 0000664 0000000 0000000 00000001616 14630613211 0020575 0 ustar 00root root 0000000 0000000
skalibs: the segfault header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/segfault.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/selfpipe.html 0000664 0000000 0000000 00000021176 14630613211 0020575 0 ustar 00root root 0000000 0000000
skalibs: the selfpipe library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The selfpipe library interface
The selfpipe functions are declared in the
skalibs/selfpipe.h header and implemented in the libskarnet.a
or libskarnet.so library.
What does it do ?
Signal handlers suck.
They do. I don't care how experienced you are with C/Unix programming,
they do. You can be Ken Thompson, if you use signal handlers as a
regular part of your C programming model, you are going to
screw up, and write buggy code.
Unix is tricky enough with interruptions. Even when you have a single
thread, signals can make the execution flow very non-intuitive.
They mess up the logic of linear and structured code,
they introduce non-determinism; you always have to think "and what
if I get interrupted here and the flow goes into a handler...". This
is annoying.
Moreover, signal handler code is very limited in what it can
do. It can't use any non-reentrant function! If you call a non-reentrant
function, and by chance you were precisely in that non-reentrant function
code when you got interrupted by a signal... you lose. That means, no
malloc(). No bufferized IO. No globals. The list goes on and on.
If you're going to catch signals, you'll want to handle them outside
the signal handler. You actually want to spend the least possible
time inside a signal handler - just enough to notify your main
execution flow that there's a signal to take care of.
And, of course, signal handlers don't mix with event loops, which is
a classic source of headaches for programmers and led to the birth of
abominations such as
pselect. So much for the "everything is a file" concept that Unix was
built on.
A signal should be an event like any other.
There should be a unified interface - receiving a signal should make some
fd readable or something.
And that's exactly what the
self-pipe trick, invented
by DJB, does.
As long as you're in some kind of event loop, the self-pipe trick allows
you to forget about signal handlers... forever. It works this way:
- Create a pipe p. Make both ends close-on-exec and nonblocking.
- Write a tiny signal handler ("top half") for all the signals you want to
catch. This
signal handler should just write one byte into p[1], and do nothing
more; ideally, the written byte identifies the signal.
- In your event loop, add p[0] to the list of fds you're watching
for readability.
When you get a signal, a byte will be written to the self-pipe, and your
execution flow will resume. When you next go through the event loop,
p[0] will be readable; you'll then be able to read a byte from
it, identify the signal, and handle it - in your unrestricted main
environment (the "bottom half" of the handler).
The selfpipe library does it all for you - you don't even have to write
the top half yourself. You can forget their existence and recover
some peace of mind.
Note that in an asynchronous event loop, you need to protect your
system calls against EINTR by using safe
wrappers.
How do I use it ?
Starting
int fd = selfpipe_init() ;
selfpipe_init() sets up a selfpipe. You must use that
function first.
If fd is -1, then an error occurred. Else fd is a
non-blocking descriptor that can be used in your event loop. It will
be selected for readability when you've caught a signal.
Trapping signals
int r = selfpipe_trap(SIGTERM) ;
selfpipe_trap() catches a signal and sends it to the selfpipe.
Uncaught signals won't trigger the selfpipe. r is 1 if
the operation succeeded, and 0 if it failed. If it succeeded, you
can forget about the trapped signal entirely.
In our example, if r is 1, then a SIGTERM will instantly
trigger readability on fd.
int r ;
sigset_t set ;
sigemptyset(&set) ;
sigaddset(&set, SIGTERM) ;
sigaddset(&set, SIGHUP) ;
r = selfpipe_trapset(&set) ;
selfpipe_trap() handles signals one
by one. Alternatively (and often preferrably), you can use
selfpipe_trapset() to directly handle signal sets. When you call
selfpipe_trapset(), signals that are present in set will
be caught by the selfpipe, and signals that are absent from set
will be uncaught. r is 1 if the operation succeeded and 0 if it
failed.
Handling events
int c = selfpipe_read() ;
Call selfpipe_read() when your fd is readable.
That's where you write your real signal handler: in the
body of your event loop, in a "normal" context.
c is -1 if an error occurred - in which case chances are
it's a serious one and your system has become very unstable.
c is 0 if there are no more pending signals. If c
is positive, it is the number of the signal that was caught.
Accessing the selfpipe
int fd = selfpipe_fd() ;
Sometimes you need to access the fd of the selfpipe in two
very distinct translation units (typically to poll on it), and you
rightly don't want to add a global variable to store it, especially
since it's already stored in a global internal variable in skalibs.
No need to bloat your binary anymore: selfpipe_fd() will
now retrieve the value for you, wherever you are.
Finishing
selfpipe_finish() ;
Call selfpipe_finish() when you're done using the selfpipe.
Signal handlers will be restored to SIG_DFL, i.e. signals will not
be trapped anymore.
Any limitations ?
Some, as always.
- The selfpipe library uses a global pipe;
so, it's theoretically not safe for multithreading. However, as long as you dedicate
one thread to signal handling and block signals in all the other threads
(see pthread_sigmask())
then you should be able to use the selfpipe in the thread that handles
signals without trouble. Since reading the selfpipe involves waiting for
a file descriptor to become readable, it is recommended to do this in a
thread that will already have a regular input/output loop (via
poll()
or iopause()) so you can just add the selfpipe
to the list of fds you're reading on.
- In rare cases, the self-pipe can theoretically be filled, if some
application sends more than PIPE_BUF signals before you have time to
selfpipe_read(). On most Unix systems, PIPE_BUF is 4096,
so it's a very acceptable margin. Unless your code is waiting where
it should not be, only malicious applications will fill the self-pipe
- and malicious applications could just send you a SIGKILL and be done
with you, so this is not a concern. Protect yourself from malicious
applications with clever use of uids.
Hey, Linux has signalfd() for this !
Yes, the Linux team loves to gratuitously add new system calls to do
things that could already be done before without much effort. This
adds API complexity, which is not a sign of good engineering.
However, now that signalfd() exists, it is indeed marginally more
efficient than a pipe, and it saves one fd: so the selfpipe library
is implemented via signalfd() when this call is available.
skalibs-2.14.2.0/doc/libstddjb/sgetopt.html 0000664 0000000 0000000 00000001553 14630613211 0020450 0 ustar 00root root 0000000 0000000
skalibs: the sgetopt header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/sgetopt.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/sig.html 0000664 0000000 0000000 00000001545 14630613211 0017546 0 ustar 00root root 0000000 0000000
skalibs: the sig header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/sig.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/siovec.html 0000664 0000000 0000000 00000015116 14630613211 0020253 0 ustar 00root root 0000000 0000000
skalibs: the siovec header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/siovec.h header
The following functions are declared in the skalibs/siovec.h header
and implemented in the libskarnet.a or libskarnet.so library.
Purpose
These functions manipulate arrays of struct iovec containing
ranges of bytes, handling them as contiguous arrays. They're used, for
instance, in the skalibs implementation of circular buffers.
Functions
size_t siovec_len (struct iovec const *v, unsigned int n)
Returns the sum of the first n iov_len fields of the
v array - i.e. the total number of bytes contained in the
array represented by v of length n.
size_t siovec_gather (struct iovec const *v, unsigned int n, char *s, size_t max)
Gathers all the data scattered in ranges described by v of length
n into the space pointed to by s.
Specifically: the first v[0].iov_len bytes pointed to by
v[0].iov_base bytes are copied to s, then the first
v[1].iov_len bytes pointed to by v[1].iov_base are
appended to it, and so on, n times.
The function copies no more than max bytes. It
returns the total amount of bytes copied.
size_t siovec_scatter (struct iovec const *v, unsigned int n, char const *s, size_t len)
Scatters len bytes of data from s into the byte ranges
represented by array v of length n. (This is the opposite
of the siovec_gather() function.)
The first v[0].iov_len bytes of
s are copied to v[0].iov_base, then the following
v[1].iov_len bytes of s are copied to
v[1].iov_base, and so on up to len bytes or until
if the scatter array is full, i.e. siovec_len(v, n) bytes
have been copied. The function returns the total amount of bytes copied.
size_t siovec_deal (struct iovec const *vj, unsigned int nj, struct iovec const *vi, unsigned int ni)
Copies the data contained in the ranges represented by the array vi of
length ni to the ranges represented by the array vj of length
nj.
The first vi[0].iov_len bytes pointed to by vi[0].iov_base
are copied to vj[0].iov_base, up to vj[0].iov_len bytes,
moving on to vj[1].iov_base if it overflows; then the bytes pointed
to by vi[1].iov_base are copied to what space remains wherever the
writing pointer is, and so on until all the bytes in the ranges described by
vi have been copied or there is no more room left in the ranges
described by vj.
The function returns the total amount of bytes copied.
size_t siovec_seek (struct iovec *v, unsigned int n, size_t len)
Does the equivalent of p += len; if the byte ranges represented by
array v of size n were a single byte array pointed by p.
If v[0].iov_len is lesser than len, then v[0] is
zeroed out (set to { .iov_base = 0, .iov_len = 0 }), v[0].iov_len
bytes are deduced from len, and the same operation is repeated with
v[1], and so on. If every iovec gets zeroed out, the operation stops;
but if a v[i].iov_len is greater than the
remaining amount of bytes to deduce, that amount is substracted from
v[i].iov_len and added to v[i].iov_base. The function returns
the total number of bytes that have been deduced.
unsigned int siovec_trunc (struct iovec *v, unsigned int n, size_t len)
Truncates the last fields of v of size n so that the byte
ranges it represents have a total length of len or less. The
iov_len field of v[n-1] is decreased by len; if it would
be negative, then it's zeroed out and the remainder is taken from v[n-2]
instead, and so on. The function returns the new size of array v
with the tailing zeroed out members removed. It can only return 0 if len
is 0, which means all of v has been zeroed out.
size_t siovec_bytechr (struct iovec const *v, unsigned int n, char c)
Looks for the first occurence of c among the byte ranges represented by the members
of v. Returns its cumulative index, i.e. the position that c
would have if the byte ranges pointed to by members of v were a
single array. If there are no occurences of c, the function retunrs
siovec_len(v, n).
size_t siovec_bytein (struct iovec const *v, unsigned int n, char const *sep, size_t seplen)
Looks for the first occurence of any byte from the sep array of size
seplen among the byte ranges represented by the members of array v
of size n, and returns the cumulative index of the first one it finds.
size_t siovec_search (struct iovec const *v, unsigned int n, char const *needle, size_t nlen)
Looks for the string (as in array of bytes: null characters are supported)
needle of size nlen in the byte ranges represented by the
members of array v of size n, and returns the cumulative
index of the first occurrence it finds, or siovec_len(v, n) if it
cannot find one. Split strings are supported: if needle
starts at position v[i].iov_base + pos but is cut because it
reaches v[i].iov_len midstring, and the rest of needle
is available at v[i+1].iov_base, then the function will find it
(and return pos plus the sum length of all the v members
before i).
skalibs-2.14.2.0/doc/libstddjb/skamisc.html 0000664 0000000 0000000 00000001567 14630613211 0020422 0 ustar 00root root 0000000 0000000
skalibs: the skamisc header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/skamisc.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/socket.html 0000664 0000000 0000000 00000001570 14630613211 0020252 0 ustar 00root root 0000000 0000000
skalibs: the socket header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/socket.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/stralloc.html 0000664 0000000 0000000 00000011367 14630613211 0020612 0 ustar 00root root 0000000 0000000
skalibs: the stralloc library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The stralloc library interface
The following functions are declared in the skalibs/stralloc.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
stralloc is the preferred skalibs way of storing objects into
heap memory. It focuses on strings of char, which is the generic
way to handle any object. For easy structure manipulation, the
genalloc
series of functions can be used; those functions are mostly macros wrapping
calls to their stralloc counterparts.
A stralloc is a structure containing the following fields:
- s: a pointer to a zone of heap memory. The stralloc
functions internally manipulate those via the
alloc series of functions. It is recommended
to never modify that field manually.
- len: the used length of the
allocated zone. It is the only field that the user can modify
directly.
- a: the number of allocated bytes. The user should never
have to access that field, because the memory allocation management
should be entirely transparent. len cannot exceed a:
if an operation needs a bigger len, it will automatically
reallocate as needed.
The benefits of using stralloc are as follows:
- Memory allocation is performed on-demand and automatically, with
a suitable size. Heuristics are used to accommodate constantly growing
strings while minimizing the amount of needed reallocations.
- If every heap-allocated object is represented by a stralloc, then
it is very easy to identify what pointer is in the heap. When you stop
using a pointer p, should you free it ? Sometimes it's not
easy to find out. When you stop using a stralloc sa, you
know you must call stralloc_free(&sa). Store
your strong references as strallocs and weak references as simple
pointers, and never free simple pointers. This policy allows me to
boast that no skarnet.org software has ever leaked memory.
- Repeated for emphasis:
the golden rule for programming with strallocs is
every pointer to the heap must be owned by a stralloc.
Every pointer you handle yourself either does not point to the heap,
or is weak. That sometimes implies unusual programming practices, such
as having storage separated from structure, but it's hands down the
easiest way to keep control of your heap in complex situations.
- The indirection layer makes weak references immune to
reallocation troubles. The s field may change when a
reallocation happens, but the stralloc structure's address never
changes.
A stralloc can be declared anywhere: static/global data, stack or heap. (Of course,
as a general rule, you should favor the stack whenever possible.)
A stralloc should be initialized to STRALLOC_ZERO before its first use.
Functions
int stralloc_catb (stralloc *sa, char const *s, size_t len)
Appends the len bytes pointed to by s to the end of the
memory zone handled by *sa, automatically allocating more memory
if needed. Returns 1 if it succeeds, and 0 if it fails.
void stralloc_free (stralloc *sa)
Frees *sa, i.e. calls alloc_free
on sa→s then zeroes the structure. *sa is
then reusable. However, it is not good practice to call this function
if you're going to reuse *sa soon: it takes time and causes
memory fragmentation. Just setting sa→len to 0 allows
you to instantly reuse the allocated block of memory.
The above are the most important and fundamental functions of
skalibs/stralloc.h. Other functions can be found in this header and
their prototypes are self-explaining.
skalibs-2.14.2.0/doc/libstddjb/strerr.html 0000664 0000000 0000000 00000001570 14630613211 0020303 0 ustar 00root root 0000000 0000000
skalibs: the strerr header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/strerr.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.14.2.0/doc/libstddjb/tai.html 0000664 0000000 0000000 00000050055 14630613211 0017541 0 ustar 00root root 0000000 0000000
skalibs: the tai library interface
libstddjb
libskarnet
skalibs
Software
skarnet.org
The tai library interface
The following functions are declared in the skalibs/tai.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
tai is a set of data structures and primitives to represent
and perform operations on time.
The point of tai is to handle time without ever having to
deal with annoyances such as Y2K, Y2038, NTP limits, non-linear
clocks, and the like. By using the tai interface, you ensure
your program will behave properly no matter what.
What is the problem ?
The standard APIs for time management under Unix are broken in more
or less subtle ways. The most obvious thing is that they do not pass
year 2038. A less obvious problem is that they do not handle leap
seconds correctly. Here are a few references you should read to
understand what is going on:
The meat and potatoes of all this is that programmers cannot simply rely on
standard Unix APIs such as
gettimeofday()
(which, by the way, is marked as obsolescent, but it's not going to disappear tomorrow)
to measure time intervals or even to give precise absolute time, and in
any case those APIs will become obsolete in 2038.
So what does tai do ?
tai implements - among other things - the
TAI64 and TAI64N
formats, which are used in all of skalibs. This gives a programmer access
to precise linear absolute time, which is suitable for both
timestamping (wallclock usage) and time interval measurements
(stopwatch usage). Additionally, TAI64 passes Y2038 (it can
represent dates exceeding the estimated lifespan of the universe).
tai has been inspired by Dan J. Bernstein's
libtai library, but does not
borrow any code from it.
Data structures
A tai structure holds an absolute date with a one-second
precision. A tain structure holds an absolute date with a
maximum of one-nanosecond precision, as permitted by the underlying system
call. If flag-usert is clear, the system
clock will be read via
gettimeofday()
system call, which has a one-microsecond precision; if it is set, the
system clock will be read via the
clock_gettime()
system call, which has a one-nanosecond precision. In either case, a current
tain will be unable to be more precise than the underlying
implementation.
A tai, as well as a tain, can also
hold a (possibly negative) relative time, i.e. a difference of absolute
dates. It is up to the programmer to make sure that a relative time is
never interpreted as an absolute TAI64 date, and vice-versa.
Functions
Wallclock operations
int tai_now (tai *t)
Writes the current time as a TAI value to *t, with a
1-second precision. The current time is based on the system clock.
Make sure skalibs has been compiled with or without the
--enable-tai-clock configure option according
to your system clock synchronization method: skalibs supports a
system clock set to TAI-10 or to UTC.
The function returns 1 if it succeeds, or 0 (and sets errno) if
it fails.
int sysclock_get (tain *a)
Reads the current value of the system clock (as in CLOCK_REALTIME) into *a.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
Note that despite being a tain, *a
does not contain a TAI value - it only contains
an internal, Y2038-safe representation of the value of the system
clock, which should be either TAI-10 or UTC. You should not use
this function directly unless you know exactly what you are doing.
int sysclock_set (tain const *a)
Sets the system clock to *a, provided *a has
the correct internal representation. You should not use this
function directly unless you know exactly what you are doing.
int tain_wallclock_read (tain *a)
Reads the current time into *a, as a TAI64N value.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
Here a contains a valid TAI64N stamp, no matter what the
system clock is set to: arithmetic operations can be performed
on it.
int tain_setnow (tain const *a)
Sets the current time to *a.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
a must contain a valid TAI64N stamp; proper
operations will be automatically run to convert that stamp into
the right format for the system clock.
int tain_now_set_wallclock (tain *a)
Tells skalibs that future invocations of tain_now()
(see below) should use a wall clock, i.e. the system time
as returned by clock_gettime(CLOCK_REALTIME) or
gettimeofday(). Also reads the current time into *a.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
A wall clock is the default: it is not necessary
to call this function before invoking tain_now() at the
start of a program.
Stopwatch operations
The following two operations can only succeed if your system provides the
clock_gettime()
primitive with at least one of the CLOCK_MONOTONIC or CLOCK_BOOTTIME clocks.
Otherwise, they will fail with errno set to ENOSYS.
int tain_stopwatch_init (tain *a, clock_t cl, tain *offset)
Initializes a stopwatch in *offset, using a clock named cl.
Typically, cl is something like CLOCK_MONOTONIC, when it is defined
by the system. The actual value of
*offset is meaningless to the user; offset's only
use is to be given as a second parameter to tain_stopwatch_read().
The function returns 1 if it succeeds or 0 (and sets errno) if it fails.
On success, the current time, as given by the system clock (a
wall clock), is returned in *a.
What tain_stopwatch_init() does is synchronize the "stopwatch
clock" to the system clock. Right after tain_stopwatch_init()
has been called, the absolute times given
by tain_stopwatch_read() and tain_wallclock_read() are
the same. Then, depending on the accuracy of the system clock, a drift
may appear; calling tain_stopwatch_init() again resets that drift
to zero.
int tain_stopwatch_read (tain *a, clock_t cl, tain const *offset)
Gives the absolute time, as a TAI64N value, in *a. This
absolute time is computed as a linear increase (as measured with
the cl clock, which should be a monotonic clock such as
CLOCK_MONOTONIC) since the last time tain_stopwatch_init()
was called with parameter offset. tain_stopwatch_read()
guarantees precise time interval measurements; however, the time it
gives can slightly differ from the result of tain_wallclock_read().
The function returns 1 if it succeeds or 0 (and sets errno) if it fails.
int tain_now_set_stopwatch (tain *a)
Tells skalibs that future invocations of tain_now()
(see below) should use a stopwatch, i.e. the system time
as returned by clock_gettime(CLOCK_MONOTONIC) or similar,
if supported by the system. This is useful when it is more important
for a program to compute unchanging time intervals no matter what the
system clock does, than to display absolute time that is in sync with a
human view of time (which is the cause and reason of most system clock
jumps).
If no monotonic clock is supported by the system, this function does
not change what tain_now() refers to (i.e. it will keep
referring to the system clock).
Returns 1 on success and 0 (and sets errno) on failure. On success,
the current time, as given by the system clock (a wall clock),
is returned in *a.
All-purpose time reading
int tain_now (tain *a)
Writes the current time, as a TAI value, to *a. This is the
function you should use by default. It returns 1 if it succeeds or
0 (and sets errno) if it fails.
tain_now() relies on the concept that there is One True Time Source
for the process, and that is where it reads time from. By default, the
One True Time Source is the system clock (a wall clock), and tain_now()
is actually an alias to tain_wallclock_read(). At the start of a
program, calling tain_now_set_stopwatch() will define a monotonic
clock (if supported by the system) as the One True Time Source, which will
make tain_now() resistant to system clock jumps, but will also
make it unsuitable for timestamping.
In other words: the first time you need to read the clock, or
at the start of your program, you should use
tain_now_set_wallclock() or tain_now_set_stopwatch()
depending on whether you want the One True Time Source to be the system
clock (CLOCK_REALTIME or gettimeofday()) or a stopwatch
(CLOCK_MONOTONIC, if supported). Afterwards, every time you need to read
from that time source, use tain_now(). skalibs functions that
may block, such as iopause_g, internally call tain_now()
to update the timestamp they're using, so they will use the time source
you have defined. (Functions ending in _g
use the STAMP global variable to store the current timestamp.)
Converting to/from libc representations
The following functions only convert from a certain structure
format to another; they do not make any assumption about the
format of the time contained in those structures. For instance,
for the tai_from_timeval function, if the struct timeval
contains an absolute UTC time, then the tai will also contain
the same UTC time. Despite being a tai, it may contain
something else than TAI time.
If you need conversion from the native machine
system clock format to TAI, see the next section.
int tai_from_time (tai *t, time_t u)
int tai_relative_from_time (tai *t, time_t u)
Those functions convert an absolute (resp. relative) time in a
time_t to an absolute (resp. relative)
time in a tai, with a 1-second precision. They return 1,
unless the time_t value is invalid (in which case they return 0).
int time_from_tai (time_t *u, tai const *t)
int time_from_tai_relative (time_t *u, tai const *t)
The inverse functions of the previous ones. Be aware that
time_t is 32 bits on some systems and cannot store all values
of a tai (in which case the functions will return 0 EOVERFLOW).
int tain_from_timeval (tain *a, struct timeval const *tv)
int tain_relative_from_timeval (tain *a, struct timeval const *tv)
int tain_from_timespec (tain *a, struct timespec const *ts)
int tain_relative_from_timespec (tain *a, struct timespec const *ts)
int timeval_from_tain (struct timeval *tv, tain const *a)
int timeval_from_tain_relative (struct timeval *tv, tain const *a)
int timespec_from_tain (struct timespec *ts, tain const *a)
int timespec_from_tain_relative (struct timespec *ts, tain const *a)
Same conversion operations, between tain and a
struct timeval or struct timespec. The 1-microsecond
(for struct timeval) or 1-nanosecond (for struct timespec)
precision is preserved.
Conversion between TAI and the system clock format
Unlike the previous functions, the functions listed here will
always operate on valid absolute timestamps. Only TAI64 time is
stored in tai structures, and only TAI64N time is stored in
tain structures. These functions will convert to/from TAI,
from/to the machine system clock format, i.e. TAI-10 or UTC
depending on whether skalibs was
compiled with the --enable-tai-clock configure option).
This is useful to get valid TAI/TAI64N timestamps out of
information exported by the system, for instance the time_t
returned by time(),
or in the st_atim, st_mtim or
st_ctim fields of a struct stat.
The functions return 1 in case of success, or 0 if the conversion
could not be performed; in which case errno is set to EINVAL if
the input argument was not a valid timestamp, to EOVERFLOW if the
output could not be represented in the chosen format (which may
happen on systems with a 32 bit time_t), or other error
codes.
int tai_from_time_sysclock (tai *a, time_t t)
int time_sysclock_from_tai (time_t *t, tai const *a)
int tain_from_timeval_sysclock (tain *a, struct timeval const *tv)
int timeval_sysclock_from_tain (struct timeval *tv, tain const *a)
int tain_from_timespec_sysclock (tain *a, struct timespec const *ts)
int timespec_sysclock_from_tain (struct timespec *ts, tain const *a)
Conversions to/from basic types
int tain_uint (tain *a, unsigned int c)
Stores a relative time of c seconds into a.
Normally returns 1, but may return 0 EINVAL on pathological numbers.
int tain_from_millisecs (tain *a, int ms)
This function makes a tain representing a relative
time of ms milliseconds. ms must be non-negative.
The function returns 1, unless ms is negative, in which case
it returns 0 EINVAL.
int taino_millisecs (tain const *a)
If *a contains a non-negative relative time that fits into
a 31-bit integer number of milliseconds, the function returns that
number. Else it returns -1 EINVAL.
Time computations
int tai_add (tai *t, tai const *t1, tai const *t2)
Stores *t1 + *t2 into t. Of course, *t1
and *t2 must not both represent absolute times.
The function normally returns 1, but will return 0 on bad inputs.
int tai_sub (tai *t, tai const *t1, tai const *t2)
Stores *t1 - *t2 into t. *t1 cannot
be relative if *t2 is absolute. If they are both relative or
both absolute, then *t is relative, else it's absolute.
The function normally returns 1, but will return 0 on bad inputs.
int tain_add (tain *a, tain const *a1, tain const *a2)
int tain_sub (tain *a, tain const *a1, tain const *a2)
Same thing with tain.
int tain_addsec (tain *a, tain const *a1, int c)
Adds c seconds to *a1 and stores the result into a.
c may be negative.
void tain_half (tain *a, tain const *b)
Stores *b/2 into a. *b must be relative.
Comparing dates or durations
int tai_less (tai const *t1, tai const *t2)
int tain_less (tain const *t1, tain const *t2)
Those functions return nonzero iff *t1 is lesser than *t2.
*t1 and *t2 must be both relative, or both absolute.
Packing and unpacking
void tai_pack (char *s, tai const *t)
Marshals *t into the buffer s points to, which
must be preallocated with at least TAI_PACK (8) characters. Afterwards,
the buffer contains the
external TAI64 format
representation of *t.
void tai_unpack (char const *s, tai *t)
Unmarshals the
external TAI64 format
label pointed to by s (at least TAI_PACK characters) and stores
the result into t.
void tain_pack (char *s, tain const *a)
void tain_unpack (char const *s, tain *a)
Same thing with
external TAI64N format,
using TAIN_PACK (12) characters.
Formatting and scanning
unsigned int tain_fmt (char *s, tain const *a)
Writes into s an ASCII representation of *a in external
TAI64N format. s must point to a preallocated buffer of at least
TAIN_PACK*2 (24) characters. The function returns the number of bytes that
have been written to s (24).
unsigned int tain_scan (char const *s, tain *a)
Reads 24 characters from s; if those characters are a valid ASCII
representation of the external TAI64N format of some time value, this value
is stored into a, and 24 is returned. Else 0 is returned.
Timestamping
A TAI64N timestamp is a string of 25 characters: a single '@'
character followed by the ASCII representation of the TAI64N external
format of an absolute date.
unsigned int timestamp_fmt (char *s, tain const *a)
Writes a TAI64N timestamp representing the absolute date *a
into the 25 characters pointed to by s. Returns 25.
unsigned int timestamp_scan (char const *s, tain *a)
Reads 25 characters at s. If those characters are a valid TAI64N
timestamp, stores the absolute date in a and returns 25. Else,
returns 0.
int timestamp (char *s)
Writes the current time (read from the system clock) as a TAI64N timestamp
into s. Returns 1 if it succeeds or 0 (and sets errno) if it fails.
TAI64N timestamps are an efficient, robust, and easy-to-use way of
timestampping log lines. They're easy to recognize in automatic data
parsers. Log files where every line starts with a TAI64N timestamp can
be merged and alphanumerically sorted: the resulting file will be
chronologically sorted.
The s6 package
provides tools to convert TAI64N timestamps into human-readable
dates. Please do not embed human-readable dates in your log files,
thus making parsing tools unnecessarily hard to write;
use TAI64N timestamps instead, design tools that can parse them,
and translate them to human-readable form at human analysis time.
skalibs-2.14.2.0/doc/libunixonacid/ 0000775 0000000 0000000 00000000000 14630613211 0016760 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/doc/libunixonacid/index.html 0000664 0000000 0000000 00000003735 14630613211 0020765 0 ustar 00root root 0000000 0000000
skalibs: the unixonacid library interface
libskarnet
skalibs
Software
skarnet.org
The unixonacid library interface
libunixonacid provides higher-level interfaces to Unix
concepts such as the filesystem - for instance, it provides a way to
access several files atomically, be it for reading or for writing - or
interprocess communication.
Compiling
- Use #include <skalibs/unixonacid.h>
Programming
The skalibs/unixonacid.h header is actually a concatenation of other
headers, every one of each declaring related structures, macros and
functions.
skalibs-2.14.2.0/doc/libunixonacid/kolbak.html 0000664 0000000 0000000 00000002433 14630613211 0021113 0 ustar 00root root 0000000 0000000
skalibs: the kolbak library interface
libunixonacid
libskarnet
skalibs
Software
skarnet.org
The kolbak library interface
The following functions are declared in the skalibs/kolbak.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
kolbak implements simple queuing of callback functions to use when
sending a message to a peer and expecting an answer, which will be handled
by the callback function. The queue is a circular buffer.
FIXME: To be completed.
skalibs-2.14.2.0/doc/libunixonacid/skaclient.html 0000664 0000000 0000000 00000005044 14630613211 0021626 0 ustar 00root root 0000000 0000000
skalibs: the skaclient library interface
libunixonacid
libskarnet
skalibs
Software
skarnet.org
The skaclient library interface
The following functions are declared in the skalibs/skaclient.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
skaclient is a client-server initiation protocol framework, allowing a process
(the "client") to either connect to another process (the "server") via a Unix domain socket,
or spawn such a "server" process itself. The client and the server then communicate
via two sockets, one for synchronous data, the other for asynchronous
data; they exchange unixmessages.
The skaclient framework is used in several places in skarnet.org software,
whenever a server can send asynchronous data to its client. For instance:
- Communication between notification subscribers such as
s6-ftrig-wait
and their own s6-ftrigrd
daemon
- Communication between clients of the
s6lock library and a
s6lockd
server
- Communication between a client such as
s6-dnsip4-filter,
in need of asynchronous DNS service, and its own
skadnsd
daemon
- The skabus Unix bus
infrastructure is entirely based on the skaclient framework to transmit
unixmessages across processes.
Programming
FIXME: to be completed.
skalibs-2.14.2.0/doc/libunixonacid/unix-timed.html 0000664 0000000 0000000 00000002122 14630613211 0021726 0 ustar 00root root 0000000 0000000
skalibs: the unix-timed library interface
libunixonacid
libskarnet
skalibs
Software
skarnet.org
The unix-timed library interface
The following functions are declared in the skalibs/unix-timed.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
FIXME: to be completed.
skalibs-2.14.2.0/doc/libunixonacid/unix-transactional.html 0000664 0000000 0000000 00000011765 14630613211 0023503 0 ustar 00root root 0000000 0000000
skalibs: the unix-transactional library interface
libunixonacid
libskarnet
skalibs
Software
www.skarnet.org
The unix-transactional library interface
The following functions are declared in the skalibs/unix-transactional.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
unix-transactional provides an API for transactional/reliable
filesystem operations.
Most functions are safe wrappers
around the Unix *at system calls. They differ from the traditional
system calls (safe-wrapped in
djbunix and
allreadwrite) in that
they take an additional argument fd. When file is relative,
it is opened relative to the directory associated with the file descriptor
fd instead of the current working directory.
If file is absolute, they are equivalent to their djbunix
and allreadwrite counterparts.
On systems that do not implement the *at system calls, these
functions fall back to changing the current working directory, opening
file with the corresponding libstddjb function, and restoring
the original working directory using fd_chdir.
Functions
Basic fd operations relative to a directory
int open2_at (int fd, char const *file, int flags)
Safe wrapper around
openat()
when it takes 2 arguments.
int open3_at (int fd, char const *file, int flags)
Safe wrapper around
openat()
when it takes 3 arguments.
int access_at (int fd, char const *file, int amode, unsigned int flag)
Calls
faccessat()
with flags set either to zero, or AT_EACCESS, if flag is nonzero.
This function ensures a fall back on platforms without *at system calls.
int stat_at (int fd, char const *file, struct stat *st)
int lstat_at (int fd, char const *file, struct stat *st)
Calls
fstatat()
without and with the AT_SYMLINK_NOFOLLOW flag, respectively.
This function ensures a fall back on platforms without *at system calls.
DIR *opendir_at (int dfd, char const *name)
Relative version of
opendir().
int opengetlnclose (char const *file, stralloc *sa, int sep)
int opengetlnclose_at (int dirfd, char const *file, stralloc *sa, int sep)
Slurps file (relative to dirfd in the _at version)
into *sa up to (and including) the first sep character.
Returns 1 on success, 0 if some bytes were read but no sep was found,
-1 EPIPE on immediate EOF and -1 (and sets errno) on error.
size_t openwritenclose_at (int dirfd, char const *file, char const *s, size_t n)
size_t openwritevnclose_at (int dirfd, char const *file, struct iovec const *v, unsigned int n)
Relative versions of openwritenclose_unsafe_sync and
openwritevnclose_unsafe_sync in djbunix, except for the fact
that they return the number of bytes written instead of just 1 and 0.
The remaining functions are named after their corresponding libstddjb
functions.
Atomic filesystem deletion
int atomic_rm_rf (char const *filename)
int atomic_rm_rf_tmp (char const *filename, stralloc *tmp)
Renames filename to a unique name and deletes its filesystem subtree.
The difference between these two functions is the same as that between
rm_rf and rm_rf_tmp in djbunix.
skalibs-2.14.2.0/doc/libunixonacid/unixmessage.html 0000664 0000000 0000000 00000002440 14630613211 0022176 0 ustar 00root root 0000000 0000000
skalibs: the unixmessage library interface
libunixonacid
libskarnet
skalibs
Software
skarnet.org
The unixmessage library interface
The following functions are declared in the skalibs/unixmessage.h header,
and implemented in the libskarnet.a or libskarnet.so library.
General information
unixmessage implements message transmission over Unix domain sockets.
Messages are made of standard untyped data (strings), but can also include file
descriptors using fd-passing.
FIXME: To be completed.
skalibs-2.14.2.0/doc/license.html 0000664 0000000 0000000 00000005645 14630613211 0016452 0 ustar 00root root 0000000 0000000
skalibs: license
skalibs
Software
skarnet.org
skalibs license
Source code
The skalibs source code from skalibs is released under the
ISC license,
the text of which can be found in the COPYING file enclosed in the
package.
The license has been chosen for its simplicity - it's short
and to the point - and above all its permissivity. There is nothing
legitimate you should not be able to do with the skalibs code. If
the license somehow stands in the way, please let me know.
Documentation
However, the skalibs documentation, which you are currently
reading, and which is available in the doc/ subdirectory of
the official skalibs tarball, is not provided under
the same license.
The license for the skalibs documentation is more restrictive than
the license for the source code. Namely:
- The exact same disclaimer applies.
- You have the right to download, use and modify the documentation.
- You have the right to distribute unmodified copies of the documentation.
- You have the right to distribute modified copies of the documentation,
provided that:
- The contents and links (not necessarily the appearance) of this file,
license.html, are left unmodified;
- On your documentation's main page,
you explicitly state that the documentation has been modified, and you
set up a
link to the original
skalibs site, explicitly stating that the original software and
documentation can be found there;
- The parts of the documentation that you have modified are
unarguably and undeniably distinguishable from the unmodified parts.
You can, for instance, use a different text color, different background
color, or different text font.
I am aware that the previous restrictions sound completely
ridiculous while the official skalibs documentation is incomplete.
As of 2.14.2.0, I'm not going to enforce those restrictions, but if you're
going to provide documentation for skalibs, don't keep it to yourself,
please send it to me instead. :-)
skalibs-2.14.2.0/doc/upgrade.html 0000664 0000000 0000000 00000041535 14630613211 0016455 0 ustar 00root root 0000000 0000000
skalibs: how to upgrade
skalibs
Software
skarnet.org
in 2.14.2.0
- New skalibs/gol.h header, implementing long options.
- New mkptemp3() function.
in 2.14.1.1
in 2.14.1.0
- New ip46.h macros:
socket_sendnb46_g() and socket_recvnb46_g()
in 2.14.0.1
in 2.14.0.0
- New selfpipe accessor function: selfpipe_fd()
- New djbunix functions: slurpn(), openslurpnclose()
- slurp and openslurpclose are now macros
- New cdb functions: cdb_hashv(), cdbmake_addv()
- New cspawn function, for posix_spawn/fork unification
- child_spawn functions are now declared in cspawn.h
- New sysdeps for posix_spawn options and more
- case_lowerb() and friends now use ctype.h functions, supporting locale
if it is declared in the application.
- case_str() removed, strcasestr() fallback implementation added
in 2.13.1.1
in 2.13.1.0
- New macro: SKALIBS_PATH_MAX
in 2.13.0.0
- New functions: buffer_timed_put(), buffer_timed_puts().
in 2.12.0.1
in 2.12.0.0
- random_init() and random_finish() removed,
as well as random_char().
- random_string() renamed to random_buf().
- random functions now have an early version, to use when
randomness is required before the generator can be seeded (i.e. in
programs running in the very early boot).
- New djbunix functions:
waitn_posix(), waitn_reap_posix()
in 2.11.2.0
- User-provided CPPFLAGS, CFLAGS and LDFLAGS are now honored during
sysdeps autodetection.
- envdir_internal() now has a SKALIBS_ENVDIR_NOCLAMP option
allowing reading of unlimited-size variables.
in 2.11.1.0
- fd_close() now chooses to adapt to Linux's
close()
behaviour (closing the fd on EINTR) over the HP-UX one (not closing it).
Destructors like
close()
being allowed to fail has always been a mistake in the specification and a
programming nightmare, making it impossible to behave correctly on all
systems, but apparently standardization efforts are on the way and the Linux
behaviour seems to be the chosen one.
- New unix-transactional.h function: opendir_at.
in 2.11.0.0
- libbiguint removed.
- Obsolete skalibs/environ.h and skalibs/getpeereid.h headers removed.
- rc4 and md5 functions removed.
- iobuffer removed. fd_cat() and fd_catn() changed signatures.
- All *_t types renamed without the _t suffix,
in order to preserve POSIX namespace.
- subgetopt() renamed to lgetopt().
- All signal functions entirely reworked; cruft removed.
- skalibs/cdb_make.h renamed to skalibs/cdbmake.h;
cdbmake functions now return 1 on success and 0 on failure.
- skalibs/cdb.h redesigned to remove reader state from the
cdb structure itself.
- The unsafe cdb_successor() API has been removed.
- New skalibs/posixplz.h function: munmap_void().
in 2.10.0.3
in 2.10.0.2
in 2.10.0.1
in 2.10.0.0
- New openc_* functions, which are O_CLOEXEC versions of the
djbunix.h open_* functions.
- New ipc_bind_reuse_lock() function, which takes a lock before
deleting a Unix domain socket. The ipc_bind_reuse() function now
uses it, so it won't unconditionally clobber sockets in the filesystem anymore.
- Complete revamping of the pathexec functions, see exec.h.
- Revamping of the locking functions, see
instead of adhoc DJBUNIX_FLAG_NB and DJBUNIX_FLAG_COE.
- Better header separation; webipc.h removed (stuff moved to
socket.h).
- New mkptemp2() function, creating a fifo with a templated name
and an option field for O_NONBLOCK and O_CLOEXEC.
- New sysdep: chroot, testing whether the system has the
chroot() function.
in 2.9.3.0
- New function: stralloc_readyplus_tuned()
in 2.9.2.1
in 2.9.2.0
in 2.9.1.0
- skalibs now works on GNU Hurd without patches.
- New function: path_canonicalize
in 2.9.0.0
- Formatting and scanning functions and macros have been refactored.
- The configure script now emulates autotools-created configure scripts
more closely. In particular, it's now possible to declare an out-of-path
compiler in CC.
- tain_* functions dealing with wall clocks and stopwatches
have been refactored. The --enable-clock and --enable-monotonic
configure switches have been removed. tain_now() can now be told at run
time to use a wall clock (default, or via tain_now_set_wallclock()) or a
stopwatch (via tain_now_set_stopwatch()), instead of it being fixed at
build time.
- Cross-compilation has been made a lot easier, by removing the need to
provide a whole sysdeps directory anymore. Only a few sysdeps - the ones that
need code execution on the target to be autodetected - have to be provided manually,
via a --with-sysdep-K=V option to configure.
Currently, that means one: --with-sysdep-devurandom=yes or
--with-sysdep-devurandom=no.
in 2.8.1.0
- New functions:
- skalibs_regcomp(), which accepts empty regexes even
when regcomp()
does not (e.g. the BSDs).
in 2.8.0.1
- Changes to skalibs/djbtime.h functions
that produce UTC time: when a leap second is hit, utc_from_tai()
now returns 2, and functions writing a struct tm put 60 into
the struct's tm_sec field.
in 2.8.0.0
- The avltreeb macros have been removed. Instead, the
AVLTREEN_DECLARE_AND_INIT() macro has been added.
- The mkdir_unique() function has been removed.
(It duplicated the functionality of the standard mkdtemp()
function.)
- New functions: env_dump(), mk?temp(),
autosurf(), autosurf_name()
- The ancilautoclose and nbwaitall sysdeps have been removed.
- New header: skalibs/posixishard.h
- libskarnet.a now builds as PIC by default no matter
the toolchain's settings. Use the --disable-all-pic configure
option to build static libraries as non-PIC.
in 2.7.0.0
- New functions: ipc_timed_sendv(), unlink_void(),
skagetln_loose(), skagetlnsep_loose(),
genset_deepfree(), gensetdyn_deepfree()
- The dir_close() function now returns void
and leaves errno unchanged.
- The absolutepath() and sarealpath_tmp() functions, as well
as the avl*_deletenode(), skalibs/mininetstring.h and prot
families of functions, have been removed.
- skalibs/djbunix.h does not include
skalibs/env.h anymore.
in 2.6.4.0
in 2.6.3.1
in 2.6.3.0
- New dir_fd function wrapping dirfd() (Solaris doesn't have dirfd()).
- memmem implementation for platforms that don't provide it.
- memmem wrappers: byte_search, siovec_search.
- New functions: atomic_symlink, skagetlnmaxsep, child_spawn3
- New header: skalibs/posixplz.h. Some header reorganization.
- New family of functions: skalibs/textmessage.h, skalibs/textclient.h
- skalibs/environ.h and skalibs/getpeereid.h are now obsolescent.
in 2.6.2.0
- New functions: access_at(), skaclient_timed_aflush().
in 2.6.1.0
in 2.6.0.2
in 2.6.0.1
- openwritenclose() and openwritevnclose() now use
mkstemp()
instead of relying on an unpredictable name (which required a random
generator to be fully initialized).
in 2.6.0.0
- New functions: unixmessage_receiver_hasmsginbuf(),
skalibs_setgroups(), setgroups_with_egid(),
setgroups_and_gid(). The setgroups_and_gid()
function is the one that should be used, if possible: it does the
right thing even on the BSDs. (That's an achievement.)
in 2.5.1.1
in 2.5.1.0
What has changed in skalibs
in 2.5.0.0
- Support for old versions of OpenBSD dropped. At least OpenBSD 5.7
and newer are still supported.
- --enable-replace-libc compilation flag dropped
- skalibs/ushort.h, skalibs/uint.h and skalibs/ulong.h
removed. skalibs/types.h is now a generic header for fmtscan primitives
for various types.
- uint16, uint32 and uint64 types replaced with POSIX
uint16_t, uint32_t and uint64_t.
- APIs changed across all skalibs functions to support more POSIXly correct
types. Main benefit: correct 64-bit support on 64-bit archs with 32-bit int.
in 2.4.0.2
in 2.4.0.1
in 2.4.0.0
- More support for advanced fd callbacks in unixmessage_sender and unixconnection.
- ipc_timed_send(), ipc_timed_recv()
- rt.lib sysdep removed; spawn.lib and timer.lib sysdeps added
- Leap second for 2016-12-31 23:59:60 UTC added
- Complete librandom rewrite
- skalibs/alarm.h added
in 2.3.10.0
- Support for advanced fd callbacks in unixmessage_sender.
in 2.3.9.0
- New functions: bitarray_firstclear_skip and
bitarray_firstset_skip.
in 2.3.8.3
in 2.3.8.2
in 2.3.8.1
in 2.3.8.0
- The /etc/leapsecs.dat file is no longer necessary.
in 2.3.7.1
in 2.3.7.0
- New functions: atomic_rm_rf(), atomic_rm_rf_tmp().
in 2.3.6.1
in 2.3.6.0
- New function: openreadnclose_nb.
in 2.3.5.2
in 2.3.5.1
in 2.3.5.0
- New functions: bitarray_count(), openwritevnclose_at()
in 2.3.4.0
- New function: stat_at()
- The rest of the changes are bugfixes or QoL.
in 2.3.3.0
- New sha512 functions, see skalibs/sha512.h
in 2.3.2.0
in 2.3.1.3
- Bugfix release, no functional changes.
in 2.3.1.2
- The child_spawn* family of functions now resets all signals
to their default values when spawning a program on systems with
posix_spawn().
This should not change anything - it's just paranoia.
- Minor bugfixes.
in 2.3.1.1
- Bugfix release, no functional changes.
in 2.3.1.0
- wait_status() now returns 256 + signal number when WIFSIGNALED().
- new macro wait_estatus() to get WIFSIGNALED information in an exit code.
- new functions in djbunix.h: hiercopy(), hiercopy_tmp()
in 2.3.0.1
- wait_status() now returns 256 (instead of 126) when WIFSIGNALED().
in 2.3.0.0
- buffer_getvall and buffer_putvall have a different interface. (And now work.)
- buffer_read and buffer_write are now deprecated.
- various siovec additions, such as siovec_trunc
in 2.2.1.0
- unixconnection added.
- sig_name and sig_number added.
in 2.2.0.0
- TAI64 and TAI64N conversion functions revisited.
API slightly changed, made more consistent.
in 2.1.0.0
- unixmessage_drop added, part of unixmessage/skaclient hardening against fd leakage
- unixmessage_sender_flush return code aligned with the convention in the rest of skalibs
- unixmessage_sender_flush now handles short writes
- skaclient_start(_async) prototype changed: now takes an option argument
in 2.0.0.0
- The packaging system has completely changed.
- Programs should now link with -lskarnet followed by the appropriate
sysdeps links.
- No compatibility is ensured. Most APIs haven't changed, but no guarantee
is offered.
- The most important change is probably the disparition of struct tai
and struct taia, replaced with the tai_t and tain_t
types. Attosecond precision has been removed - processor speed is almost capped now,
and it looks like nanosecond precision will be enough for the foreseeable future.
- Buffer implementation has changed, and some interfaces too, mainly the
buffer_flush and bufalloc_flush return code.
- skaclient, skalibs' client-server communication suite, has been
entirely reimplemented: it's now using the new "unixmessage" set of primitives
for easier fd-passing.
skalibs-2.14.2.0/package/ 0000775 0000000 0000000 00000000000 14630613211 0014756 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/package/deps.mak 0000664 0000000 0000000 00000412412 14630613211 0016407 0 ustar 00root root 0000000 0000000 #
# This file has been generated by tools/gen-deps.sh
#
src/include/skalibs/alarm.h: src/include/skalibs/tai.h
src/include/skalibs/alloc.h: src/include/skalibs/gccattributes.h
src/include/skalibs/allreadwrite.h: src/include/skalibs/functypes.h
src/include/skalibs/avlnode.h: src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h
src/include/skalibs/avltree.h: src/include/skalibs/avlnode.h src/include/skalibs/functypes.h src/include/skalibs/gensetdyn.h
src/include/skalibs/avltreen.h: src/include/skalibs/avlnode.h src/include/skalibs/functypes.h src/include/skalibs/genset.h
src/include/skalibs/bigkv.h: src/include/skalibs/avltree.h src/include/skalibs/genalloc.h src/include/skalibs/stralloc.h
src/include/skalibs/bitarray.h: src/include/skalibs/gccattributes.h
src/include/skalibs/bufalloc.h: src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h src/include/skalibs/stralloc.h
src/include/skalibs/buffer.h: src/include/skalibs/allreadwrite.h src/include/skalibs/cbuffer.h src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h
src/include/skalibs/bytestr.h: src/include/skalibs/gccattributes.h
src/include/skalibs/cbuffer.h: src/include/skalibs/gccattributes.h
src/include/skalibs/cdb.h: src/include/skalibs/gccattributes.h
src/include/skalibs/cdbmake.h: src/include/skalibs/buffer.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/bigkv.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/devino.h src/include/skalibs/fcntl.h src/include/skalibs/gccattributes.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/error.h: src/include/skalibs/gccattributes.h
src/include/skalibs/exec.h: src/include/skalibs/env.h src/include/skalibs/gccattributes.h src/include/skalibs/posixplz.h
src/include/skalibs/fmtscan.h: src/include/skalibs/gccattributes.h
src/include/skalibs/genalloc.h: src/include/skalibs/functypes.h src/include/skalibs/stralloc.h
src/include/skalibs/genqdyn.h: src/include/skalibs/stralloc.h
src/include/skalibs/genset.h: src/include/skalibs/functypes.h
src/include/skalibs/gensetdyn.h: src/include/skalibs/functypes.h src/include/skalibs/genalloc.h src/include/skalibs/stralloc.h
src/include/skalibs/gol.h: src/include/skalibs/uint64.h
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/strerr.h
src/include/skalibs/netstring.h: src/include/skalibs/buffer.h src/include/skalibs/stralloc.h
src/include/skalibs/posixishard.h: src/include/skalibs/gccattributes.h src/include/skalibs/stat.h
src/include/skalibs/posixplz.h: src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h
src/include/skalibs/random.h: src/include/skalibs/functypes.h src/include/skalibs/stralloc.h
src/include/skalibs/setgroups.h: src/include/skalibs/sysdeps.h
src/include/skalibs/sha512.h: src/include/skalibs/uint64.h
src/include/skalibs/sig.h: src/include/skalibs/gccattributes.h
src/include/skalibs/siovec.h: src/include/skalibs/gccattributes.h
src/include/skalibs/skaclient.h: src/include/skalibs/kolbak.h src/include/skalibs/tai.h src/include/skalibs/unixmessage.h
src/include/skalibs/skalibs.h: src/include/skalibs/datastruct.h src/include/skalibs/posixplz.h src/include/skalibs/random.h src/include/skalibs/stdcrypto.h src/include/skalibs/stddjb.h src/include/skalibs/strerr.h src/include/skalibs/unixonacid.h
src/include/skalibs/skamisc.h: src/include/skalibs/buffer.h src/include/skalibs/stralloc.h
src/include/skalibs/socket.h: src/include/skalibs/fcntl.h src/include/skalibs/gccattributes.h src/include/skalibs/posixplz.h src/include/skalibs/tai.h
src/include/skalibs/stat.h: src/include/skalibs/sysdeps.h
src/include/skalibs/stdcrypto.h: src/include/skalibs/blake2s.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/cdbmake.h src/include/skalibs/cspawn.h src/include/skalibs/devino.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/exec.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/iopause.h src/include/skalibs/ip46.h src/include/skalibs/lolstdio.h src/include/skalibs/netstring.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/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/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
src/include/skalibs/textclient.h: src/include/skalibs/allreadwrite.h src/include/skalibs/tai.h src/include/skalibs/textmessage.h
src/include/skalibs/textmessage.h: src/include/skalibs/allreadwrite.h src/include/skalibs/bufalloc.h src/include/skalibs/buffer.h src/include/skalibs/gccattributes.h src/include/skalibs/stralloc.h src/include/skalibs/tai.h
src/include/skalibs/unix-timed.h: src/include/skalibs/bufalloc.h src/include/skalibs/buffer.h src/include/skalibs/functypes.h src/include/skalibs/stralloc.h src/include/skalibs/tai.h
src/include/skalibs/unix-transactional.h: src/include/skalibs/direntry.h src/include/skalibs/stralloc.h
src/include/skalibs/unixconnection.h: src/include/skalibs/unixmessage.h
src/include/skalibs/unixmessage.h: src/include/skalibs/buffer.h src/include/skalibs/cbuffer.h src/include/skalibs/gccattributes.h src/include/skalibs/genalloc.h src/include/skalibs/stralloc.h src/include/skalibs/tai.h
src/include/skalibs/unixonacid.h: src/include/skalibs/ancil.h src/include/skalibs/kolbak.h src/include/skalibs/skaclient.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h src/include/skalibs/unix-timed.h src/include/skalibs/unix-transactional.h src/include/skalibs/unixconnection.h src/include/skalibs/unixmessage.h
src/libdatastruct/avlnode-internal.h: src/include/skalibs/avlnode.h
src/libdatastruct/genqdyn-internal.h: src/include/skalibs/genqdyn.h
src/libenvexec/envdir-internal.h: src/include/skalibs/stralloc.h
src/libstdcrypto/blake2s-internal.h: src/include/skalibs/blake2s.h
src/libstdcrypto/sha1-internal.h: src/include/skalibs/sha1.h
src/libstdcrypto/sha256-internal.h: src/include/skalibs/sha256.h
src/libstdcrypto/sha512-internal.h: src/include/skalibs/sha512.h
src/libstddjb/cdb-internal.h: src/include/skalibs/cdb.h src/include/skalibs/gccattributes.h
src/libstddjb/cdbmake-internal.h: src/include/skalibs/cdbmake.h
src/libstddjb/djbtime-internal.h: src/include/skalibs/uint64.h
src/libstddjb/fmtscan-internal.h: src/include/skalibs/fmtscan.h src/include/skalibs/uint64.h
src/libunixonacid/skaclient-internal.h: src/include/skalibs/kolbak.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libdatastruct/avlnode_delete.o src/libdatastruct/avlnode_delete.lo: src/libdatastruct/avlnode_delete.c src/libdatastruct/avlnode-internal.h src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_doublerotate.o src/libdatastruct/avlnode_doublerotate.lo: src/libdatastruct/avlnode_doublerotate.c src/libdatastruct/avlnode-internal.h src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_extreme.o src/libdatastruct/avlnode_extreme.lo: src/libdatastruct/avlnode_extreme.c src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_extremenode.o src/libdatastruct/avlnode_extremenode.lo: src/libdatastruct/avlnode_extremenode.c src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_height.o src/libdatastruct/avlnode_height.lo: src/libdatastruct/avlnode_height.c src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_insertnode.o src/libdatastruct/avlnode_insertnode.lo: src/libdatastruct/avlnode_insertnode.c src/libdatastruct/avlnode-internal.h src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_iter.o src/libdatastruct/avlnode_iter.lo: src/libdatastruct/avlnode_iter.c src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_iter_withcancel.o src/libdatastruct/avlnode_iter_withcancel.lo: src/libdatastruct/avlnode_iter_withcancel.c src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_rotate.o src/libdatastruct/avlnode_rotate.lo: src/libdatastruct/avlnode_rotate.c src/libdatastruct/avlnode-internal.h src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_search.o src/libdatastruct/avlnode_search.lo: src/libdatastruct/avlnode_search.c src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_searchnode.o src/libdatastruct/avlnode_searchnode.lo: src/libdatastruct/avlnode_searchnode.c src/libdatastruct/avlnode-internal.h src/include/skalibs/avlnode.h
src/libdatastruct/avlnode_zero.o src/libdatastruct/avlnode_zero.lo: src/libdatastruct/avlnode_zero.c src/include/skalibs/avlnode.h
src/libdatastruct/avltree_delete.o src/libdatastruct/avltree_delete.lo: src/libdatastruct/avltree_delete.c src/include/skalibs/avlnode.h src/include/skalibs/avltree.h src/include/skalibs/gensetdyn.h
src/libdatastruct/avltree_free.o src/libdatastruct/avltree_free.lo: src/libdatastruct/avltree_free.c src/include/skalibs/avltree.h src/include/skalibs/gensetdyn.h
src/libdatastruct/avltree_init.o src/libdatastruct/avltree_init.lo: src/libdatastruct/avltree_init.c src/include/skalibs/avlnode.h src/include/skalibs/avltree.h src/include/skalibs/gensetdyn.h
src/libdatastruct/avltree_insert.o src/libdatastruct/avltree_insert.lo: src/libdatastruct/avltree_insert.c src/include/skalibs/avltree.h
src/libdatastruct/avltree_newnode.o src/libdatastruct/avltree_newnode.lo: src/libdatastruct/avltree_newnode.c src/include/skalibs/avlnode.h src/include/skalibs/avltree.h src/include/skalibs/gensetdyn.h
src/libdatastruct/avltree_zero.o src/libdatastruct/avltree_zero.lo: src/libdatastruct/avltree_zero.c src/include/skalibs/avltree.h
src/libdatastruct/avltreen_delete.o src/libdatastruct/avltreen_delete.lo: src/libdatastruct/avltreen_delete.c src/include/skalibs/avlnode.h src/include/skalibs/avltreen.h src/include/skalibs/genset.h
src/libdatastruct/avltreen_init.o src/libdatastruct/avltreen_init.lo: src/libdatastruct/avltreen_init.c src/include/skalibs/avlnode.h src/include/skalibs/avltreen.h src/include/skalibs/genset.h
src/libdatastruct/avltreen_insert.o src/libdatastruct/avltreen_insert.lo: src/libdatastruct/avltreen_insert.c src/include/skalibs/avltreen.h
src/libdatastruct/avltreen_newnode.o src/libdatastruct/avltreen_newnode.lo: src/libdatastruct/avltreen_newnode.c src/include/skalibs/avlnode.h src/include/skalibs/avltreen.h src/include/skalibs/genset.h
src/libdatastruct/bigkv_fill.o src/libdatastruct/bigkv_fill.lo: src/libdatastruct/bigkv_fill.c src/include/skalibs/avltree.h src/include/skalibs/bigkv.h src/include/skalibs/bytestr.h src/include/skalibs/genalloc.h src/include/skalibs/stralloc.h
src/libdatastruct/bigkv_free.o src/libdatastruct/bigkv_free.lo: src/libdatastruct/bigkv_free.c src/include/skalibs/avltree.h src/include/skalibs/bigkv.h src/include/skalibs/genalloc.h src/include/skalibs/stralloc.h
src/libdatastruct/bigkv_search.o src/libdatastruct/bigkv_search.lo: src/libdatastruct/bigkv_search.c src/include/skalibs/avltree.h src/include/skalibs/bigkv.h src/include/skalibs/genalloc.h
src/libdatastruct/bigkv_zero.o src/libdatastruct/bigkv_zero.lo: src/libdatastruct/bigkv_zero.c src/include/skalibs/bigkv.h
src/libdatastruct/genqdyn_clean.o src/libdatastruct/genqdyn_clean.lo: src/libdatastruct/genqdyn_clean.c src/libdatastruct/genqdyn-internal.h
src/libdatastruct/genqdyn_free.o src/libdatastruct/genqdyn_free.lo: src/libdatastruct/genqdyn_free.c src/include/skalibs/genqdyn.h src/include/skalibs/stralloc.h
src/libdatastruct/genqdyn_init.o src/libdatastruct/genqdyn_init.lo: src/libdatastruct/genqdyn_init.c src/include/skalibs/genqdyn.h src/include/skalibs/stralloc.h
src/libdatastruct/genqdyn_pop.o src/libdatastruct/genqdyn_pop.lo: src/libdatastruct/genqdyn_pop.c src/libdatastruct/genqdyn-internal.h src/include/skalibs/genqdyn.h
src/libdatastruct/genqdyn_push.o src/libdatastruct/genqdyn_push.lo: src/libdatastruct/genqdyn_push.c src/include/skalibs/genqdyn.h src/include/skalibs/stralloc.h
src/libdatastruct/genqdyn_unpush.o src/libdatastruct/genqdyn_unpush.lo: src/libdatastruct/genqdyn_unpush.c src/include/skalibs/genqdyn.h src/include/skalibs/stralloc.h
src/libdatastruct/genqdyn_zero.o src/libdatastruct/genqdyn_zero.lo: src/libdatastruct/genqdyn_zero.c src/include/skalibs/genqdyn.h
src/libdatastruct/genset.o src/libdatastruct/genset.lo: src/libdatastruct/genset.c src/include/skalibs/genset.h
src/libdatastruct/genset_deepfree.o src/libdatastruct/genset_deepfree.lo: src/libdatastruct/genset_deepfree.c src/include/skalibs/functypes.h src/include/skalibs/genset.h
src/libdatastruct/genset_iter_nocancel.o src/libdatastruct/genset_iter_nocancel.lo: src/libdatastruct/genset_iter_nocancel.c src/include/skalibs/bitarray.h src/include/skalibs/genset.h
src/libdatastruct/genset_iter_withcancel.o src/libdatastruct/genset_iter_withcancel.lo: src/libdatastruct/genset_iter_withcancel.c src/include/skalibs/genset.h
src/libdatastruct/gensetdyn_deepfree.o src/libdatastruct/gensetdyn_deepfree.lo: src/libdatastruct/gensetdyn_deepfree.c src/include/skalibs/functypes.h src/include/skalibs/gensetdyn.h
src/libdatastruct/gensetdyn_delete.o src/libdatastruct/gensetdyn_delete.lo: src/libdatastruct/gensetdyn_delete.c src/include/skalibs/genalloc.h src/include/skalibs/gensetdyn.h
src/libdatastruct/gensetdyn_free.o src/libdatastruct/gensetdyn_free.lo: src/libdatastruct/gensetdyn_free.c src/include/skalibs/genalloc.h src/include/skalibs/gensetdyn.h src/include/skalibs/stralloc.h
src/libdatastruct/gensetdyn_init.o src/libdatastruct/gensetdyn_init.lo: src/libdatastruct/gensetdyn_init.c src/include/skalibs/genalloc.h src/include/skalibs/gensetdyn.h src/include/skalibs/stralloc.h
src/libdatastruct/gensetdyn_iter_nocancel.o src/libdatastruct/gensetdyn_iter_nocancel.lo: src/libdatastruct/gensetdyn_iter_nocancel.c src/include/skalibs/bitarray.h src/include/skalibs/gensetdyn.h
src/libdatastruct/gensetdyn_iter_withcancel.o src/libdatastruct/gensetdyn_iter_withcancel.lo: src/libdatastruct/gensetdyn_iter_withcancel.c src/include/skalibs/gensetdyn.h
src/libdatastruct/gensetdyn_new.o src/libdatastruct/gensetdyn_new.lo: src/libdatastruct/gensetdyn_new.c src/include/skalibs/genalloc.h src/include/skalibs/gensetdyn.h
src/libdatastruct/gensetdyn_ready.o src/libdatastruct/gensetdyn_ready.lo: src/libdatastruct/gensetdyn_ready.c src/include/skalibs/genalloc.h src/include/skalibs/gensetdyn.h src/include/skalibs/stralloc.h
src/libdatastruct/gensetdyn_zero.o src/libdatastruct/gensetdyn_zero.lo: src/libdatastruct/gensetdyn_zero.c src/include/skalibs/gensetdyn.h
src/libenvexec/child_spawn.o src/libenvexec/child_spawn.lo: src/libenvexec/child_spawn.c src/include/skalibs/cspawn.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/types.h
src/libenvexec/child_spawn0.o src/libenvexec/child_spawn0.lo: src/libenvexec/child_spawn0.c src/include/skalibs/cspawn.h
src/libenvexec/child_spawn1_internal.o src/libenvexec/child_spawn1_internal.lo: src/libenvexec/child_spawn1_internal.c src/libenvexec/cspawn-internal.h src/include/skalibs/cspawn.h src/include/skalibs/djbunix.h
src/libenvexec/child_spawn1_pipe.o src/libenvexec/child_spawn1_pipe.lo: src/libenvexec/child_spawn1_pipe.c src/libenvexec/cspawn-internal.h src/include/skalibs/cspawn.h
src/libenvexec/child_spawn1_socket.o src/libenvexec/child_spawn1_socket.lo: src/libenvexec/child_spawn1_socket.c src/libenvexec/cspawn-internal.h src/include/skalibs/cspawn.h src/include/skalibs/socket.h
src/libenvexec/child_spawn2.o src/libenvexec/child_spawn2.lo: src/libenvexec/child_spawn2.c src/include/skalibs/cspawn.h src/include/skalibs/djbunix.h
src/libenvexec/child_spawn3.o src/libenvexec/child_spawn3.lo: src/libenvexec/child_spawn3.c src/include/skalibs/cspawn.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/types.h
src/libenvexec/cspawn.o src/libenvexec/cspawn.lo: src/libenvexec/cspawn.c src/include/skalibs/allreadwrite.h src/include/skalibs/config.h src/include/skalibs/cspawn.h src/include/skalibs/djbunix.h src/include/skalibs/exec.h src/include/skalibs/nonposix.h src/include/skalibs/selfpipe.h src/include/skalibs/sig.h src/include/skalibs/sysdeps.h
src/libenvexec/env_addmodif.o src/libenvexec/env_addmodif.lo: src/libenvexec/env_addmodif.c src/include/skalibs/env.h src/include/skalibs/stralloc.h
src/libenvexec/env_dump.o src/libenvexec/env_dump.lo: src/libenvexec/env_dump.c src/include/skalibs/bytestr.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/nonposix.h src/include/skalibs/unix-transactional.h
src/libenvexec/env_get.o src/libenvexec/env_get.lo: src/libenvexec/env_get.c src/include/skalibs/posixplz.h
src/libenvexec/env_get2.o src/libenvexec/env_get2.lo: src/libenvexec/env_get2.c src/include/skalibs/bytestr.h src/include/skalibs/env.h
src/libenvexec/env_len.o src/libenvexec/env_len.lo: src/libenvexec/env_len.c src/include/skalibs/env.h
src/libenvexec/env_make.o src/libenvexec/env_make.lo: src/libenvexec/env_make.c src/include/skalibs/env.h
src/libenvexec/env_merg.o src/libenvexec/env_merg.lo: src/libenvexec/env_merg.c src/include/skalibs/env.h
src/libenvexec/env_merge.o src/libenvexec/env_merge.lo: src/libenvexec/env_merge.c src/include/skalibs/bytestr.h src/include/skalibs/env.h
src/libenvexec/env_mergen.o src/libenvexec/env_mergen.lo: src/libenvexec/env_mergen.c src/include/skalibs/env.h
src/libenvexec/env_mergn.o src/libenvexec/env_mergn.lo: src/libenvexec/env_mergn.c src/include/skalibs/env.h
src/libenvexec/env_string.o src/libenvexec/env_string.lo: src/libenvexec/env_string.c src/include/skalibs/env.h src/include/skalibs/stralloc.h
src/libenvexec/envalloc_0.o src/libenvexec/envalloc_0.lo: src/libenvexec/envalloc_0.c src/include/skalibs/envalloc.h src/include/skalibs/genalloc.h
src/libenvexec/envalloc_make.o src/libenvexec/envalloc_make.lo: src/libenvexec/envalloc_make.c src/include/skalibs/env.h src/include/skalibs/envalloc.h src/include/skalibs/genalloc.h
src/libenvexec/envalloc_merge.o src/libenvexec/envalloc_merge.lo: src/libenvexec/envalloc_merge.c src/include/skalibs/bytestr.h src/include/skalibs/env.h src/include/skalibs/envalloc.h src/include/skalibs/genalloc.h
src/libenvexec/envalloc_uniq.o src/libenvexec/envalloc_uniq.lo: src/libenvexec/envalloc_uniq.c src/include/skalibs/bytestr.h src/include/skalibs/envalloc.h src/include/skalibs/genalloc.h
src/libenvexec/envdir.o src/libenvexec/envdir.lo: src/libenvexec/envdir.c src/include/skalibs/env.h src/libenvexec/envdir-internal.h
src/libenvexec/envdir_clamp.o src/libenvexec/envdir_clamp.lo: src/libenvexec/envdir_clamp.c src/include/skalibs/bytestr.h src/include/skalibs/direntry.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/libenvexec/envdir-internal.h src/include/skalibs/stralloc.h
src/libenvexec/envdir_noclamp.o src/libenvexec/envdir_noclamp.lo: src/libenvexec/envdir_noclamp.c src/include/skalibs/buffer.h src/include/skalibs/bytestr.h src/include/skalibs/direntry.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/libenvexec/envdir-internal.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libenvexec/exec0_ae.o src/libenvexec/exec0_ae.lo: src/libenvexec/exec0_ae.c src/include/skalibs/exec.h
src/libenvexec/exec_ae.o src/libenvexec/exec_ae.lo: src/libenvexec/exec_ae.c src/include/skalibs/config.h src/include/skalibs/exec.h src/include/skalibs/posixplz.h
src/libenvexec/gcspawn.o src/libenvexec/gcspawn.lo: src/libenvexec/gcspawn.c src/include/skalibs/allreadwrite.h src/include/skalibs/cspawn.h src/include/skalibs/djbunix.h src/include/skalibs/types.h
src/libenvexec/gmspawn_afn.o src/libenvexec/gmspawn_afn.lo: src/libenvexec/gmspawn_afn.c src/include/skalibs/cspawn.h src/include/skalibs/env.h
src/libenvexec/mexec0_af.o src/libenvexec/mexec0_af.lo: src/libenvexec/mexec0_af.c src/include/skalibs/exec.h
src/libenvexec/mexec0_afm.o src/libenvexec/mexec0_afm.lo: src/libenvexec/mexec0_afm.c src/include/skalibs/exec.h
src/libenvexec/mexec0_afn.o src/libenvexec/mexec0_afn.lo: src/libenvexec/mexec0_afn.c src/include/skalibs/exec.h
src/libenvexec/mexec_af.o src/libenvexec/mexec_af.lo: src/libenvexec/mexec_af.c src/include/skalibs/env.h src/include/skalibs/exec.h src/include/skalibs/stralloc.h
src/libenvexec/mexec_afm.o src/libenvexec/mexec_afm.lo: src/libenvexec/mexec_afm.c src/include/skalibs/bytestr.h src/include/skalibs/exec.h
src/libenvexec/mexec_afn.o src/libenvexec/mexec_afn.lo: src/libenvexec/mexec_afn.c src/include/skalibs/env.h src/include/skalibs/exec.h
src/libenvexec/mspawn_af.o src/libenvexec/mspawn_af.lo: src/libenvexec/mspawn_af.c src/include/skalibs/cspawn.h src/include/skalibs/env.h src/include/skalibs/stralloc.h
src/libenvexec/mspawn_afm.o src/libenvexec/mspawn_afm.lo: src/libenvexec/mspawn_afm.c src/include/skalibs/bytestr.h src/include/skalibs/cspawn.h
src/libenvexec/mspawn_afn.o src/libenvexec/mspawn_afn.lo: src/libenvexec/mspawn_afn.c src/include/skalibs/cspawn.h src/include/skalibs/env.h
src/libenvexec/xexec0_ae.o src/libenvexec/xexec0_ae.lo: src/libenvexec/xexec0_ae.c src/include/skalibs/exec.h
src/libenvexec/xexec_ae.o src/libenvexec/xexec_ae.lo: src/libenvexec/xexec_ae.c src/include/skalibs/exec.h src/include/skalibs/strerr.h
src/libenvexec/xexecvep.o src/libenvexec/xexecvep.lo: src/libenvexec/xexecvep.c src/include/skalibs/exec.h src/include/skalibs/posixplz.h src/include/skalibs/strerr.h
src/libenvexec/xexecvep_loose.o src/libenvexec/xexecvep_loose.lo: src/libenvexec/xexecvep_loose.c src/include/skalibs/exec.h src/include/skalibs/posixplz.h src/include/skalibs/strerr.h
src/libenvexec/xmexec0_af.o src/libenvexec/xmexec0_af.lo: src/libenvexec/xmexec0_af.c src/include/skalibs/exec.h src/include/skalibs/strerr.h
src/libenvexec/xmexec0_afm.o src/libenvexec/xmexec0_afm.lo: src/libenvexec/xmexec0_afm.c src/include/skalibs/exec.h src/include/skalibs/strerr.h
src/libenvexec/xmexec0_afn.o src/libenvexec/xmexec0_afn.lo: src/libenvexec/xmexec0_afn.c src/include/skalibs/exec.h src/include/skalibs/strerr.h
src/libenvexec/xmexec_af.o src/libenvexec/xmexec_af.lo: src/libenvexec/xmexec_af.c src/include/skalibs/exec.h src/include/skalibs/strerr.h
src/libenvexec/xmexec_afm.o src/libenvexec/xmexec_afm.lo: src/libenvexec/xmexec_afm.c src/include/skalibs/exec.h src/include/skalibs/strerr.h
src/libenvexec/xmexec_afn.o src/libenvexec/xmexec_afn.lo: src/libenvexec/xmexec_afn.c src/include/skalibs/exec.h src/include/skalibs/strerr.h
src/libenvexec/xmspawn_af.o src/libenvexec/xmspawn_af.lo: src/libenvexec/xmspawn_af.c src/include/skalibs/cspawn.h src/include/skalibs/strerr.h
src/libenvexec/xmspawn_afm.o src/libenvexec/xmspawn_afm.lo: src/libenvexec/xmspawn_afm.c src/include/skalibs/cspawn.h src/include/skalibs/strerr.h
src/libenvexec/xmspawn_afn.o src/libenvexec/xmspawn_afn.lo: src/libenvexec/xmspawn_afn.c src/include/skalibs/cspawn.h src/include/skalibs/strerr.h
src/libposixplz/doublefork.o src/libposixplz/doublefork.lo: src/libposixplz/doublefork.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h src/include/skalibs/uint64.h
src/libposixplz/execvep.o src/libposixplz/execvep.lo: src/libposixplz/execvep.c src/libposixplz/posixplz-internal.h src/include/skalibs/posixplz.h
src/libposixplz/execvep_internal.o src/libposixplz/execvep_internal.lo: src/libposixplz/execvep_internal.c src/include/skalibs/bytestr.h src/include/skalibs/posixplz.h
src/libposixplz/execvep_loose.o src/libposixplz/execvep_loose.lo: src/libposixplz/execvep_loose.c src/libposixplz/posixplz-internal.h src/include/skalibs/posixplz.h
src/libposixplz/getpeereid.o src/libposixplz/getpeereid.lo: src/libposixplz/getpeereid.c src/include/skalibs/nonposix.h src/include/skalibs/posixplz.h src/include/skalibs/sysdeps.h
src/libposixplz/memmem.o src/libposixplz/memmem.lo: src/libposixplz/memmem.c src/include/skalibs/posixplz.h src/include/skalibs/sysdeps.h
src/libposixplz/mkbtemp.o src/libposixplz/mkbtemp.lo: src/libposixplz/mkbtemp.c src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libposixplz/mkctemp.o src/libposixplz/mkctemp.lo: src/libposixplz/mkctemp.c src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libposixplz/mkfiletemp.o src/libposixplz/mkfiletemp.lo: src/libposixplz/mkfiletemp.c src/include/skalibs/posixplz.h src/include/skalibs/random.h
src/libposixplz/mkhtemp.o src/libposixplz/mkhtemp.lo: src/libposixplz/mkhtemp.c src/include/skalibs/posixplz.h
src/libposixplz/mklinktemp.o src/libposixplz/mklinktemp.lo: src/libposixplz/mklinktemp.c src/include/skalibs/djbunix.h src/libposixplz/posixplz-internal.h src/include/skalibs/posixplz.h
src/libposixplz/mkltemp.o src/libposixplz/mkltemp.lo: src/libposixplz/mkltemp.c src/include/skalibs/posixplz.h
src/libposixplz/mkptemp.o src/libposixplz/mkptemp.lo: src/libposixplz/mkptemp.c src/include/skalibs/posixplz.h
src/libposixplz/mkptemp2.o src/libposixplz/mkptemp2.lo: src/libposixplz/mkptemp2.c src/include/skalibs/posixplz.h
src/libposixplz/mkptemp3.o src/libposixplz/mkptemp3.lo: src/libposixplz/mkptemp3.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/posixplz.h
src/libposixplz/munmap_void.o src/libposixplz/munmap_void.lo: src/libposixplz/munmap_void.c src/include/skalibs/posixplz.h
src/libposixplz/setgroups.o src/libposixplz/setgroups.lo: src/libposixplz/setgroups.c src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/setgroups.h src/include/skalibs/sysdeps.h
src/libposixplz/strcasestr.o src/libposixplz/strcasestr.lo: src/libposixplz/strcasestr.c src/include/skalibs/bytestr.h src/include/skalibs/sysdeps.h
src/libposixplz/strnlen.o src/libposixplz/strnlen.lo: src/libposixplz/strnlen.c src/include/skalibs/bytestr.h src/include/skalibs/posixishard.h src/include/skalibs/sysdeps.h
src/libposixplz/touch.o src/libposixplz/touch.lo: src/libposixplz/touch.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/posixplz.h src/include/skalibs/sysdeps.h
src/libposixplz/unlink_void.o src/libposixplz/unlink_void.lo: src/libposixplz/unlink_void.c src/include/skalibs/posixplz.h
src/librandom/autosurf.o src/librandom/autosurf.lo: src/librandom/autosurf.c src/include/skalibs/sha1.h src/include/skalibs/surf.h src/include/skalibs/tai.h src/include/skalibs/uint32.h
src/librandom/autosurf_name.o src/librandom/autosurf_name.lo: src/librandom/autosurf_name.c src/include/skalibs/random.h src/include/skalibs/surf.h
src/librandom/random_buf.o src/librandom/random_buf.lo: src/librandom/random_buf.c src/include/skalibs/nonposix.h src/include/skalibs/random.h src/include/skalibs/surf.h src/include/skalibs/sysdeps.h
src/librandom/random_buf_early.o src/librandom/random_buf_early.lo: src/librandom/random_buf_early.c src/include/skalibs/nonposix.h src/include/skalibs/random.h src/include/skalibs/surf.h src/include/skalibs/sysdeps.h
src/librandom/random_devurandom.o src/librandom/random_devurandom.lo: src/librandom/random_devurandom.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/random.h src/include/skalibs/strerr.h
src/librandom/random_name_from.o src/librandom/random_name_from.lo: src/librandom/random_name_from.c src/include/skalibs/functypes.h src/include/skalibs/random.h
src/librandom/random_sauniquename_from.o src/librandom/random_sauniquename_from.lo: src/librandom/random_sauniquename_from.c src/include/skalibs/random.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/librandom/random_uint32_from.o src/librandom/random_uint32_from.lo: src/librandom/random_uint32_from.c src/include/skalibs/functypes.h src/include/skalibs/random.h src/include/skalibs/uint32.h
src/librandom/random_unsort_from.o src/librandom/random_unsort_from.lo: src/librandom/random_unsort_from.c src/include/skalibs/random.h
src/librandom/surf.o src/librandom/surf.lo: src/librandom/surf.c src/include/skalibs/surf.h src/include/skalibs/uint32.h
src/librandom/surf_init.o src/librandom/surf_init.lo: src/librandom/surf_init.c src/include/skalibs/surf.h src/include/skalibs/uint32.h
src/libstdcrypto/blake2s_final.o src/libstdcrypto/blake2s_final.lo: src/libstdcrypto/blake2s_final.c src/libstdcrypto/blake2s-internal.h src/include/skalibs/blake2s.h src/include/skalibs/uint32.h
src/libstdcrypto/blake2s_init.o src/libstdcrypto/blake2s_init.lo: src/libstdcrypto/blake2s_init.c src/include/skalibs/blake2s.h
src/libstdcrypto/blake2s_transform.o src/libstdcrypto/blake2s_transform.lo: src/libstdcrypto/blake2s_transform.c src/libstdcrypto/blake2s-internal.h src/include/skalibs/blake2s.h src/include/skalibs/uint32.h
src/libstdcrypto/blake2s_update.o src/libstdcrypto/blake2s_update.lo: src/libstdcrypto/blake2s_update.c src/libstdcrypto/blake2s-internal.h src/include/skalibs/blake2s.h
src/libstdcrypto/sha1_feed.o src/libstdcrypto/sha1_feed.lo: src/libstdcrypto/sha1_feed.c src/include/skalibs/bytestr.h src/libstdcrypto/sha1-internal.h src/include/skalibs/sha1.h
src/libstdcrypto/sha1_final.o src/libstdcrypto/sha1_final.lo: src/libstdcrypto/sha1_final.c src/libstdcrypto/sha1-internal.h src/include/skalibs/sha1.h src/include/skalibs/uint32.h
src/libstdcrypto/sha1_init.o src/libstdcrypto/sha1_init.lo: src/libstdcrypto/sha1_init.c src/include/skalibs/sha1.h
src/libstdcrypto/sha1_transform.o src/libstdcrypto/sha1_transform.lo: src/libstdcrypto/sha1_transform.c src/libstdcrypto/sha1-internal.h
src/libstdcrypto/sha1_update.o src/libstdcrypto/sha1_update.lo: src/libstdcrypto/sha1_update.c src/libstdcrypto/sha1-internal.h src/include/skalibs/sha1.h
src/libstdcrypto/sha256_feed.o src/libstdcrypto/sha256_feed.lo: src/libstdcrypto/sha256_feed.c src/include/skalibs/bytestr.h src/libstdcrypto/sha256-internal.h src/include/skalibs/sha256.h
src/libstdcrypto/sha256_final.o src/libstdcrypto/sha256_final.lo: src/libstdcrypto/sha256_final.c src/include/skalibs/bytestr.h src/libstdcrypto/sha256-internal.h src/include/skalibs/sha256.h
src/libstdcrypto/sha256_init.o src/libstdcrypto/sha256_init.lo: src/libstdcrypto/sha256_init.c src/include/skalibs/sha256.h
src/libstdcrypto/sha256_transform.o src/libstdcrypto/sha256_transform.lo: src/libstdcrypto/sha256_transform.c src/libstdcrypto/sha256-internal.h
src/libstdcrypto/sha256_update.o src/libstdcrypto/sha256_update.lo: src/libstdcrypto/sha256_update.c src/libstdcrypto/sha256-internal.h src/include/skalibs/sha256.h
src/libstdcrypto/sha512_final.o src/libstdcrypto/sha512_final.lo: src/libstdcrypto/sha512_final.c src/libstdcrypto/sha512-internal.h src/include/skalibs/sha512.h src/include/skalibs/uint64.h
src/libstdcrypto/sha512_init.o src/libstdcrypto/sha512_init.lo: src/libstdcrypto/sha512_init.c src/include/skalibs/sha512.h
src/libstdcrypto/sha512_transform.o src/libstdcrypto/sha512_transform.lo: src/libstdcrypto/sha512_transform.c src/libstdcrypto/sha512-internal.h src/include/skalibs/sha512.h src/include/skalibs/uint64.h
src/libstdcrypto/sha512_update.o src/libstdcrypto/sha512_update.lo: src/libstdcrypto/sha512_update.c src/libstdcrypto/sha512-internal.h src/include/skalibs/sha512.h
src/libstddjb/alarm_deadline.o src/libstddjb/alarm_deadline.lo: src/libstddjb/alarm_deadline.c src/libstddjb/alarm-internal.h src/include/skalibs/alarm.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h
src/libstddjb/alarm_disable.o src/libstddjb/alarm_disable.lo: src/libstddjb/alarm_disable.c src/libstddjb/alarm-internal.h src/include/skalibs/alarm.h src/include/skalibs/sysdeps.h
src/libstddjb/alarm_milliseconds.o src/libstddjb/alarm_milliseconds.lo: src/libstddjb/alarm_milliseconds.c src/libstddjb/alarm-internal.h src/include/skalibs/alarm.h src/include/skalibs/sysdeps.h
src/libstddjb/alarm_timeout.o src/libstddjb/alarm_timeout.lo: src/libstddjb/alarm_timeout.c src/libstddjb/alarm-internal.h src/include/skalibs/alarm.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h
src/libstddjb/alloc.o src/libstddjb/alloc.lo: src/libstddjb/alloc.c src/include/skalibs/alloc.h
src/libstddjb/alloc_realloc.o src/libstddjb/alloc_realloc.lo: src/libstddjb/alloc_realloc.c src/include/skalibs/alloc.h
src/libstddjb/allread.o src/libstddjb/allread.lo: src/libstddjb/allread.c src/include/skalibs/allreadwrite.h
src/libstddjb/allreadv.o src/libstddjb/allreadv.lo: src/libstddjb/allreadv.c src/include/skalibs/allreadwrite.h
src/libstddjb/allreadwrite.o src/libstddjb/allreadwrite.lo: src/libstddjb/allreadwrite.c src/include/skalibs/allreadwrite.h
src/libstddjb/allreadwritev.o src/libstddjb/allreadwritev.lo: src/libstddjb/allreadwritev.c src/include/skalibs/allreadwrite.h src/include/skalibs/siovec.h
src/libstddjb/allwrite.o src/libstddjb/allwrite.lo: src/libstddjb/allwrite.c src/include/skalibs/allreadwrite.h src/include/skalibs/functypes.h
src/libstddjb/allwritev.o src/libstddjb/allwritev.lo: src/libstddjb/allwritev.c src/include/skalibs/allreadwrite.h
src/libstddjb/baprintf.o src/libstddjb/baprintf.lo: src/libstddjb/baprintf.c src/include/skalibs/bufalloc.h src/include/skalibs/lolstdio.h
src/libstddjb/bitarray_and.o src/libstddjb/bitarray_and.lo: src/libstddjb/bitarray_and.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_clearsetn.o src/libstddjb/bitarray_clearsetn.lo: src/libstddjb/bitarray_clearsetn.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_count.o src/libstddjb/bitarray_count.lo: src/libstddjb/bitarray_count.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_firstclear.o src/libstddjb/bitarray_firstclear.lo: src/libstddjb/bitarray_firstclear.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_firstclear_skip.o src/libstddjb/bitarray_firstclear_skip.lo: src/libstddjb/bitarray_firstclear_skip.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_firstset.o src/libstddjb/bitarray_firstset.lo: src/libstddjb/bitarray_firstset.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_firstset_skip.o src/libstddjb/bitarray_firstset_skip.lo: src/libstddjb/bitarray_firstset_skip.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_not.o src/libstddjb/bitarray_not.lo: src/libstddjb/bitarray_not.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_or.o src/libstddjb/bitarray_or.lo: src/libstddjb/bitarray_or.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_testandpoke.o src/libstddjb/bitarray_testandpoke.lo: src/libstddjb/bitarray_testandpoke.c src/include/skalibs/bitarray.h
src/libstddjb/bitarray_xor.o src/libstddjb/bitarray_xor.lo: src/libstddjb/bitarray_xor.c src/include/skalibs/bitarray.h
src/libstddjb/bprintf.o src/libstddjb/bprintf.lo: src/libstddjb/bprintf.c src/include/skalibs/buffer.h src/include/skalibs/lolstdio.h
src/libstddjb/bufalloc_1.o src/libstddjb/bufalloc_1.lo: src/libstddjb/bufalloc_1.c src/include/skalibs/allreadwrite.h src/include/skalibs/bufalloc.h
src/libstddjb/bufalloc_2.o src/libstddjb/bufalloc_2.lo: src/libstddjb/bufalloc_2.c src/include/skalibs/allreadwrite.h src/include/skalibs/bufalloc.h
src/libstddjb/bufalloc_clean.o src/libstddjb/bufalloc_clean.lo: src/libstddjb/bufalloc_clean.c src/include/skalibs/bufalloc.h
src/libstddjb/bufalloc_flush.o src/libstddjb/bufalloc_flush.lo: src/libstddjb/bufalloc_flush.c src/include/skalibs/allreadwrite.h src/include/skalibs/bufalloc.h src/include/skalibs/functypes.h
src/libstddjb/bufalloc_getfd.o src/libstddjb/bufalloc_getfd.lo: src/libstddjb/bufalloc_getfd.c src/include/skalibs/bufalloc.h
src/libstddjb/bufalloc_getlen.o src/libstddjb/bufalloc_getlen.lo: src/libstddjb/bufalloc_getlen.c src/include/skalibs/bufalloc.h
src/libstddjb/bufalloc_init.o src/libstddjb/bufalloc_init.lo: src/libstddjb/bufalloc_init.c src/include/skalibs/bufalloc.h src/include/skalibs/stralloc.h
src/libstddjb/buffer_0.o src/libstddjb/buffer_0.lo: src/libstddjb/buffer_0.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_0f1.o src/libstddjb/buffer_0f1.lo: src/libstddjb/buffer_0f1.c src/include/skalibs/buffer.h
src/libstddjb/buffer_0small.o src/libstddjb/buffer_0small.lo: src/libstddjb/buffer_0small.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_1.o src/libstddjb/buffer_1.lo: src/libstddjb/buffer_1.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_1small.o src/libstddjb/buffer_1small.lo: src/libstddjb/buffer_1small.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_2.o src/libstddjb/buffer_2.lo: src/libstddjb/buffer_2.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_fill.o src/libstddjb/buffer_fill.lo: src/libstddjb/buffer_fill.c src/include/skalibs/buffer.h
src/libstddjb/buffer_flush.o src/libstddjb/buffer_flush.lo: src/libstddjb/buffer_flush.c src/include/skalibs/buffer.h src/include/skalibs/cbuffer.h
src/libstddjb/buffer_flush1read.o src/libstddjb/buffer_flush1read.lo: src/libstddjb/buffer_flush1read.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_get.o src/libstddjb/buffer_get.lo: src/libstddjb/buffer_get.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_getall.o src/libstddjb/buffer_getall.lo: src/libstddjb/buffer_getall.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_getallnf.o src/libstddjb/buffer_getallnf.lo: src/libstddjb/buffer_getallnf.c src/include/skalibs/buffer.h
src/libstddjb/buffer_getfd.o src/libstddjb/buffer_getfd.lo: src/libstddjb/buffer_getfd.c src/include/skalibs/buffer.h
src/libstddjb/buffer_getlen.o src/libstddjb/buffer_getlen.lo: src/libstddjb/buffer_getlen.c src/include/skalibs/buffer.h
src/libstddjb/buffer_getv.o src/libstddjb/buffer_getv.lo: src/libstddjb/buffer_getv.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h
src/libstddjb/buffer_getvall.o src/libstddjb/buffer_getvall.lo: src/libstddjb/buffer_getvall.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/siovec.h
src/libstddjb/buffer_getvallnf.o src/libstddjb/buffer_getvallnf.lo: src/libstddjb/buffer_getvallnf.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h
src/libstddjb/buffer_init.o src/libstddjb/buffer_init.lo: src/libstddjb/buffer_init.c src/include/skalibs/buffer.h src/include/skalibs/cbuffer.h
src/libstddjb/buffer_put.o src/libstddjb/buffer_put.lo: src/libstddjb/buffer_put.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putall.o src/libstddjb/buffer_putall.lo: src/libstddjb/buffer_putall.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putallnf.o src/libstddjb/buffer_putallnf.lo: src/libstddjb/buffer_putallnf.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putflush.o src/libstddjb/buffer_putflush.lo: src/libstddjb/buffer_putflush.c src/include/skalibs/buffer.h
src/libstddjb/buffer_puts.o src/libstddjb/buffer_puts.lo: src/libstddjb/buffer_puts.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putsall.o src/libstddjb/buffer_putsall.lo: src/libstddjb/buffer_putsall.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putsallflush.o src/libstddjb/buffer_putsallflush.lo: src/libstddjb/buffer_putsallflush.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putsallnoflush.o src/libstddjb/buffer_putsallnoflush.lo: src/libstddjb/buffer_putsallnoflush.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putsflush.o src/libstddjb/buffer_putsflush.lo: src/libstddjb/buffer_putsflush.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putsnoflush.o src/libstddjb/buffer_putsnoflush.lo: src/libstddjb/buffer_putsnoflush.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putv.o src/libstddjb/buffer_putv.lo: src/libstddjb/buffer_putv.c src/include/skalibs/buffer.h
src/libstddjb/buffer_putvall.o src/libstddjb/buffer_putvall.lo: src/libstddjb/buffer_putvall.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h
src/libstddjb/buffer_putvallnf.o src/libstddjb/buffer_putvallnf.lo: src/libstddjb/buffer_putvallnf.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h
src/libstddjb/buffer_putvflush.o src/libstddjb/buffer_putvflush.lo: src/libstddjb/buffer_putvflush.c src/include/skalibs/buffer.h
src/libstddjb/byte_chr.o src/libstddjb/byte_chr.lo: src/libstddjb/byte_chr.c src/include/skalibs/bytestr.h
src/libstddjb/byte_count.o src/libstddjb/byte_count.lo: src/libstddjb/byte_count.c src/include/skalibs/bytestr.h
src/libstddjb/byte_in.o src/libstddjb/byte_in.lo: src/libstddjb/byte_in.c src/include/skalibs/bytestr.h
src/libstddjb/byte_rchr.o src/libstddjb/byte_rchr.lo: src/libstddjb/byte_rchr.c src/include/skalibs/bytestr.h
src/libstddjb/byte_search.o src/libstddjb/byte_search.lo: src/libstddjb/byte_search.c src/include/skalibs/bytestr.h src/include/skalibs/posixplz.h
src/libstddjb/byte_zzero.o src/libstddjb/byte_zzero.lo: src/libstddjb/byte_zzero.c src/include/skalibs/bytestr.h src/include/skalibs/gccattributes.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/case_lowerb.o src/libstddjb/case_lowerb.lo: src/libstddjb/case_lowerb.c src/include/skalibs/bytestr.h
src/libstddjb/case_lowers.o src/libstddjb/case_lowers.lo: src/libstddjb/case_lowers.c src/include/skalibs/bytestr.h
src/libstddjb/case_startb.o src/libstddjb/case_startb.lo: src/libstddjb/case_startb.c src/include/skalibs/bytestr.h
src/libstddjb/case_upperb.o src/libstddjb/case_upperb.lo: src/libstddjb/case_upperb.c src/include/skalibs/bytestr.h
src/libstddjb/case_uppers.o src/libstddjb/case_uppers.lo: src/libstddjb/case_uppers.c src/include/skalibs/bytestr.h
src/libstddjb/cbuffer_get.o src/libstddjb/cbuffer_get.lo: src/libstddjb/cbuffer_get.c src/include/skalibs/cbuffer.h src/include/skalibs/siovec.h
src/libstddjb/cbuffer_getv.o src/libstddjb/cbuffer_getv.lo: src/libstddjb/cbuffer_getv.c src/include/skalibs/cbuffer.h src/include/skalibs/siovec.h
src/libstddjb/cbuffer_init.o src/libstddjb/cbuffer_init.lo: src/libstddjb/cbuffer_init.c src/include/skalibs/cbuffer.h
src/libstddjb/cbuffer_put.o src/libstddjb/cbuffer_put.lo: src/libstddjb/cbuffer_put.c src/include/skalibs/cbuffer.h src/include/skalibs/siovec.h
src/libstddjb/cbuffer_putv.o src/libstddjb/cbuffer_putv.lo: src/libstddjb/cbuffer_putv.c src/include/skalibs/cbuffer.h src/include/skalibs/siovec.h
src/libstddjb/cbuffer_rpeek.o src/libstddjb/cbuffer_rpeek.lo: src/libstddjb/cbuffer_rpeek.c src/include/skalibs/cbuffer.h
src/libstddjb/cbuffer_rseek.o src/libstddjb/cbuffer_rseek.lo: src/libstddjb/cbuffer_rseek.c src/include/skalibs/cbuffer.h
src/libstddjb/cbuffer_unget.o src/libstddjb/cbuffer_unget.lo: src/libstddjb/cbuffer_unget.c src/include/skalibs/cbuffer.h
src/libstddjb/cbuffer_unput.o src/libstddjb/cbuffer_unput.lo: src/libstddjb/cbuffer_unput.c src/include/skalibs/cbuffer.h
src/libstddjb/cbuffer_wpeek.o src/libstddjb/cbuffer_wpeek.lo: src/libstddjb/cbuffer_wpeek.c src/include/skalibs/cbuffer.h
src/libstddjb/cbuffer_wseek.o src/libstddjb/cbuffer_wseek.lo: src/libstddjb/cbuffer_wseek.c src/include/skalibs/cbuffer.h
src/libstddjb/cdb_find.o src/libstddjb/cdb_find.lo: src/libstddjb/cdb_find.c src/include/skalibs/cdb.h
src/libstddjb/cdb_findnext.o src/libstddjb/cdb_findnext.lo: src/libstddjb/cdb_findnext.c src/libstddjb/cdb-internal.h src/include/skalibs/cdb.h src/include/skalibs/uint32.h
src/libstddjb/cdb_free.o src/libstddjb/cdb_free.lo: src/libstddjb/cdb_free.c src/include/skalibs/cdb.h src/include/skalibs/posixplz.h
src/libstddjb/cdb_hash.o src/libstddjb/cdb_hash.lo: src/libstddjb/cdb_hash.c src/libstddjb/cdb-internal.h
src/libstddjb/cdb_hashadd.o src/libstddjb/cdb_hashadd.lo: src/libstddjb/cdb_hashadd.c src/libstddjb/cdb-internal.h
src/libstddjb/cdb_hashv.o src/libstddjb/cdb_hashv.lo: src/libstddjb/cdb_hashv.c src/libstddjb/cdb-internal.h
src/libstddjb/cdb_init.o src/libstddjb/cdb_init.lo: src/libstddjb/cdb_init.c src/include/skalibs/cdb.h src/include/skalibs/djbunix.h
src/libstddjb/cdb_init_at.o src/libstddjb/cdb_init_at.lo: src/libstddjb/cdb_init_at.c src/include/skalibs/cdb.h src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libstddjb/cdb_init_fromfd.o src/libstddjb/cdb_init_fromfd.lo: src/libstddjb/cdb_init_fromfd.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/cdb.h
src/libstddjb/cdb_p.o src/libstddjb/cdb_p.lo: src/libstddjb/cdb_p.c src/libstddjb/cdb-internal.h src/include/skalibs/cdb.h
src/libstddjb/cdb_traverse_next.o src/libstddjb/cdb_traverse_next.lo: src/libstddjb/cdb_traverse_next.c src/libstddjb/cdb-internal.h src/include/skalibs/cdb.h src/include/skalibs/uint32.h
src/libstddjb/cdb_zero.o src/libstddjb/cdb_zero.lo: src/libstddjb/cdb_zero.c src/include/skalibs/cdb.h
src/libstddjb/cdbmake_add.o src/libstddjb/cdbmake_add.lo: src/libstddjb/cdbmake_add.c src/include/skalibs/buffer.h src/libstddjb/cdb-internal.h src/libstddjb/cdbmake-internal.h src/include/skalibs/cdbmake.h src/include/skalibs/diuint32.h src/include/skalibs/genalloc.h src/include/skalibs/uint32.h
src/libstddjb/cdbmake_addbeginend.o src/libstddjb/cdbmake_addbeginend.lo: src/libstddjb/cdbmake_addbeginend.c src/include/skalibs/buffer.h src/libstddjb/cdbmake-internal.h src/include/skalibs/diuint32.h src/include/skalibs/genalloc.h src/include/skalibs/uint32.h
src/libstddjb/cdbmake_addv.o src/libstddjb/cdbmake_addv.lo: src/libstddjb/cdbmake_addv.c src/include/skalibs/buffer.h src/libstddjb/cdb-internal.h src/libstddjb/cdbmake-internal.h src/include/skalibs/cdbmake.h src/include/skalibs/diuint32.h src/include/skalibs/genalloc.h src/include/skalibs/siovec.h src/include/skalibs/uint32.h
src/libstddjb/cdbmake_finish.o src/libstddjb/cdbmake_finish.lo: src/libstddjb/cdbmake_finish.c src/include/skalibs/buffer.h src/libstddjb/cdbmake-internal.h src/include/skalibs/cdbmake.h src/include/skalibs/diuint32.h src/include/skalibs/genalloc.h src/include/skalibs/uint32.h
src/libstddjb/cdbmake_posplus.o src/libstddjb/cdbmake_posplus.lo: src/libstddjb/cdbmake_posplus.c src/libstddjb/cdbmake-internal.h
src/libstddjb/cdbmake_start.o src/libstddjb/cdbmake_start.lo: src/libstddjb/cdbmake_start.c src/include/skalibs/buffer.h src/include/skalibs/cdbmake.h src/include/skalibs/genalloc.h
src/libstddjb/coe.o src/libstddjb/coe.lo: src/libstddjb/coe.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h
src/libstddjb/deepsleepuntil.o src/libstddjb/deepsleepuntil.lo: src/libstddjb/deepsleepuntil.c src/include/skalibs/iopause.h src/include/skalibs/tai.h
src/libstddjb/devino_cmp.o src/libstddjb/devino_cmp.lo: src/libstddjb/devino_cmp.c src/include/skalibs/devino.h
src/libstddjb/dir_close.o src/libstddjb/dir_close.lo: src/libstddjb/dir_close.c src/include/skalibs/direntry.h
src/libstddjb/dir_fd.o src/libstddjb/dir_fd.lo: src/libstddjb/dir_fd.c src/include/skalibs/direntry.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/error_isalready.o src/libstddjb/error_isalready.lo: src/libstddjb/error_isalready.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/error.h
src/libstddjb/error_temp.o src/libstddjb/error_temp.lo: src/libstddjb/error_temp.c src/include/skalibs/error.h
src/libstddjb/fd_cat.o src/libstddjb/fd_cat.lo: src/libstddjb/fd_cat.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h
src/libstddjb/fd_catn.o src/libstddjb/fd_catn.lo: src/libstddjb/fd_catn.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h
src/libstddjb/fd_chdir.o src/libstddjb/fd_chdir.lo: src/libstddjb/fd_chdir.c src/include/skalibs/djbunix.h
src/libstddjb/fd_chmod.o src/libstddjb/fd_chmod.lo: src/libstddjb/fd_chmod.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h
src/libstddjb/fd_chown.o src/libstddjb/fd_chown.lo: src/libstddjb/fd_chown.c src/include/skalibs/djbunix.h
src/libstddjb/fd_close.o src/libstddjb/fd_close.lo: src/libstddjb/fd_close.c src/include/skalibs/djbunix.h
src/libstddjb/fd_copy.o src/libstddjb/fd_copy.lo: src/libstddjb/fd_copy.c src/include/skalibs/djbunix.h
src/libstddjb/fd_copy2.o src/libstddjb/fd_copy2.lo: src/libstddjb/fd_copy2.c src/include/skalibs/djbunix.h
src/libstddjb/fd_ensure_open.o src/libstddjb/fd_ensure_open.lo: src/libstddjb/fd_ensure_open.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h
src/libstddjb/fd_islocked.o src/libstddjb/fd_islocked.lo: src/libstddjb/fd_islocked.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h
src/libstddjb/fd_lock.o src/libstddjb/fd_lock.lo: src/libstddjb/fd_lock.c src/include/skalibs/djbunix.h src/include/skalibs/error.h src/include/skalibs/fcntl.h
src/libstddjb/fd_move.o src/libstddjb/fd_move.lo: src/libstddjb/fd_move.c src/include/skalibs/djbunix.h
src/libstddjb/fd_move2.o src/libstddjb/fd_move2.lo: src/libstddjb/fd_move2.c src/include/skalibs/djbunix.h
src/libstddjb/fd_read.o src/libstddjb/fd_read.lo: src/libstddjb/fd_read.c src/include/skalibs/allreadwrite.h
src/libstddjb/fd_readv.o src/libstddjb/fd_readv.lo: src/libstddjb/fd_readv.c src/include/skalibs/allreadwrite.h
src/libstddjb/fd_recv.o src/libstddjb/fd_recv.lo: src/libstddjb/fd_recv.c src/include/skalibs/allreadwrite.h
src/libstddjb/fd_send.o src/libstddjb/fd_send.lo: src/libstddjb/fd_send.c src/include/skalibs/allreadwrite.h
src/libstddjb/fd_shutdown.o src/libstddjb/fd_shutdown.lo: src/libstddjb/fd_shutdown.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h
src/libstddjb/fd_sync.o src/libstddjb/fd_sync.lo: src/libstddjb/fd_sync.c src/include/skalibs/djbunix.h
src/libstddjb/fd_unlock.o src/libstddjb/fd_unlock.lo: src/libstddjb/fd_unlock.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h
src/libstddjb/fd_write.o src/libstddjb/fd_write.lo: src/libstddjb/fd_write.c src/include/skalibs/allreadwrite.h
src/libstddjb/fd_writev.o src/libstddjb/fd_writev.lo: src/libstddjb/fd_writev.c src/include/skalibs/allreadwrite.h
src/libstddjb/filecopy_suffix.o src/libstddjb/filecopy_suffix.lo: src/libstddjb/filecopy_suffix.c src/include/skalibs/djbunix.h
src/libstddjb/filecopy_unsafe.o src/libstddjb/filecopy_unsafe.lo: src/libstddjb/filecopy_unsafe.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h
src/libstddjb/fmtscan_asc.o src/libstddjb/fmtscan_asc.lo: src/libstddjb/fmtscan_asc.c src/include/skalibs/fmtscan.h
src/libstddjb/fmtscan_num.o src/libstddjb/fmtscan_num.lo: src/libstddjb/fmtscan_num.c src/include/skalibs/fmtscan.h
src/libstddjb/genalloc_deepfree.o src/libstddjb/genalloc_deepfree.lo: src/libstddjb/genalloc_deepfree.c src/include/skalibs/genalloc.h src/include/skalibs/stralloc.h
src/libstddjb/genwrite_flush_bufalloc.o src/libstddjb/genwrite_flush_bufalloc.lo: src/libstddjb/genwrite_flush_bufalloc.c src/include/skalibs/bufalloc.h src/include/skalibs/genwrite.h
src/libstddjb/genwrite_flush_buffer.o src/libstddjb/genwrite_flush_buffer.lo: src/libstddjb/genwrite_flush_buffer.c src/include/skalibs/buffer.h src/include/skalibs/genwrite.h
src/libstddjb/genwrite_flush_stralloc.o src/libstddjb/genwrite_flush_stralloc.lo: src/libstddjb/genwrite_flush_stralloc.c src/include/skalibs/genwrite.h
src/libstddjb/genwrite_put_bufalloc.o src/libstddjb/genwrite_put_bufalloc.lo: src/libstddjb/genwrite_put_bufalloc.c src/include/skalibs/bufalloc.h src/include/skalibs/genwrite.h
src/libstddjb/genwrite_put_buffer.o src/libstddjb/genwrite_put_buffer.lo: src/libstddjb/genwrite_put_buffer.c src/include/skalibs/buffer.h src/include/skalibs/genwrite.h
src/libstddjb/genwrite_put_stralloc.o src/libstddjb/genwrite_put_stralloc.lo: src/libstddjb/genwrite_put_stralloc.c src/include/skalibs/genwrite.h src/include/skalibs/stralloc.h
src/libstddjb/genwrite_stderr.o src/libstddjb/genwrite_stderr.lo: src/libstddjb/genwrite_stderr.c src/include/skalibs/buffer.h src/include/skalibs/genwrite.h
src/libstddjb/genwrite_stdout.o src/libstddjb/genwrite_stdout.lo: src/libstddjb/genwrite_stdout.c src/include/skalibs/buffer.h src/include/skalibs/genwrite.h
src/libstddjb/getlnmax.o src/libstddjb/getlnmax.lo: src/libstddjb/getlnmax.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h src/include/skalibs/skamisc.h
src/libstddjb/getlnmaxsep.o src/libstddjb/getlnmaxsep.lo: src/libstddjb/getlnmaxsep.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h src/include/skalibs/skamisc.h
src/libstddjb/gol.o src/libstddjb/gol.lo: src/libstddjb/gol.c src/include/skalibs/gol.h
src/libstddjb/gol_argv.o src/libstddjb/gol_argv.lo: src/libstddjb/gol_argv.c src/include/skalibs/gol.h src/include/skalibs/strerr.h
src/libstddjb/hiercopy.o src/libstddjb/hiercopy.lo: src/libstddjb/hiercopy.c src/include/skalibs/djbunix.h src/include/skalibs/skamisc.h
src/libstddjb/hiercopy_internal.o src/libstddjb/hiercopy_internal.lo: src/libstddjb/hiercopy_internal.c src/include/skalibs/direntry.h src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/stralloc.h
src/libstddjb/hiercopy_loose.o src/libstddjb/hiercopy_loose.lo: src/libstddjb/hiercopy_loose.c src/include/skalibs/djbunix.h src/include/skalibs/skamisc.h
src/libstddjb/hiercopy_loose_tmp.o src/libstddjb/hiercopy_loose_tmp.lo: src/libstddjb/hiercopy_loose_tmp.c src/include/skalibs/djbunix.h
src/libstddjb/hiercopy_tmp.o src/libstddjb/hiercopy_tmp.lo: src/libstddjb/hiercopy_tmp.c src/include/skalibs/djbunix.h
src/libstddjb/int160_scan.o src/libstddjb/int160_scan.lo: src/libstddjb/int160_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint16.h
src/libstddjb/int16_fmtlist.o src/libstddjb/int16_fmtlist.lo: src/libstddjb/int16_fmtlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint16.h
src/libstddjb/int16_scan.o src/libstddjb/int16_scan.lo: src/libstddjb/int16_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint16.h src/include/skalibs/uint64.h
src/libstddjb/int16_scanlist.o src/libstddjb/int16_scanlist.lo: src/libstddjb/int16_scanlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint16.h
src/libstddjb/int320_scan.o src/libstddjb/int320_scan.lo: src/libstddjb/int320_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint32.h
src/libstddjb/int32_fmtlist.o src/libstddjb/int32_fmtlist.lo: src/libstddjb/int32_fmtlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint32.h
src/libstddjb/int32_scan.o src/libstddjb/int32_scan.lo: src/libstddjb/int32_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint32.h src/include/skalibs/uint64.h
src/libstddjb/int32_scanlist.o src/libstddjb/int32_scanlist.lo: src/libstddjb/int32_scanlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint32.h
src/libstddjb/int640_scan.o src/libstddjb/int640_scan.lo: src/libstddjb/int640_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/int64_fmt_generic.o src/libstddjb/int64_fmt_generic.lo: src/libstddjb/int64_fmt_generic.c src/include/skalibs/uint64.h
src/libstddjb/int64_fmtlist.o src/libstddjb/int64_fmtlist.lo: src/libstddjb/int64_fmtlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/int64_scan.o src/libstddjb/int64_scan.lo: src/libstddjb/int64_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/int64_scan_base_max.o src/libstddjb/int64_scan_base_max.lo: src/libstddjb/int64_scan_base_max.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/int64_scanlist.o src/libstddjb/int64_scanlist.lo: src/libstddjb/int64_scanlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/iopause.o src/libstddjb/iopause.lo: src/libstddjb/iopause.c src/include/skalibs/config.h src/include/skalibs/iopause.h src/include/skalibs/sysdeps.h
src/libstddjb/iopause_poll.o src/libstddjb/iopause_poll.lo: src/libstddjb/iopause_poll.c src/include/skalibs/iopause.h src/include/skalibs/tai.h
src/libstddjb/iopause_ppoll.o src/libstddjb/iopause_ppoll.lo: src/libstddjb/iopause_ppoll.c src/include/skalibs/iopause.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h
src/libstddjb/iopause_select.o src/libstddjb/iopause_select.lo: src/libstddjb/iopause_select.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/iopause.h src/include/skalibs/tai.h
src/libstddjb/iopause_stamp.o src/libstddjb/iopause_stamp.lo: src/libstddjb/iopause_stamp.c src/include/skalibs/iopause.h src/include/skalibs/tai.h
src/libstddjb/ip46_scan.o src/libstddjb/ip46_scan.lo: src/libstddjb/ip46_scan.c src/include/skalibs/fmtscan.h src/include/skalibs/ip46.h
src/libstddjb/ip46_scanlist.o src/libstddjb/ip46_scanlist.lo: src/libstddjb/ip46_scanlist.c src/include/skalibs/fmtscan.h src/include/skalibs/ip46.h
src/libstddjb/ip4_fmt.o src/libstddjb/ip4_fmt.lo: src/libstddjb/ip4_fmt.c src/include/skalibs/fmtscan.h src/include/skalibs/uint32.h
src/libstddjb/ip4_fmtu32.o src/libstddjb/ip4_fmtu32.lo: src/libstddjb/ip4_fmtu32.c src/include/skalibs/fmtscan.h src/include/skalibs/uint32.h
src/libstddjb/ip4_scan.o src/libstddjb/ip4_scan.lo: src/libstddjb/ip4_scan.c src/include/skalibs/fmtscan.h src/include/skalibs/types.h
src/libstddjb/ip4_scanlist.o src/libstddjb/ip4_scanlist.lo: src/libstddjb/ip4_scanlist.c src/include/skalibs/fmtscan.h
src/libstddjb/ip4_scanlist_u32.o src/libstddjb/ip4_scanlist_u32.lo: src/libstddjb/ip4_scanlist_u32.c src/include/skalibs/fmtscan.h
src/libstddjb/ip4_scanu32.o src/libstddjb/ip4_scanu32.lo: src/libstddjb/ip4_scanu32.c src/include/skalibs/fmtscan.h src/include/skalibs/uint32.h
src/libstddjb/ip6_fmt.o src/libstddjb/ip6_fmt.lo: src/libstddjb/ip6_fmt.c src/include/skalibs/diuint.h src/include/skalibs/fmtscan.h
src/libstddjb/ip6_scan.o src/libstddjb/ip6_scan.lo: src/libstddjb/ip6_scan.c src/include/skalibs/fmtscan.h src/include/skalibs/uint16.h
src/libstddjb/ip6_scanlist.o src/libstddjb/ip6_scanlist.lo: src/libstddjb/ip6_scanlist.c src/include/skalibs/fmtscan.h
src/libstddjb/ipc_accept.o src/libstddjb/ipc_accept.lo: src/libstddjb/ipc_accept.c src/include/skalibs/bytestr.h src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/sysdeps.h
src/libstddjb/ipc_bind.o src/libstddjb/ipc_bind.lo: src/libstddjb/ipc_bind.c src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/socket.h
src/libstddjb/ipc_bind_reuse.o src/libstddjb/ipc_bind_reuse.lo: src/libstddjb/ipc_bind_reuse.c src/include/skalibs/socket.h
src/libstddjb/ipc_bind_reuse_lock_perms.o src/libstddjb/ipc_bind_reuse_lock_perms.lo: src/libstddjb/ipc_bind_reuse_lock_perms.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/ipc_bind_reuse_perms.o src/libstddjb/ipc_bind_reuse_perms.lo: src/libstddjb/ipc_bind_reuse_perms.c src/include/skalibs/socket.h
src/libstddjb/ipc_connect.o src/libstddjb/ipc_connect.lo: src/libstddjb/ipc_connect.c src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/socket.h
src/libstddjb/ipc_connected.o src/libstddjb/ipc_connected.lo: src/libstddjb/ipc_connected.c src/include/skalibs/allreadwrite.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/ipc_dgram.o src/libstddjb/ipc_dgram.lo: src/libstddjb/ipc_dgram.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/ipc_listen.o src/libstddjb/ipc_listen.lo: src/libstddjb/ipc_listen.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/ipc_local.o src/libstddjb/ipc_local.lo: src/libstddjb/ipc_local.c src/include/skalibs/bytestr.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/ipc_pair.o src/libstddjb/ipc_pair.lo: src/libstddjb/ipc_pair.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/ipc_recv.o src/libstddjb/ipc_recv.lo: src/libstddjb/ipc_recv.c src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/socket.h
src/libstddjb/ipc_send.o src/libstddjb/ipc_send.lo: src/libstddjb/ipc_send.c src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/socket.h
src/libstddjb/ipc_stream.o src/libstddjb/ipc_stream.lo: src/libstddjb/ipc_stream.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/ipc_timed_connect.o src/libstddjb/ipc_timed_connect.lo: src/libstddjb/ipc_timed_connect.c src/include/skalibs/error.h src/include/skalibs/iopause.h src/include/skalibs/socket.h
src/libstddjb/leapsecs_add.o src/libstddjb/leapsecs_add.lo: src/libstddjb/leapsecs_add.c src/libstddjb/djbtime-internal.h src/include/skalibs/uint64.h
src/libstddjb/leapsecs_sub.o src/libstddjb/leapsecs_sub.lo: src/libstddjb/leapsecs_sub.c src/libstddjb/djbtime-internal.h src/include/skalibs/uint64.h
src/libstddjb/leapsecs_table.o src/libstddjb/leapsecs_table.lo: src/libstddjb/leapsecs_table.c src/libstddjb/djbtime-internal.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/localtm_fmt.o src/libstddjb/localtm_fmt.lo: src/libstddjb/localtm_fmt.c src/include/skalibs/djbtime.h src/include/skalibs/types.h
src/libstddjb/localtm_from_ltm64.o src/libstddjb/localtm_from_ltm64.lo: src/libstddjb/localtm_from_ltm64.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/djbtime.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/localtm_from_sysclock.o src/libstddjb/localtm_from_sysclock.lo: src/libstddjb/localtm_from_sysclock.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/localtm_from_tai.o src/libstddjb/localtm_from_tai.lo: src/libstddjb/localtm_from_tai.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/localtm_from_utc.o src/libstddjb/localtm_from_utc.lo: src/libstddjb/localtm_from_utc.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/localtm_scan.o src/libstddjb/localtm_scan.lo: src/libstddjb/localtm_scan.c src/include/skalibs/djbtime.h src/include/skalibs/types.h
src/libstddjb/localtmn_fmt.o src/libstddjb/localtmn_fmt.lo: src/libstddjb/localtmn_fmt.c src/include/skalibs/djbtime.h src/include/skalibs/uint32.h
src/libstddjb/localtmn_from_sysclock.o src/libstddjb/localtmn_from_sysclock.lo: src/libstddjb/localtmn_from_sysclock.c src/include/skalibs/djbtime.h
src/libstddjb/localtmn_from_tain.o src/libstddjb/localtmn_from_tain.lo: src/libstddjb/localtmn_from_tain.c src/include/skalibs/djbtime.h
src/libstddjb/localtmn_scan.o src/libstddjb/localtmn_scan.lo: src/libstddjb/localtmn_scan.c src/include/skalibs/djbtime.h src/include/skalibs/uint32.h
src/libstddjb/lolprintf.o src/libstddjb/lolprintf.lo: src/libstddjb/lolprintf.c src/include/skalibs/buffer.h src/include/skalibs/lolstdio.h
src/libstddjb/ltm64_from_localtm.o src/libstddjb/ltm64_from_localtm.lo: src/libstddjb/ltm64_from_localtm.c src/include/skalibs/djbtime.h src/include/skalibs/tai.h
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/ndelay_off.o src/libstddjb/ndelay_off.lo: src/libstddjb/ndelay_off.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h
src/libstddjb/ndelay_on.o src/libstddjb/ndelay_on.lo: src/libstddjb/ndelay_on.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.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
src/libstddjb/netstring_appendv.o src/libstddjb/netstring_appendv.lo: src/libstddjb/netstring_appendv.c src/include/skalibs/bytestr.h src/include/skalibs/netstring.h src/include/skalibs/siovec.h src/include/skalibs/stralloc.h src/include/skalibs/uint64.h
src/libstddjb/netstring_decode.o src/libstddjb/netstring_decode.lo: src/libstddjb/netstring_decode.c src/include/skalibs/netstring.h src/include/skalibs/stralloc.h src/include/skalibs/uint64.h
src/libstddjb/netstring_encode.o src/libstddjb/netstring_encode.lo: src/libstddjb/netstring_encode.c src/include/skalibs/netstring.h src/include/skalibs/stralloc.h src/include/skalibs/uint64.h
src/libstddjb/netstring_get.o src/libstddjb/netstring_get.lo: src/libstddjb/netstring_get.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/bytestr.h src/include/skalibs/netstring.h src/include/skalibs/posixishard.h src/include/skalibs/stralloc.h src/include/skalibs/types.h
src/libstddjb/netstring_put.o src/libstddjb/netstring_put.lo: src/libstddjb/netstring_put.c src/include/skalibs/buffer.h src/include/skalibs/netstring.h src/include/skalibs/uint64.h
src/libstddjb/ntp_from_tain.o src/libstddjb/ntp_from_tain.lo: src/libstddjb/ntp_from_tain.c src/include/skalibs/djbtime.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/open2.o src/libstddjb/open2.lo: src/libstddjb/open2.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/open3.o src/libstddjb/open3.lo: src/libstddjb/open3.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/open_append.o src/libstddjb/open_append.lo: src/libstddjb/open_append.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/open_create.o src/libstddjb/open_create.lo: src/libstddjb/open_create.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/open_excl.o src/libstddjb/open_excl.lo: src/libstddjb/open_excl.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/open_read.o src/libstddjb/open_read.lo: src/libstddjb/open_read.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/open_readb.o src/libstddjb/open_readb.lo: src/libstddjb/open_readb.c src/include/skalibs/djbunix.h
src/libstddjb/open_trunc.o src/libstddjb/open_trunc.lo: src/libstddjb/open_trunc.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/open_write.o src/libstddjb/open_write.lo: src/libstddjb/open_write.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openb_read.o src/libstddjb/openb_read.lo: src/libstddjb/openb_read.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openbc_read.o src/libstddjb/openbc_read.lo: src/libstddjb/openbc_read.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openc_append.o src/libstddjb/openc_append.lo: src/libstddjb/openc_append.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openc_create.o src/libstddjb/openc_create.lo: src/libstddjb/openc_create.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openc_excl.o src/libstddjb/openc_excl.lo: src/libstddjb/openc_excl.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openc_read.o src/libstddjb/openc_read.lo: src/libstddjb/openc_read.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openc_readb.o src/libstddjb/openc_readb.lo: src/libstddjb/openc_readb.c src/include/skalibs/djbunix.h
src/libstddjb/openc_trunc.o src/libstddjb/openc_trunc.lo: src/libstddjb/openc_trunc.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openc_write.o src/libstddjb/openc_write.lo: src/libstddjb/openc_write.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h
src/libstddjb/openreadfileclose.o src/libstddjb/openreadfileclose.lo: src/libstddjb/openreadfileclose.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/openreadnclose.o src/libstddjb/openreadnclose.lo: src/libstddjb/openreadnclose.c src/include/skalibs/djbunix.h
src/libstddjb/openreadnclose_nb.o src/libstddjb/openreadnclose_nb.lo: src/libstddjb/openreadnclose_nb.c src/include/skalibs/djbunix.h
src/libstddjb/openslurpnclose.o src/libstddjb/openslurpnclose.lo: src/libstddjb/openslurpnclose.c src/include/skalibs/djbunix.h
src/libstddjb/openwritenclose5.o src/libstddjb/openwritenclose5.lo: src/libstddjb/openwritenclose5.c src/include/skalibs/devino.h src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libstddjb/openwritenclose_suffix6.o src/libstddjb/openwritenclose_suffix6.lo: src/libstddjb/openwritenclose_suffix6.c src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libstddjb/openwritenclose_unsafe5.o src/libstddjb/openwritenclose_unsafe5.lo: src/libstddjb/openwritenclose_unsafe5.c src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libstddjb/openwritevnclose5.o src/libstddjb/openwritevnclose5.lo: src/libstddjb/openwritevnclose5.c src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libstddjb/openwritevnclose_suffix6.o src/libstddjb/openwritevnclose_suffix6.lo: src/libstddjb/openwritevnclose_suffix6.c src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libstddjb/openwritevnclose_unsafe5.o src/libstddjb/openwritevnclose_unsafe5.lo: src/libstddjb/openwritevnclose_unsafe5.c src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libstddjb/path_canonicalize.o src/libstddjb/path_canonicalize.lo: src/libstddjb/path_canonicalize.c src/include/skalibs/djbunix.h
src/libstddjb/pipe_internal.o src/libstddjb/pipe_internal.lo: src/libstddjb/pipe_internal.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/prog.o src/libstddjb/prog.lo: src/libstddjb/prog.c src/include/skalibs/strerr.h
src/libstddjb/readnclose.o src/libstddjb/readnclose.lo: src/libstddjb/readnclose.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h
src/libstddjb/rm_rf.o src/libstddjb/rm_rf.lo: src/libstddjb/rm_rf.c src/include/skalibs/djbunix.h src/include/skalibs/skamisc.h
src/libstddjb/rm_rf_in_tmp.o src/libstddjb/rm_rf_in_tmp.lo: src/libstddjb/rm_rf_in_tmp.c src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/rm_rf_tmp.o src/libstddjb/rm_rf_tmp.lo: src/libstddjb/rm_rf_tmp.c src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/rmstar.o src/libstddjb/rmstar.lo: src/libstddjb/rmstar.c src/include/skalibs/djbunix.h src/include/skalibs/skamisc.h
src/libstddjb/sabasename.o src/libstddjb/sabasename.lo: src/libstddjb/sabasename.c src/include/skalibs/bytestr.h src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/sadirname.o src/libstddjb/sadirname.lo: src/libstddjb/sadirname.c src/include/skalibs/bytestr.h src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/sagetcwd.o src/libstddjb/sagetcwd.lo: src/libstddjb/sagetcwd.c src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/sagethostname.o src/libstddjb/sagethostname.lo: src/libstddjb/sagethostname.c src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/sals.o src/libstddjb/sals.lo: src/libstddjb/sals.c src/include/skalibs/direntry.h src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
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/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.o src/libstddjb/selfpipe.lo: src/libstddjb/selfpipe.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/nsig.h src/include/skalibs/sig.h src/include/skalibs/sysdeps.h
src/libstddjb/sgetopt.o src/libstddjb/sgetopt.lo: src/libstddjb/sgetopt.c src/include/skalibs/buffer.h src/include/skalibs/sgetopt.h
src/libstddjb/sig0_scan.o src/libstddjb/sig0_scan.lo: src/libstddjb/sig0_scan.c src/include/skalibs/sig.h src/include/skalibs/types.h
src/libstddjb/sig_altignore.o src/libstddjb/sig_altignore.lo: src/libstddjb/sig_altignore.c src/include/skalibs/sig.h
src/libstddjb/sig_block.o src/libstddjb/sig_block.lo: src/libstddjb/sig_block.c src/include/skalibs/sig.h
src/libstddjb/sig_blocknone.o src/libstddjb/sig_blocknone.lo: src/libstddjb/sig_blocknone.c src/include/skalibs/sig.h
src/libstddjb/sig_catch.o src/libstddjb/sig_catch.lo: src/libstddjb/sig_catch.c src/include/skalibs/functypes.h src/include/skalibs/nonposix.h src/include/skalibs/nsig.h src/include/skalibs/sig.h
src/libstddjb/sig_name.o src/libstddjb/sig_name.lo: src/libstddjb/sig_name.c src/libstddjb/sig-internal.h src/include/skalibs/sig.h
src/libstddjb/sig_number.o src/libstddjb/sig_number.lo: src/libstddjb/sig_number.c src/libstddjb/sig-internal.h src/include/skalibs/sig.h
src/libstddjb/sig_restoreto.o src/libstddjb/sig_restoreto.lo: src/libstddjb/sig_restoreto.c src/include/skalibs/sig.h
src/libstddjb/sig_table.o src/libstddjb/sig_table.lo: src/libstddjb/sig_table.c src/include/skalibs/nonposix.h src/libstddjb/sig-internal.h
src/libstddjb/sig_unblock.o src/libstddjb/sig_unblock.lo: src/libstddjb/sig_unblock.c src/include/skalibs/sig.h
src/libstddjb/sigfpe.o src/libstddjb/sigfpe.lo: src/libstddjb/sigfpe.c src/include/skalibs/segfault.h
src/libstddjb/sigsegv.o src/libstddjb/sigsegv.lo: src/libstddjb/sigsegv.c src/include/skalibs/segfault.h
src/libstddjb/siovec_bytechr.o src/libstddjb/siovec_bytechr.lo: src/libstddjb/siovec_bytechr.c src/include/skalibs/bytestr.h src/include/skalibs/siovec.h
src/libstddjb/siovec_bytein.o src/libstddjb/siovec_bytein.lo: src/libstddjb/siovec_bytein.c src/include/skalibs/bytestr.h src/include/skalibs/siovec.h
src/libstddjb/siovec_deal.o src/libstddjb/siovec_deal.lo: src/libstddjb/siovec_deal.c src/include/skalibs/siovec.h
src/libstddjb/siovec_gather.o src/libstddjb/siovec_gather.lo: src/libstddjb/siovec_gather.c src/include/skalibs/siovec.h
src/libstddjb/siovec_len.o src/libstddjb/siovec_len.lo: src/libstddjb/siovec_len.c src/include/skalibs/siovec.h
src/libstddjb/siovec_scatter.o src/libstddjb/siovec_scatter.lo: src/libstddjb/siovec_scatter.c src/include/skalibs/siovec.h
src/libstddjb/siovec_search.o src/libstddjb/siovec_search.lo: src/libstddjb/siovec_search.c src/include/skalibs/posixplz.h src/include/skalibs/siovec.h
src/libstddjb/siovec_seek.o src/libstddjb/siovec_seek.lo: src/libstddjb/siovec_seek.c src/include/skalibs/bytestr.h src/include/skalibs/siovec.h
src/libstddjb/siovec_trunc.o src/libstddjb/siovec_trunc.lo: src/libstddjb/siovec_trunc.c src/include/skalibs/siovec.h
src/libstddjb/skagetln.o src/libstddjb/skagetln.lo: src/libstddjb/skagetln.c src/include/skalibs/buffer.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libstddjb/skagetln_loose.o src/libstddjb/skagetln_loose.lo: src/libstddjb/skagetln_loose.c src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libstddjb/skagetln_nofill.o src/libstddjb/skagetln_nofill.lo: src/libstddjb/skagetln_nofill.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libstddjb/skagetlnmaxsep.o src/libstddjb/skagetlnmaxsep.lo: src/libstddjb/skagetlnmaxsep.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libstddjb/skagetlnsep.o src/libstddjb/skagetlnsep.lo: src/libstddjb/skagetlnsep.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libstddjb/skagetlnsep_loose.o src/libstddjb/skagetlnsep_loose.lo: src/libstddjb/skagetlnsep_loose.c src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libstddjb/skalibs_tzisright.o src/libstddjb/skalibs_tzisright.lo: src/libstddjb/skalibs_tzisright.c src/libstddjb/djbtime-internal.h
src/libstddjb/slurpn.o src/libstddjb/slurpn.lo: src/libstddjb/slurpn.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/socket_accept4.o src/libstddjb/socket_accept4.lo: src/libstddjb/socket_accept4.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/sysdeps.h src/include/skalibs/uint16.h
src/libstddjb/socket_accept4_u32.o src/libstddjb/socket_accept4_u32.lo: src/libstddjb/socket_accept4_u32.c src/include/skalibs/socket.h src/include/skalibs/uint32.h
src/libstddjb/socket_accept6.o src/libstddjb/socket_accept6.lo: src/libstddjb/socket_accept6.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/sysdeps.h src/include/skalibs/uint16.h
src/libstddjb/socket_bind4.o src/libstddjb/socket_bind4.lo: src/libstddjb/socket_bind4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_bind4r.o src/libstddjb/socket_bind4r.lo: src/libstddjb/socket_bind4r.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_bind6.o src/libstddjb/socket_bind6.lo: src/libstddjb/socket_bind6.c src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_bind6r.o src/libstddjb/socket_bind6r.lo: src/libstddjb/socket_bind6r.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_connect4.o src/libstddjb/socket_connect4.lo: src/libstddjb/socket_connect4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_connect4_u32.o src/libstddjb/socket_connect4_u32.lo: src/libstddjb/socket_connect4_u32.c src/include/skalibs/socket.h src/include/skalibs/uint32.h
src/libstddjb/socket_connect6.o src/libstddjb/socket_connect6.lo: src/libstddjb/socket_connect6.c src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_connected.o src/libstddjb/socket_connected.lo: src/libstddjb/socket_connected.c src/include/skalibs/allreadwrite.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_deadlineconnstamp4.o src/libstddjb/socket_deadlineconnstamp4.lo: src/libstddjb/socket_deadlineconnstamp4.c src/include/skalibs/error.h src/include/skalibs/socket.h
src/libstddjb/socket_deadlineconnstamp46.o src/libstddjb/socket_deadlineconnstamp46.lo: src/libstddjb/socket_deadlineconnstamp46.c src/include/skalibs/error.h src/include/skalibs/ip46.h src/include/skalibs/socket.h
src/libstddjb/socket_deadlineconnstamp4_u32.o src/libstddjb/socket_deadlineconnstamp4_u32.lo: src/libstddjb/socket_deadlineconnstamp4_u32.c src/include/skalibs/socket.h src/include/skalibs/uint32.h
src/libstddjb/socket_deadlineconnstamp6.o src/libstddjb/socket_deadlineconnstamp6.lo: src/libstddjb/socket_deadlineconnstamp6.c src/include/skalibs/error.h src/include/skalibs/socket.h
src/libstddjb/socket_internal.o src/libstddjb/socket_internal.lo: src/libstddjb/socket_internal.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/sysdeps.h
src/libstddjb/socket_ioloop.o src/libstddjb/socket_ioloop.lo: src/libstddjb/socket_ioloop.c src/include/skalibs/error.h src/include/skalibs/iopause.h src/include/skalibs/socket.h
src/libstddjb/socket_ioloop_send4.o src/libstddjb/socket_ioloop_send4.lo: src/libstddjb/socket_ioloop_send4.c src/include/skalibs/socket.h
src/libstddjb/socket_ioloop_send6.o src/libstddjb/socket_ioloop_send6.lo: src/libstddjb/socket_ioloop_send6.c src/include/skalibs/socket.h
src/libstddjb/socket_local4.o src/libstddjb/socket_local4.lo: src/libstddjb/socket_local4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_local46.o src/libstddjb/socket_local46.lo: src/libstddjb/socket_local46.c src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/uint16.h
src/libstddjb/socket_local6.o src/libstddjb/socket_local6.lo: src/libstddjb/socket_local6.c src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_recv4.o src/libstddjb/socket_recv4.lo: src/libstddjb/socket_recv4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_recv46.o src/libstddjb/socket_recv46.lo: src/libstddjb/socket_recv46.c src/include/skalibs/ip46.h src/include/skalibs/socket.h
src/libstddjb/socket_recv6.o src/libstddjb/socket_recv6.lo: src/libstddjb/socket_recv6.c src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_recvnb46.o src/libstddjb/socket_recvnb46.lo: src/libstddjb/socket_recvnb46.c src/include/skalibs/ip46.h src/include/skalibs/socket.h
src/libstddjb/socket_remote4.o src/libstddjb/socket_remote4.lo: src/libstddjb/socket_remote4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_remote46.o src/libstddjb/socket_remote46.lo: src/libstddjb/socket_remote46.c src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/uint16.h
src/libstddjb/socket_remote6.o src/libstddjb/socket_remote6.lo: src/libstddjb/socket_remote6.c src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_send4.o src/libstddjb/socket_send4.lo: src/libstddjb/socket_send4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_send6.o src/libstddjb/socket_send6.lo: src/libstddjb/socket_send6.c src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_tcp4.o src/libstddjb/socket_tcp4.lo: src/libstddjb/socket_tcp4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_tcp6.o src/libstddjb/socket_tcp6.lo: src/libstddjb/socket_tcp6.c src/include/skalibs/djbunix.h src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_tcpnodelay.o src/libstddjb/socket_tcpnodelay.lo: src/libstddjb/socket_tcpnodelay.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_timeoutconn.o src/libstddjb/socket_timeoutconn.lo: src/libstddjb/socket_timeoutconn.c src/include/skalibs/socket.h src/include/skalibs/tai.h
src/libstddjb/socket_tryreservein.o src/libstddjb/socket_tryreservein.lo: src/libstddjb/socket_tryreservein.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_udp4.o src/libstddjb/socket_udp4.lo: src/libstddjb/socket_udp4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_udp6.o src/libstddjb/socket_udp6.lo: src/libstddjb/socket_udp6.c src/include/skalibs/djbunix.h src/include/skalibs/ip46.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h
src/libstddjb/socket_waitconn.o src/libstddjb/socket_waitconn.lo: src/libstddjb/socket_waitconn.c src/include/skalibs/allreadwrite.h src/include/skalibs/iopause.h src/include/skalibs/socket.h
src/libstddjb/socketpair_internal.o src/libstddjb/socketpair_internal.lo: src/libstddjb/socketpair_internal.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/sysdeps.h
src/libstddjb/stamp.o src/libstddjb/stamp.lo: src/libstddjb/stamp.c src/include/skalibs/tai.h
src/libstddjb/str_chr.o src/libstddjb/str_chr.lo: src/libstddjb/str_chr.c src/include/skalibs/bytestr.h
src/libstddjb/str_fmt.o src/libstddjb/str_fmt.lo: src/libstddjb/str_fmt.c src/include/skalibs/fmtscan.h
src/libstddjb/str_rchr.o src/libstddjb/str_rchr.lo: src/libstddjb/str_rchr.c src/include/skalibs/bytestr.h
src/libstddjb/str_start.o src/libstddjb/str_start.lo: src/libstddjb/str_start.c src/include/skalibs/bytestr.h
src/libstddjb/str_strn.o src/libstddjb/str_strn.lo: src/libstddjb/str_strn.c src/include/skalibs/bytestr.h
src/libstddjb/stralloc_append.o src/libstddjb/stralloc_append.lo: src/libstddjb/stralloc_append.c src/include/skalibs/stralloc.h
src/libstddjb/stralloc_catb.o src/libstddjb/stralloc_catb.lo: src/libstddjb/stralloc_catb.c src/include/skalibs/stralloc.h
src/libstddjb/stralloc_catv.o src/libstddjb/stralloc_catv.lo: src/libstddjb/stralloc_catv.c src/include/skalibs/siovec.h src/include/skalibs/stralloc.h
src/libstddjb/stralloc_copyb.o src/libstddjb/stralloc_copyb.lo: src/libstddjb/stralloc_copyb.c src/include/skalibs/stralloc.h
src/libstddjb/stralloc_free.o src/libstddjb/stralloc_free.lo: src/libstddjb/stralloc_free.c src/include/skalibs/alloc.h src/include/skalibs/stralloc.h
src/libstddjb/stralloc_insertb.o src/libstddjb/stralloc_insertb.lo: src/libstddjb/stralloc_insertb.c src/include/skalibs/stralloc.h
src/libstddjb/stralloc_ready_tuned.o src/libstddjb/stralloc_ready_tuned.lo: src/libstddjb/stralloc_ready_tuned.c src/include/skalibs/alloc.h src/include/skalibs/stralloc.h
src/libstddjb/stralloc_readyplus_tuned.o src/libstddjb/stralloc_readyplus_tuned.lo: src/libstddjb/stralloc_readyplus_tuned.c src/include/skalibs/stralloc.h
src/libstddjb/stralloc_reverse.o src/libstddjb/stralloc_reverse.lo: src/libstddjb/stralloc_reverse.c src/include/skalibs/stralloc.h
src/libstddjb/stralloc_reverse_blocks.o src/libstddjb/stralloc_reverse_blocks.lo: src/libstddjb/stralloc_reverse_blocks.c src/include/skalibs/stralloc.h
src/libstddjb/stralloc_shrink.o src/libstddjb/stralloc_shrink.lo: src/libstddjb/stralloc_shrink.c src/include/skalibs/alloc.h src/include/skalibs/stralloc.h
src/libstddjb/stralloc_zero.o src/libstddjb/stralloc_zero.lo: src/libstddjb/stralloc_zero.c src/include/skalibs/stralloc.h
src/libstddjb/strerr_diev.o src/libstddjb/strerr_diev.lo: src/libstddjb/strerr_diev.c src/include/skalibs/strerr.h
src/libstddjb/strerr_dievsys.o src/libstddjb/strerr_dievsys.lo: src/libstddjb/strerr_dievsys.c src/include/skalibs/strerr.h
src/libstddjb/strerr_warnv.o src/libstddjb/strerr_warnv.lo: src/libstddjb/strerr_warnv.c src/include/skalibs/buffer.h src/include/skalibs/strerr.h
src/libstddjb/strerr_warnvsys.o src/libstddjb/strerr_warnvsys.lo: src/libstddjb/strerr_warnvsys.c src/include/skalibs/buffer.h src/include/skalibs/strerr.h
src/libstddjb/string_format.o src/libstddjb/string_format.lo: src/libstddjb/string_format.c src/include/skalibs/bytestr.h src/include/skalibs/stralloc.h
src/libstddjb/string_quote.o src/libstddjb/string_quote.lo: src/libstddjb/string_quote.c src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libstddjb/string_quote_nodelim_mustquote.o src/libstddjb/string_quote_nodelim_mustquote.lo: src/libstddjb/string_quote_nodelim_mustquote.c src/include/skalibs/fmtscan.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/libstddjb/string_unquote.o src/libstddjb/string_unquote.lo: src/libstddjb/string_unquote.c src/include/skalibs/skamisc.h
src/libstddjb/string_unquote_nodelim.o src/libstddjb/string_unquote_nodelim.lo: src/libstddjb/string_unquote_nodelim.c src/include/skalibs/skamisc.h
src/libstddjb/string_unquote_withdelim.o src/libstddjb/string_unquote_withdelim.lo: src/libstddjb/string_unquote_withdelim.c src/include/skalibs/bytestr.h src/include/skalibs/fmtscan.h src/include/skalibs/posixishard.h src/include/skalibs/skamisc.h
src/libstddjb/strn_fmt.o src/libstddjb/strn_fmt.lo: src/libstddjb/strn_fmt.c src/include/skalibs/fmtscan.h src/include/skalibs/types.h
src/libstddjb/subgetopt.o src/libstddjb/subgetopt.lo: src/libstddjb/subgetopt.c src/include/skalibs/sgetopt.h
src/libstddjb/subgetopt_here.o src/libstddjb/subgetopt_here.lo: src/libstddjb/subgetopt_here.c src/include/skalibs/sgetopt.h
src/libstddjb/sysclock_from_localtm.o src/libstddjb/sysclock_from_localtm.lo: src/libstddjb/sysclock_from_localtm.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/sysclock_from_localtmn.o src/libstddjb/sysclock_from_localtmn.lo: src/libstddjb/sysclock_from_localtmn.c src/include/skalibs/djbtime.h
src/libstddjb/sysclock_from_ltm64.o src/libstddjb/sysclock_from_ltm64.lo: src/libstddjb/sysclock_from_ltm64.c src/include/skalibs/config.h src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/sysclock_from_tai.o src/libstddjb/sysclock_from_tai.lo: src/libstddjb/sysclock_from_tai.c src/include/skalibs/config.h src/include/skalibs/djbtime.h src/include/skalibs/tai.h
src/libstddjb/sysclock_from_tain.o src/libstddjb/sysclock_from_tain.lo: src/libstddjb/sysclock_from_tain.c src/include/skalibs/tai.h
src/libstddjb/sysclock_from_utc.o src/libstddjb/sysclock_from_utc.lo: src/libstddjb/sysclock_from_utc.c src/include/skalibs/config.h src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/sysclock_get.o src/libstddjb/sysclock_get.lo: src/libstddjb/sysclock_get.c src/include/skalibs/sysdeps.h src/include/skalibs/tai.h
src/libstddjb/sysclock_set.o src/libstddjb/sysclock_set.lo: src/libstddjb/sysclock_set.c src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h
src/libstddjb/tai_add.o src/libstddjb/tai_add.lo: src/libstddjb/tai_add.c src/include/skalibs/tai.h
src/libstddjb/tai_from_localtm.o src/libstddjb/tai_from_localtm.lo: src/libstddjb/tai_from_localtm.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/tai_from_ltm64.o src/libstddjb/tai_from_ltm64.lo: src/libstddjb/tai_from_ltm64.c src/libstddjb/djbtime-internal.h src/include/skalibs/djbtime.h
src/libstddjb/tai_from_sysclock.o src/libstddjb/tai_from_sysclock.lo: src/libstddjb/tai_from_sysclock.c src/include/skalibs/config.h src/include/skalibs/djbtime.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tai_from_utc.o src/libstddjb/tai_from_utc.lo: src/libstddjb/tai_from_utc.c src/libstddjb/djbtime-internal.h src/include/skalibs/djbtime.h src/include/skalibs/tai.h
src/libstddjb/tai_now.o src/libstddjb/tai_now.lo: src/libstddjb/tai_now.c src/include/skalibs/tai.h
src/libstddjb/tai_pack.o src/libstddjb/tai_pack.lo: src/libstddjb/tai_pack.c src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tai_pack_little.o src/libstddjb/tai_pack_little.lo: src/libstddjb/tai_pack_little.c src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tai_sub.o src/libstddjb/tai_sub.lo: src/libstddjb/tai_sub.c src/include/skalibs/tai.h
src/libstddjb/tai_u64.o src/libstddjb/tai_u64.lo: src/libstddjb/tai_u64.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tai_unpack.o src/libstddjb/tai_unpack.lo: src/libstddjb/tai_unpack.c src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tai_unpack_little.o src/libstddjb/tai_unpack_little.lo: src/libstddjb/tai_unpack_little.c src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tain_add.o src/libstddjb/tain_add.lo: src/libstddjb/tain_add.c src/include/skalibs/tai.h
src/libstddjb/tain_addsec.o src/libstddjb/tain_addsec.lo: src/libstddjb/tain_addsec.c src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tain_approx.o src/libstddjb/tain_approx.lo: src/libstddjb/tain_approx.c src/include/skalibs/tai.h
src/libstddjb/tain_earliest1.o src/libstddjb/tain_earliest1.lo: src/libstddjb/tain_earliest1.c src/include/skalibs/tai.h
src/libstddjb/tain_earliestv.o src/libstddjb/tain_earliestv.lo: src/libstddjb/tain_earliestv.c src/include/skalibs/tai.h
src/libstddjb/tain_fmt.o src/libstddjb/tain_fmt.lo: src/libstddjb/tain_fmt.c src/include/skalibs/fmtscan.h src/include/skalibs/tai.h
src/libstddjb/tain_frac.o src/libstddjb/tain_frac.lo: src/libstddjb/tain_frac.c src/include/skalibs/tai.h
src/libstddjb/tain_from_localtmn.o src/libstddjb/tain_from_localtmn.lo: src/libstddjb/tain_from_localtmn.c src/include/skalibs/djbtime.h
src/libstddjb/tain_from_millisecs.o src/libstddjb/tain_from_millisecs.lo: src/libstddjb/tain_from_millisecs.c src/include/skalibs/tai.h
src/libstddjb/tain_from_ntp.o src/libstddjb/tain_from_ntp.lo: src/libstddjb/tain_from_ntp.c src/include/skalibs/djbtime.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tain_from_sysclock.o src/libstddjb/tain_from_sysclock.lo: src/libstddjb/tain_from_sysclock.c src/include/skalibs/tai.h
src/libstddjb/tain_from_timespec.o src/libstddjb/tain_from_timespec.lo: src/libstddjb/tain_from_timespec.c src/include/skalibs/tai.h
src/libstddjb/tain_from_timespec_sysclock.o src/libstddjb/tain_from_timespec_sysclock.lo: src/libstddjb/tain_from_timespec_sysclock.c src/include/skalibs/tai.h
src/libstddjb/tain_from_timeval.o src/libstddjb/tain_from_timeval.lo: src/libstddjb/tain_from_timeval.c src/include/skalibs/tai.h
src/libstddjb/tain_from_timeval_sysclock.o src/libstddjb/tain_from_timeval_sysclock.lo: src/libstddjb/tain_from_timeval_sysclock.c src/include/skalibs/tai.h
src/libstddjb/tain_half.o src/libstddjb/tain_half.lo: src/libstddjb/tain_half.c src/include/skalibs/tai.h
src/libstddjb/tain_infinite.o src/libstddjb/tain_infinite.lo: src/libstddjb/tain_infinite.c src/include/skalibs/tai.h
src/libstddjb/tain_infinite_relative.o src/libstddjb/tain_infinite_relative.lo: src/libstddjb/tain_infinite_relative.c src/include/skalibs/tai.h
src/libstddjb/tain_less.o src/libstddjb/tain_less.lo: src/libstddjb/tain_less.c src/include/skalibs/tai.h
src/libstddjb/tain_nano500.o src/libstddjb/tain_nano500.lo: src/libstddjb/tain_nano500.c src/include/skalibs/tai.h
src/libstddjb/tain_now.o src/libstddjb/tain_now.lo: src/libstddjb/tain_now.c src/include/skalibs/tai.h
src/libstddjb/tain_now_set_stopwatch.o src/libstddjb/tain_now_set_stopwatch.lo: src/libstddjb/tain_now_set_stopwatch.c src/include/skalibs/sysdeps.h src/include/skalibs/tai.h
src/libstddjb/tain_now_set_wallclock.o src/libstddjb/tain_now_set_wallclock.lo: src/libstddjb/tain_now_set_wallclock.c src/include/skalibs/tai.h
src/libstddjb/tain_pack.o src/libstddjb/tain_pack.lo: src/libstddjb/tain_pack.c src/include/skalibs/tai.h src/include/skalibs/uint32.h
src/libstddjb/tain_pack_little.o src/libstddjb/tain_pack_little.lo: src/libstddjb/tain_pack_little.c src/include/skalibs/tai.h src/include/skalibs/uint32.h
src/libstddjb/tain_relative_from_timespec.o src/libstddjb/tain_relative_from_timespec.lo: src/libstddjb/tain_relative_from_timespec.c src/include/skalibs/tai.h
src/libstddjb/tain_relative_from_timeval.o src/libstddjb/tain_relative_from_timeval.lo: src/libstddjb/tain_relative_from_timeval.c src/include/skalibs/tai.h
src/libstddjb/tain_scan.o src/libstddjb/tain_scan.lo: src/libstddjb/tain_scan.c src/include/skalibs/fmtscan.h src/include/skalibs/tai.h
src/libstddjb/tain_setnow.o src/libstddjb/tain_setnow.lo: src/libstddjb/tain_setnow.c src/include/skalibs/tai.h
src/libstddjb/tain_stopwatch.o src/libstddjb/tain_stopwatch.lo: src/libstddjb/tain_stopwatch.c src/include/skalibs/sysdeps.h src/include/skalibs/tai.h
src/libstddjb/tain_sub.o src/libstddjb/tain_sub.lo: src/libstddjb/tain_sub.c src/include/skalibs/tai.h
src/libstddjb/tain_to_millisecs.o src/libstddjb/tain_to_millisecs.lo: src/libstddjb/tain_to_millisecs.c src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/tain_ulong.o src/libstddjb/tain_ulong.lo: src/libstddjb/tain_ulong.c src/include/skalibs/tai.h
src/libstddjb/tain_unpack.o src/libstddjb/tain_unpack.lo: src/libstddjb/tain_unpack.c src/include/skalibs/tai.h src/include/skalibs/uint32.h
src/libstddjb/tain_unpack_little.o src/libstddjb/tain_unpack_little.lo: src/libstddjb/tain_unpack_little.c src/include/skalibs/tai.h src/include/skalibs/uint32.h
src/libstddjb/tain_wallclock_read.o src/libstddjb/tain_wallclock_read.lo: src/libstddjb/tain_wallclock_read.c src/include/skalibs/tai.h
src/libstddjb/tain_zero.o src/libstddjb/tain_zero.lo: src/libstddjb/tain_zero.c src/include/skalibs/tai.h
src/libstddjb/time_from_tai.o src/libstddjb/time_from_tai.lo: src/libstddjb/time_from_tai.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/time_from_tai_relative.o src/libstddjb/time_from_tai_relative.lo: src/libstddjb/time_from_tai_relative.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h
src/libstddjb/time_sysclock_from_tai.o src/libstddjb/time_sysclock_from_tai.lo: src/libstddjb/time_sysclock_from_tai.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/timespec_cmp.o src/libstddjb/timespec_cmp.lo: src/libstddjb/timespec_cmp.c src/include/skalibs/djbtime.h
src/libstddjb/timespec_from_tain.o src/libstddjb/timespec_from_tain.lo: src/libstddjb/timespec_from_tain.c src/include/skalibs/tai.h
src/libstddjb/timespec_from_tain_relative.o src/libstddjb/timespec_from_tain_relative.lo: src/libstddjb/timespec_from_tain_relative.c src/include/skalibs/tai.h
src/libstddjb/timespec_sysclock_from_tain.o src/libstddjb/timespec_sysclock_from_tain.lo: src/libstddjb/timespec_sysclock_from_tain.c src/include/skalibs/tai.h
src/libstddjb/timestamp.o src/libstddjb/timestamp.lo: src/libstddjb/timestamp.c src/include/skalibs/tai.h
src/libstddjb/timestamp_fmt.o src/libstddjb/timestamp_fmt.lo: src/libstddjb/timestamp_fmt.c src/include/skalibs/tai.h
src/libstddjb/timestamp_r.o src/libstddjb/timestamp_r.lo: src/libstddjb/timestamp_r.c src/include/skalibs/tai.h
src/libstddjb/timestamp_scan.o src/libstddjb/timestamp_scan.lo: src/libstddjb/timestamp_scan.c src/include/skalibs/tai.h
src/libstddjb/timeval_from_tain.o src/libstddjb/timeval_from_tain.lo: src/libstddjb/timeval_from_tain.c src/include/skalibs/tai.h
src/libstddjb/timeval_from_tain_relative.o src/libstddjb/timeval_from_tain_relative.lo: src/libstddjb/timeval_from_tain_relative.c src/include/skalibs/tai.h
src/libstddjb/timeval_sysclock_from_tain.o src/libstddjb/timeval_sysclock_from_tain.lo: src/libstddjb/timeval_sysclock_from_tain.c src/include/skalibs/tai.h
src/libstddjb/ucharn_findlen.o src/libstddjb/ucharn_findlen.lo: src/libstddjb/ucharn_findlen.c src/include/skalibs/fmtscan.h
src/libstddjb/ucharn_fmt.o src/libstddjb/ucharn_fmt.lo: src/libstddjb/ucharn_fmt.c src/include/skalibs/fmtscan.h
src/libstddjb/ucharn_fmt_little.o src/libstddjb/ucharn_fmt_little.lo: src/libstddjb/ucharn_fmt_little.c src/include/skalibs/fmtscan.h
src/libstddjb/ucharn_scan.o src/libstddjb/ucharn_scan.lo: src/libstddjb/ucharn_scan.c src/include/skalibs/fmtscan.h
src/libstddjb/ucharn_scan_little.o src/libstddjb/ucharn_scan_little.lo: src/libstddjb/ucharn_scan_little.c src/include/skalibs/fmtscan.h
src/libstddjb/ucspi_get.o src/libstddjb/ucspi_get.lo: src/libstddjb/ucspi_get.c src/include/skalibs/env.h
src/libstddjb/uint160_scan.o src/libstddjb/uint160_scan.lo: src/libstddjb/uint160_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint16.h
src/libstddjb/uint16_bswap.o src/libstddjb/uint16_bswap.lo: src/libstddjb/uint16_bswap.c src/include/skalibs/uint16.h
src/libstddjb/uint16_bswapn.o src/libstddjb/uint16_bswapn.lo: src/libstddjb/uint16_bswapn.c src/include/skalibs/uint16.h
src/libstddjb/uint16_bswapp.o src/libstddjb/uint16_bswapp.lo: src/libstddjb/uint16_bswapp.c src/include/skalibs/uint16.h
src/libstddjb/uint16_fmtlist.o src/libstddjb/uint16_fmtlist.lo: src/libstddjb/uint16_fmtlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint16.h
src/libstddjb/uint16_pack.o src/libstddjb/uint16_pack.lo: src/libstddjb/uint16_pack.c src/include/skalibs/uint16.h
src/libstddjb/uint16_pack_big.o src/libstddjb/uint16_pack_big.lo: src/libstddjb/uint16_pack_big.c src/include/skalibs/uint16.h
src/libstddjb/uint16_scan.o src/libstddjb/uint16_scan.lo: src/libstddjb/uint16_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint16.h src/include/skalibs/uint64.h
src/libstddjb/uint16_scanlist.o src/libstddjb/uint16_scanlist.lo: src/libstddjb/uint16_scanlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint16.h
src/libstddjb/uint16_unpack.o src/libstddjb/uint16_unpack.lo: src/libstddjb/uint16_unpack.c src/include/skalibs/uint16.h
src/libstddjb/uint16_unpack_big.o src/libstddjb/uint16_unpack_big.lo: src/libstddjb/uint16_unpack_big.c src/include/skalibs/uint16.h
src/libstddjb/uint320_scan.o src/libstddjb/uint320_scan.lo: src/libstddjb/uint320_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint32.h
src/libstddjb/uint32_bswap.o src/libstddjb/uint32_bswap.lo: src/libstddjb/uint32_bswap.c src/include/skalibs/uint32.h
src/libstddjb/uint32_bswapn.o src/libstddjb/uint32_bswapn.lo: src/libstddjb/uint32_bswapn.c src/include/skalibs/uint32.h
src/libstddjb/uint32_bswapp.o src/libstddjb/uint32_bswapp.lo: src/libstddjb/uint32_bswapp.c src/include/skalibs/uint32.h
src/libstddjb/uint32_fmtlist.o src/libstddjb/uint32_fmtlist.lo: src/libstddjb/uint32_fmtlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint32.h
src/libstddjb/uint32_pack.o src/libstddjb/uint32_pack.lo: src/libstddjb/uint32_pack.c src/include/skalibs/uint32.h
src/libstddjb/uint32_pack_big.o src/libstddjb/uint32_pack_big.lo: src/libstddjb/uint32_pack_big.c src/include/skalibs/uint32.h
src/libstddjb/uint32_scan.o src/libstddjb/uint32_scan.lo: src/libstddjb/uint32_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint32.h src/include/skalibs/uint64.h
src/libstddjb/uint32_scanlist.o src/libstddjb/uint32_scanlist.lo: src/libstddjb/uint32_scanlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint32.h
src/libstddjb/uint32_unpack.o src/libstddjb/uint32_unpack.lo: src/libstddjb/uint32_unpack.c src/include/skalibs/uint32.h
src/libstddjb/uint32_unpack_big.o src/libstddjb/uint32_unpack_big.lo: src/libstddjb/uint32_unpack_big.c src/include/skalibs/uint32.h
src/libstddjb/uint640_fmt_generic.o src/libstddjb/uint640_fmt_generic.lo: src/libstddjb/uint640_fmt_generic.c src/include/skalibs/fmtscan.h src/include/skalibs/uint64.h
src/libstddjb/uint640_scan.o src/libstddjb/uint640_scan.lo: src/libstddjb/uint640_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/uint640_scan_base_max.o src/libstddjb/uint640_scan_base_max.lo: src/libstddjb/uint640_scan_base_max.c src/include/skalibs/fmtscan.h src/include/skalibs/uint64.h
src/libstddjb/uint64_bswap.o src/libstddjb/uint64_bswap.lo: src/libstddjb/uint64_bswap.c src/include/skalibs/uint64.h
src/libstddjb/uint64_bswapn.o src/libstddjb/uint64_bswapn.lo: src/libstddjb/uint64_bswapn.c src/include/skalibs/uint64.h
src/libstddjb/uint64_bswapp.o src/libstddjb/uint64_bswapp.lo: src/libstddjb/uint64_bswapp.c src/include/skalibs/uint64.h
src/libstddjb/uint64_fmt_generic.o src/libstddjb/uint64_fmt_generic.lo: src/libstddjb/uint64_fmt_generic.c src/include/skalibs/fmtscan.h src/include/skalibs/uint64.h
src/libstddjb/uint64_fmtlist.o src/libstddjb/uint64_fmtlist.lo: src/libstddjb/uint64_fmtlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/uint64_fmtlist_generic.o src/libstddjb/uint64_fmtlist_generic.lo: src/libstddjb/uint64_fmtlist_generic.c src/include/skalibs/uint64.h
src/libstddjb/uint64_pack.o src/libstddjb/uint64_pack.lo: src/libstddjb/uint64_pack.c src/include/skalibs/uint64.h
src/libstddjb/uint64_pack_big.o src/libstddjb/uint64_pack_big.lo: src/libstddjb/uint64_pack_big.c src/include/skalibs/uint64.h
src/libstddjb/uint64_scan.o src/libstddjb/uint64_scan.lo: src/libstddjb/uint64_scan.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/uint64_scan_base_max.o src/libstddjb/uint64_scan_base_max.lo: src/libstddjb/uint64_scan_base_max.c src/include/skalibs/fmtscan.h src/include/skalibs/uint64.h
src/libstddjb/uint64_scanlist.o src/libstddjb/uint64_scanlist.lo: src/libstddjb/uint64_scanlist.c src/libstddjb/fmtscan-internal.h src/include/skalibs/uint64.h
src/libstddjb/uint64_unpack.o src/libstddjb/uint64_unpack.lo: src/libstddjb/uint64_unpack.c src/include/skalibs/uint64.h
src/libstddjb/uint64_unpack_big.o src/libstddjb/uint64_unpack_big.lo: src/libstddjb/uint64_unpack_big.c src/include/skalibs/uint64.h
src/libstddjb/uncoe.o src/libstddjb/uncoe.lo: src/libstddjb/uncoe.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h
src/libstddjb/unsanitize_read.o src/libstddjb/unsanitize_read.lo: src/libstddjb/unsanitize_read.c src/include/skalibs/allreadwrite.h src/include/skalibs/error.h
src/libstddjb/utc_from_localtm.o src/libstddjb/utc_from_localtm.lo: src/libstddjb/utc_from_localtm.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/utc_from_ltm64.o src/libstddjb/utc_from_ltm64.lo: src/libstddjb/utc_from_ltm64.c src/include/skalibs/config.h src/libstddjb/djbtime-internal.h src/include/skalibs/djbtime.h src/include/skalibs/uint64.h
src/libstddjb/utc_from_sysclock.o src/libstddjb/utc_from_sysclock.lo: src/libstddjb/utc_from_sysclock.c src/include/skalibs/config.h src/include/skalibs/djbtime.h src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/libstddjb/utc_from_tai.o src/libstddjb/utc_from_tai.lo: src/libstddjb/utc_from_tai.c src/libstddjb/djbtime-internal.h src/include/skalibs/djbtime.h
src/libstddjb/vbaprintf.o src/libstddjb/vbaprintf.lo: src/libstddjb/vbaprintf.c src/include/skalibs/bufalloc.h src/include/skalibs/lolstdio.h src/include/skalibs/stralloc.h
src/libstddjb/vbprintf.o src/libstddjb/vbprintf.lo: src/libstddjb/vbprintf.c src/include/skalibs/buffer.h src/include/skalibs/lolstdio.h
src/libstddjb/wait_nointr.o src/libstddjb/wait_nointr.lo: src/libstddjb/wait_nointr.c src/include/skalibs/djbunix.h
src/libstddjb/wait_pid_nohang.o src/libstddjb/wait_pid_nohang.lo: src/libstddjb/wait_pid_nohang.c src/include/skalibs/djbunix.h
src/libstddjb/wait_pids_nohang.o src/libstddjb/wait_pids_nohang.lo: src/libstddjb/wait_pids_nohang.c src/include/skalibs/djbunix.h
src/libstddjb/wait_reap.o src/libstddjb/wait_reap.lo: src/libstddjb/wait_reap.c src/include/skalibs/djbunix.h
src/libstddjb/waitn.o src/libstddjb/waitn.lo: src/libstddjb/waitn.c src/include/skalibs/djbunix.h
src/libstddjb/waitn_posix.o src/libstddjb/waitn_posix.lo: src/libstddjb/waitn_posix.c src/include/skalibs/djbunix.h
src/libstddjb/waitn_reap.o src/libstddjb/waitn_reap.lo: src/libstddjb/waitn_reap.c src/include/skalibs/djbunix.h
src/libstddjb/waitn_reap_posix.o src/libstddjb/waitn_reap_posix.lo: src/libstddjb/waitn_reap_posix.c src/include/skalibs/djbunix.h
src/libstddjb/waitpid_nointr.o src/libstddjb/waitpid_nointr.lo: src/libstddjb/waitpid_nointr.c src/include/skalibs/djbunix.h
src/libstddjb/writenclose_unsafe5.o src/libstddjb/writenclose_unsafe5.lo: src/libstddjb/writenclose_unsafe5.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h
src/libstddjb/writevnclose_unsafe5.o src/libstddjb/writevnclose_unsafe5.lo: src/libstddjb/writevnclose_unsafe5.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/siovec.h
src/libunixonacid/access_at.o src/libunixonacid/access_at.lo: src/libunixonacid/access_at.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/unix-transactional.h
src/libunixonacid/ancil_recv_fd.o src/libunixonacid/ancil_recv_fd.lo: src/libunixonacid/ancil_recv_fd.c src/include/skalibs/allreadwrite.h src/include/skalibs/ancil.h src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/sysdeps.h
src/libunixonacid/ancil_send_fd.o src/libunixonacid/ancil_send_fd.lo: src/libunixonacid/ancil_send_fd.c src/include/skalibs/ancil.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h
src/libunixonacid/atomic_rm_rf.o src/libunixonacid/atomic_rm_rf.lo: src/libunixonacid/atomic_rm_rf.c src/include/skalibs/skamisc.h src/include/skalibs/unix-transactional.h
src/libunixonacid/atomic_rm_rf_tmp.o src/libunixonacid/atomic_rm_rf_tmp.lo: src/libunixonacid/atomic_rm_rf_tmp.c src/include/skalibs/djbunix.h src/include/skalibs/random.h src/include/skalibs/stralloc.h src/include/skalibs/unix-transactional.h
src/libunixonacid/atomic_symlink.o src/libunixonacid/atomic_symlink.lo: src/libunixonacid/atomic_symlink.c src/include/skalibs/posixplz.h src/include/skalibs/unix-transactional.h
src/libunixonacid/bufalloc_timed_flush.o src/libunixonacid/bufalloc_timed_flush.lo: src/libunixonacid/bufalloc_timed_flush.c src/include/skalibs/bufalloc.h src/include/skalibs/functypes.h src/include/skalibs/unix-timed.h
src/libunixonacid/buffer_timed_fill.o src/libunixonacid/buffer_timed_fill.lo: src/libunixonacid/buffer_timed_fill.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/functypes.h src/include/skalibs/unix-timed.h
src/libunixonacid/buffer_timed_flush.o src/libunixonacid/buffer_timed_flush.lo: src/libunixonacid/buffer_timed_flush.c src/include/skalibs/buffer.h src/include/skalibs/functypes.h src/include/skalibs/unix-timed.h
src/libunixonacid/buffer_timed_get.o src/libunixonacid/buffer_timed_get.lo: src/libunixonacid/buffer_timed_get.c src/include/skalibs/buffer.h src/include/skalibs/functypes.h src/include/skalibs/unix-timed.h
src/libunixonacid/buffer_timed_put.o src/libunixonacid/buffer_timed_put.lo: src/libunixonacid/buffer_timed_put.c src/include/skalibs/buffer.h src/include/skalibs/unix-timed.h
src/libunixonacid/buffer_timed_puts.o src/libunixonacid/buffer_timed_puts.lo: src/libunixonacid/buffer_timed_puts.c src/include/skalibs/unix-timed.h
src/libunixonacid/ipc_timed_recv.o src/libunixonacid/ipc_timed_recv.lo: src/libunixonacid/ipc_timed_recv.c src/include/skalibs/allreadwrite.h src/include/skalibs/functypes.h src/include/skalibs/socket.h src/include/skalibs/unix-timed.h
src/libunixonacid/ipc_timed_send.o src/libunixonacid/ipc_timed_send.lo: src/libunixonacid/ipc_timed_send.c src/include/skalibs/error.h src/include/skalibs/iopause.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/unix-timed.h
src/libunixonacid/ipc_timed_sendv.o src/libunixonacid/ipc_timed_sendv.lo: src/libunixonacid/ipc_timed_sendv.c src/include/skalibs/error.h src/include/skalibs/iopause.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/siovec.h src/include/skalibs/unix-timed.h
src/libunixonacid/kolbak_call.o src/libunixonacid/kolbak_call.lo: src/libunixonacid/kolbak_call.c src/include/skalibs/kolbak.h src/include/skalibs/unixmessage.h
src/libunixonacid/kolbak_enqueue.o src/libunixonacid/kolbak_enqueue.lo: src/libunixonacid/kolbak_enqueue.c src/include/skalibs/kolbak.h src/include/skalibs/unixmessage.h
src/libunixonacid/kolbak_queue_init.o src/libunixonacid/kolbak_queue_init.lo: src/libunixonacid/kolbak_queue_init.c src/include/skalibs/kolbak.h
src/libunixonacid/kolbak_unenqueue.o src/libunixonacid/kolbak_unenqueue.lo: src/libunixonacid/kolbak_unenqueue.c src/include/skalibs/kolbak.h
src/libunixonacid/netstring_timed_get.o src/libunixonacid/netstring_timed_get.lo: src/libunixonacid/netstring_timed_get.c src/include/skalibs/buffer.h src/include/skalibs/iopause.h src/include/skalibs/netstring.h src/include/skalibs/unix-timed.h
src/libunixonacid/open2_at.o src/libunixonacid/open2_at.lo: src/libunixonacid/open2_at.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open3_at.o src/libunixonacid/open3_at.lo: src/libunixonacid/open3_at.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open_appendat.o src/libunixonacid/open_appendat.lo: src/libunixonacid/open_appendat.c src/include/skalibs/fcntl.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open_appendatb.o src/libunixonacid/open_appendatb.lo: src/libunixonacid/open_appendatb.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open_readat.o src/libunixonacid/open_readat.lo: src/libunixonacid/open_readat.c src/include/skalibs/fcntl.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open_readatb.o src/libunixonacid/open_readatb.lo: src/libunixonacid/open_readatb.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open_truncat.o src/libunixonacid/open_truncat.lo: src/libunixonacid/open_truncat.c src/include/skalibs/fcntl.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open_truncatb.o src/libunixonacid/open_truncatb.lo: src/libunixonacid/open_truncatb.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open_writeat.o src/libunixonacid/open_writeat.lo: src/libunixonacid/open_writeat.c src/include/skalibs/fcntl.h src/include/skalibs/unix-transactional.h
src/libunixonacid/open_writeatb.o src/libunixonacid/open_writeatb.lo: src/libunixonacid/open_writeatb.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openc_appendat.o src/libunixonacid/openc_appendat.lo: src/libunixonacid/openc_appendat.c src/include/skalibs/fcntl.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openc_appendatb.o src/libunixonacid/openc_appendatb.lo: src/libunixonacid/openc_appendatb.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openc_readat.o src/libunixonacid/openc_readat.lo: src/libunixonacid/openc_readat.c src/include/skalibs/fcntl.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openc_readatb.o src/libunixonacid/openc_readatb.lo: src/libunixonacid/openc_readatb.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openc_truncat.o src/libunixonacid/openc_truncat.lo: src/libunixonacid/openc_truncat.c src/include/skalibs/fcntl.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openc_truncatb.o src/libunixonacid/openc_truncatb.lo: src/libunixonacid/openc_truncatb.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openc_writeat.o src/libunixonacid/openc_writeat.lo: src/libunixonacid/openc_writeat.c src/include/skalibs/fcntl.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openc_writeatb.o src/libunixonacid/openc_writeatb.lo: src/libunixonacid/openc_writeatb.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/opendir_at.o src/libunixonacid/opendir_at.lo: src/libunixonacid/opendir_at.c src/include/skalibs/direntry.h src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/unix-transactional.h
src/libunixonacid/opengetlnclose.o src/libunixonacid/opengetlnclose.lo: src/libunixonacid/opengetlnclose.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/djbunix.h src/include/skalibs/skamisc.h src/include/skalibs/unix-transactional.h
src/libunixonacid/opengetlnclose_at.o src/libunixonacid/opengetlnclose_at.lo: src/libunixonacid/opengetlnclose_at.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/djbunix.h src/include/skalibs/skamisc.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openreadnclose_at.o src/libunixonacid/openreadnclose_at.lo: src/libunixonacid/openreadnclose_at.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openslurpclose_at.o src/libunixonacid/openslurpclose_at.lo: src/libunixonacid/openslurpclose_at.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openwritenclose_at.o src/libunixonacid/openwritenclose_at.lo: src/libunixonacid/openwritenclose_at.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/openwritevnclose_at.o src/libunixonacid/openwritevnclose_at.lo: src/libunixonacid/openwritevnclose_at.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/siovec.h src/include/skalibs/unix-transactional.h
src/libunixonacid/skaclient_default_cb.o src/libunixonacid/skaclient_default_cb.lo: src/libunixonacid/skaclient_default_cb.c src/include/skalibs/posixishard.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_end.o src/libunixonacid/skaclient_end.lo: src/libunixonacid/skaclient_end.c src/include/skalibs/djbunix.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_init.o src/libunixonacid/skaclient_init.lo: src/libunixonacid/skaclient_init.c src/libunixonacid/skaclient-internal.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_put.o src/libunixonacid/skaclient_put.lo: src/libunixonacid/skaclient_put.c src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_putmsg.o src/libunixonacid/skaclient_putmsg.lo: src/libunixonacid/skaclient_putmsg.c src/include/skalibs/kolbak.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_putmsgv.o src/libunixonacid/skaclient_putmsgv.lo: src/libunixonacid/skaclient_putmsgv.c src/include/skalibs/kolbak.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_putv.o src/libunixonacid/skaclient_putv.lo: src/libunixonacid/skaclient_putv.c src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_send.o src/libunixonacid/skaclient_send.lo: src/libunixonacid/skaclient_send.c src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_sendmsg.o src/libunixonacid/skaclient_sendmsg.lo: src/libunixonacid/skaclient_sendmsg.c src/include/skalibs/skaclient.h
src/libunixonacid/skaclient_sendmsgv.o src/libunixonacid/skaclient_sendmsgv.lo: src/libunixonacid/skaclient_sendmsgv.c src/include/skalibs/skaclient.h
src/libunixonacid/skaclient_sendv.o src/libunixonacid/skaclient_sendv.lo: src/libunixonacid/skaclient_sendv.c src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_server_ack.o src/libunixonacid/skaclient_server_ack.lo: src/libunixonacid/skaclient_server_ack.c src/include/skalibs/djbunix.h src/include/skalibs/posixishard.h src/include/skalibs/skaclient.h src/include/skalibs/socket.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_server_bidi_ack.o src/libunixonacid/skaclient_server_bidi_ack.lo: src/libunixonacid/skaclient_server_bidi_ack.c src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_server_init.o src/libunixonacid/skaclient_server_init.lo: src/libunixonacid/skaclient_server_init.c src/include/skalibs/allreadwrite.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_start.o src/libunixonacid/skaclient_start.lo: src/libunixonacid/skaclient_start.c src/include/skalibs/kolbak.h src/libunixonacid/skaclient-internal.h src/include/skalibs/skaclient.h
src/libunixonacid/skaclient_start_async.o src/libunixonacid/skaclient_start_async.lo: src/libunixonacid/skaclient_start_async.c src/include/skalibs/djbunix.h src/include/skalibs/error.h src/include/skalibs/kolbak.h src/libunixonacid/skaclient-internal.h src/include/skalibs/skaclient.h src/include/skalibs/socket.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_start_cb.o src/libunixonacid/skaclient_start_cb.lo: src/libunixonacid/skaclient_start_cb.c src/include/skalibs/posixishard.h src/libunixonacid/skaclient-internal.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libunixonacid/skaclient_startf.o src/libunixonacid/skaclient_startf.lo: src/libunixonacid/skaclient_startf.c src/include/skalibs/kolbak.h src/libunixonacid/skaclient-internal.h src/include/skalibs/skaclient.h
src/libunixonacid/skaclient_startf_async.o src/libunixonacid/skaclient_startf_async.lo: src/libunixonacid/skaclient_startf_async.c src/include/skalibs/cspawn.h src/include/skalibs/djbunix.h src/include/skalibs/kolbak.h src/libunixonacid/skaclient-internal.h src/include/skalibs/skaclient.h
src/libunixonacid/skaclient_syncify.o src/libunixonacid/skaclient_syncify.lo: src/libunixonacid/skaclient_syncify.c src/include/skalibs/skaclient.h
src/libunixonacid/skaclient_zero.o src/libunixonacid/skaclient_zero.lo: src/libunixonacid/skaclient_zero.c src/include/skalibs/skaclient.h
src/libunixonacid/stat_at.o src/libunixonacid/stat_at.lo: src/libunixonacid/stat_at.c src/include/skalibs/djbunix.h src/include/skalibs/fcntl.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/unix-transactional.h
src/libunixonacid/textclient_command.o src/libunixonacid/textclient_command.lo: src/libunixonacid/textclient_command.c src/include/skalibs/posixishard.h src/include/skalibs/textclient.h
src/libunixonacid/textclient_commandv.o src/libunixonacid/textclient_commandv.lo: src/libunixonacid/textclient_commandv.c src/include/skalibs/posixishard.h src/include/skalibs/textclient.h
src/libunixonacid/textclient_end.o src/libunixonacid/textclient_end.lo: src/libunixonacid/textclient_end.c src/include/skalibs/djbunix.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h
src/libunixonacid/textclient_server_init.o src/libunixonacid/textclient_server_init.lo: src/libunixonacid/textclient_server_init.c src/include/skalibs/cspawn.h src/include/skalibs/textclient.h
src/libunixonacid/textclient_server_init_frompipe.o src/libunixonacid/textclient_server_init_frompipe.lo: src/libunixonacid/textclient_server_init_frompipe.c src/include/skalibs/allreadwrite.h src/include/skalibs/cspawn.h src/include/skalibs/fcntl.h src/include/skalibs/posixishard.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h src/include/skalibs/types.h
src/libunixonacid/textclient_server_init_fromsocket.o src/libunixonacid/textclient_server_init_fromsocket.lo: src/libunixonacid/textclient_server_init_fromsocket.c src/include/skalibs/allreadwrite.h src/include/skalibs/posixishard.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h
src/libunixonacid/textclient_start.o src/libunixonacid/textclient_start.lo: src/libunixonacid/textclient_start.c src/include/skalibs/djbunix.h src/include/skalibs/posixishard.h src/include/skalibs/socket.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h
src/libunixonacid/textclient_startf.o src/libunixonacid/textclient_startf.lo: src/libunixonacid/textclient_startf.c src/include/skalibs/allreadwrite.h src/include/skalibs/cspawn.h src/include/skalibs/posixishard.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h
src/libunixonacid/textclient_zero.o src/libunixonacid/textclient_zero.lo: src/libunixonacid/textclient_zero.c src/include/skalibs/textclient.h
src/libunixonacid/textmessage_create_send_channel.o src/libunixonacid/textmessage_create_send_channel.lo: src/libunixonacid/textmessage_create_send_channel.c src/include/skalibs/ancil.h src/include/skalibs/djbunix.h src/include/skalibs/posixishard.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h src/include/skalibs/unix-timed.h
src/libunixonacid/textmessage_handle.o src/libunixonacid/textmessage_handle.lo: src/libunixonacid/textmessage_handle.c src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_put.o src/libunixonacid/textmessage_put.lo: src/libunixonacid/textmessage_put.c src/include/skalibs/bufalloc.h src/include/skalibs/textmessage.h src/include/skalibs/uint32.h
src/libunixonacid/textmessage_putv.o src/libunixonacid/textmessage_putv.lo: src/libunixonacid/textmessage_putv.c src/include/skalibs/bufalloc.h src/include/skalibs/siovec.h src/include/skalibs/textmessage.h src/include/skalibs/uint32.h
src/libunixonacid/textmessage_receive.o src/libunixonacid/textmessage_receive.lo: src/libunixonacid/textmessage_receive.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/stralloc.h src/include/skalibs/textmessage.h src/include/skalibs/uint32.h
src/libunixonacid/textmessage_receiver_0.o src/libunixonacid/textmessage_receiver_0.lo: src/libunixonacid/textmessage_receiver_0.c src/include/skalibs/buffer.h src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_receiver_free.o src/libunixonacid/textmessage_receiver_free.lo: src/libunixonacid/textmessage_receiver_free.c src/include/skalibs/stralloc.h src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_receiver_hasmsginbuf.o src/libunixonacid/textmessage_receiver_hasmsginbuf.lo: src/libunixonacid/textmessage_receiver_hasmsginbuf.c src/include/skalibs/buffer.h src/include/skalibs/siovec.h src/include/skalibs/textmessage.h src/include/skalibs/uint32.h
src/libunixonacid/textmessage_receiver_init.o src/libunixonacid/textmessage_receiver_init.lo: src/libunixonacid/textmessage_receiver_init.c src/include/skalibs/buffer.h src/include/skalibs/stralloc.h src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_receiver_zero.o src/libunixonacid/textmessage_receiver_zero.lo: src/libunixonacid/textmessage_receiver_zero.c src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_recv_channel.o src/libunixonacid/textmessage_recv_channel.lo: src/libunixonacid/textmessage_recv_channel.c src/include/skalibs/allreadwrite.h src/include/skalibs/ancil.h src/include/skalibs/djbunix.h src/include/skalibs/error.h src/include/skalibs/posixishard.h src/include/skalibs/textmessage.h src/include/skalibs/unix-timed.h
src/libunixonacid/textmessage_sender_1.o src/libunixonacid/textmessage_sender_1.lo: src/libunixonacid/textmessage_sender_1.c src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_sender_flush.o src/libunixonacid/textmessage_sender_flush.lo: src/libunixonacid/textmessage_sender_flush.c src/include/skalibs/bufalloc.h src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_sender_getfd.o src/libunixonacid/textmessage_sender_getfd.lo: src/libunixonacid/textmessage_sender_getfd.c src/include/skalibs/bufalloc.h src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_sender_timed_flush.o src/libunixonacid/textmessage_sender_timed_flush.lo: src/libunixonacid/textmessage_sender_timed_flush.c src/include/skalibs/functypes.h src/include/skalibs/textmessage.h src/include/skalibs/unix-timed.h
src/libunixonacid/textmessage_sender_x.o src/libunixonacid/textmessage_sender_x.lo: src/libunixonacid/textmessage_sender_x.c src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_sender_zero.o src/libunixonacid/textmessage_sender_zero.lo: src/libunixonacid/textmessage_sender_zero.c src/include/skalibs/textmessage.h
src/libunixonacid/textmessage_timed_handle.o src/libunixonacid/textmessage_timed_handle.lo: src/libunixonacid/textmessage_timed_handle.c src/include/skalibs/functypes.h src/include/skalibs/textmessage.h src/include/skalibs/unix-timed.h
src/libunixonacid/textmessage_timed_receive.o src/libunixonacid/textmessage_timed_receive.lo: src/libunixonacid/textmessage_timed_receive.c src/include/skalibs/functypes.h src/include/skalibs/textmessage.h src/include/skalibs/unix-timed.h
src/libunixonacid/timed_flush.o src/libunixonacid/timed_flush.lo: src/libunixonacid/timed_flush.c src/include/skalibs/error.h src/include/skalibs/iopause.h src/include/skalibs/unix-timed.h
src/libunixonacid/timed_get.o src/libunixonacid/timed_get.lo: src/libunixonacid/timed_get.c src/include/skalibs/allreadwrite.h src/include/skalibs/iopause.h src/include/skalibs/unix-timed.h
src/libunixonacid/timed_getln.o src/libunixonacid/timed_getln.lo: src/libunixonacid/timed_getln.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/functypes.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h src/include/skalibs/unix-timed.h
src/libunixonacid/timed_getlnmax.o src/libunixonacid/timed_getlnmax.lo: src/libunixonacid/timed_getlnmax.c src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/functypes.h src/include/skalibs/skamisc.h src/include/skalibs/unix-timed.h
src/libunixonacid/unixconnection_free.o src/libunixonacid/unixconnection_free.lo: src/libunixonacid/unixconnection_free.c src/include/skalibs/unixconnection.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixconnection_init.o src/libunixonacid/unixconnection_init.lo: src/libunixonacid/unixconnection_init.c src/include/skalibs/unixconnection.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixconnection_init_withclosecb.o src/libunixonacid/unixconnection_init_withclosecb.lo: src/libunixonacid/unixconnection_init_withclosecb.c src/include/skalibs/unixconnection.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixconnection_zero.o src/libunixonacid/unixconnection_zero.lo: src/libunixonacid/unixconnection_zero.c src/include/skalibs/unixconnection.h
src/libunixonacid/unixmessage_bits_closeall.o src/libunixonacid/unixmessage_bits_closeall.lo: src/libunixonacid/unixmessage_bits_closeall.c src/include/skalibs/bitarray.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_bits_closenone.o src/libunixonacid/unixmessage_bits_closenone.lo: src/libunixonacid/unixmessage_bits_closenone.c src/include/skalibs/bitarray.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_drop.o src/libunixonacid/unixmessage_drop.lo: src/libunixonacid/unixmessage_drop.c src/include/skalibs/djbunix.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_handle.o src/libunixonacid/unixmessage_handle.lo: src/libunixonacid/unixmessage_handle.c src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_put.o src/libunixonacid/unixmessage_put.lo: src/libunixonacid/unixmessage_put.c src/include/skalibs/bitarray.h src/include/skalibs/disize.h src/include/skalibs/genalloc.h src/include/skalibs/posixishard.h src/include/skalibs/siovec.h src/include/skalibs/stralloc.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_receive.o src/libunixonacid/unixmessage_receive.lo: src/libunixonacid/unixmessage_receive.c src/include/skalibs/allreadwrite.h src/include/skalibs/cbuffer.h src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/stralloc.h src/include/skalibs/sysdeps.h src/include/skalibs/uint16.h src/include/skalibs/uint32.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_receiver_0.o src/libunixonacid/unixmessage_receiver_0.lo: src/libunixonacid/unixmessage_receiver_0.c src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_receiver_free.o src/libunixonacid/unixmessage_receiver_free.lo: src/libunixonacid/unixmessage_receiver_free.c src/include/skalibs/cbuffer.h src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_receiver_hasmsginbuf.o src/libunixonacid/unixmessage_receiver_hasmsginbuf.lo: src/libunixonacid/unixmessage_receiver_hasmsginbuf.c src/include/skalibs/cbuffer.h src/include/skalibs/siovec.h src/include/skalibs/uint32.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_receiver_init.o src/libunixonacid/unixmessage_receiver_init.lo: src/libunixonacid/unixmessage_receiver_init.c src/include/skalibs/cbuffer.h src/include/skalibs/stralloc.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_1.o src/libunixonacid/unixmessage_sender_1.lo: src/libunixonacid/unixmessage_sender_1.c src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_closecb.o src/libunixonacid/unixmessage_sender_closecb.lo: src/libunixonacid/unixmessage_sender_closecb.c src/include/skalibs/djbunix.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_flush.o src/libunixonacid/unixmessage_sender_flush.lo: src/libunixonacid/unixmessage_sender_flush.c src/include/skalibs/allreadwrite.h src/include/skalibs/disize.h src/include/skalibs/djbunix.h src/include/skalibs/genalloc.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/uint16.h src/include/skalibs/uint32.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_free.o src/libunixonacid/unixmessage_sender_free.lo: src/libunixonacid/unixmessage_sender_free.c src/include/skalibs/disize.h src/include/skalibs/djbunix.h src/include/skalibs/genalloc.h src/include/skalibs/stralloc.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_getfd.o src/libunixonacid/unixmessage_sender_getfd.lo: src/libunixonacid/unixmessage_sender_getfd.c src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_init.o src/libunixonacid/unixmessage_sender_init.lo: src/libunixonacid/unixmessage_sender_init.c src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_init_withclosecb.o src/libunixonacid/unixmessage_sender_init_withclosecb.lo: src/libunixonacid/unixmessage_sender_init_withclosecb.c src/include/skalibs/genalloc.h src/include/skalibs/stralloc.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_timed_flush.o src/libunixonacid/unixmessage_sender_timed_flush.lo: src/libunixonacid/unixmessage_sender_timed_flush.c src/include/skalibs/functypes.h src/include/skalibs/unix-timed.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_x.o src/libunixonacid/unixmessage_sender_x.lo: src/libunixonacid/unixmessage_sender_x.c src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_sender_zero.o src/libunixonacid/unixmessage_sender_zero.lo: src/libunixonacid/unixmessage_sender_zero.c src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_timed_handle.o src/libunixonacid/unixmessage_timed_handle.lo: src/libunixonacid/unixmessage_timed_handle.c src/include/skalibs/functypes.h src/include/skalibs/unix-timed.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_timed_receive.o src/libunixonacid/unixmessage_timed_receive.lo: src/libunixonacid/unixmessage_timed_receive.c src/include/skalibs/functypes.h src/include/skalibs/unix-timed.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_unput.o src/libunixonacid/unixmessage_unput.lo: src/libunixonacid/unixmessage_unput.c src/include/skalibs/disize.h src/include/skalibs/djbunix.h src/include/skalibs/genalloc.h src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessage_zero.o src/libunixonacid/unixmessage_zero.lo: src/libunixonacid/unixmessage_zero.c src/include/skalibs/unixmessage.h
src/libunixonacid/unixmessagev_zero.o src/libunixonacid/unixmessagev_zero.lo: src/libunixonacid/unixmessagev_zero.c src/include/skalibs/unixmessage.h
skalibs-2.14.2.0/package/info 0000664 0000000 0000000 00000000112 14630613211 0015626 0 ustar 00root root 0000000 0000000 package=skalibs
version=2.14.2.0
category=prog
package_macro_name=SKALIBS
skalibs-2.14.2.0/patch-for-solaris 0000775 0000000 0000000 00000001313 14630613211 0016644 0 ustar 00root root 0000000 0000000 #!/usr/xpg4/bin/sh
patchit () {
if head -n 1 $1 | grep -qF -- -e ; then
echo '#!/usr/xpg4/bin/sh -e' > $1.tmp
else
echo '#!/usr/xpg4/bin/sh' > $1.tmp
fi
tail -n +2 $1 >> $1.tmp
mv -f $1.tmp $1
chmod 0755 $1
}
# Solaris doesn't understand POSIX.1-2008 either.
sed -e 's/XOPEN_SOURCE=700/XOPEN_SOURCE=600/' < configure > configure.tmp
mv -f configure.tmp configure
patchit ./configure
patchit ./tools/install.sh
patchit ./tools/gen-deps.sh
patchit ./tools/gen-types.sh
patchit ./tools/gen-types-internal.sh
patchit ./tools/gen-bits.sh
patchit ./tools/gen-sysdepsh.sh
echo 'SHELL := /usr/xpg4/bin/sh' > Makefile.tmp
echo >> Makefile.tmp
cat Makefile >> Makefile.tmp
mv -f Makefile.tmp Makefile
skalibs-2.14.2.0/src/ 0000775 0000000 0000000 00000000000 14630613211 0014152 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/src/headers/ 0000775 0000000 0000000 00000000000 14630613211 0015565 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/src/headers/bits-bendian 0000664 0000000 0000000 00000000523 14630613211 0020047 0 ustar 00root root 0000000 0000000
#define UINT@BITS@_LITTLE(u) UINT@BITS@_BSWAP(u)
#define UINT@BITS@_BIG(u) (u)
#define uint@BITS@_little(u) uint@BITS@_bswap(u)
#define uint@BITS@_big(u) (u)
#define uint@BITS@_littlep(u) uint@BITS@_bswapp(u)
#define uint@BITS@_bigp(u)
#define uint@BITS@_littlen(array, n) uint@BITS@_bswapn(array, n)
#define uint@BITS@_bign(array, n)
skalibs-2.14.2.0/src/headers/bits-footer 0000664 0000000 0000000 00000000010 14630613211 0017734 0 ustar 00root root 0000000 0000000
#endif
skalibs-2.14.2.0/src/headers/bits-header 0000664 0000000 0000000 00000000167 14630613211 0017703 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_UINT@BITS@_H
#define SKALIBS_UINT@BITS@_H
#include
#include
skalibs-2.14.2.0/src/headers/bits-lendian 0000664 0000000 0000000 00000000523 14630613211 0020061 0 ustar 00root root 0000000 0000000
#define UINT@BITS@_LITTLE(u) (u)
#define UINT@BITS@_BIG(u) UINT@BITS@_BSWAP(u)
#define uint@BITS@_little(u) (u)
#define uint@BITS@_big(u) uint@BITS@_bswap(u)
#define uint@BITS@_littlep(u)
#define uint@BITS@_bigp(u) uint@BITS@_bswapp(u)
#define uint@BITS@_littlen(array, n)
#define uint@BITS@_bign(array, n) uint@BITS@_bswapn(array, n)
skalibs-2.14.2.0/src/headers/bits-template 0000664 0000000 0000000 00000005773 14630613211 0020276 0 ustar 00root root 0000000 0000000
extern void uint@BITS@_pack (char *, uint@BITS@_t) ;
extern void uint@BITS@_pack_big (char *, uint@BITS@_t) ;
extern void uint@BITS@_unpack (char const *, uint@BITS@_t *) ;
extern void uint@BITS@_unpack_big (char const *, uint@BITS@_t *) ;
extern uint@BITS@_t uint@BITS@_bswap (uint@BITS@_t) ;
extern void uint@BITS@_bswapp (uint@BITS@_t *) ;
extern void uint@BITS@_bswapn (uint@BITS@_t *, size_t) ;
#define UINT@BITS@_FMT @DFMT@
#define UINT@BITS@_OFMT @OFMT@
#define UINT@BITS@_XFMT @XFMT@
#define UINT@BITS@_BFMT @BFMT@
#define uint@BITS@_fmt_base uint64_fmt_generic
#define uint@BITS@0_fmt_base uint640_fmt_generic
#define uint@BITS@_fmt(s, u) uint@BITS@_fmt_base(s, (u), 10)
#define uint@BITS@0_fmt(s, u, n) uint@BITS@0_fmt_base(s, u, (n), 10)
#define uint@BITS@_ofmt(s, o) uint@BITS@_fmt_base(s, (o), 8)
#define uint@BITS@0_ofmt(s, o, n) uint@BITS@0_fmt_base(s, o, (n), 8)
#define uint@BITS@_xfmt(s, x) uint@BITS@_fmt_base(s, (x), 16)
#define uint@BITS@0_xfmt(s, x, n) uint@BITS@0_fmt_base(s, x, (n), 16)
#define uint@BITS@_bfmt(s, b) uint@BITS@_fmt_base(s, (b), 2)
#define uint@BITS@0_bfmt(s, b, n) uint@BITS@0_fmt_base(s, b, (n), 2)
extern size_t uint@BITS@_fmtlist (char *, uint@BITS@_t const *, size_t) ;
extern size_t uint@BITS@_scan_base (char const *, uint@BITS@_t *, uint8_t) ;
extern size_t uint@BITS@0_scan_base (char const *, uint@BITS@_t *, uint8_t) ;
#define uint@BITS@_scan(s, u) uint@BITS@_scan_base(s, (u), 10)
#define uint@BITS@0_scan(s, u) uint@BITS@0_scan_base(s, (u), 10)
#define uint@BITS@_oscan(s, u) uint@BITS@_scan_base(s, (u), 8)
#define uint@BITS@0_oscan(s, u) uint@BITS@0_scan_base(s, (u), 8)
#define uint@BITS@_xscan(s, u) uint@BITS@_scan_base(s, (u), 16)
#define uint@BITS@0_xscan(s, u) uint@BITS@0_scan_base(s, (u), 16)
#define uint@BITS@_bscan(s, u) uint@BITS@_scan_base(s, (u), 2)
#define uint@BITS@0_bscan(s, u) uint@BITS@0_scan_base(s, (u), 2)
extern size_t uint@BITS@_scanlist (uint@BITS@_t *, size_t, char const *, size_t *) ;
#define int@BITS@_fmt_base int64_fmt_generic
#define int@BITS@_fmt(s, u) int@BITS@_fmt_base(s, (u), 10)
#define int@BITS@_ofmt(s, o) int@BITS@_fmt_base(s, (o), 8)
#define int@BITS@_xfmt(s, x) int@BITS@_fmt_base(s, (x), 16)
#define int@BITS@_bfmt(s, b) int@BITS@_fmt_base(s, (b), 2)
extern size_t int@BITS@_fmtlist (char *, int@BITS@_t const *, size_t) ;
extern size_t int@BITS@_scan_base (char const *, int@BITS@_t *, uint8_t) ;
extern size_t int@BITS@0_scan_base (char const *, int@BITS@_t *, uint8_t) ;
#define int@BITS@_scan(s, u) int@BITS@_scan_base(s, (u), 10)
#define int@BITS@0_scan(s, u) int@BITS@0_scan_base(s, (u), 10)
#define int@BITS@_oscan(s, u) int@BITS@_scan_base(s, (u), 8)
#define int@BITS@0_oscan(s, u) int@BITS@0_scan_base(s, (u), 8)
#define int@BITS@_xscan(s, u) int@BITS@_scan_base(s, (u), 16)
#define int@BITS@0_xscan(s, u) int@BITS@0_scan_base(s, (u), 16)
#define int@BITS@_bscan(s, u) int@BITS@_scan_base(s, (u), 2)
#define int@BITS@0_bscan(s, u) int@BITS@0_scan_base(s, (u), 2)
extern size_t int@BITS@_scanlist (int@BITS@_t *, size_t, char const *, size_t *) ;
skalibs-2.14.2.0/src/headers/ip46-footer 0000664 0000000 0000000 00000001330 14630613211 0017563 0 ustar 00root root 0000000 0000000
#define ip46_from_ip(i, s, h) ((h) ? ip46_from_ip6(i, s) : ip46_from_ip4(i, s))
extern ssize_t socket_recv46 (int, char *, size_t, ip46 *, uint16_t *, int) ;
extern ssize_t socket_recvnb46 (int, char *, size_t, ip46 *, uint16_t *, int, tain const *, tain *) ;
#define socket_recvnb46_g(fd, buf, len, i, port, h, deadline) socket_recvnb46(fd, buf, len, i, port, h, (deadline), &STAMP)
#define socket_sendnb46_g(fd, buf, len, i, port, deadline) socket_sendnb46(fd, buf, len, i, port, (deadline), &STAMP)
extern int socket_deadlineconnstamp46 (int, ip46 const *, uint16_t, tain const *, tain *) ;
#define socket_deadlineconnstamp46_g(fd, ip, port, deadline) socket_deadlineconnstamp46(fd, ip, port, (deadline), &STAMP)
#endif
skalibs-2.14.2.0/src/headers/ip46-header 0000664 0000000 0000000 00000001744 14630613211 0017526 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_IP46_H
#define SKALIBS_IP46_H
#include
#include
#include
#include
#include
#include
#define IP46_FMT IP6_FMT
#define IP4_ANY "\0\0\0"
#define IP6_ANY "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
#define IP4_LOCAL "\177\0\0\1"
#define IP6_LOCAL "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1"
typedef struct ip46full_s ip46full, *ip46full_ref ;
struct ip46full_s
{
char ip[16] ;
unsigned int is6: 1 ;
} ;
#define IP46FULL_ZERO { .ip = IP6_ANY, .is6 = 0 }
#define ip46full_is6(i) ((i)->is6)
#define ip46full_fmt(s, i) ((i)->is6 ? ip6_fmt(s, (i)->ip) : ip4_fmt(s, (i)->ip))
extern size_t ip46full_scan (char const *, ip46full *) ;
extern size_t ip46full_scanlist (ip46full *, size_t, char const *, size_t *) ;
#define ip46full_from_ip4(i, ip4) (memcpy((i)->ip, ip4, 4), memset((i)->ip + 4, 0, 12), (i)->is6 = 0)
#define ip46full_from_ip6(i, ip6) (memcpy((i)->ip, ip6, 16), (i)->is6 = 1)
skalibs-2.14.2.0/src/headers/ip46-with 0000664 0000000 0000000 00000004203 14630613211 0017242 0 ustar 00root root 0000000 0000000 typedef ip46full ip46, *ip46_ref ;
#define IP46_ZERO IP46FULL_ZERO
#define SKALIBS_IPV6_ENABLED
#define SKALIBS_IP_SIZE 16
#define ip46_is6(i) ip46full_is6(i)
#define ip46_fmt(s, i) ip46full_fmt(s, i)
#define ip46_scan(s, i) ip46full_scan(s, i)
#define ip46_scanlist(out, max, s, num) ip46full_scanlist(out, max, s, num)
#define ip46_from_ip4(i, ip4) (ip46full_from_ip4(i, ip4), 1)
#define ip46_from_ip6(i, ip6) (ip46full_from_ip6(i, ip6), 1)
#define socket_connect46(s, i, port) ((i)->is6 ? socket_connect6(s, (i)->ip, port) : socket_connect4(s, (i)->ip, port))
#define socket_bind46(s, i, port) ((i)->is6 ? socket_bind6(s, (i)->ip, port) : socket_bind4(s, (i)->ip, port))
#define socket_bind46_reuse(s, i, port) ((i)->is6 ? socket_bind6_reuse(s, (i)->ip, port) : socket_bind4_reuse(s, (i)->ip, port))
#define socket_tcp46(h) ((h) ? socket_tcp6() : socket_tcp4())
#define socket_tcp46_b(h) ((h) ? socket_tcp6_b() : socket_tcp4_b())
#define socket_tcp46_nb(h) ((h) ? socket_tcp6_nb() : socket_tcp4_nb())
#define socket_tcp46_coe(h) ((h) ? socket_tcp6_coe() : socket_tcp4_coe())
#define socket_tcp46_nbcoe(h) ((h) ? socket_tcp6_nbcoe() : socket_tcp4_nbcoe())
#define socket_tcp46_internal(h, flags) ((h) ? socket_tcp6_internal(flags) : socket_tcp4_internal(flags))
#define socket_udp46(h) ((h) ? socket_udp6() : socket_udp4())
#define socket_udp46_b(h) ((h) ? socket_udp6_b() : socket_udp4_b())
#define socket_udp46_nb(h) ((h) ? socket_udp6_nb() : socket_udp4_nb())
#define socket_udp46_coe(h) ((h) ? socket_udp6_coe() : socket_udp4_coe())
#define socket_udp46_nbcoe(h) ((h) ? socket_udp6_nbcoe() : socket_udp4_nbcoe())
#define socket_udp46_internal(h, flags) ((h) ? socket_udp6_internal(flags) : socket_udp4_internal(flags))
#define socket_send46(fd, s, len, i, port) ((i)->is6 ? socket_send6(fd, s, len, (i)->ip, port) : socket_send4(fd, s, len, (i)->ip, port))
extern int socket_local46 (int, ip46 *, uint16_t *) ;
extern int socket_remote46 (int, ip46 *, uint16_t *) ;
#define socket_sendnb46(fd, buf, len, i, port, deadline, stamp) ((i)->is6 ? socket_sendnb6(fd, buf, len, (i)->ip, port, deadline, stamp) : socket_sendnb4(fd, buf, len, (i)->ip, port, deadline, stamp))
skalibs-2.14.2.0/src/headers/ip46-without 0000664 0000000 0000000 00000003111 14630613211 0017767 0 ustar 00root root 0000000 0000000 typedef struct ip46_s ip46, *ip46_ref ;
struct ip46_s
{
char ip[4] ;
} ;
#define IP46_ZERO { .ip = "\0\0\0" }
#undef SKALIBS_IPV6_ENABLED
#define SKALIBS_IP_SIZE 4
#define ip46_is6(ip) 0
#define ip46_fmt(s, i) ip4_fmt(s, (i)->ip)
#define ip46_scan(s, i) ip4_scan(s, (i)->ip)
#define ip46_scanlist(out, max, s, num) ip4_scanlist((out)->ip, max, s, num)
#define ip46_from_ip4(i, ip4) (memmove((i)->ip, (ip4), 4), 1)
#define ip46_from_ip6(i, ip6) (errno = ENOSYS, 0)
#define socket_connect46(s, i, port) socket_connect4(s, (i)->ip, port)
#define socket_bind46(s, i, port) socket_bind4(s, (i)->ip, port)
#define socket_bind46_reuse(s, i, port) socket_bind4_reuse(s, (i)->ip, port)
#define socket_tcp46(h) socket_tcp4()
#define socket_tcp46_b(h) socket_tcp4_b()
#define socket_tcp46_nb(h) socket_tcp4_nb()
#define socket_tcp46_coe(h) socket_tcp4_coe()
#define socket_tcp46_nbcoe(h) socket_tcp4_nbcoe()
#define socket_tcp46_internal(h, flags) socket_tcp4_internal(flags)
#define socket_udp46(h) socket_udp4()
#define socket_udp46_b(h) socket_udp4_b()
#define socket_udp46_nb(h) socket_udp4_nb()
#define socket_udp46_coe(h) socket_udp4_coe()
#define socket_udp46_nbcoe(h) socket_udp4_nbcoe()
#define socket_udp46_internal(h, flags) socket_udp4_internal(flags)
#define socket_send46(fd, s, len, i, port) socket_send4(fd, s, len, (i)->ip, port)
#define socket_local46(fd, i, port) socket_local4(fd, (i)->ip, port)
#define socket_remote46(fd, i, port) socket_remote4(fd, (i)->ip, port)
#define socket_sendnb46(fd, buf, len, i, port, deadline, stamp) socket_sendnb4(fd, buf, len, (i)->ip, port, deadline, stamp)
skalibs-2.14.2.0/src/headers/signed-template 0000664 0000000 0000000 00000001133 14630613211 0020570 0 ustar 00root root 0000000 0000000 #define @TYPE@_PACK @BYTES@
#define @type@_pack uint@BITS@_pack
#define @type@_pack_big uint@BITS@_pack_big
#define @type@_unpack(pack, p) uint@BITS@_unpack(pack, (uint@BITS@_t *)(p))
#define @type@_unpack_big(pack, p) uint@BITS@_unpack_big(pack, (uint@BITS@_t *)(p))
#define @TYPE@_FMT (1+UINT@BITS@_FMT)
#define @type@_fmt int@BITS@_fmt
#define @type@_fmtlist int@BITS@_fmtlist
#define @type@_scan(s, d) int@BITS@_scan(s, (int@BITS@_t *)d)
#define @type@0_scan(s, d) int@BITS@0_scan(s, (int@BITS@_t *)d)
#define @type@_scanlist(tab, max, s, num) int@BITS@_scanlist((int@BITS@_t *)tab, max, s, num)
skalibs-2.14.2.0/src/headers/types-footer 0000664 0000000 0000000 00000000010 14630613211 0020137 0 ustar 00root root 0000000 0000000
#endif
skalibs-2.14.2.0/src/headers/types-header 0000664 0000000 0000000 00000000307 14630613211 0020102 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_TYPES_H
#define SKALIBS_TYPES_H
#include
#include
#include
#include
#include
skalibs-2.14.2.0/src/headers/uint16-bswap 0000664 0000000 0000000 00000000107 14630613211 0017746 0 ustar 00root root 0000000 0000000
#define UINT16_BSWAP(a) (((a) & 0x00ffu) << 8 | ((a) & 0xff00u) >> 8)
skalibs-2.14.2.0/src/headers/uint32-bswap 0000664 0000000 0000000 00000000207 14630613211 0017745 0 ustar 00root root 0000000 0000000
#define UINT32_BSWAP(a) (((a) & 0x000000ffu) << 24 | ((a) & 0x0000ff00u) << 8 | ((a) & 0x00ff0000u) >> 8 | ((a) & 0xff000000u) >> 24)
skalibs-2.14.2.0/src/headers/uint64-bswap 0000664 0000000 0000000 00000000507 14630613211 0017755 0 ustar 00root root 0000000 0000000
#define UINT64_BSWAP(a) (((a) & 0x00000000000000ffull) << 56 | ((a) & 0x000000000000ff00ull) << 40 | ((a) & 0x0000000000ff0000ull) << 24 | ((a) & 0x00000000ff000000ull) << 8 | ((a) & 0x000000ff00000000ull) >> 8 | ((a) & 0x0000ff0000000000ull) >> 24 | ((a) & 0x00ff000000000000ull) >> 40 | ((a) & 0xff00000000000000ull) >> 56)
skalibs-2.14.2.0/src/headers/uint64-defs 0000664 0000000 0000000 00000000736 14630613211 0017566 0 ustar 00root root 0000000 0000000
extern size_t uint64_fmt_generic (char *, uint64_t, uint8_t) ;
extern size_t uint640_fmt_generic (char *, uint64_t, size_t, uint8_t) ;
extern size_t int64_fmt_generic (char *, int64_t, uint8_t) ;
extern size_t uint64_fmtlist_generic (char *, void const *, size_t, uint8_t, uint64_t (*)(void const *, size_t)) ;
extern size_t uint64_scan_base_max (char const *, uint64_t *, uint8_t, uint64_t) ;
extern size_t int64_scan_base_max (char const *, int64_t *, uint8_t, uint64_t) ;
skalibs-2.14.2.0/src/headers/uint64-include 0000664 0000000 0000000 00000000035 14630613211 0020260 0 ustar 00root root 0000000 0000000
#include
skalibs-2.14.2.0/src/headers/uint64-macros 0000664 0000000 0000000 00000000625 14630613211 0020126 0 ustar 00root root 0000000 0000000
#ifndef INT_LEAST64_MIN
# define INT_LEAST64_MIN INT64_MIN
#endif
#ifndef INT_FAST64_MIN
# define INT_FAST64_MIN INT64_MIN
#endif
#ifndef INT_LEAST64_MAX
# define INT_LEAST64_MAX INT64_MAX
#endif
#ifndef INT_FAST64_MAX
# define INT_FAST64_MAX INT64_MAX
#endif
#ifndef UINT_LEAST64_MAX
# define UINT_LEAST64_MAX UINT64_MAX
#endif
#ifndef UINT_FAST64_MAX
# define UINT_FAST64_MAX UINT64_MAX
#endif
skalibs-2.14.2.0/src/headers/uint64-noulong64 0000664 0000000 0000000 00000000431 14630613211 0020470 0 ustar 00root root 0000000 0000000
typedef unsigned long long uint64_t ;
typedef signed long long int64_t ;
#ifndef INT64_MIN
# define INT64_MIN (-1-0x7fffffffffffffffll)
#endif
#ifndef INT64_MAX
# define INT64_MAX 0x7fffffffffffffffll
#endif
#ifndef UINT64_MAX
# define UINT64_MAX 0xffffffffffffffffull
#endif
skalibs-2.14.2.0/src/headers/uint64-ulong64 0000664 0000000 0000000 00000000405 14630613211 0020134 0 ustar 00root root 0000000 0000000
typedef unsigned long uint64_t ;
typedef long int64_t ;
#ifndef INT64_MIN
# define INT64_MIN (-1-0x7fffffffffffffffl)
#endif
#ifndef INT64_MAX
# define INT64_MAX 0x7fffffffffffffffl
#endif
#ifndef UINT64_MAX
# define UINT64_MAX 0xfffffffffffffffful
#endif
skalibs-2.14.2.0/src/headers/unsigned-template 0000664 0000000 0000000 00000003253 14630613211 0021140 0 ustar 00root root 0000000 0000000 #define @TYPE@_PACK @BYTES@
#define @type@_pack uint@BITS@_pack
#define @type@_pack_big uint@BITS@_pack_big
#define @type@_unpack uint@BITS@_unpack
#define @type@_unpack_big uint@BITS@_unpack_big
#define @type@_little uint@BITS@_little
#define @type@_big uint@BITS@_big
#define @type@_littlep uint@BITS@_littlep
#define @type@_bigp uint@BITS@_bigp
#define @type@_littlen uint@BITS@_littlen
#define @type@_bign uint@BITS@_bign
#define @TYPE@_FMT UINT@BITS@_FMT
#define @TYPE@_OFMT UINT@BITS@_OFMT
#define @TYPE@_XFMT UINT@BITS@_XFMT
#define @TYPE@_BFMT UINT@BITS@_BFMT
#define @type@_fmt_base uint@BITS@_fmt_base
#define @type@0_fmt_base uint@BITS@0_fmt_base
#define @type@_fmt uint@BITS@_fmt
#define @type@0_fmt uint@BITS@0_fmt
#define @type@_ofmt uint@BITS@_ofmt
#define @type@0_ofmt uint@BITS@0_ofmt
#define @type@_xfmt uint@BITS@_xfmt
#define @type@0_xfmt uint@BITS@0_xfmt
#define @type@_bfmt uint@BITS@_bfmt
#define @type@0_bfmt uint@BITS@0_bfmt
#define @type@_fmtlist uint@BITS@_fmtlist
#define @type@_scan_base(s, u, b) uint@BITS@_scan_base(s, (uint@BITS@_t *)u, b)
#define @type@0_scan_base(s, u, b) uint@BITS@0_scan_base(s, (uint@BITS@_t *)u, b)
#define @type@_scanlist(tab, max, s, num) uint@BITS@_scanlist((uint@BITS@_t *)tab, max, s, num)
#define @type@_scan(s, u) @type@_scan_base(s, (u), 10)
#define @type@0_scan(s, u) @type@0_scan_base(s, (u), 10)
#define @type@_oscan(s, u) @type@_scan_base(s, (u), 8)
#define @type@0_oscan(s, u) @type@0_scan_base(s, (u), 8)
#define @type@_xscan(s, u) @type@_scan_base(s, (u), 16)
#define @type@0_xscan(s, u) @type@0_scan_base(s, (u), 16)
#define @type@_bscan(s, u) @type@_scan_base(s, (u), 2)
#define @type@0_bscan(s, u) @type@0_scan_base(s, (u), 2)
skalibs-2.14.2.0/src/include/ 0000775 0000000 0000000 00000000000 14630613211 0015575 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/src/include/skalibs/ 0000775 0000000 0000000 00000000000 14630613211 0017225 5 ustar 00root root 0000000 0000000 skalibs-2.14.2.0/src/include/skalibs/alarm.h 0000664 0000000 0000000 00000000416 14630613211 0020473 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_ALARM_H
#define SKALIBS_ALARM_H
#include
extern int alarm_milliseconds (unsigned int) ;
extern int alarm_timeout (tain const *) ;
extern int alarm_deadline (tain const *) ;
extern void alarm_disable (void) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/alloc.h 0000664 0000000 0000000 00000000444 14630613211 0020472 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_ALLOC_H
#define SKALIBS_ALLOC_H
#include
#include
extern void *alloc (size_t) ;
#define alloc_free(p) free(p)
#define alloc_re(p, old, new) alloc_realloc(p, new)
extern int alloc_realloc (char **, size_t) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/allreadwrite.h 0000664 0000000 0000000 00000001727 14630613211 0022064 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_ALLREADWRITE_H
#define SKALIBS_ALLREADWRITE_H
#include
#include
extern ssize_t sanitize_read (ssize_t) ;
extern ssize_t unsanitize_read (ssize_t) ;
extern size_t allreadwrite (io_func_ref, int, char *, size_t) ;
extern size_t allreadwritev (iov_func_ref, int, struct iovec const *, unsigned int) ;
extern ssize_t fd_read (int, char *, size_t) ;
extern ssize_t fd_write (int, char const *, size_t) ;
extern ssize_t fd_readv (int, struct iovec const *, unsigned int) ;
extern ssize_t fd_writev (int, struct iovec const *, unsigned int) ;
extern ssize_t fd_recv (int, char *, size_t, unsigned int) ;
extern ssize_t fd_send (int, char const *, size_t, unsigned int) ;
extern size_t allread (int, char *, size_t) ;
extern size_t allwrite (int, char const *, size_t) ;
extern size_t allreadv (int, struct iovec const *, unsigned int) ;
extern size_t allwritev (int, struct iovec const *, unsigned int) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/ancil.h 0000664 0000000 0000000 00000000240 14630613211 0020460 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_ANCIL_H
#define SKALIBS_ANCIL_H
extern int ancil_recv_fd (int, char) ;
extern int ancil_send_fd (int, int, char) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/avlnode.h 0000664 0000000 0000000 00000003715 14630613211 0021034 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_AVLNODE_H
#define SKALIBS_AVLNODE_H
#include
#include
#include
#define AVLNODE_MAXDEPTH 49 /* enough for 2^32 nodes in the worst case */
typedef int avliter_func (uint32_t, unsigned int, void *) ;
typedef avliter_func *avliter_func_ref ;
typedef struct avlnode_s avlnode, *avlnode_ref ;
struct avlnode_s
{
uint32_t data ;
uint32_t child[2] ;
signed char balance : 2 ;
} ;
#define AVLNODE_ZERO { .data = 0, .child = { UINT32_MAX, UINT32_MAX }, .balance = 0 }
extern avlnode const avlnode_zero ;
extern uint32_t avlnode_searchnode (avlnode const *, uint32_t, uint32_t, void const *, dtok_func_ref, cmp_func_ref, void *) ;
extern int avlnode_search (avlnode const *, uint32_t, uint32_t, void const *, uint32_t *, dtok_func_ref, cmp_func_ref, void *) ;
extern unsigned int avlnode_height (avlnode const *, uint32_t, uint32_t) gccattr_pure ;
extern uint32_t avlnode_extremenode (avlnode const *, uint32_t, uint32_t, int) gccattr_pure ;
#define avlnode_minnode(s, max, r) avlnode_extremenode(s, max, (r), 0)
#define avlnode_maxnode(s, max, r) avlnode_extremenode(s, max, (r), 1)
extern int avlnode_extreme (avlnode const *, uint32_t, uint32_t, int, uint32_t *) ;
#define avlnode_min(s, max, r, data) avlnode_extreme(s, max, (r), 0, data)
#define avlnode_max(s, max, r, data) avlnode_extreme(s, max, (r), 1, data)
extern uint32_t avlnode_insertnode (avlnode *, uint32_t, uint32_t, uint32_t, dtok_func_ref, cmp_func_ref, void *) ;
extern uint32_t avlnode_delete (avlnode *, uint32_t, uint32_t *, void const *, dtok_func_ref, cmp_func_ref, void *) ;
extern uint32_t avlnode_iter_nocancel (avlnode *, uint32_t, uint32_t, uint32_t, avliter_func_ref, void *) ;
#define avlnode_iter(tree, max, root, f, stuff) (avlnode_iter_nocancel(tree, max, max, root, f, stuff) == (max))
extern int avlnode_iter_withcancel (avlnode *, uint32_t, uint32_t, avliter_func_ref, avliter_func_ref, void *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/avltree.h 0000664 0000000 0000000 00000005224 14630613211 0021043 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_AVLTREE_H
#define SKALIBS_AVLTREE_H
#include
#include
#include
#include
typedef struct avltree_s avltree, *avltree_ref ;
struct avltree_s
{
gensetdyn x ;
uint32_t root ;
dtok_func_ref dtok ;
cmp_func_ref kcmp ;
void *external ;
} ;
#define AVLTREE_ZERO { .x = GENSETDYN_ZERO, .root = UINT32_MAX, .dtok = 0, .kcmp = 0, .external = 0 }
extern avltree const avltree_zero ;
#define avltree_len(t) gensetdyn_n(&(t)->x)
#define avltree_totalsize(t) ((uint32_t)(t)->x.storage.len)
#define avltree_nodes(t) ((avlnode *)(t)->x.storage.s)
#define avltree_data(t, i) ((uint32_t)avltree_nodes(t)[i].data)
#define avltree_root(t) ((t)->root)
#define avltree_setroot(t, r) ((t)->root = (r))
extern void avltree_free (avltree *) ;
extern void avltree_init (avltree *, uint32_t, uint32_t, uint32_t, dtok_func_ref, cmp_func_ref, void *) ;
#define AVLTREE_INIT(b, num, den, dtk, f, p) { .x = GENSETDYN_INIT(avlnode, (b), num, den), .root = UINT32_MAX, .dtok = (dtk), .kcmp = (f), .external = (p) }
#define avltree_searchnode(t, k) avlnode_searchnode(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), k, (t)->dtok, (t)->kcmp, (t)->external)
#define avltree_search(t, k, data) avlnode_search(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), k, (data), (t)->dtok, (t)->kcmp, (t)->external)
#define avltree_height(t) avlnode_height(avltree_nodes(t), avltree_totalsize(t), avltree_root(t))
#define avltree_extremenode(t, h) avlnode_extremenode(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), h)
#define avltree_minnode(t) avltree_extremenode((t), 0)
#define avltree_maxnode(t) avltree_extremenode((t), 1)
#define avltree_extreme(t, h, data) avlnode_extreme(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), (h), data)
#define avltree_min(t, data) avltree_extreme((t), 0, data)
#define avltree_max(t, data) avltree_extreme((t), 1, data)
extern int avltree_newnode (avltree *, uint32_t, uint32_t *) ;
#define avltree_insertnode(t, i) avltree_setroot(t, avlnode_insertnode(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), i, (t)->dtok, (t)->kcmp, (t)->external))
extern int avltree_insert (avltree *, uint32_t) ;
extern int avltree_delete (avltree *, void const *) ;
#define avltree_iter_nocancel(t, cut, f, p) avlnode_iter_nocancel(avltree_nodes(t), avltree_totalsize(t), cut, avltree_root(t), f, p)
#define avltree_iter(t, f, p) avlnode_iter(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), f, p)
#define avltree_iter_withcancel(t, f, cancelf, p) avlnode_iter_withcancel(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), f, cancelf, p)
#endif
skalibs-2.14.2.0/src/include/skalibs/avltreen.h 0000664 0000000 0000000 00000005655 14630613211 0021231 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_AVLTREEN_H
#define SKALIBS_AVLTREEN_H
#include
#include
#include
#include
/*
avltreen is the structure managing the AVL tree.
It needs pre-declared arrays: "storage", an array of avlnode,
and "freelist", an array of uint32_t, given as arguments to
avltreen_init(). Pointers to those arrays are then stored in
the genset.
*/
typedef struct avltreen_s avltreen, *avltreen_ref ;
struct avltreen_s
{
genset x ;
uint32_t root ;
dtok_func_ref dtok ;
cmp_func_ref kcmp ;
void *external ;
} ;
#define AVLTREEN_ZERO { .x = GENSET_ZERO, .root = UINT32_MAX, .dtok = 0, .kcmp = 0, .external = 0 }
#define avltreen_totalsize(t) ((t)->x.max)
#define avltreen_len(t) genset_n(&(t)->x)
#define avltreen_nodes(t) ((avlnode *)(t)->x.storage)
#define avltreen_data(t, i) (avltreen_nodes(t)[i].data)
#define avltreen_root(t) ((t)->root)
#define avltreen_setroot(t, r) ((t)->root = (r))
extern void avltreen_init (avltreen *, avlnode *, uint32_t *, uint32_t, dtok_func_ref, cmp_func_ref, void *) ;
#define AVLTREEN_DECLARE_AND_INIT(name, size, dtk, cmp, p) \
avlnode name##_storage[size] ; \
uint32_t name##_freelist[size] ; \
avltreen name ; \
avltreen_init(&name, name##_storage, name##_freelist, size, dtk, cmp, p)
#define avltreen_searchnode(t, k) avlnode_searchnode(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), (k), (t)->dtok, (t)->kcmp, (t)->external)
#define avltreen_search(t, k, data) avlnode_search(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), k, (data), (t)->dtok, (t)->kcmp, (t)->external)
#define avltreen_height(t) avlnode_height(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t))
#define avltreen_extremenode(t, h) avlnode_extremenode(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), h)
#define avltreen_minnode(t) avltreen_extremenode((t), 0)
#define avltreen_maxnode(t) avltreen_extremenode((t), 1)
#define avltreen_extreme(t, h, data) avlnode_extreme(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), (h), data)
#define avltreen_min(t, data) avltreen_extreme((t), 0, data)
#define avltreen_max(t, data) avltreen_extreme((t), 1, data)
extern uint32_t avltreen_newnode (avltreen *, uint32_t) ;
#define avltreen_insertnode(t, i) avltreen_setroot(t, avlnode_insertnode(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), i, (t)->dtok, (t)->kcmp, (t)->external))
extern int avltreen_insert (avltreen *, uint32_t) ;
extern int avltreen_delete (avltreen *, void const *) ;
#define avltreen_iter(t, f, p) avlnode_iter(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), f, p)
#define avltreen_iter_nocancel(t, cut, f, p) avlnode_iter_nocancel(avltreen_nodes(t), avltreen_totalsize(t), cut, avltreen_root(t), f, p)
#define avltreen_iter_withcancel(t, f, cancelf, p) avlnode_iter_withcancel(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), f, cancelf, p)
#endif
skalibs-2.14.2.0/src/include/skalibs/bigkv.h 0000664 0000000 0000000 00000002107 14630613211 0020500 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_BIGKV_H
#define SKALIBS_BIGKV_H
#include
#include
#include
#include
#include
typedef struct bigkv_node_s bigkv_node, *bigkv_node_ref ;
struct bigkv_node_s
{
size_t k ;
size_t v ;
} ;
#define BIGKV_NODE_ZERO { .k = 0, .v = 0 }
typedef struct bigkv_s bigkv, *bigkv_ref ;
struct bigkv_s
{
stralloc storage ;
genalloc nodes ; /* bigkv_node */
avltree map ;
} ;
#define BIGKV_ZERO { .storage = STRALLOC_ZERO, .nodes = GENALLOC_ZERO, .map = AVLTREE_ZERO }
extern bigkv const bigkv_zero ;
#define BIGKV_OPTIONS_NODUP 0x00000001u
#define bigkv_len(b) avltree_len(&(b)->map)
#define bigkv_init(b) (*(b) = bigkv_zero)
extern int bigkv_fill (bigkv *, char const *const *, char, char const *, char const *, uint32_t) ;
#define bigkv_fill_argv(b, argv) bigkv_fill(b, (argv), '=', "--", "--", 0)
#define bigkv_fill_envp(b, envp) bigkv_fill(b, (envp), '=', 0, 0, 0)
extern char const *bigkv_search (bigkv const *, char const *) ;
extern void bigkv_free (bigkv *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/bitarray.h 0000664 0000000 0000000 00000003632 14630613211 0021217 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_BITARRAY_H
#define SKALIBS_BITARRAY_H
#include
#include
#define bitarray_div8(n) ((n) ? 1U + (((n) - 1) >> 3) : 0U)
extern void bitarray_clearsetn (unsigned char *, size_t, size_t, int) ;
#define bitarray_clearn(s, start, len) bitarray_clearsetn(s, start, (len), 0)
#define bitarray_setn(s, start, len) bitarray_clearsetn(s, start, (len), 1)
#define bitarray_peek(s, n) (((s)[(n)>>3] & (1U<<((n)&7))) ? 1 : 0)
#define bitarray_isset(b, n) bitarray_peek(b, n)
#define bitarray_clear(s, n) ((s)[(n)>>3] &= ~(1U << ((n) & 7)))
#define bitarray_set(s, n) ((s)[(n)>>3] |= 1U << ((n) & 7))
#define bitarray_poke(s, n, h) ((h) ? bitarray_set(s, n) : bitarray_clear(s, n))
extern int bitarray_testandpoke (unsigned char *, size_t, int) ;
#define bitarray_testandclear(b, n) bitarray_testandpoke(b, n, 0)
#define bitarray_testandset(b, n) bitarray_testandpoke(b, n, 1)
extern size_t bitarray_firstclear (unsigned char const *, size_t) gccattr_pure ;
extern size_t bitarray_firstset (unsigned char const *, size_t) gccattr_pure ;
#define bitarray_first(s, n, h) ((h) ? bitarray_firstset(s, n) : bitarray_firstclear(s, n))
extern size_t bitarray_firstclear_skip (unsigned char const *, size_t, size_t) gccattr_pure ;
extern size_t bitarray_firstset_skip (unsigned char const *, size_t, size_t) gccattr_pure ;
#define bitarray_first_skip(s, n, k, h) ((h) ? bitarray_firstset_skip(s, n, k) : bitarray_firstclear_skip(s, n, k))
extern size_t bitarray_countones (unsigned char const *, size_t) gccattr_pure ;
extern void bitarray_not (unsigned char *, size_t, size_t) ;
extern void bitarray_and (unsigned char *, unsigned char const *, unsigned char const *, size_t) ;
extern void bitarray_or (unsigned char *, unsigned char const *, unsigned char const *, size_t) ;
extern void bitarray_xor (unsigned char *, unsigned char const *, unsigned char const *, size_t) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/blake2s.h 0000664 0000000 0000000 00000001434 14630613211 0020723 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_BLAKE2S_H
#define SKALIBS_BLAKE2S_H
#include
#include
typedef struct blake2s_ctx_s blake2s_ctx, *blake2s_ctx_ref ;
struct blake2s_ctx_s
{
size_t buflen ;
size_t outlen ;
uint32_t h[8] ;
uint32_t t[2] ;
uint32_t f[2] ;
char buf[64] ;
} ;
#define BLAKE2S_INIT(len) { \
.buflen = 0, \
.outlen = len, \
.h = { 0x6A09E667UL ^ (0x01010000 | len), 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL, 0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL }, \
.t = { 0, 0 }, \
.f = { 0, 0 }, \
.buf = { 0 } }
extern void blake2s_init (blake2s_ctx *, size_t) ; /* outlen <= 32 */
extern void blake2s_update (blake2s_ctx *, char const *, size_t) ;
extern void blake2s_final (blake2s_ctx *, char *) ; /* outlen chars */
#endif
skalibs-2.14.2.0/src/include/skalibs/bsdsnowflake.h 0000664 0000000 0000000 00000002374 14630613211 0022066 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_BSDSNOWFLAKE_H
#define SKALIBS_BSDSNOWFLAKE_H
/*
Like skalibs/nonposix.h, this header is supposed to be included
*before* system headers.
Unlike skalibs/nonposix.h, though, it does not define ftms that
enable non-portable behaviour; it just attempts to work around
blatant brokenness, things that actually ARE defined by POSIX
but where OSes just ignore the spec.
The BSDs are experts at this, hence the name.
*/
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__DragonFly__)
/* BSDs: the eponym.
Sometimes you just need to recognize who they are and what they do. */
#ifndef SKALIBS_BSD_SUCKS
#define SKALIBS_BSD_SUCKS
#endif
/* Other times you just need to say you're a BSD so they deign
to define symbols like EOVERFLOW. Give me my POSIX symbols,
pretty please? */
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#endif
#if defined(__APPLE__) && defined(__MACH__)
/* MacOS: needs this for full SUSv3 conformance. That's how you
can tell it's really a BSD inside. With additional layers of crap. */
#ifndef _DARWIN_C_SOURCE
#define _DARWIN_C_SOURCE
#endif
#endif /* __APPLE__ && __MACH__ */
#endif /* SKALIBS_BSDSNOWFLAKE_H */
skalibs-2.14.2.0/src/include/skalibs/bufalloc.h 0000664 0000000 0000000 00000002445 14630613211 0021172 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_BUFALLOC_H
#define SKALIBS_BUFALLOC_H
#include
#include
#include
#include
typedef struct bufalloc_s bufalloc, *bufalloc_ref ;
struct bufalloc_s
{
stralloc x ;
size_t p ;
int fd ;
iow_func_ref op ;
} ;
#define BUFALLOC_ZERO { STRALLOC_ZERO, 0, -1, 0 }
#define BUFALLOC_INIT(f, d) { STRALLOC_ZERO, 0, (d), (f) }
extern void bufalloc_init (bufalloc *, iow_func_ref, int) ;
#define bufalloc_shrink(ba) stralloc_shrink(&(ba)->x)
#define bufalloc_free(ba) stralloc_free(&(ba)->x)
#define bufalloc_put(ba, s, n) stralloc_catb(&(ba)->x, s, n)
#define bufalloc_puts(ba, s) stralloc_cats(&(ba)->x, s)
#define bufalloc_putv(ba, v, n) stralloc_catv(&(ba)->x, v, n)
#define bufalloc_unput(ba, n) ((ba)->x.len -= (n))
#define bufalloc_fd(ba) ((ba)->fd)
extern int bufalloc_getfd (bufalloc const *) gccattr_pure ;
extern int bufalloc_flush (bufalloc *) ;
extern void bufalloc_clean (bufalloc *) ;
#define bufalloc_len(ba) ((ba)->x.len - (ba)->p)
extern size_t bufalloc_getlen (bufalloc const *) gccattr_pure ;
#define bufalloc_isempty(ba) ((ba)->x.len == (ba)->p)
extern bufalloc bufalloc_1_ ;
#define bufalloc_1 (&bufalloc_1_)
extern bufalloc bufalloc_2_ ;
#define bufalloc_2 (&bufalloc_2_)
#endif
skalibs-2.14.2.0/src/include/skalibs/buffer.h 0000664 0000000 0000000 00000007705 14630613211 0020660 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_BUFFER_H
#define SKALIBS_BUFFER_H
#include
#include
#include
#include
#include
typedef struct buffer_s buffer, *buffer_ref ;
struct buffer_s
{
iov_func_ref op ;
int fd ;
cbuffer c ;
} ;
#define BUFFER_ZERO { 0, -1, CBUFFER_ZERO }
/*
Circular buffers need to be 1 char bigger than the storage space,
so that the head == tail case is nonambiguous (empty, not full).
*/
#define BUFFER_INSIZE 8192
#define BUFFER_OUTSIZE 8192
#define BUFFER_ERRSIZE 1024
#define BUFFER_INSIZE_SMALL 512
#define BUFFER_OUTSIZE_SMALL 512
#define BUFFER_INIT(f, d, buf, len) { (f), (d), CBUFFER_INIT(buf, len) }
extern int buffer_init (buffer *, iov_func_ref, int, char *, size_t) ;
/* Writing */
extern int buffer_flush (buffer *) ;
#define buffer_putnoflush(b, s, len) cbuffer_put(&(b)->c, s, len)
#define buffer_putvnoflush(b, v, n) cbuffer_putv(&(b)->c, v, n)
extern size_t buffer_putsnoflush (buffer *, char const *) ;
extern int buffer_putallnoflush (buffer *, char const *, size_t) ;
extern int buffer_putvallnoflush (buffer *, struct iovec const *, unsigned int) ;
extern int buffer_putsallnoflush (buffer *, char const *) ;
extern int buffer_putall (buffer *, char const *, size_t, size_t *) ;
extern int buffer_putvall (buffer *, struct iovec const *, unsigned int, size_t *) ;
extern int buffer_putsall (buffer *, char const *, size_t *) ;
#define buffer_putallflush(b, s, len, w) (buffer_putall(b, s, len, w) && buffer_flush(b))
#define buffer_putvallflush(b, v, n, w) (buffer_putvall(b, v, n, w) && buffer_flush(b))
extern int buffer_putsallflush (buffer *, char const *, size_t *) ;
extern ssize_t buffer_put (buffer *, char const *, size_t) ;
extern ssize_t buffer_putv (buffer *, struct iovec const *, unsigned int) ;
extern ssize_t buffer_puts (buffer *, char const *) ;
extern ssize_t buffer_putflush (buffer *, char const *, size_t) ;
extern ssize_t buffer_putvflush (buffer *, struct iovec const *, unsigned int) ;
extern ssize_t buffer_putsflush (buffer *, char const *) ;
#define buffer_unput(b, n) cbuffer_unput(&(b)->c, n)
#define buffer_wpeek(b, v) cbuffer_wpeek(&(b)->c, v)
#define buffer_wseek(b, n) cbuffer_wseek(&(b)->c, n)
/* Reading */
extern ssize_t buffer_fill (buffer *) ;
#define buffer_getnofill(b, s, len) cbuffer_get(&(b)->c, s, len)
#define buffer_getvnofill(b, v, n) cbuffer_getv(&(b)->c, v, n)
extern int buffer_getallnofill (buffer *, char *, size_t) ;
extern int buffer_getvallnofill (buffer *, struct iovec const *, unsigned int) ;
extern int buffer_getall (buffer *, char *, size_t, size_t *) ;
extern int buffer_getvall (buffer *, struct iovec const *, unsigned int, size_t *) ;
extern ssize_t buffer_get (buffer *, char *, size_t) ;
extern ssize_t buffer_getv (buffer *, struct iovec const *, unsigned int) ;
#define buffer_unget(b, n) cbuffer_unget(&(b)->c, n)
#define buffer_rpeek(b, v) cbuffer_rpeek(&(b)->c, v)
#define buffer_rseek(b, n) cbuffer_rseek(&(b)->c, n)
/* Utility */
#define buffer_len(b) cbuffer_len(&(b)->c)
extern size_t buffer_getlen (buffer const *) gccattr_pure ;
#define buffer_available(b) cbuffer_available(&(b)->c)
#define buffer_isempty(b) cbuffer_isempty(&(b)->c)
#define buffer_isfull(b) cbuffer_isfull(&(b)->c)
#define buffer_fd(b) ((b)->fd)
extern int buffer_getfd (buffer const *) gccattr_pure ;
#define buffer_isreadable(b) (!buffer_isfull(b))
#define buffer_iswritable(b) (!buffer_isempty(b))
/* Globals */
#define buffer_read fd_readv
#define buffer_write fd_writev
extern iov_func buffer_flush1read ;
extern buffer buffer_0_ ;
#define buffer_0 (&buffer_0_)
extern buffer buffer_0small_ ;
#define buffer_0small (&buffer_0small_)
extern buffer buffer_0f1_ ;
#define buffer_0f1 (&buffer_0f1_)
extern buffer buffer_1_ ;
#define buffer_1 (&buffer_1_)
extern buffer buffer_1small_ ;
#define buffer_1small (&buffer_1small_)
extern buffer buffer_2_ ;
#define buffer_2 (&buffer_2_)
#endif
skalibs-2.14.2.0/src/include/skalibs/bytestr.h 0000664 0000000 0000000 00000003536 14630613211 0021101 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_BYTESTR_H
#define SKALIBS_BYTESTR_H
/* for Alphas and other archs where char != 8bit */
#define T8(x) ((x) & 0xffU)
#include
#include
#include
#define byte_copy(to, n, from) memmove(to, (from), n)
#define byte_copyr(to, n, from) memmove(to, (from), n)
#define byte_diff(a, n, b) memcmp(a, (b), n)
#define byte_zero(p, n) memset(p, 0, n)
#define str_len strlen
#define str_nlen strnlen
#define str_diff strcmp
#define str_diffn strncmp
#define str_copy(to, from) strlen(strcpy(to, from))
#define case_diffs strcasecmp
#define case_diffn strncasecmp
extern size_t byte_chr (char const *, size_t, int) gccattr_pure ;
extern size_t byte_rchr (char const *, size_t, int) gccattr_pure ;
extern size_t byte_in (char const *, size_t, char const *, size_t) gccattr_pure ;
#define byte_equal(s, n, t) (!memcmp(s, (t), n))
extern size_t byte_count (char const *, size_t, char) gccattr_pure ;
extern size_t byte_search (char const *, size_t, char const *, size_t) ;
extern void byte_zzero (char *, size_t) ;
#define str_diffb(a, n, b) strncmp(a, (b), n)
extern size_t str_chr (char const *, int) gccattr_pure ;
extern size_t str_rchr (char const *, int) gccattr_pure ;
extern int str_start (char const *, char const *) gccattr_pure ;
#define str_equal(s, t) (!strcmp(s, t))
extern size_t str_strn (char const *, size_t, char const *, size_t) gccattr_pure ;
extern void case_lowers (char *) ;
extern void case_lowerb (char *, size_t) ;
extern void case_uppers (char *) ;
extern void case_upperb (char *, size_t) ;
#define case_diffb(a, n, b) case_diffn(a, (b), n)
#define case_equals(a, b) (!strcasecmp(a, b))
#define case_equalb(a, n, b) (!strncasecmp(a, (b), n))
#define case_starts(s, t) case_startb(s, strlen(s), t)
extern int case_startb (char const *, size_t, char const *) gccattr_pure ;
#endif
skalibs-2.14.2.0/src/include/skalibs/cbuffer.h 0000664 0000000 0000000 00000003465 14630613211 0021022 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_CBUFFER_H
#define SKALIBS_CBUFFER_H
#include
#include
#include
typedef struct cbuffer_s cbuffer, *cbuffer_ref ;
struct cbuffer_s
{
char *x ;
size_t a ; /* total length */
size_t p ; /* head */
size_t n ; /* tail */
} ;
#define CBUFFER_ZERO { 0, 0, 0, 0 }
/*
Circular buffers need to be 1 char bigger than the storage space,
so that the head == tail case is nonambiguous (empty).
*/
#define CBUFFER_INIT(buf, len) { (buf), (len), 0, 0 }
extern int cbuffer_init (cbuffer *, char *, size_t) ;
/* Writing */
extern size_t cbuffer_put (cbuffer *, char const *, size_t) ;
extern size_t cbuffer_putv (cbuffer *, struct iovec const *, unsigned int) ;
#define cbuffer_puts(b, s) cbuffer_put(b, (s), strlen(s))
#define cbuffer_UNPUT(b, w) ((b)->n = ((b)->a + (b)->n - w) % (b)->a, w) ;
extern size_t cbuffer_unput (cbuffer *, size_t) ;
extern void cbuffer_wpeek (cbuffer const *, struct iovec *) ;
#define cbuffer_WSEEK(b, w) ((b)->n = ((b)->n + (w)) % (b)->a, w)
extern size_t cbuffer_wseek (cbuffer *, size_t) ;
/* Reading */
extern size_t cbuffer_get (cbuffer *, char *, size_t) ;
extern size_t cbuffer_getv (cbuffer *, struct iovec const *, unsigned int) ;
#define cbuffer_UNGET(b, n) ((b)->p = ((b)->a + (b)->p - n) % (b)->a, n) ;
extern size_t cbuffer_unget (cbuffer *, size_t) ;
extern void cbuffer_rpeek (cbuffer const *, struct iovec *) ;
#define cbuffer_RSEEK(b, n) ((b)->p = ((b)->p + (n)) % (b)->a, n)
extern size_t cbuffer_rseek (cbuffer *, size_t) ;
/* Utility */
#define cbuffer_len(b) ((size_t)(((b)->a - (b)->p + (b)->n) % (b)->a))
#define cbuffer_available(b) ((size_t)(((b)->a - (b)->n + (b)->p - 1) % (b)->a))
#define cbuffer_isempty(b) (!cbuffer_len(b))
#define cbuffer_isfull(b) (!cbuffer_available(b))
#endif
skalibs-2.14.2.0/src/include/skalibs/cdb.h 0000664 0000000 0000000 00000002314 14630613211 0020126 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_CDB_H
#define SKALIBS_CDB_H
#include
#include
typedef struct cdb_s cdb, *cdb_ref ;
struct cdb_s
{
char const *map ;
uint32_t size ;
} ;
#define CDB_ZERO { .map = 0, .size = 0 }
extern cdb const cdb_zero ;
typedef struct cdb_find_state_s cdb_find_state, *cdb_find_state_ref ;
struct cdb_find_state_s
{
uint32_t loop ;
uint32_t khash ;
uint32_t kpos ;
uint32_t hpos ;
uint32_t hslots ;
} ;
#define CDB_FIND_STATE_ZERO { .loop = 0, .khash = 0, .kpos = 0, .hpos = 0, .hslots = 0 }
typedef struct cdb_data_s cdb_data, *cdb_data_ref ;
struct cdb_data_s
{
char const *s ;
uint32_t len ;
} ;
extern void cdb_free (cdb *) ;
extern int cdb_init (cdb *, char const *) ;
extern int cdb_init_at (cdb *, int, char const *) ;
extern int cdb_init_fromfd (cdb *, int) ;
#define cdb_findstart(d) ((d)->loop = 0)
extern int cdb_findnext (cdb const *, cdb_data *, char const *, uint32_t, cdb_find_state *) ;
extern int cdb_find (cdb const *, cdb_data *, char const *, uint32_t) ;
#define CDB_TRAVERSE_INIT() 2048
#define cdb_traverse_init(pos) (*(pos) = 2048)
extern int cdb_traverse_next (cdb const *, cdb_data *, cdb_data *, uint32_t *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/cdbmake.h 0000664 0000000 0000000 00000001344 14630613211 0020766 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_CDBMAKE_H
#define SKALIBS_CDBMAKE_H
#include
#include
#include
#include
typedef struct cdbmaker_s cdbmaker, *cdbmaker_ref ;
struct cdbmaker_s
{
genalloc hplist ; /* array of diuint32 */
uint32_t pos ;
buffer b ;
char buf[BUFFER_OUTSIZE] ;
} ;
#define CDBMAKER_ZERO { .hplist = GENALLOC_ZERO, .pos = 2048, .b = BUFFER_ZERO, .buf = { 0 } }
extern int cdbmake_start (cdbmaker *, int) ;
extern int cdbmake_add (cdbmaker *, char const *, uint32_t, char const *, uint32_t) ;
extern int cdbmake_addv (cdbmaker *, struct iovec const *, unsigned int, struct iovec const *, unsigned int) ;
extern int cdbmake_finish (cdbmaker *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/cspawn.h 0000664 0000000 0000000 00000016754 14630613211 0020706 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_CSPAWN_H
#define SKALIBS_CSPAWN_H
#include
#include
#define CSPAWN_FLAGS_SELFPIPE_FINISH 0x0001U
#define CSPAWN_FLAGS_SIGBLOCKNONE 0x0002U
#define CSPAWN_FLAGS_SETSID 0x0004U
enum cspawn_fileaction_type_e
{
CSPAWN_FA_CLOSE,
CSPAWN_FA_COPY,
CSPAWN_FA_MOVE,
CSPAWN_FA_OPEN,
CSPAWN_FA_CHDIR,
CSPAWN_FA_FCHDIR
} ;
struct cspawn_fa_openinfo_s
{
int fd ;
char const *file ;
int oflag ;
mode_t mode ;
} ;
union cspawn_fileaction_u
{
int fd ;
int fd2[2] ;
char const *path ;
struct cspawn_fa_openinfo_s openinfo ;
} ;
typedef struct cspawn_fileaction_s cspawn_fileaction, *cspawn_fileaction_ref ;
struct cspawn_fileaction_s
{
enum cspawn_fileaction_type_e type ;
union cspawn_fileaction_u x ;
} ;
/* Generic interface for posix_spawn() with a fork()+execve() fallback */
extern pid_t cspawn (char const *, char const *const *, char const *const *, uint16_t, cspawn_fileaction const *, size_t) ;
/* Simple spawn functions with 0 or 1 communicating fds. */
extern pid_t child_spawn0 (char const *, char const *const *, char const *const *) ;
extern pid_t child_spawn1_pipe (char const *, char const *const *, char const *const *, int *, int) ;
extern pid_t child_spawn1_socket (char const *, char const *const *, char const *const *, int *) ;
/*
Spawn function with 2 communicating pipes. The int * points to 2 fds.
Input: fds[0] and fds[1] are the fds to move the pipes to in the child.
Output: fds[0] and fds[1] contain the pipes to the child.
*/
extern pid_t child_spawn2 (char const *, char const *const *, char const *const *, int *) ;
/*
Same, with an additional pipe from the child to the parent.
The int * points to 3 fds.
The additional fd# is available to the child in the defined env variable.
*/
#define SKALIBS_CHILD_SPAWN_FDS_ENVVAR "SKALIBS_CHILD_SPAWN_FDS"
extern pid_t child_spawn3 (char const *, char const *const *, char const *const *, int *) ;
/*
Generalization of the previous functions.
* requests n (the last arg) communication fds between parent and child. Uses pipes.
* if n=1, equivalent to child_spawn1_pipe; child writes, parent reads.
* if n>=2, parent reads on even and writes on odd.
*/
extern pid_t child_spawn (char const *, char const *const *, char const *const *, int *, size_t) ;
/* cspawn, but running as a grandchild. Uses one fork(). */
extern pid_t gcspawn (char const *, char const *const *, char const *const *, uint16_t, cspawn_fileaction const *, size_t) ;
/* mexec (see skalibs/exec.h), but with cspawn instead */
extern int env_mspawn (char const *, char const *) ;
extern pid_t mspawn_afn (char const *, char const *const *, char const *const *, size_t, char const *, size_t, size_t, uint16_t, cspawn_fileaction const *, size_t) ;
extern pid_t mspawn_afm (char const *, char const *const *, char const *const *, size_t, char const *, size_t, uint16_t, cspawn_fileaction const *, size_t) ;
extern pid_t mspawn_af (char const *, char const *const *, char const *const *, size_t, uint16_t, cspawn_fileaction const *, size_t) ;
#define mspawn_aen(file, argv, envp, modif, modiflen, modifn, flags, fa, n) mspawn_afn(file, argv, envp, env_len(envp), modif, modiflen, modifn, flags, fa, n)
#define mspawn_aem(file, argv, envp, modif, modiflen, flags, fa, n) mspawn_afm(file, argv, envp, env_len(envp), modif, modiflen, flags, fa, n)
#define mspawn_ae(file, argv, envp, flags, fa, n) mspawn_af(file, argv, (envp), env_len(envp), flags, fa, n)
#define mspawn_an(file, argv, modif, modiflen, modifn, flags, fa, n) mspawn_aen(file, argv, (char const *const *)environ, modif, modiflen, modifn, flags, fa, n)
#define mspawn_am(file, argv, modif, modiflen, flags, fa, n) mspawn_aem(file, argv, (char const *const *)environ, modif, modiflen, flaga, fa, n)
#define mspawn_a(file, argv, flags, fa, n) mspawn_ae(file, (argv), (char const *const *)environ, flags, fa, n)
#define mspawn_fn(argv, envp, envlen, modif, modiflen, modifn, flags, fa, n) mspawn_afn((argv)[0], (argv), envp, envlen, modif, modiflen, modifn, flags, fa, n)
#define mspawn_fm(argv, envp, envlen, modif, modiflen, flags, fa, n) mspawn_afm((argv)[0], (argv), envp, envlen, modif, modiflen, flags, fa, n)
#define mspawn_f(argv, envp, envlen, flags, fa, n) mspawn_af((argv)[0], (argv), envp, envlen, flags, fa, n)
#define mspawn_en(argv, envp, modif, modiflen, modifn, flags, fa, n) mspawn_aen((argv)[0], (argv), envp, modif, modiflen, modifn, flags, fa, n)
#define mspawn_em(argv, envp, modif, modiflen, flags, fa, n) mspawn_aem((argv)[0], (argv), envp, modif, modiflen, flags, fa, n)
#define mspawn_e(argv, envp, flags, fa, n) mspawn_ae((argv)[0], (argv), envp, flags, fa, n)
#define mspawn_n(argv, modif, modiflen, modifn, flags, fa, n) mspawn_an((argv)[0], (argv), modif, modiflen, modifn, flags, fa, n)
#define mspawn_m(argv, modif, modiflen, flags, fa, n) mspawn_am((argv)[0], (argv), modif, modiflen, flags, fa, n)
#define mspawn(argv, flags, fa, n) mspawn_a((argv)[0], (argv), flags, fa, n)
extern pid_t xmspawn_afn (char const *, char const *const *, char const *const *, size_t, char const *, size_t, size_t, uint16_t, cspawn_fileaction const *, size_t) ;
extern pid_t xmspawn_afm (char const *, char const *const *, char const *const *, size_t, char const *, size_t, uint16_t, cspawn_fileaction const *, size_t) ;
extern pid_t xmspawn_af (char const *, char const *const *, char const *const *, size_t, uint16_t, cspawn_fileaction const *, size_t) ;
#define xmspawn_aen(file, argv, envp, modif, modiflen, modifn, flags, fa, n) xmspawn_afn(file, argv, envp, env_len(envp), modif, modiflen, modifn, flags, fa, n)
#define xmspawn_aem(file, argv, envp, modif, modiflen, flags, fa, n) xmspawn_afm(file, argv, envp, env_len(envp), modif, modiflen, flags, fa, n)
#define xmspawn_ae(file, argv, envp, flags, fa, n) xmspawn_af(file, argv, envp, env_len(envp), flags, fa, n)
#define xmspawn_an(file, argv, modif, modiflen, modifn, flags, fa, n) xmspawn_aen(file, argv, (char const *const *)environ, modif, modiflen, modifn, flags, fa, n)
#define xmspawn_am(file, argv, modif, modiflen, flags, fa, n) xmspawn_aem(file, argv, (char const *const *)environ, modif, modiflen, flags, fa, n)
#define xmspawn_a(file, argv, flags, fa, n) xmspawn_ae(file, argv, (char const *const *)environ, flags, fa, n)
#define xmspawn_fn(argv, envp, envlen, modif, modiflen, modifn, flags, fa, n) xmspawn_afn((argv)[0], (argv), envp, envlen, modif, modiflen, modifn, flags, fa, n)
#define xmspawn_fm(argv, envp, envlen, modif, modiflen, flags, fa, n) xmspawn_afm((argv)[0], (argv), envp, envlen, modif, modiflen, flags, fa, n)
#define xmspawn_f(argv, envp, envlen, flags, fa, n) xmspawn_af((argv)[0], (argv), envp, envlen, flags, fa, n)
#define xmspawn_en(argv, envp, modif, modiflen, modifn, flags, fa, n) xmspawn_aen((argv)[0], (argv), envp, modif, modiflen, modifn, flags, fa, n)
#define xmspawn_em(argv, envp, modif, modiflen, flags, fa, n) xmspawn_aem((argv)[0], (argv), envp, modif, modiflen, flags, fa, n)
#define xmspawn_e(argv, envp, flags, fa, n) xmspawn_ae((argv)[0], (argv), envp, flags, fa, n)
#define xmspawn_n(argv, modif, modiflen, modifn, flags, fa, n) xmspawn_an((argv)[0], (argv), modif, modiflen, modifn, flags, fa, n)
#define xmspawn_m(argv, modif, modiflen, flags, fa, n) xmspawn_am((argv)[0], (argv), modif, modiflen, flags, fa, n)
#define xmspawn(argv, flags, fa, n) xmspawn_a((argv)[0], (argv), flags, fa, n)
extern pid_t gmspawn_afn (char const *, char const *const *, char const *const *, size_t, char const *, size_t, size_t, uint16_t, cspawn_fileaction const *, size_t) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/datastruct.h 0000664 0000000 0000000 00000000442 14630613211 0021554 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_DATASTRUCT_H
#define SKALIBS_DATASTRUCT_H
#include
#include
#include
#include
#include
#include
#include
#endif
skalibs-2.14.2.0/src/include/skalibs/devino.h 0000664 0000000 0000000 00000000450 14630613211 0020661 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_DEVINO_H
#define SKALIBS_DEVINO_H
#include
typedef struct devino_s devino, *devino_ref ;
struct devino_s
{
dev_t dev ;
ino_t ino ;
} ;
#define DEVINO_ZERO { .dev = 0, .ino = 0 }
extern int devino_cmp (void const *, void const *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/direntry.h 0000664 0000000 0000000 00000000371 14630613211 0021237 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_DIRENTRY_H
#define SKALIBS_DIRENTRY_H
#include
typedef struct dirent direntry, *direntry_ref ;
extern void dir_close (DIR *) ;
extern int dir_fd (DIR *) ; /* Solaris doesn't have dirfd() */
#endif
skalibs-2.14.2.0/src/include/skalibs/disize.h 0000664 0000000 0000000 00000000370 14630613211 0020665 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_DISIZE_H
#define SKALIBS_DISIZE_H
#include
typedef struct disize_s disize, *disize_ref ;
struct disize_s
{
size_t left ;
size_t right ;
} ;
#define DISIZE_ZERO { .left = 0, .right = 0 }
#endif
skalibs-2.14.2.0/src/include/skalibs/diuint.h 0000664 0000000 0000000 00000000353 14630613211 0020673 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_DIUINT_H
#define SKALIBS_DIUINT_H
typedef struct diuint diuint, *diuint_ref ;
struct diuint
{
unsigned int left ;
unsigned int right ;
} ;
#define DIUINT_ZERO { .left = 0, .right = 0 }
#endif
skalibs-2.14.2.0/src/include/skalibs/diuint32.h 0000664 0000000 0000000 00000000412 14630613211 0021034 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_DIUINT32_H
#define SKALIBS_DIUINT32_H
#include
typedef struct diuint32_s diuint32, *diuint32_ref ;
struct diuint32_s
{
uint32_t left ;
uint32_t right ;
} ;
#define DIUINT32_ZERO { .left = 0, .right = 0 }
#endif
skalibs-2.14.2.0/src/include/skalibs/djbtime.h 0000664 0000000 0000000 00000004641 14630613211 0021021 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_DJBTIME_H
#define SKALIBS_DJBTIME_H
#include
#include
#include
#include
extern int timespec_cmp (struct timespec const *, struct timespec const *) ;
/* UTC <--> TAI conversions */
/* sysclock can be either TAI-10 or UTC */
extern int utc_from_tai (uint64_t *, tai const *) ;
extern int tai_from_utc (tai *, uint64_t) ;
extern int utc_from_sysclock (uint64_t *) ;
extern int sysclock_from_utc (uint64_t *) ;
/* NTP internal format */
#define NTP_OFFSET 2208988800UL
extern int ntp_from_tain (uint64_t *, tain const *) ;
#define ntp_from_tain_g(u) ntp_from_tain((u), &STAMP)
extern int tain_from_ntp (tain *, uint64_t) ;
/* localtime handling - replaces caltimedate functions */
/* ltm64 can be either TAI-10 or UTC depending on the current timezone */
/* normally ltm64 is the same as sysclock, but we allow it to be different */
/* for instance for musl TAI-10 systems */
typedef struct localtmn_s localtmn, *localtmn_ref ;
struct localtmn_s
{
struct tm tm ;
uint32_t nano ;
} ;
extern int ltm64_from_tai (uint64_t *, tai const *) ;
extern int tai_from_ltm64 (tai *, uint64_t) ;
extern int ltm64_from_utc (uint64_t *) ;
extern int utc_from_ltm64 (uint64_t *) ;
extern int ltm64_from_sysclock (uint64_t *) ;
extern int sysclock_from_ltm64 (uint64_t *) ;
extern int localtm_from_ltm64 (struct tm *, uint64_t, int) ;
extern int ltm64_from_localtm (uint64_t *, struct tm const *) ;
extern int localtm_from_sysclock (struct tm *, uint64_t, int) ;
extern int sysclock_from_localtm (uint64_t *, struct tm const *) ;
extern int localtm_from_utc (struct tm *, uint64_t, int) ;
extern int utc_from_localtm (uint64_t *, struct tm const *) ;
extern int localtm_from_tai (struct tm *, tai const *, int) ;
extern int tai_from_localtm (tai *, struct tm const *) ;
extern int localtmn_from_tain (localtmn *, tain const *, int) ;
#define localtmn_from_tain_g(l, h) localtmn_from_tain(l, &STAMP, h)
extern int tain_from_localtmn (tain *, localtmn const *) ;
extern int localtmn_from_sysclock (localtmn *, tain const *, int) ;
extern int sysclock_from_localtmn (tain *, localtmn const *) ;
#define LOCALTM_FMT 21
extern size_t localtm_fmt (char *, struct tm const *) ;
extern size_t localtm_scan (char const *, struct tm *) ;
#define LOCALTMN_FMT 31
extern size_t localtmn_fmt (char *, localtmn const *) ;
extern size_t localtmn_scan (char const *, localtmn *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/djbunix.h 0000664 0000000 0000000 00000014533 14630613211 0021047 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_DJBUNIX_H
#define SKALIBS_DJBUNIX_H
#include
#include
#include
#include
#include
#include
#include
extern int coe (int) ;
extern int uncoe (int) ;
extern int ndelay_on (int) ;
extern int ndelay_off (int) ;
extern int pipe_internal (int *, unsigned int) ;
#define pipenb(p) pipe_internal(p, O_NONBLOCK)
#define pipecoe(p) pipe_internal(p, O_CLOEXEC)
#define pipenbcoe(p) pipe_internal(p, O_NONBLOCK|O_CLOEXEC)
extern int fd_copy (int, int) ;
extern int fd_copy2 (int, int, int, int) ;
extern int fd_move (int, int) ;
extern int fd_move2 (int, int, int, int) ;
extern void fd_close (int) ;
extern int fd_chmod (int, unsigned int) ;
extern int fd_chown (int, uid_t, gid_t) ;
extern int fd_sync (int) ;
extern off_t fd_cat (int, int) ;
extern off_t fd_catn (int, int, off_t) ;
extern int fd_ensure_open (int, int) ;
#define fd_sanitize() (fd_ensure_open(0, 0) && fd_ensure_open(1, 1) && fd_ensure_open(2, 1))
extern void fd_shutdown (int, int) ;
extern int fd_lock (int, int, int) ;
extern void fd_unlock (int) ;
extern int fd_islocked (int) ;
extern int open2 (char const *, unsigned int) ;
extern int open3 (char const *, unsigned int, unsigned int) ;
extern int open_read (char const *) ;
extern int openc_read (char const *) ;
extern int openb_read (char const *) ;
extern int openbc_read (char const *) ;
extern int open_readb (char const *) ;
extern int openc_readb (char const *) ;
extern int open_excl (char const *) ;
extern int openc_excl (char const *) ;
extern int open_append (char const *) ;
extern int openc_append (char const *) ;
extern int open_create (char const *) ;
extern int openc_create (char const *) ;
extern int open_trunc (char const *) ;
extern int openc_trunc (char const *) ;
extern int open_write (char const *) ;
extern int openc_write (char const *) ;
extern size_t path_canonicalize (char *, char const *, int) ;
extern pid_t wait_nointr (int *) ;
extern pid_t waitpid_nointr (pid_t, int *, int) ;
#define wait_pid(pid, wstat) waitpid_nointr(pid, (wstat), 0)
#define wait_nohang(wstat) waitpid_nointr(-1, (wstat), WNOHANG)
extern pid_t wait_pid_nohang (pid_t, int *) ;
extern int wait_pids_nohang (pid_t const *, unsigned int, int *) ;
#define wait_status(w) (WIFSIGNALED(w) ? 256 + WTERMSIG(w) : WEXITSTATUS(w))
#define wait_estatus(w) (WIFSIGNALED(w) ? 128 + WTERMSIG(w) : WEXITSTATUS(w) >= 128 ? 128 : WEXITSTATUS(w))
extern unsigned int wait_reap (void) ;
extern int waitn (pid_t *, unsigned int) ;
extern int waitn_posix (pid_t *, unsigned int, int *) ;
extern int waitn_reap (pid_t *, unsigned int) ;
extern int waitn_reap_posix (pid_t *, unsigned int, int *) ;
extern int fd_chdir (int) ;
extern int sarealpath (stralloc *, char const *) ;
extern int sabasename (stralloc *, char const *, size_t) ;
extern int sadirname (stralloc *, char const *, size_t) ;
extern int sagetcwd (stralloc *) ;
extern int sareadlink (stralloc *, char const *) ;
extern int sagethostname (stralloc *) ;
#define slurp(sa, fd) slurpn((fd), (sa), 0)
#define openslurpclose(sa, fn) openslurpnclose((fn), (sa), 0)
extern int slurpn (int, stralloc *, size_t) ;
extern int openslurpnclose (char const *, stralloc *, size_t) ;
extern ssize_t readnclose (int fd, char *, size_t) ; /* closes fd */
extern ssize_t openreadnclose (char const *, char *, size_t) ;
extern ssize_t openreadnclose_nb (char const *, char *, size_t) ;
extern int openreadfileclose (char const *, stralloc *, size_t) ;
#define writenclose_unsafe(fd, s, n) writenclose_unsafe5(fd, s, (n), 0, 0)
#define writenclose_unsafe_sync(fd, s, n) writenclose_unsafe5(fd, s, (n), 0, 1)
extern int writenclose_unsafe5 (int, char const *, size_t, devino *, unsigned int) ;
#define openwritenclose_unsafe(f, s, n) openwritenclose_unsafe5(f, s, (n), 0, 0)
#define openwritenclose_unsafe_sync(f, s, n) openwritenclose_unsafe5(f, s, (n), 0, 1)
extern int openwritenclose_unsafe5 (char const *, char const *, size_t, devino *, unsigned int) ;
#define openwritenclose_suffix(f, s, n, t) openwritenclose_suffix6(f, s, n, 0, 0, t)
#define openwritenclose_suffix_sync(f, s, n, t) openwritenclose_suffix6(f, s, n, 0, 1, t)
extern int openwritenclose_suffix6 (char const *, char const *, size_t, devino *, unsigned int, char const *) ;
#define openwritenclose(f, s, n) openwritenclose5(f, s, (n), 0, 0)
#define openwritenclose_sync(f, s, n) openwritenclose5(f, s, (n), 0, 1)
extern int openwritenclose5 (char const *, char const *, size_t, devino *, unsigned int) ;
#define writenvclose_unsafe(fd, v, n) writevnclose_unsafe5(fd, v, (n), 0, 0)
#define writevnclose_unsafe_sync(fd, v, n) writevnclose_unsafe5(fd, v, (n), 0, 1)
extern int writevnclose_unsafe5 (int, struct iovec const *, unsigned int, devino *, unsigned int) ;
#define openwritevnclose_unsafe(f, v, n) openwritevnclose_unsafe5(f, v, (n), 0, 0)
#define openwritevnclose_unsafe_sync(f, v, n) openwritevnclose_unsafe5(f, v, (n), 0, 1)
extern int openwritevnclose_unsafe5 (char const *, struct iovec const *, unsigned int, devino *, unsigned int) ;
#define openwritevnclose_suffix(f, v, n, t) openwritevnclose_suffix6(f, v, n, 0, 0, t)
#define openwritevnclose_suffix_sync(f, v, n, t) openwritevnclose_suffix6(f, v, n, 0, 1, t)
extern int openwritevnclose_suffix6 (char const *, struct iovec const *, unsigned int, devino *, unsigned int, char const *) ;
#define openwritevnclose(f, v, n) openwritevnclose5(f, v, (n), 0, 0)
#define openwritevnclose_sync(f, v, n) openwritevnclose5(f, v, (n), 0, 1)
extern int openwritevnclose5 (char const *, struct iovec const *, unsigned int, devino *, unsigned int) ;
extern int rm_rf (char const *) ;
extern int rm_rf_tmp (char const *, stralloc *) ;
extern int rm_rf_in_tmp (stralloc *, size_t) ; /* caution ! */
extern int rmstar (char const *) ;
extern int rmstar_tmp (char const *, stralloc *) ;
extern int filecopy_unsafe (char const *, char const *, unsigned int) ;
extern int filecopy_suffix (char const *, char const *, unsigned int, char const *) ;
extern int sals (char const *, stralloc *, size_t *) ;
extern int hiercopy (char const *, char const *) ;
extern int hiercopy_tmp (char const *, char const *, stralloc *) ;
extern int hiercopy_loose (char const *, char const *) ;
extern int hiercopy_loose_tmp (char const *, char const *, stralloc *) ;
extern int hiercopy_internal (char const *, char const *, stralloc *, unsigned int) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/env.h 0000664 0000000 0000000 00000003161 14630613211 0020167 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_ENV_H
#define SKALIBS_ENV_H
#include
#include
#include
extern size_t env_len (char const *const *) gccattr_pure ;
extern char const *env_get (char const *) gccattr_deprecated ;
extern char const *env_get2 (char const *const *, char const *) gccattr_pure ;
extern char const *ucspi_get (char const *) gccattr_pure ;
extern int env_addmodif (stralloc *, char const *, char const *) ;
extern int env_make (char const **, size_t, char const *, size_t) ;
extern int env_string (stralloc *, char const *const *, size_t) ;
extern size_t env_merg (char const **, size_t, char const *const *, char const *, size_t) ;
extern size_t env_merge (char const **, size_t, char const *const *, size_t, char const *, size_t) ;
extern size_t env_mergen (char const **, size_t, char const *const *, size_t, char const *, size_t, size_t) ;
extern size_t env_mergn (char const **, size_t, char const *const *, char const *, size_t, size_t) ;
#define SKALIBS_ENVDIR_VERBATIM 0x01
#define SKALIBS_ENVDIR_NOCHOMP 0x02
#define SKALIBS_ENVDIR_NOCLAMP 0x04
extern int envdir_internal (char const *, stralloc *, unsigned int, char) ;
#define envdir(path, sa) envdir_internal(path, (sa), 0, '\n')
#define envdir_chomp(path, sa) envdir_internal(path, (sa), SKALIBS_ENVDIR_NOCHOMP, '\n')
#define envdir_verbatim_chomp(path, sa) envdir_internal(path, (sa), SKALIBS_ENVDIR_VERBATIM, '\n')
#define envdir_verbatim(path, sa) envdir_internal(path, (sa), SKALIBS_ENVDIR_VERBATIM|SKALIBS_ENVDIR_NOCHOMP, '\n')
extern int env_dump (char const *, mode_t, char const *const *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/envalloc.h 0000664 0000000 0000000 00000000644 14630613211 0021205 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_ENVALLOC_H
#define SKALIBS_ENVALLOC_H
#include
#include
#define ENVALLOC_ZERO GENALLOC_ZERO
extern int envalloc_make (genalloc *, size_t, char const *, size_t) ;
extern int envalloc_uniq (genalloc *, char) ;
extern int envalloc_merge (genalloc *, char const *const *, size_t, char const *, size_t) ;
extern int envalloc_0 (genalloc *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/error.h 0000664 0000000 0000000 00000000421 14630613211 0020524 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_ERROR_H
#define SKALIBS_ERROR_H
#include
extern int error_temp (int) gccattr_const ;
extern int error_isalready (int) gccattr_const ;
#define error_isagain(e) (((e) == EAGAIN) || ((e) == EWOULDBLOCK))
#endif
skalibs-2.14.2.0/src/include/skalibs/exec.h 0000664 0000000 0000000 00000023017 14630613211 0020325 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_EXEC_H
#define SKALIBS_EXEC_H
#include
#include
#include
#include
extern void xexecvep (char const *, char const *const *, char const *const *, char const *) gccattr_noreturn ;
extern void xexecvep_loose (char const *, char const *const *, char const *const *, char const *) gccattr_noreturn ;
/*
Direct execution with PATH (calls execvep).
(was called pathexec_run in earlier skalibs versions)
a for provided file name (default: argv[0])
e for provided envp (default: environ)
foo0 exits 0 if argv[0] is NULL
xfoo dies if the exec fails
*/
extern void exec_ae (char const *, char const *const *, char const *const *) ;
#define exec_a(file, argv) exec_ae(file, (argv), (char const *const *)environ)
#define exec_e(argv, envp) exec_ae((argv)[0], (argv), envp)
#define exec(argv) exec_a((argv)[0], (argv))
extern void xexec_ae (char const *, char const *const *, char const *const *) gccattr_noreturn ;
#define xexec_a(file, argv) xexec_ae(file, (argv), (char const *const *)environ)
#define xexec_e(argv, envp) xexec_ae((argv)[0], (argv), envp)
#define xexec(argv) xexec_a((argv)[0], (argv))
extern void exec0_ae (char const *, char const *const *, char const *const *) ;
#define exec0_a(file, argv) exec0_ae(file, (argv), (char const *const *)environ)
#define exec0_e(argv, envp) exec0_ae((argv)[0], (argv), envp)
#define exec0(argv) exec0_a((argv)[0], (argv))
extern void xexec0_ae (char const *, char const *const *, char const *const *) gccattr_noreturn ;
#define xexec0_a(file, argv) xexec0_ae(file, (argv), (char const *const *)environ)
#define xexec0_e(argv, envp) xexec0_ae((argv)[0], (argv), envp)
#define xexec0(argv) xexec0_a((argv)[0], (argv))
/*
Execution with environment modifications : env_merge and exec.
(was called pathexec in earlier skalibs versions)
a for provided file name (default: argv[0])
e for provided envp (default: environ)
f for provided envp *and* length of the envp
m for provided modif string plus its length (the length is always needed because the modifs are null-terminated)
n for provided modif string, length *and* number of modifs
*/
extern int env_mexec (char const *, char const *) ;
extern void mexec_afn (char const *, char const *const *, char const *const *, size_t, char const *, size_t, size_t) ;
extern void mexec_afm (char const *, char const *const *, char const *const *, size_t, char const *, size_t) ;
extern void mexec_af (char const *, char const *const *, char const *const *, size_t) ;
#define mexec_aen(file, argv, envp, modif, modiflen, modifn) mexec_afn(file, argv, envp, env_len(envp), modif, modiflen, modifn)
#define mexec_aem(file, argv, envp, modif, modiflen) mexec_afm(file, argv, envp, env_len(envp), modif, modiflen)
#define mexec_ae(file, argv, envp) mexec_af(file, argv, (envp), env_len(envp))
#define mexec_an(file, argv, modif, modiflen, modifn) mexec_aen(file, argv, (char const *const *)environ, modif, modiflen, modifn)
#define mexec_am(file, argv, modif, modiflen) mexec_aem(file, argv, (char const *const *)environ, modif, modiflen)
#define mexec_a(file, argv) mexec_ae(file, (argv), (char const *const *)environ)
#define mexec_fn(argv, envp, envlen, modif, modiflen, modifn) mexec_afn((argv)[0], (argv), envp, envlen, modif, modiflen, modifn)
#define mexec_fm(argv, envp, envlen, modif, modiflen) mexec_afm((argv)[0], (argv), envp, envlen, modif, modiflen)
#define mexec_f(argv, envp, envlen) mexec_af((argv)[0], (argv), envp, envlen)
#define mexec_en(argv, envp, modif, modiflen, modifn) mexec_aen((argv)[0], (argv), envp, modif, modiflen, modifn)
#define mexec_em(argv, envp, modif, modiflen) mexec_aem((argv)[0], (argv), envp, modif, modiflen)
#define mexec_e(argv, envp) mexec_ae((argv)[0], (argv), envp)
#define mexec_n(argv, modif, modiflen, modifn) mexec_an((argv)[0], (argv), modif, modiflen, modifn)
#define mexec_m(argv, modif, modiflen) mexec_am((argv)[0], (argv), modif, modiflen)
#define mexec(argv) mexec_a((argv)[0], (argv))
extern void mexec0_afn (char const *, char const *const *, char const *const *, size_t, char const *, size_t, size_t) ;
extern void mexec0_afm (char const *, char const *const *, char const *const *, size_t, char const *, size_t) ;
extern void mexec0_af (char const *, char const *const *, char const *const *, size_t) ;
#define mexec0_aen(file, argv, envp, modif, modiflen, modifn) mexec0_afn(file, argv, envp, env_len(envp), modif, modiflen, modifn)
#define mexec0_aem(file, argv, envp, modif, modiflen) mexec0_afm(file, argv, envp, env_len(envp), modif, modiflen)
#define mexec0_ae(file, argv, envp) mexec0_af(file, argv, (envp), env_len(envp))
#define mexec0_an(file, argv, modif, modiflen, modifn) mexec0_aen(file, argv, (char const *const *)environ, modif, modiflen, modifn)
#define mexec0_am(file, argv, modif, modiflen) mexec0_aem(file, argv, (char const *const *)environ, modif, modiflen)
#define mexec0_a(file, argv) mexec0_ae(file, (argv), (char const *const *)environ)
#define mexec0_fn(argv, envp, envlen, modif, modiflen, modifn) mexec0_afn((argv)[0], (argv), envp, envlen, modif, modiflen, modifn)
#define mexec0_fm(argv, envp, envlen, modif, modiflen) mexec0_afm((argv)[0], (argv), envp, envlen, modif, modiflen)
#define mexec0_f(argv, envp, envlen) mexec0_af((argv)[0], (argv), envp, envlen)
#define mexec0_en(argv, envp, modif, modiflen, modifn) mexec0_aen((argv)[0], (argv), envp, modif, modiflen, modifn)
#define mexec0_em(argv, envp, modif, modiflen) mexec0_aem((argv)[0], (argv), envp, modif, modiflen)
#define mexec0_e(argv, envp) mexec0_ae((argv)[0], (argv), envp)
#define mexec0_n(argv, modif, modiflen, modifn) mexec0_an((argv)[0], (argv), modif, modiflen, modifn)
#define mexec0_m(argv, modif, modiflen) mexec0_am((argv)[0], (argv), modif, modiflen)
#define mexec0(argv) mexec0_a((argv)[0], (argv))
extern void xmexec_afn (char const *, char const *const *, char const *const *, size_t, char const *, size_t, size_t) gccattr_noreturn ;
extern void xmexec_afm (char const *, char const *const *, char const *const *, size_t, char const *, size_t) gccattr_noreturn ;
extern void xmexec_af (char const *, char const *const *, char const *const *, size_t) gccattr_noreturn ;
#define xmexec_aen(file, argv, envp, modif, modiflen, modifn) xmexec_afn(file, argv, envp, env_len(envp), modif, modiflen, modifn)
#define xmexec_aem(file, argv, envp, modif, modiflen) xmexec_afm(file, argv, envp, env_len(envp), modif, modiflen)
#define xmexec_ae(file, argv, envp) xmexec_af(file, argv, (envp), env_len(envp))
#define xmexec_an(file, argv, modif, modiflen, modifn) xmexec_aen(file, argv, (char const *const *)environ, modif, modiflen, modifn)
#define xmexec_am(file, argv, modif, modiflen) xmexec_aem(file, argv, (char const *const *)environ, modif, modiflen)
#define xmexec_a(file, argv) xmexec_ae(file, (argv), (char const *const *)environ)
#define xmexec_fn(argv, envp, envlen, modif, modiflen, modifn) xmexec_afn((argv)[0], (argv), envp, envlen, modif, modiflen, modifn)
#define xmexec_fm(argv, envp, envlen, modif, modiflen) xmexec_afm((argv)[0], (argv), envp, envlen, modif, modiflen)
#define xmexec_f(argv, envp, envlen) xmexec_af((argv)[0], (argv), envp, envlen)
#define xmexec_en(argv, envp, modif, modiflen, modifn) xmexec_aen((argv)[0], (argv), envp, modif, modiflen, modifn)
#define xmexec_em(argv, envp, modif, modiflen) xmexec_aem((argv)[0], (argv), envp, modif, modiflen)
#define xmexec_e(argv, envp) xmexec_ae((argv)[0], (argv), envp)
#define xmexec_n(argv, modif, modiflen, modifn) xmexec_an((argv)[0], (argv), modif, modiflen, modifn)
#define xmexec_m(argv, modif, modiflen) xmexec_am((argv)[0], (argv), modif, modiflen)
#define xmexec(argv) xmexec_a((argv)[0], (argv))
extern void xmexec0_afn (char const *, char const *const *, char const *const *, size_t, char const *, size_t, size_t) gccattr_noreturn ;
extern void xmexec0_afm (char const *, char const *const *, char const *const *, size_t, char const *, size_t) gccattr_noreturn ;
extern void xmexec0_af (char const *, char const *const *, char const *const *, size_t) gccattr_noreturn ;
#define xmexec0_aen(file, argv, envp, modif, modiflen, modifn) xmexec0_afn(file, argv, envp, env_len(envp), modif, modiflen, modifn)
#define xmexec0_aem(file, argv, envp, modif, modiflen) xmexec0_afm(file, argv, envp, env_len(envp), modif, modiflen)
#define xmexec0_ae(file, argv, envp) xmexec0_af(file, argv, (envp), env_len(envp))
#define xmexec0_an(file, argv, modif, modiflen, modifn) xmexec0_aen(file, argv, (char const *const *)environ, modif, modiflen, modifn)
#define xmexec0_am(file, argv, modif, modiflen) xmexec0_aem(file, argv, (char const *const *)environ, modif, modiflen)
#define xmexec0_a(file, argv) xmexec0_ae(file, (argv), (char const *const *)environ)
#define xmexec0_fn(argv, envp, envlen, modif, modiflen, modifn) xmexec0_afn((argv)[0], (argv), envp, envlen, modif, modiflen, modifn)
#define xmexec0_fm(argv, envp, envlen, modif, modiflen) xmexec0_afm((argv)[0], (argv), envp, envlen, modif, modiflen)
#define xmexec0_f(argv, envp, envlen) xmexec0_af((argv)[0], (argv), envp, envlen)
#define xmexec0_en(argv, envp, modif, modiflen, modifn) xmexec0_aen((argv)[0], (argv), envp, modif, modiflen, modifn)
#define xmexec0_em(argv, envp, modif, modiflen) xmexec0_aem((argv)[0], (argv), envp, modif, modiflen)
#define xmexec0_e(argv, envp) xmexec0_ae((argv)[0], (argv), envp)
#define xmexec0_n(argv, modif, modiflen, modifn) xmexec0_an((argv)[0], (argv), modif, modiflen, modifn)
#define xmexec0_m(argv, modif, modiflen) xmexec0_am((argv)[0], (argv), modif, modiflen)
#define xmexec0(argv) xmexec0_a((argv)[0], (argv))
#endif
skalibs-2.14.2.0/src/include/skalibs/fcntl.h 0000664 0000000 0000000 00000000575 14630613211 0020513 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_FCNTL_H
#define SKALIBS_FCNTL_H
#include
/*
Old MacOS X doesn't have O_CLOEXEC.
We define it to something completely out of the way so we
can still use it in userspace.
Workarounds in syscalls will be enabled via the
SKALIBS_HASOCLOEXEC sysdep.
*/
#ifndef O_CLOEXEC
#define O_CLOEXEC 0x40000000
#endif
#endif
skalibs-2.14.2.0/src/include/skalibs/fmtscan.h 0000664 0000000 0000000 00000002422 14630613211 0021031 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_FMTSCAN_H
#define SKALIBS_FMTSCAN_H
#include
#include
#include
/* fmt */
extern size_t str_fmt (char *, char const *) ;
extern size_t strn_fmt (char *, char const *, size_t) ;
extern unsigned char fmtscan_asc (unsigned char) gccattr_const ;
#define IP4_FMT 20
extern size_t ip4_fmt (char *, char const *) ;
extern size_t ip4_fmtu32 (char *, uint32_t) ;
extern size_t ucharn_fmt (char *, char const *, size_t) ;
extern size_t ucharn_fmt_little (char *, char const *, size_t) ;
#define IP6_FMT 40
extern size_t ip6_fmt (char *, char const *) ;
/* scan */
extern unsigned char fmtscan_num (unsigned char, unsigned char) gccattr_const ;
extern size_t ip4_scan (char const *, char *) ;
extern size_t ip4_scanu32 (char const *, uint32_t *) ;
extern size_t ip4_scanlist_u32 (uint32_t *, size_t, char const *, size_t *) ;
extern size_t ip4_scanlist (char *, size_t, char const *, size_t *) ;
extern size_t ip6_scan (char const *, char *) ;
extern size_t ip6_scanlist (char *, size_t, char const *, size_t *) ;
extern size_t ucharn_scan (char const *, char *, size_t) ;
extern size_t ucharn_scan_little (char const *, char *, size_t) ;
extern size_t ucharn_findlen (char const *) gccattr_pure ;
#endif
skalibs-2.14.2.0/src/include/skalibs/functypes.h 0000664 0000000 0000000 00000003272 14630613211 0021422 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef FUNCTYPES_H
#define FUNCTYPES_H
#include
#include
#include
typedef int uintcmp_func (unsigned int, unsigned int, void *) ;
typedef uintcmp_func *uintcmp_func_ref ;
typedef int uint32cmp_func (uint32_t, uint32_t, void *) ;
typedef uint32cmp_func *uint32cmp_func_ref ;
typedef int cmp_func (void const *, void const *, void *) ;
typedef cmp_func *cmp_func_ref ;
typedef void *dtok_func (uint32_t, void *) ;
typedef dtok_func *dtok_func_ref ;
typedef int iter_func (void *, void *) ;
typedef iter_func *iter_func_ref ;
typedef void free_func (void *) ;
typedef free_func *free_func_ref ;
typedef int init_func (void *) ;
typedef init_func *init_func_ref ;
typedef ssize_t get_func (void *) ;
typedef get_func *get_func_ref ;
typedef size_t uget_func (void *) ;
typedef uget_func *uget_func_ref ;
typedef ssize_t io_func (int, char *, size_t) ;
typedef io_func *io_func_ref ;
typedef ssize_t iow_func (int, char const *, size_t) ;
typedef iow_func *iow_func_ref ;
typedef ssize_t iov_func (int, struct iovec const *, unsigned int) ;
typedef iov_func *iov_func_ref ;
typedef size_t allio_func (int, char *, size_t) ;
typedef allio_func *allio_func_ref ;
typedef size_t alliow_func (int, char const *, size_t) ;
typedef alliow_func *alliow_func_ref ;
typedef size_t alliov_func (int, struct iovec const *, unsigned int) ;
typedef alliov_func *alliov_func_ref ;
typedef int create_func (char const *, mode_t, void *) ;
typedef create_func *create_func_ref ;
typedef int link_func (char const *, char const *) ;
typedef link_func *link_func_ref ;
typedef void randomgen_func (char *, size_t) ;
typedef randomgen_func *randomgen_func_ref ;
#endif
skalibs-2.14.2.0/src/include/skalibs/gccattributes.h 0000664 0000000 0000000 00000002417 14630613211 0022245 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_GCCATTRIBUTES_H
#define SKALIBS_GCCATTRIBUTES_H
#ifdef __GNUC__
#define gccattr_noreturn __attribute__((noreturn))
#define gccattr_returns_twice __attribute__((returns_twice))
#define gccattr_noinline __attribute__((noinline))
#define gccattr_inline __attribute__((always_inline))
#define gccattr_const __attribute__((const))
#define gccattr_unused __attribute__((unused))
#define gccattr_used __attribute__((used))
#define gccattr_weak __attribute__((weak))
#define gccattr_aligned __attribute__((aligned (__BIGGEST_ALIGNMENT__)))
#define gccattr_nonstring __attribute__((nonstring))
# if (__GNUC__ >= 3) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96))
#define gccattr_malloc __attribute__((malloc))
#define gccattr_pure __attribute__((pure))
# else
#define gccattr_malloc
#define gccattr_pure
# endif
# if (__GNUC__ >= 3)
#define gccattr_deprecated __attribute__((deprecated))
# else
#define gccattr_deprecated
# endif
#else
#define gccattr_noreturn
#define gccattr_returns_twice
#define gccattr_noinline
#define gccattr_inline
#define gccattr_const
#define gccattr_unused
#define gccattr_used
#define gccattr_weak
#define gccattr_aligned
#define gccattr_nonstring
#define gccattr_malloc
#define gccattr_pure
#define gccattr_deprecated
#endif
#endif
skalibs-2.14.2.0/src/include/skalibs/genalloc.h 0000664 0000000 0000000 00000003227 14630613211 0021166 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_GENALLOC_H
#define SKALIBS_GENALLOC_H
#include
#include
typedef stralloc genalloc, *genalloc_ref ;
#define GENALLOC_ZERO STRALLOC_ZERO
#define genalloc_zero stralloc_zero
#define genalloc_s(type, g) ((type *)((g)->s))
#define genalloc_len(type, g) ((g)->len/sizeof(type))
#define genalloc_setlen(type, g, n) ((g)->len = (n)*sizeof(type))
#define genalloc_ready(type, g, n) stralloc_ready((g), (n)*sizeof(type))
#define genalloc_ready_tuned(type, g, n, base, fracnum, fracden) stralloc_ready_tuned((g), (n)*sizeof(type), base, fracnum, fracden)
#define genalloc_readyplus(type, g, n) stralloc_readyplus((g), (n)*sizeof(type))
#define genalloc_free(type, g) stralloc_free(g)
#define genalloc_shrink(type, g) stralloc_shrink(g)
#define genalloc_catb(type, g, s, n) stralloc_catb((g), (char const *)(s), (n)*sizeof(type))
#define genalloc_copyb(type, g, s, n) stralloc_copyb((g), (char const *)(s), (n)*sizeof(type))
#define genalloc_copy(type, g1, g2) stralloc_copy((g1), g2)
#define genalloc_cat(type, g1, g2) stralloc_cat((g1), g2)
#define genalloc_append(type, g, p) stralloc_catb((g), (char const *)(p), sizeof(type))
#define genalloc_reverse(type, g) stralloc_reverse_blocks((g), sizeof(type))
#define genalloc_insertb(type, g, offset, s, n) stralloc_insertb((g), (offset)*sizeof(type), (char const *)(s), (n)*sizeof(type))
#define genalloc_insert(type, g1, offset, g2) stralloc_insert((g1), (offset)*sizeof(type), (g2))
#define genalloc_deepfree(type, g, f) genalloc_deepfree_size(g, (free_func_ref)(f), sizeof(type))
extern void genalloc_deepfree_size (genalloc *, free_func_ref, size_t) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/genqdyn.h 0000664 0000000 0000000 00000001712 14630613211 0021044 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_GENQDYN_H
#define SKALIBS_GENQDYN_H
#include
#include
typedef struct genqdyn_s genqdyn, *genqdyn_ref ;
struct genqdyn_s
{
stralloc queue ;
size_t esize ;
size_t head ;
unsigned int num ;
unsigned int den ;
} ;
#define GENQDYN_ZERO { .queue = STRALLOC_ZERO, .esize = 1, .head = 0, .num = 0, .den = 1 }
extern genqdyn const genqdyn_zero ;
#define GENQDYN_INIT(type, n, d) { .queue = STRALLOC_ZERO, .esize = sizeof(type), .head = 0, .num = n, .den = d }
extern void genqdyn_init (genqdyn *, size_t, unsigned int, unsigned int) ;
#define genqdyn_n(g) (((g)->queue.len - (g)->head) / (g)->esize)
extern void genqdyn_free (genqdyn *) ;
extern int genqdyn_push (genqdyn *, void const *) ;
extern int genqdyn_unpush (genqdyn *) ;
#define GENQDYN_PEEK(type, g) ((type *)((g)->queue.s + (g)->head))
#define genqdyn_peek(g) GENQDYN_PEEK(void, (g))
extern int genqdyn_pop (genqdyn *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/genset.h 0000664 0000000 0000000 00000003065 14630613211 0020667 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_GENSET_H
#define SKALIBS_GENSET_H
#include
#include
typedef struct genset_s genset, *genset_ref ;
struct genset_s
{
char *storage ;
uint32_t *freelist ;
uint32_t esize ;
uint32_t max ;
uint32_t sp ;
} ;
#define GENSET_ZERO { .storage = 0, .freelist = 0, .esize = 1, .max = 0, .sp = 0 }
extern void genset_init (genset *, void *, uint32_t *, uint32_t, uint32_t) ;
#define GENSET_init(g, type, storage, fl, size) genset_init(g, storage, fl, sizeof(type), size)
#define genset_p(type, g, i) ((type *)((g)->storage + (i) * (g)->esize))
extern uint32_t genset_new (genset *) ;
extern int genset_delete (genset *, uint32_t) ;
#define genset_n(g) ((g)->max - (g)->sp)
extern uint32_t genset_iter_nocancel (genset *, uint32_t, iter_func_ref, void *) ;
#define genset_iter(g, f, stuff) genset_iter_nocancel(g, (g)->max, f, stuff)
extern int genset_iter_withcancel (genset *, iter_func_ref, iter_func_ref, void *) ;
extern void genset_deepfree (genset *, free_func_ref) ;
#define GENSETB_TYPE(type, size) struct { type storage[size] ; uint32_t freelist[size] ; genset info ; }
#define GENSETB_init(type, g, size) GENSET_init(&(g)->info, type, (g)->storage, (g)->freelist, size)
#define gensetb_p(type, g, i) genset_p(type, &(g)->info, i)
#define gensetb_new(g) genset_new(&(g)->info)
#define gensetb_delete(g, i) genset_delete(&(g)->info, i)
#define gensetb_n(g) genset_n(&(g)->info)
#define gensetb_iter(g, f, p) genset_iter(&(g)->info, f, p)
#define gensetb_deepfree(g, f) genset_deepfree(&(g)->info, f)
#endif
skalibs-2.14.2.0/src/include/skalibs/gensetdyn.h 0000664 0000000 0000000 00000003217 14630613211 0021401 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_GENSETDYN_H
#define SKALIBS_GENSETDYN_H
#include
#include
#include
#include
typedef struct gensetdyn_s gensetdyn, *gensetdyn_ref ;
struct gensetdyn_s
{
stralloc storage ;
genalloc freelist ; /* array of uint32_t */
uint32_t esize ;
uint32_t base ;
uint32_t fracnum ;
uint32_t fracden ;
} ;
#define GENSETDYN_ZERO { .storage = STRALLOC_ZERO, .freelist = GENALLOC_ZERO, .esize = 1, .base = 0, .fracnum = 0, .fracden = 1 }
extern gensetdyn const gensetdyn_zero ;
#define GENSETDYN_INIT(type, b, num, den) { .storage = STRALLOC_ZERO, .freelist = GENALLOC_ZERO, .esize = sizeof(type), .base = (b), .fracnum = (num), .fracden = (den) }
extern void gensetdyn_init (gensetdyn *, uint32_t, uint32_t, uint32_t, uint32_t) ;
#define gensetdyn_n(g) ((uint32_t)((g)->storage.len - genalloc_len(uint32_t, &(g)->freelist)))
extern int gensetdyn_ready (gensetdyn *, uint32_t) ;
#define gensetdyn_readyplus(x, n) gensetdyn_ready(x, gensetdyn_n(x) + (n))
extern void gensetdyn_free (gensetdyn *) ;
extern void gensetdyn_deepfree (gensetdyn *, free_func_ref) ;
extern int gensetdyn_new (gensetdyn *, uint32_t *) ;
extern int gensetdyn_delete (gensetdyn *, uint32_t) ;
#define gensetdyn_p(g, i) ((g)->storage.s + (i) * (g)->esize)
#define GENSETDYN_P(type, g, i) ((type *)gensetdyn_p(g, i))
extern uint32_t gensetdyn_iter_nocancel (gensetdyn *, uint32_t, iter_func_ref, void *) ;
#define gensetdyn_iter(g, f, stuff) gensetdyn_iter_nocancel(g, gensetdyn_n(g), f, stuff)
extern int gensetdyn_iter_withcancel (gensetdyn *, iter_func_ref, iter_func_ref, void *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/genwrite.h 0000664 0000000 0000000 00000002363 14630613211 0021226 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_GENWRITE_H
#define SKALIBS_GENWRITE_H
#include
typedef ssize_t genwrite_put_func (void *, char const *, size_t) ;
typedef genwrite_put_func *genwrite_put_func_ref ;
typedef int genwrite_flush_func (void *) ;
typedef genwrite_flush_func *genwrite_flush_func_ref ;
typedef struct genwrite_s genwrite, *genwrite_ref ;
struct genwrite_s
{
genwrite_put_func_ref put ;
genwrite_flush_func_ref flush ;
void *target ;
} ;
#define GENWRITE_ZERO { .put = 0, .flush = 0, .target = 0 }
extern genwrite_put_func genwrite_put_stralloc ;
extern genwrite_flush_func genwrite_flush_stralloc ;
extern genwrite_put_func genwrite_put_buffer ;
extern genwrite_flush_func genwrite_flush_buffer ;
extern genwrite_put_func genwrite_put_bufalloc ;
extern genwrite_flush_func genwrite_flush_bufalloc ;
#define GENWRITE_STRALLOC_INIT(sa) { .put = &genwrite_put_stralloc, .flush = &genwrite_flush_stralloc, .target = (sa) }
#define GENWRITE_BUFFER_INIT(b) { .put = &genwrite_put_buffer, .flush = &genwrite_flush_buffer, .target = (b) }
#define GENWRITE_BUFALLOC_INIT(ba) { .put = &genwrite_put_bufalloc, .flush = &genwrite_flush_bufalloc, .target = (ba) }
extern genwrite genwrite_stdout ;
extern genwrite genwrite_stderr ;
#endif
skalibs-2.14.2.0/src/include/skalibs/gol.h 0000664 0000000 0000000 00000001357 14630613211 0020165 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_GOL_H
#define SKALIBS_GOL_H
/* Parsing of long (and short) options. */
#include
#include
typedef struct gol_bool_s gol_bool, *gol_bool_ref ;
struct gol_bool_s
{
char const *lo ;
uint8_t so : 7 ;
uint8_t set : 1 ;
uint64_t mask ;
} ;
typedef struct gol_arg_s gol_arg, *gol_arg_ref ;
struct gol_arg_s
{
char const *lo ;
uint8_t so : 7 ;
unsigned int i ;
} ;
extern int gol (char const *const *, unsigned int, gol_bool const *, unsigned int, gol_arg const *a, unsigned int, uint64_t *, char const **, int *) ;
extern unsigned int gol_argv (int, char const *const *, gol_bool const *, unsigned int, gol_arg const *a, unsigned int, uint64_t *, char const **) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/iopause.h 0000664 0000000 0000000 00000001556 14630613211 0021052 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_IOPAUSE_H
#define SKALIBS_IOPAUSE_H
#include
#include
typedef struct pollfd iopause_fd, *iopause_fd_ref ;
#define IOPAUSE_READ (POLLIN|POLLHUP)
#define IOPAUSE_WRITE POLLOUT
#define IOPAUSE_EXCEPT (POLLERR|POLLHUP|POLLNVAL)
typedef int iopause_func (iopause_fd *, unsigned int, tain const *, tain const *) ;
typedef iopause_func *iopause_func_ref ;
extern iopause_func iopause_select ;
extern iopause_func iopause_poll ;
extern iopause_func iopause_ppoll ;
extern iopause_func_ref const iopause_ ;
#define iopause (*iopause_)
extern int iopause_stamp (iopause_fd *, unsigned int, tain const *, tain *) ;
#define iopause_g(x, n, deadline) iopause_stamp(x, n, (deadline), &STAMP)
extern void deepsleepuntil (tain const *, tain *) ;
#define deepsleepuntil_g(deadline) deepsleepuntil((deadline), &STAMP)
#endif
skalibs-2.14.2.0/src/include/skalibs/kolbak.h 0000664 0000000 0000000 00000001622 14630613211 0020642 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_KOLBAK_H
#define SKALIBS_KOLBAK_H
#include
#include
typedef struct kolbak_closure_s kolbak_closure, *kolbak_closure_ref ;
struct kolbak_closure_s
{
unixmessage_handler_func_ref f ;
void *data ;
} ;
#define KOLBAK_CLOSURE_ZERO { .f = 0, .data = 0 }
typedef struct kolbak_queue_s kolbak_queue, *kolbak_queue_ref ;
struct kolbak_queue_s
{
kolbak_closure *x ;
size_t n ;
size_t head ;
size_t tail ;
} ;
#define KOLBAK_QUEUE_ZERO { .x = 0, .n = 0, .head = 0, .tail = 0 }
#define KOLBAK_QUEUE_INIT(s, len) { .x = (s), .n = (len), .head = 0, .tail = 0 }
extern int kolbak_queue_init (kolbak_queue *, kolbak_closure *, size_t) ;
extern int kolbak_enqueue (kolbak_queue *, unixmessage_handler_func_ref, void *) ;
extern int kolbak_unenqueue (kolbak_queue *) ;
extern int kolbak_call (unixmessage const *, kolbak_queue *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/lolstdio.h 0000664 0000000 0000000 00000001312 14630613211 0021224 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_LOLSTDIO_H
#define SKALIBS_LOLSTDIO_H
#include
#include
#include
#include
#ifdef DEBUG
# define LOLDEBUG(...) do \
{ \
buffer_puts(buffer_2, PROG) ; \
buffer_puts(buffer_2, ": debug: ") ; \
bprintf(buffer_2, __VA_ARGS__) ; \
buffer_putflush(buffer_2, "\n", 1) ; \
} while (0)
#else
# define LOLDEBUG(...)
#endif
extern int vbprintf (buffer *, char const *, va_list) ;
extern int bprintf (buffer *, char const *, ...) ;
extern int lolprintf (char const *, ...) ;
extern int vbaprintf (bufalloc *, char const *, va_list) ;
extern int baprintf (bufalloc *, char const *, ...) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/netstring.h 0000664 0000000 0000000 00000001653 14630613211 0021420 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_NETSTRING_H
#define SKALIBS_NETSTRING_H
#include
#include
#include
#include
extern int netstring_appendb (stralloc *, char const *, size_t) ;
#define netstring_appends(sa, s) netstring_appendb((sa), (s), strlen(s))
#define netstring_append(to, from) netstring_appendb((to), (from)->s, (from)->len)
extern int netstring_appendv (stralloc *, struct iovec const *, unsigned int) ;
extern int netstring_encode (stralloc *, char const *, size_t) ;
extern ssize_t netstring_decode (stralloc *, char const *, size_t) ;
extern int netstring_okeof (buffer *, size_t) ;
extern int netstring_get (buffer *, stralloc *, size_t *) ;
extern int netstring_put (buffer *, char const *, size_t, size_t *) ;
#define netstring_putba(ba, s, n) netstring_appendb(&(ba)->x, s, n)
#define netstring_putbav(ba, v, n) netstring_appendv(&(ba)->x, v, n)
#endif
skalibs-2.14.2.0/src/include/skalibs/nonposix.h 0000664 0000000 0000000 00000003302 14630613211 0021251 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_NONPOSIX_H
#define SKALIBS_NONPOSIX_H
/* Drop all pretense of standardness: some libc headers are *more*
broken when you define standard feature test macros than when
you don't (I'm looking at you, FreeBSD). */
#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE
#if defined(sun) || defined(__sun)
/* Solaris: the socket API is not POSIX unless you enable this */
#ifndef _XPG4_2
#define _XPG4_2
#endif
#ifndef _XPG6
#define _XPG6
#endif
/* Solaris: for settimeofday() and similar. Notice how you
have to define by hand a macro with double underscores. */
#ifndef __EXTENSIONS__
#define __EXTENSIONS__
#endif
#endif /* sun || __sun */
#if defined(__linux__) || defined(__GNU__) || defined(__midipix__)
/* GNU (Linux or Hurd): most extensions are unavailable unless
you enable _GNU_SOURCE. Some Linux interfaces are also
unavailable without it. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#else /* __linux__ || __GNU__ */
/* Various BSDs and others: _BSD_SOURCE opens up a lot of extensions.
We guard this under not-GNU because recent glibcs scream their
heads off if you define _BSD_SOURCE. Stay classy, GNU. */
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#endif /* __linux__ || __GNU__ */
#ifdef __NetBSD__
/* NetBSD: of course they had to have their own macros too. */
#ifndef _NETBSD_SOURCE
#define _NETBSD_SOURCE
#endif
#ifndef _INCOMPLETE_XOPEN_C063
#define _INCOMPLETE_XOPEN_C063
#endif
#endif /* __NetBSD__ */
/* old versions of BSD and some broken GNU toolchains:
system headers are not self-contained,
starting with sys/types.h normally always works. */
#include
#endif /* SKALIBS_NONPOSIX_H */
skalibs-2.14.2.0/src/include/skalibs/nsig.h 0000664 0000000 0000000 00000001372 14630613211 0020341 0 ustar 00root root 0000000 0000000 /* ISC license. */
/*
This header MUST be paired with skalibs/nonposix.h,
which must be included before system headers.
*/
#ifndef SKALIBS_NSIG_H
#define SKALIBS_NSIG_H
#include
#ifndef NSIG
# ifdef _NSIG
# define NSIG _NSIG
# elif defined(SIGMAX)
# define NSIG (SIGMAX + 1)
# elif defined(_SIGMAX)
# define NSIG(_SIGMAX + 1)
# else
# define NSIG 65
# endif
#endif
/*
Some systems (FreeBSD, Darwin) incorrectly define NSIG as 32
(their highest signal number) when it should be 33 (highest plus one).
OpenBSD gets this right so we can't use SKALIBS_BSD_SUCKS.
The heuristic we use is: if NSIG is a power of two, it's wrong.
*/
#if NSIG & (NSIG - 1)
# define SKALIBS_NSIG NSIG
#else
# define SKALIBS_NSIG (NSIG+1)
#endif
#endif
skalibs-2.14.2.0/src/include/skalibs/posixishard.h 0000664 0000000 0000000 00000001773 14630613211 0021743 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_POSIXISHARD_H
#define SKALIBS_POSIXISHARD_H
#include
#include
#include
#include
#include
#include
/*
This header must be used with some broken OSes who have
serious trouble implementing even easy parts of POSIX.
It's supposed to be included *after* system headers, so
it won't catch behaviour such as "this macro must be defined
prior to including system headers in order to define that
symbol". If that's what you need, include skalibs/nonposix.h
instead, which must happen *before* system headers.
*/
extern size_t strnlen (char const *, size_t) gccattr_pure ;
#ifndef EPROTO
#define EPROTO EPROTOTYPE
#endif
#ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL 0
#endif
#ifdef PATH_MAX
#define SKALIBS_PATH_MAX PATH_MAX
#else
#define SKALIBS_PATH_MAX 4096
#endif
#ifdef NAME_MAX
#define SKALIBS_NAME_MAX NAME_MAX
#else
#define SKALIBS_NAME_MAX 255
#endif
#endif
skalibs-2.14.2.0/src/include/skalibs/posixplz.h 0000664 0000000 0000000 00000003201 14630613211 0021262 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_POSIXPLZ_H
#define SKALIBS_POSIXPLZ_H
#include
#include
#include
#include
#include
/*
Stuff that doesn't have its own POSIX header for some reason.
*/
extern char **environ ;
/*
Non-POSIX functions that some OSes provide and others don't.
setgroups() isn't included because it's its own kind of broken.
*/
extern void *memmem (void const *, size_t, void const *, size_t) gccattr_pure ;
extern char *strcasestr (char const *, char const *) gccattr_pure ;
extern int getpeereid (int, uid_t *, gid_t *) ;
/*
Functions that aren't standard at all, but honestly could be. :P
*/
extern void execvep (char const *, char const *const *, char const *const *, char const *) ;
extern void execvep_loose (char const *, char const *const *, char const *const *, char const *) ;
extern void unlink_void (char const *) ;
extern void munmap_void (void *, size_t) ;
extern pid_t doublefork (void) ;
extern int touch (char const *) ;
extern int mkfiletemp (char *, create_func_ref, mode_t, void *) ;
extern int mklinktemp (char const *, char *, link_func_ref) ;
extern int mkptemp (char *) ;
extern int mkptemp2 (char *, unsigned int) ;
extern int mkptemp3 (char *, mode_t, unsigned int) ;
extern int mkltemp (char const *, char *) ;
extern int mkhtemp (char const *, char *) ;
extern int mkctemp (char *, mode_t, dev_t) ;
extern int mkbtemp (char *, mode_t, dev_t) ;
/*
Wrappers around functions that should be specified better.
*/
#define skalibs_regcomp(re, s, flags) regcomp(re, (s)[0] ? (s) : ".*", flags)
#endif
skalibs-2.14.2.0/src/include/skalibs/random.h 0000664 0000000 0000000 00000002317 14630613211 0020661 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_RANDOM_H
#define SKALIBS_RANDOM_H
#include
#include
#include
#include
extern void random_devurandom (char *, size_t) ;
extern void random_buf (char *, size_t) ;
extern void random_buf_early (char *, size_t) ;
extern uint32_t random_uint32_from (uint32_t, randomgen_func_ref) ;
#define random_uint32(n) random_uint32_from((n), &random_buf)
#define random_uint32_early(n) random_uint32_from((n), &random_buf_early)
extern void random_name_from (char *, size_t, randomgen_func_ref) ;
#define random_name(s, n) random_name_from(s, (n), &random_buf)
#define random_name_early(s, n) random_name_from(s, (n), &random_buf_early)
extern void random_unsort_from (char *, size_t, size_t, randomgen_func_ref) ;
#define random_unsort(s, n, c) random_unsort_from(s, n, (c), &random_buf)
#define random_unsort_early(s, n, c) random_unsort_from(s, n, (c), &random_buf_early)
extern int random_sauniquename_from (stralloc *, size_t, randomgen_func_ref) ;
#define random_sauniquename(sa, n) random_sauniquename_from(sa, (n), &random_buf)
#define random_sauniquename_early(sa, n) random_sauniquename_from(sa, (n), &random_buf_early)
#endif
skalibs-2.14.2.0/src/include/skalibs/segfault.h 0000664 0000000 0000000 00000000250 14630613211 0021205 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SEGFAULT_H
#define SKALIBS_SEGFAULT_H
extern int sigsegv (void) ;
extern int sigfpe (void) ;
#define segfault() sigsegv()
#endif
skalibs-2.14.2.0/src/include/skalibs/selfpipe.h 0000664 0000000 0000000 00000000503 14630613211 0021203 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SELFPIPE_H
#define SKALIBS_SELFPIPE_H
#include
extern int selfpipe_init (void) ;
extern int selfpipe_trap (int) ;
extern int selfpipe_trapset (sigset_t const *) ;
extern int selfpipe_fd (void) ;
extern int selfpipe_read (void) ;
extern void selfpipe_finish (void) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/setgroups.h 0000664 0000000 0000000 00000001473 14630613211 0021436 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SETGROUPS_H
#define SKALIBS_SETGROUPS_H
#include
#ifdef SKALIBS_HASSETGROUPS
/*
setgroups() is defined by a lot of OSes.
However, they don't agree on what it should do:
some change the primary gid, others don't, etc. It's a mess.
Never use setgroups(). Use the functions below instead.
*/
#include
extern int setgroups_and_gid (gid_t, size_t, gid_t const *) ;
extern int setgroups_with_egid (size_t, gid_t const *) ;
extern int skalibs_setgroups (size_t, gid_t const *) ;
#else
/* No setgroups() at all? not much we can do. */
#include
#define setgroups_and_gid(g, n, tab) (errno = ENOSYS, -1)
#define setgroups_with_egid(n, tab) (errno = ENOSYS, -1)
#define skalibs_setgroups(n, tab) (errno = ENOSYS, -1)
#endif
#endif
skalibs-2.14.2.0/src/include/skalibs/sgetopt.h 0000664 0000000 0000000 00000002124 14630613211 0021062 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SGETOPT_H
#define SKALIBS_SGETOPT_H
/* reentrant */
typedef struct subgetopt_s subgetopt, *subgetopt_ref ;
struct subgetopt_s
{
int ind ;
int err ;
int problem ;
char const *arg ;
unsigned int pos ;
char const *prog ;
} ;
#define SUBGETOPT_ZERO { .ind = 1, .err = 1, .problem = 0, .arg = 0, .pos = 0, .prog = 0 }
extern int subgetopt_r (int, char const *const *, char const *, subgetopt *) ;
/* non-reentrant */
extern int sgetopt_r (int, char const *const *, char const *, subgetopt *) ;
extern subgetopt subgetopt_here ;
#define lgetopt(argc, argv, opts) subgetopt_r((argc), (argv), (opts), &subgetopt_here)
#define sgetopt(argc, argv, opts) sgetopt_r((argc), (argv), (opts), &subgetopt_here)
#define sgetopt_prog() (subgetopt_here.prog = PROG)
/* define SUBGETOPT_SHORT if you don't mind potential name conflicts */
#ifdef SUBGETOPT_SHORT
# define getopt sgetopt
# define optarg subgetopt_here.arg
# define optind subgetopt_here.ind
# define opterr subgetopt_here.err
# define optopt subgetopt_here.problem
# define opteof (-1)
#endif
#endif
skalibs-2.14.2.0/src/include/skalibs/sha1.h 0000664 0000000 0000000 00000001202 14630613211 0020225 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SHA1_H
#define SKALIBS_SHA1_H
#include
#include
typedef struct SHA1Schedule SHA1Schedule, *SHA1Schedule_ref ;
struct SHA1Schedule
{
uint32_t buf[5] ;
uint32_t bits[2] ;
uint32_t in[16] ;
unsigned int b ;
} ;
#define SHA1_INIT() { .buf = { 0x67452301U, 0xefcdab89U, 0x98badcfeU, 0x10325476U, 0xc3d2e1f0U }, .bits = { 0, 0 }, .in = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .b = 0 }
extern void sha1_init (SHA1Schedule *) ;
extern void sha1_update (SHA1Schedule *, char const *, size_t) ;
extern void sha1_final (SHA1Schedule *, char * /* 20 chars */) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/sha256.h 0000664 0000000 0000000 00000001272 14630613211 0020410 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SHA256_H
#define SKALIBS_SHA256_H
#include
#include
typedef struct SHA256Schedule_s SHA256Schedule, *SHA256Schedule_ref ;
struct SHA256Schedule_s
{
uint32_t buf[8] ;
uint32_t bits[2] ;
uint32_t in[16] ;
uint32_t b ;
} ;
#define SHA256_INIT() { .buf = { 0x6a09e667U, 0xbb67ae85U, 0x3c6ef372U, 0xa54ff53aU, 0x510e527fU, 0x9b05688cU, 0x1f83d9abU, 0x5be0cd19U }, .bits = { 0, 0 }, .in = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .b = 0 }
extern void sha256_init (SHA256Schedule *) ;
extern void sha256_update (SHA256Schedule *, char const *, size_t) ;
extern void sha256_final (SHA256Schedule *, char *digest) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/sha512.h 0000664 0000000 0000000 00000001271 14630613211 0020402 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SHA512_H
#define SKALIBS_SHA512_H
#include
#include
typedef struct SHA512Schedule_s SHA512Schedule, *SHA512Schedule_ref ;
struct SHA512Schedule_s
{
uint64_t len ;
uint64_t h[8] ;
unsigned char buf[128] ;
} ;
#define SHA512_INIT() { .len = 0, .h = { 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL } }
extern void sha512_init (SHA512Schedule *) ;
extern void sha512_update (SHA512Schedule *, char const *, size_t) ;
extern void sha512_final (SHA512Schedule *, char *digest) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/sig.h 0000664 0000000 0000000 00000001246 14630613211 0020163 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SIG_H
#define SKALIBS_SIG_H
#include
#include
#include
typedef void sig_func (int) ;
typedef sig_func *sig_func_ref ;
extern int sig_catch (int, sig_func_ref) ;
#define sig_restore(sig) sig_catch((sig), SIG_DFL)
#define sig_ignore(sig) sig_catch((sig), SIG_IGN)
extern int sig_altignore (int) ;
extern void sig_restoreto (sigset_t const *, unsigned int) ;
extern void sig_block (int) ;
extern void sig_unblock (int) ;
extern void sig_blocknone (void) ;
extern char const *sig_name (int) ;
extern int sig_number (char const *) ;
extern size_t sig0_scan (char const *, int *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/siovec.h 0000664 0000000 0000000 00000001562 14630613211 0020672 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SIOVEC_H
#define SKALIBS_SIOVEC_H
#include
#include
extern size_t siovec_len (struct iovec const *, unsigned int) gccattr_pure ;
extern size_t siovec_gather (struct iovec const *, unsigned int, char *, size_t) ;
extern size_t siovec_scatter (struct iovec const *, unsigned int, char const *, size_t) ;
extern size_t siovec_deal (struct iovec const *, unsigned int, struct iovec const *, unsigned int) ;
extern size_t siovec_seek (struct iovec *, unsigned int, size_t) ;
extern unsigned int siovec_trunc (struct iovec *, unsigned int, size_t) ;
extern size_t siovec_bytechr (struct iovec const *, unsigned int, char) ;
extern size_t siovec_bytein (struct iovec const *, unsigned int, char const *, size_t) ;
extern size_t siovec_search (struct iovec const *, unsigned int, char const *, size_t) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/skaclient.h 0000664 0000000 0000000 00000024734 14630613211 0021365 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKACLIENT_H
#define SKACLIENT_H
#include
#include
#include
#include
#include
#include
/* Server part */
extern int skaclient_server_ack (unixmessage const *, unixmessage_sender *, unixmessage_sender *, char const *, size_t, char const *, size_t) ;
extern int skaclient_server_bidi_ack (unixmessage const *, unixmessage_sender *, unixmessage_sender *, unixmessage_receiver *, char *, size_t, char *, size_t, char const *, size_t, char const *, size_t) ;
extern int skaclient_server_init (unixmessage_receiver *, unixmessage_sender *, unixmessage_sender *, char const *, size_t, char const *, size_t, tain const *, tain *) ;
#define skaclient_server_init_g(in, out, asyncout, before, beforelen, after, afterlen, deadline) skaclient_server_init(in, out, asyncout, before, beforelen, after, afterlen, (deadline), &STAMP)
#define skaclient_server_01x_init(before, beforelen, after, afterlen, deadline, stamp) skaclient_server_init(unixmessage_receiver_0, unixmessage_sender_1, unixmessage_sender_x, before, beforelen, after, afterlen, deadline, stamp)
#define skaclient_server_01x_init_g(before, beforelen, after, afterlen, deadline) skaclient_server_01x_init(before, beforelen, after, afterlen, (deadline), &STAMP)
/* Client part: the rest of this file */
#define SKACLIENT_KOLBAK_SIZE 64
#define SKACLIENT_OPTION_WAITPID 0x00000001U
#define SKACLIENT_OPTION_ASYNC_ACCEPT_FDS 0x00000002U
#define SKACLIENT_OPTION_SYNC_ACCEPT_FDS 0x00000004U
#define skaclient_buffer_type(bufsn, auxbufsn, bufan, auxbufan, qlen) struct { char bufs[bufsn] ; char auxbufs[auxbufsn] ; char bufa[bufan] ; char auxbufa[auxbufan] ; kolbak_closure q[qlen] ; }
typedef skaclient_buffer_type(UNIXMESSAGE_BUFSIZE, UNIXMESSAGE_AUXBUFSIZE, UNIXMESSAGE_BUFSIZE, UNIXMESSAGE_AUXBUFSIZE, SKACLIENT_KOLBAK_SIZE) skaclient_buffer, *skaclient_buffer_ref ;
/* User structure */
typedef struct skaclient_s skaclient, *skaclient_ref ;
struct skaclient_s
{
unixmessage_receiver syncin ;
unixmessage_sender syncout ;
kolbak_queue kq ;
unixmessage_receiver asyncin ;
unixmessage_sender asyncout ;
pid_t pid ;
uint32_t options ;
} ;
#define SKACLIENT_ZERO { .syncin = UNIXMESSAGE_RECEIVER_ZERO, .syncout = UNIXMESSAGE_SENDER_ZERO, .kq = KOLBAK_QUEUE_ZERO, .asyncin = UNIXMESSAGE_RECEIVER_ZERO, .asyncout = UNIXMESSAGE_SENDER_ZERO, .pid = 0, .options = 0 }
extern skaclient const skaclient_zero ;
/* Callback data for init */
typedef struct skaclient_cbdata_s skaclient_cbdata, *skaclient_cbdata_ref ;
struct skaclient_cbdata_s
{
skaclient *a ;
char const *after ;
size_t afterlen ;
} ;
/* Starting and ending */
extern void skaclient_end (skaclient *) ;
extern int skaclient_start_async (skaclient *, char *, size_t, char *, size_t, char *, size_t, char *, size_t, kolbak_closure *, size_t, char const *, uint32_t, char const *, size_t, char const *, size_t, skaclient_cbdata *) ;
#define skaclient_start_async_b(a, sb, path, options, before, beforelen, after, afterlen, blah) skaclient_start_async(a, (sb)->bufs, sizeof((sb)->bufs), (sb)->auxbufs, sizeof((sb)->auxbufs), (sb)->bufa, sizeof((sb)->bufa), (sb)->auxbufa, sizeof((sb)->auxbufa), (sb)->q, sizeof((sb)->q), path, options, before, beforelen, after, afterlen, blah)
extern int skaclient_startf_async (skaclient *, char *, size_t, char *, size_t, char *, size_t, char *, size_t, kolbak_closure *, size_t, char const *, char const *const *, char const *const *, uint32_t, char const *, size_t, char const *, size_t, skaclient_cbdata *) ;
#define skaclient_startf_async_b(a, sb, prog, argv, envp, options, before, beforelen, after, afterlen, blah) skaclient_startf_async(a, (sb)->bufs, sizeof((sb)->bufs), (sb)->auxbufs, sizeof((sb)->auxbufs), (sb)->bufa, sizeof((sb)->bufa), (sb)->auxbufa, sizeof((sb)->auxbufa), (sb)->q, sizeof((sb)->q) / sizeof(kolbak_closure), prog, argv, envp, options, before, beforelen, after, afterlen, blah)
extern int skaclient_start (skaclient *, char *, size_t, char *, size_t, char *, size_t, char *, size_t, kolbak_closure *, size_t, char const *, uint32_t, char const *, size_t, char const *, size_t, tain const *, tain *) ;
#define skaclient_start_b(a, sb, path, options, before, beforelen, after, afterlen, deadline, stamp) skaclient_start(a, (sb)->bufs, sizeof((sb)->bufs), (sb)->auxbufs, sizeof((sb)->auxbufs), (sb)->bufa, sizeof((sb)->bufa), (sb)->auxbufa, sizeof((sb)->auxbufa), (sb)->q, sizeof((sb)->q) / sizeof(kolbak_closure), path, options, before, beforelen, after, afterlen, deadline, stamp)
#define skaclient_start_g(a, bufs, bufsn, auxbufs, auxbufsn, bufa, bufan, auxbufa, auxbufan, q, qlen, path, options, before, beforelen, after, afterlen, deadline) skaclient_start(a, bufs, bufsn, auxbufs, auxbufsn, bufa, bufan, auxbufa, auxbufan, q, qlen, path, options, before, beforelen, after, afterlen, (deadline), &STAMP)
#define skaclient_start_b_g(a, sb, path, options, before, beforelen, after, afterlen, deadline) skaclient_start_b(a, sb, path, options, before, beforelen, after, afterlen, (deadline), &STAMP)
extern int skaclient_startf (skaclient *, char *, size_t, char *, size_t, char *, size_t, char *, size_t, kolbak_closure *, size_t, char const *, char const *const *, char const *const *, uint32_t, char const *, size_t, char const *, size_t, tain const *, tain *) ;
#define skaclient_startf_b(a, sb, prog, argv, envp, options, before, beforelen, after, afterlen, deadline, stamp) skaclient_startf(a, (sb)->bufs, sizeof((sb)->bufs), (sb)->auxbufs, sizeof((sb)->auxbufs), (sb)->bufa, sizeof((sb)->bufa), (sb)->auxbufa, sizeof((sb)->auxbufa), (sb)->q, sizeof((sb)->q) / sizeof(kolbak_closure), prog, argv, envp, options, before, beforelen, after, afterlen, deadline, stamp)
#define skaclient_startf_g(a, bufs, bufsn, auxbufs, auxbufsn, bufa, bufan, auxbufa, auxbufan, q, qlen, prog, argv, envp, options, before, beforelen, after, afterlen, deadline) skaclient_startf(a, bufs, bufsn, auxbufs, auxbufsn, bufa, bufan, auxbufa, auxbufan, q, qlen, prog, argv, envp, options, before, beforelen, after, afterlen, (deadline), &STAMP)
#define skaclient_startf_b_g(a, sb, prog, argv, envp, options, before, beforelen, after, afterlen, deadline) skaclient_startf_b(a, sb, prog, argv, envp, options, before, beforelen, after, afterlen, (deadline), &STAMP)
/* Writing */
extern int skaclient_putmsg_and_close (skaclient *, unixmessage const *, unsigned char const *, unixmessage_handler_func_ref, void *) ;
#define skaclient_putmsg(a, m, cb, result) skaclient_putmsg_and_close(a, m, unixmessage_bits_closenone, cb, result)
extern int skaclient_putmsgv_and_close (skaclient *, unixmessagev const *, unsigned char const *, unixmessage_handler_func_ref, void *) ;
#define skaclient_putmsgv(a, m, cb, result) skaclient_putmsgv_and_close(a, m, unixmessage_bits_closenone, cb, result)
extern int skaclient_put (skaclient *, char const *, size_t, unixmessage_handler_func_ref, void *) ;
extern int skaclient_putv (skaclient *, struct iovec const *, unsigned int, unixmessage_handler_func_ref, void *) ;
/* Writing and flushing */
extern int skaclient_sendmsg_and_close (skaclient *, unixmessage const *, unsigned char const *, unixmessage_handler_func_ref, void *, tain const *, tain *) ;
#define skaclient_sendmsg_and_close_g(a, m, bits, cb, result, deadline) skaclient_sendmsg_and_close(a, m, bits, cb, result, (deadline), &STAMP)
#define skaclient_sendmsg(a, m, cb, result, deadline, stamp) skaclient_sendmsg_and_close(a, m, unixmessage_bits_closenone, cb, result, deadline, stamp)
#define skaclient_sendmsg_g(a, m, cb, result, deadline) skaclient_sendmsg(a, m, cb, result, (deadline), &STAMP)
extern int skaclient_sendmsgv_and_close (skaclient *, unixmessagev const *, unsigned char const *, unixmessage_handler_func_ref, void *, tain const *, tain *) ;
#define skaclient_sendmsgv_and_close_g(a, m, bits, cb, result, deadline) skaclient_sendmsgv_and_close(a, m, bits, cb, result, (deadline), &STAMP)
#define skaclient_sendmsgv(a, m, cb, result, deadline, stamp) skaclient_sendmsgv_and_close(a, m, unixmessage_bits_closenone, cb, result, deadline, stamp)
#define skaclient_sendmsgv_g(a, m, cb, result, deadline) skaclient_sendmsgv(a, m, cb, result, (deadline), &STAMP)
extern int skaclient_send (skaclient *, char const *, size_t, unixmessage_handler_func_ref, void *, tain const *, tain *) ;
#define skaclient_send_g(a, s, len, cb, result, deadline) skaclient_send(a, s, len, cb, result, (deadline), &STAMP)
extern int skaclient_sendv (skaclient *, struct iovec const *, unsigned int, unixmessage_handler_func_ref, void *, tain const *, tain *) ;
#define skaclient_sendv_g(a, v, vlen, cb, result, deadline) skaclient_sendv(a, v, vlen, cb, result, (deadline), &STAMP)
/* Helpers for full async */
#define skaclient_sfd(a) unixmessage_receiver_fd(&(a)->syncin)
#define skaclient_siswritable(a) (!unixmessage_sender_isempty(&(a)->syncout))
#define skaclient_flush(a) unixmessage_sender_flush(&(a)->syncout)
#define skaclient_timed_flush(a, deadline, stamp) unixmessage_sender_timed_flush(&(a)->syncout, deadline, stamp)
#define skaclient_timed_flush_g(a, deadline) skaclient_timed_flush(a, (deadline), &STAMP)
#define skaclient_supdate(a) unixmessage_handle(&(a)->syncin, (unixmessage_handler_func_ref)&kolbak_call, &(a)->kq)
#define skaclient_timed_supdate(a, deadline, stamp) unixmessage_timed_handle(&(a)->syncin, (unixmessage_handler_func_ref)&kolbak_call, &(a)->kq, deadline, stamp)
#define skaclient_timed_supdate_g(a, deadline) skaclient_timed_supdate(a, (deadline), &STAMP)
extern int skaclient_syncify (skaclient *, tain const *, tain *) ;
#define skaclient_fd(a) skaclient_afd(a)
#define skaclient_afd(a) unixmessage_receiver_fd(&(a)->asyncin)
#define skaclient_update(a, f, p) skaclient_aupdate(a, f, p)
#define skaclient_aupdate(a, f, p) unixmessage_handle(&(a)->asyncin, f, p)
extern unixmessage_handler_func skaclient_default_cb ;
/* When asyncout is actually used (skabus...) */
#define skaclient_aiswritable(a) (!unixmessage_sender_isempty(&(a)->asyncout))
#define skaclient_aput_and_close(a, m, bits) unixmessage_put_and_close(&(a)->asyncout, m, bits)
#define skaclient_aputv_and_close(a, m, bits) unixmessage_putv_and_close(&(a)->asyncout, m, bits)
#define skaclient_aput(a, m) unixmessage_put(&(a)->asyncout, m)
#define skaclient_aputv(a, m) unixmessage_putv(&(a)->asyncout, m)
#define skaclient_aflush(a) unixmessage_sender_flush(&(a)->asyncout)
#define skaclient_timed_aflush(a, deadline, stamp) unixmessage_sender_timed_flush(&(a)->asyncout, deadline, stamp)
#define skaclient_timed_aflush_g(a, deadline) skaclient_timed_aflush(a, (deadline), &STAMP)
#endif
skalibs-2.14.2.0/src/include/skalibs/skalibs.h 0000664 0000000 0000000 00000001361 14630613211 0021027 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_H
#define SKALIBS_H
/*
This header is heavy! It includes everything in skalibs except:
- skalibs/config.h: package configuration
- skalibs/sysdeps.h: system-dependent feature test macros
- skalibs/nonposix.h: pre-system headers definitions for POSIX extensions
- skalibs/bsdsnowflake.h: pre-system headers BSD-specific workarounds
- skalibs/nsig.h: SKALIBS_NSIG definition, requires nonposix
- skalibs/posixishard.h: post-system headers workarounds for conformance failures
*/
#include
#include
#include
#include
#include
#include
#include
#endif
skalibs-2.14.2.0/src/include/skalibs/skamisc.h 0000664 0000000 0000000 00000003754 14630613211 0021041 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SKAMISC_H
#define SKALIBS_SKAMISC_H
#include
#include
#include
extern stralloc satmp ;
extern int skagetln (buffer *, stralloc *, char) ;
extern int skagetln_loose (buffer *, stralloc *, char) ;
extern int skagetln_nofill (buffer *, stralloc *, char) ;
extern int skagetlnsep (buffer *, stralloc *, char const *, size_t) ;
extern int skagetlnsep_loose (buffer *, stralloc *, char const *, size_t) ;
extern int skagetlnmaxsep (buffer *, stralloc *, size_t, char const *, size_t) ;
extern int getlnmax (buffer *, char *, size_t, size_t *, char) ;
extern int getlnmaxsep (buffer *, char *, size_t, size_t *, char const *, size_t) ;
extern int sauniquename (stralloc *) ;
extern int string_quote_options (stralloc *, char const *, size_t, uint32_t) ;
#define string_quote(sa, s, len) string_quote_options(sa, s, (len), 0)
#define string_quote_nospace(sa, s, len) string_quote_options(sa, s, (len), 1)
#define string_quotes(sa, s) string_quote(sa, (s), strlen(s))
extern int string_quote_nodelim_mustquote_options (stralloc *, char const *, size_t, char const *, size_t, uint32_t) ;
#define string_quote_nodelim_mustquote(sa, s, len, delim, delimlen) string_quote_nodelim_mustquote_options(sa, s, len, delim, (delimlen), 0)
#define string_quote_nodelim_mustquote_nospace(sa, s, len, delim, delimlen) string_quote_nodelim_mustquote_options(sa, s, len, delim, (delimlen), 1)
#define string_quote_nodelim(sa, s, len) string_quote_nodelim_mustquote(sa, s, (len), "\"", 1)
#define string_quote_nodelim_nospace(sa, s, len) string_quote_nodelim_mustquote_nospace(sa, s, (len), "\"", 1)
extern int string_unquote (char *, size_t *, char const *, size_t, size_t *) ;
extern ssize_t string_unquote_nodelim (char *, char const *, size_t) ;
extern int string_unquote_withdelim (char *, size_t *, char const *, size_t, size_t *, char const *, size_t) ;
extern int string_format (stralloc *, char const *, char const *, char const *const *) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/socket.h 0000664 0000000 0000000 00000021263 14630613211 0020672 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SOCKET_H
#define SKALIBS_SOCKET_H
#include
#include
#include
#include
#include
#include
typedef ssize_t socket_io_func (int, char *, size_t, char *, uint16_t *) ;
typedef socket_io_func *socket_io_func_ref ;
typedef ssize_t socket_iow_func (int, char const *, size_t, char const *, uint16_t) ;
typedef socket_iow_func *socket_iow_func_ref ;
extern int socket_internal (int, int, int, unsigned int) ;
extern int socketpair_internal (int, int, int, unsigned int, int *) ;
/* UNIX domain sockets */
#define IPCPATH_MAX 107
#define ipc_stream() ipc_stream_nb()
#define ipc_stream_b() ipc_stream_internal(0)
#define ipc_stream_nb() ipc_stream_internal(O_NONBLOCK)
#define ipc_stream_coe() ipc_stream_internal(O_CLOEXEC)
#define ipc_stream_nbcoe() ipc_stream_internal(O_NONBLOCK|O_CLOEXEC)
extern int ipc_stream_internal (unsigned int) ;
#define ipc_datagram() ipc_datagram_nb()
#define ipc_datagram_b() ipc_datagram_internal(0)
#define ipc_datagram_nb() ipc_datagram_internal(O_NONBLOCK)
#define ipc_datagram_coe() ipc_datagram_internal(O_CLOEXEC)
#define ipc_datagram_nbcoe() ipc_datagram_internal(O_NONBLOCK|O_CLOEXEC)
extern int ipc_datagram_internal (unsigned int) ;
#define ipc_pair(sv) ipc_pair_nb(sv)
#define ipc_pair_b(sv) ipc_pair_internal((sv), 0)
#define ipc_pair_nb(sv) ipc_pair_internal((sv), O_NONBLOCK)
#define ipc_pair_coe(sv) ipc_pair_internal((sv), O_CLOEXEC)
#define ipc_pair_nbcoe(sv) ipc_pair_internal((sv), O_NONBLOCK|O_CLOEXEC)
extern int ipc_pair_internal (int *, unsigned int) ;
extern int ipc_bind (int, char const *) ;
extern int ipc_bind_reuse (int, char const *) ;
#define ipc_bind_reuse_lock(fd, path, fdlock) ipc_bind_reuse_lock_perms(fd, path, (fdlock), 0)
extern int ipc_bind_reuse_perms (int, char const *, unsigned int) ;
extern int ipc_bind_reuse_lock_perms (int, char const *, int *, unsigned int) ;
extern int ipc_listen (int, int) ;
#define ipc_accept(s, path, len, trunc) ipc_accept_internal(s, path, len, (trunc), 0)
#define ipc_accept_nb(s, path, len, trunc) ipc_accept_internal(s, path, len, (trunc), O_NONBLOCK)
#define ipc_accept_coe(s, path, len, trunc) ipc_accept_internal(s, path, len, (trunc), O_CLOEXEC)
#define ipc_accept_nbcoe(s, path, len, trunc) ipc_accept_internal(s, path, len, (trunc), O_NONBLOCK|O_CLOEXEC)
extern int ipc_accept_internal (int, char *, size_t, int *, unsigned int) ;
extern int ipc_local (int, char *, size_t, int *) ;
extern int ipc_connect (int, char const *) ;
extern int ipc_connected (int) ;
extern int ipc_timed_connect (int, char const *, tain const *, tain *) ;
#define ipc_timed_connect_g(fd, path, deadline) ipc_timed_connect(fd, path, (deadline), &STAMP)
extern ssize_t ipc_send (int, char const *, size_t, char const *) ;
extern ssize_t ipc_recv (int, char *, size_t, char *) ;
/* INET and INET6 domain sockets */
#define socket_tcp() socket_tcp4()
#define socket_tcp_b() socket_tcp4_b()
#define socket_tcp_nb() socket_tcp4_nb()
#define socket_tcp_coe() socket_tcp4_coe()
#define socket_tcp_nbcoe() socket_tcp4_nbcoe()
#define socket_tcp4() socket_tcp4_nb()
#define socket_tcp4_b() socket_tcp4_internal(0)
#define socket_tcp4_nb() socket_tcp4_internal(O_NONBLOCK)
#define socket_tcp4_coe() socket_tcp4_internal(O_CLOEXEC)
#define socket_tcp4_nbcoe() socket_tcp4_internal(O_NONBLOCK|O_CLOEXEC)
extern int socket_tcp4_internal (unsigned int) ;
#define socket_tcp6() socket_tcp6_nb()
#define socket_tcp6_b() socket_tcp6_internal(0)
#define socket_tcp6_nb() socket_tcp6_internal(O_NONBLOCK)
#define socket_tcp6_coe() socket_tcp6_internal(O_CLOEXEC)
#define socket_tcp6_nbcoe() socket_tcp6_internal(O_NONBLOCK|O_CLOEXEC)
extern int socket_tcp6_internal (unsigned int) ;
#define socket_udp() socket_udp4()
#define socket_udp_b() socket_udp4_b()
#define socket_udp_nb() socket_udp4_nb()
#define socket_udp_coe() socket_udp4_coe()
#define socket_udp_nbcoe() socket_udp4_nbcoe()
#define socket_udp4() socket_udp4_nb()
#define socket_udp4_b() socket_udp4_internal(0)
#define socket_udp4_nb() socket_udp4_internal(O_NONBLOCK)
#define socket_udp4_coe() socket_udp4_internal(O_CLOEXEC)
#define socket_udp4_nbcoe() socket_udp4_internal(O_NONBLOCK|O_CLOEXEC)
extern int socket_udp4_internal (unsigned int) ;
#define socket_udp6() socket_udp6_nb()
#define socket_udp6_b() socket_udp6_internal(0)
#define socket_udp6_nb() socket_udp6_internal(O_NONBLOCK)
#define socket_udp6_coe() socket_udp6_internal(O_CLOEXEC)
#define socket_udp6_nbcoe() socket_udp6_internal(O_NONBLOCK|O_CLOEXEC)
extern int socket_udp6_internal (unsigned int) ;
extern int socket_waitconn (int, tain const *, tain *) ;
#define socket_waitconn_g(fd, deadline) socket_waitconn(fd, (deadline), &STAMP)
extern int socket_deadlineconnstamp4 (int, char const *, uint16_t, tain const *, tain *) ;
#define socket_deadlineconnstamp(s, ip, port, deadline, stamp) socket_deadlineconnstamp4(s, ip, port, deadline, stamp)
#define socket_deadlineconnstamp4_g(fd, ip, port, deadline) socket_deadlineconnstamp4(fd, ip, port, (deadline), &STAMP)
extern int socket_deadlineconnstamp4_u32 (int, uint32_t, uint16_t, tain const *, tain *) ;
#define socket_deadlineconnstamp4_u32_g(fd, ip, port, deadline) socket_deadlineconnstamp4_u32(fd, ip, port, (deadline), &STAMP)
extern int socket_timeoutconn (int, char const *, uint16_t, unsigned int) ;
extern int socket_connect4 (int, char const *, uint16_t) ;
extern int socket_connect4_u32 (int, uint32_t, uint16_t) ;
extern int socket_connected (int) gccattr_const ;
extern int socket_bind4 (int, char const *, uint16_t) ;
extern int socket_bind4_reuse (int, char const *, uint16_t) ;
#define socket_listen(fd, b) ipc_listen(fd, b)
extern int socket_connect6 (int, char const *, uint16_t) ;
extern int socket_deadlineconnstamp6 (int, char const *, uint16_t, tain const *, tain *) ;
#define socket_deadlineconnstamp6_g(fd, ip6, port, deadline) socket_deadlineconnstamp6(fd, ip6, port, (deadline), &STAMP)
extern int socket_bind6 (int, char const *, uint16_t) ;
extern int socket_bind6_reuse (int, char const *, uint16_t) ;
#define socket_accept4(s, ip, port) socket_accept4_internal(s, ip, (port), 0)
#define socket_accept4_nb(s, ip, port) socket_accept4_internal(s, ip, (port), O_NONBLOCK)
#define socket_accept4_coe(s, ip, port) socket_accept4_internal(s, ip, (port), O_CLOEXEC)
#define socket_accept4_nbcoe(s, ip, port) socket_accept4_internal(s, ip, (port), O_NONBLOCK|O_CLOEXEC)
extern int socket_accept4_internal (int, char *, uint16_t *, unsigned int) ;
extern socket_io_func socket_recv4 ;
extern socket_iow_func socket_send4 ;
extern int socket_local4 (int, char *, uint16_t *) ;
extern int socket_remote4 (int, char *, uint16_t *) ;
#define socket_accept6(s, ip6, port) socket_accept6_internal(s, ip6, (port), 0)
#define socket_accept6_nb(s, ip6, port) socket_accept6_internal(s, ip6, (port), O_NONBLOCK)
#define socket_accept6_coe(s, ip6, port) socket_accept6_internal(s, ip6, (port), O_CLOEXEC)
#define socket_accept6_nbcoe(s, ip6, port) socket_accept6_internal(s, ip6, (port), O_NONBLOCK|O_CLOEXEC)
extern int socket_accept6_internal (int, char *, uint16_t *, unsigned int) ;
extern socket_io_func socket_recv6 ;
extern socket_iow_func socket_send6 ;
extern int socket_local6 (int, char *, uint16_t *) ;
extern int socket_remote6 (int, char *, uint16_t *) ;
extern int socket_ipoptionskill (int) ;
extern int socket_tcpnodelay (int) ;
extern void socket_tryreservein (int, unsigned int) ;
/* Timed send and recv operations (for dgram sockets) */
extern ssize_t socket_ioloop (int, char *, size_t, char *, uint16_t *, socket_io_func_ref, int, tain const *, tain *) ;
extern socket_io_func socket_ioloop_send4 ;
extern socket_io_func socket_ioloop_send6 ;
#define socket_sendnb4(fd, buf, len, ip4, port, deadline, stamp) socket_ioloop(fd, buf, len, (char *)ip4, &(port), &socket_ioloop_send4, 1, deadline, stamp)
#define socket_sendnb4_g(fd, buf, len, ip4, port, deadline) socket_sendnb4(fd, buf, len, ip4, port, (deadline), &STAMP)
#define socket_recvnb4(fd, buf, len, ip4, port, deadline, stamp) socket_ioloop(fd, buf, len, ip4, port, &socket_recv4, 0, deadline, stamp)
#define socket_recvnb4_g(fd, buf, len, ip4, port, deadline) socket_recvnb4(fd, buf, len, ip4, port, (deadline), &STAMP)
#define socket_sendnb6(fd, buf, len, ip6, port, deadline, stamp) socket_ioloop(fd, buf, len, (char *)ip6, &(port), &socket_ioloop_send6, 1, deadline, stamp)
#define socket_sendnb6_g(fd, buf, len, ip6, port, deadline) socket_sendnb6(fd, buf, len, ip6, port, (deadline), &STAMP)
#define socket_recvnb6(fd, buf, len, ip6, port, deadline, stamp) socket_ioloop(fd, buf, len, ip6, port, &socket_recv6, 0, deadline, stamp)
#define socket_recvnb6_g(fd, buf, len, ip6, port, deadline) socket_recvnb6(fd, buf, len, ip6, port, (deadline), &STAMP)
#endif
skalibs-2.14.2.0/src/include/skalibs/stat.h 0000664 0000000 0000000 00000000752 14630613211 0020355 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_STAT_H
#define SKALIBS_STAT_H
/*
This header must always be paired with skalibs/bsdsnowflake.h
(which must always come first).
If you #include before bsdsnowflake, the
workaround will not work.
*/
#include
#include
#if !defined(SKALIBS_HASSTATIM) && defined(SKALIBS_HASSTATIMESPEC)
#define st_atim st_atimespec
#define st_mtim st_mtimespec
#define st_ctim st_ctimespec
#endif
#endif
skalibs-2.14.2.0/src/include/skalibs/stdcrypto.h 0000664 0000000 0000000 00000000304 14630613211 0021426 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_STDCRYPTO_H
#define SKALIBS_STDCRYPTO_H
#include
#include
#include
#include
#endif
skalibs-2.14.2.0/src/include/skalibs/stddjb.h 0000664 0000000 0000000 00000002515 14630613211 0020653 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef STDDJB_H
#define STDDJB_H
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#endif
skalibs-2.14.2.0/src/include/skalibs/stralloc.h 0000664 0000000 0000000 00000003140 14630613211 0021217 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_STRALLOC_H
#define SKALIBS_STRALLOC_H
#include
#include
typedef struct stralloc_s stralloc, *stralloc_ref ;
struct stralloc_s
{
char *s ;
size_t len ;
size_t a ;
} ;
#define STRALLOC_ZERO { 0, 0, 0 }
extern stralloc const stralloc_zero ;
extern int stralloc_ready_tuned (stralloc *, size_t, size_t, size_t, size_t) ;
extern int stralloc_readyplus_tuned (stralloc *, size_t, size_t, size_t, size_t) ;
#define stralloc_ready(sa, n) stralloc_ready_tuned(sa, (n), 8, 1, 8)
#define stralloc_readyplus(sa, n) stralloc_readyplus_tuned(sa, (n), 8, 1, 8)
extern void stralloc_free (stralloc *) ;
extern int stralloc_shrink (stralloc *) ;
extern int stralloc_copyb (stralloc *, char const *, size_t) ;
extern int stralloc_catb (stralloc *, char const *, size_t) ;
extern int stralloc_catv (stralloc *, struct iovec const *, unsigned int) ;
#define stralloc_copys(sa, s) stralloc_copyb(sa, (s), strlen(s))
#define stralloc_cats(sa, s) stralloc_catb(sa, (s), strlen(s))
#define stralloc_copy(sa1, sa2) stralloc_copyb(sa1, (sa2)->s, (sa2)->len)
#define stralloc_cat(sa1, sa2) stralloc_catb(sa1, (sa2)->s, (sa2)->len)
extern int stralloc_append (stralloc *, char) ;
extern void stralloc_reverse (stralloc *) ;
extern void stralloc_reverse_blocks (stralloc *, size_t) ;
#define stralloc_0(sa) stralloc_catb(sa, "", 1)
extern int stralloc_insertb (stralloc *, size_t, char const *, size_t) ;
#define stralloc_inserts(sa, offset, s) stralloc_insertb(sa, offset, (s), strlen(s))
#define stralloc_insert(sa1, offset, sa2) stralloc_insertb(sa1, offset, (sa2)->s, (sa2)->len)
#endif
skalibs-2.14.2.0/src/include/skalibs/strerr.h 0000664 0000000 0000000 00000054154 14630613211 0020730 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_STRERR_H
#define SKALIBS_STRERR_H
#include
extern void strerr_warnv (char const *const *, unsigned int) ;
extern void strerr_warnvsys (char const *const *, unsigned int) ;
extern void strerr_diev (int, char const *const *, unsigned int) gccattr_noreturn ;
extern void strerr_dievsys(int, char const *const *, unsigned int) gccattr_noreturn ;
#define strerr_array(...) ((char const *const[]){__VA_ARGS__})
#define strerr_warnn(n, ...) strerr_warnv(strerr_array(__VA_ARGS__), (n))
#define strerr_warnnsys(n, ...) strerr_warnvsys(strerr_array(__VA_ARGS__), (n))
#define strerr_dien(e, n, ...) strerr_diev(e, strerr_array(__VA_ARGS__), (n))
#define strerr_diensys(e, n, ...) strerr_dievsys(e, strerr_array(__VA_ARGS__), (n))
#define strerr_warn(...) strerr_warnn(sizeof(strerr_array(__VA_ARGS__))/sizeof(char const *), __VA_ARGS__)
#define strerr_warnsys(...) strerr_warnnsys(sizeof(strerr_array(__VA_ARGS__))/sizeof(char const *), __VA_ARGS__)
#define strerr_die(e, ...) strerr_dien(e, sizeof(strerr_array(__VA_ARGS__))/sizeof(char const *), __VA_ARGS__)
#define strerr_diesys(e, ...) strerr_diensys(e, sizeof(strerr_array(__VA_ARGS__))/sizeof(char const *), __VA_ARGS__)
extern char const *PROG ;
#define strerr_warnwn(n, ...) strerr_warnn((n)+2, PROG, ": warning: ", __VA_ARGS__)
#define strerr_warnwnsys(n, ...) strerr_warnnsys((n)+2, PROG, ": warning: ", __VA_ARGS__)
#define strerr_warnfn(n, ...) strerr_warnn((n)+2, PROG, ": fatal: ", __VA_ARGS__)
#define strerr_warnfnsys(n, ...) strerr_warnnsys((n)+2, PROG, ": fatal: ", __VA_ARGS__)
#define strerr_diewn(e, n, ...) strerr_dien(e, (n)+2, PROG, ": warning: ", __VA_ARGS__)
#define strerr_diewnsys(e, n, ...) strerr_diensys(e, (n)+2, PROG, ": warning: ", __VA_ARGS__)
#define strerr_diefn(e, n, ...) strerr_dien(e, (n)+2, PROG, ": fatal: ", __VA_ARGS__)
#define strerr_diefnsys(e, n, ...) strerr_diensys(e, (n)+2, PROG, ": fatal: ", __VA_ARGS__)
#define strerr_warnw(...) strerr_warn(PROG, ": warning: ", __VA_ARGS__)
#define strerr_warnwsys(...) strerr_warnsys(PROG, ": warning: ", __VA_ARGS__)
#define strerr_warnf(...) strerr_warn(PROG, ": fatal: ", __VA_ARGS__)
#define strerr_warnfsys(...) strerr_warnsys(PROG, ": fatal: ", __VA_ARGS__)
#define strerr_diew(e, ...) strerr_die(e, PROG, ": warning: ", __VA_ARGS__)
#define strerr_diewsys(e, ...) strerr_diesys(e, PROG, ": warning: ", __VA_ARGS__)
#define strerr_dief(e, ...) strerr_die(e, PROG, ": fatal: ", __VA_ARGS__)
#define strerr_diefsys(e, ...) strerr_diesys(e, PROG, ": fatal: ", __VA_ARGS__)
#define strerr_warnwun(n, ...) strerr_warnwn((n)+1, "unable to ", __VA_ARGS__)
#define strerr_warnwunsys(n, ...) strerr_warnwnsys((n)+1, "unable to ", __VA_ARGS__)
#define strerr_warnfun(n, ...) strerr_warnfn((n)+1, "unable to ", __VA_ARGS__)
#define strerr_warnfunsys(n, ...) strerr_warnfnsys((n)+1, "unable to ", __VA_ARGS__)
#define strerr_diewun(e, n, ...) strerr_diewn(e, (n)+1, "unable to ", __VA_ARGS__)
#define strerr_diewunsys(e, n, ...) strerr_diewnsys(e, (n)+1, "unable to ", __VA_ARGS__)
#define strerr_diefun(e, n, ...) strerr_diefn(e, (n)+1, "unable to ", __VA_ARGS__)
#define strerr_diefunsys(e, n, ...) strerr_diefnsys(e, (n)+1, "unable to ", __VA_ARGS__)
#define strerr_warnwu(...) strerr_warnw("unable to ", __VA_ARGS__)
#define strerr_warnwusys(...) strerr_warnwsys("unable to ", __VA_ARGS__)
#define strerr_warnfu(...) strerr_warnf("unable to ", __VA_ARGS__)
#define strerr_warnfusys(...) strerr_warnfsys("unable to ", __VA_ARGS__)
#define strerr_diewu(e, ...) strerr_diew(e, "unable to ", __VA_ARGS__)
#define strerr_diewusys(e, ...) strerr_diewsys(e, "unable to ", __VA_ARGS__)
#define strerr_diefu(e, ...) strerr_dief(e, "unable to ", __VA_ARGS__)
#define strerr_diefusys(e, ...) strerr_diefsys(e, "unable to ", __VA_ARGS__)
#define strerr_warnin(n, ...) strerr_warnn((n)+2, PROG, ": info: ", __VA_ARGS__)
#define strerr_warninsys(n, ...) strerr_warnnsys((n)+2, PROG, ": info: ", __VA_ARGS__)
#define strerr_warntn(n, ...) strerr_warnn((n)+2, PROG, ": tracing: ", __VA_ARGS__)
#define strerr_warntnsys(n, ...) strerr_warnnsys((n)+2, PROG, ": tracing: ", __VA_ARGS__)
#define strerr_warni(...) strerr_warn(PROG, ": info: ", __VA_ARGS__)
#define strerr_warnisys(...) strerr_warnsys(PROG, ": info: ", __VA_ARGS__)
#define strerr_warnt(...) strerr_warn(PROG, ": tracing: ", __VA_ARGS__)
#define strerr_warntsys(...) strerr_warnsys(PROG, ": tracing: ", __VA_ARGS__)
#define strerr_dieusage(e, u) strerr_dien(e, 3, PROG, ": usage: ", u)
#define strerr_dienotset(e, x) strerr_diefn(e, 2, (x), " not set")
#define strerr_dieinvalid(e, x) strerr_diefn(e, 2, "invalid $", x)
#define strerr_dieexec(e, x) strerr_diefunsys(e, 2, "exec ", x)
/* compat */
#define strerr_warnw1x(x1) strerr_warnwn(1, x1)
#define strerr_warnw2x(x1, x2) strerr_warnwn(2, x1, x2)
#define strerr_warnw3x(x1, x2, x3) strerr_warnwn(3, x1, x2, x3)
#define strerr_warnw4x(x1, x2, x3, x4) strerr_warnwn(4, x1, x2, x3, x4)
#define strerr_warnw5x(x1, x2, x3, x4, x5) strerr_warnwn(5, x1, x2, x3, x4, x5)
#define strerr_warnw6x(x1, x2, x3, x4, x5, x6) strerr_warnwn(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnw7x(x1, x2, x3, x4, x5, x6, x7) strerr_warnwn(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnw8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnwn(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnw9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnwn(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnw10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnwn(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnw1sys(x1) strerr_warnwnsys(1, x1)
#define strerr_warnw2sys(x1, x2) strerr_warnwnsys(2, x1, x2)
#define strerr_warnw3sys(x1, x2, x3) strerr_warnwnsys(3, x1, x2, x3)
#define strerr_warnw4sys(x1, x2, x3, x4) strerr_warnwnsys(4, x1, x2, x3, x4)
#define strerr_warnw5sys(x1, x2, x3, x4, x5) strerr_warnwnsys(5, x1, x2, x3, x4, x5)
#define strerr_warnw6sys(x1, x2, x3, x4, x5, x6) strerr_warnwnsys(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnw7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warnwnsys(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnw8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnwnsys(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnw9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnwnsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnw10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnwnsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnf1x(x1) strerr_warnfn(1, x1)
#define strerr_warnf2x(x1, x2) strerr_warnfn(2, x1, x2)
#define strerr_warnf3x(x1, x2, x3) strerr_warnfn(3, x1, x2, x3)
#define strerr_warnf4x(x1, x2, x3, x4) strerr_warnfn(4, x1, x2, x3, x4)
#define strerr_warnf5x(x1, x2, x3, x4, x5) strerr_warnfn(5, x1, x2, x3, x4, x5)
#define strerr_warnf6x(x1, x2, x3, x4, x5, x6) strerr_warnfn(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnf7x(x1, x2, x3, x4, x5, x6, x7) strerr_warnfn(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnf8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnfn(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnf9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnfn(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnf10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnfn(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnf1sys(x1) strerr_warnfnsys(1, x1)
#define strerr_warnf2sys(x1, x2) strerr_warnfnsys(2, x1, x2)
#define strerr_warnf3sys(x1, x2, x3) strerr_warnfnsys(3, x1, x2, x3)
#define strerr_warnf4sys(x1, x2, x3, x4) strerr_warnfnsys(4, x1, x2, x3, x4)
#define strerr_warnf5sys(x1, x2, x3, x4, x5) strerr_warnfnsys(5, x1, x2, x3, x4, x5)
#define strerr_warnf6sys(x1, x2, x3, x4, x5, x6) strerr_warnfnsys(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnf7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warnfnsys(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnf8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnfnsys(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnf9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnfnsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnf10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnfnsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_diew1x(e, x1) strerr_diewn(e, 1, x1)
#define strerr_diew2x(e, x1, x2) strerr_diewn(e, 2, x1, x2)
#define strerr_diew3x(e, x1, x2, x3) strerr_diewn(e, 3, x1, x2, x3)
#define strerr_diew4x(e, x1, x2, x3, x4) strerr_diewn(e, 4, x1, x2, x3, x4)
#define strerr_diew5x(e, x1, x2, x3, x4, x5) strerr_diewn(e, 5, x1, x2, x3, x4, x5)
#define strerr_diew6x(e, x1, x2, x3, x4, x5, x6) strerr_diewn(e, 6, x1, x2, x3, x4, x5, x6)
#define strerr_diew7x(e, x1, x2, x3, x4, x5, x6, x7) strerr_diewn(e, 7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_diew8x(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diewn(e, 8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_diew9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diewn(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_diew10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diewn(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_diew1sys(e, x1) strerr_diewnsys(e, 1, x1)
#define strerr_diew2sys(e, x1, x2) strerr_diewnsys(e, 2, x1, x2)
#define strerr_diew3sys(e, x1, x2, x3) strerr_diewnsys(e, 3, x1, x2, x3)
#define strerr_diew4sys(e, x1, x2, x3, x4) strerr_diewnsys(e, 4, x1, x2, x3, x4)
#define strerr_diew5sys(e, x1, x2, x3, x4, x5) strerr_diewnsys(e, 5, x1, x2, x3, x4, x5)
#define strerr_diew6sys(e, x1, x2, x3, x4, x5, x6) strerr_diewnsys(e, 6, x1, x2, x3, x4, x5, x6)
#define strerr_diew7sys(e, x1, x2, x3, x4, x5, x6, x7) strerr_diewnsys(e, 7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_diew8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diewnsys(e, 8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_diew9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diewnsys(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_diew10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diewnsys(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_dief1x(e, x1) strerr_diefn(e, 1, x1)
#define strerr_dief2x(e, x1, x2) strerr_diefn(e, 2, x1, x2)
#define strerr_dief3x(e, x1, x2, x3) strerr_diefn(e, 3, x1, x2, x3)
#define strerr_dief4x(e, x1, x2, x3, x4) strerr_diefn(e, 4, x1, x2, x3, x4)
#define strerr_dief5x(e, x1, x2, x3, x4, x5) strerr_diefn(e, 5, x1, x2, x3, x4, x5)
#define strerr_dief6x(e, x1, x2, x3, x4, x5, x6) strerr_diefn(e, 6, x1, x2, x3, x4, x5, x6)
#define strerr_dief7x(e, x1, x2, x3, x4, x5, x6, x7) strerr_diefn(e, 7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_dief8x(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diefn(e, 8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_dief9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diefn(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_dief10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diefn(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_dief1sys(e, x1) strerr_diefnsys(e, 1, x1)
#define strerr_dief2sys(e, x1, x2) strerr_diefnsys(e, 2, x1, x2)
#define strerr_dief3sys(e, x1, x2, x3) strerr_diefnsys(e, 3, x1, x2, x3)
#define strerr_dief4sys(e, x1, x2, x3, x4) strerr_diefnsys(e, 4, x1, x2, x3, x4)
#define strerr_dief5sys(e, x1, x2, x3, x4, x5) strerr_diefnsys(e, 5, x1, x2, x3, x4, x5)
#define strerr_dief6sys(e, x1, x2, x3, x4, x5, x6) strerr_diefnsys(e, 6, x1, x2, x3, x4, x5, x6)
#define strerr_dief7sys(e, x1, x2, x3, x4, x5, x6, x7) strerr_diefnsys(e, 7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_dief8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diefnsys(e, 8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_dief9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diefnsys(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_dief10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diefnsys(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnwu1x(x1) strerr_warnwun(1, x1)
#define strerr_warnwu2x(x1, x2) strerr_warnwun(2, x1, x2)
#define strerr_warnwu3x(x1, x2, x3) strerr_warnwun(3, x1, x2, x3)
#define strerr_warnwu4x(x1, x2, x3, x4) strerr_warnwun(4, x1, x2, x3, x4)
#define strerr_warnwu5x(x1, x2, x3, x4, x5) strerr_warnwun(5, x1, x2, x3, x4, x5)
#define strerr_warnwu6x(x1, x2, x3, x4, x5, x6) strerr_warnwun(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnwu7x(x1, x2, x3, x4, x5, x6, x7) strerr_warnwun(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnwu8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnwun(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnwu9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnwun(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnwu10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnwun(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnwu1sys(x1) strerr_warnwunsys(1, x1)
#define strerr_warnwu2sys(x1, x2) strerr_warnwunsys(2, x1, x2)
#define strerr_warnwu3sys(x1, x2, x3) strerr_warnwunsys(3, x1, x2, x3)
#define strerr_warnwu4sys(x1, x2, x3, x4) strerr_warnwunsys(4, x1, x2, x3, x4)
#define strerr_warnwu5sys(x1, x2, x3, x4, x5) strerr_warnwunsys(5, x1, x2, x3, x4, x5)
#define strerr_warnwu6sys(x1, x2, x3, x4, x5, x6) strerr_warnwunsys(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnwu7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warnwunsys(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnwu8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnwunsys(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnwu9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnwunsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnwu10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnwunsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnfu1x(x1) strerr_warnfun(1, x1)
#define strerr_warnfu2x(x1, x2) strerr_warnfun(2, x1, x2)
#define strerr_warnfu3x(x1, x2, x3) strerr_warnfun(3, x1, x2, x3)
#define strerr_warnfu4x(x1, x2, x3, x4) strerr_warnfun(4, x1, x2, x3, x4)
#define strerr_warnfu5x(x1, x2, x3, x4, x5) strerr_warnfun(5, x1, x2, x3, x4, x5)
#define strerr_warnfu6x(x1, x2, x3, x4, x5, x6) strerr_warnfun(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnfu7x(x1, x2, x3, x4, x5, x6, x7) strerr_warnfun(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnfu8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnfun(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnfu9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnfun(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnfu10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnfun(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnfu1sys(x1) strerr_warnfunsys(1, x1)
#define strerr_warnfu2sys(x1, x2) strerr_warnfunsys(2, x1, x2)
#define strerr_warnfu3sys(x1, x2, x3) strerr_warnfunsys(3, x1, x2, x3)
#define strerr_warnfu4sys(x1, x2, x3, x4) strerr_warnfunsys(4, x1, x2, x3, x4)
#define strerr_warnfu5sys(x1, x2, x3, x4, x5) strerr_warnfunsys(5, x1, x2, x3, x4, x5)
#define strerr_warnfu6sys(x1, x2, x3, x4, x5, x6) strerr_warnfunsys(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnfu7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warnfunsys(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnfu8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnfunsys(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnfu9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnfunsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnfu10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnfunsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_diewu1x(e, x1) strerr_diewun(e, 1, x1)
#define strerr_diewu2x(e, x1, x2) strerr_diewun(e, 2, x1, x2)
#define strerr_diewu3x(e, x1, x2, x3) strerr_diewun(e, 3, x1, x2, x3)
#define strerr_diewu4x(e, x1, x2, x3, x4) strerr_diewun(e, 4, x1, x2, x3, x4)
#define strerr_diewu5x(e, x1, x2, x3, x4, x5) strerr_diewun(e, 5, x1, x2, x3, x4, x5)
#define strerr_diewu6x(e, x1, x2, x3, x4, x5, x6) strerr_diewun(e, 6, x1, x2, x3, x4, x5, x6)
#define strerr_diewu7x(e, x1, x2, x3, x4, x5, x6, x7) strerr_diewun(e, 7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_diewu8x(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diewun(e, 8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_diewu9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diewun(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_diewu10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diewun(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_diewu1sys(e, x1) strerr_diewunsys(e, 1, x1)
#define strerr_diewu2sys(e, x1, x2) strerr_diewunsys(e, 2, x1, x2)
#define strerr_diewu3sys(e, x1, x2, x3) strerr_diewunsys(e, 3, x1, x2, x3)
#define strerr_diewu4sys(e, x1, x2, x3, x4) strerr_diewunsys(e, 4, x1, x2, x3, x4)
#define strerr_diewu5sys(e, x1, x2, x3, x4, x5) strerr_diewunsys(e, 5, x1, x2, x3, x4, x5)
#define strerr_diewu6sys(e, x1, x2, x3, x4, x5, x6) strerr_diewunsys(e, 6, x1, x2, x3, x4, x5, x6)
#define strerr_diewu7sys(e, x1, x2, x3, x4, x5, x6, x7) strerr_diewunsys(e, 7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_diewu8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diewunsys(e, 8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_diewu9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diewunsys(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_diewu10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diewunsys(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_diefu1x(e, x1) strerr_diefun(e, 1, x1)
#define strerr_diefu2x(e, x1, x2) strerr_diefun(e, 2, x1, x2)
#define strerr_diefu3x(e, x1, x2, x3) strerr_diefun(e, 3, x1, x2, x3)
#define strerr_diefu4x(e, x1, x2, x3, x4) strerr_diefun(e, 4, x1, x2, x3, x4)
#define strerr_diefu5x(e, x1, x2, x3, x4, x5) strerr_diefun(e, 5, x1, x2, x3, x4, x5)
#define strerr_diefu6x(e, x1, x2, x3, x4, x5, x6) strerr_diefun(e, 6, x1, x2, x3, x4, x5, x6)
#define strerr_diefu7x(e, x1, x2, x3, x4, x5, x6, x7) strerr_diefun(e, 7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_diefu8x(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diefun(e, 8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_diefu9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diefun(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_diefu10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diefun(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_diefu1sys(e, x1) strerr_diefunsys(e, 1, x1)
#define strerr_diefu2sys(e, x1, x2) strerr_diefunsys(e, 2, x1, x2)
#define strerr_diefu3sys(e, x1, x2, x3) strerr_diefunsys(e, 3, x1, x2, x3)
#define strerr_diefu4sys(e, x1, x2, x3, x4) strerr_diefunsys(e, 4, x1, x2, x3, x4)
#define strerr_diefu5sys(e, x1, x2, x3, x4, x5) strerr_diefunsys(e, 5, x1, x2, x3, x4, x5)
#define strerr_diefu6sys(e, x1, x2, x3, x4, x5, x6) strerr_diefunsys(e, 6, x1, x2, x3, x4, x5, x6)
#define strerr_diefu7sys(e, x1, x2, x3, x4, x5, x6, x7) strerr_diefunsys(e, 7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_diefu8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diefunsys(e, 8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_diefu9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diefunsys(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_diefu10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diefunsys(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warni1x(x1) strerr_warnin(1, x1)
#define strerr_warni2x(x1, x2) strerr_warnin(2, x1, x2)
#define strerr_warni3x(x1, x2, x3) strerr_warnin(3, x1, x2, x3)
#define strerr_warni4x(x1, x2, x3, x4) strerr_warnin(4, x1, x2, x3, x4)
#define strerr_warni5x(x1, x2, x3, x4, x5) strerr_warnin(5, x1, x2, x3, x4, x5)
#define strerr_warni6x(x1, x2, x3, x4, x5, x6) strerr_warnin(6, x1, x2, x3, x4, x5, x6)
#define strerr_warni7x(x1, x2, x3, x4, x5, x6, x7) strerr_warnin(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warni8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnin(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warni9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnin(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warni10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnin(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warni1sys(x1) strerr_warninsys(1, x1)
#define strerr_warni2sys(x1, x2) strerr_warninsys(2, x1, x2)
#define strerr_warni3sys(x1, x2, x3) strerr_warninsys(3, x1, x2, x3)
#define strerr_warni4sys(x1, x2, x3, x4) strerr_warninsys(4, x1, x2, x3, x4)
#define strerr_warni5sys(x1, x2, x3, x4, x5) strerr_warninsys(5, x1, x2, x3, x4, x5)
#define strerr_warni6sys(x1, x2, x3, x4, x5, x6) strerr_warninsys(6, x1, x2, x3, x4, x5, x6)
#define strerr_warni7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warninsys(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warni8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warninsys(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warni9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warninsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warni10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warninsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnt1x(x1) strerr_warntn(1, x1)
#define strerr_warnt2x(x1, x2) strerr_warntn(2, x1, x2)
#define strerr_warnt3x(x1, x2, x3) strerr_warntn(3, x1, x2, x3)
#define strerr_warnt4x(x1, x2, x3, x4) strerr_warntn(4, x1, x2, x3, x4)
#define strerr_warnt5x(x1, x2, x3, x4, x5) strerr_warntn(5, x1, x2, x3, x4, x5)
#define strerr_warnt6x(x1, x2, x3, x4, x5, x6) strerr_warntn(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnt7x(x1, x2, x3, x4, x5, x6, x7) strerr_warntn(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnt8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warntn(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnt9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warntn(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnt10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warntn(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warnt1sys(x1) strerr_warntnsys(1, x1)
#define strerr_warnt2sys(x1, x2) strerr_warntnsys(2, x1, x2)
#define strerr_warnt3sys(x1, x2, x3) strerr_warntnsys(3, x1, x2, x3)
#define strerr_warnt4sys(x1, x2, x3, x4) strerr_warntnsys(4, x1, x2, x3, x4)
#define strerr_warnt5sys(x1, x2, x3, x4, x5) strerr_warntnsys(5, x1, x2, x3, x4, x5)
#define strerr_warnt6sys(x1, x2, x3, x4, x5, x6) strerr_warntnsys(6, x1, x2, x3, x4, x5, x6)
#define strerr_warnt7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warntnsys(7, x1, x2, x3, x4, x5, x6, x7)
#define strerr_warnt8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warntnsys(8, x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnt9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warntnsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define strerr_warnt10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warntnsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#endif
skalibs-2.14.2.0/src/include/skalibs/strerr2.h 0000664 0000000 0000000 00000000275 14630613211 0021005 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_STRERR2_H
#define SKALIBS_STRERR2_H
#include
#warning strerr2.h is now deprecated, use #include instead.
#endif
skalibs-2.14.2.0/src/include/skalibs/surf.h 0000664 0000000 0000000 00000001370 14630613211 0020356 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SURF_H
#define SKALIBS_SURF_H
#include
#include
typedef struct SURFSchedule SURFSchedule, *SURFSchedule_ref ;
struct SURFSchedule
{
uint32_t seed[32] ;
uint32_t in[12] ;
uint32_t pos ;
char out[32] ;
} ;
#define SURFSCHEDULE_ZERO { .seed = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .in = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .pos = 32, .out = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" }
extern void surf_init (SURFSchedule *, char const *) ; /* 160 chars */
extern void surf (SURFSchedule *, char *, size_t) ;
extern void autosurf (char *, size_t) ;
extern void autosurf_name (char *, size_t) ;
#endif
skalibs-2.14.2.0/src/include/skalibs/tai.h 0000664 0000000 0000000 00000013457 14630613211 0020165 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_TAI_H
#define SKALIBS_TAI_H
#include
#include
#include
#include
#include
typedef struct tai_s tai, *tai_ref ;
struct tai_s
{
uint64_t x ;
} ;
#define TAI_ZERO { 0 }
#define TAI_MAGIC ((uint64_t)4611686018427387904ULL)
#define TAI_EPOCH { TAI_MAGIC + 10UL }
#define TAI_INFINITE_RELATIVE { (uint64_t)1 << 61 }
#define TAI_INFINITE { TAI_MAGIC + ((uint64_t)1 << 61) }
#define tai_sec(t) ((t)->x)
extern int tai_u64 (tai *, uint64_t) ;
#define tai_unix(t, u) tai_u64(t, (TAI_MAGIC + (u)))
#define tai_uint(t, u) tai_u64(t, (uint64_t)(u))
extern int tai_now (tai *) ;
#define tai_relative_from_time(t, u) ((t)->x = (uint64_t)(u), 1)
#define tai_from_time(t, u) tai_unix(t, u)
#define tai_from_time_sysclock(t, u) tai_from_sysclock(t, (uint64_t)(u) + TAI_MAGIC)
extern int time_from_tai_relative (time_t *, tai const *) ;
extern int time_from_tai (time_t *, tai const *) ;
extern int time_sysclock_from_tai(time_t *, tai const *) ;
extern int tai_from_sysclock (tai *, uint64_t) ;
extern int sysclock_from_tai (uint64_t *, tai const *) ;
#define tai_approx(t) ((double)(tai_sec(t)))
extern int tai_add (tai *, tai const *, tai const *) ;
extern int tai_sub (tai *, tai const *, tai const *) ;
#define tai_less(t,u) (tai_sec(t) < tai_sec(u))
#define TAI_PACK 8
extern void tai_pack (char *, tai const *) ;
extern void tai_unpack (char const *, tai *) ;
extern void tai_pack_little (char *, tai const *) ;
extern void tai_unpack_little (char const *, tai *) ;
typedef struct tain_s tain, *tain_ref ;
struct tain_s
{
tai sec ;
uint32_t nano ; /* 0..999999999U */
} ;
#define TAIN_ZERO { TAI_ZERO, 0 }
#define TAIN_EPOCH { TAI_EPOCH, 0 }
#define TAIN_INFINITE { TAI_INFINITE, 0 }
#define TAIN_INFINITE_RELATIVE { TAI_INFINITE_RELATIVE, 0 }
#define TAIN_NANO500 { TAI_ZERO, 500 }
extern tain STAMP ; /* the global process wallclock */
extern tain const tain_zero ;
extern tain const tain_infinite_relative ;
extern tain const tain_infinite ;
extern tain const tain_nano500 ;
#define tain_sec(a) ((a)->sec)
#define tain_secp(a) (&(a)->sec)
#define tain_nano(a) ((a)->nano)
extern int tain_relative_from_timeval (tain *, struct timeval const *) ;
extern int tain_from_timeval (tain *, struct timeval const *) ;
extern int tain_from_timeval_sysclock (tain *, struct timeval const *) ;
extern int timeval_from_tain_relative (struct timeval *, tain const *) ;
extern int timeval_from_tain (struct timeval *, tain const *) ;
extern int timeval_sysclock_from_tain (struct timeval *, tain const *) ;
extern int tain_relative_from_timespec (tain *, struct timespec const *) ;
extern int tain_from_timespec (tain *, struct timespec const *) ;
extern int tain_from_timespec_sysclock (tain *, struct timespec const *) ;
extern int timespec_from_tain_relative (struct timespec *, tain const *) ;
extern int timespec_from_tain (struct timespec *, tain const *) ;
extern int timespec_sysclock_from_tain (struct timespec *, tain const *) ;
typedef int tain_clockread_func (tain *) ;
typedef tain_clockread_func *tain_clockread_func_ref ;
extern int tain_from_sysclock (tain *, tain const *) ;
extern int sysclock_from_tain (tain *, tain const *) ;
extern tain_clockread_func sysclock_get ;
extern tain_clockread_func tain_wallclock_read ;
#define tain_wallclock_read_g() tain_wallclock_read(&STAMP)
extern int tain_stopwatch_init (tain *, clock_t, tain *) ;
extern int tain_stopwatch_read (tain *, clock_t, tain const *) ;
#define tain_stopwatch_read_g(cl, offset) tain_stopwatch_read(&STAMP, (cl), offset)
extern tain_clockread_func_ref tain_now ;
#define tain_now_g() (*tain_now)(&STAMP)
#define tain_copynow(t) (*(t) = STAMP)
extern tain_clockread_func tain_now_set_wallclock ;
#define tain_now_set_wallclock_g() tain_now_set_wallclock(&STAMP)
extern tain_clockread_func tain_now_set_stopwatch ;
#define tain_now_set_stopwatch_g() tain_now_set_stopwatch(&STAMP)
extern int sysclock_set (tain const *) ;
extern int tain_setnow (tain const *) ;
extern double tain_approx (tain const *) gccattr_pure ;
extern double tain_frac (tain const *) gccattr_pure ;
extern int tain_from_millisecs (tain *, int) ;
extern int tain_to_millisecs (tain const *) gccattr_pure ;
extern int tain_add (tain *, tain const *, tain const *) ;
#define tain_add_g(deadline, tto) tain_add(deadline, &STAMP, tto)
extern int tain_addsec (tain *, tain const *, int) ;
#define tain_addsec_g(deadline, n) tain_addsec(deadline, &STAMP, n)
extern int tain_sub (tain *, tain const *, tain const *) ;
extern int tain_less (tain const *, tain const *) gccattr_pure ;
#define tain_future(deadline) tain_less(&STAMP, (deadline))
extern void tain_earliest1 (tain *, tain const *) ;
extern void tain_earliestv (tain *, tain const *const *, unsigned int) ;
#define tain_array(...) ((tain const *const[]){__VA_ARGS__})
#define tain_earliestn(t, n, ...) tain_earliestv(t, tain_array(__VA_ARGS__), (n))
#define tain_earliest(t, ...) tain_earliestn(t, sizeof(tain_array(__VA_ARGS__))/sizeof(tain const *), __VA_ARGS__)
#define TAIN_PACK 12
extern void tain_pack (char *, tain const *) ;
extern void tain_unpack (char const *, tain *) ;
extern void tain_pack_little (char *, tain const *) ;
extern void tain_unpack_little (char const *, tain *) ;
#define TAIN_FMT 25
extern size_t tain_fmt (char *, tain const *) ;
extern size_t tain_scan (char const *, tain *) ;
#define TAIN_FMTFRAC 19
extern size_t tain_fmtfrac (char *, tain const *) ;
#define tain_uint(a, u) tain_ulong(a, u)
extern int tain_ulong (tain *, unsigned long) ;
extern void tain_half (tain *, tain const *) ;
#define TIMESTAMP (1 + (TAIN_PACK << 1))
extern size_t timestamp_fmt (char *, tain const *) ;
extern size_t timestamp_scan (char const *, tain *) ;
extern int timestamp_r (char *, tain *) ;
extern int timestamp (char *) ;
#define timestamp_g(s) timestamp_fmt((s), &STAMP)
#endif
skalibs-2.14.2.0/src/include/skalibs/textclient.h 0000664 0000000 0000000 00000015574 14630613211 0021575 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_TEXTCLIENT_H
#define SKALIBS_TEXTCLIENT_H
#include
#include
#include
#include
#include
#include
/*
This is a simpler, smaller version of skaclient for basic cases:
- no fd-passing
- no asyncout
- no kolbak: client calls are always synchronous
- fixed-size buffers included in the client structure
*/
#define TEXTCLIENT_BUFSIZE 4096
#define TEXTCLIENT_OPTION_WAITPID 0x00000001U
/* Server-side functions */
extern int textclient_server_init (textmessage_receiver *, textmessage_sender *, textmessage_sender *, char const *, size_t, char const *, size_t, tain const *, tain *) ;
extern int textclient_server_init_frompipe (textmessage_receiver *, textmessage_sender *, textmessage_sender *, char const *, size_t, char const *, size_t, tain const *, tain *) ;
extern int textclient_server_init_fromsocket (textmessage_receiver *, textmessage_sender *, textmessage_sender *, char const *, size_t, char const *, size_t, tain const *, tain *) ;
#define textclient_server_init_g(in, syncout, asyncout, before, beforelen, after, afterlen, deadline) textclient_server_init(in, syncout, asyncout, before, beforelen, after, afterlen, (deadline), &STAMP)
#define textclient_server_init_frompipe_g(in, syncout, asyncout, before, beforelen, after, afterlen, deadline) textclient_server_init_frompipe(in, syncout, asyncout, before, beforelen, after, afterlen, (deadline), &STAMP)
#define textclient_server_init_fromsocket_g(in, syncout, asyncout, before, beforelen, after, afterlen, deadline) textclient_server_init_fromsocket(in, syncout, asyncout, before, beforelen, after, afterlen, (deadline), &STAMP)
#define textclient_server_01x_init(before, beforelen, after, afterlen, deadline, stamp) textclient_server_init(textmessage_receiver_0, textmessage_sender_1, textmessage_sender_x, before, beforelen, after, afterlen, deadline, stamp)
#define textclient_server_01x_init_frompipe(before, beforelen, after, afterlen, deadline, stamp) textclient_server_init_frompipe(textmessage_receiver_0, textmessage_sender_1, textmessage_sender_x, before, beforelen, after, afterlen, deadline, stamp)
#define textclient_server_01x_init_fromsocket(before, beforelen, after, afterlen, deadline, stamp) textclient_server_init_fromsocket(textmessage_receiver_0, textmessage_sender_1, textmessage_sender_x, before, beforelen, after, afterlen, deadline, stamp)
#define textclient_server_01x_init_g(before, beforelen, after, afterlen, deadline) textclient_server_01x_init(before, beforelen, after, afterlen, (deadline), &STAMP)
#define textclient_server_01x_init_frompipe_g(before, beforelen, after, afterlen, deadline) textclient_server_01x_init_frompipe(before, beforelen, after, afterlen, (deadline), &STAMP)
#define textclient_server_01x_init_fromsocket_g(before, beforelen, after, afterlen, deadline) textclient_server_01x_init_fromsocket(before, beforelen, after, afterlen, (deadline), &STAMP)
/* User structure */
typedef struct textclient_s textclient, *textclient_ref ;
struct textclient_s
{
textmessage_sender syncout ;
textmessage_receiver syncin ;
textmessage_receiver asyncin ;
pid_t pid ;
uint32_t options ;
char syncbuf[TEXTCLIENT_BUFSIZE] ;
char asyncbuf[TEXTCLIENT_BUFSIZE] ;
} ;
#define TEXTCLIENT_ZERO { .syncout = TEXTMESSAGE_SENDER_ZERO, .syncin = TEXTMESSAGE_RECEIVER_ZERO, .asyncin = TEXTMESSAGE_RECEIVER_ZERO, .pid = 0, .options = 0 }
extern textclient const textclient_zero ;
/* Starting and ending */
extern void textclient_end (textclient *) ;
extern int textclient_start (textclient *, char const *, uint32_t, char const *, size_t, char const *, size_t, tain const *, tain *) ;
extern int textclient_startf (textclient *, char const *const *, char const *const *, uint32_t, char const *, size_t, char const *, size_t, tain const *, tain *) ;
#define textclient_start_g(a, path, options, before, beforelen, after, afterlen, deadline) textclient_start(a, path, options, before, beforelen, after, afterlen, (deadline), &STAMP)
#define textclient_startf_g(a, argv, envp, options, before, beforelen, after, afterlen, deadline) textclient_startf_b(a, argv, envp, options, before, beforelen, after, afterlen, (deadline), &STAMP)
/* Writing */
#define textclient_put(a, s, len) textmessage_sender_put(&(a)->syncout, s, len)
#define textclient_putv(a, v, n) textmessage_sender_putv(&(a)->syncout, v, n)
#define textclient_flush(a) textmessage_sender_flush(&(a)->syncout)
#define textclient_timed_flush(a, deadline, stamp) textmessage_sender_timed_flush(&(a)->syncout, deadline, stamp)
#define textclient_timed_flush_g(a, deadline) textclient_timed_flush(a, (deadline), &STAMP)
#define textclient_send(a, s, len) textmessage_send(&(a)->syncout, s, len)
#define textclient_sendv(a, v, n) textmessage_sendv(&(a)->syncout, v, n)
#define textclient_timed_send(a, s, len, deadline, stamp) textmessage_timed_send(&(a)->syncout, s, len, deadline, stamp)
#define textclient_timed_sendv(a, v, n, deadline, stamp) textmessage_timed_sendv(&(a)->syncout, v, n, deadline, stamp)
#define textclient_timed_send_g(a, s, len, deadline) textclient_timed_send(a, s, len, (deadline), &STAMP)
#define textclient_timed_sendv_g(a, v, n, deadline) textclient_timed_sendv(a, v, n, (deadline), &STAMP)
/* Sync reading */
#define textclient_get(a, v) textmessage_receive(&(a)->syncin, v)
#define textclient_timed_get(a, v, deadline, stamp) (sanitize_read(textmessage_timed_receive(&(a)->syncin, v, deadline, stamp)) > 0)
#define textclient_timed_get_g(a, v, deadline) textclient_timed_get(a, v, (deadline), &STAMP)
/* Sync writing+reading */
#define textclient_exchange(a, s, len, ans, deadline, stamp) (textclient_timed_send(a, s, len, deadline, stamp) && textclient_timed_get(a, ans, deadline, stamp))
#define textclient_exchangev(a, v, n, ans, deadline, stamp) (textclient_timed_sendv(a, v, n, deadline, stamp) && textclient_timed_get(a, ans, deadline, stamp))
#define textclient_exchange_g(a, s, len, ans, deadline) textclient_exchange(a, s, len, ans, (deadline), &STAMP)
#define textclient_exchangev_g(a, v, n, ans, deadline) textclient_exchangev(a, v, n, ans, (deadline), &STAMP)
extern int textclient_command (textclient *, char const *, size_t, tain const *, tain *) ;
extern int textclient_commandv (textclient *, struct iovec const *, unsigned int, tain const *, tain *) ;
#define textclient_command_g(a, s, len, deadline) textclient_command(a, s, len, (deadline), &STAMP)
#define textclient_commandv_g(a, v, n, deadline) textclient_commandv(a, v, n, (deadline), &STAMP)
/* Async reading */
#define textclient_fd(a) textmessage_receiver_fd(&(a)->asyncin)
#define textclient_update(a, f, p) textmessage_handle(&(a)->asyncin, f, p)
#define textclient_timed_update(a, f, p, deadline, stamp) textmessage_timed_handle(&(a)->asyncin, f, p, deadline, stamp)
#define textclient_timed_update_g(a, f, p, deadline) textclient_timed_update(a, f, p, (deadline), &STAMP)
#endif
skalibs-2.14.2.0/src/include/skalibs/textmessage.h 0000664 0000000 0000000 00000010631 14630613211 0021730 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_TEXTMESSAGE_H
#define SKALIBS_TEXTMESSAGE_H
#include
#include
#include
#include