Skip to content

Commit 8aff504

Browse files
nodejs-github-botlpinca
authored andcommitted
deps: update zlib to 1.2.13.1-motley-526382e
PR-URL: #49033 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
1 parent 6476c99 commit 8aff504

File tree

14 files changed

+62
-99
lines changed

14 files changed

+62
-99
lines changed

deps/zlib/BUILD.gn

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,11 @@ config("minizip_warnings") {
385385
}
386386

387387
static_library("minizip") {
388+
include_dirs = [
389+
".",
390+
"//third_party/zlib",
391+
]
392+
388393
sources = [
389394
"contrib/minizip/ioapi.c",
390395
"contrib/minizip/ioapi.h",

deps/zlib/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ check_include_file(stddef.h HAVE_STDDEF_H)
2323

2424
option(ENABLE_SIMD_OPTIMIZATIONS "Enable all SIMD optimizations" OFF)
2525
option(ENABLE_SIMD_AVX512 "Enable SIMD AXV512 optimizations" OFF)
26+
option(USE_ZLIB_RABIN_KARP_HASH "Enable bitstream compatibility with canonical zlib" OFF)
27+
28+
if (USE_ZLIB_RABIN_KARP_HASH)
29+
add_definitions(-DUSE_ZLIB_RABIN_KARP_ROLLING_HASH)
30+
endif()
2631

2732
# TODO(cavalcantii): add support for other OSes (e.g. Android, fuchsia, osx)
2833
# and architectures (e.g. Arm).
@@ -238,3 +243,12 @@ enable_language(CXX)
238243
set(CMAKE_CXX_STANDARD 14) # workaround for older compilers (e.g. g++ 5.4).
239244
add_executable(zlib_bench contrib/bench/zlib_bench.cc)
240245
target_link_libraries(zlib_bench zlib)
246+
247+
#============================================================================
248+
# Minigzip tool
249+
#============================================================================
250+
add_executable(minizip_bin contrib/minizip/minizip.c contrib/minizip/ioapi.c
251+
contrib/minizip/ioapi.h contrib/minizip/unzip.c
252+
contrib/minizip/unzip.h contrib/minizip/zip.c contrib/minizip/zip.h
253+
)
254+
target_link_libraries(minizip_bin zlib)

deps/zlib/adler32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
9090
return adler | (sum2 << 16);
9191
}
9292

93-
#if defined(ADLER32_SIMD_SSSE3)
93+
#if defined(ADLER32_SIMD_SSSE3) || defined(ADLER32_SIMD_NEON)
9494
/*
95-
* Use SSSE3 to compute the adler32. Since this routine can be
95+
* Use SIMD to compute the adler32. Since this function can be
9696
* freely used, check CPU features here. zlib convention is to
9797
* call adler32(0, NULL, 0), before making calls to adler32().
9898
* So this is a good early (and infrequent) place to cache CPU

deps/zlib/contrib/minizip/README.chromium

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Short Name: minizip
33
URL: https://github.com/madler/zlib/tree/master/contrib/minizip
44
Version: 1.2.12
55
License: Zlib
6+
License File: //third_party/zlib/LICENSE
67
Security Critical: yes
78
Shipped: yes
89

deps/zlib/contrib/minizip/ioapi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
#include <stdio.h>
4545
#include <stdlib.h>
46-
#include "third_party/zlib/zlib.h"
46+
#include "zlib.h"
4747

4848
#if defined(USE_FILE32API)
4949
#define fopen64 fopen

deps/zlib/contrib/minizip/mztools.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <stdio.h>
99
#include <stdlib.h>
1010
#include <string.h>
11-
#include "third_party/zlib/zlib.h"
11+
#include "zlib.h"
1212
#include "unzip.h"
1313

1414
#define READ_8(adr) ((unsigned char)*(adr))

deps/zlib/contrib/minizip/mztools.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern "C" {
1212
#endif
1313

1414
#ifndef _ZLIB_H
15-
#include "third_party/zlib/zlib.h"
15+
#include "zlib.h"
1616
#endif
1717

1818
#include "unzip.h"

deps/zlib/contrib/minizip/unzip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#include <stdlib.h>
6969
#include <string.h>
7070

71-
#include "third_party/zlib/zlib.h"
71+
#include "zlib.h"
7272
#include "unzip.h"
7373

7474
#ifdef STDC

deps/zlib/contrib/minizip/unzip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extern "C" {
4848
#endif
4949

5050
#ifndef _ZLIB_H
51-
#include "third_party/zlib/zlib.h"
51+
#include "zlib.h"
5252
#endif
5353

5454
#ifndef _ZLIBIOAPI_H

deps/zlib/contrib/minizip/zip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <stdlib.h>
2727
#include <string.h>
2828
#include <time.h>
29-
#include "third_party/zlib/zlib.h"
29+
#include "zlib.h"
3030
#include "zip.h"
3131

3232
#ifdef STDC

0 commit comments

Comments
 (0)