chiark / gitweb /
mLib
12 months ago@@@ m4 mdw/cfd-subtree
Mark Wooding [Sun, 23 Apr 2023 20:29:13 +0000 (21:29 +0100)]
@@@ m4

12 months agobuild: Switch to using the new subtree version of CFD.
Mark Wooding [Sun, 14 Mar 2021 16:14:33 +0000 (16:14 +0000)]
build: Switch to using the new subtree version of CFD.

12 months agoAdd '.ext/cfd/' from commit '09d274abdda494424271ffff4f83ee5a58cb262e'
Mark Wooding [Sun, 23 Apr 2023 21:24:17 +0000 (22:24 +0100)]
Add '.ext/cfd/' from commit '09d274abdda494424271ffff4f83ee5a58cb262e'

git-subtree-dir: .ext/cfd
git-subtree-mainline: 46c7a9ab1e830a9c9ba2d607fdf48ed7554428bb
git-subtree-split: 09d274abdda494424271ffff4f83ee5a58cb262e

12 months agocodec/tests.at: Delete stray space before tab.
Mark Wooding [Sat, 30 Apr 2022 15:27:33 +0000 (16:27 +0100)]
codec/tests.at: Delete stray space before tab.

12 months agoutils/macros.h: Add `MUST_CHECK', so return codes aren't ignored.
Mark Wooding [Thu, 22 Dec 2022 17:10:27 +0000 (17:10 +0000)]
utils/macros.h: Add `MUST_CHECK', so return codes aren't ignored.

12 months agoutils/macros.3: Create manpage for the `CLANG_WARNING' macro.
Mark Wooding [Thu, 22 Dec 2022 17:09:33 +0000 (17:09 +0000)]
utils/macros.3: Create manpage for the `CLANG_WARNING' macro.

12 months ago.gitignore: Absorb `t/.gitignore'.
Mark Wooding [Sat, 30 Apr 2022 16:02:14 +0000 (17:02 +0100)]
.gitignore: Absorb `t/.gitignore'.

The ignored files are mostly global machinery which happens to be tucked
away in `t/'.

22 months agoutils/macros.h (STATIC_ASSERT): Boolean-canonify the expression.
Mark Wooding [Thu, 23 Jun 2022 14:01:14 +0000 (15:01 +0100)]
utils/macros.h (STATIC_ASSERT): Boolean-canonify the expression.

6.7.10p3 insists that the expression be an integer constant expression,
but this isn't in a constraint, so the behaviour is undefined if it's
not an integer constant expression.  Apply `!!' to force pointerish
expressions to integer type.

*headdesk*

2 years agoconfigure.ac: Provide a non-empty default manpage extension.
Mark Wooding [Sat, 30 Apr 2022 16:02:14 +0000 (17:02 +0100)]
configure.ac: Provide a non-empty default manpage extension.

This has been a bug forever, but there's been a corresponding bug
in the `mdw_MANEXT' macro forever which ignores the supplied default
and uses `mLib' instead, so nobody noticed.  Until I fixed the
other bug and my build broke.

2 years agovars.am: Quote `$(manext)', or things break if it's empty.
Mark Wooding [Sat, 30 Apr 2022 16:00:22 +0000 (17:00 +0100)]
vars.am: Quote `$(manext)', or things break if it's empty.

It's not usually empty because it's defaulted in `configure.ac', but
it can be overridden to be empty.  Also, there might be bugs.

2 years ago.gitignore: Organize and clean up.
Mark Wooding [Sat, 30 Apr 2022 18:51:14 +0000 (19:51 +0100)]
.gitignore: Organize and clean up.

Divide into sections and add headings; add leading `/' to patterns which
are only expected to match in the same directory as the `.gitignore'
file; and add trailing `/' to patterns which should match directories.

2 years ago.gitignore: Delete now that we don't need this thing any more.
Mark Wooding [Sat, 30 Apr 2022 17:38:22 +0000 (18:38 +0100)]
.gitignore: Delete now that we don't need this thing any more.

2 years agoutils/compiler.h: Prefer `ifdef' rather than `if defined'.
Mark Wooding [Sat, 4 Sep 2021 18:53:51 +0000 (19:53 +0100)]
utils/compiler.h: Prefer `ifdef' rather than `if defined'.

3 years agobuild/autotest.am: Fix formatting of list initialization assignments.
Mark Wooding [Sun, 9 Aug 2020 13:00:59 +0000 (14:00 +0100)]
build/autotest.am: Fix formatting of list initialization assignments.

3 years agom4/: Reformat to match current m4/shell style.
Mark Wooding [Sun, 9 Aug 2020 11:54:10 +0000 (12:54 +0100)]
m4/: Reformat to match current m4/shell style.

3 years agom4/mdw-dir-texmf.m4: Nest and indent `mdw_DEFINE_PATHS' properly.
Mark Wooding [Sun, 9 Aug 2020 12:16:53 +0000 (13:16 +0100)]
m4/mdw-dir-texmf.m4: Nest and indent `mdw_DEFINE_PATHS' properly.

Not sure why this enclosed the `AC_MSG_RESULT' before.  Oh, well.

3 years agom4/mdw-dir-texmf.m4: Pull `texmf' path guesswork out of `AC_ARG_WITH'.
Mark Wooding [Sun, 9 Aug 2020 12:14:17 +0000 (13:14 +0100)]
m4/mdw-dir-texmf.m4: Pull `texmf' path guesswork out of `AC_ARG_WITH'.

Unfortunate tangling of responsibilities.  Instead, leave a flag so that
top-level code can decide to do the guesswork.

3 years agom4/mdw-manext.m4: Don't hardcode the manpage extension to `mLib'.
Mark Wooding [Sun, 9 Aug 2020 12:04:36 +0000 (13:04 +0100)]
m4/mdw-manext.m4: Don't hardcode the manpage extension to `mLib'.

Obviously this isn't used as widely as it ought to be!

3 years agom4/mdw-dir-texmf.m4, m4/mdw-manext.m4: Use `AS_HELP_STRING'.
Mark Wooding [Sun, 9 Aug 2020 12:02:32 +0000 (13:02 +0100)]
m4/mdw-dir-texmf.m4, m4/mdw-manext.m4: Use `AS_HELP_STRING'.

I think this didn't exist when I wrote these macros.

3 years agom4/mdw-define-paths.m4: Replace `$(eval echo ...)' nonsense.
Mark Wooding [Sun, 9 Aug 2020 11:50:15 +0000 (12:50 +0100)]
m4/mdw-define-paths.m4: Replace `$(eval echo ...)' nonsense.

No idea why I didn't do it this way before.

3 years agom4/mdw-define-paths.m4: Use `$(...)' for command substitution.
Mark Wooding [Sun, 9 Aug 2020 11:17:26 +0000 (12:17 +0100)]
m4/mdw-define-paths.m4: Use `$(...)' for command substitution.

It nests better than the old-fashioned ``...`' syntax.  Which is good,
because it's nested here.

3 years agom4/mdw-auto-version.m4: Don't try appending suffixes any more.
Mark Wooding [Sun, 9 Aug 2020 11:11:19 +0000 (12:11 +0100)]
m4/mdw-auto-version.m4: Don't try appending suffixes any more.

The old `auto-version.in' has gone for good.

3 years agom4/mdw-auto-version.m4: Delete the bizarre pre-definition.
Mark Wooding [Sun, 9 Aug 2020 11:07:11 +0000 (12:07 +0100)]
m4/mdw-auto-version.m4: Delete the bizarre pre-definition.

Not really sure what this was for, but this hack has always been there
in some form since the macro was introduced.  It doesn't seem necessary
now, certainly.

3 years agom4/: Reformat the Autoconf macros in `aclocal' style.
Mark Wooding [Sun, 9 Aug 2020 10:58:37 +0000 (11:58 +0100)]
m4/: Reformat the Autoconf macros in `aclocal' style.

Add a `LICENSE' section, and `# serial' markers.

3 years agoaclocal.glob, m4/: Split the monster into separate `aclocal'-ish files.
Mark Wooding [Sun, 9 Aug 2020 10:53:11 +0000 (11:53 +0100)]
aclocal.glob, m4/: Split the monster into separate `aclocal'-ish files.

Now these can be linked into a project's `m4/' directory in the usual
way.  Much better!

This has just redistributed the existing content: none of the code is
changed.

3 years agobuild/ scripts: Remove the version-number machinery.
Mark Wooding [Sun, 9 Aug 2020 10:46:49 +0000 (11:46 +0100)]
build/ scripts: Remove the version-number machinery.

Since these things are no longer installed anywhere outside of a
revision-controlled working tree, they don't need to know their version
numbers any more.

3 years agoScatter the useful files into subdirectories by theme.
Mark Wooding [Sun, 9 Aug 2020 10:39:55 +0000 (11:39 +0100)]
Scatter the useful files into subdirectories by theme.

This is maybe a little random, but better ideas seem thin on the ground.

  * `build/' is for build tools: scripts and build-tool fragments which
    are handy for building projects.

  * `doc/' is for documentation, and things which help with producing
    documentation, such as styles.

  * `licence/' contains licence documents.

  * `m4/' will be for Autoconf machinery, but it's not there yet:
    splitting up `aclocal.glob' will be a job for another commit.

  * `src/' contains source code which is shared among many projects.

This commit just moves the files about.  Some of the scripts have had
their `.in' suffix stripped because they should no longer be hacked by
Autoconf or anything similar, but none of the content is modified.

3 years agoDelete everything only needed for standalone building.
Mark Wooding [Sun, 9 Aug 2020 10:29:57 +0000 (11:29 +0100)]
Delete everything only needed for standalone building.

This is the start of an effort to change the way CFD is used by
projects.  Rather than being installed on developer systems as a thing
in its own right, it should be tucked away in a project, using `git
subtree' or similar.

Please don't use `git submodule' for this!

3 years agoauto-version.in: Fix typo in commentary.
Mark Wooding [Sun, 9 Aug 2020 10:45:55 +0000 (11:45 +0100)]
auto-version.in: Fix typo in commentary.

3 years agostruct/buf.h: Muffle annoying new GCC warning.
Mark Wooding [Fri, 8 May 2020 23:10:54 +0000 (00:10 +0100)]
struct/buf.h: Muffle annoying new GCC warning.

This one seems like more trouble than it's worth.  Just squash it in
GCC versions recent enough to know about the warning.

3 years agoRelease 2.5.0. 2.5.0
Mark Wooding [Fri, 8 May 2020 19:16:53 +0000 (20:16 +0100)]
Release 2.5.0.

3 years agoutils/versioncmp.h: Add a wrapper macro for `versioncmp'.
Mark Wooding [Fri, 8 May 2020 19:15:30 +0000 (20:15 +0100)]
utils/versioncmp.h: Add a wrapper macro for `versioncmp'.

Similar to the macros introduced for `strcmp' end friends in
3618811496a6d131fd4bffa19e262c521d39e819.

3 years agostruct/assoc.[ch]: Fix some commentary typos.
Mark Wooding [Sat, 28 Mar 2020 09:32:52 +0000 (09:32 +0000)]
struct/assoc.[ch]: Fix some commentary typos.

3 years ago*/t/*.py: Fix the various testing scripts for Python 3 compatibility.
Mark Wooding [Fri, 4 Oct 2019 17:30:26 +0000 (18:30 +0100)]
*/t/*.py: Fix the various testing scripts for Python 3 compatibility.

  * Put parentheses around `print' arguments.  (This is most of the
    churn.)

  * Cope with `xrange' being renamed to `range' in Python 3.

  * Cope with `MAP.keys()' not returning a list any more in Python 3.

  * Cope with integer division not returning an integer any more in
    Python 3.  (Use a shift, because that's not changed.)

3 years agoutils/macros.h: Add <ctype.h> and `foocmp' helper macros.
Mark Wooding [Tue, 1 Oct 2019 17:41:17 +0000 (18:41 +0100)]
utils/macros.h: Add <ctype.h> and `foocmp' helper macros.

Both of these have been a nuisance for years.  Do something about it.

The command

git grep -En '\<(is|to)[a-z]+\(|\<(str|mem)[a-z]*cmp\(' -- '*.[ch]'

finds code which it might be good to change.

The hairy Emacs command

(query-replace-regexp
 "\\<\\(\\(str\\|mem\\)\\sw*cmp\\)(\\([^,]*\\), \\([^)]*\\)) \\(==\\|!=\\|<\\|<=\\|>\\|>=\\) 0"
 '(replace-eval-replacement
   . (concat (replace-quote (upcase (match-string 1)))
     "(\\3, \\5, \\4)"))
 nil
 (if (and transient-mark-mode mark-active) (region-beginning))
 (if (and transient-mark-mode mark-active) (region-end))
 nil)

will convert easy cases of `foocmp' calls, but hard ones have to be done
by hand.

3 years agoMerge branch '2.4.x'
Mark Wooding [Fri, 8 May 2020 12:43:59 +0000 (13:43 +0100)]
Merge branch '2.4.x'

* 2.4.x:
  Release 2.4.2.
  sel/bres-adns.c: Fix incorrect array bound.

3 years agoRelease 2.4.2. 2.4.x 2.4.2
Mark Wooding [Fri, 8 May 2020 11:45:33 +0000 (12:45 +0100)]
Release 2.4.2.

3 years agosel/bres-adns.c: Fix incorrect array bound.
Mark Wooding [Tue, 7 Apr 2020 19:30:49 +0000 (20:30 +0100)]
sel/bres-adns.c: Fix incorrect array bound.

GCC helpfully points out that `N(av)' does nothing very useful.  In
fact, I expect that it's almost always zero, which means that we don't
end up assembling addresses correctly.  And we never have done.

How embarrassing.

(cherry picked from commit 5086ffd7745337f5bee3c5c771cfcf1da71b03c3)

3 years agoRelease 1.4.0.
Mark Wooding [Fri, 8 May 2020 02:45:30 +0000 (03:45 +0100)]
Release 1.4.0.

3 years agomdwsetup.py: Turn off Python's usual `SIGINT' handler.
Mark Wooding [Mon, 13 Apr 2020 11:29:22 +0000 (12:29 +0100)]
mdwsetup.py: Turn off Python's usual `SIGINT' handler.

Without this, a buggy native-code extension can loop forever, and Emacs
can't easily be persuaded to kill it.

3 years agopysetup.mk: Handle the `DESTDIR' install variable usefully.
Mark Wooding [Mon, 25 Nov 2019 15:04:07 +0000 (15:04 +0000)]
pysetup.mk: Handle the `DESTDIR' install variable usefully.

3 years agopysetup.mk: Remove pointless explicit `make' step in `distcheck'.
Mark Wooding [Mon, 14 Oct 2019 10:29:44 +0000 (11:29 +0100)]
pysetup.mk: Remove pointless explicit `make' step in `distcheck'.

Now that `check/PYTHON' depends on `all/PYTHON', this just adds a
serialization point which we don't need or want.

3 years agomdwsetup.py: Add a command for running tests.
Mark Wooding [Wed, 9 Oct 2019 18:50:56 +0000 (19:50 +0100)]
mdwsetup.py: Add a command for running tests.

3 years agopysetup.mk: Pass `make' flags down to `distcheck' build rules.
Mark Wooding [Mon, 14 Oct 2019 10:26:46 +0000 (11:26 +0100)]
pysetup.mk: Pass `make' flags down to `distcheck' build rules.

This firstly means that Makefile variables such as `PYTHON' are honoured
properly, and secondly that flags requesting parallel building are
respected.

3 years agopysetup.mk: Run commands on multiple `python's, possibly in parallel.
Mark Wooding [Mon, 14 Oct 2019 10:22:16 +0000 (11:22 +0100)]
pysetup.mk: Run commands on multiple `python's, possibly in parallel.

Most targets delegated to `setup.py' are now run, in parallel, on
multiple Python versions listed in the new Makefile variable `PYTHONS'.
The exceptions are `gen' and `dist', which only make sense with a single
Python.

Targets which can run multiple Python versions now support per-version
options for targets: set the variable OPTS-TARGET/PYTHON (e.g.,
`OPTS-install/python3.5').

3 years agopysetup.mk: Add an explicit `gen' target, and make `all' depend on it.
Mark Wooding [Mon, 14 Oct 2019 10:37:41 +0000 (11:37 +0100)]
pysetup.mk: Add an explicit `gen' target, and make `all' depend on it.

I plan to add support for multiple `python' versions building in
parallel in the same working tree.  But generated files are shared
between `python' versions, and there will be a mess if things happen in
the wrong order.

3 years agomdwsetup.py: Insert a space before direct-superclass lists.
Mark Wooding [Wed, 9 Oct 2019 17:02:49 +0000 (18:02 +0100)]
mdwsetup.py: Insert a space before direct-superclass lists.

3 years agomdwsetup.py: Fixes for Python 3 compatibility.
Mark Wooding [Tue, 1 Oct 2019 22:57:28 +0000 (23:57 +0100)]
mdwsetup.py: Fixes for Python 3 compatibility.

  * Write parentheses around `print' operands.

  * Set `universal_newlines' on in `Popen' to force handling in text
    mode.

  * Use an unpleasant hack to inject the `CommandClass' metaclass,
    because the official syntax is so different between the two
    versions.

3 years agomdwsetup.py (progoutput): Only read one byte to decide whether there is more.
Mark Wooding [Fri, 4 Oct 2019 15:22:15 +0000 (16:22 +0100)]
mdwsetup.py (progoutput): Only read one byte to decide whether there is more.

There's no point in slurping the entire output now that we're closing
the pipe /before/ trying to waitpid(2): the child will hit `SIGPIPE' (or
`EPIPE') rather than blocking on output.

3 years agomdwsetup.py (progoutput): Explicitly close the `stdout' pipe.
Mark Wooding [Fri, 4 Oct 2019 15:10:50 +0000 (16:10 +0100)]
mdwsetup.py (progoutput): Explicitly close the `stdout' pipe.

3 years agomdwsetup.py (pkg_config): Check environment for settings.
Mark Wooding [Tue, 1 Oct 2019 21:57:40 +0000 (22:57 +0100)]
mdwsetup.py (pkg_config): Check environment for settings.

This can override or replace pkg-config(1), similar to the
`PKG_CHECK_MODULES' Autoconf macro.

3 years agomdwsetup.py (pkg_config): Change the token shown in error reports.
Mark Wooding [Tue, 1 Oct 2019 21:57:13 +0000 (22:57 +0100)]
mdwsetup.py (pkg_config): Change the token shown in error reports.

3 years agomdwsetup.py (pkg_config): Rearrange and reformat.
Mark Wooding [Tue, 1 Oct 2019 21:56:27 +0000 (22:56 +0100)]
mdwsetup.py (pkg_config): Rearrange and reformat.

3 years agomdwsetup.py: Don't use the ancient `raise' syntax.
Mark Wooding [Tue, 1 Oct 2019 21:54:45 +0000 (22:54 +0100)]
mdwsetup.py: Don't use the ancient `raise' syntax.

3 years agoauto-version.in: Prefix Git version with mangled `x.y.z~' Debian version.
Mark Wooding [Tue, 1 Oct 2019 11:01:27 +0000 (12:01 +0100)]
auto-version.in: Prefix Git version with mangled `x.y.z~' Debian version.

The mangling is necessary to placate `pkg-config', which doesn't
implement `rpmvercmp' properly.

3 years agoMerge branch '1.3.x'
Mark Wooding [Fri, 8 May 2020 11:29:24 +0000 (12:29 +0100)]
Merge branch '1.3.x'

* 1.3.x:
  Release 1.3.15.
  mdwsetup.py: Adjust exit status from `subprocess'.
  mdwsetup.py: Fix unbound variable reference in error case.
  mdwsetup.py: Add missing `OS.' qualifier on `W...' calls.
  texinice.tex: Cope with new names for page-dimension registers.
  Makefile.am:  Tweak `silent-rules' machinery.
  auto-version.in: Don't insist that `.git' is a directory.

3 years agoRelease 1.3.15.
Mark Wooding [Fri, 8 May 2020 02:00:35 +0000 (03:00 +0100)]
Release 1.3.15.

Release 1.3.16.

3 years agomdwsetup.py: Adjust exit status from `subprocess'.
Mark Wooding [Sat, 19 Oct 2019 16:08:28 +0000 (17:08 +0100)]
mdwsetup.py: Adjust exit status from `subprocess'.

It doesn't return the raw status from `wait', but some kind of
inconvenient cooked status.

3 years agomdwsetup.py: Fix unbound variable reference in error case.
Mark Wooding [Fri, 8 May 2020 11:24:18 +0000 (12:24 +0100)]
mdwsetup.py: Fix unbound variable reference in error case.

This is debris from f74ba2bb507cfeadd5518d5468c7ab7281b581b7 which
changed a function into a class, and the `source' argument into (a) a
list and (b) an instance variable.  Fix this reference which should have
changed along with the rest.

3 years agomdwsetup.py: Add missing `OS.' qualifier on `W...' calls.
Mark Wooding [Sat, 19 Oct 2019 16:07:52 +0000 (17:07 +0100)]
mdwsetup.py: Add missing `OS.' qualifier on `W...' calls.

Evidently this code hasn't been tested before.

3 years agotexinice.tex: Cope with new names for page-dimension registers.
Mark Wooding [Tue, 7 Apr 2020 19:14:44 +0000 (20:14 +0100)]
texinice.tex: Cope with new names for page-dimension registers.

Texinfo 6.2 apparently renamed `\pagewidth' to `\txipagewidth', and
similarly for `\pageheight', to avoid some conflict with LuaTeX.  Fix
`@afourpaper' to with these new names.

(cherry picked from commits 892a9f865ad8baed5c67ddf9d68301c916bfb0f1 and
0b5f869b689a085655df9e1a261eacf8c7facade)

3 years agoMakefile.am: Tweak `silent-rules' machinery.
Mark Wooding [Sat, 22 Jul 2017 10:43:11 +0000 (11:43 +0100)]
Makefile.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 CFD now requires Automake 1.11.2 or later to build from
the Git tree.

(cherry picked from commit 262cdcea7d345a0e523957de46fceed547f2de44)

3 years agoauto-version.in: Don't insist that `.git' is a directory.
Mark Wooding [Sat, 22 Jul 2017 10:35:55 +0000 (11:35 +0100)]
auto-version.in: Don't insist that `.git' is a directory.

Nowadays, `git worktree' can cause this to be a regular file instead,
and it's a shame if we can't spot it properly.

(cherry picked from commit e3bf207c8bde1191c3850debd27ac604305bff31)

4 years agotexinice.tex: Fix bungled change.
Mark Wooding [Mon, 27 Apr 2020 09:19:01 +0000 (10:19 +0100)]
texinice.tex: Fix bungled change.

Alas, `@' is still magical, so comparing against `\@@undefined' is
inadvisable.

4 years agoMerge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/cfd
Mark Wooding [Mon, 27 Apr 2020 09:07:45 +0000 (10:07 +0100)]
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/cfd

* 'master' of git.distorted.org.uk:~mdw/publish/public-git/cfd:
  texinice.tex: Cope with new names for page-dimension registers.

4 years agosel/bres-adns.c: Fix incorrect array bound.
Mark Wooding [Tue, 7 Apr 2020 19:30:49 +0000 (20:30 +0100)]
sel/bres-adns.c: Fix incorrect array bound.

GCC helpfully points out that `N(av)' does nothing very useful.  In
fact, I expect that it's almost always zero, which means that we don't
end up assembling addresses correctly.  And we never have done.

How embarrassing.

4 years agotexinice.tex: Cope with new names for page-dimension registers.
Mark Wooding [Tue, 7 Apr 2020 19:14:44 +0000 (20:14 +0100)]
texinice.tex: Cope with new names for page-dimension registers.

Texinfo 6.2 apparently renamed `\pagewidth' to `\txipagewidth', and
similarly for `\pageheight', to avoid some conflict with LuaTeX.  Fix
`@afourpaper' to with these new names.

4 years agodebian/rules: Don't pass `--without=...' to all Debhelper programs.
Mark Wooding [Sat, 22 Jul 2017 10:40:53 +0000 (11:40 +0100)]
debian/rules: Don't pass `--without=...' to all Debhelper programs.

4 years agoMakefile.am: Tweak `silent-rules' machinery.
Mark Wooding [Sat, 22 Jul 2017 10:43:11 +0000 (11:43 +0100)]
Makefile.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 CFD now requires Automake 1.11.2 or later to build from
the Git tree.

4 years agoauto-version.in: Don't insist that `.git' is a directory.
Mark Wooding [Sat, 22 Jul 2017 10:35:55 +0000 (11:35 +0100)]
auto-version.in: Don't insist that `.git' is a directory.

Nowadays, `git worktree' can cause this to be a regular file instead,
and it's a shame if we can't spot it properly.

4 years agoMerge branch '2.4.x'
Mark Wooding [Sat, 19 Oct 2019 13:41:53 +0000 (14:41 +0100)]
Merge branch '2.4.x'

* 2.4.x:
  struct/buf.c (buf_getmem*): Add an explicit `BENSURE'.

4 years agostruct/buf.c (buf_getmem*): Add an explicit `BENSURE'.
Mark Wooding [Fri, 11 Oct 2019 22:15:42 +0000 (23:15 +0100)]
struct/buf.c (buf_getmem*): Add an explicit `BENSURE'.

Otherwise we fail when processing a 64-bit length on a 32-bit platform:
an overlong 64-bit length gets truncated to a possibly-acceptable 32-bit
length in the implicit conversion to `size_t' in the call to `buf_get'.
Using `BENSURE' directly ensures that the comparison gets done with the
correct integer type.

4 years agoMerge branch '2.4.x'
Mark Wooding [Tue, 8 Oct 2019 10:29:17 +0000 (11:29 +0100)]
Merge branch '2.4.x'

* 2.4.x:
  utils/str.3: Fix typeface for mathematics.
  sys/tests.at: Add full stops after header comments.
  codec/codec.3: Fix spacing after ellipsis.
  utils/t/bits-testgen.py: Set the `SEED' from the command-line correctly.
  utils/t/bits-testgen.py: Make `arg' return arguments in the right order.

4 years agodebian/changelog: Prepare for the next version.
Mark Wooding [Fri, 4 Oct 2019 15:24:44 +0000 (16:24 +0100)]
debian/changelog: Prepare for the next version.

4 years agoutils/str.3: Fix typeface for mathematics.
Mark Wooding [Tue, 8 Oct 2019 10:24:37 +0000 (11:24 +0100)]
utils/str.3: Fix typeface for mathematics.

4 years agosys/tests.at: Add full stops after header comments.
Mark Wooding [Tue, 8 Oct 2019 10:24:01 +0000 (11:24 +0100)]
sys/tests.at: Add full stops after header comments.

4 years agocodec/codec.3: Fix spacing after ellipsis.
Mark Wooding [Tue, 8 Oct 2019 10:23:37 +0000 (11:23 +0100)]
codec/codec.3: Fix spacing after ellipsis.

4 years agoutils/t/bits-testgen.py: Set the `SEED' from the command-line correctly.
Mark Wooding [Fri, 4 Oct 2019 17:27:28 +0000 (18:27 +0100)]
utils/t/bits-testgen.py: Set the `SEED' from the command-line correctly.

This never stood a chance before, because `arg' always returned the
script path.  Now that's fixed, instead `int' complains that the hex
number it's being given isn't acceptable.  I can't fix this by
explicitly passing a radix of 0 because that doesn't allow an existing
integer object.  So we have this circumlocution.

4 years agoutils/t/bits-testgen.py: Make `arg' return arguments in the right order.
Mark Wooding [Fri, 4 Oct 2019 17:26:07 +0000 (18:26 +0100)]
utils/t/bits-testgen.py: Make `arg' return arguments in the right order.

Obviously I never watched this run before.

4 years agodebian/: Bump to Debhelper 10.
Mark Wooding [Tue, 1 Oct 2019 20:28:06 +0000 (21:28 +0100)]
debian/: Bump to Debhelper 10.

4 years agodebian/changelog: Prepare for the next version.
Mark Wooding [Tue, 1 Oct 2019 11:01:08 +0000 (12:01 +0100)]
debian/changelog: Prepare for the next version.

4 years agodebian/: Bump to Debhelper 10.
Mark Wooding [Sun, 29 Sep 2019 14:50:36 +0000 (15:50 +0100)]
debian/: Bump to Debhelper 10.

4 years agoRelease 2.4.1. 2.4.1
Mark Wooding [Sun, 29 Sep 2019 14:13:44 +0000 (15:13 +0100)]
Release 2.4.1.

4 years agodebian/: Ship correct symbols files.
Mark Wooding [Fri, 27 Sep 2019 16:25:15 +0000 (17:25 +0100)]
debian/: Ship correct symbols files.

4 years agodebian/.gitignore: Ignore generated `lib2-adns.install' file.
Mark Wooding [Fri, 27 Sep 2019 16:24:47 +0000 (17:24 +0100)]
debian/.gitignore: Ignore generated `lib2-adns.install' file.

4 years agomem/track.[ch]: Delete ancient debris.
Mark Wooding [Fri, 27 Sep 2019 16:19:53 +0000 (17:19 +0100)]
mem/track.[ch]: Delete ancient debris.

Apparently these got forgotten in the source-tree reorganization back in
2.2.0.  They've been languishing in the version-control system, but
haven't been built or distributed since then -- and nothing has
noticed.  Also, they've never been documented, and don't do anything
very useful anyway.

So just delete them and let history forget they ever existed.

4 years agohash/unihash.c: Replace a dynamic assertion with a static one.
Mark Wooding [Sun, 29 Sep 2019 14:18:53 +0000 (15:18 +0100)]
hash/unihash.c: Replace a dynamic assertion with a static one.

4 years agoutils/macros.h: Introduce a `STATIC_ASSERT' macro.
Mark Wooding [Thu, 26 Sep 2019 19:18:11 +0000 (20:18 +0100)]
utils/macros.h: Introduce a `STATIC_ASSERT' macro.

4 years agoRelease 2.4.0. 2.4.0
Mark Wooding [Sat, 21 Sep 2019 20:38:36 +0000 (21:38 +0100)]
Release 2.4.0.

4 years agostruct/buf.c: Muffle an annoying Clang warning about a pointless assertion.
Mark Wooding [Wed, 18 Sep 2019 19:22:39 +0000 (20:22 +0100)]
struct/buf.c: Muffle an annoying Clang warning about a pointless assertion.

Of course, since this code is macro-generated, it's not at all
pointless.

4 years agoutils/macros.h: Sprinkle `__...__' over GCC (and Clang) attribute names.
Mark Wooding [Wed, 18 Sep 2019 16:29:30 +0000 (17:29 +0100)]
utils/macros.h: Sprinkle `__...__' over GCC (and Clang) attribute names.

I suspect that things like `noreturn' might already be macros.  Though,
honestly, this header file is not a shining example of namespace hygiene
in countless other ways.

4 years agohash/Makefile.am, hash/crc32.h: Make the CRC table be `const'.
Mark Wooding [Wed, 4 Sep 2019 17:41:14 +0000 (18:41 +0100)]
hash/Makefile.am, hash/crc32.h: Make the CRC table be `const'.

Yay.  That's an extra kilobyte of sharable data.

4 years agohash/crc-mktab.c, hash/unihash-mkstatic.c: Add `const' option.
Mark Wooding [Wed, 4 Sep 2019 17:39:52 +0000 (18:39 +0100)]
hash/crc-mktab.c, hash/unihash-mkstatic.c: Add `const' option.

Add `-C' option to produce `const' tables.

I'd probably like this to be the default, at least for `crc-mktab', but
currently it isn't for (a) compatibility and (b) consistency between the
two.

4 years agoRelease 2.3.3.1. 2.3.3.1
Mark Wooding [Fri, 9 Aug 2019 10:33:17 +0000 (11:33 +0100)]
Release 2.3.3.1.

4 years agoutils/macros.h: Define missing fallback for `NORETURN'.
Mark Wooding [Fri, 9 Aug 2019 10:30:09 +0000 (11:30 +0100)]
utils/macros.h: Define missing fallback for `NORETURN'.

5 years agoRelease 2.3.3. 2.3.3
Mark Wooding [Tue, 25 Dec 2018 15:06:42 +0000 (15:06 +0000)]
Release 2.3.3.

5 years agosys/fdpass.c: Allocate extra cmsg space to hack around a Qemu bug.
Mark Wooding [Tue, 25 Dec 2018 18:07:27 +0000 (18:07 +0000)]
sys/fdpass.c: Allocate extra cmsg space to hack around a Qemu bug.

*shakes head sadly*

5 years agosys/t/fdpass-test.c: Add a simple test for file-descriptor passing.
Mark Wooding [Tue, 25 Dec 2018 15:02:08 +0000 (15:02 +0000)]
sys/t/fdpass-test.c: Add a simple test for file-descriptor passing.

5 years agosys/fdpass.c: Fix expected size of descriptor message.
Mark Wooding [Tue, 25 Dec 2018 15:01:18 +0000 (15:01 +0000)]
sys/fdpass.c: Fix expected size of descriptor message.

This typo breaks 64-bit targets, and I'd never noticed because of
inadequate testing.

5 years agoMakefile.am: Link the main library with $(MLIB_LIBS).
Mark Wooding [Wed, 12 Dec 2018 18:54:31 +0000 (18:54 +0000)]
Makefile.am: Link the main library with $(MLIB_LIBS).

Otherwise we miss out `-ladns' and there is sadness.  I have no idea why
this has only become a problem just now.