diff options
author | ache <ache@FreeBSD.org> | 2009-10-26 21:27:24 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2009-10-26 21:27:24 +0800 |
commit | 80e3bba9bfffee68b73cd61c6cf9d1db6f27bcc3 (patch) | |
tree | 08c731efd60bea1fe1cc87dde23fcca73479986e /archivers/unzip/files | |
parent | 620455b7bce167ffc9c82ae3e0657f42d9b8ec4e (diff) | |
download | freebsd-ports-gnome-80e3bba9bfffee68b73cd61c6cf9d1db6f27bcc3.tar.gz freebsd-ports-gnome-80e3bba9bfffee68b73cd61c6cf9d1db6f27bcc3.tar.zst freebsd-ports-gnome-80e3bba9bfffee68b73cd61c6cf9d1db6f27bcc3.zip |
Upgrade to 6.0
PR: 139971
Diffstat (limited to 'archivers/unzip/files')
-rw-r--r-- | archivers/unzip/files/patch-aa | 22 | ||||
-rw-r--r-- | archivers/unzip/files/patch-ab | 16 | ||||
-rw-r--r-- | archivers/unzip/files/patch-fileio.c | 14 | ||||
-rw-r--r-- | archivers/unzip/files/patch-inflate.c | 50 | ||||
-rw-r--r-- | archivers/unzip/files/patch-process.c | 24 | ||||
-rw-r--r-- | archivers/unzip/files/patch-unix_unix.c | 114 | ||||
-rw-r--r-- | archivers/unzip/files/patch-unzpriv.h | 30 |
7 files changed, 27 insertions, 243 deletions
diff --git a/archivers/unzip/files/patch-aa b/archivers/unzip/files/patch-aa index 11c65e78da3e..2ba157517618 100644 --- a/archivers/unzip/files/patch-aa +++ b/archivers/unzip/files/patch-aa @@ -1,6 +1,6 @@ ---- unix/Makefile.orig Mon Mar 1 20:37:24 2004 -+++ unix/Makefile Wed May 26 21:43:04 2004 -@@ -42,7 +42,7 @@ +--- unix/Makefile.orig 2009-01-19 01:41:18.000000000 +0300 ++++ unix/Makefile 2009-10-26 13:15:47.000000000 +0300 +@@ -42,12 +42,12 @@ # such as -DDOSWILD). # UnZip flags @@ -8,15 +8,21 @@ +CC ?= cc# try using "gcc" target rather than changing this (CC and LD LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) AS = as - LOC = $(LOCAL_UNZIP) -@@ -727,8 +727,8 @@ + LOC = $(D_USE_BZ2) $(LOCAL_UNZIP) + AF = $(LOC) +-CFLAGS = -O ++#CFLAGS = -O + CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC) + CF = $(CFLAGS) $(CF_NOOPT) + LFLAGS1 = +@@ -763,8 +763,8 @@ # FreeBSD on Intel: freebsd: unix_make @echo 'NOTE: use bsd target for non-Intel FreeBSD compiles (if any).' - $(MAKE) unzips CC=gcc LD=gcc AS=gcc\ -- CF="-O3 -Wall -I. -DASM_CRC -DUNIX -DBSD $(LOC)"\ +- CFLAGS="-O3 -Wall -DASM_CRC -DBSD"\ + $(MAKE) unzips CC="$(CC)" LD="$(CC)" AS="$(CC)"\ -+ CF="-Wall -I. -DASM_CRC -DUNIX -DBSD $(LOC)"\ - AF="-Di386 $(AF)" CRC32=crc_gcc ++ CF="$(CF) -Wall -DASM_CRC -DBSD"\ + AF="-Di386 $(AF)" CRCA_O=crc_gcc$O # Generic BSDish Unix gcc. ``The -O3 only works with later versions of gcc; diff --git a/archivers/unzip/files/patch-ab b/archivers/unzip/files/patch-ab index 50dfd0b5e7a4..1df0101edef6 100644 --- a/archivers/unzip/files/patch-ab +++ b/archivers/unzip/files/patch-ab @@ -1,11 +1,11 @@ ---- unix/unix.c.bak Wed May 26 21:40:00 2004 -+++ unix/unix.c Wed May 26 21:40:09 2004 -@@ -533,7 +533,7 @@ - - default: - /* allow European characters in filenames: */ -- if (isprint(workch) || (128 <= workch && workch <= 254)) -+ if (isprint(workch) || (128 <= workch && workch <= 255)) +--- unix/unix.c.orig 2009-01-24 02:31:26.000000000 +0300 ++++ unix/unix.c 2009-10-26 13:22:08.000000000 +0300 +@@ -610,7 +610,7 @@ + * else allow 8-bit characters (e.g. UTF-8) in filenames: + */ + if (uO.cflxflag || +- (isprint(workch) || (128 <= workch && workch <= 254))) ++ (isprint(workch) || (128 <= workch && workch <= 255))) *pp++ = (char)workch; } /* end switch */ diff --git a/archivers/unzip/files/patch-fileio.c b/archivers/unzip/files/patch-fileio.c deleted file mode 100644 index 880db03dc700..000000000000 --- a/archivers/unzip/files/patch-fileio.c +++ /dev/null @@ -1,14 +0,0 @@ ---- unzip-5.52.orig/fileio.c -+++ fileio.c -@@ -413,7 +413,11 @@ - #endif /* NOVELL_BUG_FAILSAFE */ - Trace((stderr, "open_outfile: doing fopen(%s) for writing\n", - FnFilter1(G.filename))); -+#if defined(SYMLINKS) || defined(QLZIP) -+ if ((G.outfile = fopen(G.filename, FOPWR)) == (FILE *)NULL) { -+#else - if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) { -+#endif - Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), - FnFilter1(G.filename))); - return 1; diff --git a/archivers/unzip/files/patch-inflate.c b/archivers/unzip/files/patch-inflate.c deleted file mode 100644 index e6d751d20dc7..000000000000 --- a/archivers/unzip/files/patch-inflate.c +++ /dev/null @@ -1,50 +0,0 @@ ---- unzip-5.52.orig/inflate.c -+++ inflate.c -@@ -983,6 +983,7 @@ - unsigned l; /* last length */ - unsigned m; /* mask for bit lengths table */ - unsigned n; /* number of lengths to get */ -+ struct huft *tlp; - struct huft *tl; /* literal/length code table */ - struct huft *td; /* distance code table */ - unsigned bl; /* lookup bits for tl */ -@@ -996,6 +997,8 @@ - int retval = 0; /* error code returned: initialized to "no error" */ - - -+ td = tlp = tl = (struct huft *)NULL; -+ - /* make local bit buffer */ - Trace((stderr, "\ndynamic block")); - b = G.bb; -@@ -1047,9 +1050,9 @@ - while (i < n) - { - NEEDBITS(bl) -- j = (td = tl + ((unsigned)b & m))->b; -+ j = (tlp = tl + ((unsigned)b & m))->b; - DUMPBITS(j) -- j = td->v.n; -+ j = tlp->v.n; - if (j < 16) /* length of code in bits (0..15) */ - ll[i++] = l = j; /* save last length in l */ - else if (j == 16) /* repeat last length 3 to 6 times */ -@@ -1141,6 +1144,7 @@ - huft_free(td); - } - huft_free(tl); -+ - return retval; - } - -@@ -1149,8 +1153,8 @@ - - cleanup_and_exit: - /* free the decoding tables, return */ -- huft_free(tl); -- huft_free(td); -+ if (tl) huft_free(tl); -+ if (td) huft_free(td); - return retval; - } - diff --git a/archivers/unzip/files/patch-process.c b/archivers/unzip/files/patch-process.c index 62e51b6ce9b6..089210d1f4b4 100644 --- a/archivers/unzip/files/patch-process.c +++ b/archivers/unzip/files/patch-process.c @@ -1,30 +1,16 @@ ---- unzip-5.52.orig/process.c -+++ process.c -@@ -74,20 +74,20 @@ +--- process.c.orig 2009-03-06 04:25:10.000000000 +0300 ++++ process.c 2009-10-26 16:08:15.000000000 +0300 +@@ -101,10 +101,10 @@ /* do_seekable() strings */ # ifdef UNIX static ZCONST char Far CannotFindZipfileDirMsg[] = - "%s: cannot find zipfile directory in one of %s or\n\ - %s%s.zip, and cannot find %s, period.\n"; + "%s: cannot find zipfile directory in one of %.512s or\n\ -+ %s%.512s.zip, and cannot find %.512s, period.\n"; ++ %s%.512s.zip, and cannot find %.512s, period.\n"; static ZCONST char Far CannotFindEitherZipfile[] = - "%s: cannot find or open %s, %s.zip or %s.\n"; + "%s: cannot find or open %.512s, %.512s.zip or %.512s.\n"; # else /* !UNIX */ - # ifndef AMIGA - static ZCONST char Far CannotFindWildcardMatch[] = -- "%s: cannot find any matches for wildcard specification \"%s\".\n"; -+ "%s: cannot find any matches for wildcard specification \"%.512s\".\n"; - # endif /* !AMIGA */ static ZCONST char Far CannotFindZipfileDirMsg[] = -- "%s: cannot find zipfile directory in %s,\n\ -- %sand cannot find %s, period.\n"; -+ "%s: cannot find zipfile directory in %.512s,\n\ -+ %sand cannot find %.512s, period.\n"; - static ZCONST char Far CannotFindEitherZipfile[] = -- "%s: cannot find either %s or %s.\n"; -+ "%s: cannot find either %.512s or %.512s.\n"; - # endif /* ?UNIX */ - extern ZCONST char Far Zipnfo[]; /* in unzip.c */ - #ifndef WINDLL + "%s: cannot find zipfile directory in %s,\n\ diff --git a/archivers/unzip/files/patch-unix_unix.c b/archivers/unzip/files/patch-unix_unix.c deleted file mode 100644 index cf04c3b118e4..000000000000 --- a/archivers/unzip/files/patch-unix_unix.c +++ /dev/null @@ -1,114 +0,0 @@ ---- unzip-5.52.orig/unix/unix.c -+++ unix/unix.c -@@ -1042,8 +1042,6 @@ - ush z_uidgid[2]; - int have_uidgid_flg; - -- fclose(G.outfile); -- - /*--------------------------------------------------------------------------- - If symbolic links are supported, allocate storage for a symlink control - structure, put the uncompressed "data" and other required info in it, and -@@ -1063,6 +1061,7 @@ - Info(slide, 0x201, ((char *)slide, - "warning: symbolic link (%s) failed: mem alloc overflow\n", - FnFilter1(G.filename))); -+ fclose(G.outfile); - return; - } - -@@ -1070,6 +1069,7 @@ - Info(slide, 0x201, ((char *)slide, - "warning: symbolic link (%s) failed: no mem\n", - FnFilter1(G.filename))); -+ fclose(G.outfile); - return; - } - slnk_entry->next = NULL; -@@ -1079,11 +1079,10 @@ - slnk_entry->fname = slnk_entry->target + ucsize + 1; - strcpy(slnk_entry->fname, G.filename); - -- /* reopen the "link data" file for reading */ -- G.outfile = fopen(G.filename, FOPR); -+ /* move back to the start of the file to re-read the "link data" */ -+ rewind(G.outfile); - -- if (!G.outfile || -- fread(slnk_entry->target, 1, ucsize, G.outfile) != (int)ucsize) -+ if (fread(slnk_entry->target, 1, ucsize, G.outfile) != (int)ucsize) - { - Info(slide, 0x201, ((char *)slide, - "warning: symbolic link (%s) failed\n", -@@ -1115,12 +1114,20 @@ - } - #endif - -+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD)) -+ fclose(G.outfile); -+#endif -+ - have_uidgid_flg = get_extattribs(__G__ &(zt.t3), z_uidgid); - - /* if -X option was specified and we have UID/GID info, restore it */ - if (have_uidgid_flg) { - TTrace((stderr, "close_outfile: restoring Unix UID/GID info\n")); -+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD)) - if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1])) -+#else -+ if (fchown(fileno(G.outfile), (uid_t)z_uidgid[0], (gid_t)z_uidgid[1])) -+#endif - { - if (uO.qflag) - Info(slide, 0x201, ((char *)slide, -@@ -1133,6 +1140,18 @@ - } - } - -+#if (!defined(NO_FCHOWN) && !defined(NO_FCHMOD)) -+/*--------------------------------------------------------------------------- -+ Change the file permissions from default ones to those stored in the -+ zipfile. -+ ---------------------------------------------------------------------------*/ -+ -+ if (fchmod(fileno(G.outfile), filtattr(__G__ G.pInfo->file_attr))) -+ perror("chmod (file attributes) error"); -+ -+ fclose(G.outfile); -+#endif /* !NO_FCHOWN && !NO_FCHMOD */ -+ - /* set the file's access and modification times */ - if (utime(G.filename, &(zt.t2))) { - #ifdef AOS_VS -@@ -1151,6 +1170,7 @@ - #endif /* ?AOS_VS */ - } - -+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD)) - /*--------------------------------------------------------------------------- - Change the file permissions from default ones to those stored in the - zipfile. -@@ -1160,6 +1180,7 @@ - if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr))) - perror("chmod (file attributes) error"); - #endif -+#endif /* NO_FCHOWN || NO_FCHMOD */ - - } /* end function close_outfile() */ - -@@ -1640,7 +1661,6 @@ - - if ((long)LG(dlen) > 0) - { -- G.outfile = fopen(G.filename,"r+"); - fseek(G.outfile, -8, SEEK_END); - fread(&ntc, 8, 1, G.outfile); - if(ntc.id != *(long *)"XTcc") -@@ -1650,7 +1670,6 @@ - fwrite (&ntc, 8, 1, G.outfile); - } - Info(slide, 0x201, ((char *)slide, "QData = %d", LG(dlen))); -- fclose(G.outfile); - } - return; /* finished, cancel further extra field scanning */ - } diff --git a/archivers/unzip/files/patch-unzpriv.h b/archivers/unzip/files/patch-unzpriv.h deleted file mode 100644 index a7902b2aa3f9..000000000000 --- a/archivers/unzip/files/patch-unzpriv.h +++ /dev/null @@ -1,30 +0,0 @@ ---- unzip-5.52.orig/unzpriv.h -+++ unzpriv.h -@@ -1081,6 +1081,7 @@ - # define FOPR "r","ctx=stm" - # define FOPM "r+","ctx=stm","rfm=fix","mrs=512" - # define FOPW "w","ctx=stm","rfm=fix","mrs=512" -+# define FOPWR "w+","ctx=stm","rfm=fix","mrs=512" - #endif /* VMS */ - - #ifdef CMS_MVS -@@ -1117,6 +1118,9 @@ - # ifndef FOPWT - # define FOPWT "wt" - # endif -+# ifndef FOPWR -+# define FOPWR "w+b" -+# endif - #else /* !MODERN */ - # ifndef FOPR - # define FOPR "r" -@@ -1130,6 +1134,9 @@ - # ifndef FOPWT - # define FOPWT "w" - # endif -+# ifndef FOPWR -+# define FOPWR "w+b" -+# endif - #endif /* ?MODERN */ - - /* |