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.

81 lines
1.5 KiB

  1. /***
  2. *new.h - declarations and definitions for C++ memory allocation functions
  3. *
  4. * Copyright (c) 1990-1994, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Contains the declarations for C++ memory allocation functions.
  8. *
  9. ****/
  10. #ifndef __INC_NEW
  11. #define __INC_NEW
  12. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  13. #ifndef _CRTAPI1
  14. #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  15. #define _CRTAPI1 __cdecl
  16. #else
  17. #define _CRTAPI1
  18. #endif
  19. #endif
  20. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  21. #ifndef _CRTAPI2
  22. #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  23. #define _CRTAPI2 __cdecl
  24. #else
  25. #define _CRTAPI2
  26. #endif
  27. #endif
  28. /* Define _CRTIMP */
  29. #ifndef _CRTIMP
  30. #ifdef _NTSDK
  31. /* definition compatible with NT SDK */
  32. #define _CRTIMP
  33. #else /* ndef _NTSDK */
  34. /* current definition */
  35. #ifdef _DLL
  36. #define _CRTIMP __declspec(dllimport)
  37. #else /* ndef _DLL */
  38. #define _CRTIMP
  39. #endif /* _DLL */
  40. #endif /* _NTSDK */
  41. #endif /* _CRTIMP */
  42. /* Define __cdecl for non-Microsoft compilers */
  43. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  44. #define __cdecl
  45. #endif
  46. /* types and structures */
  47. #ifndef _SIZE_T_DEFINED
  48. typedef unsigned int size_t;
  49. #define _SIZE_T_DEFINED
  50. #endif
  51. #ifndef _PNH_DEFINED
  52. typedef int (__cdecl * _PNH)( size_t );
  53. #define _PNH_DEFINED
  54. #endif
  55. /* function prototypes */
  56. _CRTIMP int __cdecl _query_new_mode( void );
  57. _CRTIMP int __cdecl _set_new_mode( int );
  58. _CRTIMP _PNH __cdecl _query_new_handler( void );
  59. _CRTIMP _PNH __cdecl set_new_handler( _PNH );
  60. _CRTIMP _PNH __cdecl _set_new_handler( _PNH );
  61. #endif