changeset 53000:2ff843783d95

8212680: (JDK12b14/Solaris-sparc) SplashScreen::getSplashScreen call fails with ULE: "libsplashscreen.so: ld.so.1: java: fatal: libz.so.1: open failed: No such file or directory" Reviewed-by: prr, ihse, erikj
author serb
date Mon, 03 Dec 2018 16:12:33 -0800
parents d3f785c4969c
children de8be034dbd4
files make/lib/Awt2dLibraries.gmk src/java.desktop/macosx/native/libsplashscreen/libpng/zlibwrapper/zlib.h src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h
diffstat 3 files changed, 1 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/make/lib/Awt2dLibraries.gmk	Mon Dec 03 06:59:19 2018 +0530
+++ b/make/lib/Awt2dLibraries.gmk	Mon Dec 03 16:12:33 2018 -0800
@@ -776,17 +776,6 @@
 
   ifeq ($(USE_EXTERNAL_LIBPNG), false)
     LIBSPLASHSCREEN_HEADER_DIRS += libsplashscreen/libpng
-
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-      ifeq ($(USE_EXTERNAL_LIBZ), true)
-        # When building our own libpng and using an external libz, we need to
-        # inject our own libz.h to tweak the exported ZLIB_VERNUM macro. See
-        # $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen/libpng/zlibwrapper/zlib.h
-        # for details. This must be specified with -iquote, not -I to avoid a
-        # circular include.
-        LIBSPLASHSCREEN_CFLAGS += -iquote $(TOPDIR)/src/$(MODULE)/macosx/native/libsplashscreen/libpng/zlibwrapper
-      endif
-    endif
   else
     LIBSPLASHSCREEN_EXCLUDES += libpng
   endif
--- a/src/java.desktop/macosx/native/libsplashscreen/libpng/zlibwrapper/zlib.h	Mon Dec 03 06:59:19 2018 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This header file is used to hijack the include of "zlib.h" from libpng on
- * Macos. We do that to be able to build on macos 10.13 or later, but still
- * keep binary compatibility with older versions (as specified to configure).
- *
- * The problem is that in 10.13, Macos shipped with a newer version of zlib,
- * which exports the function inflateValidate. There is a call to this
- * function in pngrutil.c, guarded by a preprocessor check of ZLIB_VERNUM being
- * high enough. If we compile this call in and link to the newer version of
- * zlib, we will get link errors if the code is executed on an older Mac with
- * an older version of zlib.
- *
- * The zlib.h header in Macos has been annotated with Macos specific macros that
- * guard these kinds of version specific APIs, but libpng is not using those
- * checks in its conditionals, just ZLIB_VERNUM. To fix this, we check for the
- * MAC_OS_X_VERSION_MIN_REQUIRED macro here and adjust the ZLIB_VERNUM to the
- # known version bundled with that release. This solution is certainly a hack,
- * but it seems the affected versions of zlib.h are compatible enough for this
- * to work.
- */
-
-#include <zlib.h>
-#include <AvailabilityMacros.h>
-
-#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
-#  undef ZLIB_VERNUM
-#  define ZLIB_VERNUM 0x1250
-#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_13
-#  undef ZLIB_VERNUM
-#  define ZLIB_VERNUM 0x1280
-#endif
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h	Mon Dec 03 06:59:19 2018 +0530
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h	Mon Dec 03 16:12:33 2018 -0800
@@ -137,7 +137,7 @@
 #define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
 #define PNG_SEQUENTIAL_READ_SUPPORTED
 #define PNG_SETJMP_SUPPORTED
-#define PNG_SET_OPTION_SUPPORTED
+/*#undef PNG_SET_OPTION_SUPPORTED*/
 #define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
 #define PNG_SET_USER_LIMITS_SUPPORTED
 #define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED