Permalink
Browse files

set debug macro

  • Loading branch information...
youknowone committed Jun 1, 2012
1 parent 3119f20 commit ff66d0a59cd6de3f587d3eac02e6004b6f6360ba
Showing with 7 additions and 3 deletions.
  1. +2 −0 Debug.xcconfig
  2. +2 −2 Mac/Sources/fe-aqua.m
  3. +3 −1 SGLibrary/SGDebug.h
View
@@ -1 +1,3 @@
#include "BuildNumber.xcconfig"
+
+GCC_PREPROCESSOR_DEFINITIONS = DEBUG
View
@@ -553,7 +553,7 @@ static void fix_log_files_and_pref ()
#include <sys/time.h>
#include <sys/resource.h>
-#if AQUACHAT_DEBUG
+#if DEBUG
static void bar (NSException *e)
{
printf ("BAR!\n");
@@ -605,7 +605,7 @@ static void USER_not_enough_parameters_bug ()
setrlimit (RLIMIT_CORE, &rlp);
#endif
-#if AQUACHAT_DEBUG
+#if DEBUG
NSSetUncaughtExceptionHandler (bar);
[[NSExceptionHandler defaultExceptionHandler] setExceptionHandlingMask: 127];
//[[NSExceptionHandler defaultExceptionHandler] setExceptionHangingMask: NSHangOnEveryExceptionMask];
View
@@ -19,7 +19,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */
-#define SG_DEBUG 0
+#ifndef SG_DEBUG
+# define SG_DEBUG DEBUG
+#endif
#ifdef SG_DEBUG
# define SGLog(TAG, ...) { if ( TAG ) [SGDebug log:[NSString stringWithFormat:__VA_ARGS__] file:__FILE__ line:__LINE__]; }

0 comments on commit ff66d0a

Please sign in to comment.