From faf1b27f38cf9b051d88e5836f0014abe545a913 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 22 Jul 2008 17:27:23 +0000 Subject: [PATCH] 2008-07-22 19:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbmzip/zip.c * set OS version information in ZIP header when ZIP archive is created by *nix Harbour build. It's necessary to inform some zip packages (f.e. infozip/unzip) that they should respect POSIX file permission during decompression. --- harbour/ChangeLog | 7 +++++++ harbour/contrib/hbmzip/zip.c | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 17c2dffb10..374127d092 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,13 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-07-22 19:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbmzip/zip.c + * set OS version information in ZIP header when ZIP archive is + created by *nix Harbour build. It's necessary to inform some + zip packages (f.e. infozip/unzip) that they should respect POSIX + file permission during decompression. + 2008-07-22 17:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbmzip/hbmzip.c ! fixed storing/setting file date, time and attributes in *nixes diff --git a/harbour/contrib/hbmzip/zip.c b/harbour/contrib/hbmzip/zip.c index fea84fa571..be1c6b54ce 100644 --- a/harbour/contrib/hbmzip/zip.c +++ b/harbour/contrib/hbmzip/zip.c @@ -36,7 +36,16 @@ /* compile with -Dlocal if your debugger can't find static symbols */ #ifndef VERSIONMADEBY -# define VERSIONMADEBY (0x0) /* platform depedent */ + +#include "hbdefs.h" + +# if defined( HB_OS_UNIX ) +# define VERSIONMADEBY_HI 0x03 /* it's necessary for file attributes in unzip */ +# else +# define VERSIONMADEBY_HI 0x00 +# endif + +# define VERSIONMADEBY (0x0|(VERSIONMADEBY_HI<<8)) /* platform depedent */ #endif #ifndef Z_BUFSIZE