Re: libgloss c99 fixes for mn10300-elf

Very similar to other patches in this space.  Avoid implicit int types and add
missing #includes so that this code works with gcc-14.
This commit is contained in:
Jeff Law 2023-12-21 00:01:54 -07:00
parent 5fa3b84da0
commit 7a45daad91
7 changed files with 13 additions and 5 deletions

View File

@ -18,7 +18,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

View File

@ -4,7 +4,8 @@
#include "trap.h"
_getpid (n)
int
_getpid (int n)
{
return 1;
}

View File

@ -4,8 +4,8 @@
#include "trap.h"
_isatty (fd)
int fd;
int
_isatty (int fd)
{
return 1;
}

View File

@ -4,7 +4,8 @@
#include "trap.h"
_kill (n, m)
int
_kill (int n, int m)
{
return TRAP0 (SYS_exit, 0xdead, 0, 0);
}

View File

@ -4,6 +4,7 @@
#include "trap.h"
int
_read (int file,
char *ptr,
size_t len)

View File

@ -1,8 +1,11 @@
#include <_ansi.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include "trap.h"
extern int _write (int, char *, size_t);
caddr_t
_sbrk (size_t incr)

View File

@ -1,4 +1,6 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
static void
send_msg1 (void)