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.
19 #pragma pack(push,_CRT_PACKING)
21 #ifndef __INTERNAL_FUNC_DEFINED
22 #define __INTERNAL_FUNC_DEFINED
23 typedef void (__cdecl
*_PVFV
)(void);
24 typedef int (__cdecl
*_PIFV
)(void);
25 typedef void (__cdecl
*_PVFI
)(int);
28 #if defined (SPECIAL_CRTEXE) && (defined (_DLL) || defined (__GNUC__))
31 _CRTIMP
extern int _commode
;
34 #define __IOINFO_TM_ANSI 0
35 #define __IOINFO_TM_UTF8 1
36 #define __IOINFO_TM_UTF16LE 2
43 CRITICAL_SECTION lock
;
49 #define IOINFO_ARRAY_ELTS (1 << 5)
51 #define _pioinfo(i) (__pioinfo[(i) >> 5] + ((i) & (IOINFO_ARRAY_ELTS - 1)))
52 #define _osfile(i) (_pioinfo(i)->osfile)
53 #define _pipech2(i) (_pioinfo(i)->pipech2)
54 #define _textmode(i) (_pioinfo(i)->textmode)
55 #define _tm_unicode(i) (_pioinfo(i)->unicode)
56 #define _pioinfo_safe(i) ((((i) != -1) && ((i) != -2)) ? _pioinfo(i) : &__badioinfo)
57 #define _osfhnd_safe(i) (_pioinfo_safe(i)->osfhnd)
58 #define _osfile_safe(i) (_pioinfo_safe(i)->osfile)
59 #define _pipech_safe(i) (_pioinfo_safe(i)->pipech)
60 #define _pipech2_safe(i) (_pioinfo_safe(i)->pipech2)
61 #define _textmode_safe(i) (_pioinfo_safe(i)->textmode)
62 #define _tm_unicode_safe(i) (_pioinfo_safe(i)->unicode)
65 extern ioinfo
** __MINGW_IMP_SYMBOL(__badioinfo
)[];
66 #define __badioinfo (* __MINGW_IMP_SYMBOL(__badioinfo))
70 extern ioinfo
** __MINGW_IMP_SYMBOL(__pioinfo
)[];
71 #define __pioinfo (* __MINGW_IMP_SYMBOL(__pioinfo))
74 #define _NO_CONSOLE_FILENO (intptr_t)-2
88 typedef struct _iobuf
FILE;
91 #if !defined (_FILEX_DEFINED) && defined (_WINDOWS_)
92 #define _FILEX_DEFINED
95 CRITICAL_SECTION lock
;
99 extern int _dowildcard
;
103 extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv
);
104 #define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv))
108 extern char *** __MINGW_IMP_SYMBOL(__initenv
);
109 #define __initenv (* __MINGW_IMP_SYMBOL(__initenv))
113 extern char ** __MINGW_IMP_SYMBOL(_acmdln
);
114 #define _acmdln (* __MINGW_IMP_SYMBOL(_acmdln))
115 /* _CRTIMP extern char *_acmdln; */
119 extern char ** __MINGW_IMP_SYMBOL(_wcmdln
);
120 #define _wcmdln (* __MINGW_IMP_SYMBOL(_wcmdln))
121 /* __CRTIMP extern wchar_t *_wcmdln; */
124 _CRTIMP
void __cdecl
_amsg_exit(int);
126 int __CRTDECL
_setargv(void);
127 int __CRTDECL
__setargv(void);
128 int __CRTDECL
_wsetargv(void);
129 int __CRTDECL
__wsetargv(void);
131 int __CRTDECL
main(int _Argc
, char **_Argv
, char **_Env
);
132 int __CRTDECL
wmain(int _Argc
, wchar_t **_Argv
, wchar_t **_Env
);
134 #ifndef _STARTUP_INFO_DEFINED
135 #define _STARTUP_INFO_DEFINED
141 _CRTIMP
int __cdecl
__getmainargs(int * _Argc
, char *** _Argv
, char ***_Env
, int _DoWildCard
, _startupinfo
*_StartInfo
);
142 _CRTIMP
int __cdecl
__wgetmainargs(int * _Argc
, wchar_t ***_Argv
, wchar_t ***_Env
, int _DoWildCard
, _startupinfo
*_StartInfo
);
144 #define _CONSOLE_APP 1
147 typedef enum __enative_startup_state
{
148 __uninitialized
, __initializing
, __initialized
149 } __enative_startup_state
;
151 extern volatile __enative_startup_state __native_startup_state
;
152 extern volatile void *__native_startup_lock
;
154 extern volatile unsigned int __native_dllmain_reason
;
155 extern volatile unsigned int __native_vcclrit_reason
;
157 _CRTIMP
void __cdecl
__set_app_type (int);
159 typedef LONG NTSTATUS
;
164 void * __cdecl
_encode_pointer(void *);
165 void * __cdecl
_encoded_null();
166 void * __cdecl
_decode_pointer(void *);
168 BOOL __cdecl
_ValidateImageBase (PBYTE pImageBase
);
169 PIMAGE_SECTION_HEADER __cdecl
_FindPESection (PBYTE pImageBase
, DWORD_PTR rva
);
170 BOOL __cdecl
_IsNonwritableInCurrentImage (PBYTE pTarget
);