switching off_t variables to int64_t
authorMatthew Endsley <mendsley@gmail.com>
Sun, 13 May 2012 00:23:29 +0000 (17:23 -0700)
committerMatthew Endsley <mendsley@gmail.com>
Mon, 14 May 2012 08:04:24 +0000 (01:04 -0700)
bspatch.c

index f4b821c..61ae9eb 100644 (file)
--- a/bspatch.c
+++ b/bspatch.c
@@ -30,15 +30,16 @@ __FBSDID("$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.c,v 1.1 2005/08/06 01:59:
 
 #include <bzlib.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 #include <err.h>
 #include <unistd.h>
 #include <fcntl.h>
 
-static off_t offtin(u_char *buf)
+static int64_t offtin(u_char *buf)
 {
-       off_t y;
+       int64_t y;
 
        y=buf[7]&0x7F;
        y=y*256;y+=buf[6];
@@ -64,10 +65,10 @@ int main(int argc,char * argv[])
        ssize_t bzctrllen,bzdatalen;
        u_char header[32],buf[8];
        u_char *old, *new;
-       off_t oldpos,newpos;
-       off_t ctrl[3];
-       off_t lenread;
-       off_t i;
+       int64_t oldpos,newpos;
+       int64_t ctrl[3];
+       int64_t lenread;
+       int64_t i;
 
        if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]);