aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auxiliary/hat-test.c6
-rw-r--r--auxiliary/hatgen.c6
-rw-r--r--blackbox.c6
-rw-r--r--bridges.c6
-rw-r--r--cmake/setup.cmake4
-rw-r--r--cube.c6
-rw-r--r--dominosa.c6
-rw-r--r--drawing.c6
-rw-r--r--fifteen.c6
-rw-r--r--filling.c6
-rw-r--r--flip.c6
-rw-r--r--flood.c6
-rw-r--r--galaxies.c6
-rw-r--r--grid.c6
-rw-r--r--gtk.c6
-rw-r--r--guess.c6
-rw-r--r--hat.c6
-rw-r--r--inertia.c6
-rw-r--r--keen.c6
-rw-r--r--lightup.c6
-rw-r--r--loopgen.c6
-rw-r--r--loopy.c6
-rw-r--r--magnets.c6
-rw-r--r--map.c6
-rw-r--r--mines.c6
-rw-r--r--misc.c6
-rw-r--r--mosaic.c6
-rw-r--r--net.c6
-rw-r--r--netslide.c6
-rw-r--r--nullgame.c6
-rw-r--r--pattern.c6
-rw-r--r--pearl.c6
-rw-r--r--pegs.c6
-rw-r--r--penrose.c6
-rw-r--r--range.c6
-rw-r--r--rect.c6
-rw-r--r--samegame.c6
-rw-r--r--signpost.c6
-rw-r--r--singles.c6
-rw-r--r--sixteen.c6
-rw-r--r--slant.c6
-rw-r--r--solo.c6
-rw-r--r--tents.c6
-rw-r--r--towers.c6
-rw-r--r--tracks.c6
-rw-r--r--twiddle.c6
-rw-r--r--undead.c6
-rw-r--r--unequal.c6
-rw-r--r--unfinished/group.c6
-rw-r--r--unfinished/numgame.c6
-rw-r--r--unfinished/separate.c6
-rw-r--r--unfinished/slide.c6
-rw-r--r--unfinished/sokoban.c6
-rw-r--r--unruly.c6
-rw-r--r--untangle.c6
55 files changed, 274 insertions, 54 deletions
diff --git a/auxiliary/hat-test.c b/auxiliary/hat-test.c
index 4f8dc65..254d82c 100644
--- a/auxiliary/hat-test.c
+++ b/auxiliary/hat-test.c
@@ -5,7 +5,11 @@
*/
#include <assert.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
diff --git a/auxiliary/hatgen.c b/auxiliary/hatgen.c
index 9574cb8..30242c9 100644
--- a/auxiliary/hatgen.c
+++ b/auxiliary/hatgen.c
@@ -16,7 +16,11 @@
*/
#include <assert.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/blackbox.c b/blackbox.c
index 69ec12c..7c84a16 100644
--- a/blackbox.c
+++ b/blackbox.c
@@ -7,7 +7,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/bridges.c b/bridges.c
index bd4b3ca..e96861e 100644
--- a/bridges.c
+++ b/bridges.c
@@ -73,7 +73,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/cmake/setup.cmake b/cmake/setup.cmake
index 0a710b6..3c91285 100644
--- a/cmake/setup.cmake
+++ b/cmake/setup.cmake
@@ -47,6 +47,10 @@ check_include_file(stdint.h HAVE_STDINT_H)
if(NOT HAVE_STDINT_H)
add_compile_definitions(NO_STDINT_H)
endif()
+check_include_file(tgmath.h HAVE_TGMATH_H)
+if(NOT HAVE_TGMATH_H)
+ add_compile_definitions(NO_TGMATH_H)
+endif()
# Try to normalise source file pathnames as seen in __FILE__ (e.g.
# assertion failure messages). Partly to avoid bloating the binaries
diff --git a/cube.c b/cube.c
index 1261730..46bd745 100644
--- a/cube.c
+++ b/cube.c
@@ -7,7 +7,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/dominosa.c b/dominosa.c
index 801c1f1..e529376 100644
--- a/dominosa.c
+++ b/dominosa.c
@@ -48,7 +48,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/drawing.c b/drawing.c
index 90f54f3..2c8816c 100644
--- a/drawing.c
+++ b/drawing.c
@@ -27,7 +27,11 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/fifteen.c b/fifteen.c
index 53b06aa..f453d59 100644
--- a/fifteen.c
+++ b/fifteen.c
@@ -8,7 +8,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/filling.c b/filling.c
index 87b9d9e..0c2d292 100644
--- a/filling.c
+++ b/filling.c
@@ -58,7 +58,11 @@
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/flip.c b/flip.c
index 1112443..267e5a2 100644
--- a/flip.c
+++ b/flip.c
@@ -9,7 +9,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/flood.c b/flood.c
index da2317a..c5fc10c 100644
--- a/flood.c
+++ b/flood.c
@@ -32,7 +32,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/galaxies.c b/galaxies.c
index e3cc76e..0b10b59 100644
--- a/galaxies.c
+++ b/galaxies.c
@@ -80,7 +80,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/grid.c b/grid.c
index d2a3e13..1bfc1ef 100644
--- a/grid.c
+++ b/grid.c
@@ -13,7 +13,11 @@
#include <ctype.h>
#include <float.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/gtk.c b/gtk.c
index ce792d3..7f44baf 100644
--- a/gtk.c
+++ b/gtk.c
@@ -13,7 +13,11 @@
#include <stdarg.h>
#include <string.h>
#include <errno.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include <unistd.h>
#include <sys/time.h>
diff --git a/guess.c b/guess.c
index 55a30e8..1dbea4c 100644
--- a/guess.c
+++ b/guess.c
@@ -7,7 +7,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/hat.c b/hat.c
index 99babcc..dbb8f41 100644
--- a/hat.c
+++ b/hat.c
@@ -12,7 +12,11 @@
*/
#include <assert.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/inertia.c b/inertia.c
index 92747ed..42c2f5b 100644
--- a/inertia.c
+++ b/inertia.c
@@ -12,7 +12,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/keen.c b/keen.c
index 5624865..baf8a43 100644
--- a/keen.c
+++ b/keen.c
@@ -8,7 +8,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "latin.h"
diff --git a/lightup.c b/lightup.c
index 816dd70..35705a6 100644
--- a/lightup.c
+++ b/lightup.c
@@ -48,7 +48,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/loopgen.c b/loopgen.c
index d8f5e27..53d2c4b 100644
--- a/loopgen.c
+++ b/loopgen.c
@@ -8,7 +8,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/loopy.c b/loopy.c
index b7d91de..bd37a5a 100644
--- a/loopy.c
+++ b/loopy.c
@@ -77,7 +77,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/magnets.c b/magnets.c
index 90157bb..82d6ccd 100644
--- a/magnets.c
+++ b/magnets.c
@@ -37,7 +37,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/map.c b/map.c
index 76b0518..a9b2347 100644
--- a/map.c
+++ b/map.c
@@ -15,7 +15,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/mines.c b/mines.c
index 09e3422..e9437cb 100644
--- a/mines.c
+++ b/mines.c
@@ -13,7 +13,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "tree234.h"
#include "puzzles.h"
diff --git a/misc.c b/misc.c
index 2cefd36..d9695c8 100644
--- a/misc.c
+++ b/misc.c
@@ -3,7 +3,11 @@
*/
#include <assert.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
diff --git a/mosaic.c b/mosaic.c
index 5fb223e..752caab 100644
--- a/mosaic.c
+++ b/mosaic.c
@@ -14,7 +14,11 @@
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/net.c b/net.c
index e3357ac..6f7d149 100644
--- a/net.c
+++ b/net.c
@@ -8,7 +8,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/netslide.c b/netslide.c
index a0b00b4..eab44a9 100644
--- a/netslide.c
+++ b/netslide.c
@@ -9,7 +9,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/nullgame.c b/nullgame.c
index c5ad0c9..9c5f868 100644
--- a/nullgame.c
+++ b/nullgame.c
@@ -16,7 +16,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/pattern.c b/pattern.c
index d8f050b..fa6213e 100644
--- a/pattern.c
+++ b/pattern.c
@@ -8,7 +8,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/pearl.c b/pearl.c
index 74ab471..a54ae15 100644
--- a/pearl.c
+++ b/pearl.c
@@ -36,7 +36,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "grid.h"
diff --git a/pegs.c b/pegs.c
index 0639eb3..06a312d 100644
--- a/pegs.c
+++ b/pegs.c
@@ -8,7 +8,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/penrose.c b/penrose.c
index 6ae9756..4d2a740 100644
--- a/penrose.c
+++ b/penrose.c
@@ -9,7 +9,11 @@
#include <assert.h>
#include <string.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include <stdio.h>
#include "puzzles.h" /* for malloc routines, and PI */
diff --git a/range.c b/range.c
index 45ab10b..3e7b00c 100644
--- a/range.c
+++ b/range.c
@@ -58,7 +58,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/rect.c b/rect.c
index 40bc846..bc7e179 100644
--- a/rect.c
+++ b/rect.c
@@ -26,7 +26,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/samegame.c b/samegame.c
index 54e73d5..caa8141 100644
--- a/samegame.c
+++ b/samegame.c
@@ -68,7 +68,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/signpost.c b/signpost.c
index aeb32ea..910de48 100644
--- a/signpost.c
+++ b/signpost.c
@@ -8,7 +8,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/singles.c b/singles.c
index 3fc9d5a..485529a 100644
--- a/singles.c
+++ b/singles.c
@@ -58,7 +58,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "latin.h"
diff --git a/sixteen.c b/sixteen.c
index 7dbb9c3..c540438 100644
--- a/sixteen.c
+++ b/sixteen.c
@@ -10,7 +10,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/slant.c b/slant.c
index a174011..65f5329 100644
--- a/slant.c
+++ b/slant.c
@@ -28,7 +28,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/solo.c b/solo.c
index ed1787b..208c705 100644
--- a/solo.c
+++ b/solo.c
@@ -87,7 +87,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#ifdef STANDALONE_SOLVER
#include <stdarg.h>
diff --git a/tents.c b/tents.c
index 47a0d11..86b5245 100644
--- a/tents.c
+++ b/tents.c
@@ -33,7 +33,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "matching.h"
diff --git a/towers.c b/towers.c
index b3b1478..04abed0 100644
--- a/towers.c
+++ b/towers.c
@@ -23,7 +23,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "latin.h"
diff --git a/tracks.c b/tracks.c
index 151f7fb..ea48510 100644
--- a/tracks.c
+++ b/tracks.c
@@ -21,7 +21,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/twiddle.c b/twiddle.c
index 2c15617..c3b4764 100644
--- a/twiddle.c
+++ b/twiddle.c
@@ -11,7 +11,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/undead.c b/undead.c
index 4ef8fe4..a1bd9fd 100644
--- a/undead.c
+++ b/undead.c
@@ -35,7 +35,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/unequal.c b/unequal.c
index f50197b..12cdd7c 100644
--- a/unequal.c
+++ b/unequal.c
@@ -21,7 +21,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "latin.h" /* contains typedef for digit */
diff --git a/unfinished/group.c b/unfinished/group.c
index 345deb5..bbac220 100644
--- a/unfinished/group.c
+++ b/unfinished/group.c
@@ -31,7 +31,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "latin.h"
diff --git a/unfinished/numgame.c b/unfinished/numgame.c
index 5de69a2..cf91992 100644
--- a/unfinished/numgame.c
+++ b/unfinished/numgame.c
@@ -40,7 +40,11 @@
#include <string.h>
#include <limits.h>
#include <assert.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/unfinished/separate.c b/unfinished/separate.c
index fdeeb3d..d3423de 100644
--- a/unfinished/separate.c
+++ b/unfinished/separate.c
@@ -94,7 +94,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/unfinished/slide.c b/unfinished/slide.c
index a4cf168..115230f 100644
--- a/unfinished/slide.c
+++ b/unfinished/slide.c
@@ -32,7 +32,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"
diff --git a/unfinished/sokoban.c b/unfinished/sokoban.c
index a493bf4..bef7d72 100644
--- a/unfinished/sokoban.c
+++ b/unfinished/sokoban.c
@@ -58,7 +58,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/unruly.c b/unruly.c
index c791baf..4b48f16 100644
--- a/unruly.c
+++ b/unruly.c
@@ -47,7 +47,11 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
diff --git a/untangle.c b/untangle.c
index 558cce7..62d5897 100644
--- a/untangle.c
+++ b/untangle.c
@@ -32,7 +32,11 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
-#include <tgmath.h>
+#ifdef NO_TGMATH_H
+# include <math.h>
+#else
+# include <tgmath.h>
+#endif
#include "puzzles.h"
#include "tree234.h"