[Pkg-javascript-commits] [node-zipfile] 16/34: New upstream version 0.5.11+ds

Jérémy Lal kapouer at moszumanska.debian.org
Wed Dec 21 00:22:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

kapouer pushed a commit to branch master
in repository node-zipfile.

commit 7655d84c59aa7cfe0603a31fb7bbd073f92469ef
Author: Jérémy Lal <kapouer at melix.org>
Date:   Tue Dec 20 16:28:28 2016 +0100

    New upstream version 0.5.11+ds
---
 deps/unix-include/config.h                  | 197 ++++++++++++++++++++++++++++
 deps/unix-include/zipconf.h                 |  47 +++++++
 deps/win-include/config.h                   |  55 ++++++++
 deps/win-include/zip_set_file_compression.c |  86 ++++++++++++
 deps/win-include/zipconf.h                  | 120 +++++++++++++++++
 test/data/world_merc.zip                    | Bin 0 -> 345387 bytes
 6 files changed, 505 insertions(+)

diff --git a/deps/unix-include/config.h b/deps/unix-include/config.h
new file mode 100644
index 0000000..9ac3372
--- /dev/null
+++ b/deps/unix-include/config.h
@@ -0,0 +1,197 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
+   */
+/* #undef HAVE_DECL_TZNAME */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `fseeko' function. */
+#define HAVE_FSEEKO 1
+
+/* Define to 1 if you have the `ftello' function. */
+#define HAVE_FTELLO 1
+
+/* Define to 1 if you have the `getopt' function. */
+#define HAVE_GETOPT 1
+
+/* Define to 1 if the system has the type `int16_t'. */
+#define HAVE_INT16_T 1
+
+/* Define to 1 if the system has the type `int32_t'. */
+#define HAVE_INT32_T 1
+
+/* Define to 1 if the system has the type `int64_t'. */
+#define HAVE_INT64_T 1
+
+/* Define to 1 if the system has the type `int8_t'. */
+#define HAVE_INT8_T 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `z' library (-lz). */
+#define HAVE_LIBZ 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
+
+/* Define to 1 if you have the `MoveFileExA' function. */
+/* #undef HAVE_MOVEFILEEXA */
+
+/* Define to 1 if you have the `open' function. */
+#define HAVE_OPEN 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if the system has the type `ssize_t'. */
+#define HAVE_SSIZE_T 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if `tm_zone' is a member of `struct tm'. */
+#define HAVE_STRUCT_TM_TM_ZONE 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#define HAVE_TM_ZONE 1
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+/* #undef HAVE_TZNAME */
+
+/* Define to 1 if the system has the type `uint16_t'. */
+#define HAVE_UINT16_T 1
+
+/* Define to 1 if the system has the type `uint32_t'. */
+#define HAVE_UINT32_T 1
+
+/* Define to 1 if the system has the type `uint64_t'. */
+#define HAVE_UINT64_T 1
+
+/* Define to 1 if the system has the type `uint8_t'. */
+#define HAVE_UINT8_T 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `_close' function. */
+/* #undef HAVE__CLOSE */
+
+/* Define to 1 if you have the `_dup' function. */
+/* #undef HAVE__DUP */
+
+/* Define to 1 if you have the `_fdopen' function. */
+/* #undef HAVE__FDOPEN */
+
+/* Define to 1 if you have the `_fileno' function. */
+/* #undef HAVE__FILENO */
+
+/* Define to 1 if you have the `_open' function. */
+/* #undef HAVE__OPEN */
+
+/* Define to 1 if you have the `_snprintf' function. */
+/* #undef HAVE__SNPRINTF */
+
+/* Define to 1 if you have the `_strdup' function. */
+/* #undef HAVE__STRDUP */
+
+/* Define to 1 if you have the `_stricmp' function. */
+/* #undef HAVE__STRICMP */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Name of package */
+#define PACKAGE "libzip"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "libzip at nih.at"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libzip"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "libzip 0.11.1"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "libzip"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.11.1"
+
+/* The size of `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 8
+
+/* The size of `long long', as computed by sizeof. */
+#define SIZEOF_LONG_LONG 8
+
+/* The size of `off_t', as computed by sizeof. */
+#define SIZEOF_OFF_T 8
+
+/* The size of `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* The size of `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 8
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Version number of package */
+#define VERSION "0.11.1"
+
+
+#ifndef HAVE_SSIZE_T
+#  if SIZEOF_SIZE_T == SIZEOF_INT
+typedef int ssize_t;
+#  elif SIZEOF_SIZE_T == SIZEOF_LONG
+typedef long ssize_t;
+#  elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+typedef long long ssize_t;
+#  else
+#error no suitable type for ssize_t found
+#  endif
+#endif
+
diff --git a/deps/unix-include/zipconf.h b/deps/unix-include/zipconf.h
new file mode 100644
index 0000000..f223c6b
--- /dev/null
+++ b/deps/unix-include/zipconf.h
@@ -0,0 +1,47 @@
+#ifndef _HAD_ZIPCONF_H
+#define _HAD_ZIPCONF_H
+
+/*
+   zipconf.h -- platform specific include file
+
+   This file was generated automatically by ./make_zipconf.sh
+   based on ../config.h.
+ */
+
+#define LIBZIP_VERSION "0.11.1"
+#define LIBZIP_VERSION_MAJOR 0
+#define LIBZIP_VERSION_MINOR 11
+#define LIBZIP_VERSION_MICRO 0
+
+#include <inttypes.h>
+
+typedef int8_t zip_int8_t;
+#define ZIP_INT8_MIN INT8_MIN
+#define ZIP_INT8_MAX INT8_MAX
+
+typedef uint8_t zip_uint8_t;
+#define ZIP_UINT8_MAX UINT8_MAX
+
+typedef int16_t zip_int16_t;
+#define ZIP_INT16_MIN INT16_MIN
+#define ZIP_INT16_MAX INT16_MAX
+
+typedef uint16_t zip_uint16_t;
+#define ZIP_UINT16_MAX UINT16_MAX
+
+typedef int32_t zip_int32_t;
+#define ZIP_INT32_MIN INT32_MIN
+#define ZIP_INT32_MAX INT32_MAX
+
+typedef uint32_t zip_uint32_t;
+#define ZIP_UINT32_MAX UINT32_MAX
+
+typedef int64_t zip_int64_t;
+#define ZIP_INT64_MIN INT64_MIN
+#define ZIP_INT64_MAX INT64_MAX
+
+typedef uint64_t zip_uint64_t;
+#define ZIP_UINT64_MAX UINT64_MAX
+
+
+#endif /* zipconf.h */
diff --git a/deps/win-include/config.h b/deps/win-include/config.h
new file mode 100644
index 0000000..258ea66
--- /dev/null
+++ b/deps/win-include/config.h
@@ -0,0 +1,55 @@
+#ifndef HAD_CONFIG_H
+#define HAD_CONFIG_H
+#define HAVE__CLOSE
+#define HAVE__DUP
+#define HAVE__FDOPEN
+#define HAVE__FILENO
+#define HAVE__OPEN
+#define HAVE__SNPRINTF
+/* #undef HAVE__STRCMPI */
+#define HAVE__STRDUP
+#define HAVE__STRICMP
+/* #undef HAVE_FSEEKO */
+/* #undef HAVE_FTELLO */
+/* #undef HAVE_MKSTEMP */
+#define HAVE_MOVEFILEEXA
+/* #undef HAVE_SNPRINTF */
+/* #undef HAVE_STRCASECMP */
+/* #undef HAVE_STRINGS_H */
+/* #undef HAVE_STRUCT_TM_TM_ZONE */
+/* #undef HAVE_UNISTD_H */
+#define PACKAGE "libzip"
+#define VERSION "0.10.b"
+
+/* #undef HAVE_SSIZE_T */
+
+#ifndef HAVE_SSIZE_T
+
+#ifndef SIZE_T_LIBZIP
+#define SIZE_T_LIBZIP 4
+#endif
+#ifndef INT_LIBZIP
+#define INT_LIBZIP 4
+#endif
+#ifndef LONG_LIBZIP
+#define LONG_LIBZIP 4
+#endif
+#ifndef LONG_LONG_LIBZIP
+#define LONG_LONG_LIBZIP 8
+#endif
+#ifndef SIZEOF_OFF_T
+#define SIZEOF_OFF_T 4
+#endif
+
+#  if SIZE_T_LIBZIP == INT_LIBZIP
+typedef int ssize_t;
+#  elif SIZE_T_LIBZIP == LONG_LIBZIP
+typedef long ssize_t;
+#  elif SIZE_T_LIBZIP == LONG_LONG_LIBZIP
+typedef long long ssize_t;
+#  else
+#error no suitable type for ssize_t found
+#  endif
+#endif
+
+#endif /* HAD_CONFIG_H */
diff --git a/deps/win-include/zip_set_file_compression.c b/deps/win-include/zip_set_file_compression.c
new file mode 100644
index 0000000..a01298c
--- /dev/null
+++ b/deps/win-include/zip_set_file_compression.c
@@ -0,0 +1,86 @@
+/*
+  zip_set_file_compression.c -- set compression for file in archive
+  Copyright (C) 2012 Dieter Baron and Thomas Klausner
+
+  This file is part of libzip, a library to manipulate ZIP archives.
+  The authors can be contacted at <libzip at nih.at>
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+  3. The names of the authors may not be used to endorse or promote
+     products derived from this software without specific prior
+     written permission.
+ 
+  THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
+  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
+  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include "zipint.h"
+
+ZIP_EXTERN int
+zip_set_file_compression(struct zip *za, zip_uint64_t idx,
+			 zip_int32_t method, zip_uint32_t flags)
+{
+    struct zip_entry *e;
+	zip_int32_t old_method;
+
+    if (idx >= za->nentry) {
+	_zip_error_set(&za->error, ZIP_ER_INVAL, 0);
+	return -1;
+    }
+
+    if (ZIP_IS_RDONLY(za)) {
+	_zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
+	return -1;
+    }
+
+    if (method != ZIP_CM_DEFAULT && method != ZIP_CM_STORE && method != ZIP_CM_DEFLATE) {
+	_zip_error_set(&za->error, ZIP_ER_COMPNOTSUPP, 0);
+	return -1;
+    }
+
+    e = za->entry+idx;
+    
+    old_method = (e->orig == NULL ? ZIP_CM_DEFAULT : e->orig->comp_method);
+    
+    /* XXX: revisit this when flags are supported, since they may require a recompression */
+    
+    if (method == old_method) {
+	if (e->changes) {
+	    e->changes->changed &= ~ZIP_DIRENT_COMP_METHOD;
+	    if (e->changes->changed == 0) {
+		_zip_dirent_free(e->changes);
+		e->changes = NULL;
+	    }
+	}
+    }
+    else {
+        if (e->changes == NULL) {
+            if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) {
+                _zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
+                return -1;
+            }
+        }
+
+        e->changes->comp_method = method;
+        e->changes->changed |= ZIP_DIRENT_COMP_METHOD;
+    }
+    
+    return 0;
+}
diff --git a/deps/win-include/zipconf.h b/deps/win-include/zipconf.h
new file mode 100644
index 0000000..ec732dd
--- /dev/null
+++ b/deps/win-include/zipconf.h
@@ -0,0 +1,120 @@
+#ifndef _HAD_ZIPCONF_H
+#define _HAD_ZIPCONF_H
+
+/*
+   zipconf.h -- platform specific include file
+
+   This file was generated automatically by CMake
+   based on ../cmake-zipconf.h.in.
+ */
+
+/* #undef HAVE_INTTYPES_H_LIBZIP */
+#define HAVE_STDINT_H_LIBZIP
+#define HAVE_SYS_TYPES_H_LIBZIP
+#define HAVE___INT8_LIBZIP
+#define HAVE_INT8_T_LIBZIP
+#define HAVE_UINT8_T_LIBZIP
+#define HAVE___INT16_LIBZIP
+#define HAVE_INT16_T_LIBZIP
+#define HAVE_UINT16_T_LIBZIP
+#define HAVE___INT32_LIBZIP
+#define HAVE_INT32_T_LIBZIP
+#define HAVE_UINT32_T_LIBZIP
+#define HAVE___INT64_LIBZIP
+#define HAVE_INT64_T_LIBZIP
+#define HAVE_UINT64_T_LIBZIP
+#define SHORT_LIBZIP 2
+#define INT_LIBZIP 4
+#define LONG_LIBZIP 4
+#define LONG_LONG_LIBZIP 8
+
+#if defined(HAVE_STDINT_H_LIBZIP)
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H_LIBZIP)
+#include <inttypes.h>
+#elif defined(HAVE_SYS_TYPES_H_LIBZIP)
+#include <sys/types.h>
+#endif
+
+#if defined(HAVE_INT8_T_LIBZIP)
+typedef int8_t zip_int8_t;
+#elif defined(HAVE___INT8_LIBZIP)
+typedef __int8 zip_int8_t;
+#else
+typedef signed char zip_int8_t;
+#endif
+#if defined(HAVE_UINT8_T_LIBZIP)
+typedef uint8_t zip_uint8_t;
+#elif defined(HAVE___INT8_LIBZIP)
+typedef unsigned __int8 zip_uint8_t;
+#else
+typedef unsigned char zip_uint8_t;
+#endif
+#if defined(HAVE_INT16_T_LIBZIP)
+typedef int16_t zip_int16_t;
+#elif defined(HAVE___INT16_LIBZIP)
+typedef __int16 zip_int16_t;
+#elif defined(SHORT_LIBZIP) && SHORT_LIBZIP == 2
+typedef signed short zip_int16_t;
+#endif
+#if defined(HAVE_UINT16_T_LIBZIP)
+typedef uint16_t zip_uint16_t;
+#elif defined(HAVE___INT16_LIBZIP)
+typedef unsigned __int16 zip_uint16_t;
+#elif defined(SHORT_LIBZIP) && SHORT_LIBZIP == 2
+typedef unsigned short zip_uint16_t;
+#endif
+#if defined(HAVE_INT32_T_LIBZIP)
+typedef int32_t zip_int32_t;
+#elif defined(HAVE___INT32_LIBZIP)
+typedef __int32 zip_int32_t;
+#elif defined(INT_LIBZIP) && INT_LIBZIP == 4
+typedef signed int zip_int32_t;
+#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 4
+typedef signed long zip_int32_t;
+#endif
+#if defined(HAVE_UINT32_T_LIBZIP)
+typedef uint32_t zip_uint32_t;
+#elif defined(HAVE___INT32_LIBZIP)
+typedef unsigned __int32 zip_uint32_t;
+#elif defined(INT_LIBZIP) && INT_LIBZIP == 4
+typedef unsigned int zip_uint32_t;
+#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 4
+typedef unsigned long zip_uint32_t;
+#endif
+#if defined(HAVE_INT64_T_LIBZIP)
+typedef int64_t zip_int64_t;
+#elif defined(HAVE___INT64_LIBZIP)
+typedef __int64 zip_int64_t;
+#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 8
+typedef signed long zip_int64_t;
+#elif defined(LONG_LONG_LIBZIP) && LONG_LONG_LIBZIP == 8
+typedef signed long long zip_int64_t;
+#endif
+#if defined(HAVE_UINT64_T_LIBZIP)
+typedef uint64_t zip_uint64_t;
+#elif defined(HAVE___INT64_LIBZIP)
+typedef unsigned __int64 zip_uint64_t;
+#elif defined(LONG_LIBZIP) && LONG_LONG_LIBZIP == 8
+typedef unsigned long zip_uint64_t;
+#elif defined(LONG_LONG_LIBZIP) && LONG_LONG_LIBZIP == 8
+typedef unsigned long long zip_uint64_t;
+#endif
+
+#define ZIP_INT8_MIN	-0x80
+#define ZIP_INT8_MAX	 0x7f
+#define ZIP_UINT8_MAX	 0xff
+
+#define ZIP_INT16_MIN	-0x8000
+#define ZIP_INT16_MAX	 0x7fff
+#define ZIP_UINT16_MAX	 0xffff
+
+#define ZIP_INT32_MIN	-0x80000000L
+#define ZIP_INT32_MAX	 0x7fffffffL
+#define ZIP_UINT32_MAX	 0xffffffffLU
+
+#define ZIP_INT64_MIN	-0x8000000000000000LL
+#define ZIP_INT64_MAX	 0x7fffffffffffffffLL
+#define ZIP_UINT64_MAX	 0xffffffffffffffffULL
+
+#endif /* zipconf.h */
diff --git a/test/data/world_merc.zip b/test/data/world_merc.zip
new file mode 100644
index 0000000..1d32ccc
Binary files /dev/null and b/test/data/world_merc.zip differ

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/node-zipfile.git



More information about the Pkg-javascript-commits mailing list