new.h 968 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_NEW
  7. #define _INC_NEW
  8. #ifdef __cplusplus
  9. #include <new>
  10. #include <crtdefs.h>
  11. #pragma push_macro("new")
  12. #undef new
  13. #ifndef __NOTHROW_T_DEFINED
  14. #define __NOTHROW_T_DEFINED
  15. #endif
  16. #ifndef __PLACEMENT_NEW_INLINE
  17. #define __PLACEMENT_NEW_INLINE
  18. #endif
  19. _CRTIMP int __cdecl _query_new_mode(void);
  20. _CRTIMP int __cdecl _set_new_mode(int _NewMode);
  21. #ifndef _PNH_DEFINED
  22. typedef int (__cdecl *_PNH)(size_t);
  23. #define _PNH_DEFINED
  24. #endif
  25. _CRTIMP _PNH __cdecl _query_new_handler(void);
  26. _CRTIMP _PNH __cdecl _set_new_handler(_PNH _NewHandler);
  27. #ifndef _NO_ANSI_NH_DEFINED
  28. #define _NO_ANSI_NEW_HANDLER ((new_handler)-1)
  29. #define _NO_ANSI_NEW_HANDLER_M ((_new_handler_m)-1)
  30. #define _NO_ANSI_NH_DEFINED
  31. #endif
  32. #pragma pop_macro("new")
  33. #endif
  34. #endif