Ignore:
Timestamp:
May 13, 2002, 7:49:28 AM (23 years ago)
Author:
umoeller
Message:

Massive pager rework.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/memdebug.h

    r123 r164  
    4343
    4444    #ifndef __stdlib_h           // <stdlib.h>
    45         #error stdlib.h must be included before memdebug.h.
     45        // #error stdlib.h must be included before memdebug.h.
     46        typedef unsigned int size_t;
     47    #endif
     48
     49    #ifndef NULL
     50       #if (defined(__EXTENDED__)  || defined( __cplusplus ))
     51          #define NULL 0
     52       #else
     53          #define NULL ((void *)0)
     54       #endif
    4655    #endif
    4756
     
    146155
    147156        #ifndef DONT_REPLACE_MALLOC
     157
     158            #ifdef malloc
     159                #undef malloc
     160            #endif
    148161            #define malloc(ul) memdMalloc(ul, __FILE__, __LINE__, __FUNCTION__)
     162
     163            #ifdef calloc
     164                #undef calloc
     165            #endif
    149166            #define calloc(n, size) memdCalloc(n, size, __FILE__, __LINE__, __FUNCTION__)
     167
     168            #ifdef realloc
     169                #undef realloc
     170            #endif
    150171            #define realloc(p, ul) memdRealloc(p, ul, __FILE__, __LINE__, __FUNCTION__)
     172
     173            #ifdef free
     174                #undef free
     175            #endif
    151176            #define free(p) memdFree(p, __FILE__, __LINE__, __FUNCTION__)
    152177
     
    159184            #endif
    160185
     186            // tell other headers that these have been replaced
    161187            #define __DEBUG_MALLOC_ENABLED__
    162188
Note: See TracChangeset for help on using the changeset viewer.