2 * D header file for POSIX.
4 * Copyright: Public Domain
5 * License: Public Domain
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
9 module stdc.posix.stdlib;
11 private import stdc.posix.config;
12 public import stdc.stdlib;
13 public import stdc.posix.sys.wait;
18 // Required (defined in stdc.stdlib)
35 int atexit(void function());
36 double atof(in char*);
38 c_long atol(in char*);
40 void* bsearch(in void*, in void*, size_t, size_t, int function(in void*, in void*));
41 void* calloc(size_t, size_t);
45 char* getenv(in char*);
47 ldiv_t ldiv(c_long, c_long);
49 lldiv_t lldiv(long, long);
51 int mblen(in char*, size_t);
52 size_t mbstowcs(wchar_t*, in char*, size_t);
53 int mbtowc(wchar_t*, in char*, size_t);
54 void qsort(void*, size_t, size_t, int function(in void*, in void*));
56 void* realloc(void*, size_t);
58 double strtod(in char*, char**);
59 float strtof(in char*, char**);
60 c_long strtol(in char*, char**, int);
61 real strtold(in char*, char**);
62 long strtoll(in char*, char**, int);
63 c_ulong strtoul(in char*, char**, int);
64 ulong strtoull(in char*, char**, int);
66 size_t wcstombs(char*, in wchar_t*, size_t);
67 int wctomb(char*, wchar_t);
71 // Advisory Information (ADV)
74 int posix_memalign(void**, size_t, size_t);
79 int posix_memalign(void**, size_t, size_t);
86 int setenv(in char*, in char*, int);
87 int unsetenv(in char*);
92 int setenv(in char*, in char*, int);
93 int unsetenv(in char*);
95 void* valloc(size_t); // LEGACY non-standard
97 else version( darwin )
99 int setenv(in char*, in char*, int);
100 int unsetenv(in char*);
102 void* valloc(size_t); // LEGACY non-standard
106 // Thread-Safe Functions (TSF)
116 else version( darwin )
120 else version( freebsd )
129 WNOHANG (defined in stdc.posix.sys.wait)
130 WUNTRACED (defined in stdc.posix.sys.wait)
131 WEXITSTATUS (defined in stdc.posix.sys.wait)
132 WIFEXITED (defined in stdc.posix.sys.wait)
133 WIFSIGNALED (defined in stdc.posix.sys.wait)
134 WIFSTOPPED (defined in stdc.posix.sys.wait)
135 WSTOPSIG (defined in stdc.posix.sys.wait)
136 WTERMSIG (defined in stdc.posix.sys.wait)
138 c_long a64l(in char*);
140 char* ecvt(double, int, int *, int *); // LEGACY
141 double erand48(ushort[3]);
142 char* fcvt(double, int, int *, int *); // LEGACY
143 char* gcvt(double, int, char*); // LEGACY
144 // per spec: int getsubopt(char** char* const*, char**);
145 int getsubopt(char**, in char**, char**);
147 char* initstate(uint, char*, size_t);
148 c_long jrand48(ushort[3]);
150 void lcong48(ushort[7]);
152 char* mktemp(char*); // LEGACY
155 c_long nrand48(ushort[3]);
156 int posix_openpt(int);
160 char* realpath(in char*, char*);
161 ushort seed48(ushort[3]);
162 void setkey(in char*);
163 char* setstate(in char*);
164 void srand48(c_long);
171 //WNOHANG (defined in stdc.posix.sys.wait)
172 //WUNTRACED (defined in stdc.posix.sys.wait)
173 //WEXITSTATUS (defined in stdc.posix.sys.wait)
174 //WIFEXITED (defined in stdc.posix.sys.wait)
175 //WIFSIGNALED (defined in stdc.posix.sys.wait)
176 //WIFSTOPPED (defined in stdc.posix.sys.wait)
177 //WSTOPSIG (defined in stdc.posix.sys.wait)
178 //WTERMSIG (defined in stdc.posix.sys.wait)
180 c_long a64l(in char*);
182 char* ecvt(double, int, int *, int *); // LEGACY
183 double erand48(ushort[3]);
184 char* fcvt(double, int, int *, int *); // LEGACY
185 char* gcvt(double, int, char*); // LEGACY
186 int getsubopt(char**, in char**, char**);
188 char* initstate(uint, char*, size_t);
189 c_long jrand48(ushort[3]);
191 void lcong48(ushort[7]);
193 char* mktemp(char*); // LEGACY
194 //int mkstemp(char*);
196 c_long nrand48(ushort[3]);
197 int posix_openpt(int);
201 char* realpath(in char*, char*);
202 ushort seed48(ushort[3]);
203 void setkey(in char*);
204 char* setstate(in char*);
205 void srand48(c_long);
209 static if( __USE_LARGEFILE64 )
211 int mkstemp64(char*);
212 alias mkstemp64 mkstemp;
219 else version( darwin )
221 //WNOHANG (defined in stdc.posix.sys.wait)
222 //WUNTRACED (defined in stdc.posix.sys.wait)
223 //WEXITSTATUS (defined in stdc.posix.sys.wait)
224 //WIFEXITED (defined in stdc.posix.sys.wait)
225 //WIFSIGNALED (defined in stdc.posix.sys.wait)
226 //WIFSTOPPED (defined in stdc.posix.sys.wait)
227 //WSTOPSIG (defined in stdc.posix.sys.wait)
228 //WTERMSIG (defined in stdc.posix.sys.wait)
230 c_long a64l(in char*);
232 char* ecvt(double, int, int *, int *); // LEGACY
233 double erand48(ushort[3]);
234 char* fcvt(double, int, int *, int *); // LEGACY
235 char* gcvt(double, int, char*); // LEGACY
236 int getsubopt(char**, in char**, char**);
238 char* initstate(uint, char*, size_t);
239 c_long jrand48(ushort[3]);
241 void lcong48(ushort[7]);
243 char* mktemp(char*); // LEGACY
246 c_long nrand48(ushort[3]);
247 int posix_openpt(int);
251 char* realpath(in char*, char*);
252 ushort seed48(ushort[3]);
253 void setkey(in char*);
254 char* setstate(in char*);
255 void srand48(c_long);
259 else version( freebsd )
261 //WNOHANG (defined in stdc.posix.sys.wait)
262 //WUNTRACED (defined in stdc.posix.sys.wait)
263 //WEXITSTATUS (defined in stdc.posix.sys.wait)
264 //WIFEXITED (defined in stdc.posix.sys.wait)
265 //WIFSIGNALED (defined in stdc.posix.sys.wait)
266 //WIFSTOPPED (defined in stdc.posix.sys.wait)
267 //WSTOPSIG (defined in stdc.posix.sys.wait)
268 //WTERMSIG (defined in stdc.posix.sys.wait)
270 c_long a64l(in char*);
272 //char* ecvt(double, int, int *, int *); // LEGACY
273 double erand48(ushort[3]);
274 //char* fcvt(double, int, int *, int *); // LEGACY
275 //char* gcvt(double, int, char*); // LEGACY
276 int getsubopt(char**, in char**, char**);
278 char* initstate(uint, char*, size_t);
279 c_long jrand48(ushort[3]);
281 void lcong48(ushort[7]);
283 char* mktemp(char*); // LEGACY
286 c_long nrand48(ushort[3]);
287 int posix_openpt(int);
291 char* realpath(in char*, char*);
292 ushort seed48(ushort[3]);
293 void setkey(in char*);
294 char* setstate(in char*);
295 void srand48(c_long);