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.PD within this package.
24 __declspec(dllimport
) void __cdecl
__setusermatherr(int (__cdecl
*)(struct _exception
*));
25 #define __mingw_fprintf fprintf
26 #define __mingw_vfprintf vfprintf
29 #pragma pack(push,_CRT_PACKING)
31 #ifndef __INTERNAL_FUNC_DEFINED
32 #define __INTERNAL_FUNC_DEFINED
33 typedef void (__cdecl
*_PVFV
)(void);
34 typedef int (__cdecl
*_PIFV
)(void);
35 typedef void (__cdecl
*_PVFI
)(int);
38 #if defined (SPECIAL_CRTEXE) && (defined (_DLL) || defined (__GNUC__))
41 _CRTIMP
extern int _commode
;
44 #define __IOINFO_TM_ANSI 0
45 #define __IOINFO_TM_UTF8 1
46 #define __IOINFO_TM_UTF16LE 2
50 #pragma warning(disable:4214)
51 #pragma warning(disable:4820)
59 CRITICAL_SECTION lock
;
69 #define IOINFO_ARRAY_ELTS (1 << 5)
71 #define _pioinfo(i) (__pioinfo[(i) >> 5] + ((i) & (IOINFO_ARRAY_ELTS - 1)))
72 #define _osfile(i) (_pioinfo(i)->osfile)
73 #define _pipech2(i) (_pioinfo(i)->pipech2)
74 #define _textmode(i) (_pioinfo(i)->textmode)
75 #define _tm_unicode(i) (_pioinfo(i)->unicode)
76 #define _pioinfo_safe(i) ((((i) != -1) && ((i) != -2)) ? _pioinfo(i) : &__badioinfo)
77 #define _osfhnd_safe(i) (_pioinfo_safe(i)->osfhnd)
78 #define _osfile_safe(i) (_pioinfo_safe(i)->osfile)
79 #define _pipech_safe(i) (_pioinfo_safe(i)->pipech)
80 #define _pipech2_safe(i) (_pioinfo_safe(i)->pipech2)
81 #define _textmode_safe(i) (_pioinfo_safe(i)->textmode)
82 #define _tm_unicode_safe(i) (_pioinfo_safe(i)->unicode)
85 extern ioinfo
** __MINGW_IMP_SYMBOL(__badioinfo
)[];
86 #define __badioinfo (* __MINGW_IMP_SYMBOL(__badioinfo))
90 extern ioinfo
** __MINGW_IMP_SYMBOL(__pioinfo
)[];
91 #define __pioinfo (* __MINGW_IMP_SYMBOL(__pioinfo))
94 #define _NO_CONSOLE_FILENO (intptr_t)-2
108 typedef struct _iobuf
FILE;
111 #if !defined (_FILEX_DEFINED) && defined (_WINDOWS_)
112 #define _FILEX_DEFINED
115 CRITICAL_SECTION lock
;
119 extern int _dowildcard
;
123 extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv
);
124 #define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv))
128 extern char *** __MINGW_IMP_SYMBOL(__initenv
);
129 #define __initenv (* __MINGW_IMP_SYMBOL(__initenv))
133 extern char ** __MINGW_IMP_SYMBOL(_acmdln
);
134 #define _acmdln (* __MINGW_IMP_SYMBOL(_acmdln))
135 /* _CRTIMP extern char *_acmdln; */
139 extern char ** __MINGW_IMP_SYMBOL(_wcmdln
);
140 #define _wcmdln (* __MINGW_IMP_SYMBOL(_wcmdln))
141 /* __CRTIMP extern wchar_t *_wcmdln; */
144 _CRTIMP
__declspec(noreturn
) void __cdecl
_amsg_exit(int);
146 int __CRTDECL
_setargv(void);
147 int __CRTDECL
__setargv(void);
148 int __CRTDECL
_wsetargv(void);
149 int __CRTDECL
__wsetargv(void);
151 int __CRTDECL
main(int _Argc
, char **_Argv
, char **_Env
);
152 int __CRTDECL
wmain(int _Argc
, wchar_t **_Argv
, wchar_t **_Env
);
154 #ifndef _STARTUP_INFO_DEFINED
155 #define _STARTUP_INFO_DEFINED
161 _CRTIMP
int __cdecl
__getmainargs(int * _Argc
, char *** _Argv
, char ***_Env
, int _DoWildCard
, _startupinfo
*_StartInfo
);
162 _CRTIMP
int __cdecl
__wgetmainargs(int * _Argc
, wchar_t ***_Argv
, wchar_t ***_Env
, int _DoWildCard
, _startupinfo
*_StartInfo
);
164 #define _CONSOLE_APP 1
167 typedef enum __enative_startup_state
{
168 __uninitialized
= 0, __initializing
, __initialized
169 } __enative_startup_state
;
171 extern volatile __enative_startup_state __native_startup_state
;
172 extern volatile void *__native_startup_lock
;
174 extern volatile unsigned int __native_dllmain_reason
;
175 extern volatile unsigned int __native_vcclrit_reason
;
177 _CRTIMP
void __cdecl
__set_app_type (int);
179 typedef LONG NTSTATUS
;
184 void * __cdecl
_encode_pointer(void *);
185 void * __cdecl
_encoded_null();
186 void * __cdecl
_decode_pointer(void *);
188 BOOL __cdecl
_ValidateImageBase (PBYTE pImageBase
);
189 PIMAGE_SECTION_HEADER __cdecl
_FindPESection (PBYTE pImageBase
, DWORD_PTR rva
);
190 BOOL __cdecl
_IsNonwritableInCurrentImage (PBYTE pTarget
);