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