public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Law <law@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Re: Fix moxie libgloss issues with c99
Date: Sun, 17 Dec 2023 04:11:47 +0000 (GMT)	[thread overview]
Message-ID: <20231217041147.E0B1E3858D28@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=57e311e0deb23492edc94518c78cc57a224dbad9

commit 57e311e0deb23492edc94518c78cc57a224dbad9
Author: Jeff Law <jeffreyalaw@gmail.com>
Date:   Sat Dec 16 21:11:10 2023 -0700

    Re: Fix moxie libgloss issues with c99
    
    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.

Diff:
---
 libgloss/moxie/putnum.c     | 2 ++
 libgloss/moxie/sim-inbyte.c | 4 ++++
 2 files changed, 6 insertions(+)

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..4cda6604a 100644
--- a/libgloss/moxie/sim-inbyte.c
+++ b/libgloss/moxie/sim-inbyte.c
@@ -14,6 +14,10 @@
  * they apply.
  */
 
+#include <stdlib.h>
+
+#include <unistd.h>
+
 int
 inbyte ()
 {

                 reply	other threads:[~2023-12-17  4:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20231217041147.E0B1E3858D28@sourceware.org \
    --to=law@sourceware.org \
    --cc=newlib-cvs@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).