home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / New.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-16  |  993 b   |  48 lines

  1. /* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.1 $ */
  2. #if __SC__ || __RCC__
  3. #pragma once
  4. #endif
  5.  
  6. #ifndef __NEW_H
  7. #define __NEW_H 1
  8.  
  9. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  10. #ifndef _CRTAPI1
  11. #define _CRTAPI1 __cdecl
  12. #endif
  13.  
  14. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  15. #ifndef _CRTAPI2
  16. #define _CRTAPI2 __cdecl
  17. #endif
  18.  
  19. /* Define CRTIMP */
  20. #ifndef _CRTIMP
  21. #if defined(_WIN32) && defined(_DLL)
  22. #define _CRTIMP  __declspec(dllimport)
  23. #else
  24. #define _CRTIMP
  25. #endif
  26. #endif
  27.  
  28. extern "C++" {
  29.  
  30. #if !defined(__NEW_DEFINED)  
  31.  
  32. #define __NEW_DEFINED 1
  33. void *operator new(unsigned, void *p);
  34. #if _ENABLE_ARRAYNEW
  35. void *operator new[](unsigned, void *p);
  36. #endif
  37. #endif
  38.  
  39. typedef int (__cdecl * _PNH)( unsigned );    //for Microsoft compatibility
  40. typedef void (* PFVV)();        //as defined in ARM
  41.  
  42.  
  43. _PNH __cdecl _set_new_handler(_PNH);        //for Microsoft compatibility
  44. PFVV set_new_handler(PFVV);            //as defined in ARM
  45. }
  46.  
  47. #endif
  48.