comparison src/readpstlog.c @ 125:23a36ac0514d

recover dropped pragma pack line, use int64_t rather than off_t to avoid forcing users of the shared library to enable large file support.
author Carl Byington <carl@five-ten-sg.com>
date Tue, 03 Feb 2009 15:01:47 -0800
parents ab2a11e72250
children fc11b1d1ad34
comparison
equal deleted inserted replaced
124:cbf63dd3f109 125:23a36ac0514d
66 } 66 }
67 67
68 buf = (char*) xmalloc(BUF_SIZE); 68 buf = (char*) xmalloc(BUF_SIZE);
69 69
70 while (!stop) { 70 while (!stop) {
71 uint64_t temp; 71 int64_t temp;
72 if (fread(&temp, sizeof(uint64_t), 1, fp)<=0) break; 72 if (fread(&temp, sizeof(int64_t), 1, fp)<=0) break;
73 x = (int)temp; 73 x = (int)temp;
74 ptr = 0; 74 ptr = 0;
75 if (x > 0) { 75 if (x > 0) {
76 uint64_t i[x+1]; // plus 1 because we want to read the offset of the next index 76 int64_t i[x+1]; // plus 1 because we want to read the offset of the next index
77 if (get(i, sizeof(uint64_t), x+1, fp)==0) { 77 if (get(i, sizeof(int64_t), x+1, fp)==0) {
78 // we have reached the end of the debug file 78 // we have reached the end of the debug file
79 printf("oh dear. we must now end\n"); 79 printf("oh dear. we must now end\n");
80 break; 80 break;
81 } 81 }
82 while (ptr < x) { 82 while (ptr < x) {