From owner-p4-projects@FreeBSD.ORG Mon Aug 11 08:18:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0508F1065671; Mon, 11 Aug 2008 08:18:04 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD3F1106567E for ; Mon, 11 Aug 2008 08:18:03 +0000 (UTC) (envelope-from strauss@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A861C8FC0C for ; Mon, 11 Aug 2008 08:18:03 +0000 (UTC) (envelope-from strauss@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7B8I37e065494 for ; Mon, 11 Aug 2008 08:18:03 GMT (envelope-from strauss@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7B8I3u1065492 for perforce@freebsd.org; Mon, 11 Aug 2008 08:18:03 GMT (envelope-from strauss@FreeBSD.org) Date: Mon, 11 Aug 2008 08:18:03 GMT Message-Id: <200808110818.m7B8I3u1065492@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to strauss@FreeBSD.org using -f From: Anselm Strauss To: Perforce Change Reviews Cc: Subject: PERFORCE change 147137 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 08:18:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=147137 Change 147137 by strauss@strauss_marvelman on 2008/08/11 08:17:38 ZIP version information Affected files ... .. //depot/projects/soc2008/strauss_libarchive/libarchive/archive_write_set_format_zip.c#28 edit .. //depot/projects/soc2008/strauss_libarchive/libarchive/test/test_write_format_zip_no_compression.c#8 edit Differences ... ==== //depot/projects/soc2008/strauss_libarchive/libarchive/archive_write_set_format_zip.c#28 (text+ko) ==== @@ -34,15 +34,17 @@ #endif #include +#include "archive.h" +#include "archive_entry.h" +#include "archive_private.h" +#include "archive_write_private.h" + #define ZIP_SIGNATURE_LOCAL_FILE_HEADER 0x04034b50 #define ZIP_SIGNATURE_DATA_DESCRIPTOR 0x08074b50 #define ZIP_SIGNATURE_FILE_HEADER 0x02014b50 #define ZIP_SIGNATURE_CENTRAL_DIRECTORY_END 0x06054b50 - -#include "archive.h" -#include "archive_entry.h" -#include "archive_private.h" -#include "archive_write_private.h" +#define ZIP_VERSION_EXTRACT 0x0014 /* ZIP version 2.0 is needed. */ +#define ZIP_VERSION_BY 0x0314 /* Made by UNIX, using ZIP version 2.0. */ static ssize_t archive_write_zip_data(struct archive_write *, const void *buff, size_t s); static int archive_write_zip_finish(struct archive_write *); @@ -202,7 +204,7 @@ */ memset(&h, 0, sizeof(h)); zip_encode(ZIP_SIGNATURE_LOCAL_FILE_HEADER, &h.signature, sizeof(h.signature)); - zip_encode(0x0200, &h.version, sizeof(h.version)); + zip_encode(ZIP_VERSION_EXTRACT, &h.version, sizeof(h.version)); zip_encode(0x4, &h.flags, sizeof(h.flags)); /* Flagging bit 3 for using data descriptor. */ zip_encode(dos_time(archive_entry_mtime(entry)), &h.timedate, sizeof(h.timedate)); zip_encode(strlen(path), &h.filename_length, sizeof(h.filename_length)); @@ -285,7 +287,6 @@ * Fields not used are: * * - flags - * - timedate (TODO) * - extra_length * - comment_length * - disk_number @@ -293,7 +294,8 @@ */ memset(&h, 0, sizeof(h)); zip_encode(ZIP_SIGNATURE_FILE_HEADER, &h.signature, sizeof(h.signature)); - zip_encode(0x0200, &h.version_extract, sizeof(h.version_extract)); + zip_encode(ZIP_VERSION_EXTRACT, &h.version_extract, sizeof(h.version_extract)); + zip_encode(ZIP_VERSION_BY, &h.version_by, sizeof(h.version_by)); entries = 0; offset_start = zip->written_bytes; ==== //depot/projects/soc2008/strauss_libarchive/libarchive/test/test_write_format_zip_no_compression.c#8 (text+ko) ====