From f7b10a3747438e373d9dd91fd39fe9b5cb0fc125 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 17 Jun 2002 13:19:18 +0000 Subject: added protos and fixed to make them work as proper newlib replacement headers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1034 a1c6a512-1295-4272-9138-f99709370657 --- firmware/include/stdio.h | 10 ++++------ firmware/include/stdlib.h | 7 +++++++ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'firmware') diff --git a/firmware/include/stdio.h b/firmware/include/stdio.h index e8d35bc502..b98f01c729 100644 --- a/firmware/include/stdio.h +++ b/firmware/include/stdio.h @@ -1,6 +1,8 @@ #ifndef _STDIO_H_ #define _STDIO_H_ +#include <_ansi.h> + #define __need_size_t #include @@ -31,11 +33,7 @@ #define __VALIST char* #endif -int _EXFUN(fprintf, (FILE *, const char *, ...)); -int _EXFUN(fscanf, (FILE *, const char *, ...)); -int _EXFUN(printf, (const char *, ...)); -int _EXFUN(vfprintf, (FILE *, const char *, __VALIST)); -int _EXFUN(vprintf, (const char *, __VALIST)); -int _EXFUN(vsprintf, (char *, const char *, __VALIST)); +int snprintf (char *buf, size_t size, const char *fmt, ...); +int vsnprintf (char *buf, int size, const char *fmt, __VALIST ap); #endif /* _STDIO_H_ */ diff --git a/firmware/include/stdlib.h b/firmware/include/stdlib.h index ab07a3116e..2809172a7d 100644 --- a/firmware/include/stdlib.h +++ b/firmware/include/stdlib.h @@ -29,6 +29,13 @@ extern __IMPORT int __mb_cur_max; _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR))); +void *malloc(size_t); +void *calloc (size_t nmemb, size_t size); +void free(void *); +void *realloc(void *, size_t); + +#define abs(x) ((x)>0?x:-x) + #ifdef __cplusplus } #endif -- cgit v1.2.3