mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-26 00:57:22 +08:00
c1a61029fe
These fixes fall into a few different buckets. First c99 doesn't allow a parameter without a type. So in cases where the type had previously been an implicit int, make it an explicit int. Second, for return values, don't allow them to be implicit ints either, make them explicit. In a few cases change c89 function definitions to c99 function definitions. Lastly include <stdlib.h> in sbrk.c to get the prototype for abort () which we call when we detect a heap/stack collision.
19 lines
338 B
C
19 lines
338 B
C
#include <_ansi.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include "sys/syscall.h"
|
|
|
|
extern int errno;
|
|
|
|
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)
|
|
{
|
|
return TRAP0 (SYS_read, file, ptr, len);
|
|
}
|