pax_global_header 0000666 0000000 0000000 00000000064 13553351154 0014517 g ustar 00root root 0000000 0000000 52 comment=a1cc5ca8aa7b72eedd88d57e8e9b09a68f7c63a1
skalibs-2.9.1.0/ 0000775 0000000 0000000 00000000000 13553351154 0013316 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/.gitignore 0000664 0000000 0000000 00000000412 13553351154 0015303 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.9.1.0/AUTHORS 0000664 0000000 0000000 00000002433 13553351154 0014370 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
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
skalibs-2.9.1.0/COPYING 0000664 0000000 0000000 00000001370 13553351154 0014352 0 ustar 00root root 0000000 0000000 Copyright (c) 2011-2019 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.9.1.0/INSTALL 0000664 0000000 0000000 00000015413 13553351154 0014353 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: the 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:
http://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
./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.9.1.0/Makefile 0000664 0000000 0000000 00000014067 13553351154 0014766 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)))))"
fail := $(error Your make ($(MAKE_VERSION)) is too old. You need $(make_need) or newer)
endif
CC = $(error Please use ./configure first)
-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: $(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 -R .note.GNU-stack $(STATIC_LIBS)
endif
ifneq ($(strip $(SHARED_LIBS)),)
exec $(STRIP) -R .note -R .comment -R .note.GNU-stack $(SHARED_LIBS)
endif
install: install-data install-sysdeps install-dynlib install-lib install-include
install-data: $(ALL_DATA:src/etc/%=$(DESTDIR)$(datadir)/%)
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)$(home)/library.so/lib%.so.$(version_M)
exec $(INSTALL) -D -l ..$(subst $(sproot),,$(exthome))/library.so/$( $@
src/include/$(package)/uint16.h: $(sysdeps)/sysdeps 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/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/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)/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.9.1.0/NEWS 0000664 0000000 0000000 00000011347 13553351154 0014023 0 ustar 00root root 0000000 0000000 Changelog for skalibs.
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.9.1.0/README 0000664 0000000 0000000 00000001207 13553351154 0014176 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.9.1.0/README.macos 0000664 0000000 0000000 00000000243 13553351154 0015276 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.9.1.0/README.solaris 0000664 0000000 0000000 00000000653 13553351154 0015655 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.9.1.0/configure 0000775 0000000 0000000 00000047110 13553351154 0015230 0 ustar 00root root 0000000 0000000 #!/bin/sh
cd `dirname "$0"`
. package/info
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 "$2" -c -o /dev/null "$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 -nostdlib "$2" -o /dev/null "$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 -qF "${1}: " "$tmps" ; then
v=`grep -F "${1}: " "$tmps" | tail -n 1 | awk '{print $2;}'`
echo "${1}: $v" >> "$sysdeps/sysdeps"
echo " ... user-provided: $v"
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 try$name.o -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 try$name.o $libs 2>/dev/null || r=false ;;
esac
fi
if $r ; then
case "$what" in
*r*) if test -n "$cross" ; then
rm -f try$name.o 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.o 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 "$tmpe" -c "$1" 2>/dev/null
r=$?
rm -f "$tmpe"
return $r
}
tryendianness () {
echo "Checking endianness..."
if iscached endianness ; then return ; fi
for i in endian.h sys/endian.h machine/endian.h ; do
cat > "$tmpc" <
int a = 1 ;
EOF
if trybasic "$tmpc" ; then
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 a-z A-Z`
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"
fi
done
rm -f "$tmpc"
fail "$0: error: unable to determine endianness: no 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"
}
trylibs () {
args=
name=$1
echo "Checking whether system has $2..." >&3
shift 2
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 /dev/null try$name.o $args 2>/dev/null ; do
if test -z "$*" ; then
rm -f try$name.o
echo
echo " ... no" >&3
return 1
fi
args="$args $1"
shift
done
echo ${args# }
if test -z "$args" ; then
echo " ... yes" >&3
else
echo " ... yes, with$args" >&3
fi
rm -f try$name.o
return 0
else
echo
echo " ... no" >&3
return 1
fi
}
# Actual script
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'
datadir='$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=
for arg ; do
case "$arg" in
--help) usage ;;
--prefix=*) prefix=${arg#*=} ;;
--dynlibdir=*) dynlibdir=${arg#*=} ;;
--libdir=*) libdir=${arg#*=} ;;
--includedir=*) includedir=${arg#*=} ;;
--datadir=*) datadir=${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#--with-sysdep-}=no" ;;
--enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
--host=*|--target=*) target=${arg#*=} ;;
--build=*) build=${arg#*=} ;;
-* ) echo "$0: unknown option $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 datadir sysdepdir sysdepspre sproot ; do
eval tmp=\${$i}
eval $i=$tmp
stripdir $i
done
# Get usable temp filenames
i=0
set -C
while : ; do
i=$(($i+1))
tmpc="./tmp-configure-$$-$PPID-$i.c"
tmpe="./tmp-configure-$$-$PPID-$i.tmp"
tmps="./tmp-configure-$$-$PPID-$i.sysdeps"
2>|/dev/null > "$tmpc" && break
2>|/dev/null > "$tmpe" && break
test "$i" -gt 50 && fail "$0: cannot create temporary files"
done
set +C
trap 'rm -f "$tmpc" "$tmpe" "$tmps"' EXIT ABRT INT QUIT TERM HUP
# 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
# 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 /dev/null "$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"
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 CFLAGS_AUTO -Wa,--noexecstack
tryflag CFLAGS -fno-stack-protector
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,--sort-section=alignment
tryldflag LDFLAGS_AUTO -Wl,--sort-common
if $shared ; then
tryldflag LDFLAGS -Wl,--hash-style=both
fi
rm -f "$tmps"
if test -n "$sysdeplist" ; then
:> "$tmps"
for i in $sysdeplist ; do
k=${i%%=*}
v=${i#*=}
if test "$v" = "true" ; then v=yes
elif test "$v" = "false" ; then v=no
fi
if grep -qF -e "${k}: " "$tmps" ; then
grep -vF -e "${k}: " "$tmps" > "$tmpe"
mv -f "$tmpe" "$tmps"
fi
echo "${k}: $v" >> "$tmps"
done
fi
sysdeps=sysdeps.cfg
mkdir -p $sysdeps
echo "$target" > $sysdeps/target
:> "$sysdeps/sysdeps"
exec 3>&1
util_lib=
echo > $sysdeps/util.lib
socket_lib=`trylibs lsock 'accessible socket functions' -lsocket -lnsl` || fail "$0: unable to determine socket.lib sysdep"
echo "$socket_lib" > $sysdeps/socket.lib
hasclock=yes
sysclock_lib=`trylibs clockrt 'clock_gettime()' -lrt` || hasclock=no
echo "$sysclock_lib" > $sysdeps/sysclock.lib
echo "clockrt: $hasclock" >> $sysdeps/sysdeps
choose cl clockmon CLOCK_MONOTONIC $sysclock_lib
choose cl clockboot CLOCK_BOOTTIME $sysclock_lib
hasspawn=yes
spawn_lib=`trylibs posixspawn 'posix_spawn()' -lrt` || hasspawn=no
echo "$spawn_lib" > $sysdeps/spawn.lib
echo "posixspawn: $hasspawn" >> $sysdeps/sysdeps
hastimer=yes
timer_lib=`trylibs timer 'timer_create()' -lrt` || hastimer=no
echo "$timer_lib" > $sysdeps/timer.lib
echo "timer: $hastimer" >> $sysdeps/sysdeps
exec 3>&-
tryendianness
trytypes
choose cl accept4 'accept4()'
choose c cmsgcloexec 'MSG_CMSG_CLOEXEC'
choose cl dirfd 'dirfd()'
choose cl eventfd 'eventfd()'
choose cl flock 'flock()'
choose cl getrandom 'getrandom()'
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 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 cl strcasestr 'strcasestr()'
choose c strnlen 'strnlen()'
choose c uint64t 'uint64_t'
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()'
# And here are the evil irreducible sysdeps.
choose clr devurandom '/dev/urandom'
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
datadir := $datadir
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.9.1.0/doc/ 0000775 0000000 0000000 00000000000 13553351154 0014063 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/doc/crosscompile.html 0000664 0000000 0000000 00000006636 13553351154 0017466 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.9.0.0, there is only one such sysdep, named devurandom,
and the value should be yes if the target has a valid
pseudorandom generation device in /dev/urandom, and no
otherwise.
skalibs-2.9.1.0/doc/djblegacy.html 0000664 0000000 0000000 00000012752 13553351154 0016704 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.9.1.0/doc/flags.html 0000664 0000000 0000000 00000020411 13553351154 0016043 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.
--enable-clock
The Open Group Base Specifications, issue 7, describes gettimeofday()
as obsolescent, and recommends the use of
clock_gettime()
with the CLOCK_REALTIME option instead. However:
- clock_gettime() is not as portable; for instance, Darwin does not have it.
- On most systems, using the clock_ functions requires linking with librt,
which is slightly inconvenient - and silly if all you want is timestamping.
If --enable-clock is set, the tain_now()
and tain_setnow() functions for getting and setting time will be based on
the clock_gettime() and clock_settime() functions.
Otherwise, the old-school gettimeofday()
and settimeofday() interfaces will be used. This is the default,
and it's usually safe.
--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:/usr/sbin:/bin:/sbin, which is usually safe.
skalibs-2.9.1.0/doc/index.html 0000664 0000000 0000000 00000010277 13553351154 0016067 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.9.1.0/doc/libbiguint/ 0000775 0000000 0000000 00000000000 13553351154 0016213 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/doc/libbiguint/index.html 0000664 0000000 0000000 00000023645 13553351154 0020222 0 ustar 00root root 0000000 0000000
skalibs: the biguint library interface
libskarnet
skalibs
Software
www.skarnet.org
The biguint library interface
biguint is set of simple primitives performing arithmetical
operations on (unsigned) integers of arbitrary length. It is nowhere
near as powerful or efficient as specialized,
assembly language-optimized libraries such as
GMP, but it has the advantages
of smallness and simplicity.
Compiling
- Use #include <skalibs/biguint.h>
Programming
You should refer to the skalibs/biguint.h header for the exact function
prototypes.
Definitions
- A biguint x is a pointer to an array u
of uint32_t, together with an unsigned integer n called its length.
x = (2^32)^0 * u[0] + (2^32)^1 * u[1] + ... + (2^32)^(n-1) * u[n-1].
- Every u[i] is called a limb.
- The greatest integer i lesser than n for which
u[i] is non-zero is called the order of x. The
order of zero is 0.
Basic operations
Creating a biguint
Just declare uint32_t x[n] ; - n being the length of the
biguint. You could also allocate x in the heap, possibly using a
uint32_t genalloc. In the following,
a biguint is always referred to as a uint32_t * with its
unsigned int length ; it must always be pre-allocated.
If an operation fails because a biguint's length n is too small to
accommodate the result, the function will write the first (i.e. least significant)
n limbs of the result, truncating it, then return 0 with errno set to
EOVERFLOW.
Setting it to zero
uint32_t *x ;
unsigned int n ;
bu_zero(x, n) ;
bu_zero() sets the first n limbs of x to zero.
Copying a biguint
uint32_t const *x ;
unsigned int xn ;
uint32_t *y ;
unsigned int yn ;
bu_copy(y, yn, x, xn) ;
bu_copy() copies x to y, setting higher limbs of y
to zero if needed. It then returns 1. If y is too small to contain x,
the function returns 0 EOVERFLOW.
Calculating the order
uint32_t const *x ;
unsigned int n ;
unsigned int r ;
r = bu_len(x, n) ;
bu_len() outputs the order of x of length n.
0 <= r <= n.
Comparing two biguints
uint32_t const *a ;
unsigned int an ;
uint32_t const *b ;
unsigned int bn ;
int r ;
r = bu_cmp(a, an, b, bn) ;
bu_cmp() returns -1 if a < b, 1 if
a > b, and 0 if a = b.
I/O operations
Writing a biguint as an array of bytes
char *s ;
uint32_t const *x ;
unsigned int n ;
bu_pack(s, x, n) ;
bu_pack_big(s, x, n) ;
bu_pack() writes 4*n bytes to s. The bytes
are a little-endian representation of x.
bu_pack_big() is the same, with a big-endian representation.
Reading a biguint from an array of bytes
char const *s ;
uint32_t *x ;
unsigned int n ;
bu_unpack(s, x, n) ;
bu_unpack_big(s, x, n) ;
bu_unpack() reads 4*n little-endian bytes from s
and writes them into the corresponding biguint x.
bu_unpack_big() is the same, but the bytes are interpreted as
big-endian.
Formatting a biguint for readable output
char *s ;
uint32_t const *x ;
unsigned int n ;
bu_fmt(s, x, n) ;
bu_fmt() writes x in s as a standard big-endian
hexadecimal number. x is considered of length n, so
8*n bytes will be written to s, even if it x
starts with zeros. bu_fmt returns the number of bytes written.
Reading a biguint from readable format
char const *s ;
uint32_t *x ;
unsigned int xn ;
unsigned int z ;
unsigned int len ;
len = bu_scanlen(s, &z) ;
bu_scan(s, len, x, xn, z) ;
bu_scanlen() scans s for a biguint written as a hexadecimal
number and returns the number of
bytes read. The reading stops at the first byte encountered that is not
in the 0-9, A-F or a-f range. The z integer then contains the
number of bytes excluding leading zeros.
If x has not been allocated yet, you can use xn = bitarray_div8(z)
(if you have included the bitarray.h header)
and allocate x with length xn.
bu_scan() then reads len bytes from s, assuming
there are z significant bytes (i.e. not leading zeros); it writes
the resulting biguint into x of length xn. It returns 1,
except if xn is too small, in which case it returns 0 EOVERFLOW.
Arithmetic operations
Addition
uint32_t const *a ;
unsigned int an ;
uint32_t const *b ;
unsigned int bn ;
uint32_t *c ;
unsigned int cn ;
unsigned char carrybefore ;
unsigned char carryafter ;
bu_add(c, cn, a, an, b, bn) ;
bu_sub(c, cn, a, an, b, bn) ;
bu_add() adds a and b, and puts the result
into c. It returns 1 unless it has to truncate it.
bu_sub() substracts b from a, and puts the
result into c. If the result should be negative, then it is
written as (2^32)^cn - c and the function returns 0 EOVERFLOW.
Multiplication
uint32_t const *a ;
unsigned int an ;
uint32_t const *b ;
unsigned int bn ;
uint32_t *c ;
unsigned int cn ;
bu_mul(c, cn, a, an, b, bn) ;
bu_mul() computes c=a*b.
Make sure that cn ≥ bu_len(a, an) + bu_len(b, bn).
If it is not the case, the result will be truncated and bu_mul will return
0 EOVERFLOW.
Division
uint32_t const *a ;
unsigned int an ;
uint32_t const *b ;
unsigned int bn ;
uint32_t *q ;
unsigned int qn ;
uint32_t *r ;
unsigned int rn ;
bu_div(a, an, b, bn, q, qn, r, rn) ;
bu_mod(r, rn, b, bn) ;
bu_div() computes q, the quotient, and r, the
remainder, of a divided by b. If b is zero, it
returns 0 EDOM. If qn or rn is to small to store the
quotient or the remainder, it returns 0 EOVERFLOW.
bu_mod() computes only the remainder, and stores it in-place.
GCD
uint32_t *r ;
unsigned int rn ;
uint32_t const *a ;
unsigned int an ;
uint32_t const *b ;
unsigned int bn ;
bu_gcd(r, rn, a, an, b, bn) ;
bu_gcd() computes the greatest common divisor between a
and b, and stores it into r. It returns 1 if all went well.
Note that this function iterates on divisions, so it might use a non totally
negligible amount of CPU time.
Left-shifts and right-shifts
uint32_t *x ;
unsigned int xn ;
unsigned char carryafter ;
unsigned char carrybefore ;
carryafter = bu_slbc(x, xn, carrybefore) ;
carryafter = bu_srbc(x, xn, carrybefore) ;
bu_slbc() computes x <<= 1.
The least significant bit of x is then set to
carrybefore. bu_slbc() returns the
previous value of x's most significant bit.
bu_srbc() computes x >>= 1.
The most significant bit of x is then set to
carrybefore. bu_slbc() returns the
previous value of x's least significant bit.
bu_slb(x, n) and bu_srb(x, n) are macros for
respectively bu_slbc(x, n, 0) and bu_srbc(x, n, 0).
Modular operations
uint32_t const *a ;
unsigned int an ;
uint32_t const *b ;
unsigned int bn ;
uint32_t *c ;
unsigned int cn ;
uint32_t const *m ;
unsigned int mn ;
bu_addmod(c, cn, a, an, b, bn, m, mn) ;
bu_submod(c, cn, a, an, b, bn, m, mn) ;
bu_mulmod(c, cn, a, an, b, bn, m, mn) ;
bu_divmod(c, cn, a, an, b, bn, m, mn) ;
bu_invmod(c, cn, m, mn) ;
bu_addmod() computes c = (a+b) mod m.
bu_submod() computes c = (a-b) mod m.
bu_mulmod() computes c = (a*b) mod m.
a and b must already be numbers modulo m.
The functions return 1 if all went well.
bu_divmod() computes a divided by b modulo
m and stores it into c.
bu_invmod() computes the inverse of c modulo m
and stores it into c.
The divisor and m must be relatively prime, else
those functions return 0 EDOM.
The algorithm for modular division and inversion is due to
Sheueling
Chang Shantz.
skalibs-2.9.1.0/doc/libdatastruct/ 0000775 0000000 0000000 00000000000 13553351154 0016730 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/doc/libdatastruct/genqdyn.html 0000664 0000000 0000000 00000011252 13553351154 0021264 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 den, 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_init (genqdyn *g, size_t esize, unsigned int den, 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.
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.9.1.0/doc/libdatastruct/index.html 0000664 0000000 0000000 00000002772 13553351154 0020735 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.9.1.0/doc/libposixplz/ 0000775 0000000 0000000 00000000000 13553351154 0016442 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/doc/libposixplz/index.html 0000664 0000000 0000000 00000002160 13553351154 0020436 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.9.1.0/doc/librandom/ 0000775 0000000 0000000 00000000000 13553351154 0016032 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/doc/librandom/index.html 0000664 0000000 0000000 00000007545 13553351154 0020042 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.9.1.0/doc/libskarnet.html 0000664 0000000 0000000 00000011374 13553351154 0017115 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
- libbiguint: large integer arithmetic
skalibs-2.9.1.0/doc/libstdcrypto/ 0000775 0000000 0000000 00000000000 13553351154 0016605 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/doc/libstdcrypto/index.html 0000664 0000000 0000000 00000007706 13553351154 0020614 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.9.1.0/doc/libstddjb/ 0000775 0000000 0000000 00000000000 13553351154 0016024 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/doc/libstddjb/alarm.html 0000664 0000000 0000000 00000006604 13553351154 0020014 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_t 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_t, i.e. a structure containing
a relative TAIN64 time.
Returns 1 on success and 0 (and sets errno) on failure.
int alarm_deadline (tain_t 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.9.1.0/doc/libstddjb/alloc.html 0000664 0000000 0000000 00000007327 13553351154 0020015 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
char *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). Though the pointer type
is char *, the block of memory is correctly aligned for any type
of object. If len is 0, the function returns a 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.
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.9.1.0/doc/libstddjb/allreadwrite.html 0000664 0000000 0000000 00000012725 13553351154 0021400 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 iofunc_t (int fd, char *buf, size_t len)
This is the simplified type of IO functions such as
read()
and
write().
typedef size_t alliofunc_t (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.)
size_t allreadwrite (iofunc_t *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.
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_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. EOF is reported as EPIPE.
size_t allwrite (int fd, char const *s, size_t len)
Equivalent to allreadwrite((iofunc_t *)&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.
skalibs-2.9.1.0/doc/libstddjb/bitarray.html 0000664 0000000 0000000 00000012031 13553351154 0020524 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.9.1.0/doc/libstddjb/bufalloc.html 0000664 0000000 0000000 00000001575 13553351154 0020511 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.9.1.0/doc/libstddjb/buffer.html 0000664 0000000 0000000 00000001560 13553351154 0020165 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.9.1.0/doc/libstddjb/bytestr.html 0000664 0000000 0000000 00000001567 13553351154 0020417 0 ustar 00root root 0000000 0000000
skalibs: the bytestr header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/bytestr.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libstddjb/cdb.html 0000664 0000000 0000000 00000001572 13553351154 0017447 0 ustar 00root root 0000000 0000000
skalibs: the cdb header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/cdb.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libstddjb/cdb_make.html 0000664 0000000 0000000 00000001616 13553351154 0020443 0 ustar 00root root 0000000 0000000
skalibs: the cdb_make header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/cdb_make.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libstddjb/direntry.html 0000664 0000000 0000000 00000001612 13553351154 0020552 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.9.1.0/doc/libstddjb/djbtime.html 0000664 0000000 0000000 00000014726 13553351154 0020342 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_t and tain_t 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_t.
- TAI time with more precision is represented as a tain_t.
- 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_t structure, containing a struct tm tm
field and an unsigned long nano field.
Functions
UTC
int utc_from_tai (uint64_t *u, tai_t 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 *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_t 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_t *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_t 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 *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_t type to hold both
a broken-down time and a nanosecond count:
typedef struct localtmn_s localtmn_t, *localtmn_t_ref ;
struct localtmn_s
{
struct tm tm ;
uint32_t nano ;
} ;
The prototypes are self-explaining:
int localtmn_from_tain (localtmn_t *tmn, tain_t const *a, int lo) ;
int tain_from_localtmn (tain_t *a, localtmn_t const *tmn) ;
int localtmn_from_sysclock (localtmn_t *tmn, tain_t const *a, int lo) ;
int sysclock_from_localtmn (tain_t *a, localtmn_t const *tmn) ;
skalibs-2.9.1.0/doc/libstddjb/djbunix.html 0000664 0000000 0000000 00000100003 13553351154 0020347 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().
int 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:
size_t fd_catn (int from, int to, size_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.
int lock_ex (int fd)
Gets an exclusive advisory lock on fd. fd must point to
a regular file, open for writing. Blocks until the lock can be obtained.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int lock_exnb (int fd)
Gets an exclusive advisory lock on fd. fd must point to
a regular file, open for writing.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails. If the lock
is held and the function would block, it immediately returns with -1 EWOULDBLOCK.
int lock_sh (int fd)
Gets a shared advisory lock on fd. fd must point to
a regular file, open for reading. Blocks until the lock can be obtained.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
int lock_shnb (int fd)
Gets a shared advisory lock on fd. fd must point to
a regular file, open for reading.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails. If the lock
is held and the function would block, it immediately returns with -1 EWOULDBLOCK.
int lock_un (int fd)
Releases a previously held lock on fd.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
void lock_unx (int fd)
Like lock_un, but without a return code and without
modifying errno.
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)
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 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 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 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 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 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 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 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.
Executable search and execution, and environment
void execvep_loose (char const *file, char const *const *argv, char const *const *envp, char const *path)
Executes into the executable file at file, with the command line
set to argv and the environment set to envp.
If file is not an absolute path, it is searched in the
path string, which must contain a colon-separated list of
search directories such as the contents of the PATH environment variable.
The function returns if it fails, and sets errno to the most relevant
error that happened.
void execvep (char const *file, char const *const *argv, char const *const *envp, char const *path)
Like execvep_loose(), but if file contains a slash,
it is treated as an absolute path.
void pathexec_run (char const *file, char const *const *argv, char const *const *envp)
Performs execvep(file, argv, envp, path), path being the
contents of the PATH environment variable. If PATH is not set, path
is set to the value given to the --with-default-path option of the
skalibs' ./configure script, or to /usr/bin:/bin by default.
The function returns if it fails, and sets errno appropriately.
pathexec_run() is the standard skalibs API to perform an
exec call with a path search. It is recommended that you use
it instead of the Single Unix
execvp() or
execlp()
functions, because execvp and execlp default to execution of
the /bin/sh interpreter with file as an argument if they
cannot find a suitable executable file, and this is:
- a security risk,
- probably not what you want.
execvep() and pathexec_run() just fail with ENOENT
when they cannot find a file to exec into, which is the
sensible behaviour.
void pathexec0_run (char const *const *argv, char const *const *envp)
Performs pathexec_run(argv[0], argv, envp). If argv is empty, i.e.
argv[0] is null, the process exits 0 instead. Rationale: executing
the empty command line should amount to executing true, i.e.
simply exiting 0.
void pathexec_r_name (char const *file, char const *const *argv, char const *const *envp, size_t envlen, char const *modifs, size_t modiflen)
Alters envp (which does not have to be NULL-terminated, but the
number envlen of elements must be provided) with the modifier
string modifs of length modiflen, then performs
pathexec_run(file, argv, altered-envp).
void pathexec_r (char const *const *argv, char const *const *envp, size_t envlen, char const *modifs, size_t modiflen)
Same as pathexec_r_name, except that the file argument is read from argv[0].
int pathexec_env (char const *var, char const *value)
Adds the "add variable var with value value" instruction
(if value is not null) or the "unset var" instruction
(if value is null) to a static hidden modifier string, used by the
following three functions.
Returns 1 if it succeeds and 0 (and sets errno) if it fails.
void pathexec_fromenv (char const *const *argv, char const *const *envp, size_t envlen)
Performs pathexec_r() with the given arguments and the hidden modifier
string.
void pathexec (char const *const *argv)
Executes into the argv command line, with the current environment
modified by the hidden modifier string.
void pathexec0 (char const *const *argv)
Executes into the argv command line, with the current environment
modified by the hidden modifier string. If this command line is empty,
exit 0 instead.
void xexecvep (char const *, char const *const *, char const *const *, char const *)
void xpathexec_r (char const *const *, char const *const *, size_t, char const *, size_t)
void xpathexec_r_name (char const *, char const *const *, char const *const *, size_t, char const *, size_t)
void xpathexec_fromenv (char const *const *, char const *const *, size_t)
void xpathexec_run (char const *, char const *const *, char const *const *)
void xpathexec0_run (char const *const *, char const *const *)
void xpathexec (char const *const *)
void xpathexec0 (char const *const *)
Those functions provide the same functionality as the non-x-prefixed versions,
but if the execution fails (i.e. the process cannot exec into a new program), then
the process dies with a 111 exit code and an error message on stderr.
The env library interface provides additional functions
to manipulate modifier strings and environments.
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.
pid_t child_spawn0 (char const *file, char const *const *argv, char const *const *envp)
Forks and executes a child as with pathexec_run(file, argv, envp).
Returns 0 if it fails, and the pid of the child if it succeeds.
Implemented via posix_spawn()
on systems that support it.
pid_t child_spawn1_pipe (char const *file, char const *const *argv, char const *const *envp, int *fd, int w)
Like child_spawn0(), except that 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_spawn0, except that a socket 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)
Like child_spawn0(), except that 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 writes 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_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 child_spawn0, except
all ignored signals will be un-ignored in the child
- 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 (starting on fds[0])
and write on odd-numbered ones.
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_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.
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 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. If that number is not n, errno is set to EPIPE.
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_unsafe_internal (char const *file, char const *s, size_t len, dev_t *dev, ino_t *ino, int dosync)
Writes the n bytes stored at s into file file.
The previous contents of file are destroyed even if the function
fails. If dosync is nonzero, the new contents of file
are synced to disk before the function returns. If dev and ino
are not null, they're used to store the device and inode number of file.
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)
int openwritenclose_unsafe_devino (char const *file, char const *s, size_t len, dev_t *dev, ino_t *ino)
int openwritenclose_unsafe_devino_sync (char const *file, char const *s, size_t len, dev_t *dev, ino_t *ino)
Trivial shortcuts around openwritenclose_unsafe_internal(). The
reader can easily figure out what they do.
int openwritenclose_suffix_internal (char const *file, char const *s, size_t len, dev_t *dev, ino_t *ino, int dosync, 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 dosync is nonzero, the new contents of filesuffix
are synced to disk before the atomic replace. If dev and ino
are not null, they're used to store the device and inode number of file.
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)
int openwritenclose_suffix_devino (char const *file, char const *s, size_t len, dev_t *dev, ino_t *ino, char const *suffix)
int openwritenclose_suffix_devino_sync (char const *file, char const *s, size_t len, dev_t *dev, ino_t *ino, char const *suffix)
Trivial shortcuts around openwritenclose_suffix_internal(). The
reader can easily figure out what they do.
int openwritevnclose_unsafe_internal (char const *file, struct iovec const *v, unsigned int vlen, dev_t *dev, ino_t *ino, int dosync)
Like openwritenclose_unsafe_internal, 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)
int openwritevnclose_unsafe_devino (char const *file, struct iovec const *v, unsigned int vlen, dev_t *dev, ino_t *ino)
int openwritevnclose_unsafe_devino_sync (char const *file, struct iovec const *v, unsigned int vlen, dev_t *dev, ino_t *ino)
Trivial wrappers around openwritevnclose_unsafe_internal().
int openwritevnclose_suffix_internal (char const *file, struct iovec const *v, unsigned int vlen, dev_t *dev, ino_t *ino, int dosync, char const *suffix)
Like openwritenclose_suffix_internal, but the content to
write is taken from a
scatter/gather array of vlen
elements instead of a single string.
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)
int openwritenclose_suffix_devino (char const *file, char const *s, size_t len, dev_t *dev, ino_t *ino, char const *suffix)
int openwritenclose_suffix_devino_sync (char const *file, char const *s, size_t len, dev_t *dev, ino_t *ino, char const *suffix)
Trivial wrappers around openwritevnclose_suffix_internal().
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.
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_t const *deadline, tain_t *stamp)
Sleeps until the absolute time represented by the
tain_t *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.9.1.0/doc/libstddjb/env.html 0000664 0000000 0000000 00000001557 13553351154 0017512 0 ustar 00root root 0000000 0000000
skalibs: the env header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/env.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libstddjb/envalloc.html 0000664 0000000 0000000 00000001631 13553351154 0020516 0 ustar 00root root 0000000 0000000
skalibs: the envalloc header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/envalloc.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libstddjb/fmtscan.html 0000664 0000000 0000000 00000001575 13553351154 0020355 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.9.1.0/doc/libstddjb/gccattributes.html 0000664 0000000 0000000 00000002571 13553351154 0021562 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.9.1.0/doc/libstddjb/genalloc.html 0000664 0000000 0000000 00000002727 13553351154 0020506 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.9.1.0/doc/libstddjb/genwrite.html 0000664 0000000 0000000 00000006612 13553351154 0020543 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.9.1.0/doc/libstddjb/getpeereid.html 0000664 0000000 0000000 00000001560 13553351154 0021031 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.9.1.0/doc/libstddjb/index.html 0000664 0000000 0000000 00000016167 13553351154 0020034 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/environ.h: declaration of the environ variable
- 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.9.1.0/doc/libstddjb/iobuffer.html 0000664 0000000 0000000 00000001615 13553351154 0020516 0 ustar 00root root 0000000 0000000
skalibs: the iobuffer header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/iobuffer.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libstddjb/iopause.html 0000664 0000000 0000000 00000021331 13553351154 0020357 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() n or 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
tain_ts. 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_t const *deadline, tain_t 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_t const *deadline, tain_t *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.9.1.0/doc/libstddjb/ip46.html 0000664 0000000 0000000 00000015427 13553351154 0017505 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_t const *deadline, tain_t *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_t const *deadline, tain_t *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_t const *deadline, tain_t *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.9.1.0/doc/libstddjb/lolstdio.html 0000664 0000000 0000000 00000006566 13553351154 0020560 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.9.1.0/doc/libstddjb/mininetstring.html 0000664 0000000 0000000 00000001600 13553351154 0021601 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.9.1.0/doc/libstddjb/netstring.html 0000664 0000000 0000000 00000001554 13553351154 0020734 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.9.1.0/doc/libstddjb/safewrappers.html 0000664 0000000 0000000 00000007637 13553351154 0021431 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.9.1.0/doc/libstddjb/segfault.html 0000664 0000000 0000000 00000001616 13553351154 0020530 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.9.1.0/doc/libstddjb/selfpipe.html 0000664 0000000 0000000 00000017757 13553351154 0020542 0 ustar 00root root 0000000 0000000
skalibs: the selfpipe library interface
libstddjb
skalibs
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/untrapping 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 0 if
the operation succeeded, and -1 if it failed. If it succeeded, you
can forget about the trapped signal entirely.
In our example, if r is 0, then a SIGTERM will instantly
trigger readability on fd.
int r = selfpipe_untrap(SIGTERM) ;
Conversely, selfpipe_untrap() uncatches a signal; the selfpipe
will not manage it anymore. r is 0 if the operation succeeded
and -1 if it failed.
int r ;
sigset_t set ;
sigemptyset(&set) ;
sigaddset(&set, SIGTERM) ;
sigaddset(&set, SIGHUP) ;
r = selfpipe_trapset(&set) ;
selfpipe_trap() and selfpipe_untrap() handle 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 0 if the operation succeeded and -1 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.
Finishing
selfpipe_finish() ;
Call selfpipe_finish() when you're done using the selfpipe.
Signal handlers will be restored to their previous value.
Any limitations ?
Some, as always.
- The selfpipe library uses a global pipe;
so, it's not safe for multithreading. I'm not sure how multithreaded
programs handle signals; I personally don't like multithreading and
never use it, so I'm not knowledgeable about it. Anyway, if your
program is multithreaded, chances are you don't have an asynchronous
event loop, so the self-pipe trick has less benefits for you.
- 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.9.1.0/doc/libstddjb/sgetopt.html 0000664 0000000 0000000 00000001553 13553351154 0020403 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.9.1.0/doc/libstddjb/sig.html 0000664 0000000 0000000 00000001545 13553351154 0017501 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.9.1.0/doc/libstddjb/siovec.html 0000664 0000000 0000000 00000001606 13553351154 0020205 0 ustar 00root root 0000000 0000000
skalibs: the siovec header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/siovec.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libstddjb/skamisc.html 0000664 0000000 0000000 00000001567 13553351154 0020355 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.9.1.0/doc/libstddjb/socket.html 0000664 0000000 0000000 00000001570 13553351154 0020205 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.9.1.0/doc/libstddjb/stralloc.html 0000664 0000000 0000000 00000011367 13553351154 0020545 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.9.1.0/doc/libstddjb/strerr.html 0000664 0000000 0000000 00000001566 13553351154 0020243 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.9.1.0/doc/libstddjb/strerr2.html 0000664 0000000 0000000 00000001572 13553351154 0020322 0 ustar 00root root 0000000 0000000
skalibs: the strerr2 header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/strerr2.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libstddjb/tai.html 0000664 0000000 0000000 00000050273 13553351154 0017476 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_t structure holds an absolute date with a one-second
precision. A tain_t 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_t will be unable to be more precise than the underlying
implementation.
A tai_t, as well as a tain_t, 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 *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_t *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_t, *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_t 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_t *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_t 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_t *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_t *a, clock_t cl, tain_t *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_t *a, clock_t cl, tain_t 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_t *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_t *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_t will also contain
the same UTC time. Despite being a tai_t, 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 *t, time_t u)
int tai_relative_from_time (tai_t *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_t, 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_t const *t)
int time_from_tai_relative (time_t *u, tai_t 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_t (in which case the functions will return 0 EOVERFLOW).
int tain_from_timeval (tain_t *a, struct timeval const *tv)
int tain_relative_from_timeval (tain_t *a, struct timeval const *tv)
int tain_from_timespec (tain_t *a, struct timespec const *ts)
int tain_relative_from_timespec (tain_t *a, struct timespec const *ts)
int timeval_from_tain (struct timeval *tv, tain_t const *a)
int timeval_from_tain_relative (struct timeval *tv, tain_t const *a)
int timespec_from_tain (struct timespec *ts, tain_t const *a)
int timespec_from_tain_relative (struct timespec *ts, tain_t const *a)
Same conversion operations, between tain_t 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_t structures, and only TAI64N time is stored in
tain_t 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_t *a, time_t t)
int time_sysclock_from_tai (time_t *t, tai_t const *a)
int tain_from_timeval_sysclock (tain_t *a, struct timeval const *tv)
int timeval_sysclock_from_tain (struct timeval *tv, tain_t const *a)
int timespec_sysclock_from_tain (struct timespec *ts, tain_t const *a)
Conversions to/from basic types
int tain_uint (tain_t *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_t *a, int ms)
This function makes a tain_t 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 tain_to_millisecs (tain_t 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 *t, tai_t const *t1, tai_t 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 *t, tai_t const *t1, tai_t 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_t *a, tain_t const *a1, tain_t const *a2)
int tain_sub (tain_t *a, tain_t const *a1, tain_t const *a2)
Same thing with tain_t.
int tain_addsec (tain_t *a, tain_t const *a1, int c)
Adds c seconds to *a1 and stores the result into a.
c may be negative.
void tain_half (tain_t *a, tain_t const *b)
Stores *b/2 into a. *b must be relative.
Comparing dates or durations
int tai_less (tai_t const *t1, tai_t const *t2)
int tain_less (tain_t const *t1, tain_t 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_t 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 *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_t const *a)
void tain_unpack (char const *s, tain_t *a)
Same thing with
external TAI64N format,
using TAIN_PACK (12) characters.
Formatting and scanning
unsigned int tain_fmt (char *s, tain_t 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_t *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_t 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_t *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.9.1.0/doc/libstddjb/webipc.html 0000664 0000000 0000000 00000001601 13553351154 0020161 0 ustar 00root root 0000000 0000000
skalibs: the webipc header
libstddjb
libskarnet
skalibs
Software
skarnet.org
The skalibs/webipc.h header
TODO: write this documentation page. (Sorry!)
skalibs-2.9.1.0/doc/libunixonacid/ 0000775 0000000 0000000 00000000000 13553351154 0016713 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/doc/libunixonacid/index.html 0000664 0000000 0000000 00000003735 13553351154 0020720 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.9.1.0/doc/libunixonacid/kolbak.html 0000664 0000000 0000000 00000002433 13553351154 0021046 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.9.1.0/doc/libunixonacid/skaclient.html 0000664 0000000 0000000 00000005044 13553351154 0021561 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.9.1.0/doc/libunixonacid/unix-timed.html 0000664 0000000 0000000 00000002122 13553351154 0021661 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.9.1.0/doc/libunixonacid/unix-transactional.html 0000664 0000000 0000000 00000002176 13553351154 0023432 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
FIXME: to be completed.
skalibs-2.9.1.0/doc/libunixonacid/unixmessage.html 0000664 0000000 0000000 00000002440 13553351154 0022131 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.9.1.0/doc/license.html 0000664 0000000 0000000 00000005643 13553351154 0016403 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.9.0.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.9.1.0/doc/upgrade.html 0000664 0000000 0000000 00000026605 13553351154 0016411 0 ustar 00root root 0000000 0000000
skalibs: how to upgrade
skalibs
Software
skarnet.org
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.9.1.0/package/ 0000775 0000000 0000000 00000000000 13553351154 0014711 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/package/deps.mak 0000664 0000000 0000000 00000404233 13553351154 0016344 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/biguint.h: src/include/skalibs/gccattributes.h
src/include/skalibs/bitarray.h: src/include/skalibs/gccattributes.h
src/include/skalibs/bufalloc.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/posixishard.h
src/include/skalibs/cbuffer.h: src/include/skalibs/gccattributes.h
src/include/skalibs/cdb.h: src/include/skalibs/gccattributes.h
src/include/skalibs/cdb_make.h: src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/diuint32.h src/include/skalibs/genalloc.h
src/include/skalibs/datastruct.h: src/include/skalibs/avlnode.h src/include/skalibs/avltree.h src/include/skalibs/avltreen.h src/include/skalibs/genqdyn.h src/include/skalibs/genset.h src/include/skalibs/gensetdyn.h
src/include/skalibs/djbtime.h: src/include/skalibs/tai.h src/include/skalibs/uint64.h
src/include/skalibs/djbunix.h: src/include/skalibs/envalloc.h src/include/skalibs/gccattributes.h src/include/skalibs/posixplz.h src/include/skalibs/stralloc.h
src/include/skalibs/env.h: src/include/skalibs/gccattributes.h src/include/skalibs/stralloc.h
src/include/skalibs/envalloc.h: src/include/skalibs/genalloc.h
src/include/skalibs/environ.h: src/include/skalibs/posixplz.h
src/include/skalibs/error.h: src/include/skalibs/gccattributes.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/getpeereid.h: src/include/skalibs/posixplz.h
src/include/skalibs/iobuffer.h: src/include/skalibs/buffer.h src/include/skalibs/djbunix.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/strerr2.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/posixplz.h: src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h
src/include/skalibs/random.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/biguint.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/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/djbunix.h src/include/skalibs/gccattributes.h src/include/skalibs/tai.h src/include/skalibs/webipc.h
src/include/skalibs/stdcrypto.h: src/include/skalibs/md5.h src/include/skalibs/rc4.h src/include/skalibs/sha1.h src/include/skalibs/sha256.h src/include/skalibs/sha512.h
src/include/skalibs/stddjb.h: src/include/skalibs/alarm.h src/include/skalibs/alloc.h src/include/skalibs/allreadwrite.h src/include/skalibs/bitarray.h src/include/skalibs/bufalloc.h src/include/skalibs/buffer.h src/include/skalibs/bytestr.h src/include/skalibs/cbuffer.h src/include/skalibs/cdb.h src/include/skalibs/cdb_make.h src/include/skalibs/direntry.h src/include/skalibs/disize.h src/include/skalibs/diuint.h src/include/skalibs/diuint32.h src/include/skalibs/djbtime.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/envalloc.h src/include/skalibs/error.h src/include/skalibs/fmtscan.h src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h src/include/skalibs/genalloc.h src/include/skalibs/genwrite.h src/include/skalibs/iobuffer.h src/include/skalibs/iopause.h src/include/skalibs/ip46.h src/include/skalibs/lolstdio.h src/include/skalibs/netstring.h src/include/skalibs/nsig.h src/include/skalibs/segfault.h src/include/skalibs/selfpipe.h src/include/skalibs/setgroups.h src/include/skalibs/sgetopt.h src/include/skalibs/sig.h src/include/skalibs/siovec.h src/include/skalibs/skamisc.h src/include/skalibs/socket.h src/include/skalibs/stralloc.h src/include/skalibs/strerr.h src/include/skalibs/strerr2.h src/include/skalibs/tai.h src/include/skalibs/types.h src/include/skalibs/uint16.h src/include/skalibs/uint32.h src/include/skalibs/uint64.h src/include/skalibs/webipc.h
src/include/skalibs/strerr.h: src/include/skalibs/gccattributes.h
src/include/skalibs/strerr2.h: src/include/skalibs/strerr.h
src/include/skalibs/tai.h: src/include/skalibs/gccattributes.h src/include/skalibs/uint64.h
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/stralloc.h src/include/skalibs/uint64.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/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/include/skalibs/webipc.h: src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h src/include/skalibs/tai.h
src/libdatastruct/avlnode-internal.h: src/include/skalibs/avlnode.h
src/libdatastruct/genqdyn-internal.h: src/include/skalibs/genqdyn.h
src/librandom/random-internal.h: src/include/skalibs/surf.h
src/libstdcrypto/md5-internal.h: src/include/skalibs/md5.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/djbtime-internal.h: src/include/skalibs/uint64.h
src/libstddjb/fmtscan-internal.h: src/include/skalibs/fmtscan.h src/include/skalibs/uint64.h
src/libstddjb/selfpipe-internal.h: src/include/skalibs/sig.h src/include/skalibs/sysdeps.h
src/libunixonacid/skaclient-internal.h: src/include/skalibs/kolbak.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h
src/libbiguint/bu_addc.o src/libbiguint/bu_addc.lo: src/libbiguint/bu_addc.c src/include/skalibs/biguint.h src/include/skalibs/bsdsnowflake.h
src/libbiguint/bu_addmod.o src/libbiguint/bu_addmod.lo: src/libbiguint/bu_addmod.c src/include/skalibs/biguint.h
src/libbiguint/bu_cmp.o src/libbiguint/bu_cmp.lo: src/libbiguint/bu_cmp.c src/include/skalibs/biguint.h
src/libbiguint/bu_copy.o src/libbiguint/bu_copy.lo: src/libbiguint/bu_copy.c src/include/skalibs/biguint.h src/include/skalibs/bsdsnowflake.h
src/libbiguint/bu_copy_internal.o src/libbiguint/bu_copy_internal.lo: src/libbiguint/bu_copy_internal.c src/include/skalibs/biguint.h
src/libbiguint/bu_div.o src/libbiguint/bu_div.lo: src/libbiguint/bu_div.c src/include/skalibs/biguint.h
src/libbiguint/bu_div_internal.o src/libbiguint/bu_div_internal.lo: src/libbiguint/bu_div_internal.c src/include/skalibs/biguint.h
src/libbiguint/bu_divmod.o src/libbiguint/bu_divmod.lo: src/libbiguint/bu_divmod.c src/include/skalibs/biguint.h
src/libbiguint/bu_divmod_internal.o src/libbiguint/bu_divmod_internal.lo: src/libbiguint/bu_divmod_internal.c src/include/skalibs/biguint.h
src/libbiguint/bu_fmt.o src/libbiguint/bu_fmt.lo: src/libbiguint/bu_fmt.c src/include/skalibs/biguint.h src/include/skalibs/uint32.h
src/libbiguint/bu_gcd.o src/libbiguint/bu_gcd.lo: src/libbiguint/bu_gcd.c src/include/skalibs/biguint.h
src/libbiguint/bu_invmod.o src/libbiguint/bu_invmod.lo: src/libbiguint/bu_invmod.c src/include/skalibs/biguint.h
src/libbiguint/bu_len.o src/libbiguint/bu_len.lo: src/libbiguint/bu_len.c src/include/skalibs/biguint.h
src/libbiguint/bu_mod.o src/libbiguint/bu_mod.lo: src/libbiguint/bu_mod.c src/include/skalibs/biguint.h
src/libbiguint/bu_mul.o src/libbiguint/bu_mul.lo: src/libbiguint/bu_mul.c src/include/skalibs/biguint.h src/include/skalibs/uint64.h
src/libbiguint/bu_mulmod.o src/libbiguint/bu_mulmod.lo: src/libbiguint/bu_mulmod.c src/include/skalibs/biguint.h
src/libbiguint/bu_pack.o src/libbiguint/bu_pack.lo: src/libbiguint/bu_pack.c src/include/skalibs/biguint.h src/include/skalibs/uint32.h
src/libbiguint/bu_pack_big.o src/libbiguint/bu_pack_big.lo: src/libbiguint/bu_pack_big.c src/include/skalibs/biguint.h src/include/skalibs/uint32.h
src/libbiguint/bu_scan.o src/libbiguint/bu_scan.lo: src/libbiguint/bu_scan.c src/include/skalibs/biguint.h src/include/skalibs/bitarray.h src/include/skalibs/bsdsnowflake.h
src/libbiguint/bu_scan_internal.o src/libbiguint/bu_scan_internal.lo: src/libbiguint/bu_scan_internal.c src/include/skalibs/biguint.h src/include/skalibs/uint32.h
src/libbiguint/bu_scanlen.o src/libbiguint/bu_scanlen.lo: src/libbiguint/bu_scanlen.c src/include/skalibs/biguint.h src/include/skalibs/fmtscan.h
src/libbiguint/bu_slbc.o src/libbiguint/bu_slbc.lo: src/libbiguint/bu_slbc.c src/include/skalibs/biguint.h
src/libbiguint/bu_srbc.o src/libbiguint/bu_srbc.lo: src/libbiguint/bu_srbc.c src/include/skalibs/biguint.h
src/libbiguint/bu_subc.o src/libbiguint/bu_subc.lo: src/libbiguint/bu_subc.c src/include/skalibs/biguint.h src/include/skalibs/bsdsnowflake.h
src/libbiguint/bu_submod.o src/libbiguint/bu_submod.lo: src/libbiguint/bu_submod.c src/include/skalibs/biguint.h
src/libbiguint/bu_unpack.o src/libbiguint/bu_unpack.lo: src/libbiguint/bu_unpack.c src/include/skalibs/biguint.h src/include/skalibs/uint32.h
src/libbiguint/bu_unpack_big.o src/libbiguint/bu_unpack_big.lo: src/libbiguint/bu_unpack_big.c src/include/skalibs/biguint.h src/include/skalibs/uint32.h
src/libbiguint/bu_zero.o src/libbiguint/bu_zero.lo: src/libbiguint/bu_zero.c src/include/skalibs/biguint.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/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.o src/libdatastruct/gensetdyn_iter.lo: src/libdatastruct/gensetdyn_iter.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/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/surf.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/djbunix.h 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/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/random.h src/include/skalibs/surf.h
src/librandom/autosurf_name.o src/librandom/autosurf_name.lo: src/librandom/autosurf_name.c src/librandom/random-internal.h src/include/skalibs/surf.h
src/librandom/random_char.o src/librandom/random_char.lo: src/librandom/random_char.c src/include/skalibs/random.h
src/librandom/random_finish.o src/librandom/random_finish.lo: src/librandom/random_finish.c src/include/skalibs/djbunix.h src/librandom/random-internal.h src/include/skalibs/random.h src/include/skalibs/sysdeps.h
src/librandom/random_init.o src/librandom/random_init.lo: src/librandom/random_init.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/librandom/random-internal.h src/include/skalibs/random.h src/include/skalibs/surf.h src/include/skalibs/sysdeps.h
src/librandom/random_makeseed.o src/librandom/random_makeseed.lo: src/librandom/random_makeseed.c src/include/skalibs/sha1.h src/include/skalibs/tai.h src/include/skalibs/uint32.h
src/librandom/random_name.o src/librandom/random_name.lo: src/librandom/random_name.c src/librandom/random-internal.h src/include/skalibs/random.h
src/librandom/random_oklist.o src/librandom/random_oklist.lo: src/librandom/random_oklist.c src/librandom/random-internal.h
src/librandom/random_sauniquename.o src/librandom/random_sauniquename.lo: src/librandom/random_sauniquename.c src/include/skalibs/random.h src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h
src/librandom/random_string.o src/librandom/random_string.lo: src/librandom/random_string.c src/include/skalibs/allreadwrite.h src/include/skalibs/nonposix.h src/librandom/random-internal.h src/include/skalibs/random.h src/include/skalibs/sysdeps.h
src/librandom/random_uint32.o src/librandom/random_uint32.lo: src/librandom/random_uint32.c src/include/skalibs/nonposix.h src/include/skalibs/random.h src/include/skalibs/sysdeps.h src/include/skalibs/uint32.h
src/librandom/random_unsort.o src/librandom/random_unsort.lo: src/librandom/random_unsort.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/md5_final.o src/libstdcrypto/md5_final.lo: src/libstdcrypto/md5_final.c src/libstdcrypto/md5-internal.h src/include/skalibs/md5.h src/include/skalibs/uint32.h
src/libstdcrypto/md5_init.o src/libstdcrypto/md5_init.lo: src/libstdcrypto/md5_init.c src/include/skalibs/md5.h
src/libstdcrypto/md5_transform.o src/libstdcrypto/md5_transform.lo: src/libstdcrypto/md5_transform.c src/libstdcrypto/md5-internal.h
src/libstdcrypto/md5_update.o src/libstdcrypto/md5_update.lo: src/libstdcrypto/md5_update.c src/libstdcrypto/md5-internal.h src/include/skalibs/md5.h src/include/skalibs/uint32.h
src/libstdcrypto/rc4.o src/libstdcrypto/rc4.lo: src/libstdcrypto/rc4.c src/include/skalibs/bytestr.h src/include/skalibs/rc4.h
src/libstdcrypto/rc4_init.o src/libstdcrypto/rc4_init.lo: src/libstdcrypto/rc4_init.c src/include/skalibs/bytestr.h src/include/skalibs/rc4.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/include/skalibs/bytestr.h 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/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_str.o src/libstddjb/case_str.lo: src/libstddjb/case_str.c src/include/skalibs/bytestr.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.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_findnext.o src/libstddjb/cdb_findnext.lo: src/libstddjb/cdb_findnext.c 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/libstddjb/cdb_hash.o src/libstddjb/cdb_hash.lo: src/libstddjb/cdb_hash.c src/include/skalibs/cdb.h
src/libstddjb/cdb_init_map.o src/libstddjb/cdb_init_map.lo: src/libstddjb/cdb_init_map.c src/include/skalibs/bsdsnowflake.h src/include/skalibs/cdb.h
src/libstddjb/cdb_make.o src/libstddjb/cdb_make.lo: src/libstddjb/cdb_make.c src/include/skalibs/buffer.h src/include/skalibs/cdb.h src/include/skalibs/cdb_make.h src/include/skalibs/diuint32.h src/include/skalibs/genalloc.h src/include/skalibs/uint32.h
src/libstddjb/cdb_mapfile.o src/libstddjb/cdb_mapfile.lo: src/libstddjb/cdb_mapfile.c src/include/skalibs/cdb.h src/include/skalibs/djbunix.h
src/libstddjb/cdb_nextkey.o src/libstddjb/cdb_nextkey.lo: src/libstddjb/cdb_nextkey.c src/include/skalibs/cdb.h src/include/skalibs/uint32.h
src/libstddjb/cdb_read.o src/libstddjb/cdb_read.lo: src/libstddjb/cdb_read.c src/include/skalibs/allreadwrite.h src/include/skalibs/cdb.h src/include/skalibs/posixishard.h
src/libstddjb/cdb_successor.o src/libstddjb/cdb_successor.lo: src/libstddjb/cdb_successor.c src/include/skalibs/cdb.h
src/libstddjb/cdb_zero.o src/libstddjb/cdb_zero.lo: src/libstddjb/cdb_zero.c src/include/skalibs/cdb.h
src/libstddjb/child_spawn.o src/libstddjb/child_spawn.lo: src/libstddjb/child_spawn.c src/include/skalibs/allreadwrite.h src/include/skalibs/config.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/sig.h src/include/skalibs/strerr2.h src/include/skalibs/sysdeps.h src/include/skalibs/types.h
src/libstddjb/child_spawn0.o src/libstddjb/child_spawn0.lo: src/libstddjb/child_spawn0.c src/include/skalibs/allreadwrite.h src/include/skalibs/config.h src/include/skalibs/djbunix.h src/include/skalibs/sig.h src/include/skalibs/strerr2.h src/include/skalibs/sysdeps.h
src/libstddjb/child_spawn1_internal.o src/libstddjb/child_spawn1_internal.lo: src/libstddjb/child_spawn1_internal.c src/include/skalibs/allreadwrite.h src/include/skalibs/config.h src/include/skalibs/djbunix.h src/include/skalibs/sig.h src/include/skalibs/strerr2.h src/include/skalibs/sysdeps.h
src/libstddjb/child_spawn1_pipe.o src/libstddjb/child_spawn1_pipe.lo: src/libstddjb/child_spawn1_pipe.c src/libstddjb/djbunix-internal.h src/include/skalibs/djbunix.h
src/libstddjb/child_spawn1_socket.o src/libstddjb/child_spawn1_socket.lo: src/libstddjb/child_spawn1_socket.c src/libstddjb/djbunix-internal.h src/include/skalibs/djbunix.h src/include/skalibs/webipc.h
src/libstddjb/child_spawn2.o src/libstddjb/child_spawn2.lo: src/libstddjb/child_spawn2.c src/include/skalibs/allreadwrite.h src/include/skalibs/config.h src/include/skalibs/djbunix.h src/include/skalibs/sig.h src/include/skalibs/strerr2.h src/include/skalibs/sysdeps.h
src/libstddjb/child_spawn3.o src/libstddjb/child_spawn3.lo: src/libstddjb/child_spawn3.c src/include/skalibs/allreadwrite.h src/include/skalibs/config.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/sig.h src/include/skalibs/strerr2.h src/include/skalibs/sysdeps.h src/include/skalibs/types.h
src/libstddjb/coe.o src/libstddjb/coe.lo: src/libstddjb/coe.c src/include/skalibs/djbunix.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/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/env_addmodif.o src/libstddjb/env_addmodif.lo: src/libstddjb/env_addmodif.c src/include/skalibs/env.h src/include/skalibs/stralloc.h
src/libstddjb/env_dump.o src/libstddjb/env_dump.lo: src/libstddjb/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/libstddjb/env_get.o src/libstddjb/env_get.lo: src/libstddjb/env_get.c src/include/skalibs/posixplz.h
src/libstddjb/env_get2.o src/libstddjb/env_get2.lo: src/libstddjb/env_get2.c src/include/skalibs/bytestr.h src/include/skalibs/env.h
src/libstddjb/env_len.o src/libstddjb/env_len.lo: src/libstddjb/env_len.c src/include/skalibs/env.h
src/libstddjb/env_make.o src/libstddjb/env_make.lo: src/libstddjb/env_make.c src/include/skalibs/env.h
src/libstddjb/env_merge.o src/libstddjb/env_merge.lo: src/libstddjb/env_merge.c src/include/skalibs/bytestr.h src/include/skalibs/env.h
src/libstddjb/env_string.o src/libstddjb/env_string.lo: src/libstddjb/env_string.c src/include/skalibs/env.h src/include/skalibs/stralloc.h
src/libstddjb/envalloc_0.o src/libstddjb/envalloc_0.lo: src/libstddjb/envalloc_0.c src/include/skalibs/envalloc.h src/include/skalibs/genalloc.h
src/libstddjb/envalloc_make.o src/libstddjb/envalloc_make.lo: src/libstddjb/envalloc_make.c src/include/skalibs/env.h src/include/skalibs/envalloc.h src/include/skalibs/genalloc.h
src/libstddjb/envalloc_merge.o src/libstddjb/envalloc_merge.lo: src/libstddjb/envalloc_merge.c src/include/skalibs/bytestr.h src/include/skalibs/env.h src/include/skalibs/envalloc.h src/include/skalibs/genalloc.h
src/libstddjb/envalloc_uniq.o src/libstddjb/envalloc_uniq.lo: src/libstddjb/envalloc_uniq.c src/include/skalibs/bytestr.h src/include/skalibs/envalloc.h src/include/skalibs/genalloc.h
src/libstddjb/envdir.o src/libstddjb/envdir.lo: src/libstddjb/envdir.c src/include/skalibs/bytestr.h src/include/skalibs/direntry.h src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/stralloc.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/djbunix.h src/include/skalibs/iobuffer.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/include/skalibs/iobuffer.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/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_sync.o src/libstddjb/fd_sync.lo: src/libstddjb/fd_sync.c src/include/skalibs/djbunix.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/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/hiercopy.o src/libstddjb/hiercopy.lo: src/libstddjb/hiercopy.c src/include/skalibs/djbunix.h src/include/skalibs/skamisc.h
src/libstddjb/hiercopy_tmp.o src/libstddjb/hiercopy_tmp.lo: src/libstddjb/hiercopy_tmp.c src/include/skalibs/direntry.h src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h src/include/skalibs/strerr2.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/iobuffer_fill.o src/libstddjb/iobuffer_fill.lo: src/libstddjb/iobuffer_fill.c src/include/skalibs/iobuffer.h
src/libstddjb/iobuffer_flush.o src/libstddjb/iobuffer_flush.lo: src/libstddjb/iobuffer_flush.c src/include/skalibs/iobuffer.h
src/libstddjb/iobuffer_init.o src/libstddjb/iobuffer_init.lo: src/libstddjb/iobuffer_init.c src/include/skalibs/iobuffer.h
src/libstddjb/iobuffer_kfromu.o src/libstddjb/iobuffer_kfromu.lo: src/libstddjb/iobuffer_kfromu.c src/include/skalibs/buffer.h src/include/skalibs/iobuffer.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/iobuffer_salvage.o src/libstddjb/iobuffer_salvage.lo: src/libstddjb/iobuffer_salvage.c src/include/skalibs/iobuffer.h
src/libstddjb/iobuffer_ufromk.o src/libstddjb/iobuffer_ufromk.lo: src/libstddjb/iobuffer_ufromk.c src/include/skalibs/iobuffer.h src/include/skalibs/sysdeps.h
src/libstddjb/iobufferk_fill.o src/libstddjb/iobufferk_fill.lo: src/libstddjb/iobufferk_fill.c src/include/skalibs/iobuffer.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/iobufferk_finish.o src/libstddjb/iobufferk_finish.lo: src/libstddjb/iobufferk_finish.c src/include/skalibs/djbunix.h src/include/skalibs/iobuffer.h src/include/skalibs/sysdeps.h
src/libstddjb/iobufferk_flush.o src/libstddjb/iobufferk_flush.lo: src/libstddjb/iobufferk_flush.c src/include/skalibs/iobuffer.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/iobufferk_init.o src/libstddjb/iobufferk_init.lo: src/libstddjb/iobufferk_init.c src/include/skalibs/djbunix.h src/include/skalibs/iobuffer.h src/include/skalibs/sysdeps.h
src/libstddjb/iobufferk_isworking.o src/libstddjb/iobufferk_isworking.lo: src/libstddjb/iobufferk_isworking.c src/include/skalibs/iobuffer.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/iobufferu_fill.o src/libstddjb/iobufferu_fill.lo: src/libstddjb/iobufferu_fill.c src/include/skalibs/buffer.h src/include/skalibs/iobuffer.h
src/libstddjb/iobufferu_finish.o src/libstddjb/iobufferu_finish.lo: src/libstddjb/iobufferu_finish.c src/include/skalibs/alloc.h src/include/skalibs/iobuffer.h
src/libstddjb/iobufferu_flush.o src/libstddjb/iobufferu_flush.lo: src/libstddjb/iobufferu_flush.c src/include/skalibs/buffer.h src/include/skalibs/iobuffer.h
src/libstddjb/iobufferu_init.o src/libstddjb/iobufferu_init.lo: src/libstddjb/iobufferu_init.c src/include/skalibs/alloc.h src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/iobuffer.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/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/webipc.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/webipc.h
src/libstddjb/ipc_bind_reuse.o src/libstddjb/ipc_bind_reuse.lo: src/libstddjb/ipc_bind_reuse.c src/include/skalibs/nonposix.h src/include/skalibs/webipc.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/webipc.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/webipc.h
src/libstddjb/ipc_dgram.o src/libstddjb/ipc_dgram.lo: src/libstddjb/ipc_dgram.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/webipc.h
src/libstddjb/ipc_listen.o src/libstddjb/ipc_listen.lo: src/libstddjb/ipc_listen.c src/include/skalibs/nonposix.h src/include/skalibs/webipc.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/webipc.h
src/libstddjb/ipc_pair.o src/libstddjb/ipc_pair.lo: src/libstddjb/ipc_pair.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/webipc.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/webipc.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/webipc.h
src/libstddjb/ipc_stream.o src/libstddjb/ipc_stream.lo: src/libstddjb/ipc_stream.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/webipc.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/webipc.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/lock_ex.o src/libstddjb/lock_ex.lo: src/libstddjb/lock_ex.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/lock_exnb.o src/libstddjb/lock_exnb.lo: src/libstddjb/lock_exnb.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/lock_sh.o src/libstddjb/lock_sh.lo: src/libstddjb/lock_sh.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/lock_shnb.o src/libstddjb/lock_shnb.lo: src/libstddjb/lock_shnb.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/lock_un.o src/libstddjb/lock_un.lo: src/libstddjb/lock_un.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/lock_unx.o src/libstddjb/lock_unx.lo: src/libstddjb/lock_unx.c src/include/skalibs/djbunix.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/libstddjb/ndelay_on.o src/libstddjb/ndelay_on.lo: src/libstddjb/ndelay_on.c src/include/skalibs/djbunix.h
src/libstddjb/netstring_append.o src/libstddjb/netstring_append.lo: src/libstddjb/netstring_append.c src/include/skalibs/netstring.h src/include/skalibs/stralloc.h src/include/skalibs/uint64.h
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/nonposix.h
src/libstddjb/open3.o src/libstddjb/open3.lo: src/libstddjb/open3.c src/include/skalibs/nonposix.h
src/libstddjb/open_append.o src/libstddjb/open_append.lo: src/libstddjb/open_append.c src/include/skalibs/djbunix.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/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/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/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/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/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/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/allreadwrite.h src/include/skalibs/djbunix.h
src/libstddjb/openslurpclose.o src/libstddjb/openslurpclose.lo: src/libstddjb/openslurpclose.c src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h
src/libstddjb/openwritenclose.o src/libstddjb/openwritenclose.lo: src/libstddjb/openwritenclose.c src/include/skalibs/djbunix.h
src/libstddjb/openwritenclose_suffix.o src/libstddjb/openwritenclose_suffix.lo: src/libstddjb/openwritenclose_suffix.c src/include/skalibs/djbunix.h
src/libstddjb/openwritenclose_unsafe.o src/libstddjb/openwritenclose_unsafe.lo: src/libstddjb/openwritenclose_unsafe.c src/include/skalibs/djbunix.h
src/libstddjb/openwritevnclose.o src/libstddjb/openwritevnclose.lo: src/libstddjb/openwritevnclose.c src/include/skalibs/djbunix.h
src/libstddjb/openwritevnclose_suffix.o src/libstddjb/openwritevnclose_suffix.lo: src/libstddjb/openwritevnclose_suffix.c src/include/skalibs/djbunix.h
src/libstddjb/openwritevnclose_unsafe.o src/libstddjb/openwritevnclose_unsafe.lo: src/libstddjb/openwritevnclose_unsafe.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h
src/libstddjb/path_canonicalize.o src/libstddjb/path_canonicalize.lo: src/libstddjb/path_canonicalize.c src/include/skalibs/djbunix.h
src/libstddjb/pathexec.o src/libstddjb/pathexec.lo: src/libstddjb/pathexec.c src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/posixplz.h
src/libstddjb/pathexec0.o src/libstddjb/pathexec0.lo: src/libstddjb/pathexec0.c src/include/skalibs/djbunix.h
src/libstddjb/pathexec0_run.o src/libstddjb/pathexec0_run.lo: src/libstddjb/pathexec0_run.c src/include/skalibs/djbunix.h
src/libstddjb/pathexec_fromenv.o src/libstddjb/pathexec_fromenv.lo: src/libstddjb/pathexec_fromenv.c src/include/skalibs/djbunix.h src/include/skalibs/env.h src/include/skalibs/stralloc.h
src/libstddjb/pathexec_r.o src/libstddjb/pathexec_r.lo: src/libstddjb/pathexec_r.c src/include/skalibs/djbunix.h
src/libstddjb/pathexec_r_name.o src/libstddjb/pathexec_r_name.lo: src/libstddjb/pathexec_r_name.c src/include/skalibs/bytestr.h src/include/skalibs/djbunix.h src/include/skalibs/env.h
src/libstddjb/pathexec_run.o src/libstddjb/pathexec_run.lo: src/libstddjb/pathexec_run.c src/include/skalibs/config.h src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h
src/libstddjb/pipe_internal.o src/libstddjb/pipe_internal.lo: src/libstddjb/pipe_internal.c src/include/skalibs/djbunix.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/strerr2.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/direntry.h 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/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_finish.o src/libstddjb/selfpipe_finish.lo: src/libstddjb/selfpipe_finish.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/nsig.h src/libstddjb/selfpipe-internal.h src/include/skalibs/selfpipe.h src/include/skalibs/sig.h src/include/skalibs/sysdeps.h
src/libstddjb/selfpipe_init.o src/libstddjb/selfpipe_init.lo: src/libstddjb/selfpipe_init.c src/include/skalibs/djbunix.h src/libstddjb/selfpipe-internal.h src/include/skalibs/selfpipe.h src/include/skalibs/sysdeps.h
src/libstddjb/selfpipe_internal.o src/libstddjb/selfpipe_internal.lo: src/libstddjb/selfpipe_internal.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/libstddjb/selfpipe-internal.h src/include/skalibs/sysdeps.h
src/libstddjb/selfpipe_read.o src/libstddjb/selfpipe_read.lo: src/libstddjb/selfpipe_read.c src/include/skalibs/allreadwrite.h src/libstddjb/selfpipe-internal.h src/include/skalibs/selfpipe.h src/include/skalibs/sysdeps.h
src/libstddjb/selfpipe_trap.o src/libstddjb/selfpipe_trap.lo: src/libstddjb/selfpipe_trap.c src/libstddjb/selfpipe-internal.h src/include/skalibs/selfpipe.h src/include/skalibs/sig.h src/include/skalibs/sysdeps.h
src/libstddjb/selfpipe_trapset.o src/libstddjb/selfpipe_trapset.lo: src/libstddjb/selfpipe_trapset.c src/include/skalibs/nonposix.h src/include/skalibs/nsig.h src/libstddjb/selfpipe-internal.h src/include/skalibs/selfpipe.h src/include/skalibs/sig.h src/include/skalibs/sysdeps.h
src/libstddjb/selfpipe_untrap.o src/libstddjb/selfpipe_untrap.lo: src/libstddjb/selfpipe_untrap.c src/libstddjb/selfpipe-internal.h src/include/skalibs/selfpipe.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_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_blockset.o src/libstddjb/sig_blockset.lo: src/libstddjb/sig_blockset.c src/include/skalibs/sig.h
src/libstddjb/sig_catch.o src/libstddjb/sig_catch.lo: src/libstddjb/sig_catch.c 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_pause.o src/libstddjb/sig_pause.lo: src/libstddjb/sig_pause.c src/include/skalibs/sig.h
src/libstddjb/sig_push.o src/libstddjb/sig_push.lo: src/libstddjb/sig_push.c 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_shield.o src/libstddjb/sig_shield.lo: src/libstddjb/sig_shield.c src/include/skalibs/sig.h
src/libstddjb/sig_stack.o src/libstddjb/sig_stack.lo: src/libstddjb/sig_stack.c src/include/skalibs/nonposix.h src/include/skalibs/nsig.h src/include/skalibs/sig.h
src/libstddjb/sig_table.o src/libstddjb/sig_table.lo: src/libstddjb/sig_table.c 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/sig_unshield.o src/libstddjb/sig_unshield.lo: src/libstddjb/sig_unshield.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/skasig_dfl.o src/libstddjb/skasig_dfl.lo: src/libstddjb/skasig_dfl.c src/include/skalibs/sig.h
src/libstddjb/skasigaction.o src/libstddjb/skasigaction.lo: src/libstddjb/skasigaction.c src/include/skalibs/config.h src/include/skalibs/sig.h
src/libstddjb/slurp.o src/libstddjb/slurp.lo: src/libstddjb/slurp.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/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/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_conn4.o src/libstddjb/socket_conn4.lo: src/libstddjb/socket_conn4.c src/include/skalibs/nonposix.h src/include/skalibs/socket.h src/include/skalibs/uint16.h
src/libstddjb/socket_conn4_u32.o src/libstddjb/socket_conn4_u32.lo: src/libstddjb/socket_conn4_u32.c src/include/skalibs/socket.h src/include/skalibs/uint32.h
src/libstddjb/socket_conn6.o src/libstddjb/socket_conn6.lo: src/libstddjb/socket_conn6.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_delay.o src/libstddjb/socket_delay.lo: src/libstddjb/socket_delay.c src/include/skalibs/nonposix.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/nonposix.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_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_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_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_tryr.o src/libstddjb/socket_tryr.lo: src/libstddjb/socket_tryr.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/nonposix.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_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.o src/libstddjb/strerr.lo: src/libstddjb/strerr.c src/include/skalibs/buffer.h src/include/skalibs/strerr.h
src/libstddjb/strerr_sys.o src/libstddjb/strerr_sys.lo: src/libstddjb/strerr_sys.c 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.o src/libstddjb/string_quote_nodelim.lo: src/libstddjb/string_quote_nodelim.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_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_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_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_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_reverse.o src/libstddjb/uint16_reverse.lo: src/libstddjb/uint16_reverse.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_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_reverse.o src/libstddjb/uint32_reverse.lo: src/libstddjb/uint32_reverse.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_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_reverse.o src/libstddjb/uint64_reverse.lo: src/libstddjb/uint64_reverse.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/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_reap.o src/libstddjb/waitn_reap.lo: src/libstddjb/waitn_reap.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_unsafe.o src/libstddjb/writenclose_unsafe.lo: src/libstddjb/writenclose_unsafe.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h
src/libstddjb/writevnclose_unsafe.o src/libstddjb/writevnclose_unsafe.lo: src/libstddjb/writevnclose_unsafe.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/siovec.h
src/libstddjb/xexecvep.o src/libstddjb/xexecvep.lo: src/libstddjb/xexecvep.c src/include/skalibs/djbunix.h src/include/skalibs/posixplz.h src/include/skalibs/strerr2.h
src/libstddjb/xpathexec.o src/libstddjb/xpathexec.lo: src/libstddjb/xpathexec.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h
src/libstddjb/xpathexec0.o src/libstddjb/xpathexec0.lo: src/libstddjb/xpathexec0.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h
src/libstddjb/xpathexec0_run.o src/libstddjb/xpathexec0_run.lo: src/libstddjb/xpathexec0_run.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h
src/libstddjb/xpathexec_fromenv.o src/libstddjb/xpathexec_fromenv.lo: src/libstddjb/xpathexec_fromenv.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h
src/libstddjb/xpathexec_r.o src/libstddjb/xpathexec_r.lo: src/libstddjb/xpathexec_r.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h
src/libstddjb/xpathexec_r_name.o src/libstddjb/xpathexec_r_name.lo: src/libstddjb/xpathexec_r_name.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h
src/libstddjb/xpathexec_run.o src/libstddjb/xpathexec_run.lo: src/libstddjb/xpathexec_run.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h
src/libunixonacid/access_at.o src/libunixonacid/access_at.lo: src/libunixonacid/access_at.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/unix-transactional.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/dd_cancel.o src/libunixonacid/dd_cancel.lo: src/libunixonacid/dd_cancel.c src/include/skalibs/djbunix.h src/include/skalibs/stralloc.h src/include/skalibs/unix-transactional.h
src/libunixonacid/dd_close.o src/libunixonacid/dd_close.lo: src/libunixonacid/dd_close.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/dd_commit.o src/libunixonacid/dd_commit.lo: src/libunixonacid/dd_commit.c src/include/skalibs/djbunix.h src/include/skalibs/random.h src/include/skalibs/stralloc.h src/include/skalibs/unix-transactional.h
src/libunixonacid/dd_commit_devino.o src/libunixonacid/dd_commit_devino.lo: src/libunixonacid/dd_commit_devino.c src/include/skalibs/unix-transactional.h
src/libunixonacid/dd_open_read.o src/libunixonacid/dd_open_read.lo: src/libunixonacid/dd_open_read.c src/include/skalibs/djbunix.h src/include/skalibs/unix-transactional.h
src/libunixonacid/dd_open_write.o src/libunixonacid/dd_open_write.lo: src/libunixonacid/dd_open_write.c src/include/skalibs/djbunix.h src/include/skalibs/random.h src/include/skalibs/stralloc.h src/include/skalibs/unix-transactional.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/unix-timed.h src/include/skalibs/webipc.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/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/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/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/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/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/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/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/allreadwrite.h 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/unixmessage.h src/include/skalibs/webipc.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/error.h src/include/skalibs/kolbak.h src/libunixonacid/skaclient-internal.h src/include/skalibs/skaclient.h src/include/skalibs/unixmessage.h src/include/skalibs/webipc.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/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/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/djbunix.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/djbunix.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/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h src/include/skalibs/types.h src/include/skalibs/unix-timed.h
src/libunixonacid/textclient_start.o src/libunixonacid/textclient_start.lo: src/libunixonacid/textclient_start.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/sysdeps.h src/include/skalibs/textclient.h src/include/skalibs/textmessage.h src/include/skalibs/unix-timed.h src/include/skalibs/webipc.h
src/libunixonacid/textclient_startf.o src/libunixonacid/textclient_startf.lo: src/libunixonacid/textclient_startf.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.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_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_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_v_zero.o src/libunixonacid/unixmessage_v_zero.lo: src/libunixonacid/unixmessage_v_zero.c 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
skalibs-2.9.1.0/package/info 0000664 0000000 0000000 00000000111 13553351154 0015560 0 ustar 00root root 0000000 0000000 package=skalibs
version=2.9.1.0
category=prog
package_macro_name=SKALIBS
skalibs-2.9.1.0/patch-for-solaris 0000775 0000000 0000000 00000001314 13553351154 0016600 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/make-sysdepsh.sh
echo 'SHELL := /usr/xpg4/bin/sh' > Makefile.tmp
echo >> Makefile.tmp
cat Makefile >> Makefile.tmp
mv -f Makefile.tmp Makefile
skalibs-2.9.1.0/src/ 0000775 0000000 0000000 00000000000 13553351154 0014105 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/src/headers/ 0000775 0000000 0000000 00000000000 13553351154 0015520 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/src/headers/bits-bendian 0000664 0000000 0000000 00000000271 13553351154 0020002 0 ustar 00root root 0000000 0000000 #define uint@BITS@_little_endian(s, n) uint@BITS@_reverse((s), (n))
#define uint@BITS@_big_endian(s, n)
#define uint@BITS@_little(u) uint@BITS@_bswap(u)
#define uint@BITS@_big(u) (u)
skalibs-2.9.1.0/src/headers/bits-footer 0000664 0000000 0000000 00000000053 13553351154 0017676 0 ustar 00root root 0000000 0000000
typedef uint@BITS@_t uint@BITS@ ;
#endif
skalibs-2.9.1.0/src/headers/bits-header 0000664 0000000 0000000 00000000147 13553351154 0017634 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef UINT@BITS@_H
#define UINT@BITS@_H
#include
#include
skalibs-2.9.1.0/src/headers/bits-lendian 0000664 0000000 0000000 00000000271 13553351154 0020014 0 ustar 00root root 0000000 0000000 #define uint@BITS@_little_endian(s, n)
#define uint@BITS@_big_endian(s, n) uint@BITS@_reverse((s), (n))
#define uint@BITS@_little(u) (u)
#define uint@BITS@_big(u) uint@BITS@_bswap(u)
skalibs-2.9.1.0/src/headers/bits-template 0000664 0000000 0000000 00000005704 13553351154 0020223 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 void uint@BITS@_reverse (char *, size_t) ;
extern uint@BITS@_t uint@BITS@_bswap (uint@BITS@_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@0_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@0_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.9.1.0/src/headers/ip46-footer 0000664 0000000 0000000 00000001043 13553351154 0017517 0 ustar 00root root 0000000 0000000
#define ip46_from_ip(i, s, h) ((h) ? ip46_from_ip6(i, s) : ip46_from_ip4(i, s))
#define socket_recvnb46_g(fd, buf, len, i, port, deadline) socket_recvnb46(fd, buf, len, i, port, (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_t const *, uint16_t, tain_t const *, tain_t *) ;
#define socket_deadlineconnstamp46_g(fd, ip, port, deadline) socket_deadlineconnstamp46(fd, ip, port, (deadline), &STAMP)
#endif
skalibs-2.9.1.0/src/headers/ip46-header 0000664 0000000 0000000 00000001677 13553351154 0017466 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef IP46_H
#define IP46_H
#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_t, *ip46full_t_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_t *) ;
extern size_t ip46full_scanlist (ip46full_t *, 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.9.1.0/src/headers/ip46-with 0000664 0000000 0000000 00000003277 13553351154 0017207 0 ustar 00root root 0000000 0000000 typedef ip46full_t ip46_t, *ip46_t_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_udp46(h) ((h) ? socket_udp6() : socket_udp4())
#define socket_recv46(fd, s, len, i, port) ((i)->is6 ? socket_recv6(fd, s, len, (i)->ip, port) : socket_recv4(fd, s, len, (i)->ip, port))
#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_t *, uint16_t *) ;
extern int socket_remote46 (int, ip46_t *, uint16_t *) ;
#define socket_recvnb46(fd, buf, len, i, port, deadline, stamp) ((i)->is6 ? socket_recvnb6(fd, buf, len, (i)->ip, port, deadline, stamp) : socket_recvnb4(fd, buf, len, (i)->ip, port, deadline, stamp))
#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.9.1.0/src/headers/ip46-without 0000664 0000000 0000000 00000002446 13553351154 0017734 0 ustar 00root root 0000000 0000000 typedef struct ip46_s ip46_t, *ip46_t_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_udp46(h) socket_udp4()
#define socket_recv46(fd, s, len, i, port) socket_recv4(fd, s, len, (i)->ip, port)
#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_recvnb46(fd, buf, len, i, port, deadline, stamp) socket_recvnb4(fd, buf, len, (i)->ip, port, deadline, stamp)
#define socket_sendnb46(fd, buf, len, i, port, deadline, stamp) socket_sendnb4(fd, buf, len, (i)->ip, port, deadline, stamp)
skalibs-2.9.1.0/src/headers/signed-template 0000664 0000000 0000000 00000000652 13553351154 0020530 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@_FMT (1+UINT@BITS@_FMT)
#define @type@_fmt int@BITS@_fmt
#define @type@_fmtlist int@BITS@_fmtlist
#define @type@_scan int@BITS@_scan
#define @type@0_scan int@BITS@0_scan
#define @type@_scanlist int@BITS@_scanlist
skalibs-2.9.1.0/src/headers/types-footer 0000664 0000000 0000000 00000000010 13553351154 0020072 0 ustar 00root root 0000000 0000000
#endif
skalibs-2.9.1.0/src/headers/types-header 0000664 0000000 0000000 00000000306 13553351154 0020034 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_TYPES_H
#define SKALIBS_TYPES_H
#include
#include
#include
#include
#include
skalibs-2.9.1.0/src/headers/uint64-defs 0000664 0000000 0000000 00000000736 13553351154 0017521 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.9.1.0/src/headers/uint64-include 0000664 0000000 0000000 00000000034 13553351154 0020212 0 ustar 00root root 0000000 0000000 #include
skalibs-2.9.1.0/src/headers/uint64-macros 0000664 0000000 0000000 00000000625 13553351154 0020061 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.9.1.0/src/headers/uint64-noulong64 0000664 0000000 0000000 00000000431 13553351154 0020423 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.9.1.0/src/headers/uint64-ulong64 0000664 0000000 0000000 00000000405 13553351154 0020067 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.9.1.0/src/headers/unsigned-template 0000664 0000000 0000000 00000002736 13553351154 0021100 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@_reverse uint@BITS@_reverse
#define @type@_big_endian uint@BITS@_big_endian
#define @type@_little_endian uint@BITS@_little_endian
#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 uint@BITS@_scan_base
#define @type@0_scan_base uint@BITS@0_scan_base
#define @type@_scanlist uint@BITS@_scanlist
#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.9.1.0/src/include/ 0000775 0000000 0000000 00000000000 13553351154 0015530 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/src/include/skalibs/ 0000775 0000000 0000000 00000000000 13553351154 0017160 5 ustar 00root root 0000000 0000000 skalibs-2.9.1.0/src/include/skalibs/alarm.h 0000664 0000000 0000000 00000000402 13553351154 0020421 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef ALARM_H
#define ALARM_H
#include
extern int alarm_milliseconds (unsigned int) ;
extern int alarm_timeout (tain_t const *) ;
extern int alarm_deadline (tain_t const *) ;
extern void alarm_disable (void) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/alloc.h 0000664 0000000 0000000 00000000423 13553351154 0020422 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef ALLOC_H
#define 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 (void **, size_t) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/allreadwrite.h 0000664 0000000 0000000 00000001711 13553351154 0022010 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef ALLREADWRITE_H
#define ALLREADWRITE_H
#include
#include
extern ssize_t sanitize_read (ssize_t) ;
extern ssize_t unsanitize_read (ssize_t) ;
extern size_t allreadwrite (iofunc_t_ref, int, char *, size_t) ;
extern size_t allreadwritev (iovfunc_t_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_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) ;
extern ssize_t fd_readv (int, struct iovec const *, unsigned int) ;
extern ssize_t fd_writev (int, struct iovec const *, unsigned int) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/avlnode.h 0000664 0000000 0000000 00000003712 13553351154 0020764 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef AVLNODE_H
#define AVLNODE_H
#include
#include
#include
#define AVLNODE_MAXDEPTH 49 /* enough for 2^32 nodes in the worst case */
typedef int avliterfunc_t (uint32_t, unsigned int, void *) ;
typedef avliterfunc_t *avliterfunc_t_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 *, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
extern int avlnode_search (avlnode const *, uint32_t, uint32_t, void const *, uint32_t *, dtokfunc_t_ref, cmpfunc_t_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, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
extern uint32_t avlnode_delete (avlnode *, uint32_t, uint32_t *, void const *, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
extern uint32_t avlnode_iter_nocancel (avlnode *, uint32_t, uint32_t, uint32_t, avliterfunc_t_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, avliterfunc_t_ref, avliterfunc_t_ref, void *) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/avltree.h 0000664 0000000 0000000 00000005176 13553351154 0021004 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef AVLTREE_H
#define AVLTREE_H
#include
#include
#include
#include
typedef struct avltree_s avltree, *avltree_ref ;
struct avltree_s
{
gensetdyn x ;
uint32_t root ;
dtokfunc_t_ref dtok ;
cmpfunc_t_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, dtokfunc_t_ref, cmpfunc_t_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(t, f, p) avlnode_iter(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), f, p)
#define avltree_iter_nocancel(t, cut, f, p) avlnode_iter(avltree_nodes(t), avltree_totalsize(t), cut, 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.9.1.0/src/include/skalibs/avltreen.h 0000664 0000000 0000000 00000005640 13553351154 0021156 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef AVLTREEN_H
#define 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 ;
dtokfunc_t_ref dtok ;
cmpfunc_t_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, dtokfunc_t_ref, cmpfunc_t_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.9.1.0/src/include/skalibs/biguint.h 0000664 0000000 0000000 00000005322 13553351154 0020774 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef BIGUINT_H
#define BIGUINT_H
#include
#include
#include
extern void bu_pack (char *, uint32_t const *, unsigned int) ;
extern void bu_unpack (char const *, uint32_t *, unsigned int) ;
extern void bu_pack_big (char *, uint32_t const *, unsigned int) ;
extern void bu_unpack_big (char const *, uint32_t *, unsigned int) ;
extern size_t bu_fmt (char *, uint32_t const *, unsigned int) ;
extern size_t bu_scanlen (char const *, size_t *) ;
extern int bu_scan (char const *, size_t, uint32_t *, unsigned int, size_t) ;
extern unsigned int bu_len (uint32_t const *, unsigned int) gccattr_pure ;
extern void bu_zero (uint32_t *, unsigned int) ;
extern int bu_copy (uint32_t *, unsigned int, uint32_t const *, unsigned int) ;
extern int bu_cmp (uint32_t const *, unsigned int, uint32_t const *, unsigned int) gccattr_pure ;
#define bu_add(c, cn, a, an, b, bn) bu_addc(c, cn, a, an, b, (bn), 0)
extern int bu_addc (uint32_t *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int, int) ;
#define bu_sub(c, cn, a, an, b, bn) bu_subc(c, cn, a, an, b, (bn), 0)
extern int bu_subc (uint32_t *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int, int) ;
extern int bu_mul (uint32_t *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int) ;
extern int bu_div (uint32_t const *, unsigned int, uint32_t const *, unsigned int, uint32_t *, unsigned int, uint32_t *, unsigned int) ;
extern int bu_mod (uint32_t *, unsigned int, uint32_t const *, unsigned int) ;
extern int bu_gcd (uint32_t *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int) ;
#define bu_slb(a, n) bu_slbc(a, n, 0)
extern int bu_slbc (uint32_t *, unsigned int, int) ;
#define bu_srb(a, n) bu_srbc(a, n, 0)
extern int bu_srbc (uint32_t *, unsigned int, int) ;
extern int bu_addmod (uint32_t *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int) ;
extern int bu_submod (uint32_t *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int) ;
extern int bu_invmod (uint32_t *, unsigned int, uint32_t const *, unsigned int) ;
extern int bu_divmod (uint32_t *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int, uint32_t const *, unsigned int) ;
extern void bu_scan_internal (char const *, size_t, uint32_t *) ;
extern void bu_copy_internal (uint32_t *, uint32_t const *, unsigned int) ;
extern void bu_div_internal (uint32_t *, unsigned int, uint32_t const *, unsigned int, uint32_t *, unsigned int) ;
extern void bu_divmod_internal (uint32_t *, uint32_t *, uint32_t const *, unsigned int) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/bitarray.h 0000664 0000000 0000000 00000003611 13553351154 0021147 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef BITARRAY_H
#define 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.9.1.0/src/include/skalibs/bsdsnowflake.h 0000664 0000000 0000000 00000002374 13553351154 0022021 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.9.1.0/src/include/skalibs/bufalloc.h 0000664 0000000 0000000 00000002445 13553351154 0021125 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef BUFALLOC_H
#define BUFALLOC_H
#include
#include
#include
typedef struct bufalloc bufalloc, *bufalloc_ref ;
struct bufalloc
{
stralloc x ;
size_t p ;
int fd ;
ssize_t (*op) (int, char const *, size_t) ;
} ;
#define BUFALLOC_ZERO { STRALLOC_ZERO, 0, -1, 0 }
#define BUFALLOC_INIT(f, d) { STRALLOC_ZERO, 0, (d), (f) }
extern void bufalloc_init (bufalloc *, ssize_t (*)(int, char const *, size_t), 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.9.1.0/src/include/skalibs/buffer.h 0000664 0000000 0000000 00000007722 13553351154 0020612 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef BUFFER_H
#define BUFFER_H
#include
#include
#include
#include
#include
typedef struct buffer_s buffer, buffer_t, *buffer_ref, *buffer_t_ref ;
struct buffer_s
{
iovfunc_t_ref op ;
int fd ;
cbuffer_t 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 *, iovfunc_t_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 iovfunc_t 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.9.1.0/src/include/skalibs/bytestr.h 0000664 0000000 0000000 00000003660 13553351154 0021032 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef BYTESTR_H
#define BYTESTR_H
#include
/* 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) (!strcasecmp(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 ;
extern size_t case_str (char const *, char const *) gccattr_pure ;
#endif
skalibs-2.9.1.0/src/include/skalibs/cbuffer.h 0000664 0000000 0000000 00000003476 13553351154 0020757 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef CBUFFER_H
#define CBUFFER_H
#include
#include
#include
typedef struct cbuffer_s cbuffer_t, *cbuffer_t_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_t *, char *, size_t) ;
/* Writing */
extern size_t cbuffer_put (cbuffer_t *, char const *, size_t) ;
extern size_t cbuffer_putv (cbuffer_t *, 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_t *, size_t) ;
extern void cbuffer_wpeek (cbuffer_t const *, struct iovec *) ;
#define cbuffer_WSEEK(b, w) ((b)->n = ((b)->n + (w)) % (b)->a, w)
extern size_t cbuffer_wseek (cbuffer_t *, size_t) ;
/* Reading */
extern size_t cbuffer_get (cbuffer_t *, char *, size_t) ;
extern size_t cbuffer_getv (cbuffer_t *, 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_t *, size_t) ;
extern void cbuffer_rpeek (cbuffer_t const *, struct iovec *) ;
#define cbuffer_RSEEK(b, n) ((b)->p = ((b)->p + (n)) % (b)->a, n)
extern size_t cbuffer_rseek (cbuffer_t *, 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.9.1.0/src/include/skalibs/cdb.h 0000664 0000000 0000000 00000003641 13553351154 0020065 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef CDB_H
#define CDB_H
#include
#include
#define CDB_HASHSTART 5381
extern uint32_t cdb_hashadd (uint32_t, unsigned char) gccattr_const ;
extern uint32_t cdb_hash (char const *, unsigned int) gccattr_pure ;
typedef struct cdb cdb_t, *cdb_t_ref ;
struct cdb
{
char *map ; /* 0 if no map */
int fd ; /* -1 if uninitted, negative if mapped, nonnegative if nomapped */
uint32_t size ; /* initialized if map is nonzero */
uint32_t loop ; /* number of hash slots searched under this key */
uint32_t khash ; /* initialized if loop is nonzero */
uint32_t kpos ; /* initialized if loop is nonzero */
uint32_t hpos ; /* initialized if loop is nonzero */
uint32_t hslots ; /* initialized if loop is nonzero */
uint32_t dpos ; /* initialized if cdb_findnext() returns 1 */
uint32_t dlen ; /* initialized if cdb_findnext() returns 1 */
} ;
#define CDB_ZERO { .map = 0, .fd = -1, .size = 0, .loop = 0, .khash = 0, .kpos = 0, .hpos = 0, .hslots = 0, .dpos = 0, .dlen = 0 }
extern struct cdb const cdb_zero ;
extern void cdb_free (struct cdb *) ;
#define cdb_init(c, fd) (cdb_init_map(c, (fd), 1) ? 0 : -1)
extern int cdb_init_map (struct cdb *, int fd, int) ;
extern int cdb_mapfile (struct cdb *, char const *) ;
extern int cdb_read (struct cdb *, char *, unsigned int, uint32_t) ;
#define cdb_findstart(c) ((c)->loop = 0)
extern int cdb_findnext (struct cdb *, char const *, unsigned int) ;
#define cdb_find(c, s, len) (cdb_findstart(c), cdb_findnext(c, s, len))
#define cdb_datapos(c) ((c)->dpos)
#define cdb_datalen(c) ((c)->dlen)
#define cdb_keypos(c) ((c)->kpos)
#define cdb_keylen(c) ((c)->dpos - (c)->kpos)
#define cdb_traverse_init(c, kpos) (*(kpos) = 2048)
#define cdb_firstkey(c, kpos) (cdb_traverse_init(c, kpos), cdb_nextkey(c, kpos))
extern int cdb_nextkey (struct cdb *, uint32_t *) ;
extern int cdb_successor (struct cdb *, char const *, unsigned int) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/cdb_make.h 0000664 0000000 0000000 00000001266 13553351154 0021063 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef CDB_MAKE_H
#define CDB_MAKE_H
#include
#include
#include
#include
#include
typedef struct cdb_make cdb_make, *cdb_make_ref ;
struct cdb_make
{
genalloc hplist ; /* array of diuint32 */
uint32_t pos ;
buffer b ;
char buf[BUFFER_OUTSIZE] ;
} ;
#define CDB_MAKE_ZERO { .hplist = GENALLOC_ZERO, .pos = 2048, .b = BUFFER_INIT(&fd_writev, -1, 0, 0) }
extern int cdb_make_start (struct cdb_make *, int) ;
extern int cdb_make_add (struct cdb_make *, char const *, unsigned int, char const *, unsigned int) ;
extern int cdb_make_finish (struct cdb_make *) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/datastruct.h 0000664 0000000 0000000 00000000367 13553351154 0021515 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef DATASTRUCT_H
#define DATASTRUCT_H
#include
#include
#include
#include
#include
#include
#endif
skalibs-2.9.1.0/src/include/skalibs/direntry.h 0000664 0000000 0000000 00000000406 13553351154 0021171 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef DIRENTRY_H
#define DIRENTRY_H
#include
typedef struct dirent direntry, direntry_t, *direntry_ref, *direntry_t_ref ;
extern void dir_close (DIR *) ;
extern int dir_fd (DIR *) ; /* Solaris doesn't have dirfd() */
#endif
skalibs-2.9.1.0/src/include/skalibs/disize.h 0000664 0000000 0000000 00000000353 13553351154 0020621 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef DISIZE_H
#define 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.9.1.0/src/include/skalibs/diuint.h 0000664 0000000 0000000 00000000333 13553351154 0020624 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef DIUINT_H
#define 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.9.1.0/src/include/skalibs/diuint32.h 0000664 0000000 0000000 00000000372 13553351154 0020774 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef DIUINT32_H
#define 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.9.1.0/src/include/skalibs/djbtime.h 0000664 0000000 0000000 00000004551 13553351154 0020754 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef DJBTIME_H
#define DJBTIME_H
#include
#include
#include
#include
/* UTC <--> TAI conversions */
/* sysclock can be either TAI-10 or UTC */
extern int utc_from_tai (uint64_t *, tai_t const *) ;
extern int tai_from_utc (tai_t *, 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_t const *) ;
#define ntp_from_tain_g(u) ntp_from_tain((u), &STAMP)
extern int tain_from_ntp (tain_t *, 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_t, *localtmn_t_ref ;
struct localtmn_s
{
struct tm tm ;
uint32_t nano ;
} ;
extern int ltm64_from_tai (uint64_t *, tai_t const *) ;
extern int tai_from_ltm64 (tai_t *, 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_t const *, int) ;
extern int tai_from_localtm (tai_t *, struct tm const *) ;
extern int localtmn_from_tain (localtmn_t *, tain_t const *, int) ;
#define localtmn_from_tain_g(l, h) localtmn_from_tain(l, &STAMP, h)
extern int tain_from_localtmn (tain_t *, localtmn_t const *) ;
extern int localtmn_from_sysclock (localtmn_t *, tain_t const *, int) ;
extern int sysclock_from_localtmn (tain_t *, localtmn_t 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_t const *) ;
extern size_t localtmn_scan (char const *, localtmn_t *) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/djbunix.h 0000664 0000000 0000000 00000024700 13553351154 0020777 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef DJBUNIX_H
#define DJBUNIX_H
#include
#include
#include
#include
#include
#include
#include
#define DJBUNIX_FLAG_NB 0x01U
#define DJBUNIX_FLAG_COE 0x02U
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, DJBUNIX_FLAG_NB)
#define pipecoe(p) pipe_internal(p, DJBUNIX_FLAG_COE)
#define pipenbcoe(p) pipe_internal(p, DJBUNIX_FLAG_NB|DJBUNIX_FLAG_COE)
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 int fd_cat (int, int) ;
extern size_t fd_catn (int, int, size_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 int lock_ex (int) ;
extern int lock_exnb (int) ;
extern int lock_sh (int) ;
extern int lock_shnb (int) ;
extern int lock_un (int) ;
extern void lock_unx (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 openb_read (char const *) ;
extern int open_readb (char const *) ;
extern int open_excl (char const *) ;
extern int open_append (char const *) ;
extern int open_create (char const *) ;
extern int open_trunc (char const *) ;
extern int open_write (char const *) ;
extern int socket_internal (int, int, int, unsigned int) ;
extern int socketpair_internal (int, int, int, unsigned int, int *) ;
extern size_t path_canonicalize (char *, char const *, int) ;
extern int pathexec_env (char const *, char const *) ;
extern void pathexec_r (char const *const *, char const *const *, size_t, char const *, size_t) ;
extern void pathexec_r_name (char const *, char const *const *, char const *const *, size_t, char const *, size_t) ;
extern void pathexec_fromenv (char const *const *, char const *const *, size_t) ;
extern void pathexec_run (char const *, char const *const *, char const *const *) ;
extern void pathexec0_run (char const *const *, char const *const *) ;
extern void pathexec (char const *const *) ;
extern void pathexec0 (char const *const *) ;
extern void xpathexec_r (char const *const *, char const *const *, size_t, char const *, size_t) gccattr_noreturn ;
extern void xpathexec_r_name (char const *, char const *const *, char const *const *, size_t, char const *, size_t) gccattr_noreturn ;
extern void xpathexec_fromenv (char const *const *, char const *const *, size_t) gccattr_noreturn ;
extern void xexecvep (char const *, char const *const *, char const *const *, char const *) gccattr_noreturn ;
extern void xpathexec_run (char const *, char const *const *, char const *const *) gccattr_noreturn ;
extern void xpathexec0_run (char const *const *, char const *const *) gccattr_noreturn ;
extern void xpathexec (char const *const *) gccattr_noreturn ;
extern void xpathexec0 (char const *const *) gccattr_noreturn ;
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_reap (pid_t *, unsigned 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 *) ;
extern int slurp (stralloc *, int) ;
extern int openslurpclose (stralloc *, char const *) ;
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_unsafe_internal(fd, s, (n), 0, 0, 0)
#define writenclose_unsafe_sync(fd, s, n) writenclose_unsafe_internal(fd, s, (n), 0, 0, 1)
#define writenclose_unsafe_devino(fd, s, n, dev, ino) writenclose_unsafe_internal(fd, s, n, dev, (ino), 0)
#define writenclose_unsafe_devino_sync(fd, s, n, dev, ino) writenclose_unsafe_internal(fd, s, n, dev, (ino), 1)
extern int writenclose_unsafe_internal (int, char const *, size_t, dev_t *, ino_t *, int) ;
#define openwritenclose_unsafe(f, s, n) openwritenclose_unsafe_internal(f, s, (n), 0, 0, 0)
#define openwritenclose_unsafe_sync(f, s, n) openwritenclose_unsafe_internal(f, s, (n), 0, 0, 1)
#define openwritenclose_unsafe_devino(f, s, n, dev, ino) openwritenclose_unsafe_internal(f, s, n, dev, (ino), 0)
#define openwritenclose_unsafe_devino_sync(f, s, n, dev, ino) openwritenclose_unsafe_internal(f, s, n, dev, (ino), 1)
extern int openwritenclose_unsafe_internal (char const *, char const *, size_t, dev_t *, ino_t *, int) ;
#define openwritenclose_suffix(f, s, n, t) openwritenclose_suffix_internal(f, s, n, 0, 0, 0, t)
#define openwritenclose_suffix_sync(f, s, n, t) openwritenclose_suffix_internal(f, s, n, 0, 0, 1, t)
#define openwritenclose_suffix_devino(f, s, n, t, dev, ino) openwritenclose_suffix_internal(f, s, n, dev, (ino), 0, t)
#define openwritenclose_suffix_devino_sync(f, s, n, t, dev, ino) openwritenclose_suffix_internal(f, s, n, dev, (ino), 1, t)
extern int openwritenclose_suffix_internal (char const *, char const *, size_t, dev_t *, ino_t *, int, char const *) ;
#define openwritenclose(f, s, n) openwritenclose_internal(f, s, (n), 0, 0, 0)
#define openwritenclose_sync(f, s, n) openwritenclose_internal(f, s, (n), 0, 0, 1)
#define openwritenclose_devino(f, s, n, dev, ino) openwritenclose_internal(f, s, n, dev, (ino), 0)
#define openwritenclose_devino_sync(f, s, n, dev, ino) openwritenclose_internal(f, s, n, dev, (ino), 1)
extern int openwritenclose_internal (char const *, char const *, size_t, dev_t *, ino_t *, int) ;
#define writenvclose_unsafe(fd, v, n) writevnclose_unsafe_internal(fd, v, (n), 0, 0, 0)
#define writevnclose_unsafe_sync(fd, v, n) writevnclose_unsafe_internal(fd, v, (n), 0, 0, 1)
#define writevnclose_unsafe_devino(fd, v, n, dev, ino) writevnclose_unsafe_internal(fd, v, n, dev, (ino), 0)
#define writevnclose_unsafe_devino_sync(fd, v, n, dev, ino) writevnclose_unsafe_internal(fd, v, n, dev, (ino), 1)
extern int writevnclose_unsafe_internal (int, struct iovec const *, unsigned int, dev_t *, ino_t *, int) ;
#define openwritevnclose_unsafe(f, v, n) openwritevnclose_unsafe_internal(f, v, (n), 0, 0, 0)
#define openwritevnclose_unsafe_sync(f, v, n) openwritevnclose_unsafe_internal(f, v, (n), 0, 0, 1)
#define openwritevnclose_unsafe_devino(f, v, n, dev, ino) openwritevnclose_unsafe_internal(f, v, n, dev, (ino), 0)
#define openwritevnclose_unsafe_devino_sync(f, v, n, dev, ino) openwritevnclose_unsafe_internal(f, v, n, dev, (ino), 1)
extern int openwritevnclose_unsafe_internal (char const *, struct iovec const *, unsigned int, dev_t *, ino_t *, int) ;
#define openwritevnclose_suffix(f, v, n, t) openwritevnclose_suffix_internal(f, v, n, 0, 0, 0, t)
#define openwritevnclose_suffix_sync(f, v, n, t) openwritevnclose_suffix_internal(f, v, n, 0, 0, 1, t)
#define openwritevnclose_suffix_devino(f, v, n, t, dev, ino) openwritevnclose_suffix_internal(f, v, n, dev, (ino), 0, t)
#define openwritevnclose_suffix_devino_sync(f, v, n, t, dev, ino) openwritevnclose_suffix_internal(f, v, n, dev, (ino), 1, t)
extern int openwritevnclose_suffix_internal (char const *, struct iovec const *, unsigned int, dev_t *, ino_t *, int, char const *) ;
#define openwritevnclose(f, v, n) openwritevnclose_internal(f, v, (n), 0, 0, 0)
#define openwritevnclose_sync(f, v, n) openwritevnclose_internal(f, v, (n), 0, 0, 1)
#define openwritevnclose_devino(f, v, n, dev, ino) openwritevnclose_internal(f, v, n, dev, (ino), 0)
#define openwritevnclose_devino_sync(f, v, n, dev, ino) openwritevnclose_internal(f, v, n, dev, (ino), 1)
extern int openwritevnclose_internal (char const *, struct iovec const *, unsigned int, dev_t *, ino_t *, 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 hiercopy (char const *, char const *) ;
extern int hiercopy_tmp (char const *, char const *, stralloc *) ;
/* 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.
* uses posix_spawn() if available, else uses fork+exec
* 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 *, unsigned int) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/env.h 0000664 0000000 0000000 00000002432 13553351154 0020122 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 size_t env_merge (char const **, size_t, char const *const *, size_t, char const *, size_t) ;
extern int env_string (stralloc *, char const *const *, size_t) ;
#define SKALIBS_ENVDIR_VERBATIM 0x01
#define SKALIBS_ENVDIR_NOCHOMP 0x02
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.9.1.0/src/include/skalibs/envalloc.h 0000664 0000000 0000000 00000000623 13553351154 0021135 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef ENVALLOC_H
#define 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.9.1.0/src/include/skalibs/environ.h 0000664 0000000 0000000 00000000131 13553351154 0021004 0 ustar 00root root 0000000 0000000 /* ISC license. */
/* This header is being deprecated */
#include
skalibs-2.9.1.0/src/include/skalibs/error.h 0000664 0000000 0000000 00000000421 13553351154 0020457 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.9.1.0/src/include/skalibs/fmtscan.h 0000664 0000000 0000000 00000002401 13553351154 0020761 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef FMTSCAN_H
#define 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.9.1.0/src/include/skalibs/functypes.h 0000664 0000000 0000000 00000002720 13553351154 0021352 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef FUNCTYPES_H
#define FUNCTYPES_H
#include
#include
#include
typedef int uintcmpfunc_t (unsigned int, unsigned int, void *) ;
typedef uintcmpfunc_t *uintcmpfunc_t_ref ;
typedef int uint32cmpfunc_t (uint32_t, uint32_t, void *) ;
typedef uint32cmpfunc_t *uint32cmpfunc_t_ref ;
typedef int cmpfunc_t (void const *, void const *, void *) ;
typedef cmpfunc_t *cmpfunc_t_ref ;
typedef void *dtokfunc_t (uint32_t, void *) ;
typedef dtokfunc_t *dtokfunc_t_ref ;
typedef int iterfunc_t (char *, void *) ;
typedef iterfunc_t *iterfunc_t_ref ;
typedef void freefunc_t (void *) ;
typedef freefunc_t *freefunc_t_ref ;
typedef int initfunc_t (void *) ;
typedef initfunc_t *initfunc_t_ref ;
typedef ssize_t getfunc_t (void *) ;
typedef getfunc_t *getfunc_t_ref ;
typedef size_t ugetfunc_t (void *) ;
typedef ugetfunc_t *ugetfunc_t_ref ;
typedef ssize_t iofunc_t (int, char *, size_t) ;
typedef iofunc_t *iofunc_t_ref ;
typedef ssize_t iovfunc_t (int, struct iovec const *, unsigned int) ;
typedef iovfunc_t *iovfunc_t_ref ;
typedef size_t alliofunc_t (int, char *, size_t) ;
typedef alliofunc_t *alliofunc_t_ref ;
typedef size_t alliovfunc_t (int, struct iovec const *, unsigned int) ;
typedef alliovfunc_t *alliovfunc_t_ref ;
typedef int createfunc_t (char const *, mode_t, void *) ;
typedef createfunc_t *createfunc_t_ref ;
typedef int linkfunc_t (char const *, char const *) ;
typedef linkfunc_t *linkfunc_t_ref ;
#endif
skalibs-2.9.1.0/src/include/skalibs/gccattributes.h 0000664 0000000 0000000 00000002773 13553351154 0022205 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef GCCATTRIBUTES_H
#define GCCATTRIBUTES_H
#ifdef __GNUC__
#define gccattr_noreturn __attribute__((__noreturn__))
#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__))
# 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_noinline
#define gccattr_inline
#define gccattr_const
#define gccattr_unused
#define gccattr_used
#define gccattr_weak
#define gccattr_aligned
#define gccattr_malloc
#define gccattr_pure
#define gccattr_deprecated
#endif
#ifdef GCCATTR_COMPAT_0_22
#define _a_noreturn gccattr_noreturn
#define _a_noinline gccattr_noinline
#define _a_inline gccattr_inline
#define _a_const gccattr_const
#define _a_unused gccattr_unused
#define _a_used gccattr_used
#define _a_weak gccattr_weak
#define _a_aligned gccattr_aligned
#define _a_malloc gccattr_malloc
#define _a_pure gccattr_pure
#define _a_deprecated gccattr_deprecated
#endif
#endif
skalibs-2.9.1.0/src/include/skalibs/genalloc.h 0000664 0000000 0000000 00000003211 13553351154 0021112 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef GENALLOC_H
#define 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, (freefunc_t_ref)(f), sizeof(type))
extern void genalloc_deepfree_size (genalloc *, freefunc_t_ref, size_t) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/genqdyn.h 0000664 0000000 0000000 00000001725 13553351154 0021003 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)->esize - (g)->head) ;
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)->esize * (g)->head))
#define genqdyn_peek(g) GENQDYN_PEEK(void, (g))
extern int genqdyn_pop(genqdyn *) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/genset.h 0000664 0000000 0000000 00000003050 13553351154 0020614 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef GENSET_H
#define 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, iterfunc_t_ref, void *) ;
#define genset_iter(g, f, stuff) genset_iter_nocancel(g, (g)->max, f, stuff)
extern int genset_iter_withcancel (genset *, iterfunc_t_ref, iterfunc_t_ref, void *) ;
extern void genset_deepfree (genset *, freefunc_t_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.9.1.0/src/include/skalibs/gensetdyn.h 0000664 0000000 0000000 00000003202 13553351154 0021326 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef GENSETDYN_H
#define 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 *, freefunc_t_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, iterfunc_t_ref, void *) ;
#define gensetdyn_iter(g, f, stuff) gensetdyn_iter_nocancel(g, gensetdyn_n(g), f, stuff)
extern int gensetdyn_iter_withcancel (gensetdyn *, iterfunc_t_ref, iterfunc_t_ref, void *) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/genwrite.h 0000664 0000000 0000000 00000002407 13553351154 0021160 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef GENWRITE_H
#define GENWRITE_H
#include
typedef ssize_t genwrite_put_func_t (void *, char const *, size_t) ;
typedef genwrite_put_func_t *genwrite_put_func_t_ref ;
typedef int genwrite_flush_func_t (void *) ;
typedef genwrite_flush_func_t *genwrite_flush_func_t_ref ;
typedef struct genwrite_s genwrite_t, *genwrite_t_ref ;
struct genwrite_s
{
genwrite_put_func_t_ref put ;
genwrite_flush_func_t_ref flush ;
void *target ;
} ;
#define GENWRITE_ZERO { .put = 0, .flush = 0, .target = 0 }
extern genwrite_put_func_t genwrite_put_stralloc ;
extern genwrite_flush_func_t genwrite_flush_stralloc ;
extern genwrite_put_func_t genwrite_put_buffer ;
extern genwrite_flush_func_t genwrite_flush_buffer ;
extern genwrite_put_func_t genwrite_put_bufalloc ;
extern genwrite_flush_func_t 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_t genwrite_stdout ;
extern genwrite_t genwrite_stderr ;
#endif
skalibs-2.9.1.0/src/include/skalibs/getpeereid.h 0000664 0000000 0000000 00000000131 13553351154 0021441 0 ustar 00root root 0000000 0000000 /* ISC license. */
/* This header is being deprecated */
#include
skalibs-2.9.1.0/src/include/skalibs/iobuffer.h 0000664 0000000 0000000 00000010513 13553351154 0021132 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef IOBUFFER_H
#define IOBUFFER_H
#define IOBUFFER_SIZE 65536U
/* iobufferu */
#include
#include
#include
#define IOBUFFERU_SIZE (IOBUFFER_SIZE+1)
typedef struct iobufferu_s iobufferu, *iobufferu_ref ;
struct iobufferu_s
{
buffer b[2] ;
char *buf ;
} ;
extern int iobufferu_init (iobufferu *, int, int) ;
extern ssize_t iobufferu_fill (iobufferu *) ;
extern int iobufferu_flush (iobufferu *) ;
extern void iobufferu_finish (iobufferu *) ;
#define iobufferu_len(u) buffer_len(&(u)->b[0])
#define iobufferu_available(u) buffer_available(&(u)->b[1])
#define iobufferu_isempty(u) buffer_isempty(&(u)->b[0])
#define iobufferu_isfull(u) buffer_isfull(&(u)->b[1])
#define iobufferu_fd(u, h) buffer_fd((u)->b[h])
#define iobufferu_isreadable(u) iobufferu_available(u)
#define iobufferu_iswritable(u) iobufferu_len(u)
#define iobufferu_nonblock(u, h) ndelay_on(iobufferu_fd(u, h))
#define iobufferu_block(u, h) ndelay_off(iobufferu_fd(u, h))
#define iobufferu_nbstate(u, h, j) (j ? iobufferu_nonblock(u, h) : iobufferu_block(u, h))
/* iobufferk */
#define IOBUFFERK_SIZE IOBUFFER_SIZE
typedef struct iobufferk_s iobufferk, *iobufferk_ref ;
struct iobufferk_s
{
int fd[2] ;
int p[2] ;
unsigned int n ;
unsigned int type : 2 ;
unsigned int nb : 2 ;
} ;
typedef int iobufferk_output_func_t (iobufferk *) ;
typedef iobufferk_output_func_t *iobufferk_output_func_t_ref ;
typedef ssize_t iobufferk_input_func_t (iobufferk *) ;
typedef iobufferk_input_func_t *iobufferk_input_func_t_ref ;
typedef void iobufferk_finish_func_t (iobufferk *) ;
typedef iobufferk_finish_func_t *iobufferk_finish_func_t_ref ;
extern iobufferk_output_func_t iobufferk_isworking ;
extern int iobufferk_init (iobufferk *, int, int) ;
extern iobufferk_input_func_t_ref const iobufferk_fill_f[4] ;
extern iobufferk_output_func_t_ref const iobufferk_flush_f[4] ;
extern iobufferk_finish_func_t_ref const iobufferk_finish_f[4] ;
#define iobufferk_fill(k) (*iobufferk_fill_f[(k)->type])(k)
#define iobufferk_flush(k) (*iobufferk_flush_f[(k)->type])(k)
#define iobufferk_finish(k) (*iobufferk_finish_f[(k)->type])(k)
#define iobufferk_len(k) ((k)->n)
#define iobufferk_available(k) (IOBUFFERK_SIZE - (k)->n)
#define iobufferk_isempty(k) (!iobufferk_len(k))
#define iobufferk_isfull(k) (!iobufferk_available(k))
#define iobufferk_fd(k, h) ((k)->fd[h])
#define iobufferk_isreadable(k) iobufferk_available(k)
#define iobufferk_iswritable(k) iobufferk_len(k)
#define iobufferk_nonblock(k, h) ((k)->nb |= (1 << (h)), 0)
#define iobufferk_block(k, h) ((k)->nb &= (3 - (1 << (h))), 0)
#define iobufferk_nbstate(k, h, j) (j ? iobufferk_nonblock(k, h) : iobufferk_block(k, h))
/* iobuffer */
typedef union iobufferku_u iobufferku, *iobufferku_ref ;
union iobufferku_u
{
iobufferk k ;
iobufferu u ;
} ;
typedef struct iobuffer_s iobuffer, *iobuffer_ref ;
struct iobuffer_s
{
iobufferku x ;
unsigned int isk : 1 ;
} ;
extern int iobuffer_ufromk (iobufferu *, iobufferk *) ;
extern int iobuffer_kfromu (iobufferk *, iobufferu *) ;
extern int iobuffer_salvage (iobuffer *) ;
extern int iobuffer_init (iobuffer *, int, int) ;
extern ssize_t iobuffer_fill (iobuffer *) ;
extern int iobuffer_flush (iobuffer *) ;
#define iobuffer_finish(b) ((b)->isk ? iobufferk_finish(&(b)->x.k) : iobufferu_finish(&(b)->x.u))
#define iobuffer_len(b) ((b)->isk ? iobufferk_len(&(b)->x.k) : iobufferu_len(&(b)->x.u))
#define iobuffer_available(b) ((b)->isk ? iobufferk_available(&(b)->x.k) : iobufferu_available(&(b)->x.u))
#define iobuffer_isempty(b) ((b)->isk ? iobufferk_isempty(&(b)->x.k) : iobufferu_isempty(&(b)->x.u))
#define iobuffer_isfull(b) ((b)->isk ? iobufferk_isfull(&(b)->x.k) : iobufferu_isfull(&(b)->x.u))
#define iobuffer_fd(b, h) ((b)->isk ? iobufferk_fd(&(b)->x.k, h) : iobufferu_fd(&(b)->x.u, h))
#define iobuffer_isreadable(b) ((b)->isk ? iobufferk_isreadable(&(b)->x.k) : iobufferu_isreadable(&(b)->x.u))
#define iobuffer_iswritable(b) ((b)->isk ? iobufferk_iswritable(&(b)->x.k) : iobufferu_iswritable(&(b)->x.u))
#define iobuffer_nonblock(b, h) ((b)->isk ? iobufferk_nonblock(&(b)->x.k, h) : iobufferu_nonblock(&(b)->x.u, h))
#define iobuffer_block(b, h) ((b)->isk ? iobufferk_block(&(b)->x.k, h) : iobufferu_block(&(b)->x.u, h))
#define iobuffer_nbstate(b, h, j) ((b)->isk ? iobufferk_nbstate(&(b)->x.k, h, j) : iobufferu_nbstate(&(b)->x.u, h, j))
#endif
skalibs-2.9.1.0/src/include/skalibs/iopause.h 0000664 0000000 0000000 00000001567 13553351154 0021007 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef IOPAUSE_H
#define 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_t (iopause_fd *, unsigned int, tain_t const *, tain_t const *) ;
typedef iopause_func_t *iopause_func_t_ref ;
extern iopause_func_t iopause_select ;
extern iopause_func_t iopause_poll ;
extern iopause_func_t iopause_ppoll ;
extern iopause_func_t_ref const iopause_ ;
#define iopause (*iopause_)
extern int iopause_stamp (iopause_fd *, unsigned int, tain_t const *, tain_t *) ;
#define iopause_g(x, n, deadline) iopause_stamp(x, n, (deadline), &STAMP)
extern void deepsleepuntil (tain_t const *, tain_t *) ;
#define deepsleepuntil_g(deadline) deepsleepuntil((deadline), &STAMP)
#endif
skalibs-2.9.1.0/src/include/skalibs/kolbak.h 0000664 0000000 0000000 00000001633 13553351154 0020577 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef KOLBAK_H
#define KOLBAK_H
#include
#include
typedef struct kolbak_closure_s kolbak_closure_t, *kolbak_closure_t_ref ;
struct kolbak_closure_s
{
unixmessage_handler_func_t_ref f ;
void *data ;
} ;
#define KOLBAK_CLOSURE_ZERO { .f = 0, .data = 0 }
typedef struct kolbak_queue_s kolbak_queue_t, *kolbak_queue_t_ref ;
struct kolbak_queue_s
{
kolbak_closure_t *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_t *, kolbak_closure_t *, size_t) ;
extern int kolbak_enqueue (kolbak_queue_t *, unixmessage_handler_func_t_ref, void *) ;
extern int kolbak_unenqueue (kolbak_queue_t *) ;
extern int kolbak_call (unixmessage_t const *, kolbak_queue_t *) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/lolstdio.h 0000664 0000000 0000000 00000001272 13553351154 0021164 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef LOLSTDIO_H
#define 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.9.1.0/src/include/skalibs/md5.h 0000664 0000000 0000000 00000001220 13553351154 0020011 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef MD5_H
#define MD5_H
#include
#include
typedef struct MD5Schedule MD5Schedule, *MD5Schedule_ref ;
struct MD5Schedule
{
uint32_t buf[4] ;
uint32_t bits[2] ;
unsigned char in[64] ;
} ;
#define MD5_INIT() { .buf = { 0x67452301U, 0xefcdab89U, 0x98badcfeU, 0x10325476U }, .bits = { 0, 0 }, .in = "\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\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 md5_init (MD5Schedule *) ;
extern void md5_update (MD5Schedule *, char const *, size_t) ;
extern void md5_final (MD5Schedule *, char * /* 16 chars */) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/netstring.h 0000664 0000000 0000000 00000001632 13553351154 0021350 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef NETSTRING_H
#define 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.9.1.0/src/include/skalibs/nonposix.h 0000664 0000000 0000000 00000003252 13553351154 0021210 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__)
/* 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.9.1.0/src/include/skalibs/nsig.h 0000664 0000000 0000000 00000000610 13553351154 0020266 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 NSIG_H
#include
#define SKALIBS_DEFAULT_NSIG 65
#ifndef NSIG
# define NSIG SKALIBS_DEFAULT_NSIG
#endif
/* OpenBSD is a fucking snowflake */
#ifdef __OpenBSD__
#define SKALIBS_NSIG (NSIG-1)
#else
#define SKALIBS_NSIG NSIG
#endif
#endif
skalibs-2.9.1.0/src/include/skalibs/posixishard.h 0000664 0000000 0000000 00000001347 13553351154 0021673 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_POSIXISHARD_H
#define SKALIBS_POSIXISHARD_H
#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
#endif
skalibs-2.9.1.0/src/include/skalibs/posixplz.h 0000664 0000000 0000000 00000002662 13553351154 0021227 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 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 pid_t doublefork (void) ;
extern int touch (char const *) ;
extern int mkfiletemp (char *, createfunc_t_ref, mode_t, void *) ;
extern int mklinktemp (char const *, char *, linkfunc_t_ref) ;
extern int mkptemp (char *) ;
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.9.1.0/src/include/skalibs/random.h 0000664 0000000 0000000 00000001043 13553351154 0020607 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef RANDOM_H
#define RANDOM_H
#include
#include
#include
extern void random_makeseed (char *) ; /* fills 160 bytes */
extern int random_init (void) ;
extern void random_finish (void) ;
extern unsigned char random_char (void) ;
extern void random_string (char *, size_t) ;
extern uint32_t random_uint32 (uint32_t) ;
extern void random_name (char *, size_t) ;
extern void random_unsort (char *, size_t, size_t) ;
extern int random_sauniquename (stralloc *, size_t) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/rc4.h 0000664 0000000 0000000 00000000561 13553351154 0020023 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef RC4_H
#define RC4_H
#include
#define RC4_THROWAWAY 128
typedef struct RC4Schedule RC4Schedule, *RC4Schedule_ref ;
struct RC4Schedule
{
unsigned char tab[256] ;
unsigned char x, y ;
} ;
extern void rc4_init (RC4Schedule *, char const *, size_t) ;
extern void rc4 (RC4Schedule *, char const *, char *, size_t) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/segfault.h 0000664 0000000 0000000 00000000230 13553351154 0021136 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SEGFAULT_H
#define SEGFAULT_H
extern int sigsegv (void) ;
extern int sigfpe (void) ;
#define segfault() sigsegv()
#endif
skalibs-2.9.1.0/src/include/skalibs/selfpipe.h 0000664 0000000 0000000 00000000466 13553351154 0021146 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SELFPIPE_H
#define SELFPIPE_H
#include
extern int selfpipe_init (void) ;
extern int selfpipe_trap (int) ;
extern int selfpipe_untrap (int) ;
extern int selfpipe_trapset (sigset_t const *) ;
extern int selfpipe_read (void) ;
extern void selfpipe_finish (void) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/setgroups.h 0000664 0000000 0000000 00000001473 13553351154 0021371 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.9.1.0/src/include/skalibs/sgetopt.h 0000664 0000000 0000000 00000002120 13553351154 0021011 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SGETOPT_H
#define SGETOPT_H
/* reentrant */
typedef struct subgetopt_s subgetopt_t, *subgetopt_t_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_t *) ;
/* non-reentrant */
extern int sgetopt_r (int, char const *const *, char const *, subgetopt_t *) ;
extern subgetopt_t subgetopt_here ;
#define subgetopt(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.9.1.0/src/include/skalibs/sha1.h 0000664 0000000 0000000 00000001162 13553351154 0020165 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SHA1_H
#define 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.9.1.0/src/include/skalibs/sha256.h 0000664 0000000 0000000 00000002066 13553351154 0020345 0 ustar 00root root 0000000 0000000 /* ISC license. */
/* SHA256 routines */
/* Written by David Madore () */
/* Adapted by Laurent Bercot. */
/* This version last modified 2010-01-08 */
/* Note: these routines do not depend on endianness. */
#ifndef SHA256_H
#define SHA256_H
#include
#include
typedef struct SHA256Schedule_s SHA256Schedule, *SHA256Schedule_ref ;
struct SHA256Schedule_s
{
uint32_t buf[8] ; /* The eight chaining variables */
uint32_t bits[2] ; /* Count number of message bits */
uint32_t in[16] ; /* Data being fed in */
unsigned int b ; /* Our position within the 512 bits (always between 0 and 63) */
} ;
#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.9.1.0/src/include/skalibs/sha512.h 0000664 0000000 0000000 00000001250 13553351154 0020332 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SHA512_H
#define 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.9.1.0/src/include/skalibs/sig.h 0000664 0000000 0000000 00000002556 13553351154 0020123 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SIG_H
#define SIG_H
#include
#include
#include
typedef void skasighandler_t (int) ;
typedef skasighandler_t *skasighandler_t_ref ;
struct skasigaction
{
skasighandler_t_ref handler ;
unsigned int flags : 2 ;
} ;
#define SKASA_MASKALL 0x01
#define SKASA_NOCLDSTOP 0x02
extern struct skasigaction const SKASIG_DFL ;
extern struct skasigaction const SKASIG_IGN ;
extern int skasigaction (int, struct skasigaction const *, struct skasigaction *) ;
#define sig_catcha(sig, ac) skasigaction(sig, (ac), 0)
#define sig_restore(sig) skasigaction((sig), &SKASIG_DFL, 0)
extern void sig_restoreto (sigset_t const *, unsigned int) ;
extern int sig_catch (int, skasighandler_t_ref) ;
#define sig_ignore(sig) sig_catcha((sig), &SKASIG_IGN)
#define sig_uncatch(sig) sig_restore(sig)
#define SIGSTACKSIZE 16
extern int sig_pusha (int, struct skasigaction const *) ;
extern int sig_pop (int) ;
extern int sig_push (int, skasighandler_t_ref) ;
extern void sig_block (int) ;
extern void sig_blockset (sigset_t const *) ;
extern void sig_unblock (int) ;
extern void sig_blocknone (void) ;
extern void sig_pause (void) ;
extern void sig_shield (void) ;
extern void sig_unshield (void) ;
extern char const *sig_name (int) ;
extern int sig_number (char const *) ;
extern size_t sig0_scan (char const *, int *) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/siovec.h 0000664 0000000 0000000 00000001410 13553351154 0020615 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SIOVEC_H
#define 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) ;
#endif
skalibs-2.9.1.0/src/include/skalibs/skaclient.h 0000664 0000000 0000000 00000025145 13553351154 0021315 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_t const *, unixmessage_sender_t *, unixmessage_sender_t *, char const *, size_t, char const *, size_t) ;
extern int skaclient_server_bidi_ack (unixmessage_t const *, unixmessage_sender_t *, unixmessage_sender_t *, unixmessage_receiver_t *, char *, size_t, char *, size_t, char const *, size_t, char const *, size_t) ;
extern int skaclient_server_init (unixmessage_receiver_t *, unixmessage_sender_t *, unixmessage_sender_t *, char const *, size_t, char const *, size_t, tain_t const *, tain_t *) ;
#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_t q[qlen] ; }
typedef skaclient_buffer_type(UNIXMESSAGE_BUFSIZE, UNIXMESSAGE_AUXBUFSIZE, UNIXMESSAGE_BUFSIZE, UNIXMESSAGE_AUXBUFSIZE, SKACLIENT_KOLBAK_SIZE) skaclient_buffer_t, *skaclient_buffer_t_ref ;
/* User structure */
typedef struct skaclient_s skaclient_t, *skaclient_t_ref ;
struct skaclient_s
{
unixmessage_receiver_t syncin ;
unixmessage_sender_t syncout ;
kolbak_queue_t kq ;
unixmessage_receiver_t asyncin ;
unixmessage_sender_t 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_t const skaclient_zero ;
/* Callback data for init */
typedef struct skaclient_cbdata_s skaclient_cbdata_t, *skaclient_cbdata_t_ref ;
struct skaclient_cbdata_s
{
skaclient_t *a ;
char const *after ;
size_t afterlen ;
} ;
/* Starting and ending */
extern void skaclient_end (skaclient_t *) ;
extern int skaclient_start_async (skaclient_t *, char *, size_t, char *, size_t, char *, size_t, char *, size_t, kolbak_closure_t *, size_t, char const *, uint32_t, char const *, size_t, char const *, size_t, skaclient_cbdata_t *) ;
#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_t *, char *, size_t, char *, size_t, char *, size_t, char *, size_t, kolbak_closure_t *, size_t, char const *, char const *const *, char const *const *, uint32_t, char const *, size_t, char const *, size_t, skaclient_cbdata_t *) ;
#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_t), prog, argv, envp, options, before, beforelen, after, afterlen, blah)
extern int skaclient_start (skaclient_t *, char *, size_t, char *, size_t, char *, size_t, char *, size_t, kolbak_closure_t *, size_t, char const *, uint32_t, char const *, size_t, char const *, size_t, tain_t const *, tain_t *) ;
#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_t), 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_t *, char *, size_t, char *, size_t, char *, size_t, char *, size_t, kolbak_closure_t *, size_t, char const *, char const *const *, char const *const *, uint32_t, char const *, size_t, char const *, size_t, tain_t const *, tain_t *) ;
#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_t), 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_t *, unixmessage_t const *, unsigned char const *, unixmessage_handler_func_t *, 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_t *, unixmessage_v_t const *, unsigned char const *, unixmessage_handler_func_t *, void *) ;
#define skaclient_putmsgv(a, m, cb, result) skaclient_putmsgv_and_close(a, m, unixmessage_bits_closenone, cb, result)
extern int skaclient_put (skaclient_t *, char const *, size_t, unixmessage_handler_func_t *, void *) ;
extern int skaclient_putv (skaclient_t *, struct iovec const *, unsigned int, unixmessage_handler_func_t *, void *) ;
/* Writing and flushing */
extern int skaclient_sendmsg_and_close (skaclient_t *, unixmessage_t const *, unsigned char const *, unixmessage_handler_func_t *, void *, tain_t const *, tain_t *) ;
#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_t *, unixmessage_v_t const *, unsigned char const *, unixmessage_handler_func_t *, void *, tain_t const *, tain_t *) ;
#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_t *, char const *, size_t, unixmessage_handler_func_t *, void *, tain_t const *, tain_t *) ;
#define skaclient_send_g(a, s, len, cb, result, deadline) skaclient_send(a, s, len, cb, result, (deadline), &STAMP)
extern int skaclient_sendv (skaclient_t *, struct iovec const *, unsigned int, unixmessage_handler_func_t *, void *, tain_t const *, tain_t *) ;
#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_t *)&kolbak_call, &(a)->kq)
#define skaclient_timed_supdate(a, deadline, stamp) unixmessage_timed_handle(&(a)->syncin, (unixmessage_handler_func_t *)&kolbak_call, &(a)->kq, deadline, stamp)
#define skaclient_timed_supdate_g(a, deadline) skaclient_timed_supdate(a, (deadline), &STAMP)
extern int skaclient_syncify (skaclient_t *, tain_t const *, tain_t *) ;
#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_t 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.9.1.0/src/include/skalibs/skalibs.h 0000664 0000000 0000000 00000001132 13553351154 0020756 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/posixishard.h: workarounds for failures to respect POSIX
*/
#include
#include
#include
#include
#include
#include
#include
#endif
skalibs-2.9.1.0/src/include/skalibs/skamisc.h 0000664 0000000 0000000 00000002701 13553351154 0020763 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKAMISC_H
#define 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 (stralloc *, char const *, size_t) ;
extern int string_quote_nodelim (stralloc *, char const *, size_t) ;
extern int string_quote_nodelim_mustquote (stralloc *, char const *, size_t, char const *, size_t) ;
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 *) ;
#define skaoffsetof(n, s, field) do { s sofoftmp ; *(n) = (unsigned char *)&sofoftmp->field - (unsigned char *)&sofoftmp ; } while (0)
#endif
skalibs-2.9.1.0/src/include/skalibs/socket.h 0000664 0000000 0000000 00000014666 13553351154 0020636 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SOCKET_H
#define SOCKET_H
#include
#include
#include
#include
#include
#include
typedef ssize_t socket_io_func_t (int, char *, size_t, char *, uint16_t *) ;
typedef socket_io_func_t *socket_io_func_t_ref ;
/* INET and INET6 domain socket operations */
#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(DJBUNIX_FLAG_NB)
#define socket_tcp4_coe() socket_tcp4_internal(DJBUNIX_FLAG_COE)
#define socket_tcp4_nbcoe() socket_tcp4_internal(DJBUNIX_FLAG_NB|DJBUNIX_FLAG_COE)
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(DJBUNIX_FLAG_NB)
#define socket_tcp6_coe() socket_tcp6_internal(DJBUNIX_FLAG_COE)
#define socket_tcp6_nbcoe() socket_tcp6_internal(DJBUNIX_FLAG_NB|DJBUNIX_FLAG_COE)
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(DJBUNIX_FLAG_NB)
#define socket_udp4_coe() socket_udp4_internal(DJBUNIX_FLAG_COE)
#define socket_udp4_nbcoe() socket_udp4_internal(DJBUNIX_FLAG_NB|DJBUNIX_FLAG_COE)
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(DJBUNIX_FLAG_NB)
#define socket_udp6_coe() socket_udp6_internal(DJBUNIX_FLAG_COE)
#define socket_udp6_nbcoe() socket_udp6_internal(DJBUNIX_FLAG_NB|DJBUNIX_FLAG_COE)
extern int socket_udp6_internal (unsigned int) ;
extern int socket_waitconn (int, tain_t const *, tain_t *) ;
#define socket_waitconn_g(fd, deadline) socket_waitconn(fd, (deadline), &STAMP)
extern int socket_deadlineconnstamp4 (int, char const *, uint16_t, tain_t const *, tain_t *) ;
#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_t const *, tain_t *) ;
#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_t const *, tain_t *) ;
#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), DJBUNIX_FLAG_NB)
#define socket_accept4_coe(s, ip, port) socket_accept4_internal(s, ip, (port), DJBUNIX_FLAG_COE)
#define socket_accept4_nbcoe(s, ip, port) socket_accept4_internal(s, ip, (port), DJBUNIX_FLAG_NB|DJBUNIX_FLAG_COE)
extern int socket_accept4_internal (int, char *, uint16_t *, unsigned int) ;
extern socket_io_func_t socket_recv4 ;
extern ssize_t socket_send4 (int, char const *, size_t, char const *, uint16_t) ;
extern socket_io_func_t socket_ioloop_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), DJBUNIX_FLAG_NB)
#define socket_accept6_coe(s, ip6, port) socket_accept6_internal(s, ip6, (port), DJBUNIX_FLAG_COE)
#define socket_accept6_nbcoe(s, ip6, port) socket_accept6_internal(s, ip6, (port), DJBUNIX_FLAG_NB|DJBUNIX_FLAG_COE)
extern int socket_accept6_internal (int, char *, uint16_t *, unsigned int) ;
extern socket_io_func_t socket_recv6 ;
extern ssize_t socket_send6 (int, char const *, size_t, char const *, uint16_t) ;
extern socket_io_func_t socket_ioloop_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_t_ref, int, tain_t const *, tain_t *) ;
#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.9.1.0/src/include/skalibs/stdcrypto.h 0000664 0000000 0000000 00000000311 13553351154 0021357 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef STDCRYPTO_H
#define STDCRYPTO_H
#include
#include
#include
#include
#include
#endif
skalibs-2.9.1.0/src/include/skalibs/stddjb.h 0000664 0000000 0000000 00000002611 13553351154 0020603 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
#include
#include
#endif
skalibs-2.9.1.0/src/include/skalibs/stralloc.h 0000664 0000000 0000000 00000002766 13553351154 0021167 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef STRALLOC_H
#define 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) ;
#define stralloc_ready(sa, n) stralloc_ready_tuned(sa, (n), 8, 1, 8)
#define stralloc_readyplus(sa, n) stralloc_ready(sa, (sa)->len + (n))
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.9.1.0/src/include/skalibs/strerr.h 0000664 0000000 0000000 00000015476 13553351154 0020667 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef STRERR_H
#define STRERR_H
#include
extern void strerr_warn (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ;
extern void strerr_die (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ;
extern void strerr_warnsys (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ;
extern void strerr_diesys (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ;
#define strerr_warn10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, se) \
strerr_warn(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, se)
#define strerr_warn9(x1, x2, x3, x4, x5, x6, x7, x8, x9, se) \
strerr_warn(x1, x2, x3, x4, x5, x6, x7, x8, x9, 0, se)
#define strerr_warn8(x1, x2, x3, x4, x5, x6, x7, x8, se) \
strerr_warn(x1, x2, x3, x4, x5, x6, x7, x8, 0, 0, se)
#define strerr_warn7(x1, x2, x3, x4, x5, x6, x7, se) \
strerr_warn(x1, x2, x3, x4, x5, x6, x7, 0, 0, 0, se)
#define strerr_warn6(x1, x2, x3, x4, x5, x6, se) \
strerr_warn(x1, x2, x3, x4, x5, x6, 0, 0, 0, 0, se)
#define strerr_warn5(x1, x2, x3, x4, x5, se) \
strerr_warn(x1, x2, x3, x4, x5, 0, 0, 0, 0, 0, se)
#define strerr_warn4(x1, x2, x3, x4, se) \
strerr_warn(x1, x2, x3, x4, 0, 0, 0, 0, 0, 0, se)
#define strerr_warn3(x1, x2, x3, se) \
strerr_warn(x1, x2, x3, 0, 0, 0, 0, 0, 0, 0, se)
#define strerr_warn2(x1, x2, se) \
strerr_warn(x1, x2, 0, 0, 0, 0, 0, 0, 0, 0, se)
#define strerr_warn1(x1, se) \
strerr_warn(x1, 0, 0, 0, 0, 0, 0, 0, 0, 0, se)
#define strerr_warn10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) \
strerr_warnsys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_warn9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) \
strerr_warnsys(x1, x2, x3, x4, x5, x6, x7, x8, (x9), 0)
#define strerr_warn8sys(x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_warnsys(x1, x2, x3, x4, x5, x6, x7, (x8), 0, 0)
#define strerr_warn7sys(x1, x2, x3, x4, x5, x6, x7) \
strerr_warnsys(x1, x2, x3, x4, x5, x6, (x7), 0, 0, 0)
#define strerr_warn6sys(x1, x2, x3, x4, x5, x6) \
strerr_warnsys(x1, x2, x3, x4, x5, (x6), 0, 0, 0, 0)
#define strerr_warn5sys(x1, x2, x3, x4, x5) \
strerr_warnsys(x1, x2, x3, x4, (x5), 0, 0, 0, 0, 0)
#define strerr_warn4sys(x1, x2, x3, x4) \
strerr_warnsys(x1, x2, x3, (x4), 0, 0, 0, 0, 0, 0)
#define strerr_warn3sys(x1, x2, x3) \
strerr_warnsys(x1, x2, (x3), 0, 0, 0, 0, 0, 0, 0)
#define strerr_warn2sys(x1, x2) \
strerr_warnsys(x1, (x2), 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_warn1sys(x1) \
strerr_warnsys((x1), 0, 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_warn10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) \
strerr_warn(x1, x2, x3, x4, x5, x6, x7, x8, x9, (x10), 0)
#define strerr_warn9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) \
strerr_warn(x1, x2, x3, x4, x5, x6, x7, x8, (x9), 0, 0)
#define strerr_warn8x(x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_warn(x1, x2, x3, x4, x5, x6, x7, (x8), 0, 0, 0)
#define strerr_warn7x(x1, x2, x3, x4, x5, x6, x7) \
strerr_warn(x1, x2, x3, x4, x5, x6, (x7), 0, 0, 0, 0)
#define strerr_warn6x(x1, x2, x3, x4, x5, x6) \
strerr_warn(x1, x2, x3, x4, x5, (x6), 0, 0, 0, 0, 0)
#define strerr_warn5x(x1, x2, x3, x4, x5) \
strerr_warn(x1, x2, x3, x4, (x5), 0, 0, 0, 0, 0, 0)
#define strerr_warn4x(x1, x2, x3, x4) \
strerr_warn(x1, x2, x3, (x4), 0, 0, 0, 0, 0, 0, 0)
#define strerr_warn3x(x1, x2, x3) \
strerr_warn(x1, x2, (x3), 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_warn2x(x1, x2) \
strerr_warn(x1, (x2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_warn1x(x1) \
strerr_warn((x1), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_die10(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, se) \
strerr_die(e, x1, x2, x3, x4, x5 , x6, x7, x8, x9, x10, se)
#define strerr_die9(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, se) \
strerr_die(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, 0, se)
#define strerr_die8(e, x1, x2, x3, x4, x5, x6, x7, x8, se) \
strerr_die(e, x1, x2, x3, x4, x5, x6, x7, x8, 0, 0, se)
#define strerr_die7(e, x1, x2, x3, x4, x5, x6, x7, se) \
strerr_die(e, x1, x2, x3, x4, x5, x6, x7, 0, 0, 0, se)
#define strerr_die6(e, x1, x2, x3, x4, x5, x6, se) \
strerr_die(e, x1, x2, x3, x4, x5, x6, 0, 0, 0, 0, se)
#define strerr_die5(e, x1, x2, x3, x4, x5, se) \
strerr_die(e, x1, x2, x3, x4, x5, 0, 0, 0, 0, 0, se)
#define strerr_die4(e, x1, x2, x3, x4, se) \
strerr_die(e, x1, x2, x3, x4, 0, 0, 0, 0, 0, 0, se)
#define strerr_die3(e, x1, x2, x3, se) \
strerr_die(e, x1, x2, x3, 0, 0, 0, 0, 0, 0, 0, se)
#define strerr_die2(e, x1, x2, se) \
strerr_die(e, x1, x2, 0, 0, 0, 0, 0, 0, 0, 0, se)
#define strerr_die1(e, x1, se) \
strerr_die(e, x1, 0, 0, 0, 0, 0, 0, 0, 0, 0, se)
#define strerr_die10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) \
strerr_diesys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define strerr_die9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) \
strerr_diesys(e, x1, x2, x3, x4, x5, x6, x7, x8, (x9), 0)
#define strerr_die8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_diesys(e, x1, x2, x3, x4, x5, x6, x7, (x8), 0, 0)
#define strerr_die7sys(e, x1, x2, x3, x4, x5, x6, x7) \
strerr_diesys(e, x1, x2, x3, x4, x5, x6, (x7), 0, 0, 0)
#define strerr_die6sys(e, x1, x2, x3, x4, x5, x6) \
strerr_diesys(e, x1, x2, x3, x4, x5, (x6), 0, 0, 0, 0)
#define strerr_die5sys(e, x1, x2, x3, x4, x5) \
strerr_diesys(e, x1, x2, x3, x4, (x5), 0, 0, 0, 0, 0)
#define strerr_die4sys(e, x1, x2, x3, x4) \
strerr_diesys(e, x1, x2, x3, (x4), 0, 0, 0, 0, 0, 0)
#define strerr_die3sys(e, x1, x2, x3) \
strerr_diesys(e, x1, x2, (x3), 0, 0, 0, 0, 0, 0, 0)
#define strerr_die2sys(e, x1, x2) \
strerr_diesys(e, x1, (x2), 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_die1sys(e, x1) \
strerr_diesys(e, (x1), 0, 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_die10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) \
strerr_die(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, (x10), 0)
#define strerr_die9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) \
strerr_die(e, x1, x2, x3, x4, x5, x6, x7, x8, (x9), 0, 0)
#define strerr_die8x(e, x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_die(e, x1, x2, x3, x4, x5, x6, x7, (x8), 0, 0, 0)
#define strerr_die7x(e, x1, x2, x3, x4, x5, x6, x7) \
strerr_die(e, x1, x2, x3, x4, x5, x6, (x7), 0, 0, 0, 0)
#define strerr_die6x(e, x1, x2, x3, x4, x5, x6) \
strerr_die(e, x1, x2, x3, x4, x5, (x6), 0, 0, 0, 0, 0)
#define strerr_die5x(e, x1, x2, x3, x4, x5) \
strerr_die(e, x1, x2, x3, x4, (x5), 0, 0, 0, 0, 0, 0)
#define strerr_die4x(e, x1, x2, x3, x4) \
strerr_die(e, x1, x2, x3, (x4), 0, 0, 0, 0, 0, 0, 0)
#define strerr_die3x(e, x1, x2, x3) \
strerr_die(e, x1, x2, (x3), 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_die2x(e, x1, x2) \
strerr_die(e, x1, (x2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
#define strerr_die1x(e, x1) \
strerr_die(e, (x1), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
#endif
skalibs-2.9.1.0/src/include/skalibs/strerr2.h 0000664 0000000 0000000 00000030244 13553351154 0020737 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef STRERR2_H
#define STRERR2_H
#include
extern char const *PROG ;
#define strerr_warnw1x(x1) \
strerr_warn3x(PROG, ": warning: ", (x1))
#define strerr_warnw2x(x1, x2) \
strerr_warn4x(PROG, ": warning: ", (x1), x2)
#define strerr_warnw3x(x1, x2, x3) \
strerr_warn5x(PROG, ": warning: ", (x1), x2, x3)
#define strerr_warnw4x(x1, x2, x3, x4) \
strerr_warn6x(PROG, ": warning: ", (x1), x2, x3, x4)
#define strerr_warnw5x(x1, x2, x3, x4, x5) \
strerr_warn7x(PROG, ": warning: ", (x1), x2, x3, x4, x5)
#define strerr_warnw6x(x1, x2, x3, x4, x5, x6) \
strerr_warn8x(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6)
#define strerr_warnw7x(x1, x2, x3, x4, x5, x6, x7) \
strerr_warn9x(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, x7)
#define strerr_warnw8x(x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_warn10x(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnw1sys(x1) \
strerr_warn4sys(PROG, ": warning: ", (x1), ": ")
#define strerr_warnw2sys(x1, x2) \
strerr_warn5sys(PROG, ": warning: ", (x1), (x2), ": ")
#define strerr_warnw3sys(x1, x2, x3) \
strerr_warn6sys(PROG, ": warning: ", (x1), x2, (x3), ": ")
#define strerr_warnw4sys(x1, x2, x3, x4) \
strerr_warn7sys(PROG, ": warning: ", (x1), x2, x3, (x4), ": ")
#define strerr_warnw5sys(x1, x2, x3, x4, x5) \
strerr_warn8sys(PROG, ": warning: ", (x1), x2, x3, x4, (x5), ": ")
#define strerr_warnw6sys(x1, x2, x3, x4, x5, x6) \
strerr_warn9sys(PROG, ": warning: ", (x1), x2, x3, x4, x5, (x6), ": ")
#define strerr_warnw7sys(x1, x2, x3, x4, x5, x6, x7) \
strerr_warn10sys(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, (x7), ": ")
#define strerr_diew1x(e, x1) \
strerr_die3x(e, PROG, ": warning: ", x1)
#define strerr_diew2x(e, x1, x2) \
strerr_die4x(e, PROG, ": warning: ", x1, x2)
#define strerr_diew3x(e, x1, x2, x3) \
strerr_die5x(e, PROG, ": warning: ", x1, x2, x3)
#define strerr_diew4x(e, x1, x2, x3, x4) \
strerr_die6x(e, PROG, ": warning: ", x1, x2, x3, x4)
#define strerr_diew5x(e, x1, x2, x3, x4, x5) \
strerr_die7x(e, PROG, ": warning: ", x1, x2, x3, x4, x5)
#define strerr_diew6x(e, x1, x2, x3, x4, x5, x6) \
strerr_die8x(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6)
#define strerr_diew7x(e, x1, x2, x3, x4, x5, x6, x7) \
strerr_die9x(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, x7)
#define strerr_diew8x(e, x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_die10x(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_diew1sys(e, x1) \
strerr_die4sys(e, PROG, ": warning: ", (x1), ": ")
#define strerr_diew2sys(e, x1, x2) \
strerr_die5sys(e, PROG, ": warning: ", x1, (x2), ": ")
#define strerr_diew3sys(e, x1, x2, x3) \
strerr_die6sys(e, PROG, ": warning: ", x1, x2, (x3), ": ")
#define strerr_diew4sys(e, x1, x2, x3, x4) \
strerr_die7sys(e, PROG, ": warning: ", x1, x2, x3, (x4), ": ")
#define strerr_diew5sys(e, x1, x2, x3, x4, x5) \
strerr_die8sys(e, PROG, ": warning: ", x1, x2, x3, x4, (x5), ": ")
#define strerr_diew6sys(e, x1, x2, x3, x4, x5, x6) \
strerr_die9sys(e, PROG, ": warning: ", x1, x2, x3, x4, x5, (x6), ": ")
#define strerr_diew7sys(e, x1, x2, x3, x4, x5, x6, x7) \
strerr_die10sys(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, (x7), ": ")
#define strerr_dief1x(e, x1) \
strerr_die3x(e, PROG, ": fatal: ", x1)
#define strerr_dief2x(e, x1, x2) \
strerr_die4x(e, PROG, ": fatal: ", x1, x2)
#define strerr_dief3x(e, x1, x2, x3) \
strerr_die5x(e, PROG, ": fatal: ", x1, x2, x3)
#define strerr_dief4x(e, x1, x2, x3, x4) \
strerr_die6x(e, PROG, ": fatal: ", x1, x2, x3, x4)
#define strerr_dief5x(e, x1, x2, x3, x4, x5) \
strerr_die7x(e, PROG, ": fatal: ", x1, x2, x3, x4, x5)
#define strerr_dief6x(e, x1, x2, x3, x4, x5, x6) \
strerr_die8x(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6)
#define strerr_dief7x(e, x1, x2, x3, x4, x5, x6, x7) \
strerr_die9x(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6, x7)
#define strerr_dief8x(e, x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_die10x(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6, x7, x8)
#define strerr_dief1sys(e, x1) \
strerr_die4sys(e, PROG, ": fatal: ", (x1), ": ")
#define strerr_dief2sys(e, x1, x2) \
strerr_die5sys(e, PROG, ": fatal: ", x1, (x2), ": ")
#define strerr_dief3sys(e, x1, x2, x3) \
strerr_die6sys(e, PROG, ": fatal: ", x1, x2, (x3), ": ")
#define strerr_dief4sys(e, x1, x2, x3, x4) \
strerr_die7sys(e, PROG, ": fatal: ", x1, x2, x3, (x4), ": ")
#define strerr_dief5sys(e, x1, x2, x3, x4, x5) \
strerr_die8sys(e, PROG, ": fatal: ", x1, x2, x3, x4, (x5), ": ")
#define strerr_dief6sys(e, x1, x2, x3, x4, x5, x6) \
strerr_die9sys(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, (x6), ": ")
#define strerr_dief7sys(e, x1, x2, x3, x4, x5, x6, x7) \
strerr_die10sys(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6, (x7), ": ")
#define strerr_diefu1x(e, x1) \
strerr_die4x(e, PROG, ": fatal: ", "unable to ", x1)
#define strerr_diefu2x(e, x1, x2) \
strerr_die5x(e, PROG, ": fatal: ", "unable to ", x1, x2)
#define strerr_diefu3x(e, x1, x2, x3) \
strerr_die6x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3)
#define strerr_diefu4x(e, x1, x2, x3, x4) \
strerr_die7x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4)
#define strerr_diefu5x(e, x1, x2, x3, x4, x5) \
strerr_die8x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5)
#define strerr_diefu6x(e, x1, x2, x3, x4, x5, x6) \
strerr_die9x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, x6)
#define strerr_diefu7x(e, x1, x2, x3, x4, x5, x6, x7) \
strerr_die10x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, x6, x7)
#define strerr_diefu1sys(e, x1) \
strerr_die5sys(e, PROG, ": fatal: ", "unable to ", (x1), ": ")
#define strerr_diefu2sys(e, x1, x2) \
strerr_die6sys(e, PROG, ": fatal: ", "unable to ", x1, (x2), ": ")
#define strerr_diefu3sys(e, x1, x2, x3) \
strerr_die7sys(e, PROG, ": fatal: ", "unable to ", x1, x2, (x3), ": ")
#define strerr_diefu4sys(e, x1, x2, x3, x4) \
strerr_die8sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, (x4), ": ")
#define strerr_diefu5sys(e, x1, x2, x3, x4, x5) \
strerr_die9sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, (x5), ": ")
#define strerr_diefu6sys(e, x1, x2, x3, x4, x5, x6) \
strerr_die10sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, (x6), ": ")
#define strerr_warnwu1x(x1) \
strerr_warn4x(PROG, ": warning: ", "unable to ", (x1))
#define strerr_warnwu2x(x1, x2) \
strerr_warn5x(PROG, ": warning: ", "unable to ", (x1), x2)
#define strerr_warnwu3x(x1, x2, x3) \
strerr_warn6x(PROG, ": warning: ", "unable to ", (x1), x2, x3)
#define strerr_warnwu4x(x1, x2, x3, x4) \
strerr_warn7x(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4)
#define strerr_warnwu5x(x1, x2, x3, x4, x5) \
strerr_warn8x(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5)
#define strerr_warnwu6x(x1, x2, x3, x4, x5, x6) \
strerr_warn9x(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5, x6)
#define strerr_warnwu7x(x1, x2, x3, x4, x5, x6, x7) \
strerr_warn10x(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5, x6, x7)
#define strerr_warnwu1sys(x1) \
strerr_warn5sys(PROG, ": warning: ", "unable to ", (x1), ": ")
#define strerr_warnwu2sys(x1, x2) \
strerr_warn6sys(PROG, ": warning: ", "unable to ", (x1), (x2), ": ")
#define strerr_warnwu3sys(x1, x2, x3) \
strerr_warn7sys(PROG, ": warning: ", "unable to ", (x1), x2, (x3), ": ")
#define strerr_warnwu4sys(x1, x2, x3, x4) \
strerr_warn8sys(PROG, ": warning: ", "unable to ", (x1), x2, x3, (x4), ": ")
#define strerr_warnwu5sys(x1, x2, x3, x4, x5) \
strerr_warn9sys(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, (x5), ": ")
#define strerr_warnwu6sys(x1, x2, x3, x4, x5, x6) \
strerr_warn10sys(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5, (x6), ": ")
#define strerr_diewu1x(e, x1) \
strerr_die4x(e, PROG, ": warning: ", "unable to ", x1)
#define strerr_diewu2x(e, x1, x2) \
strerr_die5x(e, PROG, ": warning: ", "unable to ", x1, x2)
#define strerr_diewu3x(e, x1, x2, x3) \
strerr_die6x(e, PROG, ": warning: ", "unable to ", x1, x2, x3)
#define strerr_diewu4x(e, x1, x2, x3, x4) \
strerr_die7x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4)
#define strerr_diewu5x(e, x1, x2, x3, x4, x5) \
strerr_die8x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5)
#define strerr_diewu6x(e, x1, x2, x3, x4, x5, x6) \
strerr_die9x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, x6)
#define strerr_diewu7x(e, x1, x2, x3, x4, x5, x6, x7) \
strerr_die10x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, x6, x7)
#define strerr_diewu1sys(e, x1) \
strerr_die5sys(e, PROG, ": warning: ", "unable to ", (x1), ": ")
#define strerr_diewu2sys(e, x1, x2) \
strerr_die6sys(e, PROG, ": warning: ", "unable to ", x1, (x2), ": ")
#define strerr_diewu3sys(e, x1, x2, x3) \
strerr_die7sys(e, PROG, ": warning: ", "unable to ", x1, x2, (x3), ": ")
#define strerr_diewu4sys(e, x1, x2, x3, x4) \
strerr_die8sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3, (x4), ": ")
#define strerr_diewu5sys(e, x1, x2, x3, x4, x5) \
strerr_die9sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, (x5), ": ")
#define strerr_diewu6sys(e, x1, x2, x3, x4, x5, x6) \
strerr_die10sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, (x6), ": ")
#define strerr_dieusage(e, u) \
strerr_die3x(e, PROG, ": usage: ", u)
#define strerr_dienotset(e, x) \
strerr_dief2x(e, (x), " not set")
#define strerr_dieinvalid(e, x) \
strerr_dief2x(e, "invalid $", x)
#define strerr_dieexec(e, x) \
strerr_diefu2sys(e, "exec ", x)
#define strerr_warni1x(x1) \
strerr_warn3x(PROG, ": info: ", (x1))
#define strerr_warni2x(x1, x2) \
strerr_warn4x(PROG, ": info: ", (x1), x2)
#define strerr_warni3x(x1, x2, x3) \
strerr_warn5x(PROG, ": info: ", (x1), x2, x3)
#define strerr_warni4x(x1, x2, x3, x4) \
strerr_warn6x(PROG, ": info: ", (x1), x2, x3, x4)
#define strerr_warni5x(x1, x2, x3, x4, x5) \
strerr_warn7x(PROG, ": info: ", (x1), x2, x3, x4, x5)
#define strerr_warni6x(x1, x2, x3, x4, x5, x6) \
strerr_warn8x(PROG, ": info: ", (x1), x2, x3, x4, x5, x6)
#define strerr_warni7x(x1, x2, x3, x4, x5, x6, x7) \
strerr_warn9x(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, x7)
#define strerr_warni8x(x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_warn10x(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, x7, x8)
#define strerr_warni1sys(x1) \
strerr_warn4sys(PROG, ": info: ", (x1), ": ")
#define strerr_warni2sys(x1, x2) \
strerr_warn5sys(PROG, ": info: ", (x1), (x2), ": ")
#define strerr_warni3sys(x1, x2, x3) \
strerr_warn6sys(PROG, ": info: ", (x1), x2, (x3), ": ")
#define strerr_warni4sys(x1, x2, x3, x4) \
strerr_warn7sys(PROG, ": info: ", (x1), x2, x3, (x4), ": ")
#define strerr_warni5sys(x1, x2, x3, x4, x5) \
strerr_warn8sys(PROG, ": info: ", (x1), x2, x3, x4, (x5), ": ")
#define strerr_warni6sys(x1, x2, x3, x4, x5, x6) \
strerr_warn9sys(PROG, ": info: ", (x1), x2, x3, x4, x5, (x6), ": ")
#define strerr_warni7sys(x1, x2, x3, x4, x5, x6, x7) \
strerr_warn10sys(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, (x7), ": ")
#define strerr_warnt1x(x1) \
strerr_warn3x(PROG, ": tracing: ", (x1))
#define strerr_warnt2x(x1, x2) \
strerr_warn4x(PROG, ": tracing: ", (x1), x2)
#define strerr_warnt3x(x1, x2, x3) \
strerr_warn5x(PROG, ": tracing: ", (x1), x2, x3)
#define strerr_warnt4x(x1, x2, x3, x4) \
strerr_warn6x(PROG, ": tracing: ", (x1), x2, x3, x4)
#define strerr_warnt5x(x1, x2, x3, x4, x5) \
strerr_warn7x(PROG, ": tracing: ", (x1), x2, x3, x4, x5)
#define strerr_warnt6x(x1, x2, x3, x4, x5, x6) \
strerr_warn8x(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6)
#define strerr_warnt7x(x1, x2, x3, x4, x5, x6, x7) \
strerr_warn9x(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, x7)
#define strerr_warnt8x(x1, x2, x3, x4, x5, x6, x7, x8) \
strerr_warn10x(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, x7, x8)
#define strerr_warnt1sys(x1) \
strerr_warn4sys(PROG, ": tracing: ", (x1), ": ")
#define strerr_warnt2sys(x1, x2) \
strerr_warn5sys(PROG, ": tracing: ", (x1), (x2), ": ")
#define strerr_warnt3sys(x1, x2, x3) \
strerr_warn6sys(PROG, ": tracing: ", (x1), x2, (x3), ": ")
#define strerr_warnt4sys(x1, x2, x3, x4) \
strerr_warn7sys(PROG, ": tracing: ", (x1), x2, x3, (x4), ": ")
#define strerr_warnt5sys(x1, x2, x3, x4, x5) \
strerr_warn8sys(PROG, ": tracing: ", (x1), x2, x3, x4, (x5), ": ")
#define strerr_warnt6sys(x1, x2, x3, x4, x5, x6) \
strerr_warn9sys(PROG, ": tracing: ", (x1), x2, x3, x4, x5, (x6), ": ")
#define strerr_warnt7sys(x1, x2, x3, x4, x5, x6, x7) \
strerr_warn10sys(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, (x7), ": ")
#endif
skalibs-2.9.1.0/src/include/skalibs/surf.h 0000664 0000000 0000000 00000001424 13553351154 0020311 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_SURF_H
#define SKALIBS_SURF_H
#include
#include
typedef struct SURFSchedule SURFSchedule, *SURFSchedule_ref, **SURFSchedule_ref_ref ;
struct SURFSchedule
{
uint32_t seed[32] ;
uint32_t in[12] ;
char out[32] ;
unsigned int pos ;
} ;
#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 }, .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", .pos = 32 }
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.9.1.0/src/include/skalibs/tai.h 0000664 0000000 0000000 00000013044 13553351154 0020110 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef TAI_H
#define TAI_H
#include
#include
#include
#include
#include
typedef struct tai_s tai_t, *tai_t_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 << 60 }
#define TAI_INFINITE { TAI_MAGIC + ((uint64_t)1 << 61) }
#define tai_sec(t) ((t)->x)
extern int tai_u64 (tai_t *, 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_t *) ;
#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_t const *) ;
extern int time_from_tai (time_t *, tai_t const *) ;
extern int time_sysclock_from_tai(time_t *, tai_t const *) ;
extern int tai_from_sysclock (tai_t *, uint64_t) ;
extern int sysclock_from_tai (uint64_t *, tai_t const *) ;
#define tai_approx(t) ((double)(tai_sec(t)))
extern int tai_add (tai_t *, tai_t const *, tai_t const *) ;
extern int tai_sub (tai_t *, tai_t const *, tai_t const *) ;
#define tai_less(t,u) (tai_sec(t) < tai_sec(u))
#define TAI_PACK 8
extern void tai_pack (char *, tai_t const *) ;
extern void tai_unpack (char const *, tai_t *) ;
extern void tai_pack_little (char *, tai_t const *) ;
extern void tai_unpack_little (char const *, tai_t *) ;
typedef struct tain_s tain_t, *tain_t_ref ;
struct tain_s
{
tai_t 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_t STAMP ; /* the global process wallclock */
extern tain_t const tain_zero ;
extern tain_t const tain_infinite_relative ;
extern tain_t 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_t *, struct timeval const *) ;
extern int tain_from_timeval (tain_t *, struct timeval const *) ;
extern int tain_from_timeval_sysclock (tain_t *, struct timeval const *) ;
extern int timeval_from_tain_relative (struct timeval *, tain_t const *) ;
extern int timeval_from_tain (struct timeval *, tain_t const *) ;
extern int timeval_sysclock_from_tain (struct timeval *, tain_t const *) ;
extern int tain_relative_from_timespec (tain_t *, struct timespec const *) ;
extern int tain_from_timespec (tain_t *, struct timespec const *) ;
extern int tain_from_timespec_sysclock (tain_t *, struct timespec const *) ;
extern int timespec_from_tain_relative (struct timespec *, tain_t const *) ;
extern int timespec_from_tain (struct timespec *, tain_t const *) ;
extern int timespec_sysclock_from_tain (struct timespec *, tain_t const *) ;
typedef int tain_clockread_func_t (tain_t *) ;
typedef tain_clockread_func_t *tain_clockread_func_t_ref ;
extern int tain_from_sysclock (tain_t *, tain_t const *) ;
extern int sysclock_from_tain (tain_t *, tain_t const *) ;
extern tain_clockread_func_t sysclock_get ;
extern tain_clockread_func_t tain_wallclock_read ;
#define tain_wallclock_read_g() tain_wallclock_read(&STAMP)
extern int tain_stopwatch_init (tain_t *, clock_t, tain_t *) ;
extern int tain_stopwatch_read (tain_t *, clock_t, tain_t const *) ;
#define tain_stopwatch_read_g(cl, offset) tain_stopwatch_read(&STAMP, (cl), offset)
extern tain_clockread_func_t_ref tain_now ;
#define tain_now_g() (*tain_now)(&STAMP)
#define tain_copynow(t) (*(t) = STAMP)
extern tain_clockread_func_t tain_now_set_wallclock ;
#define tain_now_set_wallclock_g() tain_now_set_wallclock(&STAMP)
extern tain_clockread_func_t tain_now_set_stopwatch ;
#define tain_now_set_stopwatch_g() tain_now_set_stopwatch(&STAMP)
extern int sysclock_set (tain_t const *) ;
extern int tain_setnow (tain_t const *) ;
extern double tain_approx (tain_t const *) gccattr_pure ;
extern double tain_frac (tain_t const *) gccattr_pure ;
extern int tain_from_millisecs (tain_t *, int) ;
extern int tain_to_millisecs (tain_t const *) gccattr_pure ;
extern int tain_add (tain_t *, tain_t const *, tain_t const *) ;
#define tain_add_g(deadline, tto) tain_add(deadline, &STAMP, tto)
extern int tain_addsec (tain_t *, tain_t const *, int) ;
#define tain_addsec_g(deadline, n) tain_addsec(deadline, &STAMP, n)
extern int tain_sub (tain_t *, tain_t const *, tain_t const *) ;
extern int tain_less (tain_t const *, tain_t const *) gccattr_pure ;
#define tain_future(deadline) tain_less(&STAMP, (deadline))
#define TAIN_PACK 12
extern void tain_pack (char *, tain_t const *) ;
extern void tain_unpack (char const *, tain_t *) ;
extern void tain_pack_little (char *, tain_t const *) ;
extern void tain_unpack_little (char const *, tain_t *) ;
#define TAIN_FMT 25
extern size_t tain_fmt (char *, tain_t const *) ;
extern size_t tain_scan (char const *, tain_t *) ;
#define TAIN_FMTFRAC 19
extern size_t tain_fmtfrac (char *, tain_t const *) ;
#define tain_uint(a, u) tain_ulong(a, u)
extern int tain_ulong (tain_t *, unsigned long) ;
extern void tain_half (tain_t *, tain_t const *) ;
#define TIMESTAMP (1 + (TAIN_PACK << 1))
extern size_t timestamp_fmt (char *, tain_t const *) ;
extern size_t timestamp_scan (char const *, tain_t *) ;
extern int timestamp_r (char *, tain_t *) ;
extern int timestamp (char *) ;
#define timestamp_g(s) timestamp_fmt((s), &STAMP)
#endif
skalibs-2.9.1.0/src/include/skalibs/textclient.h 0000664 0000000 0000000 00000015677 13553351154 0021534 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_t *, textmessage_sender_t *, textmessage_sender_t *, char const *, size_t, char const *, size_t, tain_t const *, tain_t *) ;
extern int textclient_server_init_frompipe (textmessage_receiver_t *, textmessage_sender_t *, textmessage_sender_t *, char const *, size_t, char const *, size_t, tain_t const *, tain_t *) ;
extern int textclient_server_init_fromsocket (textmessage_receiver_t *, textmessage_sender_t *, textmessage_sender_t *, char const *, size_t, char const *, size_t, tain_t const *, tain_t *) ;
#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_t, *textclient_t_ref ;
struct textclient_s
{
textmessage_sender_t syncout ;
textmessage_receiver_t syncin ;
textmessage_receiver_t 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_t const textclient_zero ;
/* Starting and ending */
extern void textclient_end (textclient_t *) ;
extern int textclient_start (textclient_t *, char const *, uint32_t, char const *, size_t, char const *, size_t, tain_t const *, tain_t *) ;
extern int textclient_startf (textclient_t *, char const *const *, char const *const *, uint32_t, char const *, size_t, char const *, size_t, tain_t const *, tain_t *) ;
#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_t *, char const *, size_t, tain_t const *, tain_t *) ;
extern int textclient_commandv (textclient_t *, struct iovec const *, unsigned int, tain_t const *, tain_t *) ;
#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.9.1.0/src/include/skalibs/textmessage.h 0000664 0000000 0000000 00000010233 13553351154 0021661 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef SKALIBS_TEXTMESSAGE_H
#define SKALIBS_TEXTMESSAGE_H
#include
#include
#include
#include
#include
#include
#include
#include
#define TEXTMESSAGE_MAXREADS 128
#define TEXTMESSAGE_MAXLEN 0x01000000U
/* Sender */
typedef struct textmessage_sender_s textmessage_sender_t, *textmessage_sender_t_ref ;
struct textmessage_sender_s
{
bufalloc out ;
} ;
#define TEXTMESSAGE_SENDER_ZERO { BUFALLOC_ZERO }
extern textmessage_sender_t const textmessage_sender_zero ;
#define TEXTMESSAGE_SENDER_INIT(fd) { BUFALLOC_INIT(&fd_write, (fd)) }
#define textmessage_sender_init(ts, fd) bufalloc_init(&(ts)->out, &fd_write, fd)
#define textmessage_sender_free(ts) bufalloc_free(&(ts)->out)
#define textmessage_sender_fd(ts) bufalloc_fd(&(ts)->out)
extern int textmessage_sender_getfd (textmessage_sender_t const *) gccattr_pure ;
#define textmessage_sender_isempty(ts) bufalloc_isempty(&(ts)->out)
extern int textmessage_put (textmessage_sender_t *, char const *, size_t) ;
extern int textmessage_putv (textmessage_sender_t *, struct iovec const *, unsigned int) ;
extern int textmessage_sender_flush (textmessage_sender_t *) ;
extern int textmessage_sender_timed_flush (textmessage_sender_t *, tain_t const *, tain_t *) ;
#define textmessage_sender_timed_flush_g(ts, deadline) textmessage_sender_timed_flush(ts, (deadline), &STAMP)
#define textmessage_send(ts, s, len) (textmessage_put(ts, s, len) && textmessage_sender_flush(ts))
#define textmessage_sendv(ts, v, n) (textmessage_putv(ts, v, n) && textmessage_sender_flush(ts))
#define textmessage_timed_send(ts, s, len, deadline, stamp) (textmessage_put(ts, s, len) && textmessage_sender_timed_flush(ts, deadline, stamp))
#define textmessage_timed_sendv(ts, v, n, deadline, stamp) (textmessage_putv(ts, v, n) && textmessage_sender_timed_flush(ts, deadline, stamp))
#define textmessage_timed_send_g(ts, s, len, deadline) textmessage_timed_send(ts, s, len, (deadline), &STAMP)
#define textmessage_timed_sendv_g(ts, v, n, deadline) textmessage_timed_sendv(ts, v, n, (deadline), &STAMP)
/* Receiver */
typedef struct textmessage_receiver_s textmessage_receiver_t, *textmessage_receiver_t_ref ;
struct textmessage_receiver_s
{
buffer in ;
stralloc indata ;
uint32_t wanted ;
uint32_t max ;
} ;
#define TEXTMESSAGE_RECEIVER_ZERO { BUFFER_ZERO, STRALLOC_ZERO, 0, 0 }
extern textmessage_receiver_t const textmessage_receiver_zero ;
#define TEXTMESSAGE_RECEIVER_INIT(fd, buf, len, n) { BUFFER_INIT(&buffer_read, (fd), buf, len), STRALLOC_ZERO, 0, n }
extern int textmessage_receiver_init (textmessage_receiver_t *, int, char *, size_t, uint32_t) ;
extern void textmessage_receiver_free (textmessage_receiver_t *) ;
#define textmessage_receiver_fd(tr) buffer_fd(&(tr)->in)
#define textmessage_receiver_isempty(tr) buffer_isempty(&(tr)->in)
#define textmessage_receiver_isfull(tr) buffer_isfull(&(tr)->in)
extern int textmessage_receiver_hasmsginbuf (textmessage_receiver_t const *) gccattr_pure ;
extern int textmessage_receive (textmessage_receiver_t *, struct iovec *) ;
extern int textmessage_timed_receive (textmessage_receiver_t *, struct iovec *, tain_t const *, tain_t *) ;
#define textmessage_timed_receive_g(tr, v, deadline) textmessage_timed_receive(tr, v, (deadline), &STAMP)
typedef int textmessage_handler_func_t (struct iovec const *, void *) ;
typedef textmessage_handler_func_t *textmessage_handler_func_t_ref ;
extern int textmessage_handle (textmessage_receiver_t *, textmessage_handler_func_t_ref, void *) ;
extern int textmessage_timed_handle (textmessage_receiver_t *, textmessage_handler_func_t_ref, void *, tain_t const *, tain_t *) ;
#define textmessage_timed_handle_g(tr, f, p, deadline) textmessage_timed_handle(tr, f, p, (deadline), &STAMP)
/* Globals */
extern textmessage_receiver_t textmessage_receiver_0_ ;
#define textmessage_receiver_0 (&textmessage_receiver_0_)
extern textmessage_sender_t textmessage_sender_1_ ;
#define textmessage_sender_1 (&textmessage_sender_1_)
extern textmessage_sender_t textmessage_sender_x_ ;
#define textmessage_sender_x (&textmessage_sender_x_)
#endif
skalibs-2.9.1.0/src/include/skalibs/unix-timed.h 0000664 0000000 0000000 00000004753 13553351154 0021425 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef UNIX_TIMED_H
#define UNIX_TIMED_H
#include
#include
#include
#include
#include
#include
#include
/* Timed "blocking" operations (the fd must still be non-blocking) */
extern int timed_flush (void *, initfunc_t_ref, initfunc_t_ref, initfunc_t_ref, tain_t const *, tain_t *) ;
#define timed_flush_g(b, getfd, isnonempty, flush, deadline) timed_flush(b, getfd, isnonempty, flush, (deadline_), &STAMP)
extern ssize_t timed_get (void *, initfunc_t_ref, getfunc_t_ref, tain_t const *, tain_t *) ;
#define timed_get_g (b, getfd, get, deadline) timed_get(b, getfd, get, (deadline), &STAMP)
extern ssize_t buffer_timed_fill (buffer *, tain_t const *, tain_t *) ;
#define buffer_timed_fill_g(b, deadline) buffer_timed_fill(b, (deadline), &STAMP)
extern int bufalloc_timed_flush (bufalloc *, tain_t const *, tain_t *) ;
#define bufalloc_timed_flush_g(ba, deadline) bufalloc_timed_flush(ba, (deadline), &STAMP)
extern int buffer_timed_flush (buffer *, tain_t const *, tain_t *) ;
#define buffer_timed_flush_g(b, deadline) buffer_timed_flush(b, (deadline), &STAMP)
extern size_t buffer_timed_get (buffer *, char *, size_t, tain_t const *, tain_t *) ;
#define buffer_timed_get_g(b, buf, buflen, deadline) buffer_timed_get(b, buf, buflen, (deadline), &STAMP)
extern int timed_getln (buffer *, stralloc *, char, tain_t const *, tain_t *) ;
#define timed_getln_g(b, sa, sep, deadline) timed_getln(b, sa, sep, (deadline), &STAMP)
extern ssize_t timed_getlnmax (buffer *, char *, size_t, size_t *, char, tain_t const *, tain_t *) ;
#define timed_getlnmax_g(b, max, maxlen, len, sep, deadline) timed_getlnmax(b, max, maxlen, len, sep, (deadline), &STAMP)
extern int netstring_timed_get (buffer *, stralloc *, tain_t const *, tain_t *) ;
#define netstring_timed_get_g(b, sa, deadline) netstring_timed_get(b, sa, (deadline), &STAMP)
extern int ipc_timed_send (int, char const *, size_t, tain_t const *, tain_t *) ;
#define ipc_timed_send_g(fd, s, len, deadline) ipc_timed_send(fd, s, len, (deadline), &STAMP)
extern int ipc_timed_sendv (int, struct iovec const *, unsigned int, tain_t const *, tain_t *) ;
#define ipc_timed_sendv_g(fd, v, n, deadline) ipc_timed_sendv(fd, v, n, (deadline), &STAMP)
extern ssize_t ipc_timed_recv (int, char *, size_t, char *, tain_t const *, tain_t *) ;
#define ipc_timed_recv_g(fd, s, len, path, deadline) ipc_timed_recv(fd, s, len, path, (deadline), &STAMP)
#endif
skalibs-2.9.1.0/src/include/skalibs/unix-transactional.h 0000664 0000000 0000000 00000004762 13553351154 0023165 0 ustar 00root root 0000000 0000000 /* ISC license. */
#ifndef UNIX_TRANSACTIONAL_H
#define UNIX_TRANSACTIONAL_H
#include