]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
optimizations
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 22 Aug 2006 00:56:27 +0000 (00:56 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 22 Aug 2006 00:56:27 +0000 (00:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2354 d0543943-73ff-0310-b7d9-9358b9ac24b2

Makefile.in
build/buildlib.sh
build/modmake.sh
libs/mozilla.build.sh
src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
src/mod/loggers/mod_syslog/mod_syslog.c
src/switch_console.c

index 4d8b0efe8a4d90d8047cf47e92d0be2a01d3821e..2b7307e0a23381c855253ea25c5846dbb6af3ab8 100644 (file)
@@ -1108,6 +1108,7 @@ modules: $(NAME)
        @if [ ! -f $(PWD)/modules.conf ] ; then cp $(PWD)/modules.conf.in $(PWD)/modules.conf ; fi
        @echo making modules
        @rm -f build/freeswitch.env
+       @if [ -f $(PWD)/modbuild.env ] ; then cp $(PWD)/modbuild.env build/freeswitch.env ; fi
        @./build/addenv.sh build/freeswitch.env MAKE "$(MAKE)"
        @./build/addenv.sh build/freeswitch.env DYLD_LIBRARY_PATH "$(PREFIX)/lib:$DYLD_LIBRARY_PATH"
        @./build/addenv.sh build/freeswitch.env LD_LIBRARY_PATH "$(PREFIX)/lib:$LD_LIBRARY_PATH"
index 8991ff5ada7eacab4bdd20d2dfe64e6e2c8d09a9..da889b918dcbd098ee8641dcc12ddcf710f4cb16 100755 (executable)
@@ -67,7 +67,7 @@ if [ -f ../$uncompressed.build.sh ] ; then
     MAKE=$MAKE ../$uncompressed.build.sh $@
 else
     $MAKE clean 2>&1
-    sh ./configure $@
+    sh CFLAGS=$MOD_CFLAGS ./configure $@
 
     if [ $? = 0 ] ; then
        $MAKE
index c7efb91af2ebeab9bb07181dc3a3769c698ef11a..3a93b9eea7dd5996185102e292aadbbf37da51cf 100755 (executable)
@@ -20,8 +20,8 @@ if [ -z $end ] ; then
 fi
 
 if [ -f $mod/Makefile ] ; then
-    MODNAME=$end $make -C $mod $@
+    CFLAGS="$MOD_CFLAGS $CFLAGS " MODNAME=$end $make -C $mod $@
 else 
-    MODNAME=$end $make -f $pwd/generic_mod.mk -C $mod $@
+    CFLAGS="$MOD_CFLAGS $CFLAGS" MODNAME=$end $make -f $pwd/generic_mod.mk -C $mod $@
 fi
 
index 1f3c03bb71680b6386d6de580460fc97c7daf2e1..fbbd10a63bb9df43e7d189c14335ce2202e9f093 100755 (executable)
@@ -5,7 +5,7 @@ if [ $arch = "x86_64" ] ; then
 opts="--enable-64bit"
 fi
 
-cd nsprpub && ./configure $opts && make
+cd nsprpub && ./configure $opts && $MAKE
 
-cd ../js/src && JS_THREADSAFE=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr"  make -f Makefile.ref `find . -name libjs.a`
+cd ../js/src && JS_THREADSAFE=1 JS_HAS_FILE_OBJECT=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr"  $MAKE -f Makefile.ref `find . -name libjs.a`
 
index 0bc8ce5be2a4e8bfcfe8d58ac21f15f14324cd06..e6646767804760f565e0c49b0a1ba808ec027867 100644 (file)
@@ -456,7 +456,7 @@ static switch_status_t js_stream_dtmf_callback(switch_core_session_t *session, v
                        for(d = dtmf; *d; d++) {
                                cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
                                if ((cb_state->ret_buffer_len > cb_state->digit_count)||
-                                       (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+                                       (cb_state->ret_buffer_len > (int32_t) sizeof(cb_state->ret_buffer))||
                                        (cb_state->ret_buffer_len >= cb_state->digit_count)
                                        ) {
                                        return SWITCH_STATUS_FALSE;
@@ -573,7 +573,7 @@ static switch_status_t js_record_dtmf_callback(switch_core_session_t *session, v
                        for(d = dtmf; *d; d++) {
                                cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
                                if ((cb_state->ret_buffer_len > cb_state->digit_count)||
-                                       (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+                                       (cb_state->ret_buffer_len > (int32_t) sizeof(cb_state->ret_buffer))||
                                        (cb_state->ret_buffer_len >= cb_state->digit_count)
                                        ) {
                                        return SWITCH_STATUS_FALSE;
@@ -642,7 +642,7 @@ static switch_status_t js_speak_dtmf_callback(switch_core_session_t *session, vo
                        for(d = dtmf; *d; d++) {
                                cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
                                if ((cb_state->ret_buffer_len > cb_state->digit_count)||
-                                       (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+                                       (cb_state->ret_buffer_len > (int32_t) sizeof(cb_state->ret_buffer))||
                                        (cb_state->ret_buffer_len >= cb_state->digit_count)
                                        ) {
                                        return SWITCH_STATUS_FALSE;
index cc4fc2a1d4b4641d13dbc70c471116ee43548ee3..82a004517463bdba3aa675bd740ce204cf8318d1 100644 (file)
@@ -105,8 +105,8 @@ static switch_status_t mod_syslog_logger(const switch_log_node_t *node, switch_l
 
 SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
 {
-       *interface = &console_module_interface;
        switch_status_t status;
+       *interface = &console_module_interface;
 
        if ((status=load_config()) != SWITCH_STATUS_SUCCESS) {
                return status;
index 96d97ce2119b454f64d18044371a04517271928b..9ffa7963878cb6c7e81d3386e3b5f8159201bc72 100644 (file)
@@ -176,9 +176,9 @@ SWITCH_DECLARE(void) switch_console_loop(void)
 {
        char hostname[256];
        char cmd[2048];
-       int running = 1, x = 0, activity = 1;
+       int running = 1, activity = 1;
        char *retbuf = (char *)malloc(CMD_BUFLEN);
-
+       switch_size_t x = 0;
 
        assert(retbuf != NULL);
        gethostname(hostname, sizeof(hostname));