Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // EPOC32 version of crt0.c for C programs which always want multi-threaded support
20 #include <estlib.h> // for SpawnPosixServerThread()
23 extern "C" int wmain (int argc, wchar_t *argv[], wchar_t *envp[]);
25 GLDEF_C TInt E32Main()
29 SpawnPosixServerThread(); // arrange for multi-threaded operation
36 __crt0(argc,wargv,wenvp); // get args & environment from somewhere
38 int ret=wmain(argc, wargv, wenvp); // go
40 // no need to explicitly delete the cleanup stack here as all memory used by
41 // the process will be released by RProcess::Terminate(), called from inside exit().
43 exit(ret); // finish with atexit processing
51 /* stub function inserted into main() by GCC */
53 extern "C" void __main (void) {}
55 extern "C" void __gccmain (void) {}
58 /* Default GCC entrypoint */
59 extern "C" TInt _mainCRTStartup (void)
61 extern TInt _E32Startup();
65 #endif /* __GCC32__ */