* [PATCH] ada: Fix Ada bootstrap on Solaris
@ 2023-12-04 10:33 Rainer Orth
2023-12-04 10:35 ` Arnaud Charlet
0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2023-12-04 10:33 UTC (permalink / raw)
To: gcc-patches; +Cc: Arnaud Charlet, Marc Poulhiès
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
The recent warning patches broke Ada bootstrap on Solaris:
adaint.c: In function '__gnat_kill':
adaint.c:3597:3: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration]
3597 | kill (pid, sig);
| ^~~~
expect.c: In function '__gnat_expect_poll':
expect.c:409:5: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
409 | FD_ZERO (&rset);
| ^~~~~~~
expect.c:55:1: note: include '<string.h>' or provide a declaration of 'memset'
54 | #include <sys/wait.h>
+++ |+#include <string.h>
55 | #endif
I'm now including the necessary headers: <signal.h> for kill and
<string.h> for memset. However, I found the GNAT C sources to be an
incredible and hard to untangle maze: instead of using autoconf, they
are generously sprinkled with deeply nested platform macros, so I may
well have included the headers in an inappropriate place.
Bootstrapped without regressions on i386-pc-solaris2.11,
sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and
x86_64-apple-darwin23.1.0.
Ok for trunk?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2023-12-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/ada:
* adaint.c: Include <signal.h>.
* expect.c: Include <string.h>.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-ada-bootstrap.patch --]
[-- Type: text/x-patch, Size: 593 bytes --]
# HG changeset patch
# Parent 5cf4f08be31b5169b377de570ac0ab0f159161af
ada: Fix Ada bootstrap on Solaris
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -243,6 +243,7 @@ UINT __gnat_current_ccs_encoding;
#define DIR_SEPARATOR '\\'
#else
+#include <signal.h>
#include <utime.h>
#endif
diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c
--- a/gcc/ada/expect.c
+++ b/gcc/ada/expect.c
@@ -41,6 +41,7 @@
#include "adaint.h"
#include <sys/types.h>
+#include <string.h>
#if defined (__vxworks) && defined (__RTP__)
# include <wait.h>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ada: Fix Ada bootstrap on Solaris
2023-12-04 10:33 [PATCH] ada: Fix Ada bootstrap on Solaris Rainer Orth
@ 2023-12-04 10:35 ` Arnaud Charlet
0 siblings, 0 replies; 2+ messages in thread
From: Arnaud Charlet @ 2023-12-04 10:35 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, Arnaud Charlet, Marc Poulhi??s
> The recent warning patches broke Ada bootstrap on Solaris:
>
> adaint.c: In function '__gnat_kill':
> adaint.c:3597:3: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration]
> 3597 | kill (pid, sig);
> | ^~~~
>
> expect.c: In function '__gnat_expect_poll':
> expect.c:409:5: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
> 409 | FD_ZERO (&rset);
> | ^~~~~~~
> expect.c:55:1: note: include '<string.h>' or provide a declaration of 'memset'
> 54 | #include <sys/wait.h>
> +++ |+#include <string.h>
> 55 | #endif
>
> I'm now including the necessary headers: <signal.h> for kill and
> <string.h> for memset. However, I found the GNAT C sources to be an
> incredible and hard to untangle maze: instead of using autoconf, they
> are generously sprinkled with deeply nested platform macros, so I may
> well have included the headers in an inappropriate place.
>
> Bootstrapped without regressions on i386-pc-solaris2.11,
> sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and
> x86_64-apple-darwin23.1.0.
>
> Ok for trunk?
OK, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-04 10:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 10:33 [PATCH] ada: Fix Ada bootstrap on Solaris Rainer Orth
2023-12-04 10:35 ` Arnaud Charlet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).