rockbox/firmware/libc/include/stdlib.h
Thomas Martitz 3d0cee8abb - Move uisimulator/sdl/*.[ch] into the target tree, under firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c.
- Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization).

This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 21:02:47 +00:00

59 lines
1 KiB
C

/*
* stdlib.h
*
* Definitions for common types, variables, and functions.
*/
#ifndef _STDLIB_H_
#ifdef __cplusplus
extern "C" {
#endif
#define _STDLIB_H_
#include "_ansi.h"
#define __need_size_t
#define __need_wchar_t
#include <stddef.h>
#ifndef NULL
#define NULL ((void*)0)
#endif
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
_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);
int atexit(void (*)(void));
#define RAND_MAX INT_MAX
void srand(unsigned int seed);
int rand(void);
#ifndef ABS
#if defined(__GNUC__)
#define ABS(a) ({typeof (a) ___a = (a); ___a < 0 ? -___a: ___a; })
#else
#define ABS(a) (((a) < 0) ? -(a) : (a))
#endif /* __GNUC__ */
#endif
#define abs(x) ((int)ABS(x))
#define labs(x) ((long)abs(x))
#ifdef SIMULATOR
void exit(int status);
#endif
int atoi (const char *str);
#ifdef __cplusplus
}
#endif
#endif /* _STDLIB_H_ */