Skip to content

Commit d183dc2

Browse files
committed
8295685: Update Libpng to 1.6.38
Backport-of: b685fc2de4d2847de2d1efaab2890646257ea6d3
1 parent 4e13da9 commit d183dc2

File tree

16 files changed

+188
-132
lines changed

16 files changed

+188
-132
lines changed

src/java.desktop/share/legal/libpng.md

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## libpng v1.6.37
1+
## libpng v1.6.38
22

33
### libpng License
44
<pre>
@@ -9,11 +9,11 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
99
PNG Reference Library License version 2
1010
---------------------------------------
1111

12-
* Copyright (c) 1995-2019 The PNG Reference Library Authors.
13-
* Copyright (c) 2018-2019 Cosmin Truta.
14-
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
15-
* Copyright (c) 1996-1997 Andreas Dilger.
16-
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
12+
Copyright (c) 1995-2022 The PNG Reference Library Authors.
13+
Copyright (c) 2018-2022 Cosmin Truta
14+
Copyright (c) 1998-2018 Glenn Randers-Pehrson
15+
Copyright (c) 1996-1997 Andreas Dilger
16+
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1717

1818
The software is supplied "as is", without warranty of any kind,
1919
express or implied, including, without limitation, the warranties
@@ -138,4 +138,66 @@ to supporting the PNG file format in commercial products. If you use
138138
this source code in a product, acknowledgment is not required but would
139139
be appreciated.
140140

141+
TRADEMARK
142+
=========
143+
144+
The name "libpng" has not been registered by the Copyright owners
145+
as a trademark in any jurisdiction. However, because libpng has
146+
been distributed and maintained world-wide, continually since 1995,
147+
the Copyright owners claim "common-law trademark protection" in any
148+
jurisdiction where common-law trademark is recognized.
149+
141150
</pre>
151+
152+
### AUTHORS File Information
153+
```
154+
PNG REFERENCE LIBRARY AUTHORS
155+
=============================
156+
157+
This is the list of PNG Reference Library ("libpng") Contributing
158+
Authors, for copyright and licensing purposes.
159+
160+
* Andreas Dilger
161+
* Cosmin Truta
162+
* Dave Martindale
163+
* Eric S. Raymond
164+
* Gilles Vollant
165+
* Glenn Randers-Pehrson
166+
* Greg Roelofs
167+
* Guy Eric Schalnat
168+
* James Yu
169+
* John Bowler
170+
* Kevin Bracey
171+
* Magnus Holmgren
172+
* Mandar Sahastrabuddhe
173+
* Mans Rullgard
174+
* Matt Sarett
175+
* Mike Klein
176+
* Pascal Massimino
177+
* Paul Schmidt
178+
* Qiang Zhou
179+
* Sam Bushell
180+
* Samuel Williams
181+
* Simon-Pierre Cadieux
182+
* Tim Wegner
183+
* Tom Lane
184+
* Tom Tanner
185+
* Vadim Barkov
186+
* Willem van Schaik
187+
* Zhijie Liang
188+
* Arm Holdings
189+
- Richard Townsend
190+
* Google Inc.
191+
- Matt Sarett
192+
- Mike Klein
193+
- Dan Field
194+
- Sami Boukortt
195+
196+
The build projects, the build scripts, the test scripts, and other
197+
files in the "ci", "projects", "scripts" and "tests" directories, have
198+
other copyright owners, but are released under the libpng license.
199+
200+
Some files in the "contrib" directory, and some tools-generated files
201+
that are distributed with libpng, have other copyright owners, and are
202+
released under other open source licenses.
203+
```

src/java.desktop/share/native/libsplashscreen/libpng/CHANGES

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,7 +2295,7 @@ Version 1.4.0beta58 [May 14, 2009]
22952295
Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri)
22962296

22972297
Version 1.4.0beta59 [May 15, 2009]
2298-
Reformated sources in libpng style (3-space intentation, comment format)
2298+
Reformated sources in libpng style (3-space indentation, comment format)
22992299
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
23002300
Added sections about the git repository and our coding style to the
23012301
documentation
@@ -3886,7 +3886,7 @@ Version 1.6.0beta06 [January 24, 2012]
38863886
Version 1.6.0beta07 [January 28, 2012]
38873887
Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived)
38883888
compiler issues slightly different warnings from those issued by the
3889-
current vesions of GCC. This eliminates those warnings by
3889+
current versions of GCC. This eliminates those warnings by
38903890
adding/removing casts and small code rewrites.
38913891
Updated configure.ac from autoupdate: added --enable-werror option.
38923892
Also some layout regularization and removal of introduced tab characters
@@ -6103,6 +6103,12 @@ Version 1.6.37 [April 14, 2019]
61036103
Added makefiles for AddressSanitizer-enabled builds.
61046104
Cleaned up various makefiles.
61056105

6106+
Version 1.6.38 [September 14, 2022]
6107+
Added configurations and scripts for continuous integration.
6108+
Fixed various errors in the handling of tRNS, hIST and eXIf.
6109+
Implemented many stability improvements across all platforms.
6110+
Updated the internal documentation.
6111+
61066112
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
61076113
Subscription is required; visit
61086114
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

src/java.desktop/share/native/libsplashscreen/libpng/LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
44
PNG Reference Library License version 2
55
---------------------------------------
66

7-
* Copyright (c) 1995-2019 The PNG Reference Library Authors.
8-
* Copyright (c) 2018-2019 Cosmin Truta.
7+
* Copyright (c) 1995-2022 The PNG Reference Library Authors.
8+
* Copyright (c) 2018-2022 Cosmin Truta.
99
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
1010
* Copyright (c) 1996-1997 Andreas Dilger.
1111
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.

src/java.desktop/share/native/libsplashscreen/libpng/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
README for libpng version 1.6.37 - April 14, 2019
2-
=================================================
1+
README for libpng version 1.6.38
2+
================================
33

44
See the note about version numbers near the top of png.h.
55
See INSTALL for instructions on how to install libpng.
66

77
Libpng comes in several distribution formats. Get libpng-*.tar.gz or
8-
libpng-*.tar.xz or if you want UNIX-style line endings in the text
9-
files, or lpng*.7z or lpng*.zip if you want DOS-style line endings.
8+
libpng-*.tar.xz if you want UNIX-style line endings in the text files,
9+
or lpng*.7z or lpng*.zip if you want DOS-style line endings.
1010

1111
Version 0.89 was the first official release of libpng. Don't let the
1212
fact that it's the first release fool you. The libpng library has been

src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Updating libpng in OpenJDK
44
Usually this is just a matter of updating the version at the top,
55
and in the embedded text, and extending the copyright date.
66

7-
The updated info comes from the LICENSE file.
7+
The updated info comes from the LICENSE, TRADEMARK and AUTHORS files.
88

99
2) Copy LICENSE, README, and CHANGES from the new version into OpenJDK's
1010
libpng source directory
@@ -21,9 +21,9 @@ OpenJDK has a heavily modified copy of pnglibconf.h.
2121
This is the trickiest part of the whole exercise.
2222
This file is generated by png at build time.
2323
Except for the dates and version, you should generally not need to update
24-
OpenJDK's copy unless the new version of PNG has added rquired new #defines
24+
OpenJDK's copy unless the new version of PNG has added required new #defines
2525
that cause problems building.
26-
You can run configure && make on the downloaded source and compare but we
26+
You can run configure && make on the downloaded source and compare, but we
2727
do not want to enable any of the WRITE support, and there are many more
2828
modifications as well.
2929
So do NOT just copy in a file from the new libpng.
@@ -33,15 +33,22 @@ line in the GPL header.
3333
So lots of reasons to not copy over the new version,
3434
and instead just tweak the existing one.
3535

36-
5) Run scripts to expand tabs and remove trailing white space from source files.
36+
5) Run script to expand tabs and remove trailing white space from source files.
3737

38-
Use expand to remove tabs
39-
expand ${f} > ${f}.tmp
40-
mv ${f}.tmp $f
38+
First cd into the libpng folder and run the following script.
4139

42-
Use sed to remove trailing white space
43-
sed -e 's/[ ]* $//' ${f} > ${f}.tmp
44-
mv ${f}.tmp $f
40+
for f in *.c *.h;
41+
do
42+
# replace tabs with spaces
43+
expand ${f} > ${f}.tmp;
44+
mv ${f}.tmp $f;
45+
46+
# fix line endings to LF
47+
sed -i -e 's/\r$//g' ${f};
48+
49+
# remove trailing spaces
50+
sed -i -e 's/[ ]* $//g' ${f};
51+
done
4552

4653
6) As with all native code, run it through the official build systems, in case
4754
the updated code trigger any fatal warnings with the official compilers.

src/java.desktop/share/native/libsplashscreen/libpng/png.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* However, the following notice accompanied the original version of this
3030
* file and, per its terms, should not be removed:
3131
*
32-
* Copyright (c) 2018-2019 Cosmin Truta
32+
* Copyright (c) 2018-2022 Cosmin Truta
3333
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
3434
* Copyright (c) 1996-1997 Andreas Dilger
3535
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -42,7 +42,7 @@
4242
#include "pngpriv.h"
4343

4444
/* Generate a compiler error if there is an old png.h in the search path. */
45-
typedef png_libpng_version_1_6_37 Your_png_h_is_not_version_1_6_37;
45+
typedef png_libpng_version_1_6_38 Your_png_h_is_not_version_1_6_38;
4646

4747
#ifdef __GNUC__
4848
/* The version tests may need to be added to, but the problem warning has
@@ -748,7 +748,7 @@ png_init_io(png_structrp png_ptr, png_FILE_p fp)
748748
*
749749
* Where UNSIGNED_MAX is the appropriate maximum unsigned value, so when the
750750
* negative integral value is added the result will be an unsigned value
751-
* correspnding to the 2's complement representation.
751+
* corresponding to the 2's complement representation.
752752
*/
753753
void PNGAPI
754754
png_save_int_32(png_bytep buf, png_int_32 i)
@@ -843,8 +843,8 @@ png_get_copyright(png_const_structrp png_ptr)
843843
return PNG_STRING_COPYRIGHT
844844
#else
845845
return PNG_STRING_NEWLINE \
846-
"libpng version 1.6.37" PNG_STRING_NEWLINE \
847-
"Copyright (c) 2018-2019 Cosmin Truta" PNG_STRING_NEWLINE \
846+
"libpng version 1.6.38" PNG_STRING_NEWLINE \
847+
"Copyright (c) 2018-2022 Cosmin Truta" PNG_STRING_NEWLINE \
848848
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
849849
PNG_STRING_NEWLINE \
850850
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
@@ -1871,12 +1871,12 @@ png_icc_profile_error(png_const_structrp png_ptr, png_colorspacerp colorspace,
18711871
# ifdef PNG_WARNINGS_SUPPORTED
18721872
else
18731873
{
1874-
char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114*/
1874+
char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
18751875

18761876
pos = png_safecat(message, (sizeof message), pos,
18771877
png_format_number(number, number+(sizeof number),
18781878
PNG_NUMBER_FORMAT_x, value));
1879-
pos = png_safecat(message, (sizeof message), pos, "h: "); /*+2 = 116*/
1879+
pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
18801880
}
18811881
# endif
18821882
/* The 'reason' is an arbitrary message, allow +79 maximum 195 */

src/java.desktop/share/native/libsplashscreen/libpng/png.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
* However, the following notice accompanied the original version of this
3030
* file and, per its terms, should not be removed:
3131
*
32-
* libpng version 1.6.37 - April 14, 2019
32+
* libpng version 1.6.38 - September 14, 2022
3333
*
34-
* Copyright (c) 2018-2019 Cosmin Truta
34+
* Copyright (c) 2018-2022 Cosmin Truta
3535
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
3636
* Copyright (c) 1996-1997 Andreas Dilger
3737
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -43,7 +43,7 @@
4343
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
4444
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
4545
* Glenn Randers-Pehrson
46-
* libpng versions 1.6.36, December 2018, through 1.6.37, April 2019:
46+
* libpng versions 1.6.36, December 2018, through 1.6.38, September 2022:
4747
* Cosmin Truta
4848
* See also "Contributing Authors", below.
4949
*/
@@ -55,8 +55,8 @@
5555
* PNG Reference Library License version 2
5656
* ---------------------------------------
5757
*
58-
* * Copyright (c) 1995-2019 The PNG Reference Library Authors.
59-
* * Copyright (c) 2018-2019 Cosmin Truta.
58+
* * Copyright (c) 1995-2022 The PNG Reference Library Authors.
59+
* * Copyright (c) 2018-2022 Cosmin Truta.
6060
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
6161
* * Copyright (c) 1996-1997 Andreas Dilger.
6262
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -267,7 +267,7 @@
267267
* ...
268268
* 1.5.30 15 10530 15.so.15.30[.0]
269269
* ...
270-
* 1.6.37 16 10637 16.so.16.37[.0]
270+
* 1.6.38 16 10638 16.so.16.38[.0]
271271
*
272272
* Henceforth the source version will match the shared-library major and
273273
* minor numbers; the shared-library major version number will be used for
@@ -306,16 +306,16 @@
306306
*/
307307

308308
/* Version information for png.h - this should match the version in png.c */
309-
#define PNG_LIBPNG_VER_STRING "1.6.37"
310-
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.37 - April 14, 2019\n"
309+
#define PNG_LIBPNG_VER_STRING "1.6.38"
310+
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.38 - September 14, 2022\n"
311311

312312
#define PNG_LIBPNG_VER_SONUM 16
313313
#define PNG_LIBPNG_VER_DLLNUM 16
314314

315315
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
316316
#define PNG_LIBPNG_VER_MAJOR 1
317317
#define PNG_LIBPNG_VER_MINOR 6
318-
#define PNG_LIBPNG_VER_RELEASE 37
318+
#define PNG_LIBPNG_VER_RELEASE 38
319319

320320
/* This should be zero for a public release, or non-zero for a
321321
* development version. [Deprecated]
@@ -346,7 +346,7 @@
346346
* From version 1.0.1 it is:
347347
* XXYYZZ, where XX=major, YY=minor, ZZ=release
348348
*/
349-
#define PNG_LIBPNG_VER 10637 /* 1.6.37 */
349+
#define PNG_LIBPNG_VER 10638 /* 1.6.38 */
350350

351351
/* Library configuration: these options cannot be changed after
352352
* the library has been built.
@@ -456,7 +456,7 @@ extern "C" {
456456
/* This triggers a compiler error in png.c, if png.c and png.h
457457
* do not agree upon the version number.
458458
*/
459-
typedef char* png_libpng_version_1_6_37;
459+
typedef char* png_libpng_version_1_6_38;
460460

461461
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
462462
*
@@ -1474,7 +1474,7 @@ PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action,
14741474
* mainly useful for testing, as the defaults should work with most users.
14751475
* Those users who are tight on memory or want faster performance at the
14761476
* expense of compression can modify them. See the compression library
1477-
* header file (zlib.h) for an explination of the compression functions.
1477+
* header file (zlib.h) for an explanation of the compression functions.
14781478
*/
14791479

14801480
/* Set the filtering method(s) used by libpng. Currently, the only valid
@@ -1529,7 +1529,7 @@ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
15291529
* 0 - 9, corresponding directly to the zlib compression levels 0 - 9
15301530
* (0 - no compression, 9 - "maximal" compression). Note that tests have
15311531
* shown that zlib compression levels 3-6 usually perform as well as level 9
1532-
* for PNG images, and do considerably fewer caclulations. In the future,
1532+
* for PNG images, and do considerably fewer calculations. In the future,
15331533
* these values may not correspond directly to the zlib compression levels.
15341534
*/
15351535
#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED

src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
* However, the following notice accompanied the original version of this
3030
* file and, per its terms, should not be removed:
3131
*
32-
* libpng version 1.6.37
32+
* libpng version 1.6.38
3333
*
34-
* Copyright (c) 2018-2019 Cosmin Truta
34+
* Copyright (c) 2018-2022 Cosmin Truta
3535
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
3636
* Copyright (c) 1996-1997 Andreas Dilger
3737
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -208,8 +208,8 @@
208208
* compiler-specific macros to the values required to change the calling
209209
* conventions of the various functions.
210210
*/
211-
#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
212-
defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
211+
#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \
212+
defined(__CYGWIN__)
213213
/* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or
214214
* MinGW on any architecture currently supported by Windows. Also includes
215215
* Watcom builds but these need special treatment because they are not

0 commit comments

Comments
 (0)