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.

77 lines
1.6 KiB

  1. //UNUSED
  2. ////
  3. //// Code to help free modules from the bondage and tyranny of CRT libraries
  4. ////
  5. //// Include this header in a single component and #define DECL_CRTFREE.
  6. //// (CPP_FUNCTIONS is the old name.)
  7. ////
  8. //#if defined(__cplusplus) && (defined(CPP_FUNCTIONS) || defined(DECL_CRTFREE))
  9. //#ifndef UNIX
  10. //void * __cdecl operator new(unsigned int nSize)
  11. // {
  12. // // Zero init just to save some headaches
  13. // return((LPVOID)LocalAlloc(LPTR, nSize));
  14. // }
  15. //void __cdecl operator delete(void *pv)
  16. // {
  17. // LocalFree((HLOCAL)pv);
  18. // }
  19. //#endif
  20. //extern "C" int __cdecl _purecall(void)
  21. // {
  22. //#ifdef ASSERT_MSG
  23. // ASSERT_MSG(0, "purecall() hit");
  24. //#endif
  25. // return 0;
  26. // }
  27. //#endif // DECL_CRTFREE
  28. //#ifdef __cplusplus
  29. //extern "C" {
  30. //#endif
  31. //#if defined(DEFINE_FLOAT_STUFF)
  32. //// If you aren't using any floating-point CRT functions and you know
  33. //// you aren't performing any float conversions or arithmetic, yet the
  34. //// linker wants these symbols declared, then define DEFINE_FLOAT_STUFF.
  35. ////
  36. //// Warning: declaring these symbols in a component that needs floating
  37. //// point support from the CRT will produce undefined results. (You will
  38. //// need fp support from the CRT if you simply perform fp arithmetic.)
  39. //int _fltused = 0;
  40. //void __cdecl _fpmath(void) { }
  41. //#endif
  42. //#ifdef __cplusplus
  43. //};
  44. //#endif
  45. ////
  46. //// This file should be included in a global component header
  47. //// to use the following
  48. ////
  49. //#ifndef __CRTFREE_H_
  50. //#define __CRTFREE_H_
  51. //#ifdef __cplusplus
  52. //#ifndef _M_PPC
  53. //#pragma intrinsic(memcpy)
  54. //#pragma intrinsic(memcmp)
  55. //#pragma intrinsic(memset)
  56. //#endif
  57. //#endif
  58. //#endif // __CRTFREE_H_