diff src/readpstlog.c @ 48:f66078abed38

more fixes for 64 bit format
author carl
date Fri, 18 Jan 2008 15:07:12 -0800
parents b2a7f2e0926a
children 034641c26ab9
line wrap: on
line diff
--- a/src/readpstlog.c	Sun Jan 13 12:55:59 2008 -0800
+++ b/src/readpstlog.c	Fri Jan 18 15:07:12 2008 -0800
@@ -1,3 +1,5 @@
+#include "define.h"
+
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -10,7 +12,6 @@
 # include "XGetopt.h"
 #endif
 
-#include "define.h"
 
 #define BUF_SIZE 4096
 
@@ -74,7 +75,9 @@
 	buf = (char*) xmalloc(BUF_SIZE);
 
 	while (!stop) {
-		if (fread(&x, sizeof(int), 1, fp)<=0) break;
+        off_t temp;
+		if (fread(&temp, sizeof(off_t), 1, fp)<=0) break;
+        x = (int)temp;
 		ptr = 0;
 		if (x > 0) {
 			if (i) free(i);