Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Nonstop OS as one of the operating systems supported by Capsule. #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions capsule/src/main/java/Capsule.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,11 @@ public class Capsule implements Runnable, InvocationHandler {
private static final String OS_UNIX = "unix";
private static final String OS_POSIX = "posix";
private static final String OS_VMS = "vms";
private static final String OS_NONSTOP = "nonstop";

private static final String OS = getProperty(PROP_OS_NAME).toLowerCase();

private static final Set<String> PLATFORMS = immutableSet(OS_WINDOWS, OS_MACOS, OS_LINUX, OS_SOLARIS, OS_BSD, OS_AIX, OS_POSIX, OS_UNIX, OS_POSIX, OS_VMS);
private static final Set<String> PLATFORMS = immutableSet(OS_WINDOWS, OS_MACOS, OS_LINUX, OS_SOLARIS, OS_BSD, OS_AIX, OS_POSIX, OS_UNIX, OS_POSIX, OS_VMS, OS_NONSTOP);
private static final String PLATFORM = getOS();

private static final String ENV_CACHE_DIR = "CAPSULE_CACHE_DIR";
Expand Down Expand Up @@ -3861,7 +3862,7 @@ protected static final boolean isMac() {
@SuppressWarnings("StringEquality")
protected static final boolean isUnix() {
return PLATFORM == OS_LINUX || PLATFORM == OS_SOLARIS || PLATFORM == OS_BSD
|| PLATFORM == OS_AIX || PLATFORM == OS_HP_UX;
|| PLATFORM == OS_AIX || PLATFORM == OS_HP_UX || PLATFORM == OS_NONSTOP;
}

private static String getOS() {
Expand All @@ -3881,6 +3882,9 @@ private static String getOS() {
return OS_HP_UX;
if (OS.contains("vms"))
return OS_VMS;
if (OS.contains("nonstop"))
return OS_NONSTOP;


log(LOG_QUIET, "WARNING Unrecognized OS: " + System.getProperty(PROP_OS_NAME));
return null;
Expand Down