From 32cb0e980f504e660d3a8580d7c206cbe0971aba Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 25 Feb 2025 12:14:55 +0000 Subject: [PATCH] Zlib: Make changes to imported source files where necessary --- modules/juce_core/zip/zlib/JUCE_CHANGES.txt | 5 ++++ modules/juce_core/zip/zlib/LICENSE | 30 +++++++++++++++++++++ modules/juce_core/zip/zlib/inflate.h | 5 ++++ modules/juce_core/zip/zlib/inftrees.h | 5 ++++ 4 files changed, 45 insertions(+) create mode 100644 modules/juce_core/zip/zlib/JUCE_CHANGES.txt create mode 100644 modules/juce_core/zip/zlib/LICENSE diff --git a/modules/juce_core/zip/zlib/JUCE_CHANGES.txt b/modules/juce_core/zip/zlib/JUCE_CHANGES.txt new file mode 100644 index 0000000000..be22b0bbc6 --- /dev/null +++ b/modules/juce_core/zip/zlib/JUCE_CHANGES.txt @@ -0,0 +1,5 @@ +# inflate.h and inftrees.h + +Include guards were added to these files to support multiple inclusion in a +unity-style build. + diff --git a/modules/juce_core/zip/zlib/LICENSE b/modules/juce_core/zip/zlib/LICENSE new file mode 100644 index 0000000000..3a09a35d89 --- /dev/null +++ b/modules/juce_core/zip/zlib/LICENSE @@ -0,0 +1,30 @@ +The following notice was included with the original zlib distribution. +It applies to all files within this directory. + +Minor modifications to some source files have been made, as described in the +accompanying JUCE_CHANGES.txt. + +================================================================================ + +Copyright notice: + + (C) 1995-2022 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu diff --git a/modules/juce_core/zip/zlib/inflate.h b/modules/juce_core/zip/zlib/inflate.h index f127b6b1fa..cb3b2e0fd4 100644 --- a/modules/juce_core/zip/zlib/inflate.h +++ b/modules/juce_core/zip/zlib/inflate.h @@ -8,6 +8,9 @@ subject to change. Applications should only use zlib.h. */ +#ifndef _INFLATE_H_ // JUCE CHANGE +#define _INFLATE_H_ // JUCE CHANGE + /* define NO_GZIP when compiling if you want to disable gzip header and trailer decoding by inflate(). NO_GZIP would be used to avoid linking in the crc code when it is not needed. For shared libraries, gzip decoding @@ -124,3 +127,5 @@ struct inflate_state { int back; /* bits back of last unprocessed length/lit */ unsigned was; /* initial length of match */ }; + +#endif // JUCE CHANGE diff --git a/modules/juce_core/zip/zlib/inftrees.h b/modules/juce_core/zip/zlib/inftrees.h index 396f74b5da..49d57b8ca4 100644 --- a/modules/juce_core/zip/zlib/inftrees.h +++ b/modules/juce_core/zip/zlib/inftrees.h @@ -8,6 +8,9 @@ subject to change. Applications should only use zlib.h. */ +#ifndef _INFTREES_H_ // JUCE CHANGE +#define _INFTREES_H_ // JUCE CHANGE + /* Structure for decoding tables. Each entry provides either the information needed to do the operation requested by the code that indexed that table entry, or it provides a pointer to another @@ -60,3 +63,5 @@ typedef enum { int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, unsigned codes, code FAR * FAR *table, unsigned FAR *bits, unsigned short FAR *work); + +#endif // JUCE CHANGE