aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/library.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-02-08 15:22:21 +0000
committerMartin Willi <martin@strongswan.org>2007-02-08 15:22:21 +0000
commit7006a51efc3caaa8139b3d09cdef4c3692c0f3a4 (patch)
treec2f1ffff871c5a663032344651eeff82ff968d41 /src/libstrongswan/library.c
parent61c0e0f220c101677307edab1b2e1716e1f44c90 (diff)
downloadstrongswan-7006a51efc3caaa8139b3d09cdef4c3692c0f3a4.tar.bz2
strongswan-7006a51efc3caaa8139b3d09cdef4c3692c0f3a4.tar.xz
removed my time_t printf handler patch, applied the one of andreas (64bit save)
Diffstat (limited to 'src/libstrongswan/library.c')
-rw-r--r--src/libstrongswan/library.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c
index c8c8085d2..ce3f827fa 100644
--- a/src/libstrongswan/library.c
+++ b/src/libstrongswan/library.c
@@ -105,7 +105,7 @@ static int print_time(FILE *stream, const struct printf_info *info,
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
- time_t time = *((time_t*)(args[0]));
+ time_t *time = *((time_t**)(args[0]));
bool utc = TRUE;
struct tm t;
@@ -120,11 +120,11 @@ static int print_time(FILE *stream, const struct printf_info *info,
}
if (utc)
{
- gmtime_r(&time, &t);
+ gmtime_r(time, &t);
}
else
{
- localtime_r(&time, &t);
+ localtime_r(time, &t);
}
return fprintf(stream, "%s %02d %02d:%02d:%02d%s%04d",
months[t.tm_mon], t.tm_mday, t.tm_hour, t.tm_min,
@@ -137,9 +137,9 @@ static int print_time(FILE *stream, const struct printf_info *info,
static int print_time_delta(FILE *stream, const struct printf_info *info,
const void *const *args)
{
- time_t start = *((time_t*)(args[0]));
- time_t end = *((time_t*)(args[1]));
- u_int delta = abs(end - start);
+ time_t *start = *((time_t**)(args[0]));
+ time_t *end = *((time_t**)(args[1]));
+ u_int delta = abs(*end - *start);
char* unit = "second";
@@ -166,6 +166,6 @@ static int print_time_delta(FILE *stream, const struct printf_info *info,
*/
static void __attribute__ ((constructor))print_register()
{
- register_printf_function(PRINTF_TIME, print_time, arginfo_int_alt_int_int);
- register_printf_function(PRINTF_TIME_DELTA, print_time_delta, arginfo_int_int);
+ register_printf_function(PRINTF_TIME, print_time, arginfo_ptr_alt_ptr_int);
+ register_printf_function(PRINTF_TIME_DELTA, print_time_delta, arginfo_ptr_ptr);
}