]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 253536-253538,253540 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Sat, 20 Mar 2010 18:14:31 +0000 (18:14 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 20 Mar 2010 18:14:31 +0000 (18:14 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r253536 | russell | 2010-03-20 06:33:30 -0500 (Sat, 20 Mar 2010) | 4 lines

  Use SHRT_MAX instead of MAXSHORT.

  These changes fix build issues I had with this module on FreeBSD.
........
  r253537 | russell | 2010-03-20 06:39:39 -0500 (Sat, 20 Mar 2010) | 2 lines

  Resolve a compiler warning on FreeBSD.
........
  r253538 | russell | 2010-03-20 06:43:08 -0500 (Sat, 20 Mar 2010) | 2 lines

  Resolve compiler warnings on FreeBSD.
........
  r253540 | russell | 2010-03-20 07:03:07 -0500 (Sat, 20 Mar 2010) | 2 lines

  Resolve more compiler warnings on FreeBSD.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@253626 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c
apps/app_followme.c
cdr/cdr_pgsql.c
channels/chan_dahdi.c
main/features.c
main/stdtime/localtime.c
main/tcptls.c
pbx/pbx_dundi.c

index 228524cb64da552e78b5435176fab01169cbc7e7..3b9a612447181fa91a1691490e9860290dc8621a 100644 (file)
@@ -1274,12 +1274,12 @@ static void end_bridge_callback(void *data)
 
        ast_channel_lock(chan);
        if (chan->cdr->answer.tv_sec) {
-               snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
+               snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
                pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
        }
 
        if (chan->cdr->start.tv_sec) {
-               snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
+               snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
                pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
        }
        ast_channel_unlock(chan);
index 21e5c549a70f1db4aa713a970c5cd007a8516f14..8f982f197aa90c62d90cf36201c7a0bf4efd7128 100644 (file)
@@ -889,12 +889,12 @@ static void end_bridge_callback(void *data)
 
        ast_channel_lock(chan);
        if (chan->cdr->answer.tv_sec) {
-               snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
+               snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
                pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
        }
 
        if (chan->cdr->start.tv_sec) {
-               snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
+               snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
                pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
        }
        ast_channel_unlock(chan);
index e9bc7c07182778b0d5addfa5e490436f08e5fab5..c3a12c0e3d462700ed88a8f2404959d7ccb9bb41 100644 (file)
@@ -171,7 +171,7 @@ static int pgsql_log(struct ast_cdr *cdr)
                        if (strcmp(cur->name, "start") == 0 || strcmp(cur->name, "calldate") == 0) {
                                if (strncmp(cur->type, "int", 3) == 0) {
                                        LENGTHEN_BUF2(12);
-                                       lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->start.tv_sec);
+                                       lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->start.tv_sec);
                                } else if (strncmp(cur->type, "float", 5) == 0) {
                                        LENGTHEN_BUF2(30);
                                        lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->start.tv_sec + (double)cdr->start.tv_usec / 1000000.0);
@@ -184,7 +184,7 @@ static int pgsql_log(struct ast_cdr *cdr)
                        } else if (strcmp(cur->name, "answer") == 0) {
                                if (strncmp(cur->type, "int", 3) == 0) {
                                        LENGTHEN_BUF2(12);
-                                       lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->answer.tv_sec);
+                                       lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->answer.tv_sec);
                                } else if (strncmp(cur->type, "float", 5) == 0) {
                                        LENGTHEN_BUF2(30);
                                        lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->answer.tv_sec + (double)cdr->answer.tv_usec / 1000000.0);
@@ -197,7 +197,7 @@ static int pgsql_log(struct ast_cdr *cdr)
                        } else if (strcmp(cur->name, "end") == 0) {
                                if (strncmp(cur->type, "int", 3) == 0) {
                                        LENGTHEN_BUF2(12);
-                                       lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->end.tv_sec);
+                                       lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->end.tv_sec);
                                } else if (strncmp(cur->type, "float", 5) == 0) {
                                        LENGTHEN_BUF2(30);
                                        lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->end.tv_sec + (double)cdr->end.tv_usec / 1000000.0);
index a1249edc1428ff33171ae0ec931375e231215b1e..e5adb979b2d8324507f10009f2e424af5ec972d5 100644 (file)
@@ -49,7 +49,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__FreeBSD__)
 #include <pthread.h>
 #include <signal.h>
 #else
index 7625a58755a4c30ac711e95fd8c6e245f3231fab..ea072b282733764fc91731ee63d013addbb826af 100644 (file)
@@ -30,6 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/_private.h"
 
 #include <pthread.h>
+#include <signal.h>
 #include <sys/time.h>
 #include <sys/signal.h>
 #include <netinet/in.h>
index b25b8ab1444e3ee4c5567aa70d32a0f33bb1d219..74c441049fdc7f8740b2b47977f8219bcd4d8eae 100644 (file)
@@ -48,6 +48,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include <signal.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <float.h>
index f0c8be13d62df9f23840f994aa29efa89e295284..0a45151ed88cc204e7986e139b6d6f43c45f11ee 100644 (file)
@@ -33,6 +33,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include <fcntl.h>
 #endif
 
+#include <signal.h>
 #include <sys/signal.h>
 
 #include "asterisk/compat.h"
index 2428d5b28b12cfdfaf62baac821561dd16841b9d..85b7f6b59ea4ecf893591be0cc2da374e07df371 100644 (file)
@@ -40,6 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) 
 #include <net/if_dl.h>
 #include <ifaddrs.h>
+#include <signal.h>
 #endif
 
 #include "asterisk/file.h"