From 479a67e629385a2c43bf9383c0c23f5dae032504 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Mon, 8 Sep 2003 16:48:07 +0000 Subject: BSD portability enhancements (bug #234) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1486 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- logger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'logger.c') diff --git a/logger.c b/logger.c index 30d37b11f..36c76e6c5 100755 --- a/logger.c +++ b/logger.c @@ -250,7 +250,7 @@ extern void ast_log(int level, const char *file, int line, const char *function, } else /** Cannot use ast_log() from locked section of ast_log()! ast_log(LOG_WARNING, "Unable to retrieve local time?\n"); **/ - fprintf(stderr, "ast_log: Unable to retrieve local time for %ld?\n", t); + fprintf(stderr, "ast_log: Unable to retrieve local time for %ld?\n", (long)t); } else { if (logfiles) { f = logfiles; @@ -260,12 +260,12 @@ extern void ast_log(int level, const char *file, int line, const char *function, time(&t); localtime_r(&t,&tm); strftime(date, sizeof(date), "%b %e %T", &tm); - fprintf(f->f, "%s %s[%ld]: File %s, Line %d (%s): ", date, levels[level], pthread_self(), file, line, function); + fprintf(f->f, "%s %s[%ld]: File %s, Line %d (%s): ", date, levels[level], (long)pthread_self(), file, line, function); } else { sprintf(linestr, "%d", line); fprintf(f->f, "%s[%ld]: File %s, Line %s (%s): ", term_color(tmp, levels[level], colors[level], 0, sizeof(tmp)), - pthread_self(), + (long)pthread_self(), term_color(tmp2, file, COLOR_BRWHITE, 0, sizeof(tmp2)), term_color(tmp3, linestr, COLOR_BRWHITE, 0, sizeof(tmp3)), term_color(tmp4, function, COLOR_BRWHITE, 0, sizeof(tmp4))); @@ -278,7 +278,7 @@ extern void ast_log(int level, const char *file, int line, const char *function, f = f->next; } } else { - fprintf(stdout, "%s[%ld]: File %s, Line %d (%s): ", levels[level], pthread_self(), file, line, function); + fprintf(stdout, "%s[%ld]: File %s, Line %d (%s): ", levels[level], (long)pthread_self(), file, line, function); va_start(ap, fmt); vfprintf(stdout, fmt, ap); va_end(ap); -- cgit v1.2.3