Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22523/include

Modified Files:
        Mconfig.h 
Log Message:
ensure that DEBUG and __WXDEBUG__ are in sync; define DEBUG if _DEBUG is defined

Index: Mconfig.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Mconfig.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -b -u -2 -r1.53 -r1.54
--- Mconfig.h   30 Mar 2004 17:51:23 -0000      1.53
+++ Mconfig.h   30 Mar 2004 18:08:54 -0000      1.54
@@ -12,8 +12,9 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-#ifndef _MCONFIG_H_
-#define _MCONFIG_H_
+#ifndef MCONFIG_H
+#define MCONFIG_H
 
 #include  "config.h"
+#include  <wx/defs.h>
 
 // ----------------------------------------------------------------------------
@@ -105,4 +106,37 @@
 #endif
 
+// MSVC defines _DEBUG in debug builds, set DEBUG accordingly
+#if defined(_DEBUG) && !defined(DEBUG)
+   #define DEBUG
+#endif
+
+// ----------------------------------------------------------------------------
+// wxWindows stuff
+// ----------------------------------------------------------------------------
+
+#if !wxCHECK_VERSION(2, 5, 1)
+#  error "This version of Mahogany requires wxWindows 2.5.1 or higher."
+#endif
+
+#ifdef USE_THREADS
+#   if !wxUSE_THREADS
+#      error "Mahogany's thread support requires a wxWindows with threads compiled 
in!"
+#   endif
+#endif
+
+// make sure that wxWin and M settings are in sync: although in theory it
+// should be possible to use mismatching settings, in practice this more often
+// doesn't work than does, so please don't do it unless you really know what
+// you're doing
+#ifdef DEBUG
+#   ifndef __WXDEBUG__
+#      error "Please use debug version of wxWindows with debug Mahogany build."
+#   endif
+#else // Release
+#   ifdef __WXDEBUG__
+#      error "Please don't use debug version of wxWindows with non-debug Mahogany 
build."
+#   endif
+#endif // Debug/Release
+
 // ----------------------------------------------------------------------------
 // miscellaneous other stuff
@@ -155,10 +189,4 @@
 #endif
 
-#ifdef USE_THREADS
-#   if !  wxUSE_THREADS
-#      error "Mahogany's thread support requires a wxWindows with threads compiled 
in!"
-#   endif
-#endif
-
 // although this is not necessary, including this header allows to have more
 // info in the logs
@@ -167,12 +195,4 @@
 #endif // USE_DMALLOC
 
-// missing macro in 2.4.x headers
-#include <wx/object.h>
-#ifndef DECLARE_DYNAMIC_CLASS_NO_COPY
-#  define DECLARE_DYNAMIC_CLASS_NO_COPY(name)                                 \
-    DECLARE_NO_COPY_CLASS(name)                                               \
-    DECLARE_DYNAMIC_CLASS(name)
-#endif
-
-#endif // _MCONFIG_H_
+#endif // MCONFIG_H
 



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to