14 #define _CRTALLOC(x) __attribute__ ((section (x) ))
16 #pragma pack(push,_CRT_PACKING)
18 typedef void (__cdecl
*_PVFV
)(void);
19 typedef int (__cdecl
*_PIFV
)(void);
20 typedef void (__cdecl
*_PVFI
)(int);
22 #if defined (SPECIAL_CRTEXE) && defined (_DLL)
25 _CRTIMP
extern int _commode
;
28 #define __IOINFO_TM_ANSI 0
29 #define __IOINFO_TM_UTF8 1
30 #define __IOINFO_TM_UTF16LE 2
37 CRITICAL_SECTION lock
;
43 #define IOINFO_ARRAY_ELTS (1 << 5)
45 #define _pioinfo(i) (__pioinfo[(i) >> 5] + ((i) & (IOINFO_ARRAY_ELTS - 1)))
46 #define _osfile(i) (_pioinfo(i)->osfile)
47 #define _pipech2(i) (_pioinfo(i)->pipech2)
48 #define _textmode(i) (_pioinfo(i)->textmode)
49 #define _tm_unicode(i) (_pioinfo(i)->unicode)
50 #define _pioinfo_safe(i) ((((i) != -1) && ((i) != -2)) ? _pioinfo(i) : &__badioinfo)
51 #define _osfhnd_safe(i) (_pioinfo_safe(i)->osfhnd)
52 #define _osfile_safe(i) (_pioinfo_safe(i)->osfile)
53 #define _pipech_safe(i) (_pioinfo_safe(i)->pipech)
54 #define _pipech2_safe(i) (_pioinfo_safe(i)->pipech2)
55 #define _textmode_safe(i) (_pioinfo_safe(i)->textmode)
56 #define _tm_unicode_safe(i) (_pioinfo_safe(i)->unicode)
59 extern ioinfo
** _imp____badioinfo
[];
60 #define __badioinfo (*_imp____badioinfo)
64 extern ioinfo
** _imp____pioinfo
[];
65 #define __pioinfo (*_imp____pioinfo)
68 #define _NO_CONSOLE_FILENO (intptr_t)-2
82 typedef struct _iobuf
FILE;
85 #if !defined (_FILEX_DEFINED) && defined (_WINDOWS_)
86 #define _FILEX_DEFINED
89 CRITICAL_SECTION lock
;
93 extern int _dowildcard
;
97 extern wchar_t ***_imp____winitenv
;
98 #define __winitenv (*_imp____winitenv)
102 extern char ***_imp____initenv
;
103 #define __initenv (*_imp____initenv)
107 extern char **_imp___acmdln
;
108 #define _acmdln (*_imp___acmdln)
109 /* _CRTIMP extern char *_acmdln; */
113 extern char **_imp___wcmdln
;
114 #define _wcmdln (*_imp___wcmdln)
115 /* __CRTIMP extern wchar_t *_wcmdln; */
118 _CRTIMP
void __cdecl
_amsg_exit(int);
120 int __CRTDECL
_setargv(void);
121 int __CRTDECL
__setargv(void);
122 int __CRTDECL
_wsetargv(void);
123 int __CRTDECL
__wsetargv(void);
125 int __CRTDECL
main(int _Argc
, char **_Argv
, char **_Env
);
126 int __CRTDECL
wmain(int _Argc
, wchar_t **_Argv
, wchar_t **_Env
);
128 #ifndef _STARTUP_INFO_DEFINED
129 #define _STARTUP_INFO_DEFINED
135 _CRTIMP
int __cdecl
__getmainargs(int * _Argc
, char *** _Argv
, char ***_Env
, int _DoWildCard
, _startupinfo
*_StartInfo
);
136 _CRTIMP
int __cdecl
__wgetmainargs(int * _Argc
, wchar_t ***_Argv
, wchar_t ***_Env
, int _DoWildCard
, _startupinfo
*_StartInfo
);
138 #define _CONSOLE_APP 1
141 typedef enum __enative_startup_state
{
142 __uninitialized
, __initializing
, __initialized
143 } __enative_startup_state
;
145 extern volatile __enative_startup_state __native_startup_state
;
146 extern volatile void *__native_startup_lock
;
148 extern volatile unsigned int __native_dllmain_reason
;
149 extern volatile unsigned int __native_vcclrit_reason
;
151 _CRTIMP
void __cdecl
__set_app_type (int);
153 typedef LONG NTSTATUS
;
158 void * __cdecl
_encode_pointer(void *);
159 void * __cdecl
_encoded_null();
160 void * __cdecl
_decode_pointer(void *);
162 BOOL __cdecl
_ValidateImageBase (PBYTE pImageBase
);
163 PIMAGE_SECTION_HEADER __cdecl
_FindPESection (PBYTE pImageBase
, DWORD_PTR rva
);
164 BOOL __cdecl
_IsNonwritableInCurrentImage (PBYTE pTarget
);