replaced stdlib.h in 'headers/private/kernel' with a better one in the more standard location 'headers/posix'
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1649 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
#ifndef _STDLIB_H_
|
||||
#define _STDLIB_H_
|
||||
|
||||
#include <div_t.h>
|
||||
#include <size_t.h>
|
||||
#include <null.h>
|
||||
#include <wchar_t.h>
|
||||
#include <stddef.h>
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
#define RAND_MAX 0x7fffffff
|
||||
#define MB_CUR_MAX 1
|
||||
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
double atof(const char *str);
|
||||
int atoi(const char *str);
|
||||
long atol(const char *str);
|
||||
|
||||
unsigned int atoui(const char *num);
|
||||
unsigned long atoul(const char *num);
|
||||
|
||||
double strtod (const char *str, char **end);
|
||||
long strtol (const char *str, char **end, int base);
|
||||
unsigned long strtoul (const char *str, char **end, int base);
|
||||
long long strtoll (const char *str, char **end, int base);
|
||||
unsigned long long strtoull(const char *str, char **end, int base);
|
||||
|
||||
void srand(unsigned int seed);
|
||||
int rand(void);
|
||||
int rand_r(unsigned int *seed);
|
||||
void srandom(unsigned int seed);
|
||||
int random(void);
|
||||
char *initstate(unsigned int seed, char *state, int n);
|
||||
char *setstate(char *state);
|
||||
|
||||
void *calloc(size_t nmemb, size_t size);
|
||||
void free(void *ptr);
|
||||
void *malloc(size_t size);
|
||||
void *realloc(void * ptr, size_t size);
|
||||
|
||||
void abort(void);
|
||||
int atexit(void (*func)(void));
|
||||
int atfork(void (*func)(void));
|
||||
void exit(int);
|
||||
|
||||
extern char **environ;
|
||||
char *getenv(const char *name);
|
||||
int putenv(const char *string);
|
||||
int setenv(char const *, char const *, int);
|
||||
|
||||
char *realpath(const char *path, char *resolved);
|
||||
|
||||
int system(const char *command);
|
||||
|
||||
char *mktemp(char *name);
|
||||
|
||||
|
||||
typedef int (*_compare_function)(const void*, const void*);
|
||||
|
||||
void *bsearch(const void*, const void*, size_t, size_t, _compare_function);
|
||||
int heapsort(void *, size_t , size_t , _compare_function);
|
||||
int mergesort(void *, size_t, size_t, _compare_function);
|
||||
void qsort(void *, size_t, size_t, _compare_function);
|
||||
int radixsort(u_char const **, int, u_char const *, u_int);
|
||||
int sradixsort(u_char const **, int, u_char const *, u_int);
|
||||
|
||||
int abs(int n);
|
||||
long labs(long n);
|
||||
|
||||
div_t div(int numerator, int denominator);
|
||||
ldiv_t ldiv(long numerator, long denominator);
|
||||
|
||||
int mblen(const char *s, size_t n);
|
||||
int mbtowc(wchar_t *pwc, const char *s, size_t n);
|
||||
int wctomb(char *s, wchar_t wchar);
|
||||
size_t mbstowcs(wchar_t *pwcs, const char *s, size_t n);
|
||||
size_t wcstombs(char *s, const wchar_t *pwcs, size_t n);
|
||||
|
||||
int64 strtoq(const char *, char **, int);
|
||||
uint64 strtouq(const char *, char **, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _STDLIB_H_ */
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
** Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
||||
** Copyright 2002, Manuel J. Petit. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#ifndef __newos__nulibc_stdlib__hh__
|
||||
#define __newos__nulibc_stdlib__hh__
|
||||
|
||||
|
||||
#include <ktypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int atoi(char const *);
|
||||
unsigned int atoui(const char *num);
|
||||
long atol(const char *num);
|
||||
unsigned long atoul(const char *num);
|
||||
|
||||
void * malloc(size_t);
|
||||
void free(void *);
|
||||
void * realloc(void *, size_t);
|
||||
void * reallocf(void *, size_t);
|
||||
void * calloc(size_t, size_t);
|
||||
void * memalign(size_t, size_t);
|
||||
void * valloc(size_t);
|
||||
|
||||
char *getenv(char const *);
|
||||
int setenv(char const *, char const *, int);
|
||||
int putenv(char const *);
|
||||
void unsetenv(char const *);
|
||||
|
||||
char *realpath(const char *path, char *resolved);
|
||||
|
||||
void *bsearch(void const *, void const *, size_t, size_t, int (*) (void const *, void const *));
|
||||
int heapsort(void *, size_t , size_t , int (*)(void const *, void const *));
|
||||
int mergesort(void *, size_t, size_t, int (*)(void const *, void const *));
|
||||
void qsort(void *, size_t, size_t, int (*)(void const *, void const *));
|
||||
int radixsort(u_char const **, int, u_char const *, u_int);
|
||||
int sradixsort(u_char const **, int, u_char const *, u_int);
|
||||
|
||||
int mblen(const char *, size_t);
|
||||
int mbtowc(int *, const char *, size_t);
|
||||
int wctomb(char *, int);
|
||||
size_t mbstowcs(int *, const char*, size_t);
|
||||
size_t wcstombs(char *, const int*, size_t);
|
||||
|
||||
int64 strtoq(const char *, char **, int);
|
||||
uint64 strtouq(const char *, char **, int);
|
||||
|
||||
#define RAND_MAX 0x7fffffff
|
||||
int rand(void);
|
||||
int rand_r(unsigned int *ctx);
|
||||
void srand(unsigned);
|
||||
long random(void);
|
||||
void srandom(unsigned long);
|
||||
|
||||
void exit(int);
|
||||
void _exit(int);
|
||||
|
||||
#define MB_CUR_MAX 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
void * operator new (size_t);
|
||||
void * operator new[] (size_t);
|
||||
void operator delete (void *);
|
||||
void operator delete[] (void *);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user