1/* -*- c++ -*- */
2#ifndef __NEW__
3#define __NEW__
4
5#include <stddef.h>
6
7extern "C++" {
8
9namespace std {
10  using ::size_t;
11  struct nothrow_t {};
12  extern const nothrow_t nothrow;
13}
14
15void* operator new(std::size_t);
16void* operator new(std::size_t, const std::nothrow_t&);
17void operator delete(void*) throw();
18// TODO: void operator delete(void*, std::size_t) throw();
19void operator delete(void*, const std::nothrow_t&) throw();
20
21void* operator new[](std::size_t);
22void* operator new[](std::size_t, const std::nothrow_t&);
23void operator delete[](void*) throw();
24// TODO: void operator delete[](void*, std::size_t) throw();
25void operator delete[](void*, const std::nothrow_t&) throw();
26
27// These four are not replaceable, so should be inlined.
28inline void* operator new(std::size_t, void* p) { return p; }
29inline void* operator new[](std::size_t, void* p) { return p; }
30inline void operator delete(void*, void*) throw() { }
31inline void operator delete[](void*, void*) throw() { }
32
33}  // extern C++
34
35#endif // __NEW__
36