2010-08-30 09:57:37 +08:00
|
|
|
/* crt0.c
|
2003-05-12 19:06:27 +08:00
|
|
|
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
|
|
|
/* In the following ifdef'd i386 code, the FPU precision is set to 80 bits
|
|
|
|
and all FPU exceptions are masked. The former is needed to make long
|
|
|
|
doubles work correctly. The latter causes the FPU to generate NaNs and
|
2010-08-30 09:57:37 +08:00
|
|
|
Infinities instead of signals for certain operations. */
|
2003-05-12 19:06:27 +08:00
|
|
|
|
2010-08-30 09:57:37 +08:00
|
|
|
#include "winlean.h"
|
|
|
|
#include <sys/cygwin.h>
|
2003-05-12 19:06:27 +08:00
|
|
|
|
|
|
|
extern int main (int argc, char **argv);
|
|
|
|
|
2003-08-06 09:40:12 +08:00
|
|
|
void cygwin_crt0 (int (*main) (int, char **));
|
|
|
|
|
2020-02-28 21:31:56 +08:00
|
|
|
#ifdef __i386__
|
|
|
|
__attribute__ ((force_align_arg_pointer))
|
|
|
|
#endif
|
2003-05-12 19:06:27 +08:00
|
|
|
void
|
|
|
|
mainCRTStartup ()
|
|
|
|
{
|
|
|
|
cygwin_crt0 (main);
|
2010-08-30 09:57:37 +08:00
|
|
|
|
|
|
|
/* These are never actually called. They are just here to force the inclusion
|
|
|
|
of things like -lbinmode. */
|
|
|
|
|
|
|
|
cygwin_premain0 (0, NULL, NULL);
|
|
|
|
cygwin_premain1 (0, NULL, NULL);
|
|
|
|
cygwin_premain2 (0, NULL, NULL);
|
|
|
|
cygwin_premain3 (0, NULL, NULL);
|
2003-05-12 19:06:27 +08:00
|
|
|
}
|
2005-09-29 22:28:22 +08:00
|
|
|
|
|
|
|
void WinMainCRTStartup(void) __attribute__ ((alias("mainCRTStartup")));
|