disable the custom operator 'new' on Mac OS X, as it cause multiple definition linker error when building ScummVM with loadable modules
svn-id: r10303
This commit is contained in:
parent
f8997ba7cc
commit
209413ed07
2 changed files with 16 additions and 15 deletions
|
@ -290,7 +290,7 @@ int main(int argc, char *argv[]) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __PALM_OS__
|
#if !defined(__PALM_OS__) && !defined(MACOSX)
|
||||||
void *operator new(size_t size) {
|
void *operator new(size_t size) {
|
||||||
return memset(malloc(size), 0xE7, size);
|
return memset(malloc(size), 0xE7, size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -383,20 +383,21 @@ FORCEINLINE uint16 SWAP_BYTES_16(uint16 a) {
|
||||||
typedef int16 NewGuiColor;
|
typedef int16 NewGuiColor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialized operator new */
|
#if !defined(__PALM_OS__) && !defined(MACOSX)
|
||||||
// FIXME - get rid of these new/delete overrides!!! They conflict with the
|
/* Initialized operator new */
|
||||||
// Standard C++ library, and they are only there to support lazy programmers anyway.
|
// FIXME - get rid of these new/delete overrides!!! They conflict with the
|
||||||
#ifndef __PALM_OS__
|
// Standard C++ library, and they are only there to support lazy programmers anyway.
|
||||||
void * operator new(size_t size);
|
void * operator new(size_t size);
|
||||||
void operator delete(void *ptr);
|
void operator delete(void *ptr);
|
||||||
// Temporary hack until we fully remove the new/delete operators:
|
|
||||||
// Since 'new' now returns a memory block inited to 0xE7E7E7E7 we might
|
// Temporary hack until we fully remove the new/delete operators:
|
||||||
// get some invocations of free() with that param. We check for those here.
|
// Since 'new' now returns a memory block inited to 0xE7E7E7E7 we might
|
||||||
// That allows us to set a debugger breakpoint to catch it.
|
// get some invocations of free() with that param. We check for those here.
|
||||||
#ifndef _WIN32_WCE
|
// That allows us to set a debugger breakpoint to catch it.
|
||||||
#define free(x) free_check(x)
|
#ifndef _WIN32_WCE
|
||||||
void free_check(void *ptr);
|
#define free(x) free_check(x)
|
||||||
#endif
|
void free_check(void *ptr);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue