public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Fix v850 libgloss for c99/gcc-14
@ 2023-12-21 20:07 Jeff Law
  2023-12-21 22:46 ` Jeff Johnston
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2023-12-21 20:07 UTC (permalink / raw)
  To: newlib

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

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.

OK for the trunk?

Jeff

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

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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fix v850 libgloss for c99/gcc-14
  2023-12-21 20:07 Fix v850 libgloss for c99/gcc-14 Jeff Law
@ 2023-12-21 22:46 ` Jeff Johnston
  2023-12-21 22:56   ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Johnston @ 2023-12-21 22:46 UTC (permalink / raw)
  To: Jeff Law; +Cc: newlib

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

Hi Jeff, please feel free to check in such similar patches in other
libgloss platforms.  Are there any more?
I ask because it makes sense to hold off the snapshot until you are done.

-- Jeff J.

On Thu, Dec 21, 2023 at 3:09 PM Jeff Law <jeffreyalaw@gmail.com> wrote:

> 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.
>
> OK for the trunk?
>
> Jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fix v850 libgloss for c99/gcc-14
  2023-12-21 22:46 ` Jeff Johnston
@ 2023-12-21 22:56   ` Jeff Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Law @ 2023-12-21 22:56 UTC (permalink / raw)
  To: Jeff Johnston; +Cc: newlib



On 12/21/23 15:46, Jeff Johnston wrote:
> Hi Jeff, please feel free to check in such similar patches in other 
> libgloss platforms.  Are there any more?
We're about done with the trivial ones.  And some of the stuff needs 
cleanup in my local tree before submitting to be consistent (ex, don't 
explicitly prototype something when we can just #include the right header).

Point being, I think things will be broken a bit longer with gcc-14, but 
that's still months from release, so I don't think that's a major problem.

> I ask because it makes sense to hold off the snapshot until you are done.
I'd lean towards making your snapshot whenever is convenient for you and 
the project rather than waiting for everything to be working with gcc-14.

Jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-21 22:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21 20:07 Fix v850 libgloss for c99/gcc-14 Jeff Law
2023-12-21 22:46 ` Jeff Johnston
2023-12-21 22:56   ` Jeff Law

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).