diff options
Diffstat (limited to 'libstdc++-v3/libsupc++/new_opnt.cc')
-rw-r--r-- | libstdc++-v3/libsupc++/new_opnt.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libstdc++-v3/libsupc++/new_opnt.cc b/libstdc++-v3/libsupc++/new_opnt.cc index 4d7a5087c14..6406a50086c 100644 --- a/libstdc++-v3/libsupc++/new_opnt.cc +++ b/libstdc++-v3/libsupc++/new_opnt.cc @@ -30,6 +30,12 @@ #include "new" #include <exception_defines.h> +/* APPLE LOCAL begin keymgr */ +#if defined APPLE_KEYMGR && ! defined(LIBCC_KEXT) && ! defined(APPLE_KERNEL_EXTENSION) +#include "bits/os_defines.h" +#endif /* APPLE_KEYMGR */ +/* APPLE LOCAL end keymgr */ + using std::new_handler; using std::bad_alloc; @@ -47,7 +53,14 @@ operator new (std::size_t sz, const std::nothrow_t&) throw() p = (void *) malloc (sz); while (p == 0) { + /* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) + new_handler handler = + (new_handler) _keymgr_get_per_thread_data (KEYMGR_NEW_HANLDER_KEY); +#else /* ! APPLE_KEYMGR */ new_handler handler = __new_handler; +#endif /* APPLE_KEYMGR */ + /* APPLE LOCAL end keymgr */ if (! handler) return 0; try |