windows-nt/Source/XPSP1/NT/base/subsys/posix/rtl/startup.c

69 lines
1,019 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
/*++
Copyright (c) 1990 Microsoft Corporation
Module Name:
startup.c
Abstract:
This module contains the entry point code for the POSIX subsystem.
Author:
Ellen Aycock-Wright (ellena) 04-Jan-1990
Environment:
User Mode only
Revision History:
--*/
#include <nt.h>
#include <types.h>
/*
* Define errno and environ here, since the DLL can only export functions.
*/
int errno;
char **environ;
void __PdxInitializeData(int *perrno, char ***penviron);
void __cdecl mainCRTStartup(void);
void
__cdecl
__PosixProcessStartup(
void
)
/*++
Routine Description:
The __PosixProcessStartup function will receive control from the code
when a POSIX application process starts up.
The parameters to this function are as they are defined for the
entry point of a POSIX image file.
Arguments:
Return Value:
None, does not return
--*/
{
// Call POSIX Dll to "export" errno location.
__PdxInitializeData(&errno, &environ);
mainCRTStartup();
}