cvsdist 2cbdc98
diff -ur unzip-5.51/extract.c unzip-5.51-lhh/extract.c
cvsdist 2cbdc98
--- unzip-5.51/extract.c	2004-04-15 20:58:00.000000000 -0400
cvsdist 2cbdc98
+++ unzip-5.51-lhh/extract.c	2004-06-18 16:26:57.000000000 -0400
cvsdist 2cbdc98
@@ -299,16 +299,16 @@
cvsdist 2cbdc98
      __GDEF
cvsdist 2cbdc98
 {
cvsdist 2cbdc98
     unsigned i, j;
cvsdist 2cbdc98
-    long cd_bufstart;
cvsdist 2cbdc98
+    ulg cd_bufstart;
cvsdist 2cbdc98
     uch *cd_inptr;
cvsdist 2cbdc98
     int cd_incnt;
cvsdist 2cbdc98
     ulg filnum=0L, blknum=0L;
cvsdist 2cbdc98
     int reached_end, no_endsig_found;
cvsdist 2cbdc98
     int error, error_in_archive=PK_COOL;
cvsdist 2cbdc98
     int *fn_matched=NULL, *xn_matched=NULL;
cvsdist 2cbdc98
-    unsigned members_processed;
cvsdist 2cbdc98
+    ulg members_processed;
cvsdist 2cbdc98
     ulg num_skipped=0L, num_bad_pwd=0L;
cvsdist 2cbdc98
-    LONGINT old_extra_bytes = 0L;
cvsdist 2cbdc98
+    ulg old_extra_bytes = 0L;
cvsdist 2cbdc98
 #ifdef SET_DIR_ATTRIB
cvsdist 2cbdc98
     unsigned num_dirs=0;
cvsdist 2cbdc98
     direntry *dirlist=(direntry *)NULL, **sorted_dirlist=(direntry **)NULL;
cvsdist 2cbdc98
@@ -539,7 +539,7 @@
cvsdist 2cbdc98
         G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd);
cvsdist 2cbdc98
 #else /* !USE_STRM_INPUT */
cvsdist 2cbdc98
         G.cur_zipfile_bufstart =
cvsdist 2cbdc98
-          lseek(G.zipfd, (LONGINT)cd_bufstart, SEEK_SET);
cvsdist 2cbdc98
+          lseek64(G.zipfd, (ulg)cd_bufstart, SEEK_SET);
cvsdist 2cbdc98
 #endif /* ?USE_STRM_INPUT */
cvsdist 2cbdc98
         read(G.zipfd, (char *)G.inbuf, INBUFSIZ);  /* been here before... */
cvsdist 2cbdc98
         G.inptr = cd_inptr;
cvsdist 2cbdc98
@@ -902,7 +902,7 @@
cvsdist 2cbdc98
     unsigned i;
cvsdist 2cbdc98
     int renamed, query;
cvsdist 2cbdc98
     int skip_entry;
cvsdist 2cbdc98
-    long bufstart, inbuf_offset, request;
cvsdist 2cbdc98
+    ulg bufstart, inbuf_offset, request;
cvsdist 2cbdc98
     int error, errcode;
cvsdist 2cbdc98
 
cvsdist 2cbdc98
 /* possible values for local skip_entry flag: */
cvsdist 2cbdc98
@@ -936,7 +936,8 @@
cvsdist 2cbdc98
         Trace((stderr,
cvsdist 2cbdc98
           "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n",
cvsdist 2cbdc98
           bufstart, G.cur_zipfile_bufstart));
cvsdist 2cbdc98
-        if (request < 0) {
cvsdist 2cbdc98
+        if (request > MAX_ZIP_SIZE) { /* > 2^32 - 8193 */
cvsdist 2cbdc98
+	    printf("request = 0x%lu\n", (ulg)request);
cvsdist 2cbdc98
             Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg),
cvsdist 2cbdc98
               G.zipfn, LoadFarString(ReportMsg)));
cvsdist 2cbdc98
             error_in_archive = PK_ERR;
cvsdist 2cbdc98
@@ -954,7 +955,8 @@
cvsdist 2cbdc98
                   "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n",
cvsdist 2cbdc98
                   bufstart, G.cur_zipfile_bufstart));
cvsdist 2cbdc98
                 /* try again */
cvsdist 2cbdc98
-                if (request < 0) {
cvsdist 2cbdc98
+        	if (request > MAX_ZIP_SIZE) { /* > 2^32 - 8193 */
cvsdist 2cbdc98
+	            printf("retry - request = 0x%lu\n", (ulg)request);
cvsdist 2cbdc98
                     Trace((stderr,
cvsdist 2cbdc98
                       "debug: recompensated request still < 0\n"));
cvsdist 2cbdc98
                     Info(slide, 0x401, ((char *)slide,
cvsdist 2cbdc98
@@ -976,7 +978,7 @@
cvsdist 2cbdc98
             G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd);
cvsdist 2cbdc98
 #else /* !USE_STRM_INPUT */
cvsdist 2cbdc98
             G.cur_zipfile_bufstart =
cvsdist 2cbdc98
-              lseek(G.zipfd, (LONGINT)bufstart, SEEK_SET);
cvsdist 2cbdc98
+              lseek64(G.zipfd, (ulg)bufstart, SEEK_SET);
cvsdist 2cbdc98
 #endif /* ?USE_STRM_INPUT */
cvsdist 2cbdc98
             if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ)) <= 0)
cvsdist 2cbdc98
             {
cvsdist 2cbdc98
diff -ur unzip-5.51/fileio.c unzip-5.51-lhh/fileio.c
cvsdist 2cbdc98
--- unzip-5.51/fileio.c	2004-05-22 21:01:20.000000000 -0400
cvsdist 2cbdc98
+++ unzip-5.51-lhh/fileio.c	2004-06-18 16:26:57.000000000 -0400
cvsdist 2cbdc98
@@ -112,6 +112,8 @@
cvsdist 2cbdc98
 /****************************/
cvsdist 2cbdc98
 /* Strings used in fileio.c */
cvsdist 2cbdc98
 /****************************/
cvsdist 2cbdc98
+static ZCONST char Far ZipFileTooBig[] =
cvsdist 2cbdc98
+  "error:  Zip file too big (greater than %lu bytes)\n";
cvsdist 2cbdc98
 
cvsdist 2cbdc98
 static ZCONST char Far CannotOpenZipfile[] =
cvsdist 2cbdc98
   "error:  cannot open zipfile [ %s ]\n        %s";
cvsdist 2cbdc98
@@ -183,6 +185,7 @@
cvsdist 2cbdc98
 int open_input_file(__G)    /* return 1 if open failed */
cvsdist 2cbdc98
     __GDEF
cvsdist 2cbdc98
 {
cvsdist 2cbdc98
+    struct stat64 sb;
cvsdist 2cbdc98
     /*
cvsdist 2cbdc98
      *  open the zipfile for reading and in BINARY mode to prevent cr/lf
cvsdist 2cbdc98
      *  translation, which would corrupt the bitstreams
cvsdist 2cbdc98
@@ -201,9 +204,9 @@
cvsdist 2cbdc98
     G.zipfd = fopen(G.zipfn, FOPR);
cvsdist 2cbdc98
 #else /* !USE_STRM_INPUT */
cvsdist 2cbdc98
 # ifdef O_BINARY
cvsdist 2cbdc98
-    G.zipfd = open(G.zipfn, O_RDONLY | O_BINARY);
cvsdist 2cbdc98
+    G.zipfd = open(G.zipfn, O_RDONLY | O_BINARY | O_LARGEFILE);
cvsdist 2cbdc98
 # else
cvsdist 2cbdc98
-    G.zipfd = open(G.zipfn, O_RDONLY);
cvsdist 2cbdc98
+    G.zipfd = open(G.zipfn, O_RDONLY | O_LARGEFILE);
cvsdist 2cbdc98
 # endif
cvsdist 2cbdc98
 #endif /* ?USE_STRM_INPUT */
cvsdist 2cbdc98
 #endif /* ?CMS_MVS */
cvsdist 2cbdc98
@@ -221,6 +224,13 @@
cvsdist 2cbdc98
           G.zipfn, strerror(errno)));
cvsdist 2cbdc98
         return 1;
cvsdist 2cbdc98
     }
cvsdist 2cbdc98
+
cvsdist 2cbdc98
+    fstat64(G.zipfd, &sb);
cvsdist 2cbdc98
+    if (sb.st_size > MAX_ZIP_SIZE) {
cvsdist 2cbdc98
+        Info(slide, 0x401, ((char *)slide,
cvsdist 2cbdc98
+			    LoadFarString(ZipFileTooBig),
cvsdist 2cbdc98
+		      	    ((ulg)MAX_ZIP_SIZE)));
cvsdist 2cbdc98
+    }
cvsdist 2cbdc98
     return 0;
cvsdist 2cbdc98
 
cvsdist 2cbdc98
 } /* end function open_input_file() */
cvsdist 2cbdc98
@@ -238,6 +248,7 @@
cvsdist 2cbdc98
 int open_outfile(__G)         /* return 1 if fail */
cvsdist 2cbdc98
     __GDEF
cvsdist 2cbdc98
 {
cvsdist 2cbdc98
+    int fd;
cvsdist 2cbdc98
 #ifdef DLL
cvsdist 2cbdc98
     if (G.redirect_data)
cvsdist 2cbdc98
         return (redirect_outfile(__G) == FALSE);
cvsdist 2cbdc98
@@ -259,7 +270,7 @@
cvsdist 2cbdc98
     }
cvsdist 2cbdc98
 #endif /* BORLAND_STAT_BUG */
cvsdist 2cbdc98
 #ifdef SYMLINKS
cvsdist 2cbdc98
-    if (SSTAT(G.filename, &G.statbuf) == 0 || lstat(G.filename,&G.statbuf) == 0)
cvsdist 2cbdc98
+    if (SSTAT(G.filename, &G.statbuf) == 0 || lstat64(G.filename,&G.statbuf) == 0)
cvsdist 2cbdc98
 #else
cvsdist 2cbdc98
     if (SSTAT(G.filename, &G.statbuf) == 0)
cvsdist 2cbdc98
 #endif /* ?SYMLINKS */
cvsdist 2cbdc98
@@ -413,7 +424,9 @@
cvsdist 2cbdc98
 #endif /* NOVELL_BUG_FAILSAFE */
cvsdist 2cbdc98
     Trace((stderr, "open_outfile:  doing fopen(%s) for writing\n",
cvsdist 2cbdc98
       FnFilter1(G.filename)));
cvsdist 2cbdc98
-    if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) {
cvsdist 2cbdc98
+    
cvsdist 2cbdc98
+    fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT);
cvsdist 2cbdc98
+    if ((G.outfile = fdopen(fd, FOPW)) == (FILE *)NULL) {
cvsdist 2cbdc98
         Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile),
cvsdist 2cbdc98
           FnFilter1(G.filename)));
cvsdist 2cbdc98
         return 1;
cvsdist 2cbdc98
@@ -657,7 +670,7 @@
cvsdist 2cbdc98
 
cvsdist 2cbdc98
 int seek_zipf(__G__ abs_offset)
cvsdist 2cbdc98
     __GDEF
cvsdist 2cbdc98
-    LONGINT abs_offset;
cvsdist 2cbdc98
+    ulg abs_offset;
cvsdist 2cbdc98
 {
cvsdist 2cbdc98
 /*
cvsdist 2cbdc98
  *  Seek to the block boundary of the block which includes abs_offset,
cvsdist 2cbdc98
@@ -678,11 +691,11 @@
cvsdist 2cbdc98
  *  PK_EOF if seeking past end of zipfile
cvsdist 2cbdc98
  *  PK_OK when seek was successful
cvsdist 2cbdc98
  */
cvsdist 2cbdc98
-    LONGINT request = abs_offset + G.extra_bytes;
cvsdist 2cbdc98
-    LONGINT inbuf_offset = request % INBUFSIZ;
cvsdist 2cbdc98
-    LONGINT bufstart = request - inbuf_offset;
cvsdist 2cbdc98
+    ulg request = abs_offset + G.extra_bytes;
cvsdist 2cbdc98
+    ulg inbuf_offset = request % INBUFSIZ;
cvsdist 2cbdc98
+    ulg bufstart = request - inbuf_offset;
cvsdist 2cbdc98
 
cvsdist 2cbdc98
-    if (request < 0) {
cvsdist 2cbdc98
+    if (request > (ulg)MAX_ZIP_SIZE) {
cvsdist 2cbdc98
         Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg),
cvsdist 2cbdc98
              G.zipfn, LoadFarString(ReportMsg)));
cvsdist 2cbdc98
         return(PK_BADERR);
cvsdist 2cbdc98
@@ -694,7 +707,7 @@
cvsdist 2cbdc98
         fseek(G.zipfd, (LONGINT)bufstart, SEEK_SET);
cvsdist 2cbdc98
         G.cur_zipfile_bufstart = ftell(G.zipfd);
cvsdist 2cbdc98
 #else /* !USE_STRM_INPUT */
cvsdist 2cbdc98
-        G.cur_zipfile_bufstart = lseek(G.zipfd, (LONGINT)bufstart, SEEK_SET);
cvsdist 2cbdc98
+        G.cur_zipfile_bufstart = lseek64(G.zipfd, bufstart, SEEK_SET);
cvsdist 2cbdc98
 #endif /* ?USE_STRM_INPUT */
cvsdist 2cbdc98
         Trace((stderr,
cvsdist 2cbdc98
           "       request = %ld, (abs+extra) = %ld, inbuf_offset = %ld\n",
cvsdist 2cbdc98
@@ -1850,7 +1863,7 @@
cvsdist 2cbdc98
         Trace((stderr, "check_for_newer:  doing lstat(%s)\n",
cvsdist 2cbdc98
           FnFilter1(filename)));
cvsdist 2cbdc98
         /* GRR OPTION:  could instead do this test ONLY if G.symlnk is true */
cvsdist 2cbdc98
-        if (lstat(filename, &G.statbuf) == 0) {
cvsdist 2cbdc98
+        if (lstat64(filename, &G.statbuf) == 0) {
cvsdist 2cbdc98
             Trace((stderr,
cvsdist 2cbdc98
               "check_for_newer:  lstat(%s) returns 0:  symlink does exist\n",
cvsdist 2cbdc98
               FnFilter1(filename)));
cvsdist 2cbdc98
@@ -1867,7 +1880,7 @@
cvsdist 2cbdc98
 
cvsdist 2cbdc98
 #ifdef SYMLINKS
cvsdist 2cbdc98
     /* GRR OPTION:  could instead do this test ONLY if G.symlnk is true */
cvsdist 2cbdc98
-    if (lstat(filename, &G.statbuf) == 0 && S_ISLNK(G.statbuf.st_mode)) {
cvsdist 2cbdc98
+    if (lstat64(filename, &G.statbuf) == 0 && S_ISLNK(G.statbuf.st_mode)) {
cvsdist 2cbdc98
         Trace((stderr, "check_for_newer:  %s is a symbolic link\n",
cvsdist 2cbdc98
           FnFilter1(filename)));
cvsdist 2cbdc98
         if (QCOND2 && !IS_OVERWRT_ALL)
cvsdist 2cbdc98
diff -ur unzip-5.51/globals.h unzip-5.51-lhh/globals.h
cvsdist 2cbdc98
--- unzip-5.51/globals.h	2004-02-25 20:23:18.000000000 -0500
cvsdist 2cbdc98
+++ unzip-5.51-lhh/globals.h	2004-06-18 16:26:57.000000000 -0400
cvsdist 2cbdc98
@@ -247,16 +247,20 @@
cvsdist 2cbdc98
 #else
cvsdist 2cbdc98
     int       zipfd;                /* zipfile file handle */
cvsdist 2cbdc98
 #endif
cvsdist 2cbdc98
-    LONGINT   ziplen;
cvsdist 2cbdc98
-    LONGINT   cur_zipfile_bufstart; /* extract_or_test, readbuf, ReadByte */
cvsdist 2cbdc98
-    LONGINT   extra_bytes;          /* used in unzip.c, misc.c */
cvsdist 2cbdc98
+    ulg       ziplen;
cvsdist 2cbdc98
+    ulg       cur_zipfile_bufstart; /* extract_or_test, readbuf, ReadByte */
cvsdist 2cbdc98
+    ulg       extra_bytes;          /* used in unzip.c, misc.c */
cvsdist 2cbdc98
     uch       *extra_field;         /* Unix, VMS, Mac, OS/2, Acorn, ... */
cvsdist 2cbdc98
     uch       *hold;
cvsdist 2cbdc98
 
cvsdist 2cbdc98
     local_file_hdr  lrec;          /* used in unzip.c, extract.c */
cvsdist 2cbdc98
     cdir_file_hdr   crec;          /* used in unzip.c, extract.c, misc.c */
cvsdist 2cbdc98
     ecdir_rec       ecrec;         /* used in unzip.c, extract.c */
cvsdist 2cbdc98
-    struct stat     statbuf;       /* used by main, mapname, check_for_newer */
cvsdist 2cbdc98
+#ifdef _LARGEFILE64_SOURCE
cvsdist 2cbdc98
+    struct stat64   statbuf;       /* used by main, mapname, check_for_newer */
cvsdist 2cbdc98
+#else
cvsdist 2cbdc98
+    struct stat   statbuf;       /* used by main, mapname, check_for_newer */
cvsdist 2cbdc98
+#endif
cvsdist 2cbdc98
 
cvsdist 2cbdc98
     int      mem_mode;
cvsdist 2cbdc98
     uch      *outbufptr;           /* extract.c static */
cvsdist 2cbdc98
diff -ur unzip-5.51/list.c unzip-5.51-lhh/list.c
cvsdist 2cbdc98
--- unzip-5.51/list.c	2004-03-01 14:03:02.000000000 -0500
cvsdist 2cbdc98
+++ unzip-5.51-lhh/list.c	2004-06-21 12:57:05.000000000 -0400
cvsdist 2cbdc98
@@ -62,7 +62,7 @@
cvsdist 2cbdc98
      "%8lu  %-7s%8lu %4s  %02u%c%02u%c%02u %02u:%02u  %08lx %c";
cvsdist 2cbdc98
    static ZCONST char Far LongFileTrailer[] =
cvsdist 2cbdc98
      "--------          -------  ---                       \
cvsdist 2cbdc98
-     -------\n%8lu         %8lu %4s                            %lu file%s\n";
cvsdist 2cbdc98
+     -------\n%8llu         %8llu %4s                            %lu file%s\n";
cvsdist 2cbdc98
 #ifdef OS2_EAS
cvsdist 2cbdc98
    static ZCONST char Far ShortHdrStats[] =
cvsdist 2cbdc98
      "%9lu %6lu %6lu  %02u%c%02u%c%02u %02u:%02u  %c";
cvsdist 2cbdc98
@@ -76,7 +76,7 @@
cvsdist 2cbdc98
    static ZCONST char Far ShortHdrStats[] =
cvsdist 2cbdc98
      "%9lu  %02u%c%02u%c%02u %02u:%02u  %c";
cvsdist 2cbdc98
    static ZCONST char Far ShortFileTrailer[] = " --------       \
cvsdist 2cbdc98
-            -------\n%9lu                   %lu file%s\n";
cvsdist 2cbdc98
+            -------\n%9llu                   %lu file%s\n";
cvsdist 2cbdc98
 #endif /* ?OS2_EAS */
cvsdist 2cbdc98
 #endif /* !WINDLL */
cvsdist 2cbdc98
 
cvsdist 2cbdc98
@@ -105,7 +105,8 @@
cvsdist 2cbdc98
     struct tm *t;
cvsdist 2cbdc98
 #endif
cvsdist 2cbdc98
     unsigned yr, mo, dy, hh, mm;
cvsdist 2cbdc98
-    ulg csiz, tot_csize=0L, tot_ucsize=0L;
cvsdist 2cbdc98
+    ulg csiz;
cvsdist 2cbdc98
+    unsigned long long tot_csize=0, tot_ucsize=0;
cvsdist 2cbdc98
 #ifdef OS2_EAS
cvsdist 2cbdc98
     ulg ea_size, tot_easize=0L, tot_eafiles=0L;
cvsdist 2cbdc98
     ulg acl_size, tot_aclsize=0L, tot_aclfiles=0L;
cvsdist 2cbdc98
diff -ur unzip-5.51/process.c unzip-5.51-lhh/process.c
cvsdist 2cbdc98
--- unzip-5.51/process.c	2003-10-19 18:52:04.000000000 -0400
cvsdist 2cbdc98
+++ unzip-5.51-lhh/process.c	2004-06-18 16:26:57.000000000 -0400
cvsdist 2cbdc98
@@ -915,7 +915,7 @@
cvsdist 2cbdc98
     long searchlen;
cvsdist 2cbdc98
 {
cvsdist 2cbdc98
     int i, numblks, found=FALSE;
cvsdist 2cbdc98
-    LONGINT tail_len;
cvsdist 2cbdc98
+    ulg tail_len;
cvsdist 2cbdc98
     ec_byte_rec byterec;
cvsdist 2cbdc98
 
cvsdist 2cbdc98
 
cvsdist 2cbdc98
@@ -923,8 +923,8 @@
cvsdist 2cbdc98
     Treat case of short zipfile separately.
cvsdist 2cbdc98
   ---------------------------------------------------------------------------*/
cvsdist 2cbdc98
 
cvsdist 2cbdc98
-    if (G.ziplen <= INBUFSIZ) {
cvsdist 2cbdc98
-        lseek(G.zipfd, 0L, SEEK_SET);
cvsdist 2cbdc98
+    if ((unsigned long)G.ziplen <= (unsigned long)INBUFSIZ) {
cvsdist 2cbdc98
+        lseek64(G.zipfd, 0L, SEEK_SET);
cvsdist 2cbdc98
         if ((G.incnt = read(G.zipfd,(char *)G.inbuf,(unsigned int)G.ziplen))
cvsdist 2cbdc98
             == (int)G.ziplen)
cvsdist 2cbdc98
 
cvsdist 2cbdc98
@@ -951,7 +951,7 @@
cvsdist 2cbdc98
             fseek((FILE *)G.zipfd, G.ziplen-tail_len, SEEK_SET);
cvsdist 2cbdc98
             G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd);
cvsdist 2cbdc98
 #else /* !USE_STRM_INPUT */
cvsdist 2cbdc98
-            G.cur_zipfile_bufstart = lseek(G.zipfd, G.ziplen-tail_len,
cvsdist 2cbdc98
+            G.cur_zipfile_bufstart = lseek64(G.zipfd, G.ziplen-tail_len,
cvsdist 2cbdc98
               SEEK_SET);
cvsdist 2cbdc98
 #endif /* ?USE_STRM_INPUT */
cvsdist 2cbdc98
             if ((G.incnt = read(G.zipfd, (char *)G.inbuf,
cvsdist 2cbdc98
@@ -985,7 +985,7 @@
cvsdist 2cbdc98
 
cvsdist 2cbdc98
         for (i = 1;  !found && (i <= numblks);  ++i) {
cvsdist 2cbdc98
             G.cur_zipfile_bufstart -= INBUFSIZ;
cvsdist 2cbdc98
-            lseek(G.zipfd, G.cur_zipfile_bufstart, SEEK_SET);
cvsdist 2cbdc98
+            lseek64(G.zipfd, G.cur_zipfile_bufstart, SEEK_SET);
cvsdist 2cbdc98
             if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ))
cvsdist 2cbdc98
                 != INBUFSIZ)
cvsdist 2cbdc98
                 break;          /* fall through and fail */
cvsdist 2cbdc98
diff -ur unzip-5.51/unix/Makefile unzip-5.51-lhh/unix/Makefile
cvsdist 2cbdc98
--- unzip-5.51/unix/Makefile	2004-06-21 15:07:16.936126502 -0400
cvsdist 2cbdc98
+++ unzip-5.51-lhh/unix/Makefile	2004-06-18 16:26:57.000000000 -0400
cvsdist 2cbdc98
@@ -783,7 +783,7 @@
cvsdist 2cbdc98
 # Linux (Posix, approximately SysV):  virtually any version since before 0.96,
cvsdist 2cbdc98
 # for any platform.  Change "-O" to "-O3" or whatever, as desired...
cvsdist 2cbdc98
 linux_noasm:	unix_make
cvsdist 2cbdc98
-	$(MAKE) unzips CC=gcc LD=gcc CF="$(RPM_OPT_FLAGS) -D_GNU_SOURCE -Wall -I. $(LOC)"
cvsdist 2cbdc98
+	$(MAKE) unzips CC=gcc LD=gcc CF="$(RPM_OPT_FLAGS) -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -Wall -I. $(LOC)"
cvsdist 2cbdc98
 
cvsdist 2cbdc98
 # Linux with lcc compiler:  __inline__ (stat.h) not recognized, and must edit
cvsdist 2cbdc98
 # /usr/include/gnu/types.h to get rid of "long long" if __LCC__ defined.  -O3
cvsdist 2cbdc98
diff -ur unzip-5.51/unzip.h unzip-5.51-lhh/unzip.h
cvsdist 2cbdc98
--- unzip-5.51/unzip.h	2004-05-22 21:04:23.000000000 -0400
cvsdist 2cbdc98
+++ unzip-5.51-lhh/unzip.h	2004-06-18 16:26:57.000000000 -0400
cvsdist 2cbdc98
@@ -591,6 +591,8 @@
cvsdist 2cbdc98
 #define UZ_ST_CONTINUE          0
cvsdist 2cbdc98
 #define UZ_ST_BREAK             1
cvsdist 2cbdc98
 
cvsdist 2cbdc98
+#define MAX_ZIP_SIZE		0xffffdffe
cvsdist 2cbdc98
+
cvsdist 2cbdc98
 
cvsdist 2cbdc98
 /*---------------------------------------------------------------------------
cvsdist 2cbdc98
     Prototypes for public UnZip API (DLL) functions.
cvsdist 2cbdc98
diff -ur unzip-5.51/unzpriv.h unzip-5.51-lhh/unzpriv.h
cvsdist 2cbdc98
--- unzip-5.51/unzpriv.h	2004-03-01 13:09:04.000000000 -0500
cvsdist 2cbdc98
+++ unzip-5.51-lhh/unzpriv.h	2004-06-18 16:26:57.000000000 -0400
cvsdist 2cbdc98
@@ -775,9 +775,9 @@
cvsdist 2cbdc98
 #endif
cvsdist 2cbdc98
 #ifndef SSTAT
cvsdist 2cbdc98
 #  ifdef WILD_STAT_BUG
cvsdist 2cbdc98
-#    define SSTAT(path,pbuf) (iswild(path) || stat(path,pbuf))
cvsdist 2cbdc98
+#    define SSTAT(path,pbuf) (iswild(path) || stat64(path,pbuf))
cvsdist 2cbdc98
 #  else
cvsdist 2cbdc98
-#    define SSTAT stat
cvsdist 2cbdc98
+#    define SSTAT stat64
cvsdist 2cbdc98
 #  endif
cvsdist 2cbdc98
 #endif
cvsdist 2cbdc98
 #ifndef STRNICMP
cvsdist 2cbdc98
@@ -1860,7 +1860,7 @@
cvsdist 2cbdc98
 unsigned readbuf              OF((__GPRO__ char *buf, register unsigned len));
cvsdist 2cbdc98
 int      readbyte             OF((__GPRO));
cvsdist 2cbdc98
 int      fillinbuf            OF((__GPRO));
cvsdist 2cbdc98
-int      seek_zipf            OF((__GPRO__ LONGINT abs_offset));
cvsdist 2cbdc98
+int      seek_zipf            OF((__GPRO__ ulg abs_offset));
cvsdist 2cbdc98
 #ifdef FUNZIP
cvsdist 2cbdc98
    int   flush                OF((__GPRO__ ulg size));  /* actually funzip.c */
cvsdist 2cbdc98
 #else