skalibs: how to upgrade
Keywords: skalibs installation upgrade

skalibs
Software
skarnet.org

## in 2.14.2.0

- New `skalibs/gol.h` header, implementing long options.
- New `mkptemp3()` function.

## in 2.14.1.1

- No functional changes.

## in 2.14.1.0

- New `ip46.h` macros: `socket_sendnb46_g()` and `socket_recvnb46_g()`

## in 2.14.0.1

- No functional changes.

## in 2.14.0.0

- New selfpipe accessor function: `selfpipe_fd()`
- New djbunix functions: `slurpn()`, `openslurpnclose()`
- `slurp` and `openslurpclose` are now macros
- New cdb functions: `cdb_hashv()`, `cdbmake_addv()`
- New `cspawn` function, for posix_spawn/fork unification
- `child_spawn` functions are now declared in `cspawn.h`
- New sysdeps for posix_spawn options and more
- `case_lowerb() and friends now use ctype.h functions, supporting locale if it is declared in the application.`
- `case_str()` removed, strcasestr() fallback implementation added

## in 2.13.1.1

- No functional changes.

## in 2.13.1.0

- New macro: `SKALIBS_PATH_MAX`

## in 2.13.0.0

- New functions: `buffer_timed_put()`, `buffer_timed_puts()`.

## in 2.12.0.1

- No functional changes.

## in 2.12.0.0

- `random_init()` and `random_finish()` removed, as well as `random_char()`.
- `random_string()` renamed to `random_buf()`.
- random functions now have an `early` version, to use when randomness is required before the generator can be seeded (i.e. in programs running in the very early boot).
- New djbunix functions: `waitn_posix()`, `waitn_reap_posix()`

## in 2.11.2.0

- User-provided CPPFLAGS, CFLAGS and LDFLAGS are now honored during sysdeps autodetection.
- `envdir_internal()` now has a SKALIBS_ENVDIR_NOCLAMP option allowing reading of unlimited-size variables.

## in 2.11.1.0

- `fd_close()` now chooses to adapt to Linux's close() behaviour (closing the fd on EINTR) over the HP-UX one (not closing it). Destructors like close() being allowed to fail has always been a mistake in the specification and a programming nightmare, making it impossible to behave correctly on all systems, but apparently standardization efforts are on the way and the Linux behaviour seems to be the chosen one.
- New `unix-transactional.h` function: `opendir_at`.

## in 2.11.0.0

- `libbiguint` removed.
- Obsolete `skalibs/environ.h` and `skalibs/getpeereid.h` headers removed.
- rc4 and md5 functions removed.
- iobuffer removed. `fd_cat()` and `fd_catn()` changed signatures.
- All `*_t` types renamed without the `_t` suffix, in order to preserve POSIX namespace.
- `subgetopt()` renamed to `lgetopt()`.
- All signal functions entirely reworked; cruft removed.
- `skalibs/cdb_make.h` renamed to `skalibs/cdbmake.h`; `cdbmake` functions now return 1 on success and 0 on failure.
- `skalibs/cdb.h` redesigned to remove reader state from the cdb structure itself.
- The unsafe `cdb_successor()` API has been removed.
- New `skalibs/posixplz.h` function: munmap_void().

## in 2.10.0.3

- No functional changes.

## in 2.10.0.2

- No functional changes.

## in 2.10.0.1

- No functional changes.

## in 2.10.0.0

- New `openc_*` functions, which are O_CLOEXEC versions of the djbunix.h `open_*` functions.
- New `ipc_bind_reuse_lock()` function, which takes a lock before deleting a Unix domain socket. The `ipc_bind_reuse()` function now uses it, so it won't unconditionally clobber sockets in the filesystem anymore.
- Complete revamping of the pathexec functions, see `exec.h`.
- Revamping of the locking functions, see instead of adhoc `DJBUNIX_FLAG_NB` and `DJBUNIX_FLAG_COE`.
- Better header separation; `webipc.h` removed (stuff moved to `socket.h`).
- New `mkptemp2()` function, creating a fifo with a templated name and an option field for O_NONBLOCK and O_CLOEXEC.
- New sysdep: `chroot`, testing whether the system has the `chroot()` function.

## in 2.9.3.0

- New function: `stralloc_readyplus_tuned()`

## in 2.9.2.1

- No functional changes.

## in 2.9.2.0

- New functions: `bigkv_*`

## 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

- New functions: execvep_loose(), `byte_zzero()`, openb_read(), `sig0_scan`
- New family of functions: skalibs/genqdyn.h

## in 2.6.3.1

- No functional changes.

## 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

- New function: lock_unx().

## in 2.6.0.2

- No functional changes.

## 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

- No functional changes.

## in 2.5.1.0

- The `xpathexec_*` family of functions has been added to skalibs/djbunix.h.

# 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

- No functional changes.

## in 2.4.0.1

- No functional changes.

## 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

- No functional changes.

## in 2.3.8.2

- No functional changes.

## in 2.3.8.1

- No functional changes.

## in 2.3.8.0

- The `/etc/leapsecs.dat` file is no longer necessary.

## in 2.3.7.1

- No functional changes.

## in 2.3.7.0

- New functions: `atomic_rm_rf()`, `atomic_rm_rf_tmp()`.

## in 2.3.6.1

- No functional changes.

## in 2.3.6.0

- New function: `openreadnclose_nb`.

## in 2.3.5.2

- No functional changes.

## in 2.3.5.1

- No functional changes.

## 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

- New macro: `gid0_scan()`

## 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.