Remove the libmlib_image mapfile.
--- a/make/lib/Awt2dLibraries.gmk Tue Feb 13 12:39:56 2018 +0100
+++ b/make/lib/Awt2dLibraries.gmk Tue Feb 13 13:02:19 2018 +0100
@@ -36,7 +36,6 @@
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libmlib_image
BUILD_LIBMLIB_LDLIBS :=
-BUILD_LIBMLIB_IMAGE_MAPFILE := $(TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers
BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
@@ -56,7 +55,6 @@
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBMLIB_CFLAGS), \
- MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(BUILD_LIBMLIB_LDLIBS) \
@@ -116,7 +114,6 @@
CFLAGS := -xarch=sparcvis \
$(LIBMLIB_IMAGE_V_CFLAGS) \
$(CFLAGS_JDKLIB), \
- MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \
--- a/make/mapfiles/libmlib_image/mapfile-vers Tue Feb 13 12:39:56 2018 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 2013, 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.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
- global:
- j2d_mlib_ImageDelete;
- j2d_mlib_ImageCreateStruct;
- j2d_mlib_ImageLookUp;
- j2d_mlib_ImageCreate;
- j2d_mlib_ImageConvMxN;
- j2d_mlib_ImageAffine;
- j2d_mlib_ImageConvKernelConvert;
- local:
- *;
-};
--- a/src/java.desktop/share/native/common/awt/medialib/mlib_ImageCreate.c Tue Feb 13 12:39:56 2018 +0100
+++ b/src/java.desktop/share/native/common/awt/medialib/mlib_ImageCreate.c Tue Feb 13 13:02:19 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -117,6 +117,7 @@
*/
#include <stdlib.h>
+#include "jni.h"
#include "mlib_image.h"
#include "mlib_ImageRowTable.h"
#include "mlib_ImageCreate.h"
@@ -253,6 +254,7 @@
}
/***************************************************************/
+JNIEXPORT
mlib_image *mlib_ImageCreate(mlib_type type,
mlib_s32 channels,
mlib_s32 width,
@@ -352,6 +354,7 @@
}
/***************************************************************/
+JNIEXPORT
void mlib_ImageDelete(mlib_image *img)
{
if (img == NULL) return;
--- a/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.c Tue Feb 13 12:39:56 2018 +0100
+++ b/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.c Tue Feb 13 13:02:19 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -72,6 +72,7 @@
* src image can not have width or height larger than 32767.
*/
+#include "jni.h"
#include "mlib_ImageCheck.h"
#include "mlib_ImageAffine.h"
@@ -299,6 +300,7 @@
}
/***************************************************************/
+JNIEXPORT
mlib_status mlib_ImageAffine(mlib_image *dst,
const mlib_image *src,
const mlib_d64 *mtx,
--- a/src/java.desktop/share/native/libmlib_image/mlib_ImageConvKernelConvert.c Tue Feb 13 12:39:56 2018 +0100
+++ b/src/java.desktop/share/native/libmlib_image/mlib_ImageConvKernelConvert.c Tue Feb 13 13:02:19 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -56,6 +56,7 @@
*/
#include <stdlib.h>
+#include "jni.h"
#include "mlib_image.h"
#include "mlib_SysMath.h"
#include "mlib_ImageConv.h"
@@ -78,6 +79,7 @@
#endif /* __sparc */
/***************************************************************/
+JNIEXPORT
mlib_status mlib_ImageConvKernelConvert(mlib_s32 *ikernel,
mlib_s32 *iscale,
const mlib_d64 *fkernel,
--- a/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN.c Tue Feb 13 12:39:56 2018 +0100
+++ b/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN.c Tue Feb 13 13:02:19 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -81,6 +81,7 @@
* For data type MLIB_INT: scale >= 0
*/
+#include "jni.h"
#include "mlib_image.h"
#include "mlib_ImageCheck.h"
#include "mlib_ImageConv.h"
@@ -90,6 +91,7 @@
#include "mlib_ImageConvEdge.h"
/***************************************************************/
+JNIEXPORT
mlib_status mlib_ImageConvMxN(mlib_image *dst,
const mlib_image *src,
const mlib_s32 *kernel,
--- a/src/java.desktop/share/native/libmlib_image/mlib_c_ImageLookUp.c Tue Feb 13 12:39:56 2018 +0100
+++ b/src/java.desktop/share/native/libmlib_image/mlib_c_ImageLookUp.c Tue Feb 13 13:02:19 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -72,12 +72,14 @@
* dst[x][y][c] = table[c][src[x][y][c]]
*/
+#include "jni.h"
#include "mlib_image.h"
#include "mlib_ImageCheck.h"
#include "mlib_ImageLookUp.h"
#include "mlib_c_ImageLookUp.h"
/***************************************************************/
+JNIEXPORT
mlib_status mlib_ImageLookUp(mlib_image *dst,
const mlib_image *src,
const void **table)
--- a/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h Tue Feb 13 12:39:56 2018 +0100
+++ b/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h Tue Feb 13 13:02:19 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -27,6 +27,7 @@
#ifndef __ORIG_MLIB_IMAGE_PROTO_H
#define __ORIG_MLIB_IMAGE_PROTO_H
+#include "jni.h"
#include <mlib_types.h>
#include <mlib_status.h>
#include <mlib_image_types.h>
@@ -43,12 +44,6 @@
#endif // __USE_J2D_NAMES
#if defined ( _MSC_VER )
-#define J2D_MLIB_PUBLIC __declspec(dllexport)
-#else
-#define J2D_MLIB_PUBLIC
-#endif /* _MSC_VER */
-
-#if defined ( _MSC_VER )
#if ! defined ( __MEDIALIB_OLD_NAMES )
#define __MEDIALIB_OLD_NAMES
#endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
@@ -1059,7 +1054,7 @@
#if defined ( __MEDIALIB_OLD_NAMES )
#define __mlib_ImageCreate mlib_ImageCreate
#endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
+JNIEXPORT
mlib_image * __mlib_ImageCreate(mlib_type type,
mlib_s32 channels,
mlib_s32 width,
@@ -1069,7 +1064,7 @@
#if defined ( __MEDIALIB_OLD_NAMES )
#define __mlib_ImageCreateStruct mlib_ImageCreateStruct
#endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
+JNIEXPORT
mlib_image * __mlib_ImageCreateStruct(mlib_type type,
mlib_s32 channels,
mlib_s32 width,
@@ -1091,7 +1086,7 @@
#if defined ( __MEDIALIB_OLD_NAMES )
#define __mlib_ImageDelete mlib_ImageDelete
#endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
+JNIEXPORT
void __mlib_ImageDelete(mlib_image *img);
@@ -1421,7 +1416,7 @@
#if defined ( __MEDIALIB_OLD_NAMES )
#define __mlib_ImageAffine mlib_ImageAffine
#endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
+JNIEXPORT
mlib_status __mlib_ImageAffine(mlib_image *dst,
const mlib_image *src,
const mlib_d64 *mtx,
@@ -2302,7 +2297,7 @@
#if defined ( __MEDIALIB_OLD_NAMES )
#define __mlib_ImageLookUp mlib_ImageLookUp
#endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
+JNIEXPORT
mlib_status __mlib_ImageLookUp(mlib_image *dst,
const mlib_image *src,
const void **table);
@@ -2631,7 +2626,7 @@
#if defined ( __MEDIALIB_OLD_NAMES )
#define __mlib_ImageConvKernelConvert mlib_ImageConvKernelConvert
#endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
+JNIEXPORT
mlib_status __mlib_ImageConvKernelConvert(mlib_s32 *ikernel,
mlib_s32 *iscale,
const mlib_d64 *fkernel,
@@ -2643,7 +2638,7 @@
#if defined ( __MEDIALIB_OLD_NAMES )
#define __mlib_ImageConvMxN mlib_ImageConvMxN
#endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
+JNIEXPORT
mlib_status __mlib_ImageConvMxN(mlib_image *dst,
const mlib_image *src,
const mlib_s32 *kernel,
--- a/src/java.desktop/unix/native/libmlib_image/mlib_v_ImageLookUp.c Tue Feb 13 12:39:56 2018 +0100
+++ b/src/java.desktop/unix/native/libmlib_image/mlib_v_ImageLookUp.c Tue Feb 13 13:02:19 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -72,6 +72,7 @@
* dst[x][y][c] = table[c][src[x][y][c]]
*/
+#include "jni.h"
#include "mlib_image.h"
#include "mlib_ImageCheck.h"
#include "mlib_ImageLookUp.h"
@@ -122,6 +123,7 @@
return MLIB_SUCCESS
/***************************************************************/
+JNIEXPORT
mlib_status mlib_ImageLookUp(mlib_image *dst,
const mlib_image *src,
const void **table)