public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: newlib@sourceware.org
Subject: Fix moxie libgloss issues with c99
Date: Thu, 14 Dec 2023 12:26:14 -0700	[thread overview]
Message-ID: <0d476ceb-d413-4f68-953a-3b9a4634fff8@gmail.com> (raw)

[-- 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

             reply	other threads:[~2023-12-14 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 19:26 Jeff Law [this message]
2023-12-15  2:53 ` Jeff Johnston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d476ceb-d413-4f68-953a-3b9a4634fff8@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).