diff options
Diffstat (limited to 'newlib/libc/include/stdlib.h')
-rw-r--r-- | newlib/libc/include/stdlib.h | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 9bee3b187..9354b1ea2 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -19,10 +19,6 @@ #include <alloca.h> #endif -#ifdef __CYGWIN__ -#include <cygwin/stdlib.h> -#endif - _BEGIN_STD_C typedef struct @@ -80,6 +76,9 @@ _VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn))); _VOID _EXFUN(free,(_PTR)); char * _EXFUN(getenv,(const char *__string)); char * _EXFUN(_getenv_r,(struct _reent *, const char *__string)); +#ifdef __CYGWIN__ +const char *_EXFUN(getprogname,(void)); +#endif char * _EXFUN(_findenv,(_CONST char *, int *)); char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *)); long _EXFUN(labs,(long)); @@ -104,6 +103,9 @@ char * _EXFUN(mktemp,(char *)); _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR))); int _EXFUN(rand,(_VOID)); _PTR _EXFUN(realloc,(_PTR __r, size_t __size)); +#ifdef __CYGWIN__ +void _EXFUN(setprogname,(const char *)); +#endif _VOID _EXFUN(srand,(unsigned __seed)); double _EXFUN(strtod,(const char *__n, char **__end_PTR)); double _EXFUN(_strtod_r,(struct _reent *,const char *__n, char **__end_PTR)); @@ -127,8 +129,8 @@ char * _EXFUN(l64a,(long __input)); char * _EXFUN(_l64a_r,(struct _reent *,long __input)); int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg)); _VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((noreturn))); -int _EXFUN(putenv,(char *__string)); -int _EXFUN(_putenv_r,(struct _reent *, char *__string)); +int _EXFUN(putenv,(const char *__string)); +int _EXFUN(_putenv_r,(struct _reent *, const char *__string)); int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite)); int _EXFUN(_setenv_r,(struct _reent *, const char *__string, const char *__value, int __overwrite)); @@ -174,8 +176,15 @@ unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__n, char ** #ifndef __CYGWIN__ _VOID _EXFUN(cfree,(_PTR)); +#else +char * _EXFUN(realpath,(const char *, char *)); void _EXFUN(unsetenv,(const char *__string)); void _EXFUN(_unsetenv_r,(struct _reent *, const char *__string)); +int _EXFUN(random,(_VOID)); +long _EXFUN(srandom,(unsigned __seed)); +char * _EXFUN(ptsname, (int)); +int _EXFUN(grantpt, (int)); +int _EXFUN(unlockpt,(int)); #endif #endif /* ! __STRICT_ANSI__ */ @@ -192,6 +201,35 @@ int _EXFUN(_system_r,(struct _reent *, const char *)); _VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *)); +#ifdef __CYGWIN__ +#undef _malloc_r +#define _malloc_r(r, s) malloc (s) +#undef _free_r +#define _free_r(r, p) free (p) +#undef _realloc_r +#define _realloc_r(r, p, s) realloc (p, s) +#undef _calloc_r +#define _calloc_r(r, s1, s2) calloc (s1, s2); +#undef _memalign_r +#define _memalign_r(r, s1, s2) memalign (s1, s2); +#undef _mallinfo_r +#define _mallinfo_r(r) mallinfo () +#undef _malloc_stats_r +#define _malloc_stats_r(r) malloc_stats () +#undef _mallopt_r +#define _mallopt_r(i1, i2) mallopt (i1, i2) +#undef _malloc_usable_size_r +#define _malloc_usable_size_r(r, p) malloc_usable_size (p) +#undef _valloc_r +#define _valloc_r(r, s) valloc (s) +#undef _pvalloc_r +#define _pvalloc_r(r, s) pvalloc (s) +#undef _malloc_trim_r +#define _malloc_trim_r(r, s) malloc_trim (s) +#undef _mstats_r +#define _mstats_r(r, p) mstats (p) +#endif + _END_STD_C #endif /* _STDLIB_H_ */ |