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] Fix v850 libgloss for c99/gcc-14 Date: Sat, 23 Dec 2023 03:20:41 +0000 (GMT) [thread overview] Message-ID: <20231223032041.29F6A3858D3C@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7382f54405aa81ca4420a58bb805ab21ef1e0b6b commit 7382f54405aa81ca4420a58bb805ab21ef1e0b6b Author: Jeff Law <jeffreyalaw@gmail.com> Date: Fri Dec 22 20:19:58 2023 -0700 Fix v850 libgloss for c99/gcc-14 So the prior patch for sysnecv850 was in newlib. This time we're fixing v850 bits in libgloss. Like other patches submitted recently, this converts implicit ints to explicit ints, adds a missing prototype and header includes. Diff: --- libgloss/v850/_exit.c | 2 +- libgloss/v850/getpid.c | 3 ++- libgloss/v850/isatty.c | 4 ++-- libgloss/v850/kill.c | 1 + libgloss/v850/read.c | 1 + libgloss/v850/sbrk.c | 3 +++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libgloss/v850/_exit.c b/libgloss/v850/_exit.c index 44d4132bd..7e1b09262 100644 --- a/libgloss/v850/_exit.c +++ b/libgloss/v850/_exit.c @@ -23,7 +23,7 @@ static void _do_dtors() } -void _exit (n) +void _exit (int n) { /* Destructors should be done earlier because they need to be done before the files are closed, but here is better than nowhere (and this balances the diff --git a/libgloss/v850/getpid.c b/libgloss/v850/getpid.c index 32ac7fbfb..f0fc4d895 100644 --- a/libgloss/v850/getpid.c +++ b/libgloss/v850/getpid.c @@ -9,7 +9,8 @@ int __trap0 (int function, int p1, int p2, int p3); #define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3)) -_getpid (n) +int +_getpid (int n) { return 1; } diff --git a/libgloss/v850/isatty.c b/libgloss/v850/isatty.c index 248ab5248..6e4f205f0 100644 --- a/libgloss/v850/isatty.c +++ b/libgloss/v850/isatty.c @@ -9,8 +9,8 @@ int __trap0 (int function, int p1, int p2, int p3); #define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3)) -_isatty (fd) - int fd; +int +_isatty (int fd) { return 1; } diff --git a/libgloss/v850/kill.c b/libgloss/v850/kill.c index 34e5db793..704aa9acc 100644 --- a/libgloss/v850/kill.c +++ b/libgloss/v850/kill.c @@ -10,6 +10,7 @@ int __trap0 (int function, int p1, int p2, int p3); #define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3)) +int _kill (pid, sig) pid_t pid; int sig; diff --git a/libgloss/v850/read.c b/libgloss/v850/read.c index b55d1cb9e..5ae2c9799 100644 --- a/libgloss/v850/read.c +++ b/libgloss/v850/read.c @@ -9,6 +9,7 @@ int __trap0 (int function, int p1, int p2, int p3); #define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3)) +int _read (int file, char *ptr, int len) diff --git a/libgloss/v850/sbrk.c b/libgloss/v850/sbrk.c index 248a092b6..65114b0b7 100644 --- a/libgloss/v850/sbrk.c +++ b/libgloss/v850/sbrk.c @@ -2,6 +2,9 @@ #include <sys/types.h> #include <sys/stat.h> #include "sys/syscall.h" +#include <stdlib.h> + +extern int _write (int, char *, int); caddr_t _sbrk (int incr)
reply other threads:[~2023-12-23 3:20 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=20231223032041.29F6A3858D3C@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: linkBe 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).