public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: newlib@sourceware.org
Subject: Fix rl78 libgloss port for c99/gcc-14
Date: Fri, 22 Dec 2023 21:03:11 -0700	[thread overview]
Message-ID: <ee225506-a8d4-463a-9618-ae2f5ba6a5af@gmail.com> (raw)

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

Needed a prototype for SYS_write and the prototype for write was 
incorrect (returns an int, not a char *).

Pushed to the trunk.

Jeff L.

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

commit a1a21442bc938681913584d0941dd1c8b3c98fef
Author: Jeff Law <jeffreyalaw@gmail.com>
Date:   Fri Dec 22 21:00:35 2023 -0700

    Fix rl78 libgloss port for c99/gcc-14
    
    Needed a prototype for SYS_write and the prototype for write was incorrect
    (returns an int, not a char *).

diff --git a/libgloss/rl78/write.c b/libgloss/rl78/write.c
index 849470c94..4bc74ae3e 100644
--- a/libgloss/rl78/write.c
+++ b/libgloss/rl78/write.c
@@ -57,6 +57,7 @@ typedef unsigned int UHI __attribute__((mode(HI)));
 
 static int initted = 0;
 
+int _SYS_write (int, char *, int);
 static void
 init_uart0 ()
 {
@@ -108,4 +109,4 @@ _write(int fd, char *ptr, int len)
   return rv;
 }
 
-char * write (int) __attribute__((weak, alias ("_write")));
+int write (int, char *, int) __attribute__((weak, alias ("_write")));

                 reply	other threads:[~2023-12-23  4:03 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=ee225506-a8d4-463a-9618-ae2f5ba6a5af@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).