public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Fix moxie libgloss issues with c99
@ 2023-12-14 19:26 Jeff Law
  2023-12-15  2:53 ` Jeff Johnston
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Law @ 2023-12-14 19:26 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]


Two libgloss issues specific to moxie-elf that show up build with GCC trunk.

First, putnum.c uses "print" without a prototype.  So I added one based 
on the function's definition in print.c.  Second sim-inbyte.c uses read, 
which comes from unistd.h, so this adds a suitable #include.

OK for the trunk?

Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 592 bytes --]

diff --git a/libgloss/moxie/putnum.c b/libgloss/moxie/putnum.c
index 0f7e89453..9af5b4d4c 100644
--- a/libgloss/moxie/putnum.c
+++ b/libgloss/moxie/putnum.c
@@ -14,6 +14,8 @@
  */
 #include "glue.h"
 
+void print (char *);
+
 /*
  * putnum -- print a 32 bit number in hex
  */
diff --git a/libgloss/moxie/sim-inbyte.c b/libgloss/moxie/sim-inbyte.c
index 1e7466a8d..57d058741 100644
--- a/libgloss/moxie/sim-inbyte.c
+++ b/libgloss/moxie/sim-inbyte.c
@@ -14,6 +14,8 @@
  * they apply.
  */
 
+#include <unistd.h>
+
 int
 inbyte ()
 {
diff --git a/libgloss/frv/putnum.c b/libgloss/frv/putnum.c

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix moxie libgloss issues with c99
  2023-12-14 19:26 Fix moxie libgloss issues with c99 Jeff Law
@ 2023-12-15  2:53 ` Jeff Johnston
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Johnston @ 2023-12-15  2:53 UTC (permalink / raw)
  To: Jeff Law; +Cc: newlib

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

Please go ahead.

-- Jeff J.

On Thu, Dec 14, 2023 at 2:26 PM Jeff Law <jeffreyalaw@gmail.com> wrote:

>
> Two libgloss issues specific to moxie-elf that show up build with GCC
> trunk.
>
> First, putnum.c uses "print" without a prototype.  So I added one based
> on the function's definition in print.c.  Second sim-inbyte.c uses read,
> which comes from unistd.h, so this adds a suitable #include.
>
> OK for the trunk?
>
> Jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-15  2:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 19:26 Fix moxie libgloss issues with c99 Jeff Law
2023-12-15  2:53 ` Jeff Johnston

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).