From add97e78c62462b4f612c692e70f698467f2d608 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Fri, 8 Oct 2010 12:23:25 -0700 Subject: [PATCH] 6990639: Fix for #6975829 breaks build Define MIN2 micro Reviewed-by: alanb --- jdk/src/share/native/java/util/zip/Inflater.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/src/share/native/java/util/zip/Inflater.c b/jdk/src/share/native/java/util/zip/Inflater.c index 7868c782718..78619f4ac0f 100644 --- a/jdk/src/share/native/java/util/zip/Inflater.c +++ b/jdk/src/share/native/java/util/zip/Inflater.c @@ -38,6 +38,8 @@ #include "zlib.h" #include "java_util_zip_Inflater.h" +#define MIN2(x, y) ((x) < (y) ? (x) : (y)) + #define ThrowDataFormatException(env, msg) \ JNU_ThrowByName(env, "java/util/zip/DataFormatException", msg) @@ -128,7 +130,7 @@ Java_java_util_zip_Inflater_inflateBytes(JNIEnv *env, jobject this, jlong addr, * * Use 20 bytes as the "safe cutoff" number. */ - jint in_len = MIN(this_len, len + 20); + jint in_len = MIN2(this_len, len + 20); jint consumed; in_buf = (jbyte *) malloc(in_len);