simon-git: puzzles (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Thu Apr 6 07:11:57 BST 2023
TL;DR:
d935504 Remove obsolete testbuild.c.
3b9cafa Fall back to <math.h> if <tgmath.h> doesn't work.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2023-04-06 07:11:57
commit d9355041a55f281436c59fecaac1e15e4c585f8d
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=d9355041a55f281436c59fecaac1e15e4c585f8d;hp=7a66855947c043e502d00fa41cd7b7c06127adf9
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Apr 6 07:07:30 2023 +0100
Remove obsolete testbuild.c.
It was originally used for probing the available warning flags in the
compiler, by adding them one by one and making sure this test file
still compiled.
But that whole mechanism was removed in commit 306fab356e357ef, and
since then, testbuild.c has been unused. Belatedly throw it away.
cmake/testbuild.c | 23 -----------------------
1 file changed, 23 deletions(-)
commit 3b9cafa09f783ccadda14d11fc8b73dc496368c0
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=3b9cafa09f783ccadda14d11fc8b73dc496368c0;hp=d9355041a55f281436c59fecaac1e15e4c585f8d
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Apr 6 07:07:30 2023 +0100
Fall back to <math.h> if <tgmath.h> doesn't work.
This fixes a build failure introduced by commit 2e48ce132e011e8
yesterday.
When I saw that commit I expected the most likely problem would be in
the NestedVM build, which is currently the thing with the most most
out-of-date C implementation. And indeed the NestedVM toolchain
doesn't have <tgmath.h> - but much more surprisingly, our _Windows_
builds failed too, with a compile error inside <tgmath.h> itself!
I haven't looked closely into the problem yet. Our Windows builds are
done with clang, which comes with its own <tgmath.h> superseding the
standard Windows one. So you'd _hope_ that clang could make sense of
its own header! But perhaps the problem is that this is an unusual
compile mode and hasn't been tested.
My fix is to simply add a cmake check for <tgmath.h> - which doesn't
just check the file's existence, it actually tries compiling a file
that #includes it, so it will detect 'file exists but is mysteriously
broken' just as easily as 'not there at all'. So this makes the builds
start working again, precisely on Ben's theory of opportunistically
using <tgmath.h> where possible and falling back to <math.h>
otherwise.
It looks ugly, though! I'm half tempted to make a new header file
whose job is to include a standard set of system headers, just so that
that nasty #ifdef doesn't have to sit at the top of almost all the
source files. But for the moment this at least gets the build working
again.
auxiliary/hat-test.c | 6 +++++-
auxiliary/hatgen.c | 6 +++++-
blackbox.c | 6 +++++-
bridges.c | 6 +++++-
cmake/setup.cmake | 4 ++++
cube.c | 6 +++++-
dominosa.c | 6 +++++-
drawing.c | 6 +++++-
fifteen.c | 6 +++++-
filling.c | 6 +++++-
flip.c | 6 +++++-
flood.c | 6 +++++-
galaxies.c | 6 +++++-
grid.c | 6 +++++-
gtk.c | 6 +++++-
guess.c | 6 +++++-
hat.c | 6 +++++-
inertia.c | 6 +++++-
keen.c | 6 +++++-
lightup.c | 6 +++++-
loopgen.c | 6 +++++-
loopy.c | 6 +++++-
magnets.c | 6 +++++-
map.c | 6 +++++-
mines.c | 6 +++++-
misc.c | 6 +++++-
mosaic.c | 6 +++++-
net.c | 6 +++++-
netslide.c | 6 +++++-
nullgame.c | 6 +++++-
pattern.c | 6 +++++-
pearl.c | 6 +++++-
pegs.c | 6 +++++-
penrose.c | 6 +++++-
range.c | 6 +++++-
rect.c | 6 +++++-
samegame.c | 6 +++++-
signpost.c | 6 +++++-
singles.c | 6 +++++-
sixteen.c | 6 +++++-
slant.c | 6 +++++-
solo.c | 6 +++++-
tents.c | 6 +++++-
towers.c | 6 +++++-
tracks.c | 6 +++++-
twiddle.c | 6 +++++-
undead.c | 6 +++++-
unequal.c | 6 +++++-
unfinished/group.c | 6 +++++-
unfinished/numgame.c | 6 +++++-
unfinished/separate.c | 6 +++++-
unfinished/slide.c | 6 +++++-
unfinished/sokoban.c | 6 +++++-
unruly.c | 6 +++++-
untangle.c | 6 +++++-
55 files changed, 274 insertions(+), 54 deletions(-)
More information about the tartarus-commits
mailing list