]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 19 Dec 2007 21:13:09 +0000 (21:13 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 19 Dec 2007 21:13:09 +0000 (21:13 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6904 d0543943-73ff-0310-b7d9-9358b9ac24b2

Makefile.am
configure.in
libs/sqlite/src/sqliteInt.h

index 3af8ee06f7f2f31397ab1168abc822632d9e76b0..c3493583b2777b251efb9f9dc9b2f81eb4866c75 100644 (file)
@@ -239,7 +239,7 @@ libs/apr-util/libaprutil-1.la: libs/apr-util libs/apr-util/.update libs/apr/liba
        @$(TOUCH_TARGET)
 
 libs/sqlite/libsqlite3.la: libs/sqlite libs/sqlite/.update
-       @cd libs/sqlite && $(MAKE)
+       @cd libs/sqlite && $(MAKE) CFLAGS="$(SWITCH_AM_CFLAGS)"
        @$(TOUCH_TARGET)
 
 libs/pcre/libpcre.la: libs/pcre libs/pcre/.update
index 2baac9ab11577fc994952361f47bba4b6d848d93..5b1f7802609e35dd214175be60c9ca9ec8a3122d 100644 (file)
@@ -60,14 +60,6 @@ if test "${enable_optimizer}" = "yes" ; then
         AX_CC_MAXOPT
 fi
 
-#  Enable debugging
-AC_ARG_ENABLE(debug,
-[AC_HELP_STRING([--enable-debug],[build with debug information])],[enable_debug="$enable_debug"],[enable_debug="yes"])
-
-if test "${enable_debug}" = "yes"; then
-        AC_DEFINE([DEBUG],[],[Enable extra debugging.])
-        AX_CFLAGS_WARN_ALL_ANSI
-fi
 
 AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
 
@@ -147,6 +139,21 @@ elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
     APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
 fi
 
+#  Enable debugging
+AC_ARG_ENABLE(debug,
+[AC_HELP_STRING([--enable-debug],[build with debug information])],[enable_debug="$enable_debug"],[enable_debug="yes"])
+
+if test "${enable_debug}" = "yes"; then
+        AC_DEFINE([DEBUG],[],[Enable extra debugging.])
+        AX_CFLAGS_WARN_ALL_ANSI
+
+       if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
+           APR_ADDTO(SWITCH_AM_CFLAGS, -g -ggdb)
+       fi
+
+fi
+
+
 # tweak platform specific flags
 case "$host" in
     *darwin*)
index f638b5592efab1ec9c036e4a0b04da7dee1137b7..64d0b9f50fde036f3b087926a5e01eb6e473fc90 100644 (file)
@@ -269,9 +269,18 @@ extern int sqlite3_iLine;            /* Line number for debug info */
 
 #else
 
+static inline void *zmalloc(size_t x)
+{
+       void *z = malloc(x);
+       assert(z);
+       memset(z, 0, x);
+       return z;
+}
+
+
 #define ENTER_MALLOC 0
-#define sqliteMalloc(x)          sqlite3Malloc(x,1)
-#define sqliteMallocRaw(x)       sqlite3MallocRaw(x,1)
+#define sqliteMalloc(x)          zmalloc(x)//sqlite3Malloc(x,1)
+#define sqliteMallocRaw(x)       malloc(x)//sqlite3MallocRaw(x,1)
 #define sqliteRealloc(x,y)       sqlite3Realloc(x,y)
 #define sqliteStrDup(x)          sqlite3StrDup(x)
 #define sqliteStrNDup(x,y)       sqlite3StrNDup(x,y)