8044269: Analysis of archive files.
authorjiangli
Thu, 14 Aug 2014 21:46:27 -0400
changeset 27085 68272379dad0
parent 27084 d7fbf9a294af
child 27086 d2d044ae0869
8044269: Analysis of archive files. Summary: Add checksum verification. Reviewed-by: iklam, dholmes, mschoene
jdk/make/lib/CoreLibraries.gmk
jdk/src/java.base/share/native/libzip/CRC32.c
--- a/jdk/make/lib/CoreLibraries.gmk	Thu Aug 07 12:57:23 2014 -0700
+++ b/jdk/make/lib/CoreLibraries.gmk	Thu Aug 14 21:46:27 2014 -0400
@@ -224,7 +224,7 @@
         $(call SET_SHARED_LIBRARY_ORIGIN) \
         $(EXPORT_ZIP_FUNCS), \
     LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-        -export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
+        -export:ZIP_ReadEntry -export:ZIP_GetNextEntry -export:ZIP_CRC32 jvm.lib \
         $(WIN_JAVA_LIB), \
     LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
     LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
--- a/jdk/src/java.base/share/native/libzip/CRC32.c	Thu Aug 07 12:57:23 2014 -0700
+++ b/jdk/src/java.base/share/native/libzip/CRC32.c	Thu Aug 14 21:46:27 2014 -0400
@@ -54,7 +54,8 @@
     return crc;
 }
 
-JNIEXPORT jint ZIP_CRC32(jint crc, const jbyte *buf, jint len)
+JNIEXPORT jint JNICALL
+ZIP_CRC32(jint crc, const jbyte *buf, jint len)
 {
     return crc32(crc, (Bytef*)buf, len);
 }