File libzip-fix-large-file-support.patch of Package libzip
diff -u a/lib/mkstemp.c b/lib/mkstemp.c
--- a/lib/mkstemp.c 2012-01-16 15:28:26.000000000 +0100
+++ b/lib/mkstemp.c 2014-10-21 23:36:46.952254942 +0200
@@ -31,6 +31,10 @@
* SUCH DAMAGE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
diff -u a/lib/zip_add_entry.c b/lib/zip_add_entry.c
--- a/lib/zip_add_entry.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_add_entry.c 2014-10-21 23:35:55.056256870 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
/* NOTE: Signed due to -1 on error. See zip_add.c for more details. */
diff -u a/lib/zip_dir_add.c b/lib/zip_dir_add.c
--- a/lib/zip_dir_add.c 2013-09-22 11:35:53.000000000 +0200
+++ b/lib/zip_dir_add.c 2014-10-21 23:33:53.984261370 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
/* NOTE: Signed due to -1 on error. See zip_add.c for more details. */
diff -u a/lib/zip_dirent.c b/lib/zip_dirent.c
--- a/lib/zip_dirent.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_dirent.c 2014-10-21 23:33:48.848261560 +0200
@@ -33,6 +33,8 @@
+#include "zipint.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -40,8 +42,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include "zipint.h"
-
static time_t _zip_d2u_time(zip_uint16_t, zip_uint16_t);
static struct zip_string *_zip_read_string(const unsigned char **, FILE *, zip_uint16_t, int, struct zip_error *);
static struct zip_string *_zip_dirent_process_ef_utf_8(const struct zip_dirent *, zip_uint16_t, struct zip_string *);
diff -u a/lib/zip_discard.c b/lib/zip_discard.c
--- a/lib/zip_discard.c 2013-09-22 11:35:53.000000000 +0200
+++ b/lib/zip_discard.c 2014-10-21 23:33:42.760261787 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
/* zip_discard:
diff -u a/lib/zip_error.c b/lib/zip_error.c
--- a/lib/zip_error.c 2013-03-14 12:24:27.000000000 +0100
+++ b/lib/zip_error.c 2014-10-21 23:33:34.560262091 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
void
diff -u a/lib/zip_error_strerror.c b/lib/zip_error_strerror.c
--- a/lib/zip_error_strerror.c 2012-01-16 15:28:26.000000000 +0100
+++ b/lib/zip_error_strerror.c 2014-10-21 23:33:27.736262345 +0200
@@ -33,13 +33,13 @@
+#include "zipint.h"
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
const char *
diff -u a/lib/zip_error_to_str.c b/lib/zip_error_to_str.c
--- a/lib/zip_error_to_str.c 2012-01-16 15:28:26.000000000 +0100
+++ b/lib/zip_error_to_str.c 2014-10-21 23:33:22.232262549 +0200
@@ -33,13 +33,13 @@
+#include "zipint.h"
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
ZIP_EXTERN int
diff -u a/lib/zip_fclose.c b/lib/zip_fclose.c
--- a/lib/zip_fclose.c 2013-10-24 11:07:35.000000000 +0200
+++ b/lib/zip_fclose.c 2014-10-21 23:33:08.720263052 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN int
diff -u a/lib/zip_file_get_offset.c b/lib/zip_file_get_offset.c
--- a/lib/zip_file_get_offset.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_file_get_offset.c 2014-10-21 23:32:58.128263445 +0200
@@ -33,6 +33,8 @@
+#include "zipint.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -40,8 +42,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include "zipint.h"
-
/* _zip_file_get_offset(za, ze):
diff -u a/lib/zip_filerange_crc.c b/lib/zip_filerange_crc.c
--- a/lib/zip_filerange_crc.c 2013-03-14 12:24:51.000000000 +0100
+++ b/lib/zip_filerange_crc.c 2014-10-21 23:32:52.104263669 +0200
@@ -33,11 +33,10 @@
-#include <stdio.h>
-#include <errno.h>
-
#include "zipint.h"
+#include <stdio.h>
+#include <errno.h>
diff -u a/lib/zip_file_rename.c b/lib/zip_file_rename.c
--- a/lib/zip_file_rename.c 2012-05-18 19:53:55.000000000 +0200
+++ b/lib/zip_file_rename.c 2014-10-21 23:32:42.648264020 +0200
@@ -33,10 +33,10 @@
-#include <string.h>
-
#include "zipint.h"
+#include <string.h>
+
ZIP_EXTERN int
diff -u a/lib/zip_file_set_comment.c b/lib/zip_file_set_comment.c
--- a/lib/zip_file_set_comment.c 2013-03-14 21:37:01.000000000 +0100
+++ b/lib/zip_file_set_comment.c 2014-10-21 23:32:37.000264230 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN int
diff -u a/lib/zip_fopen_index.c b/lib/zip_fopen_index.c
--- a/lib/zip_fopen_index.c 2013-03-14 12:25:01.000000000 +0100
+++ b/lib/zip_fopen_index.c 2014-10-21 23:32:29.952264492 +0200
@@ -33,12 +33,12 @@
+#include "zipint.h"
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include "zipint.h"
-
ZIP_EXTERN struct zip_file *
diff -u a/lib/zip_fopen_index_encrypted.c b/lib/zip_fopen_index_encrypted.c
--- a/lib/zip_fopen_index_encrypted.c 2013-03-20 00:33:41.000000000 +0100
+++ b/lib/zip_fopen_index_encrypted.c 2014-10-21 23:32:24.248264704 +0200
@@ -33,12 +33,12 @@
+#include "zipint.h"
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include "zipint.h"
-
static struct zip_file *_zip_file_new(struct zip *za);
diff -u a/lib/zip_get_archive_comment.c b/lib/zip_get_archive_comment.c
--- a/lib/zip_get_archive_comment.c 2012-07-27 17:49:05.000000000 +0200
+++ b/lib/zip_get_archive_comment.c 2014-10-21 23:32:18.216264928 +0200
@@ -33,10 +33,10 @@
-#include <string.h>
-
#include "zipint.h"
+#include <string.h>
+
ZIP_EXTERN const char *
diff -u a/lib/zip_get_name.c b/lib/zip_get_name.c
--- a/lib/zip_get_name.c 2012-10-12 10:17:08.000000000 +0200
+++ b/lib/zip_get_name.c 2014-10-21 23:32:11.176265190 +0200
@@ -33,10 +33,10 @@
-#include <string.h>
-
#include "zipint.h"
+#include <string.h>
+
ZIP_EXTERN const char *
diff -u a/lib/zipint.h b/lib/zipint.h
--- a/lib/zipint.h 2013-11-28 11:27:17.000000000 +0100
+++ b/lib/zipint.h 2014-10-21 23:38:48.448250427 +0200
@@ -34,6 +34,10 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/* to have *_MAX definitions for all types when compiling with g++ */
#define __STDC_LIMIT_MACROS
@@ -50,7 +54,6 @@
#endif
#include "zip.h"
-#include "config.h"
#ifdef HAVE_MOVEFILEEXA
#include <windows.h>
diff -u a/lib/zip_memdup.c b/lib/zip_memdup.c
--- a/lib/zip_memdup.c 2012-03-20 13:54:38.000000000 +0100
+++ b/lib/zip_memdup.c 2014-10-21 23:32:04.792265427 +0200
@@ -31,11 +31,11 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
void *
diff -u a/lib/zip_name_locate.c b/lib/zip_name_locate.c
--- a/lib/zip_name_locate.c 2012-08-11 02:39:10.000000000 +0200
+++ b/lib/zip_name_locate.c 2014-10-21 23:32:00.152265600 +0200
@@ -33,13 +33,13 @@
+#include "zipint.h"
+
#include <string.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
-#include "zipint.h"
-
ZIP_EXTERN zip_int64_t
diff -u a/lib/zip_new.c b/lib/zip_new.c
--- a/lib/zip_new.c 2013-02-20 10:28:23.000000000 +0100
+++ b/lib/zip_new.c 2014-10-21 23:31:54.728265801 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
/* _zip_new:
diff -u a/lib/zip_open.c b/lib/zip_open.c
--- a/lib/zip_open.c 2013-12-19 12:38:36.000000000 +0100
+++ b/lib/zip_open.c 2014-10-21 23:31:50.360265964 +0200
@@ -33,6 +33,8 @@
+#include "zipint.h"
+
#include <sys/stat.h>
#include <errno.h>
#include <limits.h>
@@ -40,8 +42,6 @@
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
static void set_error(int *, const struct zip_error *, int);
static struct zip *_zip_allocate_new(const char *, unsigned int, int *);
static zip_int64_t _zip_checkcons(FILE *, struct zip_cdir *, struct zip_error *);
diff -u a/lib/zip_rename.c b/lib/zip_rename.c
--- a/lib/zip_rename.c 2012-07-21 11:00:13.000000000 +0200
+++ b/lib/zip_rename.c 2014-10-21 23:31:45.480266145 +0200
@@ -33,11 +33,11 @@
-#include <string.h>
-
#define _ZIP_COMPILING_DEPRECATED
#include "zipint.h"
+#include <string.h>
+
ZIP_EXTERN int
diff -u a/lib/zip_set_archive_comment.c b/lib/zip_set_archive_comment.c
--- a/lib/zip_set_archive_comment.c 2013-03-14 12:25:16.000000000 +0100
+++ b/lib/zip_set_archive_comment.c 2014-10-21 23:31:36.344266484 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN int
diff -u a/lib/zip_set_default_password.c b/lib/zip_set_default_password.c
--- a/lib/zip_set_default_password.c 2012-01-16 15:28:26.000000000 +0100
+++ b/lib/zip_set_default_password.c 2014-10-21 23:31:30.944266685 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
ZIP_EXTERN int
diff -u a/lib/zip_set_file_comment.c b/lib/zip_set_file_comment.c
--- a/lib/zip_set_file_comment.c 2013-03-14 21:41:31.000000000 +0100
+++ b/lib/zip_set_file_comment.c 2014-10-21 23:31:26.112266865 +0200
@@ -33,11 +33,11 @@
-#include <stdlib.h>
-
#define _ZIP_COMPILING_DEPRECATED
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN int
diff -u a/lib/zip_set_name.c b/lib/zip_set_name.c
--- a/lib/zip_set_name.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_set_name.c 2014-10-21 23:31:14.096267311 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
int
diff -u a/lib/zip_source_buffer.c b/lib/zip_source_buffer.c
--- a/lib/zip_source_buffer.c 2012-07-27 17:49:05.000000000 +0200
+++ b/lib/zip_source_buffer.c 2014-10-21 23:31:09.672267475 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
struct read_data {
const char *buf, *data, *end;
time_t mtime;
diff -u a/lib/zip_source_crc.c b/lib/zip_source_crc.c
--- a/lib/zip_source_crc.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_source_crc.c 2014-10-21 23:31:04.144267681 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
struct crc_context {
int eof;
int validate;
diff -u a/lib/zip_source_deflate.c b/lib/zip_source_deflate.c
--- a/lib/zip_source_deflate.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_source_deflate.c 2014-10-21 23:30:58.880267877 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
struct deflate {
int e[2];
diff -u a/lib/zip_source_file.c b/lib/zip_source_file.c
--- a/lib/zip_source_file.c 2012-01-16 15:28:26.000000000 +0100
+++ b/lib/zip_source_file.c 2014-10-21 23:30:52.576268111 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <errno.h>
#include <stdio.h>
-#include "zipint.h"
-
ZIP_EXTERN struct zip_source *
diff -u a/lib/zip_source_filep.c b/lib/zip_source_filep.c
--- a/lib/zip_source_filep.c 2013-09-22 11:35:53.000000000 +0200
+++ b/lib/zip_source_filep.c 2014-10-21 23:30:47.608268295 +0200
@@ -33,14 +33,14 @@
+#include "zipint.h"
+
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
struct read_file {
char *fname; /* name of file to copy from */
FILE *f; /* file to copy from */
diff -u a/lib/zip_source_free.c b/lib/zip_source_free.c
--- a/lib/zip_source_free.c 2012-01-16 15:28:26.000000000 +0100
+++ b/lib/zip_source_free.c 2014-10-21 23:30:40.744268550 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN void
diff -u a/lib/zip_source_function.c b/lib/zip_source_function.c
--- a/lib/zip_source_function.c 2012-01-16 15:28:26.000000000 +0100
+++ b/lib/zip_source_function.c 2014-10-21 23:30:36.448268710 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN struct zip_source *
diff -u a/lib/zip_source_layered.c b/lib/zip_source_layered.c
--- a/lib/zip_source_layered.c 2012-08-30 16:47:19.000000000 +0200
+++ b/lib/zip_source_layered.c 2014-10-21 23:30:32.024268875 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
struct zip_source *
diff -u a/lib/zip_source_pkware.c b/lib/zip_source_pkware.c
--- a/lib/zip_source_pkware.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_source_pkware.c 2014-10-21 23:30:25.896269102 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
struct trad_pkware {
int e[2];
diff -u a/lib/zip_source_pop.c b/lib/zip_source_pop.c
--- a/lib/zip_source_pop.c 2012-08-30 16:47:19.000000000 +0200
+++ b/lib/zip_source_pop.c 2014-10-21 23:30:20.960269286 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
struct zip_source *
diff -u a/lib/zip_source_window.c b/lib/zip_source_window.c
--- a/lib/zip_source_window.c 2013-03-14 12:25:28.000000000 +0100
+++ b/lib/zip_source_window.c 2014-10-21 23:30:10.880269660 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
struct window {
zip_uint64_t skip;
zip_uint64_t len;
diff -u a/lib/zip_source_zip.c b/lib/zip_source_zip.c
--- a/lib/zip_source_zip.c 2012-07-27 17:49:05.000000000 +0200
+++ b/lib/zip_source_zip.c 2014-10-21 23:30:04.360269903 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
ZIP_EXTERN struct zip_source *
diff -u a/lib/zip_source_zip_new.c b/lib/zip_source_zip_new.c
--- a/lib/zip_source_zip_new.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_source_zip_new.c 2014-10-21 23:29:59.626852638 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
struct zip_source *
diff -u a/lib/zip_string.c b/lib/zip_string.c
--- a/lib/zip_string.c 2013-11-28 17:57:10.000000000 +0100
+++ b/lib/zip_string.c 2014-10-21 23:29:51.898852925 +0200
@@ -33,11 +33,11 @@
+#include "zipint.h"
+
#include <stdlib.h>
#include <string.h>
-#include "zipint.h"
-
zip_uint32_t
diff -u a/lib/zip_unchange_all.c b/lib/zip_unchange_all.c
--- a/lib/zip_unchange_all.c 2012-07-27 17:49:05.000000000 +0200
+++ b/lib/zip_unchange_all.c 2014-10-21 23:29:46.322853132 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN int
diff -u a/lib/zip_unchange_archive.c b/lib/zip_unchange_archive.c
--- a/lib/zip_unchange_archive.c 2012-05-08 12:52:46.000000000 +0200
+++ b/lib/zip_unchange_archive.c 2014-10-21 23:29:40.964853331 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN int
diff -u a/lib/zip_unchange.c b/lib/zip_unchange.c
--- a/lib/zip_unchange.c 2012-07-27 17:49:05.000000000 +0200
+++ b/lib/zip_unchange.c 2014-10-21 23:29:35.306853541 +0200
@@ -33,10 +33,10 @@
-#include <stdlib.h>
-
#include "zipint.h"
+#include <stdlib.h>
+
ZIP_EXTERN int