1 | /* $Id: new.h,v 1.3 1999-11-10 01:45:32 bird Exp $
|
---|
2 | *
|
---|
3 | * new - new and delete operators.
|
---|
4 | *
|
---|
5 | * Copyright (c) 1998-1999 knut st. osmundsen
|
---|
6 | *
|
---|
7 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
8 | *
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef _new_h_
|
---|
12 | #define _new_h_
|
---|
13 |
|
---|
14 | #ifdef __IBMC__
|
---|
15 | /* check for IBMCPP new.h */
|
---|
16 | #ifdef __new_h
|
---|
17 | #error("A different version of new.h has allready been loaded!")
|
---|
18 | #endif
|
---|
19 | #define __new_h /* Defined to prevent IBMCPP new.h from being loaded. */
|
---|
20 |
|
---|
21 | /* size_t */
|
---|
22 | #ifndef __size_t
|
---|
23 | #define __size_t
|
---|
24 | typedef unsigned int size_t;
|
---|
25 | #endif
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | #ifdef __GNUC__
|
---|
29 | #include <stddef.h>
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | #ifndef __DEBUG_ALLOC__
|
---|
33 | /* The standard favourites */
|
---|
34 | void *operator new(size_t size);
|
---|
35 | void *operator new(size_t size, void *location) throw(); /* stub */
|
---|
36 |
|
---|
37 | void *operator new[](size_t size) throw(); /* stub */
|
---|
38 | void *operator new[](size_t size, void *location) throw(); /* stub */
|
---|
39 |
|
---|
40 | void operator delete(void *location);
|
---|
41 | void operator delete[](void *location) throw(); /* stub */
|
---|
42 | #endif
|
---|
43 |
|
---|
44 | #ifdef __DEBUG_ALLOC__
|
---|
45 | void *operator new(size_t size, const char *filename, size_t lineno);
|
---|
46 | void *operator new(size_t size, const char *filename, size_t lineno, void *location);
|
---|
47 |
|
---|
48 | void *operator new[](size_t size, const char *filename, size_t lineno);
|
---|
49 | void *operator new[](size_t size, const char *filename, size_t lineno, void *location);
|
---|
50 |
|
---|
51 | void operator delete(void *location, const char *filename, size_t lineno);
|
---|
52 | void operator delete[](void *location, const char *filename, size_t lineno);
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | #endif
|
---|
56 |
|
---|