Merge pull request #229 from t-b/recompile_openssh_against_current_openssl
[msysgit.git] / include / stdlib.h
blob3d00fb4a292e545f970e5c56c1916a7b7f985655
1 /*
2 * stdlib.h
4 * Definitions for common types, variables, and functions.
5 */
7 #ifndef _STDLIB_H_
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 #define _STDLIB_H_
13 #include "_ansi.h"
15 #define __need_size_t
16 #define __need_wchar_t
17 #include <stddef.h>
18 #include <wchar.h>
20 #include <sys/reent.h>
22 typedef struct
24 int quot; /* quotient */
25 int rem; /* remainder */
26 } div_t;
28 typedef struct
30 long quot; /* quotient */
31 long rem; /* remainder */
32 } ldiv_t;
34 #ifndef NULL
35 #define NULL 0
36 #endif
38 #define EXIT_FAILURE 1
39 #define EXIT_SUCCESS 0
41 #define RAND_MAX __RAND_MAX
43 extern __IMPORT int __mb_cur_max;
45 #define MB_CUR_MAX __mb_cur_max
47 _VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
48 int _EXFUN(abs,(int));
49 int _EXFUN(atexit,(_VOID (*__func)(_VOID)));
50 double _EXFUN(atof,(const char *__nptr));
51 #ifndef __STRICT_ANSI__
52 float _EXFUN(atoff,(const char *__nptr));
53 #endif
54 int _EXFUN(atoi,(const char *__nptr));
55 long _EXFUN(atol,(const char *__nptr));
56 _PTR _EXFUN(bsearch,(const _PTR __key,
57 const _PTR __base,
58 size_t __nmemb,
59 size_t __size,
60 int _EXPARM(_compar,(const _PTR, const _PTR))));
61 _PTR _EXFUN(calloc,(size_t __nmemb, size_t __size));
62 div_t _EXFUN(div,(int __numer, int __denom));
63 _VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));
64 _VOID _EXFUN(free,(_PTR));
65 char * _EXFUN(getenv,(const char *__string));
66 char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
67 char * _EXFUN(_findenv,(_CONST char *, int *));
68 char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *));
69 long _EXFUN(labs,(long));
70 ldiv_t _EXFUN(ldiv,(long __numer, long __denom));
71 _PTR _EXFUN(malloc,(size_t __size));
72 int _EXFUN(mblen,(const char *, size_t));
73 int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, mbstate_t *));
74 int _EXFUN(mbtowc,(wchar_t *, const char *, size_t));
75 int _EXFUN(_mbtowc_r,(struct _reent *, wchar_t *, const char *, size_t, mbstate_t *));
76 int _EXFUN(wctomb,(char *, wchar_t));
77 int _EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, mbstate_t *));
78 size_t _EXFUN(mbstowcs,(wchar_t *, const char *, size_t));
79 size_t _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *, const char *, size_t, mbstate_t *));
80 size_t _EXFUN(wcstombs,(char *, const wchar_t *, size_t));
81 size_t _EXFUN(_wcstombs_r,(struct _reent *, char *, const wchar_t *, size_t, mbstate_t *));
82 #ifndef __STRICT_ANSI__
83 #ifndef _REENT_ONLY
84 int _EXFUN(mkstemp,(char *));
85 char * _EXFUN(mktemp,(char *));
86 #endif
87 #endif
88 _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
89 int _EXFUN(rand,(_VOID));
90 _PTR _EXFUN(realloc,(_PTR __r, size_t __size));
91 _VOID _EXFUN(srand,(unsigned __seed));
92 double _EXFUN(strtod,(const char *__n, char **_end_PTR));
93 double _EXFUN(_strtod_r,(struct _reent *,const char *__n, char **_end_PTR));
94 #ifndef __STRICT_ANSI__
95 float _EXFUN(strtodf,(const char *__n, char **_end_PTR));
96 #endif
97 long _EXFUN(strtol,(const char *__n, char **_end_PTR, int __base));
98 long _EXFUN(_strtol_r,(struct _reent *,const char *__n, char **_end_PTR, int __base));
99 unsigned long _EXFUN(strtoul,(const char *_n_PTR, char **_end_PTR, int __base));
100 unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *_n_PTR, char **_end_PTR, int __base));
101 int _EXFUN(system,(const char *__string));
103 #ifndef __STRICT_ANSI__
104 int _EXFUN(putenv,(const char *__string));
105 int _EXFUN(_putenv_r,(struct _reent *, const char *__string));
106 int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite));
107 int _EXFUN(_setenv_r,(struct _reent *, const char *__string, const char *__value, int __overwrite));
109 char * _EXFUN(gcvt,(double,int,char *));
110 char * _EXFUN(gcvtf,(float,int,char *));
111 char * _EXFUN(fcvt,(double,int,int *,int *));
112 char * _EXFUN(fcvtf,(float,int,int *,int *));
113 char * _EXFUN(ecvt,(double,int,int *,int *));
114 char * _EXFUN(ecvtbuf,(double, int, int*, int*, char *));
115 char * _EXFUN(fcvtbuf,(double, int, int*, int*, char *));
116 char * _EXFUN(ecvtf,(float,int,int *,int *));
117 char * _EXFUN(dtoa,(double, int, int, int *, int*, char**));
118 int _EXFUN(rand_r,(unsigned *__seed));
120 double _EXFUN(drand48,(_VOID));
121 double _EXFUN(_drand48_r,(struct _reent *));
122 double _EXFUN(erand48,(unsigned short [3]));
123 double _EXFUN(_erand48_r,(struct _reent *, unsigned short [3]));
124 long _EXFUN(jrand48,(unsigned short [3]));
125 long _EXFUN(_jrand48_r,(struct _reent *, unsigned short [3]));
126 _VOID _EXFUN(lcong48,(unsigned short [7]));
127 _VOID _EXFUN(_lcong48_r,(struct _reent *, unsigned short [7]));
128 long _EXFUN(lrand48,(_VOID));
129 long _EXFUN(_lrand48_r,(struct _reent *));
130 long _EXFUN(mrand48,(_VOID));
131 long _EXFUN(_mrand48_r,(struct _reent *));
132 long _EXFUN(nrand48,(unsigned short [3]));
133 long _EXFUN(_nrand48_r,(struct _reent *, unsigned short [3]));
134 unsigned short *
135 _EXFUN(seed48,(unsigned short [3]));
136 unsigned short *
137 _EXFUN(_seed48_r,(struct _reent *, unsigned short [3]));
138 _VOID _EXFUN(srand48,(long));
139 _VOID _EXFUN(_srand48_r,(struct _reent *, long));
141 #if !defined (__CYGWIN__) && !defined (__MSYS__)
142 _VOID _EXFUN(cfree,(_PTR));
143 #else
144 char * _EXFUN(realpath,(const char *, char *));
145 void _EXFUN(unsetenv,(const char *__string));
146 void _EXFUN(_unsetenv_r,(struct _reent *, const char *__string));
147 int _EXFUN(random,(_VOID));
148 long _EXFUN(srandom,(unsigned __seed));
149 char * _EXFUN(ptsname, (int));
150 int _EXFUN(grantpt, (int));
151 int _EXFUN(unlockpt,(int));
152 #endif
154 #endif /* ! __STRICT_ANSI__ */
156 char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
157 _PTR _EXFUN(_malloc_r,(struct _reent *, size_t));
158 _PTR _EXFUN(_calloc_r,(struct _reent *, size_t, size_t));
159 _VOID _EXFUN(_free_r,(struct _reent *, _PTR));
160 _PTR _EXFUN(_realloc_r,(struct _reent *, _PTR, size_t));
161 _VOID _EXFUN(_mstats_r,(struct _reent *, char *));
162 int _EXFUN(_system_r,(struct _reent *, const char *));
164 _VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
166 #ifdef __cplusplus
168 #endif
169 #endif /* _STDLIB_H_ */