From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2119) id A07983875468; Thu, 21 Dec 2023 07:02:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A07983875468 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703142147; bh=BGbjyarcxUMqloIbwle7iHGDzrdu31OxeZK7+j3DpyE=; h=From:To:Subject:Date:From; b=E12GMMTSDq+IkEJBEHFd4yzUOeUiT5GuYDhj+ckRJfAwVDXLonau3vpyTmM7iWvPK fmwjWYaGx2+cbaCgiY8jJ4OAoef1K8rjOahhTiuJIDtYG41K190lXX5waW0/gLUu5y 7DYCyrPW0IxgZYrd/oS9W+mFRS73oTwKsLLgtObI= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jeff Law To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Re: libgloss c99 fixes for mn10300-elf X-Act-Checkin: newlib-cygwin X-Git-Author: Jeff Law X-Git-Refname: refs/heads/master X-Git-Oldrev: 5fa3b84da08f8dc03ee55c58cfc63e9b4450285a X-Git-Newrev: 7a45daad9184e30c336f27b3e54b9c5bcc2d3f77 Message-Id: <20231221070227.A07983875468@sourceware.org> Date: Thu, 21 Dec 2023 07:02:27 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D7a45daad918= 4e30c336f27b3e54b9c5bcc2d3f77 commit 7a45daad9184e30c336f27b3e54b9c5bcc2d3f77 Author: Jeff Law Date: Thu Dec 21 00:01:54 2023 -0700 Re: libgloss c99 fixes for mn10300-elf =20 Very similar to other patches in this space. Avoid implicit int types = and add missing #includes so that this code works with gcc-14. Diff: --- libgloss/mn10300/_exit.c | 2 +- libgloss/mn10300/getpid.c | 3 ++- libgloss/mn10300/isatty.c | 4 ++-- libgloss/mn10300/kill.c | 3 ++- libgloss/mn10300/read.c | 1 + libgloss/mn10300/sbrk.c | 3 +++ libgloss/mn10300/test.c | 2 ++ 7 files changed, 13 insertions(+), 5 deletions(-) diff --git a/libgloss/mn10300/_exit.c b/libgloss/mn10300/_exit.c index ec51d4088..2b548e82e 100644 --- a/libgloss/mn10300/_exit.c +++ b/libgloss/mn10300/_exit.c @@ -18,7 +18,7 @@ static void _do_dtors() } =20 =20 -void _exit (n) +void _exit (int n) { /* Destructors should be done earlier because they need to be done befor= e the files are closed, but here is better than nowhere (and this balances = the diff --git a/libgloss/mn10300/getpid.c b/libgloss/mn10300/getpid.c index 20ab1866e..fea57daff 100644 --- a/libgloss/mn10300/getpid.c +++ b/libgloss/mn10300/getpid.c @@ -4,7 +4,8 @@ #include "trap.h" =20 =20 -_getpid (n) +int +_getpid (int n) { return 1; } diff --git a/libgloss/mn10300/isatty.c b/libgloss/mn10300/isatty.c index 7e63a8c7c..3d8eb1910 100644 --- a/libgloss/mn10300/isatty.c +++ b/libgloss/mn10300/isatty.c @@ -4,8 +4,8 @@ #include "trap.h" =20 =20 -_isatty (fd) - int fd; +int +_isatty (int fd) { return 1; } diff --git a/libgloss/mn10300/kill.c b/libgloss/mn10300/kill.c index 40afa6a2c..d63a2f82c 100644 --- a/libgloss/mn10300/kill.c +++ b/libgloss/mn10300/kill.c @@ -4,7 +4,8 @@ #include "trap.h" =20 =20 -_kill (n, m) +int +_kill (int n, int m) { return TRAP0 (SYS_exit, 0xdead, 0, 0); } diff --git a/libgloss/mn10300/read.c b/libgloss/mn10300/read.c index 31d24cce9..2f1878c06 100644 --- a/libgloss/mn10300/read.c +++ b/libgloss/mn10300/read.c @@ -4,6 +4,7 @@ #include "trap.h" =20 =20 +int _read (int file, char *ptr, size_t len) diff --git a/libgloss/mn10300/sbrk.c b/libgloss/mn10300/sbrk.c index 376fd3285..78945e77a 100644 --- a/libgloss/mn10300/sbrk.c +++ b/libgloss/mn10300/sbrk.c @@ -1,8 +1,11 @@ #include <_ansi.h> #include #include +#include #include "trap.h" =20 +extern int _write (int, char *, size_t); + =20 caddr_t _sbrk (size_t incr) diff --git a/libgloss/mn10300/test.c b/libgloss/mn10300/test.c index 9ea873adf..a61dbb797 100644 --- a/libgloss/mn10300/test.c +++ b/libgloss/mn10300/test.c @@ -1,4 +1,6 @@ #include +#include +#include =20 static void send_msg1 (void)