VirtualBox

Changeset 39088 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Oct 24, 2011 10:12:20 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74520
Message:

alloc-ef-cpp.cpp: build fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/alloc-ef-cpp.cpp

    r39087 r39088  
    3939/** @todo test this on MSC */
    4040
    41 /* MSC declares the operators as cdecl it seems. */
     41/** MSC declares the operators as cdecl it seems. */
    4242#ifdef _MSC_VER
    4343# define RT_EF_CDECL    __cdecl
     
    4646#endif
    4747
    48 /* MSC doesn't use the standard namespace. */
     48/** MSC doesn't use the standard namespace. */
    4949#ifdef _MSC_VER
    5050# define RT_EF_SIZE_T   size_t
     
    5353#endif
    5454
     55/** The hint that we're throwing std::bad_alloc is not apprecitated by MSC. */
     56#ifdef _MSC_VER
     57# if _MSC_VER >= 1400
     58#  define RT_EF_THROWS_BAD_ALLOC
     59# else
     60#  define RT_EF_THROWS_BAD_ALLOC    throw(std::bad_alloc)
     61# endif
     62#else
     63# define RT_EF_THROWS_BAD_ALLOC     throw(std::bad_alloc)
     64#endif
    5565
    56 void *RT_EF_CDECL operator new(RT_EF_SIZE_T cb) throw(std::bad_alloc)
     66
     67void *RT_EF_CDECL operator new(RT_EF_SIZE_T cb) RT_EF_THROWS_BAD_ALLOC
    5768{
    5869    void *pv = rtR3MemAlloc("new", RTMEMTYPE_NEW, cb, cb, NULL, ASMReturnAddress(), NULL, 0, NULL);
     
    90101 */
    91102
    92 void *RT_EF_CDECL operator new[](RT_EF_SIZE_T cb) throw(std::bad_alloc)
     103void *RT_EF_CDECL operator new[](RT_EF_SIZE_T cb) RT_EF_THROWS_BAD_ALLOC
    93104{
    94105    void *pv = rtR3MemAlloc("new[]", RTMEMTYPE_NEW_ARRAY, cb, cb, NULL, ASMReturnAddress(), NULL, 0, NULL);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette