65816-llvm-mos/runtime/include/stdlib.h
Scott Duensing d6c9fc8252 Checkpoint.
2026-04-30 20:48:41 -05:00

34 lines
899 B
C

#ifndef _STDLIB_H
#define _STDLIB_H
typedef unsigned int size_t;
void *malloc(size_t n);
void *calloc(size_t nmemb, size_t size);
void *realloc(void *ptr, size_t n);
void free(void *p);
int abs(int n);
long labs(long n);
int atoi(const char *s);
long atol(const char *s);
long long llabs(long long n);
long strtol (const char *nptr, char **endptr, int base);
unsigned long strtoul(const char *nptr, char **endptr, int base);
typedef int (*__cmp_fn)(const void *, const void *);
void qsort (void *base, size_t nmemb, size_t size, __cmp_fn cmp);
void *bsearch(const void *key, const void *base, size_t nmemb,
size_t size, __cmp_fn cmp);
void exit(int code) __attribute__((noreturn));
void abort(void) __attribute__((noreturn));
typedef void (*__atexit_fn)(void);
int atexit(__atexit_fn fn);
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#endif