diff --git a/headers/private/kernel/util/kernel_cpp.h b/headers/private/kernel/util/kernel_cpp.h index 633fbc342b..3085b84483 100644 --- a/headers/private/kernel/util/kernel_cpp.h +++ b/headers/private/kernel/util/kernel_cpp.h @@ -10,9 +10,10 @@ #include #include +#if _KERNEL_MODE using namespace std; - +extern const nothrow_t std::nothrow; // Oh no! C++ in the kernel! Are you nuts? // @@ -72,5 +73,6 @@ operator delete[](void *ptr) throw () // we're using virtuals extern "C" void __pure_virtual(); +#endif // #if _KERNEL_MODE #endif /* CPP_H */ diff --git a/src/kernel/core/util/kernel_cpp.cpp b/src/kernel/core/util/kernel_cpp.cpp index 100ec54841..856a43b629 100644 --- a/src/kernel/core/util/kernel_cpp.cpp +++ b/src/kernel/core/util/kernel_cpp.cpp @@ -4,9 +4,11 @@ ** This file may be used under the terms of the OpenBeOS License. */ +#if _KERNEL_MODE #include "util/kernel_cpp.h" +const nothrow_t std::nothrow = {}; #if __GNUC__ == 2 @@ -24,3 +26,5 @@ __cxa_pure_virtual() } #endif + +#endif // _#if KERNEL_MODE