提交 09679ff6 编写于 作者: W weijun

8010192: Enable native JGSS provider on Mac

Reviewed-by: valeriep
上级 2e5d85af
...@@ -38,12 +38,10 @@ SUBDIRS_MAKEFLAGS += JAVAC_MAX_WARNINGS=true ...@@ -38,12 +38,10 @@ SUBDIRS_MAKEFLAGS += JAVAC_MAX_WARNINGS=true
SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
# build sun/security/jgss/wrapper on non-windows non-macosx platforms # build sun/security/jgss/wrapper on non-windows platforms
JGSS_WRAPPER = JGSS_WRAPPER =
ifneq ($(PLATFORM), windows) ifneq ($(PLATFORM), windows)
ifneq ($(PLATFORM), macosx) JGSS_WRAPPER = jgss/wrapper
JGSS_WRAPPER = jgss/wrapper
endif
endif endif
# Build PKCS#11 on all platforms # Build PKCS#11 on all platforms
......
...@@ -2545,7 +2545,6 @@ BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC) ...@@ -2545,7 +2545,6 @@ BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC)
########################################################################################## ##########################################################################################
ifneq ($(OPENJDK_TARGET_OS), windows) ifneq ($(OPENJDK_TARGET_OS), windows)
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS,\ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS,\
LIBRARY:=j2gss,\ LIBRARY:=j2gss,\
OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\ OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
...@@ -2565,7 +2564,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS,\ ...@@ -2565,7 +2564,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS,\
BUILD_LIBRARIES += $(BUILD_LIBJ2GSS) BUILD_LIBRARIES += $(BUILD_LIBJ2GSS)
endif endif
endif
########################################################################################## ##########################################################################################
......
...@@ -48,6 +48,7 @@ public class GSSManagerImpl extends GSSManager { ...@@ -48,6 +48,7 @@ public class GSSManagerImpl extends GSSManager {
public Boolean run() { public Boolean run() {
String osname = System.getProperty("os.name"); String osname = System.getProperty("os.name");
if (osname.startsWith("SunOS") || if (osname.startsWith("SunOS") ||
osname.contains("OS X") ||
osname.startsWith("Linux")) { osname.startsWith("Linux")) {
return new Boolean(System.getProperty return new Boolean(System.getProperty
(USE_NATIVE_PROP)); (USE_NATIVE_PROP));
......
...@@ -90,6 +90,11 @@ public final class SunNativeProvider extends Provider { ...@@ -90,6 +90,11 @@ public final class SunNativeProvider extends Provider {
"libgssapi_krb5.so", "libgssapi_krb5.so",
"libgssapi_krb5.so.2", "libgssapi_krb5.so.2",
}; };
} else if (osname.contains("OS X")) {
gssLibs = new String[]{
"libgssapi_krb5.dylib",
"/usr/lib/sasl2/libgssapiv2.2.so",
};
} }
} else { } else {
gssLibs = new String[]{ defaultLib }; gssLibs = new String[]{ defaultLib };
......
...@@ -32,10 +32,21 @@ ...@@ -32,10 +32,21 @@
#ifndef _GSSAPI_H_ #ifndef _GSSAPI_H_
#define _GSSAPI_H_ #define _GSSAPI_H_
#if defined(__MACH__) && defined(__APPLE__)
# include <TargetConditionals.h>
# if TARGET_RT_MAC_CFM
# error "Use KfM 4.0 SDK headers for CFM compilation."
# endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#if TARGET_OS_MAC
# pragma pack(push,2)
#endif
/* /*
* First, include stddef.h to get size_t defined. * First, include stddef.h to get size_t defined.
*/ */
...@@ -671,6 +682,10 @@ OM_uint32 gss_canonicalize_name( ...@@ -671,6 +682,10 @@ OM_uint32 gss_canonicalize_name(
gss_name_t * /* output_name */ gss_name_t * /* output_name */
); );
#if TARGET_OS_MAC
# pragma pack(pop)
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -52,15 +52,11 @@ NATIVE=false ...@@ -52,15 +52,11 @@ NATIVE=false
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin )
PATHSEP=":" PATHSEP=":"
FILESEP="/" FILESEP="/"
NATIVE=true NATIVE=true
;; ;;
Darwin )
PATHSEP=":"
FILESEP="/"
;;
CYGWIN* ) CYGWIN* )
PATHSEP=";" PATHSEP=";"
FILESEP="/" FILESEP="/"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册