You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

184 lines
6.1 KiB

Index: unzip60/process.c
--- unzip60/process.c.orig 2009-03-06 02:25:10.000000000 +0100
+++ unzip60/process.c 2014-04-27 00:31:50.875991158 +0200
@@ -1729,6 +1729,13 @@
else if (uO.L_flag > 1) /* let -LL force lower case for all names */
G.pInfo->lcflag = 1;
+ /* Handle the PKWare verification bit, bit 2 (0x0004) of internal
+ attributes. If this is set, then a verification checksum is in the
+ first 3 bytes of the external attributes. In this case all we can use
+ for setting file attributes is the last external attributes byte. */
+ if (G.crec.internal_file_attributes & 0x0004)
+ G.crec.external_file_attributes &= (ulg)0xff;
+
/* do Amigas (AMIGA_) also have volume labels? */
if (IS_VOLID(G.crec.external_file_attributes) &&
(G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ ||
@@ -2897,7 +2904,7 @@
#ifdef IZ_HAVE_UXUIDGID
if (eb_len >= EB_UX3_MINLEN
&& z_uidgid != NULL
- && (*((EB_HEADSIZE + 0) + ef_buf) == 1)
+ && (*((EB_HEADSIZE + 0) + ef_buf) == 1))
/* only know about version 1 */
{
uch uid_size;
@@ -2909,10 +2916,10 @@
flags &= ~0x0ff; /* ignore any previous UNIX field */
if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
- uid_size, z_uidgid[0])
+ uid_size, &z_uidgid[0])
&&
read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf,
- gid_size, z_uidgid[1]) )
+ gid_size, &z_uidgid[1]) )
{
flags |= EB_UX2_VALID; /* signal success */
}
Index: unzip60/unix/unxcfg.h
--- unzip60/unix/unxcfg.h.orig 2009-04-16 20:36:12.000000000 +0200
+++ unzip60/unix/unxcfg.h 2014-04-27 00:31:50.875991158 +0200
@@ -52,6 +52,7 @@
#include <sys/types.h> /* off_t, time_t, dev_t, ... */
#include <sys/stat.h>
+#include <unistd.h>
#ifdef NO_OFF_T
typedef long zoff_t;
Index: zip30/man/zip.1
--- zip30/man/zip.1.orig 2008-06-17 02:39:40.000000000 +0200
+++ zip30/man/zip.1 2014-04-27 00:31:50.866250468 +0200
@@ -13,7 +13,7 @@
.\" 30 August 2007, 27 April 2008, 25 May 2008, 27 May 2008 by EG,
.\" 7 June 2008 by SMS and EG; 12 June 2008 by EG)
.\"
-.TH ZIP 1L "16 June 2008 (v3.0)" Info-ZIP
+.TH ZIP 1 "16 June 2008 (v3.0)" Info-ZIP
.SH NAME
zip \- package and compress (archive) files
.SH SYNOPSIS
@@ -53,14 +53,14 @@
and is compatible with PKZIP (Phil Katz's ZIP for MSDOS systems).
.LP
A companion program
-.RI ( unzip (1L))
+.RI ( unzip (1))
unpacks
.I zip
archives.
The
.I zip
and
-.IR unzip (1L)
+.IR unzip (1)
programs can work with archives produced by PKZIP (supporting
most PKZIP features up to PKZIP version 4.6),
and PKZIP and PKUNZIP can work with archives produced by
@@ -502,7 +502,7 @@
where the option starts with --, has a multicharacter name, can
include a trailing dash to negate the option (if the option
supports it), and can have a value (option argument) specified by
-preceeding it with = (no spaces). Values can also follow the
+preceding it with = (no spaces). Values can also follow the
argument. So
.IP
\fC--before-date=mmddyyyy\fP
@@ -2403,7 +2403,7 @@
.TP
.PD
.B \-\-use\-privileges
-[WIN32] Use priviliges (if granted) to obtain all aspects of WinNT security.
+[WIN32] Use privileges (if granted) to obtain all aspects of WinNT security.
.TP
.PD 0
.B \-@
@@ -2661,10 +2661,10 @@
[VMS] see ZIPOPT
.SH "SEE ALSO"
compress(1),
-shar(1L),
+shar(1),
tar(1),
-unzip(1L),
-gzip(1L)
+unzip(1),
+gzip(1)
.SH DIAGNOSTICS
The exit status (or error level) approximates the exit codes defined by PKWARE
and takes on the following values, except under VMS:
@@ -2756,7 +2756,7 @@
.I zip
handles some of the conversion internally.
When using Kermit to transfer zip files from VMS to MSDOS, type "set
-file type block" on VMS. When transfering from MSDOS to VMS, type
+file type block" on VMS. When transferring from MSDOS to VMS, type
"set file type fixed" on VMS. In both cases, type "set file type
binary" on MSDOS.
.LP
Index: zip30/unix/configure
--- zip30/unix/configure.orig 2008-06-20 05:32:20.000000000 +0200
+++ zip30/unix/configure 2014-04-27 00:31:50.866250468 +0200
@@ -18,7 +18,7 @@
CC=${1-cc}
CFLAGS=${2-"-I. -DUNIX"}
-LFLAGS1=''
+LFLAGS1=${LDFLAGS}
LFLAGS2=''
LN="ln -s"
@@ -218,15 +218,9 @@
echo Check for the C preprocessor
-# on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
-CPP="${CC} -E"
-# solaris as(1) needs -P, maybe others as well ?
-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
-[ -f /lib/cpp ] && CPP=/lib/cpp
-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
-[ -f /xenix ] && CPP="${CC} -E"
-[ -f /lynx.os ] && CPP="${CC} -E"
+# use the OpenPKG GCC cpp binary unconditionally,
+# because on some platforms, the native one is broken
+CPP="@l_cpp@"
echo "#include <stdio.h>" > conftest.c
$CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
Index: zip30/zip.c
--- zip30/zip.c.orig 2008-07-05 18:34:06.000000000 +0200
+++ zip30/zip.c 2014-04-27 00:31:50.875991158 +0200
@@ -1028,7 +1028,7 @@
for (i = 0; i < sizeof(text)/sizeof(char *); i++)
{
- printf(text[i]);
+ printf("%s", text[i]);
putchar('\n');
}
#ifdef DOS
@@ -1225,7 +1225,7 @@
CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE);
for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++)
{
- printf(cryptnote[i]);
+ printf("%s", cryptnote[i]);
putchar('\n');
}
++i; /* crypt support means there IS at least one compilation option */
Index: zip30/zipnote.c
--- zip30/zipnote.c.orig 2008-05-08 10:17:08.000000000 +0200
+++ zip30/zipnote.c 2014-04-27 00:31:50.875991158 +0200
@@ -661,7 +661,7 @@
if ((r = zipcopy(z)) != ZE_OK)
ziperr(r, "was copying an entry");
}
- fclose(x);
+ fclose(in_file);
/* Write central directory and end of central directory with new comments */
if ((c = zftello(y)) == (zoff_t)-1) /* get start of central */