Fix mcore libgloss port for c99/gcc-14

Jeff Law <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
[ So, there were more of these than I remembered :-) ]

Missing headers and prototypes, much like other ports.

Pushed to the trunk.

Jeff L.
P (text/plain, 1.3 KB)
commit 73ba2873383da9028360052563945f37830f833a
Author: Jeff Law <[email protected]>
Date:   Fri Dec 22 21:17:36 2023 -0700

    Fix mcore libgloss port for c99/gcc-14
    
    Missing headers and prototypes, much like other ports.

diff --git a/libgloss/mcore/kill.c b/libgloss/mcore/kill.c
index 833fe89d7..5cdd4d1fc 100644
--- a/libgloss/mcore/kill.c
+++ b/libgloss/mcore/kill.c
@@ -14,6 +14,8 @@
  */
 #include "glue.h"
 
+#include <unistd.h>
+
 /*
  * kill -- go out via exit...
  */
diff --git a/libgloss/mcore/putnum.c b/libgloss/mcore/putnum.c
index 10e298b95..f7e508b87 100644
--- a/libgloss/mcore/putnum.c
+++ b/libgloss/mcore/putnum.c
@@ -14,6 +14,8 @@
  */
 #include "glue.h"
 
+extern void print (char *ptr);
+
 /*
  * putnum -- print a 32 bit number in hex
  */
diff --git a/libgloss/mcore/raise.c b/libgloss/mcore/raise.c
index e39207792..6286d0eec 100644
--- a/libgloss/mcore/raise.c
+++ b/libgloss/mcore/raise.c
@@ -14,6 +14,9 @@
  */
 #include "glue.h"
 
+extern int _kill (int, int);
+extern int _getpid (void);
+
 int
 _raise (int sig)
 {
diff --git a/libgloss/mcore/sbrk.c b/libgloss/mcore/sbrk.c
index 844958984..1eb8047fc 100644
--- a/libgloss/mcore/sbrk.c
+++ b/libgloss/mcore/sbrk.c
@@ -16,6 +16,8 @@
 #include <sys/stat.h>
 #include "glue.h"
 
+extern int _write (int, char *, int);
+
 caddr_t
 _sbrk (size_t incr)
 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.