[Scummvm-cvs-logs] CVS: scummvm/common scummsys.h,1.35,1.36

Max Horn fingolfin at users.sourceforge.net
Thu Sep 18 11:23:13 CEST 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv26798/common

Modified Files:
	scummsys.h 
Log Message:
disable the custom operator 'new' on Mac OS X, as it cause multiple definition linker error when building ScummVM with loadable modules

Index: scummsys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scummsys.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- scummsys.h	18 Sep 2003 02:07:17 -0000	1.35
+++ scummsys.h	18 Sep 2003 18:22:15 -0000	1.36
@@ -383,20 +383,21 @@
 	typedef int16 NewGuiColor;
 #endif
 
-/* Initialized operator new */
-// FIXME - get rid of these new/delete overrides!!! They conflict with the
-// Standard C++ library, and they are only there to support lazy programmers anyway.
-#ifndef __PALM_OS__
-void * operator new(size_t size);
-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
-// get some invocations of free() with that param. We check for those here.
-// That allows us to set a debugger breakpoint to catch it.
-#ifndef _WIN32_WCE
-#define free(x)	free_check(x)
-void free_check(void *ptr);
-#endif
+#if !defined(__PALM_OS__) && !defined(MACOSX)
+	/* Initialized operator new */
+	// FIXME - get rid of these new/delete overrides!!! They conflict with the
+	// Standard C++ library, and they are only there to support lazy programmers anyway.
+	void * operator new(size_t size);
+	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
+	// get some invocations of free() with that param. We check for those here.
+	// That allows us to set a debugger breakpoint to catch it.
+	#ifndef _WIN32_WCE
+	#define free(x)	free_check(x)
+	void free_check(void *ptr);
+	#endif
 #endif
 
 #endif





More information about the Scummvm-git-logs mailing list