home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / crt0init.c < prev    next >
C/C++ Source or Header  |  1998-06-17  |  2KB  |  72 lines

  1. /***
  2. *crt0init.c - Initialization segment declarations.
  3. *
  4. *       Copyright (c) 1992-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       Do initialization segment declarations.
  8. *
  9. *Notes:
  10. *       In the 16-bit C world, the X*B and X*E segments were empty except for
  11. *       a label.  This will not work with COFF since COFF throws out empty
  12. *       sections.  Therefore we must put a zero value in them.  (Zero because
  13. *       the routine to traverse the initializers will skip over zero entries.)
  14. *
  15. *******************************************************************************/
  16.  
  17. #include <stdio.h>
  18. #include <internal.h>
  19.  
  20. #pragma data_seg(".CRT$XIA")
  21. _PVFV __xi_a[] = { NULL };
  22.  
  23.  
  24. #pragma data_seg(".CRT$XIZ")
  25. _PVFV __xi_z[] = { NULL };
  26.  
  27.  
  28. #pragma data_seg(".CRT$XCA")
  29. _PVFV __xc_a[] = { NULL };
  30.  
  31.  
  32. #pragma data_seg(".CRT$XCZ")
  33. _PVFV __xc_z[] = { NULL };
  34.  
  35.  
  36. #pragma data_seg(".CRT$XPA")
  37. _PVFV __xp_a[] = { NULL };
  38.  
  39.  
  40. #pragma data_seg(".CRT$XPZ")
  41. _PVFV __xp_z[] = { NULL };
  42.  
  43.  
  44. #pragma data_seg(".CRT$XTA")
  45. _PVFV __xt_a[] = { NULL };
  46.  
  47.  
  48. #pragma data_seg(".CRT$XTZ")
  49. _PVFV __xt_z[] = { NULL };
  50.  
  51. #pragma data_seg()  /* reset */
  52.  
  53.  
  54. #pragma comment(linker, "/merge:.CRT=.data")
  55.  
  56. #pragma comment(linker, "/defaultlib:kernel32.lib")
  57.  
  58. #if !(!defined (_MT) && !defined (_DEBUG))
  59. #pragma comment(linker, "/disallowlib:libc.lib")
  60. #endif  /* !(!defined (_MT) && !defined (_DEBUG)) */
  61. #if !(!defined (_MT) && defined (_DEBUG))
  62. #pragma comment(linker, "/disallowlib:libcd.lib")
  63. #endif  /* !(!defined (_MT) && defined (_DEBUG)) */
  64. #if !(defined (_MT) && !defined (_DEBUG))
  65. #pragma comment(linker, "/disallowlib:libcmt.lib")
  66. #endif  /* !(defined (_MT) && !defined (_DEBUG)) */
  67. #if !(defined (_MT) && defined (_DEBUG))
  68. #pragma comment(linker, "/disallowlib:libcmtd.lib")
  69. #endif  /* !(defined (_MT) && defined (_DEBUG)) */
  70. #pragma comment(linker, "/disallowlib:msvcrt.lib")
  71. #pragma comment(linker, "/disallowlib:msvcrtd.lib")
  72.