From df0623a4357c45fb61f03c9c3afd23cdf3c3caa3 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Mon, 14 Jul 2025 14:18:49 +0100 Subject: [PATCH] include where necessary in files using API calls When global was removed from tile.h it also removed nearby. This exposes the lack of being included where needed using APIs like close()/read()/unlink()/isatty() the WASM build seems to show this as the header file set is structured differently. --- commands/CmdCD.c | 1 + lef/defWrite.c | 1 + plot/plotRutils.c | 1 + plot/plotVers.c | 1 + plow/PlowRandom.c | 1 + textio/txMain.c | 1 + utils/path.c | 1 + 7 files changed, 7 insertions(+) diff --git a/commands/CmdCD.c b/commands/CmdCD.c index ec88a23d..7ba4458d 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -24,6 +24,7 @@ static const char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magi #include #include #include +#include #include "tcltk/tclmagic.h" #include "utils/magic.h" diff --git a/lef/defWrite.c b/lef/defWrite.c index 3d77c4f2..7576dc20 100644 --- a/lef/defWrite.c +++ b/lef/defWrite.c @@ -18,6 +18,7 @@ static const char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magi #include #include #include +#include #include "tcltk/tclmagic.h" #include "utils/magic.h" diff --git a/plot/plotRutils.c b/plot/plotRutils.c index 8b4b22ee..9e252b72 100644 --- a/plot/plotRutils.c +++ b/plot/plotRutils.c @@ -27,6 +27,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include #include #include +#include #include "utils/magic.h" #include "utils/geometry.h" diff --git a/plot/plotVers.c b/plot/plotVers.c index 447c1611..ea4ed2a2 100644 --- a/plot/plotVers.c +++ b/plot/plotVers.c @@ -23,6 +23,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include #include +#include /* C99 compat */ #include diff --git a/plow/PlowRandom.c b/plow/PlowRandom.c index 56615658..e62c13b6 100644 --- a/plow/PlowRandom.c +++ b/plow/PlowRandom.c @@ -30,6 +30,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include #include #include +#include #if defined(SYSV) || defined(EMSCRIPTEN) #include #endif diff --git a/textio/txMain.c b/textio/txMain.c index c39bf9ad..17e2b185 100644 --- a/textio/txMain.c +++ b/textio/txMain.c @@ -24,6 +24,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include #include #include +#include #include "utils/magsgtty.h" #include "utils/magic.h" diff --git a/utils/path.c b/utils/path.c index accd41d6..3f1bfd62 100644 --- a/utils/path.c +++ b/utils/path.c @@ -29,6 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include #include #include +#include #ifdef HAVE_ZLIB #include