2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
12 #pragma pack(push,_CRT_PACKING)
22 #define NULL ((void *)0)
26 #define EXIT_SUCCESS 0
27 #define EXIT_FAILURE 1
29 #ifndef _ONEXIT_T_DEFINED
30 #define _ONEXIT_T_DEFINED
32 typedef int (__cdecl
*_onexit_t
)(void);
35 #define onexit_t _onexit_t
39 #ifndef _DIV_T_DEFINED
40 #define _DIV_T_DEFINED
42 typedef struct _div_t
{
47 typedef struct _ldiv_t
{
53 #ifndef _CRT_DOUBLE_DEC
54 #define _CRT_DOUBLE_DEC
62 #define _PTR_LD(x) ((unsigned char *)(&(x)->ld))
71 #if __MINGW_GNUC_PREREQ(4,4)
72 #pragma push_macro("long")
80 #if __MINGW_GNUC_PREREQ(4,4)
81 #pragma pop_macro("long")
86 unsigned char ld12
[12];
91 #define RAND_MAX 0x7fff
94 #define MB_CUR_MAX ___mb_cur_max_func()
97 extern int __mb_cur_max
;
99 #define __mb_cur_max (*_imp____mb_cur_max)
100 extern int *_imp____mb_cur_max
;
104 extern int __mbcur_max
;
105 #define ___mb_cur_max_func() (__mb_cur_max)
107 extern int* _imp____mbcur_max
;
108 #define ___mb_cur_max_func() (*_imp____mb_cur_max)
112 #define __max(a,b) (((a) > (b)) ? (a) : (b))
113 #define __min(a,b) (((a) < (b)) ? (a) : (b))
115 #define _MAX_PATH 260
118 #define _MAX_FNAME 256
121 #define _OUT_TO_DEFAULT 0
122 #define _OUT_TO_STDERR 1
123 #define _OUT_TO_MSGBOX 2
124 #define _REPORT_ERRMODE 3
126 #define _WRITE_ABORT_MSG 0x1
127 #define _CALL_REPORTFAULT 0x2
129 #define _MAX_ENV 32767
131 typedef void (__cdecl
*_purecall_handler
)(void);
133 _CRTIMP _purecall_handler __cdecl
_set_purecall_handler(_purecall_handler _Handler
);
134 _CRTIMP _purecall_handler __cdecl
_get_purecall_handler();
136 typedef void (__cdecl
*_invalid_parameter_handler
)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t);
137 _invalid_parameter_handler __cdecl
_set_invalid_parameter_handler(_invalid_parameter_handler _Handler
);
138 _invalid_parameter_handler __cdecl
_get_invalid_parameter_handler(void);
140 #ifndef _CRT_ERRNO_DEFINED
141 #define _CRT_ERRNO_DEFINED
142 _CRTIMP
extern int *__cdecl
_errno(void);
143 #define errno (*_errno())
144 errno_t __cdecl
_set_errno(int _Value
);
145 errno_t __cdecl
_get_errno(int *_Value
);
147 _CRTIMP
unsigned long *__cdecl
__doserrno(void);
148 #define _doserrno (*__doserrno())
149 errno_t __cdecl
_set_doserrno(unsigned long _Value
);
150 errno_t __cdecl
_get_doserrno(unsigned long *_Value
);
153 extern int* _imp___sys_nerr
;
154 extern char*** _imp__sys_errlist
;
156 __MINGW_IMPORT
int _sys_nerr
;
157 __MINGW_IMPORT
char* _sys_errlist
[];
160 //#if (defined(_X86_) && !defined(__x86_64))
161 _CRTIMP
int *__cdecl
__p___argc(void);
162 _CRTIMP
char ***__cdecl
__p___argv(void);
163 _CRTIMP
wchar_t ***__cdecl
__p___wargv(void);
164 _CRTIMP
char ***__cdecl
__p__environ(void);
165 _CRTIMP
wchar_t ***__cdecl
__p__wenviron(void);
166 _CRTIMP
char **__cdecl
__p__pgmptr(void);
167 _CRTIMP
wchar_t **__cdecl
__p__wpgmptr(void);
173 #define __argc (*_imp____argc)
174 extern int *_imp____argc
;
179 extern char **__argv
;
181 #define __argv (*_imp____argv)
182 extern char ***_imp____argv
;
187 extern wchar_t **__wargv
;
189 #define __wargv (*_imp____wargv)
190 extern wchar_t ***_imp____wargv
;
195 extern char **environ
;
199 extern char **_environ
;
201 #define _environ (*_imp___environ)
202 extern char ***_imp___environ
;
208 extern wchar_t **_wenviron
;
210 #define _wenviron (*_imp___wenviron)
211 extern wchar_t ***_imp___wenviron
;
217 extern char *_pgmptr
;
219 #define _pgmptr (*_imp___pgmptr)
220 extern char **_imp___pgmptr
;
226 extern wchar_t *_wpgmptr
;
228 #define _wpgmptr (*_imp___wpgmptr)
229 extern wchar_t **_imp___wpgmptr
;
232 errno_t __cdecl
_get_pgmptr(char **_Value
);
233 errno_t __cdecl
_get_wpgmptr(wchar_t **_Value
);
238 #define _fmode (*_imp___fmode)
239 extern int *_imp___fmode
;
242 _CRTIMP errno_t __cdecl
_set_fmode(int _Mode
);
243 _CRTIMP errno_t __cdecl
_get_fmode(int *_PMode
);
247 extern unsigned int _osplatform
;
249 #define _osplatform (*_imp___osplatform)
250 extern unsigned int *_imp___osplatform
;
256 extern unsigned int _osver
;
258 #define _osver (*_imp___osver)
259 extern unsigned int *_imp___osver
;
265 extern unsigned int _winver
;
267 #define _winver (*_imp___winver)
268 extern unsigned int *_imp___winver
;
274 extern unsigned int _winmajor
;
276 #define _winmajor (*_imp___winmajor)
277 extern unsigned int *_imp___winmajor
;
283 extern unsigned int _winminor
;
285 #define _winminor (*_imp___winminor)
286 extern unsigned int *_imp___winminor
;
290 errno_t __cdecl
_get_osplatform(unsigned int *_Value
);
291 errno_t __cdecl
_get_osver(unsigned int *_Value
);
292 errno_t __cdecl
_get_winver(unsigned int *_Value
);
293 errno_t __cdecl
_get_winmajor(unsigned int *_Value
);
294 errno_t __cdecl
_get_winminor(unsigned int *_Value
);
297 #define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
300 template <typename _CountofType
,size_t _SizeOfArray
> char (*__countof_helper(UNALIGNED
_CountofType (&_Array
)[_SizeOfArray
]))[_SizeOfArray
];
301 #define _countof(_Array) sizeof(*__countof_helper(_Array))
306 #ifndef _CRT_TERMINATE_DEFINED
307 #define _CRT_TERMINATE_DEFINED
308 __declspec(noreturn
) void __cdecl
exit(int _Code
);
309 _CRTIMP
__declspec(noreturn
) void __cdecl
_exit(int _Code
);
310 #if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
311 /* C99 function name */
312 void __cdecl
__declspec(noreturn
) _Exit(int); /* Declare to get noreturn attribute. */
313 __CRT_INLINE
void __cdecl
_Exit(int status
)
316 #if __MINGW_GNUC_PREREQ(4,4)
317 #pragma push_macro("abort")
320 void __cdecl
__declspec(noreturn
) abort(void);
321 #if __MINGW_GNUC_PREREQ(4,4)
322 #pragma pop_macro("abort")
326 _CRTIMP
unsigned int __cdecl
_set_abort_behavior(unsigned int _Flags
,unsigned int _Mask
);
328 #ifndef _CRT_ABS_DEFINED
329 #define _CRT_ABS_DEFINED
330 int __cdecl
abs(int _X
);
331 long __cdecl
labs(long _X
);
334 #if _INTEGRAL_MAX_BITS >= 64
335 __int64 __cdecl
_abs64(__int64
);
337 int __cdecl
atexit(void (__cdecl
*)(void));
338 #ifndef _CRT_ATOF_DEFINED
339 #define _CRT_ATOF_DEFINED
340 double __cdecl
atof(const char *_String
);
341 double __cdecl
_atof_l(const char *_String
,_locale_t _Locale
);
343 int __cdecl
atoi(const char *_Str
);
344 _CRTIMP
int __cdecl
_atoi_l(const char *_Str
,_locale_t _Locale
);
345 long __cdecl
atol(const char *_Str
);
346 _CRTIMP
long __cdecl
_atol_l(const char *_Str
,_locale_t _Locale
);
347 #ifndef _CRT_ALGO_DEFINED
348 #define _CRT_ALGO_DEFINED
349 void *__cdecl
bsearch(const void *_Key
,const void *_Base
,size_t _NumOfElements
,size_t _SizeOfElements
,int (__cdecl
*_PtFuncCompare
)(const void *,const void *));
350 void __cdecl
qsort(void *_Base
,size_t _NumOfElements
,size_t _SizeOfElements
,int (__cdecl
*_PtFuncCompare
)(const void *,const void *));
352 /*unsigned short __cdecl _byteswap_ushort(unsigned short _Short); */
353 /*unsigned long __cdecl _byteswap_ulong (unsigned long _Long); */
354 #if _INTEGRAL_MAX_BITS >= 64
355 /*unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 _Int64);*/
357 div_t __cdecl
div(int _Numerator
,int _Denominator
);
358 char *__cdecl
getenv(const char *_VarName
);
359 _CRTIMP
char *__cdecl
_itoa(int _Value
,char *_Dest
,int _Radix
);
360 /* #if _INTEGRAL_MAX_BITS >= 64 */
361 _CRTIMP
char *__cdecl
_i64toa(__int64 _Val
,char *_DstBuf
,int _Radix
);
362 _CRTIMP
char *__cdecl
_ui64toa(unsigned __int64 _Val
,char *_DstBuf
,int _Radix
);
363 _CRTIMP __int64 __cdecl
_atoi64(const char *_String
);
364 _CRTIMP __int64 __cdecl
_atoi64_l(const char *_String
,_locale_t _Locale
);
365 _CRTIMP __int64 __cdecl
_strtoi64(const char *_String
,char **_EndPtr
,int _Radix
);
366 _CRTIMP __int64 __cdecl
_strtoi64_l(const char *_String
,char **_EndPtr
,int _Radix
,_locale_t _Locale
);
367 _CRTIMP
unsigned __int64 __cdecl
_strtoui64(const char *_String
,char **_EndPtr
,int _Radix
);
368 _CRTIMP
unsigned __int64 __cdecl
_strtoui64_l(const char *_String
,char **_EndPtr
,int _Radix
,_locale_t _Locale
);
370 ldiv_t __cdecl
ldiv(long _Numerator
,long _Denominator
);
371 _CRTIMP
char *__cdecl
_ltoa(long _Value
,char *_Dest
,int _Radix
);
372 int __cdecl
mblen(const char *_Ch
,size_t _MaxCount
);
373 _CRTIMP
int __cdecl
_mblen_l(const char *_Ch
,size_t _MaxCount
,_locale_t _Locale
);
374 _CRTIMP
size_t __cdecl
_mbstrlen(const char *_Str
);
375 _CRTIMP
size_t __cdecl
_mbstrlen_l(const char *_Str
,_locale_t _Locale
);
376 _CRTIMP
size_t __cdecl
_mbstrnlen(const char *_Str
,size_t _MaxCount
);
377 _CRTIMP
size_t __cdecl
_mbstrnlen_l(const char *_Str
,size_t _MaxCount
,_locale_t _Locale
);
378 int __cdecl
mbtowc(wchar_t *_DstCh
,const char *_SrcCh
,size_t _SrcSizeInBytes
);
379 _CRTIMP
int __cdecl
_mbtowc_l(wchar_t *_DstCh
,const char *_SrcCh
,size_t _SrcSizeInBytes
,_locale_t _Locale
);
380 size_t __cdecl
mbstowcs(wchar_t *_Dest
,const char *_Source
,size_t _MaxCount
);
381 _CRTIMP
size_t __cdecl
_mbstowcs_l(wchar_t *_Dest
,const char *_Source
,size_t _MaxCount
,_locale_t _Locale
);
382 int __cdecl
rand(void);
383 _CRTIMP
int __cdecl
_set_error_mode(int _Mode
);
384 void __cdecl
srand(unsigned int _Seed
);
385 double __cdecl
strtod(const char *_Str
,char **_EndPtr
);
386 float __cdecl
strtof(const char *nptr
, char **endptr
);
387 #if !defined __NO_ISOCEXT /* in libmingwex.a */
388 float __cdecl
strtof (const char * __restrict__
, char ** __restrict__
);
389 long double __cdecl
strtold(const char * __restrict__
, char ** __restrict__
);
390 #endif /* __NO_ISOCEXT */
391 _CRTIMP
double __cdecl
_strtod_l(const char *_Str
,char **_EndPtr
,_locale_t _Locale
);
392 long __cdecl
strtol(const char *_Str
,char **_EndPtr
,int _Radix
);
393 _CRTIMP
long __cdecl
_strtol_l(const char *_Str
,char **_EndPtr
,int _Radix
,_locale_t _Locale
);
394 unsigned long __cdecl
strtoul(const char *_Str
,char **_EndPtr
,int _Radix
);
395 _CRTIMP
unsigned long __cdecl
_strtoul_l(const char *_Str
,char **_EndPtr
,int _Radix
,_locale_t _Locale
);
396 #ifndef _CRT_SYSTEM_DEFINED
397 #define _CRT_SYSTEM_DEFINED
398 int __cdecl
system(const char *_Command
);
400 _CRTIMP
char *__cdecl
_ultoa(unsigned long _Value
,char *_Dest
,int _Radix
);
401 int __cdecl
wctomb(char *_MbCh
,wchar_t _WCh
);
402 _CRTIMP
int __cdecl
_wctomb_l(char *_MbCh
,wchar_t _WCh
,_locale_t _Locale
);
403 size_t __cdecl
wcstombs(char *_Dest
,const wchar_t *_Source
,size_t _MaxCount
);
404 _CRTIMP
size_t __cdecl
_wcstombs_l(char *_Dest
,const wchar_t *_Source
,size_t _MaxCount
,_locale_t _Locale
);
406 #ifndef _CRT_ALLOCATION_DEFINED
407 #define _CRT_ALLOCATION_DEFINED
408 void *__cdecl
calloc(size_t _NumOfElements
,size_t _SizeOfElements
);
409 void __cdecl
free(void *_Memory
);
410 void *__cdecl
malloc(size_t _Size
);
411 void *__cdecl
realloc(void *_Memory
,size_t _NewSize
);
412 _CRTIMP
void *__cdecl
_recalloc(void *_Memory
,size_t _Count
,size_t _Size
);
413 //_CRTIMP void __cdecl _aligned_free(void *_Memory);
414 //_CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment);
415 _CRTIMP
void *__cdecl
_aligned_offset_malloc(size_t _Size
,size_t _Alignment
,size_t _Offset
);
416 _CRTIMP
void *__cdecl
_aligned_realloc(void *_Memory
,size_t _Size
,size_t _Alignment
);
417 _CRTIMP
void *__cdecl
_aligned_recalloc(void *_Memory
,size_t _Count
,size_t _Size
,size_t _Alignment
);
418 _CRTIMP
void *__cdecl
_aligned_offset_realloc(void *_Memory
,size_t _Size
,size_t _Alignment
,size_t _Offset
);
419 _CRTIMP
void *__cdecl
_aligned_offset_recalloc(void *_Memory
,size_t _Count
,size_t _Size
,size_t _Alignment
,size_t _Offset
);
422 #ifndef _WSTDLIB_DEFINED
423 #define _WSTDLIB_DEFINED
425 _CRTIMP
wchar_t *__cdecl
_itow(int _Value
,wchar_t *_Dest
,int _Radix
);
426 _CRTIMP
wchar_t *__cdecl
_ltow(long _Value
,wchar_t *_Dest
,int _Radix
);
427 _CRTIMP
wchar_t *__cdecl
_ultow(unsigned long _Value
,wchar_t *_Dest
,int _Radix
);
428 double __cdecl
wcstod(const wchar_t *_Str
,wchar_t **_EndPtr
);
429 float __cdecl
wcstof(const wchar_t *nptr
, wchar_t **endptr
);
430 #if !defined __NO_ISOCEXT /* in libmingwex.a */
431 float __cdecl
wcstof( const wchar_t * __restrict__
, wchar_t ** __restrict__
);
432 long double __cdecl
wcstold(const wchar_t * __restrict__
, wchar_t ** __restrict__
);
433 #endif /* __NO_ISOCEXT */
434 _CRTIMP
double __cdecl
_wcstod_l(const wchar_t *_Str
,wchar_t **_EndPtr
,_locale_t _Locale
);
435 long __cdecl
wcstol(const wchar_t *_Str
,wchar_t **_EndPtr
,int _Radix
);
436 _CRTIMP
long __cdecl
_wcstol_l(const wchar_t *_Str
,wchar_t **_EndPtr
,int _Radix
,_locale_t _Locale
);
437 unsigned long __cdecl
wcstoul(const wchar_t *_Str
,wchar_t **_EndPtr
,int _Radix
);
438 _CRTIMP
unsigned long __cdecl
_wcstoul_l(const wchar_t *_Str
,wchar_t **_EndPtr
,int _Radix
,_locale_t _Locale
);
439 _CRTIMP
wchar_t *__cdecl
_wgetenv(const wchar_t *_VarName
);
440 #ifndef _CRT_WSYSTEM_DEFINED
441 #define _CRT_WSYSTEM_DEFINED
442 _CRTIMP
int __cdecl
_wsystem(const wchar_t *_Command
);
444 _CRTIMP
double __cdecl
_wtof(const wchar_t *_Str
);
445 _CRTIMP
double __cdecl
_wtof_l(const wchar_t *_Str
,_locale_t _Locale
);
446 _CRTIMP
int __cdecl
_wtoi(const wchar_t *_Str
);
447 _CRTIMP
int __cdecl
_wtoi_l(const wchar_t *_Str
,_locale_t _Locale
);
448 _CRTIMP
long __cdecl
_wtol(const wchar_t *_Str
);
449 _CRTIMP
long __cdecl
_wtol_l(const wchar_t *_Str
,_locale_t _Locale
);
451 /* #if _INTEGRAL_MAX_BITS >= 64 */
452 _CRTIMP
wchar_t *__cdecl
_i64tow(__int64 _Val
,wchar_t *_DstBuf
,int _Radix
);
453 _CRTIMP
wchar_t *__cdecl
_ui64tow(unsigned __int64 _Val
,wchar_t *_DstBuf
,int _Radix
);
454 _CRTIMP __int64 __cdecl
_wtoi64(const wchar_t *_Str
);
455 _CRTIMP __int64 __cdecl
_wtoi64_l(const wchar_t *_Str
,_locale_t _Locale
);
456 _CRTIMP __int64 __cdecl
_wcstoi64(const wchar_t *_Str
,wchar_t **_EndPtr
,int _Radix
);
457 _CRTIMP __int64 __cdecl
_wcstoi64_l(const wchar_t *_Str
,wchar_t **_EndPtr
,int _Radix
,_locale_t _Locale
);
458 _CRTIMP
unsigned __int64 __cdecl
_wcstoui64(const wchar_t *_Str
,wchar_t **_EndPtr
,int _Radix
);
459 _CRTIMP
unsigned __int64 __cdecl
_wcstoui64_l(const wchar_t *_Str
,wchar_t **_EndPtr
,int _Radix
,_locale_t _Locale
);
464 #define _CVTBUFSIZE (309+40)
465 _CRTIMP
char *__cdecl
_fullpath(char *_FullPath
,const char *_Path
,size_t _SizeInBytes
);
466 _CRTIMP
char *__cdecl
_ecvt(double _Val
,int _NumOfDigits
,int *_PtDec
,int *_PtSign
);
467 _CRTIMP
char *__cdecl
_fcvt(double _Val
,int _NumOfDec
,int *_PtDec
,int *_PtSign
);
468 _CRTIMP
char *__cdecl
_gcvt(double _Val
,int _NumOfDigits
,char *_DstBuf
);
469 _CRTIMP
int __cdecl
_atodbl(_CRT_DOUBLE
*_Result
,char *_Str
);
470 _CRTIMP
int __cdecl
_atoldbl(_LDOUBLE
*_Result
,char *_Str
);
471 _CRTIMP
int __cdecl
_atoflt(_CRT_FLOAT
*_Result
,char *_Str
);
472 _CRTIMP
int __cdecl
_atodbl_l(_CRT_DOUBLE
*_Result
,char *_Str
,_locale_t _Locale
);
473 _CRTIMP
int __cdecl
_atoldbl_l(_LDOUBLE
*_Result
,char *_Str
,_locale_t _Locale
);
474 _CRTIMP
int __cdecl
_atoflt_l(_CRT_FLOAT
*_Result
,char *_Str
,_locale_t _Locale
);
475 _CRTIMP
unsigned long __cdecl __MINGW_NOTHROW
_lrotl(unsigned long, int) __MINGW_ATTRIB_CONST
;
476 _CRTIMP
unsigned long __cdecl __MINGW_NOTHROW
_lrotr(unsigned long, int) __MINGW_ATTRIB_CONST
;
477 _CRTIMP
void __cdecl
_makepath(char *_Path
,const char *_Drive
,const char *_Dir
,const char *_Filename
,const char *_Ext
);
478 _onexit_t __cdecl
_onexit(_onexit_t _Func
);
480 #ifndef _CRT_PERROR_DEFINED
481 #define _CRT_PERROR_DEFINED
482 void __cdecl
perror(const char *_ErrMsg
);
484 _CRTIMP
int __cdecl
_putenv(const char *_EnvString
);
485 //_CRTIMP unsigned int __cdecl _rotl(unsigned int, int) __MINGW_ATTRIB_CONST;
486 #if _INTEGRAL_MAX_BITS >= 64
487 //_CRTIMP unsigned __int64 __cdecl _rotl64(unsigned __int64, int) __MINGW_ATTRIB_CONST;
489 //_CRTIMP unsigned int __cdecl _rotr(unsigned int, int) __MINGW_ATTRIB_CONST;
490 #if _INTEGRAL_MAX_BITS >= 64
491 //_CRTIMP unsigned __int64 __cdecl _rotr64(unsigned __int64, int) __MINGW_ATTRIB_CONST;
493 _CRTIMP
void __cdecl
_searchenv(const char *_Filename
,const char *_EnvVar
,char *_ResultPath
);
494 _CRTIMP
void __cdecl
_splitpath(const char *_FullPath
,char *_Drive
,char *_Dir
,char *_Filename
,char *_Ext
);
495 _CRTIMP
void __cdecl
_swab(char *_Buf1
,char *_Buf2
,int _SizeInBytes
);
497 #ifndef _WSTDLIBP_DEFINED
498 #define _WSTDLIBP_DEFINED
499 _CRTIMP
wchar_t *__cdecl
_wfullpath(wchar_t *_FullPath
,const wchar_t *_Path
,size_t _SizeInWords
);
500 _CRTIMP
void __cdecl
_wmakepath(wchar_t *_ResultPath
,const wchar_t *_Drive
,const wchar_t *_Dir
,const wchar_t *_Filename
,const wchar_t *_Ext
);
501 #ifndef _CRT_WPERROR_DEFINED
502 #define _CRT_WPERROR_DEFINED
503 _CRTIMP
void __cdecl
_wperror(const wchar_t *_ErrMsg
);
505 _CRTIMP
int __cdecl
_wputenv(const wchar_t *_EnvString
);
506 _CRTIMP
void __cdecl
_wsearchenv(const wchar_t *_Filename
,const wchar_t *_EnvVar
,wchar_t *_ResultPath
);
507 _CRTIMP
void __cdecl
_wsplitpath(const wchar_t *_FullPath
,wchar_t *_Drive
,wchar_t *_Dir
,wchar_t *_Filename
,wchar_t *_Ext
);
510 _CRTIMP
void __cdecl
_beep(unsigned _Frequency
,unsigned _Duration
) __MINGW_ATTRIB_DEPRECATED
;
511 /* Not to be confused with _set_error_mode (int). */
512 _CRTIMP
void __cdecl
_seterrormode(int _Mode
) __MINGW_ATTRIB_DEPRECATED
;
513 _CRTIMP
void __cdecl
_sleep(unsigned long _Duration
) __MINGW_ATTRIB_DEPRECATED
;
522 #define max(a,b) (((a) > (b)) ? (a) : (b))
525 #define min(a,b) (((a) < (b)) ? (a) : (b))
531 #define sys_errlist (*_imp___sys_errlist)
532 #define sys_nerr (*_imp___sys_nerr)
533 #define environ _environ
534 char *__cdecl
ecvt(double _Val
,int _NumOfDigits
,int *_PtDec
,int *_PtSign
);
535 char *__cdecl
fcvt(double _Val
,int _NumOfDec
,int *_PtDec
,int *_PtSign
);
536 char *__cdecl
gcvt(double _Val
,int _NumOfDigits
,char *_DstBuf
);
537 char *__cdecl
itoa(int _Val
,char *_DstBuf
,int _Radix
);
538 char *__cdecl
ltoa(long _Val
,char *_DstBuf
,int _Radix
);
539 int __cdecl
putenv(const char *_EnvString
);
540 void __cdecl
swab(char *_Buf1
,char *_Buf2
,int _SizeInBytes
);
541 char *__cdecl
ultoa(unsigned long _Val
,char *_Dstbuf
,int _Radix
);
542 onexit_t __cdecl
onexit(onexit_t _Func
);
546 #if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
548 typedef struct { long long quot
, rem
; } lldiv_t
;
550 lldiv_t __cdecl
lldiv(long long, long long);
552 __CRT_INLINE
long long __cdecl
llabs(long long _j
) { return (_j
>= 0 ? _j
: -_j
); }
554 long long __cdecl
strtoll(const char* __restrict__
, char** __restrict
, int);
555 unsigned long long __cdecl
strtoull(const char* __restrict__
, char** __restrict__
, int);
557 /* these are stubs for MS _i64 versions */
558 long long __cdecl
atoll (const char *);
560 #ifndef __STRICT_ANSI__
561 long long __cdecl
wtoll (const wchar_t *);
562 char *__cdecl
lltoa (long long, char *, int);
563 char *__cdecl
ulltoa (unsigned long long , char *, int);
564 wchar_t *__cdecl
lltow (long long, wchar_t *, int);
565 wchar_t *__cdecl
ulltow (unsigned long long, wchar_t *, int);
566 #if _INTEGRAL_MAX_BITS >= 64
567 /* __CRT_INLINE using non-ansi functions */
568 __CRT_INLINE
long long __cdecl
atoll (const char * _c
) { return _atoi64 (_c
); }
569 __CRT_INLINE
char *__cdecl
lltoa (long long _n
, char * _c
, int _i
) { return _i64toa (_n
, _c
, _i
); }
570 __CRT_INLINE
char *__cdecl
ulltoa (unsigned long long _n
, char * _c
, int _i
) { return _ui64toa (_n
, _c
, _i
); }
571 __CRT_INLINE
long long __cdecl
wtoll (const wchar_t * _w
) { return _wtoi64 (_w
); }
572 __CRT_INLINE
wchar_t *__cdecl
lltow (long long _n
, wchar_t * _w
, int _i
) { return _i64tow (_n
, _w
, _i
); }
573 __CRT_INLINE
wchar_t *__cdecl
ulltow (unsigned long long _n
, wchar_t * _w
, int _i
) { return _ui64tow (_n
, _w
, _i
); }
574 #endif /* (__STRICT_ANSI__) */
576 #endif /* !__NO_ISOCEXT */
584 #include <sec_api/stdlib_s.h>