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
This commit is contained in:
Daniel Stenberg 2002-06-17 13:19:18 +00:00
parent d2e0214738
commit f7b10a3747
2 changed files with 11 additions and 6 deletions

View file

@ -1,6 +1,8 @@
#ifndef _STDIO_H_ #ifndef _STDIO_H_
#define _STDIO_H_ #define _STDIO_H_
#include <_ansi.h>
#define __need_size_t #define __need_size_t
#include <stddef.h> #include <stddef.h>
@ -31,11 +33,7 @@
#define __VALIST char* #define __VALIST char*
#endif #endif
int _EXFUN(fprintf, (FILE *, const char *, ...)); int snprintf (char *buf, size_t size, const char *fmt, ...);
int _EXFUN(fscanf, (FILE *, const char *, ...)); int vsnprintf (char *buf, int size, const char *fmt, __VALIST ap);
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));
#endif /* _STDIO_H_ */ #endif /* _STDIO_H_ */

View file

@ -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 _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 #ifdef __cplusplus
} }
#endif #endif