use autoconf determined time_t printf format specifier

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4787 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-03-29 04:08:18 +00:00
parent 490f53c183
commit bc8a4855a6
4 changed files with 24 additions and 3 deletions
+1
View File
@@ -15,5 +15,6 @@
@size_t_fmt@
@int64_t_fmt@
@uint64_t_fmt@
@time_t_fmt@
#endif
+10
View File
@@ -213,6 +213,12 @@ typedef intptr_t switch_ssize_t;
#define SWITCH_INT64_T_FMT "I64d"
#define SWITCH_UINT64_T_FMT "I64u"
#ifdef _USE_32BIT_TIME_T
#define TIME_T_FMT "d"
#else
#define TIME_T_FMT SWITCH_INT64_T_FMT
#endif
#else
#ifndef SWITCH_SSIZE_T_FMT
#define SWITCH_SSIZE_T_FMT (sizeof (switch_ssize_t) == sizeof (long) ? "ld" : sizeof (switch_ssize_t) == sizeof (int) ? "d" : "lld")
@@ -230,6 +236,10 @@ typedef intptr_t switch_ssize_t;
#define SWITCH_UINT64_T_FMT (sizeof (long) == 8 ? "lu" : "llu")
#endif
#ifndef TIME_T_FMT
#define TIME_T_FMT "ld"
#endif
#endif
#define SWITCH_TIME_T_FMT SWITCH_INT64_T_FMT
+1 -1
View File
@@ -402,7 +402,7 @@ SWITCH_DECLARE(uint32_t) switch_core_scheduler_add_task(time_t task_runtime,
switch_mutex_unlock(runtime.task_mutex);
tp = container;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Added task %u %s (%s) to run at %ld\n",
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Added task %u %s (%s) to run at %"TIME_T_FMT"\n",
tp->task.task_id, tp->desc, switch_str_nil(tp->task.group), task_runtime);