Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1019 B

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. startup.c
  5. Abstract:
  6. This module contains the entry point code for the POSIX subsystem.
  7. Author:
  8. Ellen Aycock-Wright (ellena) 04-Jan-1990
  9. Environment:
  10. User Mode only
  11. Revision History:
  12. --*/
  13. #include <nt.h>
  14. #include <types.h>
  15. /*
  16. * Define errno and environ here, since the DLL can only export functions.
  17. */
  18. int errno;
  19. char **environ;
  20. void __PdxInitializeData(int *perrno, char ***penviron);
  21. void __cdecl mainCRTStartup(void);
  22. void
  23. __cdecl
  24. __PosixProcessStartup(
  25. void
  26. )
  27. /*++
  28. Routine Description:
  29. The __PosixProcessStartup function will receive control from the code
  30. when a POSIX application process starts up.
  31. The parameters to this function are as they are defined for the
  32. entry point of a POSIX image file.
  33. Arguments:
  34. Return Value:
  35. None, does not return
  36. --*/
  37. {
  38. // Call POSIX Dll to "export" errno location.
  39. __PdxInitializeData(&errno, &environ);
  40. mainCRTStartup();
  41. }