ReactOS  0.4.14-dev-50-g13bb5e2
crtexe.c File Reference
#include <oscalls.h>
#include <internal.h>
#include <process.h>
#include <signal.h>
#include <math.h>
#include <stdlib.h>
#include <tchar.h>
#include <sect_attribs.h>
#include <locale.h>
Include dependency graph for crtexe.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _DLL
 
#define SPECIAL_CRTEXE
 
#define __winitenv   (* __MINGW_IMP_SYMBOL(__winitenv))
 
#define __initenv   (* __MINGW_IMP_SYMBOL(__initenv))
 
#define SPACECHAR   _T(' ')
 
#define DQUOTECHAR   _T('\"')
 
#define _commode   (* __MINGW_IMP_SYMBOL(_commode))
 
#define __UNUSED_PARAM_1   __UNUSED_PARAM
 

Functions

wchar_t *** __MINGW_IMP_SYMBOL (__winitenv)
 
char *** __MINGW_IMP_SYMBOL (__initenv)
 
void __cdecl _fpreset (void)
 
int__MINGW_IMP_SYMBOL (_fmode)
 
int__MINGW_IMP_SYMBOL (_commode)
 
_CRTIMP void __cdecl _initterm (_PVFV *, _PVFV *)
 
static int __cdecl check_managed_app (void)
 
 _CRTALLOC (".CRT$XIA")
 
static void __cdecl pre_cpp_init (void)
 
static int __cdecl __tmainCRTStartup (void)
 
int __cdecl WinMainCRTStartup (void)
 
int __cdecl mainCRTStartup (void)
 
static __declspec (noinline)
 
static void duplicate_ppstrings (int ac, char ***av)
 
static void __cdecl __mingw_invalidParameterHandler (const wchar_t *__UNUSED_PARAM_1(expression), const wchar_t *__UNUSED_PARAM_1(function), const wchar_t *__UNUSED_PARAM_1(file), unsigned int __UNUSED_PARAM_1(line), uintptr_t __UNUSED_PARAM(pReserved))
 
HANDLE __mingw_get_msvcrt_handle (void)
 
static void __cdecl __mingw_prepare_except_for_msvcr80_and_higher (void)
 

Variables

IMAGE_DOS_HEADER __ImageBase
 
int _fmode
 
int _dowildcard
 
int mingw_initltsdrot_force
 
int mingw_initltsdyn_force
 
int mingw_initltssuo_force
 
int mingw_initcharmax
 

Macro Definition Documentation

◆ __initenv

#define __initenv   (* __MINGW_IMP_SYMBOL(__initenv))

Definition at line 34 of file crtexe.c.

◆ __UNUSED_PARAM_1

#define __UNUSED_PARAM_1   __UNUSED_PARAM

Definition at line 416 of file crtexe.c.

◆ __winitenv

#define __winitenv   (* __MINGW_IMP_SYMBOL(__winitenv))

Definition at line 29 of file crtexe.c.

◆ _commode

#define _commode   (* __MINGW_IMP_SYMBOL(_commode))

Definition at line 55 of file crtexe.c.

◆ _DLL

#define _DLL

This file has no copyright assigned and is placed in the Public Domain. This file is part of the w64 mingw-runtime package. No warranty is given; refer to the file DISCLAIMER.PD within this package.

Definition at line 9 of file crtexe.c.

◆ DQUOTECHAR

#define DQUOTECHAR   _T('\"')

Definition at line 47 of file crtexe.c.

◆ SPACECHAR

#define SPACECHAR   _T(' ')

Definition at line 46 of file crtexe.c.

◆ SPECIAL_CRTEXE

#define SPECIAL_CRTEXE

Definition at line 12 of file crtexe.c.

Function Documentation

◆ __declspec()

static __declspec ( noinline  )
static

Definition at line 209 of file crtexe.c.

212 {
213  _TCHAR *lpszCommandLine = NULL;
214  STARTUPINFO StartupInfo;
215  WINBOOL inDoubleQuote = FALSE;
216  memset (&StartupInfo, 0, sizeof (STARTUPINFO));
217 
218 #ifndef _WIN64
219  /* We need to make sure that this function is build with frame-pointer
220  and that we align the stack to 16 bytes for the sake of SSE ops in main
221  or in functions inlined into main. */
222  lpszCommandLine = (_TCHAR *) alloca (32);
223  memset (lpszCommandLine, 0xcc, 32);
224 #ifdef __GNUC__
225  asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
226 #endif
227 #endif
228 
229  if (mingw_app_type)
230  GetStartupInfo (&StartupInfo);
231  {
232  void *lock_free = NULL;
233  void *fiberid = ((PNT_TIB)NtCurrentTeb())->StackBase;
234  int nested = FALSE;
235  while((lock_free = InterlockedCompareExchangePointer ((volatile PVOID *) &__native_startup_lock,
236  fiberid, 0)) != 0)
237  {
238  if (lock_free == fiberid)
239  {
240  nested = TRUE;
241  break;
242  }
243  Sleep(1000);
244  }
246  {
247  _amsg_exit (31);
248  }
250  {
252  _initterm ((_PVFV *)(void *)__xi_a, (_PVFV *)(void *) __xi_z);
253  }
254  else
255  has_cctor = 1;
256 
258  {
259  _initterm (__xc_a, __xc_z);
261  }
263  if (! nested)
265 
268 
271 #ifdef _WIN64
273 #endif
275 
276  _fpreset ();
277 
278  if (mingw_app_type)
279  {
280 #ifdef WPRFLAG
281  lpszCommandLine = (_TCHAR *) _wcmdln;
282 #else
283  lpszCommandLine = (char *) _acmdln;
284 #endif
285  while (*lpszCommandLine > SPACECHAR || (*lpszCommandLine && inDoubleQuote))
286  {
287  if (*lpszCommandLine == DQUOTECHAR)
288  inDoubleQuote = !inDoubleQuote;
289 #ifdef _MBCS
290  if (_ismbblead (*lpszCommandLine))
291  {
292  if (lpszCommandLine) /* FIXME: Why this check? Should I check for *lpszCommandLine != 0 too? */
293  lpszCommandLine++;
294  }
295 #endif
296  ++lpszCommandLine;
297  }
298  while (*lpszCommandLine && (*lpszCommandLine <= SPACECHAR))
299  lpszCommandLine++;
300 
302  __mingw_winmain_lpCmdLine = lpszCommandLine;
304  StartupInfo.wShowWindow : SW_SHOWDEFAULT;
305  }
307  __main ();
308 #ifdef WPRFLAG
309  __winitenv = envp;
310  /* C++ initialization.
311  gcc inserts this call automatically for a function called main, but not for wmain. */
312  mainret = wmain (argc, argv, envp);
313 #else
314  __initenv = envp;
315  mainret = main (argc, argv, envp);
316 #endif
317  if (!managedapp)
318  exit (mainret);
319 
320  if (has_cctor == 0)
321  _cexit ();
322  }
323  return mainret;
324 }
int mingw_app_type
Definition: mingw_helpers.c:31
#define __initenv
Definition: crtexe.c:34
static int argc
Definition: ServiceArgs.c:12
#define SW_SHOWDEFAULT
Definition: winuser.h:774
void(__cdecl * _PVFV)(void)
Definition: internal.h:33
#define TRUE
Definition: types.h:120
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
static void duplicate_ppstrings(int ac, char ***av)
Definition: crtexe.c:395
void __main(void)
Definition: gccmain.c:53
void _pei386_runtime_relocator(void)
Definition: mscmain.c:23
int wmain(int argc, WCHAR **argv)
Definition: at.c:753
void __cdecl _fpreset(void)
Definition: fpreset.c:13
#define SPACECHAR
Definition: crtexe.c:46
#define DLL_THREAD_ATTACH
Definition: compat.h:121
int main(int argc, char *argv[])
Definition: atactl.cpp:1685
volatile __enative_startup_state __native_startup_state
Definition: natstart.c:13
_CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *)
Definition: initterm.c:10
DWORD dwFlags
Definition: winbase.h:807
long CALLBACK _gnu_exception_handler(EXCEPTION_POINTERS *exception_data)
Definition: crt_handler.c:196
static void __cdecl __mingw_prepare_except_for_msvcr80_and_higher(void)
Definition: crtexe.c:434
#define argv
Definition: mplay32.c:18
#define alloca
Definition: malloc.h:361
void __cdecl _amsg_exit(int errnum)
Definition: amsg.c:47
DWORD __mingw_winmain_nShowCmd
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI DECLSPEC_HOTPATCH SetUnhandledExceptionFilter(IN LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter)
Definition: except.c:792
__analysis_noreturn _CRTIMP void __cdecl _cexit(void)
Definition: _exit.c:7
LPTOP_LEVEL_EXCEPTION_FILTER __mingw_oldexcpt_handler
Definition: crt_handler.c:188
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
smooth NULL
Definition: ftsmooth.c:416
#define _ASSERTE(expr)
Definition: crtdbg.h:105
#define STARTF_USESHOWWINDOW
Definition: winbase.h:472
char _TCHAR
Definition: tchar.h:1392
#define InterlockedExchangePointer(Target, Value)
Definition: dshow.h:45
int32_t WINBOOL
Definition: typedefs.h:56
struct _NT_TIB * PNT_TIB
HINSTANCE __mingw_winmain_hInstance
IMAGE_DOS_HEADER __ImageBase
Definition: mstscax.cpp:17
HANDLE HINSTANCE
Definition: typedefs.h:75
#define VOID
Definition: acefi.h:82
const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback
Definition: tlssup.c:117
#define _acmdln
Definition: internal.h:134
LPSTR __mingw_winmain_lpCmdLine
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define __winitenv
Definition: crtexe.c:29
WORD wShowWindow
Definition: winbase.h:808
int __cdecl _ismbblead(unsigned int)
Definition: ismblead.c:20
#define _wcmdln
Definition: internal.h:140
#define DQUOTECHAR
Definition: crtexe.c:47
#define GetStartupInfo
Definition: winbase.h:3658
void exit(int exitcode)
Definition: _exit.c:33
#define memset(x, y, z)
Definition: compat.h:39
int __mingw_init_ehandler(void)
Definition: mscmain.c:27
volatile void * __native_startup_lock
Definition: natstart.c:14

◆ __mingw_get_msvcrt_handle()

HMODULE __mingw_get_msvcrt_handle ( void  )

Definition at line 236 of file pesect.c.

237 {
238  static HANDLE msvcrt_handle;
239 
240  if(!msvcrt_handle) {
241  const char *lib_name;
242  int i = 0;
243 
244  while ((lib_name = __mingw_enum_import_library_names (i++))) {
245  if((lib_name[0] == 'm' || lib_name[0] == 'M')
246  && (lib_name[1] == 's' || lib_name[1] == 'S')
247  && (lib_name[2] == 'v' || lib_name[2] == 'V')
248  && (lib_name[3] == 'c' || lib_name[3] == 'C')
249  && (lib_name[4] == 'r' || lib_name[4] == 'R')
250  && (lib_name[5] == 't' || lib_name[5] == 'T' || ('0' <= lib_name[5] && lib_name[5] <= '9')))
251  break;
252  }
253 
254  if(lib_name)
255  msvcrt_handle = GetModuleHandleA(lib_name);
256  if(!msvcrt_handle)
257  msvcrt_handle = LoadLibraryW(L"msvcrt.dll");
258  }
259 
260  return msvcrt_handle;
261 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define LoadLibraryW(x)
Definition: compat.h:404
static const WCHAR L[]
Definition: oid.c:1250
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
const char * __mingw_enum_import_library_names(int)
Definition: pesect.c:195

Referenced by __mingw_prepare_except_for_msvcr80_and_higher().

◆ __MINGW_IMP_SYMBOL() [1/4]

wchar_t*** __MINGW_IMP_SYMBOL ( __winitenv  )

◆ __MINGW_IMP_SYMBOL() [2/4]

char*** __MINGW_IMP_SYMBOL ( __initenv  )

◆ __MINGW_IMP_SYMBOL() [3/4]

int* __MINGW_IMP_SYMBOL ( _fmode  )

◆ __MINGW_IMP_SYMBOL() [4/4]

int * __MINGW_IMP_SYMBOL ( _commode  )

◆ __mingw_invalidParameterHandler()

static void __cdecl __mingw_invalidParameterHandler ( const wchar_t __UNUSED_PARAM_1expression,
const wchar_t __UNUSED_PARAM_1function,
const wchar_t __UNUSED_PARAM_1file,
unsigned int   __UNUSED_PARAM_1line,
uintptr_t   __UNUSED_PARAMpReserved 
)
static

Definition at line 419 of file crtexe.c.

424 {
425 #ifdef __MINGW_SHOW_INVALID_PARAMETER_EXCEPTION
426  wprintf(L"Invalid parameter detected in function %s. File: %s Line: %u\n", function, file, line);
427  wprintf(L"Expression: %s\n", expression);
428 #endif
429 }
#define wprintf(...)
Definition: whoami.c:18
Definition: parser.c:48
static const WCHAR L[]
Definition: oid.c:1250
Definition: fci.c:126

Referenced by __mingw_prepare_except_for_msvcr80_and_higher().

◆ __mingw_prepare_except_for_msvcr80_and_higher()

static void __cdecl __mingw_prepare_except_for_msvcr80_and_higher ( void  )
static

Definition at line 434 of file crtexe.c.

435 {
437 
438  fIPH = (void*)GetProcAddress (__mingw_get_msvcrt_handle(), "_set_invalid_parameter_handler");
439  if (fIPH)
441 }
HANDLE __mingw_get_msvcrt_handle(void)
Definition: pesect.c:236
smooth NULL
Definition: ftsmooth.c:416
static void __cdecl __mingw_invalidParameterHandler(const wchar_t *__UNUSED_PARAM_1(expression), const wchar_t *__UNUSED_PARAM_1(function), const wchar_t *__UNUSED_PARAM_1(file), unsigned int __UNUSED_PARAM_1(line), uintptr_t __UNUSED_PARAM(pReserved))
Definition: crtexe.c:419
void(__cdecl * _invalid_parameter_handler)(const wchar_t *, const wchar_t *, const wchar_t *, unsigned int, uintptr_t)
Definition: stdlib.h:137
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by __declspec().

◆ __tmainCRTStartup()

static int __cdecl __tmainCRTStartup ( void  )
static

◆ _CRTALLOC()

_CRTALLOC ( ".CRT$XIA"  )

Definition at line 62 of file crtexe.c.

114 {
115  managedapp = check_managed_app ();
116  if (mingw_app_type)
118  else
121 
124 
125 #ifdef WPRFLAG
126  _wsetargv();
127 #else
128  _setargv();
129 #endif
131  {
133  }
134 #ifndef __clang__ /* FIXME: CORE-14042 */
135  if (__globallocalestatus == -1)
136  {
137  }
138 #endif
139  return 0;
140 }
#define _commode
Definition: crtexe.c:55
int mingw_app_type
Definition: mingw_helpers.c:31
int __globallocalestatus
int _MINGW_INSTALL_DEBUG_MATHERR
Definition: reactos.c:2
void(__cdecl * _PVFV)(void)
Definition: internal.h:33
void *__cdecl _encode_pointer(void *)
Definition: mingw_helpers.c:25
void CDECL __setusermatherr(MSVCRT_matherr_func func)
Definition: matherr.c:45
_PVFV * __onexitbegin
Definition: atonexit.c:24
_PVFV * __onexitend
Definition: atonexit.c:25
int __CRTDECL _setargv(void)
Definition: dllargv.c:18
_CRTIMP void __cdecl __set_app_type(int)
Definition: environ.c:360
static int __cdecl check_managed_app(void)
Definition: crtexe.c:332
wchar_t *** __MINGW_IMP_SYMBOL(__winitenv)
int _fmode
Definition: txtmode.c:13
int __CRTDECL _matherr(_Inout_ struct _exception *exception)
#define _CONSOLE_APP
Definition: internal.h:164
int __CRTDECL _wsetargv(void)
#define _GUI_APP
Definition: internal.h:165

◆ _fpreset()

void __cdecl _fpreset ( void  )

Definition at line 13 of file fpreset.c.

14 {
15  const unsigned short x86_cw = 0x27f;
16 #ifdef _MSC_VER
17  __asm { fninit }
18  __asm { fldcw [x86_cw] }
19 #else
20  __asm__ __volatile__( "fninit; fldcw %0" : : "m" (x86_cw) );
21 #endif
23  {
24  const unsigned long sse2_cw = 0x1f80;
25 #ifdef _MSC_VER
26  __asm { ldmxcsr [sse2_cw] }
27 #else
28  __asm__ __volatile__( "ldmxcsr %0" : : "m" (sse2_cw) );
29 #endif
30  }
31 }
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
BOOL WINAPI IsProcessorFeaturePresent(IN DWORD ProcessorFeature)
Definition: sysinfo.c:168
#define PF_XMMI64_INSTRUCTIONS_AVAILABLE

Referenced by __declspec().

◆ _initterm()

_CRTIMP void __cdecl _initterm ( _PVFV ,
_PVFV  
)

Definition at line 10 of file initterm.c.

11 {
13 
14  TRACE("(%p,%p)\n",start,end);
15  while (current<end)
16  {
17  if (*current)
18  {
19  TRACE("Call init function %p\n",*current);
20  (**current)();
21  TRACE("returned\n");
22  }
23  current++;
24  }
25 }
GLuint GLuint end
Definition: gl.h:1545
#define TRACE(s)
Definition: solgame.cpp:4
void(CDECL * _INITTERMFUN)(void)
Definition: initterm.c:3
GLuint start
Definition: gl.h:1545
struct task_struct * current
Definition: linux.c:32

Referenced by __declspec().

◆ check_managed_app()

static int __cdecl check_managed_app ( void  )
static

Definition at line 332 of file crtexe.c.

333 {
334  PIMAGE_DOS_HEADER pDOSHeader;
335  PIMAGE_NT_HEADERS pPEHeader;
336  PIMAGE_OPTIONAL_HEADER32 pNTHeader32;
337  PIMAGE_OPTIONAL_HEADER64 pNTHeader64;
338 
339  /* Force to be linked. */
344 
345  pDOSHeader = (PIMAGE_DOS_HEADER) &__ImageBase;
346  if (pDOSHeader->e_magic != IMAGE_DOS_SIGNATURE)
347  return 0;
348 
349  pPEHeader = (PIMAGE_NT_HEADERS)((char *)pDOSHeader + pDOSHeader->e_lfanew);
350  if (pPEHeader->Signature != IMAGE_NT_SIGNATURE)
351  return 0;
352 
353  pNTHeader32 = (PIMAGE_OPTIONAL_HEADER32) &pPEHeader->OptionalHeader;
354  switch (pNTHeader32->Magic)
355  {
358  return 0;
361  pNTHeader64 = (PIMAGE_OPTIONAL_HEADER64)pNTHeader32;
363  return 0;
365  }
366  return 0;
367 }
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]
Definition: ntddk_ex.h:178
int mingw_initltssuo_force
#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
Definition: ntimage.h:489
#define IMAGE_NT_OPTIONAL_HDR32_MAGIC
Definition: ntimage.h:376
PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS
Definition: ntddk_ex.h:187
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
#define IMAGE_DOS_SIGNATURE
Definition: pedump.c:89
int mingw_initcharmax
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
switch(r->id)
Definition: btrfs.c:2932
#define IMAGE_NT_SIGNATURE
Definition: pedump.c:93
#define IMAGE_NT_OPTIONAL_HDR64_MAGIC
Definition: ntimage.h:377
IMAGE_DOS_HEADER __ImageBase
Definition: mstscax.cpp:17
struct _IMAGE_OPTIONAL_HEADER * PIMAGE_OPTIONAL_HEADER32
int mingw_initltsdyn_force
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]
Definition: ntimage.h:370
int mingw_initltsdrot_force
struct _IMAGE_OPTIONAL_HEADER64 * PIMAGE_OPTIONAL_HEADER64

◆ duplicate_ppstrings()

static void duplicate_ppstrings ( int  ac,
char ***  av 
)
static

Definition at line 395 of file crtexe.c.

396 {
397  char **avl;
398  int i;
399  char **n = (char **) malloc (sizeof (char *) * (ac + 1));
400 
401  avl=*av;
402  for (i=0; i < ac; i++)
403  {
404  size_t l = strlen (avl[i]) + 1;
405  n[i] = (char *) malloc (l);
406  memcpy (n[i], avl[i], l);
407  }
408  n[i] = NULL;
409  *av = n;
410 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble n
Definition: glext.h:7729
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
r l[0]
Definition: byte_order.h:167
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define malloc
Definition: debug_ros.c:4

Referenced by __declspec().

◆ mainCRTStartup()

int __cdecl mainCRTStartup ( void  )

Definition at line 186 of file crtexe.c.

187 {
188  int ret = 255;
189 #ifdef __SEH__
190  asm ("\t.l_start:\n"
191  "\t.seh_handler __C_specific_handler, @except\n"
192  "\t.seh_handlerdata\n"
193  "\t.long 1\n"
194  "\t.rva .l_start, .l_end, _gnu_exception_handler ,.l_end\n"
195  "\t.text"
196  );
197 #endif
198  mingw_app_type = 0;
200  ret = __tmainCRTStartup ();
201 #ifdef __SEH__
202  asm ("\tnop\n"
203  "\t.l_end: nop\n");
204 #endif
205  return ret;
206 }
int mingw_app_type
Definition: mingw_helpers.c:31
static int __cdecl __tmainCRTStartup(void)
void __cdecl __security_init_cookie(void)
Definition: gs_support.c:55
int ret

◆ pre_cpp_init()

static void __cdecl pre_cpp_init ( void  )
static

Definition at line 143 of file crtexe.c.

144 {
145  startinfo.newmode = _newmode;
146 
147 #ifdef WPRFLAG
148  argret = __wgetmainargs(&argc,&argv,&envp,_dowildcard,&startinfo);
149 #else
150  argret = __getmainargs(&argc,&argv,&envp,_dowildcard,&startinfo);
151 #endif
152 }
static int argc
Definition: ServiceArgs.c:12
#define argv
Definition: mplay32.c:18
void __getmainargs(int *argc, char ***argv, char ***envp, int expand_wildcards, int *new_mode)
Definition: getargs.c:182
int _newmode
Definition: _newmode.c:7
void CDECL __wgetmainargs(int *argc, WCHAR ***wargv, WCHAR ***wenvp, int expand_wildcards, int *new_mode)
int _dowildcard
Definition: wildcard.c:32

◆ WinMainCRTStartup()

int __cdecl WinMainCRTStartup ( void  )

Definition at line 158 of file crtexe.c.

159 {
160  int ret = 255;
161 #ifdef __SEH__
162  asm ("\t.l_startw:\n"
163  "\t.seh_handler __C_specific_handler, @except\n"
164  "\t.seh_handlerdata\n"
165  "\t.long 1\n"
166  "\t.rva .l_startw, .l_endw, _gnu_exception_handler ,.l_endw\n"
167  "\t.text"
168  );
169 #endif
170  mingw_app_type = 1;
172  ret = __tmainCRTStartup ();
173 #ifdef __SEH__
174  asm ("\tnop\n"
175  "\t.l_endw: nop\n");
176 #endif
177  return ret;
178 }
int mingw_app_type
Definition: mingw_helpers.c:31
static int __cdecl __tmainCRTStartup(void)
void __cdecl __security_init_cookie(void)
Definition: gs_support.c:55
int ret

Variable Documentation

◆ __ImageBase

IMAGE_DOS_HEADER __ImageBase

Definition at line 17 of file mstscax.cpp.

Referenced by __declspec(), and check_managed_app().

◆ _dowildcard

int _dowildcard

Definition at line 32 of file wildcard.c.

Referenced by pre_cpp_init().

◆ _fmode

int _fmode

This file has no copyright assigned and is placed in the Public Domain. This file is part of the w64 mingw-runtime package. No warranty is given; refer to the file DISCLAIMER.PD within this package.

Definition at line 13 of file txtmode.c.

Referenced by __p__fmode().

◆ mingw_initcharmax

int mingw_initcharmax

Referenced by check_managed_app().

◆ mingw_initltsdrot_force

int mingw_initltsdrot_force

Referenced by check_managed_app().

◆ mingw_initltsdyn_force

int mingw_initltsdyn_force

Referenced by check_managed_app().

◆ mingw_initltssuo_force

int mingw_initltssuo_force

Referenced by check_managed_app().