1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Zlib: Update JUCE sources to support new zlib version

This commit is contained in:
reuk 2025-02-25 12:15:17 +00:00
parent 32cb0e980f
commit 209c86c627
5 changed files with 91 additions and 26 deletions

View file

@ -161,6 +161,7 @@
#include "native/juce_Files_windows.cpp"
#endif
#include "zip/juce_zlib.h"
#include "network/juce_NamedPipe.cpp"
#include "network/juce_Socket.cpp"
#include "network/juce_IPAddress.cpp"

View file

@ -35,7 +35,7 @@
namespace juce
{
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4309 4305 4365 6385 6326 6340)
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4127 4244 4309 4305 4365 6385 6326 6340)
namespace zlibNamespace
{
@ -49,13 +49,26 @@ namespace zlibNamespace
"-Wredundant-decls",
"-Wimplicit-fallthrough",
"-Wzero-as-null-pointer-constant",
"-Wcomma")
"-Wcomma",
"-Wcast-align",
"-Wkeyword-macro",
"-Wmissing-prototypes")
#pragma push_macro ("register")
#define register
#pragma push_macro ("MIN")
#undef MIN
#pragma push_macro ("read")
#pragma push_macro ("write")
#pragma push_macro ("open")
#pragma push_macro ("close")
#undef OS_CODE
#undef fdopen
#define ZLIB_INTERNAL
#define NO_DUMMY_DECL
#include "zlib/zlib.h"
#include "zlib/adler32.c"
#include "zlib/compress.c"
#undef DO1
@ -70,6 +83,7 @@ namespace zlibNamespace
#undef NEEDBITS
#undef DROPBITS
#undef BYTEBITS
#undef GZIP
#include "zlib/inflate.c"
#include "zlib/inftrees.c"
#include "zlib/trees.c"
@ -82,19 +96,26 @@ namespace zlibNamespace
#undef Dad
#undef Len
#pragma pop_macro ("close")
#pragma pop_macro ("open")
#pragma pop_macro ("write")
#pragma pop_macro ("read")
#pragma pop_macro ("MIN")
#pragma pop_macro ("register")
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#else
#include JUCE_ZLIB_INCLUDE_PATH
#ifndef z_uInt
#ifdef uInt
#define z_uInt uInt
#else
#define z_uInt unsigned int
#endif
#endif
#endif
#ifndef z_uInt
#ifdef uInt
#define z_uInt uInt
#else
#define z_uInt unsigned int
#endif
#endif
}
JUCE_END_IGNORE_WARNINGS_MSVC

View file

@ -0,0 +1,55 @@
/*
==============================================================================
This file is part of the JUCE framework.
Copyright (c) Raw Material Software Limited
JUCE is an open source framework subject to commercial or open source
licensing.
By downloading, installing, or using the JUCE framework, or combining the
JUCE framework with any other source code, object code, content or any other
copyrightable work, you agree to the terms of the JUCE End User Licence
Agreement, and all incorporated terms including the JUCE Privacy Policy and
the JUCE Website Terms of Service, as applicable, which will bind you. If you
do not agree to the terms of these agreements, we will not license the JUCE
framework to you, and you must discontinue the installation or download
process and cease use of the JUCE framework.
JUCE End User Licence Agreement: https://juce.com/legal/juce-8-licence/
JUCE Privacy Policy: https://juce.com/juce-privacy-policy
JUCE Website Terms of Service: https://juce.com/juce-website-terms-of-service/
Or:
You may also use this code under the terms of the AGPLv3:
https://www.gnu.org/licenses/agpl-3.0.en.html
THE JUCE FRAMEWORK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL
WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED.
==============================================================================
*/
// The purpose of this internal header, included by juce_core and juce_graphics,
// is to place the zlib symbols in a common namespace with consistent preprocessor
// definitions.
#pragma once
namespace juce::zlibNamespace
{
#define ZLIB_CONST 1
#if JUCE_INCLUDE_ZLIB_CODE
#define HAVE_MEMCPY 1
#include "juce_core/zip/zlib/zlib.h"
#else
#include JUCE_ZLIB_INCLUDE_PATH
#endif
} // namespace juce::zlibNamespace

View file

@ -37,20 +37,6 @@ namespace juce
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4390 4611 4365 4267 4616 2544 2545 6297)
namespace zlibNamespace
{
#if JUCE_INCLUDE_ZLIB_CODE
#undef OS_CODE
#undef fdopen
#define ZLIB_INTERNAL
#define NO_DUMMY_DECL
#include <juce_core/zip/zlib/zlib.h>
#undef OS_CODE
#else
#include JUCE_ZLIB_INCLUDE_PATH
#endif
}
#if ! defined (jmp_buf) || ! defined (longjmp)
#include <setjmp.h>
#endif

View file

@ -159,6 +159,8 @@ extern "C"
#endif
//==============================================================================
#include "juce_core/zip/juce_zlib.h"
#include "fonts/juce_FunctionPointerDestructor.h"
#include "native/juce_EventTracing.h"