file-5.04
[msysgit.git] / mingw / include / stdlib.h
blobb586430594d392861822f80972dd5ac5e048a762
1 /*
2 * stdlib.h
3 * This file has no copyright assigned and is placed in the Public Domain.
4 * This file is a part of the mingw-runtime package.
5 * No warranty is given; refer to the file DISCLAIMER within the package.
7 * Definitions for common types, variables, and functions.
9 */
11 #ifndef _STDLIB_H_
12 #define _STDLIB_H_
14 /* All the headers include this file. */
15 #include <_mingw.h>
17 #define __need_size_t
18 #define __need_wchar_t
19 #define __need_NULL
20 #ifndef RC_INVOKED
21 #include <stddef.h>
22 #endif /* RC_INVOKED */
25 * RAND_MAX is the maximum value that may be returned by rand.
26 * The minimum is zero.
28 #define RAND_MAX 0x7FFF
31 * These values may be used as exit status codes.
33 #define EXIT_SUCCESS 0
34 #define EXIT_FAILURE 1
37 * Definitions for path name functions.
38 * NOTE: All of these values have simply been chosen to be conservatively high.
39 * Remember that with long file names we can no longer depend on
40 * extensions being short.
42 #ifndef __STRICT_ANSI__
44 #ifndef MAX_PATH
45 #define MAX_PATH (260)
46 #endif
48 #define _MAX_PATH MAX_PATH
49 #define _MAX_DRIVE (3)
50 #define _MAX_DIR 256
51 #define _MAX_FNAME 256
52 #define _MAX_EXT 256
54 #endif /* Not __STRICT_ANSI__ */
57 #ifndef RC_INVOKED
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
63 #if !defined (__STRICT_ANSI__)
66 * This seems like a convenient place to declare these variables, which
67 * give programs using WinMain (or main for that matter) access to main-ish
68 * argc and argv. environ is a pointer to a table of environment variables.
69 * NOTE: Strings in _argv and environ are ANSI strings.
71 extern int _argc;
72 extern char** _argv;
74 /* imports from runtime dll of the above variables */
75 #ifdef __MSVCRT__
77 extern int* __cdecl __MINGW_NOTHROW __p___argc(void);
78 extern char*** __cdecl __MINGW_NOTHROW __p___argv(void);
79 extern wchar_t*** __cdecl __MINGW_NOTHROW __p___wargv(void);
81 #define __argc (*__p___argc())
82 #define __argv (*__p___argv())
83 #define __wargv (*__p___wargv())
85 #else /* !MSVCRT */
87 #ifndef __DECLSPEC_SUPPORTED
89 extern int* _imp____argc_dll;
90 extern char*** _imp____argv_dll;
91 #define __argc (*_imp____argc_dll)
92 #define __argv (*_imp____argv_dll)
94 #else /* __DECLSPEC_SUPPORTED */
96 __MINGW_IMPORT int __argc_dll;
97 __MINGW_IMPORT char** __argv_dll;
98 #define __argc __argc_dll
99 #define __argv __argv_dll
101 #endif /* __DECLSPEC_SUPPORTED */
103 #endif /* __MSVCRT */
104 #endif /* __STRICT_ANSI__ */
106 * Also defined in ctype.h.
108 #ifndef MB_CUR_MAX
109 #ifdef __DECLSPEC_SUPPORTED
110 # ifdef __MSVCRT__
111 # define MB_CUR_MAX __mb_cur_max
112 __MINGW_IMPORT int __mb_cur_max;
113 # else /* not __MSVCRT */
114 # define MB_CUR_MAX __mb_cur_max_dll
115 __MINGW_IMPORT int __mb_cur_max_dll;
116 # endif /* not __MSVCRT */
118 #else /* ! __DECLSPEC_SUPPORTED */
119 # ifdef __MSVCRT__
120 extern int* _imp____mbcur_max;
121 # define MB_CUR_MAX (*_imp____mb_cur_max)
122 # else /* not __MSVCRT */
123 extern int* _imp____mbcur_max_dll;
124 # define MB_CUR_MAX (*_imp____mb_cur_max_dll)
125 # endif /* not __MSVCRT */
126 #endif /* __DECLSPEC_SUPPORTED */
127 #endif /* MB_CUR_MAX */
130 * MS likes to declare errno in stdlib.h as well.
133 #ifdef _UWIN
134 #undef errno
135 extern int errno;
136 #else
137 _CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void);
138 #define errno (*_errno())
139 #endif
140 _CRTIMP int* __cdecl __MINGW_NOTHROW __doserrno(void);
141 #define _doserrno (*__doserrno())
143 #if !defined (__STRICT_ANSI__)
145 * Use environ from the DLL, not as a global.
148 #ifdef __MSVCRT__
149 extern _CRTIMP char *** __cdecl __MINGW_NOTHROW __p__environ(void);
150 extern _CRTIMP wchar_t *** __cdecl __MINGW_NOTHROW __p__wenviron(void);
151 # define _environ (*__p__environ())
152 # define _wenviron (*__p__wenviron())
153 #else /* ! __MSVCRT__ */
154 # ifndef __DECLSPEC_SUPPORTED
155 extern char *** _imp___environ_dll;
156 # define _environ (*_imp___environ_dll)
157 # else /* __DECLSPEC_SUPPORTED */
158 __MINGW_IMPORT char ** _environ_dll;
159 # define _environ _environ_dll
160 # endif /* __DECLSPEC_SUPPORTED */
161 #endif /* ! __MSVCRT__ */
163 #define environ _environ
165 #ifdef __MSVCRT__
166 /* One of the MSVCRTxx libraries */
168 #ifndef __DECLSPEC_SUPPORTED
169 extern int* _imp___sys_nerr;
170 # define sys_nerr (*_imp___sys_nerr)
171 #else /* __DECLSPEC_SUPPORTED */
172 __MINGW_IMPORT int _sys_nerr;
173 # ifndef _UWIN
174 # define sys_nerr _sys_nerr
175 # endif /* _UWIN */
176 #endif /* __DECLSPEC_SUPPORTED */
178 #else /* ! __MSVCRT__ */
180 /* CRTDLL run time library */
182 #ifndef __DECLSPEC_SUPPORTED
183 extern int* _imp___sys_nerr_dll;
184 # define sys_nerr (*_imp___sys_nerr_dll)
185 #else /* __DECLSPEC_SUPPORTED */
186 __MINGW_IMPORT int _sys_nerr_dll;
187 # define sys_nerr _sys_nerr_dll
188 #endif /* __DECLSPEC_SUPPORTED */
190 #endif /* ! __MSVCRT__ */
192 #ifndef __DECLSPEC_SUPPORTED
193 extern char*** _imp__sys_errlist;
194 #define sys_errlist (*_imp___sys_errlist)
195 #else /* __DECLSPEC_SUPPORTED */
196 __MINGW_IMPORT char* _sys_errlist[];
197 #ifndef _UWIN
198 #define sys_errlist _sys_errlist
199 #endif /* _UWIN */
200 #endif /* __DECLSPEC_SUPPORTED */
203 * OS version and such constants.
206 #ifdef __MSVCRT__
207 /* msvcrtxx.dll */
209 extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__osver(void);
210 extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winver(void);
211 extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winmajor(void);
212 extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winminor(void);
214 #ifndef __DECLSPEC_SUPPORTED
215 # define _osver (*__p__osver())
216 # define _winver (*__p__winver())
217 # define _winmajor (*__p__winmajor())
218 # define _winminor (*__p__winminor())
219 #else
220 __MINGW_IMPORT unsigned int _osver;
221 __MINGW_IMPORT unsigned int _winver;
222 __MINGW_IMPORT unsigned int _winmajor;
223 __MINGW_IMPORT unsigned int _winminor;
224 #endif /* __DECLSPEC_SUPPORTED */
226 #else
227 /* Not msvcrtxx.dll, thus crtdll.dll */
229 #ifndef __DECLSPEC_SUPPORTED
231 extern unsigned int* _imp___osver_dll;
232 extern unsigned int* _imp___winver_dll;
233 extern unsigned int* _imp___winmajor_dll;
234 extern unsigned int* _imp___winminor_dll;
236 #define _osver (*_imp___osver_dll)
237 #define _winver (*_imp___winver_dll)
238 #define _winmajor (*_imp___winmajor_dll)
239 #define _winminor (*_imp___winminor_dll)
241 #else /* __DECLSPEC_SUPPORTED */
243 __MINGW_IMPORT unsigned int _osver_dll;
244 __MINGW_IMPORT unsigned int _winver_dll;
245 __MINGW_IMPORT unsigned int _winmajor_dll;
246 __MINGW_IMPORT unsigned int _winminor_dll;
248 #define _osver _osver_dll
249 #define _winver _winver_dll
250 #define _winmajor _winmajor_dll
251 #define _winminor _winminor_dll
253 #endif /* __DECLSPEC_SUPPORTED */
255 #endif
257 #if defined __MSVCRT__
258 /* although the _pgmptr is exported as DATA,
259 * be safe and use the access function __p__pgmptr() to get it. */
260 _CRTIMP char** __cdecl __MINGW_NOTHROW __p__pgmptr(void);
261 #define _pgmptr (*__p__pgmptr())
262 _CRTIMP wchar_t** __cdecl __MINGW_NOTHROW __p__wpgmptr(void);
263 #define _wpgmptr (*__p__wpgmptr())
264 #else /* ! __MSVCRT__ */
265 # ifndef __DECLSPEC_SUPPORTED
266 extern char** __imp__pgmptr_dll;
267 # define _pgmptr (*_imp___pgmptr_dll)
268 # else /* __DECLSPEC_SUPPORTED */
269 __MINGW_IMPORT char* _pgmptr_dll;
270 # define _pgmptr _pgmptr_dll
271 # endif /* __DECLSPEC_SUPPORTED */
272 /* no wide version in CRTDLL */
273 #endif /* __MSVCRT__ */
276 * This variable determines the default file mode.
277 * TODO: Which flags work?
279 #if !defined (__DECLSPEC_SUPPORTED) || defined (__IN_MINGW_RUNTIME)
281 #ifdef __MSVCRT__
282 extern int* _imp___fmode;
283 #define _fmode (*_imp___fmode)
284 #else
285 /* CRTDLL */
286 extern int* _imp___fmode_dll;
287 #define _fmode (*_imp___fmode_dll)
288 #endif
290 #else /* __DECLSPEC_SUPPORTED */
292 #ifdef __MSVCRT__
293 __MINGW_IMPORT int _fmode;
294 #else /* ! __MSVCRT__ */
295 __MINGW_IMPORT int _fmode_dll;
296 #define _fmode _fmode_dll
297 #endif /* ! __MSVCRT__ */
299 #endif /* __DECLSPEC_SUPPORTED */
301 #endif /* Not __STRICT_ANSI__ */
303 _CRTIMP double __cdecl __MINGW_NOTHROW atof (const char*);
304 _CRTIMP int __cdecl __MINGW_NOTHROW atoi (const char*);
305 _CRTIMP long __cdecl __MINGW_NOTHROW atol (const char*);
306 #if !defined (__STRICT_ANSI__)
307 _CRTIMP int __cdecl __MINGW_NOTHROW _wtoi (const wchar_t *);
308 _CRTIMP long __cdecl __MINGW_NOTHROW _wtol (const wchar_t *);
309 #endif
310 #if !defined __NO_ISOCEXT /* in libmingwex.a */
311 double __cdecl __MINGW_NOTHROW __strtod (const char*, char**);
312 #ifdef __cplusplus
313 /* We require a function with external linkage. */
314 #else
315 static
316 #endif /* Not __cplusplus */
317 __inline__ double __cdecl __MINGW_NOTHROW
318 strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
320 return __strtod(__nptr, __endptr);
322 float __cdecl __MINGW_NOTHROW strtof (const char * __restrict__, char ** __restrict__);
323 long double __cdecl __MINGW_NOTHROW strtold (const char * __restrict__, char ** __restrict__);
324 #else
325 _CRTIMP double __cdecl __MINGW_NOTHROW strtod (const char*, char**);
326 #endif /* __NO_ISOCEXT */
328 _CRTIMP long __cdecl __MINGW_NOTHROW strtol (const char*, char**, int);
329 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW strtoul (const char*, char**, int);
331 #ifndef _WSTDLIB_DEFINED
332 /* also declared in wchar.h */
333 _CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int);
334 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int);
335 _CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**);
336 #if !defined __NO_ISOCEXT /* in libmingwex.a */
337 float __cdecl __MINGW_NOTHROW wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
338 long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
339 #endif /* __NO_ISOCEXT */
340 #ifdef __MSVCRT__
341 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*);
342 _CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*);
343 _CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
344 _CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*);
345 _CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
346 _CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
347 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t);
348 #endif
349 #define _WSTDLIB_DEFINED
350 #endif
352 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcstombs (char*, const wchar_t*, size_t);
353 _CRTIMP int __cdecl __MINGW_NOTHROW wctomb (char*, wchar_t);
355 _CRTIMP int __cdecl __MINGW_NOTHROW mblen (const char*, size_t);
356 _CRTIMP size_t __cdecl __MINGW_NOTHROW mbstowcs (wchar_t*, const char*, size_t);
357 _CRTIMP int __cdecl __MINGW_NOTHROW mbtowc (wchar_t*, const char*, size_t);
359 _CRTIMP int __cdecl __MINGW_NOTHROW rand (void);
360 _CRTIMP void __cdecl __MINGW_NOTHROW srand (unsigned int);
362 _CRTIMP void* __cdecl __MINGW_NOTHROW calloc (size_t, size_t) __MINGW_ATTRIB_MALLOC;
363 _CRTIMP void* __cdecl __MINGW_NOTHROW malloc (size_t) __MINGW_ATTRIB_MALLOC;
364 _CRTIMP void* __cdecl __MINGW_NOTHROW realloc (void*, size_t);
365 _CRTIMP void __cdecl __MINGW_NOTHROW free (void*);
366 _CRTIMP void __cdecl __MINGW_NOTHROW abort (void) __MINGW_ATTRIB_NORETURN;
367 _CRTIMP void __cdecl __MINGW_NOTHROW exit (int) __MINGW_ATTRIB_NORETURN;
369 /* Note: This is in startup code, not imported directly from dll */
370 int __cdecl __MINGW_NOTHROW atexit (void (*)(void));
372 _CRTIMP int __cdecl __MINGW_NOTHROW system (const char*);
373 _CRTIMP char* __cdecl __MINGW_NOTHROW getenv (const char*);
375 /* bsearch and qsort are also in non-ANSI header search.h */
376 _CRTIMP void* __cdecl bsearch (const void*, const void*, size_t, size_t,
377 int (*)(const void*, const void*));
378 _CRTIMP void __cdecl qsort(void*, size_t, size_t,
379 int (*)(const void*, const void*));
381 _CRTIMP int __cdecl __MINGW_NOTHROW abs (int) __MINGW_ATTRIB_CONST;
382 _CRTIMP long __cdecl __MINGW_NOTHROW labs (long) __MINGW_ATTRIB_CONST;
385 * div_t and ldiv_t are structures used to return the results of div and
386 * ldiv.
388 * NOTE: div and ldiv appear not to work correctly unless
389 * -fno-pcc-struct-return is specified. This is included in the
390 * mingw32 specs file.
392 typedef struct { int quot, rem; } div_t;
393 typedef struct { long quot, rem; } ldiv_t;
395 _CRTIMP div_t __cdecl __MINGW_NOTHROW div (int, int) __MINGW_ATTRIB_CONST;
396 _CRTIMP ldiv_t __cdecl __MINGW_NOTHROW ldiv (long, long) __MINGW_ATTRIB_CONST;
398 #if !defined (__STRICT_ANSI__)
401 * NOTE: Officially the three following functions are obsolete. The Win32 API
402 * functions SetErrorMode, Beep and Sleep are their replacements.
404 _CRTIMP void __cdecl __MINGW_NOTHROW _beep (unsigned int, unsigned int) __MINGW_ATTRIB_DEPRECATED;
405 /* Not to be confused with _set_error_mode (int). */
406 _CRTIMP void __cdecl __MINGW_NOTHROW _seterrormode (int) __MINGW_ATTRIB_DEPRECATED;
407 _CRTIMP void __cdecl __MINGW_NOTHROW _sleep (unsigned long) __MINGW_ATTRIB_DEPRECATED;
409 _CRTIMP void __cdecl __MINGW_NOTHROW _exit (int) __MINGW_ATTRIB_NORETURN;
411 /* _onexit is MS extension. Use atexit for portability. */
412 /* Note: This is in startup code, not imported directly from dll */
413 typedef int (* _onexit_t)(void);
414 _onexit_t __cdecl __MINGW_NOTHROW _onexit( _onexit_t );
416 _CRTIMP int __cdecl __MINGW_NOTHROW _putenv (const char*);
417 _CRTIMP void __cdecl __MINGW_NOTHROW _searchenv (const char*, const char*, char*);
419 _CRTIMP char* __cdecl __MINGW_NOTHROW _ecvt (double, int, int*, int*);
420 _CRTIMP char* __cdecl __MINGW_NOTHROW _fcvt (double, int, int*, int*);
421 _CRTIMP char* __cdecl __MINGW_NOTHROW _gcvt (double, int, char*);
423 _CRTIMP void __cdecl __MINGW_NOTHROW _makepath (char*, const char*, const char*, const char*, const char*);
424 _CRTIMP void __cdecl __MINGW_NOTHROW _splitpath (const char*, char*, char*, char*, char*);
425 _CRTIMP char* __cdecl __MINGW_NOTHROW _fullpath (char*, const char*, size_t);
427 _CRTIMP char* __cdecl __MINGW_NOTHROW _itoa (int, char*, int);
428 _CRTIMP char* __cdecl __MINGW_NOTHROW _ltoa (long, char*, int);
429 _CRTIMP char* __cdecl __MINGW_NOTHROW _ultoa(unsigned long, char*, int);
430 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _itow (int, wchar_t*, int);
431 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ltow (long, wchar_t*, int);
432 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ultow (unsigned long, wchar_t*, int);
434 #ifdef __MSVCRT__
435 _CRTIMP __int64 __cdecl __MINGW_NOTHROW _atoi64(const char *);
436 _CRTIMP char* __cdecl __MINGW_NOTHROW _i64toa(__int64, char *, int);
437 _CRTIMP char* __cdecl __MINGW_NOTHROW _ui64toa(unsigned __int64, char *, int);
438 _CRTIMP __int64 __cdecl __MINGW_NOTHROW _wtoi64(const wchar_t *);
439 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _i64tow(__int64, wchar_t *, int);
440 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ui64tow(unsigned __int64, wchar_t *, int);
442 _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _rotl(unsigned int, int) __MINGW_ATTRIB_CONST;
443 _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _rotr(unsigned int, int) __MINGW_ATTRIB_CONST;
444 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW _lrotl(unsigned long, int) __MINGW_ATTRIB_CONST;
445 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW _lrotr(unsigned long, int) __MINGW_ATTRIB_CONST;
447 _CRTIMP int __cdecl __MINGW_NOTHROW _set_error_mode (int);
449 # define _OUT_TO_DEFAULT 0
450 # define _OUT_TO_STDERR 1
451 # define _OUT_TO_MSGBOX 2
452 # define _REPORT_ERRMODE 3
454 # if __MSVCRT_VERSION__ >= 0x800
455 # ifndef _UINTPTR_T_DEFINED
456 # define _UINTPTR_T_DEFINED
457 # ifdef _WIN64
458 typedef unsigned __int64 uintptr_t;
459 # else
460 typedef unsigned int uintptr_t;
461 # endif
462 # endif
464 _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_abort_behavior (unsigned int, unsigned int);
466 /* These masks work with msvcr80.dll version 8.0.50215.44 (a beta release). */
467 # define _WRITE_ABORT_MSG 1
468 # define _CALL_REPORTFAULT 2
470 typedef void
471 (* _invalid_parameter_handler) (
472 const wchar_t *,
473 const wchar_t *,
474 const wchar_t *,
475 unsigned int,
476 uintptr_t);
477 _invalid_parameter_handler _set_invalid_parameter_handler (_invalid_parameter_handler);
479 # endif /* __MSVCRT_VERSION__ >= 0x800 */
480 #endif /* __MSVCRT__ */
482 #ifndef _NO_OLDNAMES
484 _CRTIMP int __cdecl __MINGW_NOTHROW putenv (const char*);
485 _CRTIMP void __cdecl __MINGW_NOTHROW searchenv (const char*, const char*, char*);
487 _CRTIMP char* __cdecl __MINGW_NOTHROW itoa (int, char*, int);
488 _CRTIMP char* __cdecl __MINGW_NOTHROW ltoa (long, char*, int);
490 #ifndef _UWIN
491 _CRTIMP char* __cdecl __MINGW_NOTHROW ecvt (double, int, int*, int*);
492 _CRTIMP char* __cdecl __MINGW_NOTHROW fcvt (double, int, int*, int*);
493 _CRTIMP char* __cdecl __MINGW_NOTHROW gcvt (double, int, char*);
494 #endif /* _UWIN */
495 #endif /* Not _NO_OLDNAMES */
497 #endif /* Not __STRICT_ANSI__ */
499 /* C99 names */
501 #if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
503 /* C99 name for _exit */
504 void __cdecl __MINGW_NOTHROW _Exit(int) __MINGW_ATTRIB_NORETURN;
505 #ifndef __STRICT_ANSI__ /* inline using non-ansi functions */
506 __CRT_INLINE void __cdecl __MINGW_NOTHROW _Exit(int __status)
507 { _exit (__status); }
508 #endif
510 typedef struct { long long quot, rem; } lldiv_t;
512 lldiv_t __cdecl __MINGW_NOTHROW lldiv (long long, long long) __MINGW_ATTRIB_CONST;
514 long long __cdecl __MINGW_NOTHROW llabs(long long);
515 __CRT_INLINE long long __cdecl __MINGW_NOTHROW llabs(long long _j)
516 {return (_j >= 0 ? _j : -_j);}
518 long long __cdecl __MINGW_NOTHROW strtoll (const char* __restrict__, char** __restrict, int);
519 unsigned long long __cdecl __MINGW_NOTHROW strtoull (const char* __restrict__, char** __restrict__, int);
521 #if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */
522 long long __cdecl __MINGW_NOTHROW atoll (const char *);
524 #if !defined (__STRICT_ANSI__)
525 long long __cdecl __MINGW_NOTHROW wtoll (const wchar_t *);
526 char* __cdecl __MINGW_NOTHROW lltoa (long long, char *, int);
527 char* __cdecl __MINGW_NOTHROW ulltoa (unsigned long long , char *, int);
528 wchar_t* __cdecl __MINGW_NOTHROW lltow (long long, wchar_t *, int);
529 wchar_t* __cdecl __MINGW_NOTHROW ulltow (unsigned long long, wchar_t *, int);
531 /* inline using non-ansi functions */
532 __CRT_INLINE long long __cdecl __MINGW_NOTHROW atoll (const char * _c)
533 { return _atoi64 (_c); }
534 __CRT_INLINE char* __cdecl __MINGW_NOTHROW lltoa (long long _n, char * _c, int _i)
535 { return _i64toa (_n, _c, _i); }
536 __CRT_INLINE char* __cdecl __MINGW_NOTHROW ulltoa (unsigned long long _n, char * _c, int _i)
537 { return _ui64toa (_n, _c, _i); }
538 __CRT_INLINE long long __cdecl __MINGW_NOTHROW wtoll (const wchar_t * _w)
539 { return _wtoi64 (_w); }
540 __CRT_INLINE wchar_t* __cdecl __MINGW_NOTHROW lltow (long long _n, wchar_t * _w, int _i)
541 { return _i64tow (_n, _w, _i); }
542 __CRT_INLINE wchar_t* __cdecl __MINGW_NOTHROW ulltow (unsigned long long _n, wchar_t * _w, int _i)
543 { return _ui64tow (_n, _w, _i); }
544 #endif /* (__STRICT_ANSI__) */
546 #endif /* __MSVCRT__ */
548 #endif /* !__NO_ISOCEXT */
551 #ifdef __cplusplus
553 #endif
555 #endif /* Not RC_INVOKED */
557 #endif /* Not _STDLIB_H_ */