changeset 14464:dc8461142fb8

8074836: Resolve disabled warnings for libosxkrb5 8074835: Resolve disabled warnings for libj2gss Reviewed-by: erikj
author weijun
date Mon, 16 Mar 2015 18:08:01 +0800
parents 9122a352fb12
children 801743983ed6
files make/lib/SecurityLibraries.gmk src/share/native/sun/security/jgss/wrapper/GSSLibStub.c src/share/native/sun/security/krb5/nativeccache.c
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/lib/SecurityLibraries.gmk	Wed Aug 05 16:35:41 2015 +0300
+++ b/make/lib/SecurityLibraries.gmk	Mon Mar 16 18:08:01 2015 +0800
@@ -133,6 +133,8 @@
   endif
 
   ifneq ($(BUILD_LIBKRB5_NAME), )
+    # libosxkrb5 needs to call deprecated krb5 APIs so that java
+    # can use the native credentials cache.
     $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
         LIBRARY := $(BUILD_LIBKRB5_NAME), \
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
--- a/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c	Wed Aug 05 16:35:41 2015 +0300
+++ b/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c	Mon Mar 16 18:08:01 2015 +0800
@@ -430,11 +430,11 @@
 
     checkStatus(env, jobj, major, minor, "[GSSLibStub_canonicalizeName]");
     if ((*env)->ExceptionCheck(env)) {
-      return (jlong) GSS_C_NO_NAME;
+      return ptr_to_jlong(GSS_C_NO_NAME);
     }
     return ptr_to_jlong(mnNameHdl);
   }
-  return (jlong) GSS_C_NO_NAME;
+  return ptr_to_jlong(GSS_C_NO_NAME);
 }
 
 /*
--- a/src/share/native/sun/security/krb5/nativeccache.c	Wed Aug 05 16:35:41 2015 +0300
+++ b/src/share/native/sun/security/krb5/nativeccache.c	Mon Mar 16 18:08:01 2015 +0800
@@ -25,6 +25,8 @@
 
 #import "sun_security_krb5_Credentials.h"
 #import <Kerberos/Kerberos.h>
+#import <string.h>
+#import <time.h>
 
 /*
  * Based largely on klist.c,