chiark / gitweb /
mLib
5 years agoRelease 2.2.5. 2.2.5
Mark Wooding [Sat, 9 Jun 2018 16:40:36 +0000 (17:40 +0100)]
Release 2.2.5.

5 years agosel/ident.c: Don't close the descriptor twice on immediate connect failure.
Mark Wooding [Sat, 9 Jun 2018 13:54:40 +0000 (14:54 +0100)]
sel/ident.c: Don't close the descriptor twice on immediate connect failure.

Confusingly, `conn_init' has already done that.

6 years ago.mailmap: Add file to fix CVS-ish names in history.
Mark Wooding [Tue, 15 Aug 2017 13:22:59 +0000 (14:22 +0100)]
.mailmap: Add file to fix CVS-ish names in history.

6 years agoRelease 2.2.4. 2.2.4
Mark Wooding [Sun, 13 Aug 2017 19:12:45 +0000 (20:12 +0100)]
Release 2.2.4.

6 years agoRevert "debian: Update for Debhelper 10."
Mark Wooding [Fri, 11 Aug 2017 11:00:57 +0000 (12:00 +0100)]
Revert "debian: Update for Debhelper 10."

I think I might still have to build for wheezy.
This reverts commit 6d061820334c97ed4f3266d7130e089de6b21b55.

6 years agostruct/buf.3: Fix synopsis for `BSTEP'.
Mark Wooding [Wed, 9 Aug 2017 19:48:54 +0000 (20:48 +0100)]
struct/buf.3: Fix synopsis for `BSTEP'.

6 years agodebian/copyright: Fix copyright dates.
Mark Wooding [Fri, 7 Jul 2017 09:48:58 +0000 (10:48 +0100)]
debian/copyright: Fix copyright dates.

6 years agodebian: Update for Debhelper 10.
Mark Wooding [Thu, 6 Jul 2017 09:57:03 +0000 (10:57 +0100)]
debian: Update for Debhelper 10.

6 years agodebian: Multi-Arch support.
Mark Wooding [Fri, 14 Jun 2013 18:24:17 +0000 (19:24 +0100)]
debian: Multi-Arch support.

6 years agodebian/copyright: Convert to machine-readable format.
Mark Wooding [Fri, 28 Jun 2013 20:44:58 +0000 (21:44 +0100)]
debian/copyright: Convert to machine-readable format.

6 years agodebian/control: Use ${binary:Version} instead of ${Source-Version}.
Mark Wooding [Thu, 6 Jul 2017 09:03:39 +0000 (10:03 +0100)]
debian/control: Use ${binary:Version} instead of ${Source-Version}.

6 years agovars.am: Tweak `silent-rules' machinery.
Mark Wooding [Thu, 6 Jul 2017 08:56:44 +0000 (09:56 +0100)]
vars.am: Tweak `silent-rules' machinery.

Since Automake 1.11, the advice for setting up custom silent-rules
recipes has changed, so use the new machinery.

Also, I'm no longer mainly working on wheezy, and Automake has made the
operation field two spaces wider while I wasn't looking, so make the
output line up properly.

This means that mLib now requires Automake 1.11.2 or later to build from
the Git tree.

6 years agoutils/macros.h: Add support for Clang-specific hacks.
Mark Wooding [Wed, 5 Jul 2017 20:25:31 +0000 (21:25 +0100)]
utils/macros.h: Add support for Clang-specific hacks.

These are mostly the same as GCC, but (fortunately!) Clang's diagnostics
handling is less broken than GCC's, so we can do the same job much more
simply.

6 years agoutils/macros.h: Refactor the GCC-ish compiler support.
Mark Wooding [Wed, 5 Jul 2017 20:23:00 +0000 (21:23 +0100)]
utils/macros.h: Refactor the GCC-ish compiler support.

Fully define `GCC_VERSION_P' early, and then use it without any other
guard to define the GCC-specific hacks.  This way, it's easy to support
other compilers which behave similarly, by defining an appropriate
`FOO_VERSION_P' macro, and then adding appropriate extra alternatives to
the individual guards.

No functional changes.

6 years agosel/sig.c: Use `DISCARD' to ignore errors from the signal-pipe `write'.
Mark Wooding [Wed, 5 Jul 2017 20:10:06 +0000 (21:10 +0100)]
sel/sig.c: Use `DISCARD' to ignore errors from the signal-pipe `write'.

Annoyingly, Clang complains about the empty consequent being on one line
otherwise.  Still, this is what `DISCARD' was made for.

7 years agotrace/trace.3: Fix misformatting.
Mark Wooding [Wed, 19 Apr 2017 08:54:40 +0000 (09:54 +0100)]
trace/trace.3: Fix misformatting.

7 years agovars.am: Some reformatting.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
vars.am: Some reformatting.

7 years agosys/tests.at: Actually make sure the `mdup' tests work.
Mark Wooding [Mon, 11 Jul 2016 08:49:21 +0000 (09:49 +0100)]
sys/tests.at: Actually make sure the `mdup' tests work.

Oops.  It's not actually been testing anything.  You can tell because it
tried to run the wrong program.

Fortunately, once this is fixed, the test does seem to run OK.

7 years agosys/tests.at: Use the correct name for the `mdup' test program.
Mark Wooding [Mon, 11 Jul 2016 08:48:56 +0000 (09:48 +0100)]
sys/tests.at: Use the correct name for the `mdup' test program.

7 years agoconfigure.ac: Look in the right place for `socklen_t'.
Mark Wooding [Mon, 11 Jul 2016 08:47:12 +0000 (09:47 +0100)]
configure.ac: Look in the right place for `socklen_t'.

The old-fashioned version of `AC_CHECK_TYPE' doesn't look in
<sys/socket.h>, which is the proper place.  Android doesn't appear to
define the type in the usual places where Autoconf looks.

So use the modern version of the check and look in <sys/socket.h>
explicitly.  This seems to fix the build on Android.

7 years agoRelease 2.2.3. 2.2.3
Mark Wooding [Sat, 4 Jun 2016 00:10:04 +0000 (01:10 +0100)]
Release 2.2.3.

7 years agobuild: Abolish the `$e', `$o' and `$t' variables.
Mark Wooding [Sun, 15 May 2016 14:29:05 +0000 (15:29 +0100)]
build: Abolish the `$e', `$o' and `$t' variables.

I don't think anything ever used `$o'.  This project didn't use `$t'.
And use of `$e' gets in the way of Automake's magic handling of
executable suffixes under Cygwin.

7 years agoMakefile.am: Say `-no-undefined' to libtool for the sake of Cygwin.
Mark Wooding [Sat, 14 May 2016 20:12:47 +0000 (21:12 +0100)]
Makefile.am: Say `-no-undefined' to libtool for the sake of Cygwin.

7 years agostruct/dstr-putf.c: Remove apparently redundant inclusion of <math.h>.
Mark Wooding [Sat, 14 May 2016 20:12:23 +0000 (21:12 +0100)]
struct/dstr-putf.c: Remove apparently redundant inclusion of <math.h>.

Just to make it clear that we don't depend on the floating-point library
in any important way.

7 years agoutils/t/exc-test.c: Print null pointers in a consistent way.
Mark Wooding [Sat, 14 May 2016 18:31:11 +0000 (19:31 +0100)]
utils/t/exc-test.c: Print null pointers in a consistent way.

Cygwin prints `0x0' instead of `(nil)'.  Fortunately, this is the only
pointer value we can reliably check for, so handle this ourselves.

7 years agosel/bres.c: Don't capture `h->h_name' in non-`const' pointer.
Mark Wooding [Sat, 14 May 2016 18:30:10 +0000 (19:30 +0100)]
sel/bres.c: Don't capture `h->h_name' in non-`const' pointer.

It turns out to be `const' under Cygwin.  In fact, we don't need to
capture it at all, so restructure the logic so we don't bother trying.

7 years agobuild: Cope with the `subdir-objects' world Automake wants us to live in.
Mark Wooding [Sun, 15 May 2016 13:11:02 +0000 (14:11 +0100)]
build: Cope with the `subdir-objects' world Automake wants us to live in.

Essentially, the Automake developers want to put the objects for
`PATH/TO/FILE.c' in `PATH/TO/FILE.o'.  This is wrongheaded, but we don't
seem to get much choice.  Unfortunately, it's also buggered.

This causes trouble for our precomputed source files.  The obvious
trouble happens if the source file we reference is explicitly in the
source tree, so we'll need to refer to the files differently in
`mumble_SOURCES' lines and the machinery which makes the generates the
files.  The obvious answer would be to introduce two variables for
referring to the precomptations tree.  This is where Automake's bugs
start to really bite.

The main problem is with Automake's automatic dependency-tracking
machinery.  For each object `FILE.o' which is going to be built, it
wants to make a `.deps/FILE.Po' file to track the detected dependencies.
Furthermore, the generated makefiles get unhappy if these files don't
already exist, so there's magic hung off the side of `config.status' to
make them.

This would be great, but the Automake machinery doesn't actually work
properly.  If you refer to a source file via a variable reference,
something like `$(things)/file.c', then Automake's `config.status' magic
creates a dependency-tracking file which is literally named
`.deps/$(things)/file.Po', and then the makefile gets upset when it
tries to include `$(things)/.deps/file.Po'.

So we have to write explicit relative paths to precomputed source file
names in `nodist_mumble_SOURCES' lists (because we make our own
arrangements for distributing them).

8 years agoMerge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/mLib
Mark Wooding [Thu, 18 Feb 2016 18:06:54 +0000 (18:06 +0000)]
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/mLib

* 'master' of git.distorted.org.uk:~mdw/publish/public-git/mLib:
  Release 2.2.2.2.
  debian/source/format: Apparently these are now mandatory.
  debian/control: Add Build-Depends on python for improved testing.

8 years agoRelease 2.2.2.2. 2.2.2.2
Mark Wooding [Thu, 18 Feb 2016 08:19:24 +0000 (08:19 +0000)]
Release 2.2.2.2.

8 years agodebian/source/format: Apparently these are now mandatory.
Mark Wooding [Thu, 18 Feb 2016 08:05:00 +0000 (08:05 +0000)]
debian/source/format: Apparently these are now mandatory.

8 years agodebian/control: Add Build-Depends on python for improved testing.
Mark Wooding [Thu, 18 Feb 2016 07:48:59 +0000 (07:48 +0000)]
debian/control: Add Build-Depends on python for improved testing.

8 years agostruct/dstr-putf.c: Fix typo in commentary.
Mark Wooding [Tue, 9 Feb 2016 20:17:58 +0000 (20:17 +0000)]
struct/dstr-putf.c: Fix typo in commentary.

8 years agocodec/codec.3: Minor formatting fix.
Mark Wooding [Fri, 29 May 2015 18:44:13 +0000 (19:44 +0100)]
codec/codec.3: Minor formatting fix.

9 years agoRelease 2.2.2.1. 2.2.2.1
Mark Wooding [Sun, 18 Jan 2015 16:54:42 +0000 (16:54 +0000)]
Release 2.2.2.1.

9 years agostruct/dstr-putf.c: Don't leak the argument and spec vectors.
Mark Wooding [Sun, 18 Jan 2015 16:50:40 +0000 (16:50 +0000)]
struct/dstr-putf.c: Don't leak the argument and spec vectors.

9 years agoRelease 2.2.2. 2.2.2
Mark Wooding [Sun, 20 Jul 2014 20:35:28 +0000 (21:35 +0100)]
Release 2.2.2.

9 years agostruct/dstr-putf.c: Different way to represent type lengths; new types.
Mark Wooding [Mon, 16 Jun 2014 21:09:38 +0000 (22:09 +0100)]
struct/dstr-putf.c: Different way to represent type lengths; new types.

Support the full menagerie of C99 and POSIX types.

9 years agostruct/dstr-putf.c (dstr_vputf): Rewrite to support `%n$...' specs.
Mark Wooding [Mon, 16 Jun 2014 00:56:16 +0000 (01:56 +0100)]
struct/dstr-putf.c (dstr_vputf): Rewrite to support `%n$...' specs.

The internals are generally just better now, and it should be easier to
support other interesting things.

9 years agosel/bres.c (zap): Don't scramble the freelist when a query is aborted.
Mark Wooding [Sat, 19 Jul 2014 16:14:11 +0000 (17:14 +0100)]
sel/bres.c (zap): Don't scramble the freelist when a query is aborted.

If a query is aborted after it's been committed to a server process,
then we kill the server and return its control block to the freelist.
Unfortunately, the function which does this, `zap', unconditionally
tries to unlink the control block from its current position in the
freelist; but it wasn't actually there before.  The result is that
another server control block might be linked back into the freelist.
Attaching a second client to it while it's already in use fails when
`attach' tries to remove the server's idle timer, which isn't active: at
this point, we get a segfault.

9 years agostruct/dstr-putf.c: Don't segfault on `*' width/precision indicators.
Mark Wooding [Sat, 14 Jun 2014 23:24:48 +0000 (00:24 +0100)]
struct/dstr-putf.c: Don't  segfault on `*' width/precision indicators.

Must have always been broken.  Strange: I thought I'd tested that.

10 years agocodec: New flag to ignore linear whitespace.
Mark Wooding [Mon, 24 Feb 2014 17:32:01 +0000 (17:32 +0000)]
codec: New flag to ignore linear whitespace.

Why was this missed the first time around?  Set this by default in the
`bincode' program.

10 years agostruct/tests.at: Skip tests if we don't have a working Python.
Mark Wooding [Sat, 28 Dec 2013 12:56:54 +0000 (12:56 +0000)]
struct/tests.at: Skip tests if we don't have a working Python.

10 years agoRelease 2.2.1. 2.2.1
Mark Wooding [Fri, 28 Jun 2013 22:29:04 +0000 (23:29 +0100)]
Release 2.2.1.

10 years agosys/mdup-test.sh: Remove obsolete test script.
Mark Wooding [Sun, 23 Jun 2013 11:40:20 +0000 (12:40 +0100)]
sys/mdup-test.sh: Remove obsolete test script.

10 years agoutils/macros.h: Support for compiler-specific annotations.
Mark Wooding [Sat, 22 Jun 2013 13:54:33 +0000 (14:54 +0100)]
utils/macros.h: Support for compiler-specific annotations.

Add some macros for attaching attributes to functions and so on, for
controlling warnings, and for marking variables as being unused or
ignorable.  Also use them for marking exported functions.

10 years agodebian: Drop CDBS in favour of using Debhelper directly.
Mark Wooding [Fri, 14 Jun 2013 19:43:15 +0000 (20:43 +0100)]
debian: Drop CDBS in favour of using Debhelper directly.

10 years agoGeneral build system spring-cleaning.
Mark Wooding [Fri, 7 Jun 2013 21:03:09 +0000 (22:03 +0100)]
General build system spring-cleaning.

Most of this comes from the shiny new build system for Catacomb.

10 years agoconfigure.ac: Some random formatting tweaks.
Mark Wooding [Sun, 2 Jun 2013 14:49:05 +0000 (15:49 +0100)]
configure.ac: Some random formatting tweaks.

10 years agostruct/dstr.[ch3] (dstr_putc): Accept an `int' argument.
Mark Wooding [Sat, 22 Jun 2013 13:47:31 +0000 (14:47 +0100)]
struct/dstr.[ch3] (dstr_putc): Accept an `int' argument.

This is a rather annoying problem.  It's useful to store binary data in
`dstr' objects, and, indeed, characters encoded (as <stdio.h> does) as
`unsigned char' values in an `int' object; but the `char' type of the
argument requires an implicit conversion, which may cause undefined
behaviour, and raises warnings if called with an out-of-range constant
value.

10 years agosel/bres.h: Fix include guard macro name.
Mark Wooding [Wed, 19 Jun 2013 00:31:12 +0000 (01:31 +0100)]
sel/bres.h: Fix include guard macro name.

10 years agosel/bres.c: Rewrite list hacking to avoid strict-aliasing badness.
Mark Wooding [Wed, 19 Jun 2013 00:35:21 +0000 (01:35 +0100)]
sel/bres.c: Rewrite list hacking to avoid strict-aliasing badness.

The circular list stuff was quite pretty but involved some really
unpleasant casting which modern GCC (quite properly) complains about
vociferously.

Replace it with more traditional doubly-linked-list hacking with
null-pointer sentinels, with the slightly nasty pointer swizzling tucked
away in useful macros.  Some of the uses of these macros (e.g.,
unlinking the first or last item in a list) could be made more efficient
by using special-case versions, but it doesn't seem worthwhile.

10 years agoutils/t/exc-test.c: Fix `%p' format/argument type mismatch.
Mark Wooding [Wed, 19 Jun 2013 02:23:11 +0000 (03:23 +0100)]
utils/t/exc-test.c: Fix `%p' format/argument type mismatch.

10 years agostruct/t/: Use better format for printing `size_t values.
Mark Wooding [Fri, 28 Jun 2013 20:41:50 +0000 (21:41 +0100)]
struct/t/: Use better format for printing `size_t values.

10 years agoconfigure.ac, sel/: Check for and use `socklen_t'.
Mark Wooding [Fri, 28 Jun 2013 20:41:14 +0000 (21:41 +0100)]
configure.ac, sel/: Check for and use `socklen_t'.

Rather than using `size_t' and hoping for the best.

10 years agohash/crc-mktab.c: Fix severe breakage on 64-bit systems.
Mark Wooding [Fri, 28 Jun 2013 20:40:20 +0000 (21:40 +0100)]
hash/crc-mktab.c: Fix severe breakage on 64-bit systems.

The output table was completely screwed.

10 years agosys/mdup.[ch]: Fix licensing notice to refer to LGPL2.
Mark Wooding [Fri, 21 Jun 2013 10:43:18 +0000 (11:43 +0100)]
sys/mdup.[ch]: Fix licensing notice to refer to LGPL2.

This is debris from when the original version of mdup was written
out-of-tree, and had the default GPL slapped on it.

For clarity: the `mdup' code in mLib has in fact always been released
under the terms of the GNU Library General Public License, version 2 or
(at your option) any later version.  It's just that the notice was
wrong.

10 years agobuild: Don't make libraries for precomputation utilities on demand.
Mark Wooding [Fri, 7 Jun 2013 21:03:40 +0000 (22:03 +0100)]
build: Don't make libraries for precomputation utilities on demand.

If `make' is in parallel mode, it will fire off multiple simultaneous
builds of the same library, and they interfere with each other.
Instead, just arrange that the libraries are made when we try to
distribute things.

10 years agovars.am: Use `AM_CPPFLAGS' for the includes list.
Mark Wooding [Sat, 1 Jun 2013 23:14:38 +0000 (00:14 +0100)]
vars.am: Use `AM_CPPFLAGS' for the includes list.

This frees up plain `CPPFLAGS' for users.

11 years agocodec/{base32,hex}.h: Include `codec.h'. 2.2.0.1
Mark Wooding [Sat, 12 Jan 2013 18:50:00 +0000 (18:50 +0000)]
codec/{base32,hex}.h: Include `codec.h'.

Brown paper-bag.  Release 2.2.0.1.

11 years agoRelease 2.2.0. Yay. 2.2.0
Mark Wooding [Wed, 9 Jan 2013 19:17:09 +0000 (19:17 +0000)]
Release 2.2.0.  Yay.

11 years agosel/sig.c: Discard return value without provoking other warnings.
Mark Wooding [Sat, 20 Oct 2012 11:58:56 +0000 (12:58 +0100)]
sel/sig.c: Discard return value without provoking other warnings.

11 years agosig.c: Ignore return code from write(2) to pipe.
Mark Wooding [Sun, 30 May 2010 14:31:30 +0000 (15:31 +0100)]
sig.c: Ignore return code from write(2) to pipe.

We get warnings nowadays about this.  These are annoying.  The only
thing that can go wrong is that the pipe is already full, so the write
will block.  But if that happens, our job is already done: the select(2)
loop will certainly wake up soon because the pipe is full of stuff to be
read.  So ignoring the error here is harmless.

Insert a stupid bodge to shut the compiler up.

11 years agoBuild system: Use Automake 1.11 `silent-rules'.
Mark Wooding [Sat, 22 May 2010 12:49:44 +0000 (13:49 +0100)]
Build system: Use Automake 1.11 `silent-rules'.

11 years agoInfrastructure: Switch testing over to Autotest.
Mark Wooding [Mon, 4 May 2009 00:38:20 +0000 (01:38 +0100)]
Infrastructure: Switch testing over to Autotest.

Currently mLib testing is a hopeless mess.  Maybe this will help sort it
out.

Some minor fixing was applied to the data-structure tests:

  * assoc and sym needed fixing to avoid corrupting their internal
    table-size count.  There are now additional assertions that this
    internal count matches the hash table's own count.

  * darray needed fixing to report empty-array on `first' and `last'
    requests.

11 years agocodec, baseconv: Cleanup of the various binary encoding functions.
Mark Wooding [Sun, 3 May 2009 00:44:57 +0000 (01:44 +0100)]
codec, baseconv: Cleanup of the various binary encoding functions.

The new codec interface provides an object-based interface to binary
encodings.

The baseconv code is a new unified implementation of Base64, Base32 and
hex encoding and decoding, built from a digit-at-a-time base conversion
core.  It implements a number of variations on the basic encodings,
including the URL-and-filename-safe variant.

I've adapted the current tests to use the new test program, but that's
not long for this world.

11 years agoprecomp: New directory for precomputed files.
Mark Wooding [Sun, 3 May 2009 00:42:39 +0000 (01:42 +0100)]
precomp: New directory for precomputed files.

The `precomp' directory in the distribution tarball contains pre-built
tables, for CRC and unihash computations.  Distributing the tables means
that the library can be built by cross-compilers.  Indeed, we don't even
try to generate the tables if cross compilation is detected.

The precomp directory shouldn't exist in revision-control, but it's
populated during the build process if necessary, and it's distributed in
release tarballs.

11 years agoInfrastructure: Split the files into subdirectories.
Mark Wooding [Sun, 3 May 2009 00:40:25 +0000 (01:40 +0100)]
Infrastructure: Split the files into subdirectories.

This makes the file tree rather easier to work with.

11 years agoHeaders: Guard inclusion of mLib headers.
Mark Wooding [Sun, 3 May 2009 00:40:25 +0000 (01:40 +0100)]
Headers: Guard inclusion of mLib headers.

A number of headers include other mLib headers without #ifndef guards.
This will slow down compilation slightly on some (less sensible)
compilers.

11 years agoInfrastructure: Strip away crufty CVS $Id$ tags.
Mark Wooding [Sun, 3 May 2009 00:40:24 +0000 (01:40 +0100)]
Infrastructure: Strip away crufty CVS $Id$ tags.

11 years agodebian: Prepare stuff for new version.
Mark Wooding [Sat, 20 Oct 2012 11:36:28 +0000 (12:36 +0100)]
debian: Prepare stuff for new version.

11 years agobres: Use mdup to duplicate file descriptors for the child.
Mark Wooding [Sun, 4 Jan 2009 17:30:40 +0000 (17:30 +0000)]
bres: Use mdup to duplicate file descriptors for the child.

11 years agomdup.h: Remove spurious duplicate summary line from comment.
Mark Wooding [Tue, 4 Sep 2012 15:50:18 +0000 (16:50 +0100)]
mdup.h: Remove spurious duplicate summary line from comment.

11 years agoRelease version 2.1.1. 2.1.1
Mark Wooding [Sat, 5 May 2012 11:04:06 +0000 (12:04 +0100)]
Release version 2.1.1.

11 years agobuf.c: Step over terminating null byte.
Mark Wooding [Sat, 5 May 2012 12:00:26 +0000 (13:00 +0100)]
buf.c: Step over terminating null byte.

11 years agobuf.h: Spurious `\' prevents declaration of `buf_putstr*'.
Mark Wooding [Sat, 5 May 2012 10:59:19 +0000 (11:59 +0100)]
buf.h: Spurious `\' prevents declaration of `buf_putstr*'.

12 years agoMakefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).
Mark Wooding [Sat, 25 Jun 2011 13:00:42 +0000 (14:00 +0100)]
Makefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).

It works, for one thing.  For some reason, mkinstalldirs is set to
$(SHELL) $(install_sh), and install_sh is set to $(SHELL) .../install_sh.
Can you see the problem here?

15 years agoCommit as 2.1.0. 2.1.0
Mark Wooding [Sun, 4 Jan 2009 16:29:45 +0000 (16:29 +0000)]
Commit as 2.1.0.

15 years agoMerge branch 'work'
Mark Wooding [Sun, 4 Jan 2009 16:27:13 +0000 (16:27 +0000)]
Merge branch 'work'

* work:
  mdup: New unit for juggling file descriptors.
  align: Add trivial manpage.
  Manpages: Move manpages (back?) into the top-level directory.

15 years agomdup: New unit for juggling file descriptors.
Mark Wooding [Sun, 4 Jan 2009 13:53:42 +0000 (13:53 +0000)]
mdup: New unit for juggling file descriptors.

The mdup function solves the problem of incorrect file descriptor
renumbering in fork/exec.

15 years agoMerge branch 'master' of /home/mdw/public-git/mLib
Mark Wooding [Sun, 4 Jan 2009 14:27:44 +0000 (14:27 +0000)]
Merge branch 'master' of /home/mdw/public-git/mLib

* 'master' of /home/mdw/public-git/mLib:
  Brown-paper-bag fixes.

15 years agoalign: Add trivial manpage.
Mark Wooding [Sun, 4 Jan 2009 13:50:14 +0000 (13:50 +0000)]
align: Add trivial manpage.

I discovered while reorganizing the manpage build system that there was
no manual for align.h.

15 years agoManpages: Move manpages (back?) into the top-level directory.
Mark Wooding [Sun, 4 Jan 2009 13:40:55 +0000 (13:40 +0000)]
Manpages: Move manpages (back?) into the top-level directory.

I missed man/Makefile.am in the build-system cleanup.  Rather than clean
it up separately, it seemed much better to group manpages with their
source files in the top-level Makefile.  So: mLib now has a completely
flat directory structure, except for config/.

15 years agoMakefile: Use check_PROGRAMS target.
Mark Wooding [Sun, 4 Jan 2009 01:51:59 +0000 (01:51 +0000)]
Makefile: Use check_PROGRAMS target.

This saves building the test programs if we don't actually need them.

15 years agoBrown-paper-bag fixes. 2.0.7
Mark Wooding [Sun, 28 Dec 2008 19:22:54 +0000 (19:22 +0000)]
Brown-paper-bag fixes.

  * Use `mLib' rather than `mlib' as the tarball name.  Otherwise, the
    header files end up in /use/include/mlib and nothing can find them.

  * Actually include `config.h' in the necessary places.

15 years agoRelease 2.0.6. 2.0.6
Mark Wooding [Sat, 27 Dec 2008 13:44:29 +0000 (13:44 +0000)]
Release 2.0.6.

15 years agosym-gtest: Don't include empty words.
Mark Wooding [Sat, 27 Dec 2008 14:26:02 +0000 (14:26 +0000)]
sym-gtest: Don't include empty words.

An empty word in a command like `set LABEL' provokes a segfault from
sym-test -- not entirely unreasonably considering that sym-test is a
quick lash-up and not intended to be robust against bogus test scripts.
So filter them out in advance.

15 years agoBuild: Overhaul build system.
Mark Wooding [Sat, 27 Dec 2008 00:08:35 +0000 (00:08 +0000)]
Build: Overhaul build system.

This has now moved a lot of the way towards the mLib-3 build system,
using appending and Automake conditionals.  The whole thing looks much
cleaner now.

15 years agodebian: Replace Debian build system with CDBS.
Mark Wooding [Sat, 27 Dec 2008 00:02:57 +0000 (00:02 +0000)]
debian: Replace Debian build system with CDBS.

Somewhat fiddly to get the ADNS build to work, but still simpler than
the one before.

15 years agoBuild: Put build utilities in the config/ subdirectory.
Mark Wooding [Fri, 26 Dec 2008 18:11:57 +0000 (18:11 +0000)]
Build: Put build utilities in the config/ subdirectory.

Leaving AC_CONFIG_AUX_DIR unspecified causes auto* to look for the
various utilities in parent directories, which breaks mdw-build.  I
could explicitly set AC_CONFIG_AUX_DIR to `.', but that misses an
opportunity to tidy up.

15 years agoMakefile: Ship versioncmp.in.
Mark Wooding [Fri, 26 Dec 2008 14:54:09 +0000 (14:54 +0000)]
Makefile: Ship versioncmp.in.

15 years agoversioncmp: Fix for `~' characters. 2.0.5
Mark Wooding [Wed, 14 May 2008 14:13:39 +0000 (15:13 +0100)]
versioncmp: Fix for `~' characters.

In the Debian version number ordering, `~' compares before end-of-
string.  Fix the function to actually cope with this, and introduce test
cases to make sure we actually get it right.

This is release 2.0.5.

16 years agoInfrastructure: Export pkgconfig file. 2.0.4
Mark Wooding [Mon, 17 Mar 2008 18:02:17 +0000 (18:02 +0000)]
Infrastructure: Export pkgconfig file.

This should keep us going while mLib-3 is worked on.

16 years agotestrig: Provide useful interface for more complicated test rigs.
Mark Wooding [Sat, 9 Feb 2008 19:54:08 +0000 (19:54 +0000)]
testrig: Provide useful interface for more complicated test rigs.

Provide a lower-level interface to the test-vector processing machinery,
and introduce `suites' over the top of the existing chunks.

17 years agocleanup: All the whitespace fixes, all at once.
Mark Wooding [Sun, 28 Jan 2007 22:56:52 +0000 (22:56 +0000)]
cleanup: All the whitespace fixes, all at once.

This damages one of the encoding test inputs, so the sample output also
needs to change accordingly.

17 years agodaemonize, versioncmp: Generally useful functions from tripe.
Mark Wooding [Sat, 6 Jan 2007 12:49:56 +0000 (12:49 +0000)]
daemonize, versioncmp: Generally useful functions from tripe.

See the manual for descriptions.

17 years agobuf: Fix two embarassing bugs found while writing Lisp bindings.
Mark Wooding [Mon, 15 May 2006 19:18:32 +0000 (20:18 +0100)]
buf: Fix two embarassing bugs found while writing Lisp bindings.

  * buf_{get,put}memNl never worked.  It always wrote the length
    big-endian.

  * buf_getmemz never worked, because it used the wrong length to find
    the terminator.

18 years agostr: New str_matchx function optionally reports possible prefix.
Mark Wooding [Thu, 13 Apr 2006 20:52:59 +0000 (21:52 +0100)]
str: New str_matchx function optionally reports possible prefix.

It can be useful (trust me) to know whether a string is a possible
prefix of something which matches a glob pattern.  The function
str_matchx is like str_match (which is now a compatibility veneer) and
takes a flags word; the option STRF_PREFIX reports success if it hits
the end of the target string while trying to find a match.

18 years agostr: Various whitespace cleanups.
Mark Wooding [Thu, 13 Apr 2006 20:43:29 +0000 (21:43 +0100)]
str: Various whitespace cleanups.

18 years agodebian: Clean noadns build directory.
Mark Wooding [Fri, 7 Apr 2006 14:05:01 +0000 (15:05 +0100)]
debian: Clean noadns build directory.

18 years agohash: Trivial whitespace cleanups.
Mark Wooding [Fri, 7 Apr 2006 14:03:32 +0000 (15:03 +0100)]
hash: Trivial whitespace cleanups.