summaryrefslogtreecommitdiff
path: root/comms/fidogate/patches/patch-ao
blob: 57d5ceb624792a785d2b0c48429bfab494ba5ab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-ao,v 1.2 2004/08/23 15:18:02 tv Exp $

--- src/toss/ftnexpire.c.orig	2003-02-16 10:39:02.000000000 -0500
+++ src/toss/ftnexpire.c
@@ -112,7 +112,7 @@ int do_expire(void)
     if(exp_sec < 0)
 	exp_sec = 0;
     debug(4, "expire: now=%ld max=%ld, expire < %ld",
-	  now_sec, max_sec, exp_sec                   );
+	  (long) now_sec, (long) max_sec, (long) exp_sec                   );
 
     /* Open old history for reading */
     if( (hi_o = fopen(history, R_MODE)) == NULL ) 
@@ -222,7 +222,7 @@ int do_line(FILE *hi_n, char *line)
     t = atol(p);
     expired = t < exp_sec;
     debug(7, "msgid=%s  time=%ld  expired=%s",
-	  msgid, t, expired ? "YES" : "NO"     );
+	  msgid,(long) t, expired ? "YES" : "NO"     );
 
     /* Write if not expired */
     if(!expired) 
@@ -235,7 +235,7 @@ int do_line(FILE *hi_n, char *line)
 	}
 	
 	/* Write MSGID line to history text file */
-	ret = fprintf(hi_n, "%s\t%ld\n", msgid, t);
+	ret = fprintf(hi_n, "%s\t%ld\n", msgid, (long) t);
 	if (ret == ERROR || fflush(hi_n) == ERROR)
 	{
 	    log("$ERROR: write to MSGID history failed");
@@ -390,7 +390,7 @@ int main(int argc, char **argv)
     /* Statistics */
     log("ids processed: %ld total, %ld expired in %ld s, %.2f ids/s",
 	n_processed, n_expired,
-	expire_delta, (double)n_processed/expire_delta);
+	(long) expire_delta, (double)n_processed/expire_delta);
     
     unlock_program(DEFAULT_LOCK_HISTORY);