diff --git a/src/org/sosy_lab/common/NativeLibraries.java b/src/org/sosy_lab/common/NativeLibraries.java index fe51a9a0b..60d32f6d0 100644 --- a/src/org/sosy_lab/common/NativeLibraries.java +++ b/src/org/sosy_lab/common/NativeLibraries.java @@ -28,18 +28,26 @@ *

The searched directories are: * *

* *

Standard usage is by calling the method {@link NativeLibraries#loadLibrary} with the library @@ -61,7 +69,10 @@ private NativeLibraries() {} public enum OS { LINUX, MACOSX, - WINDOWS; + WINDOWS, + FREEBSD, + NETBSD, + OPENBSD; @SuppressWarnings("MemberName") private static @Nullable OS currentOS = null; @@ -84,6 +95,12 @@ public static OS guessOperatingSystem() { currentOS = WINDOWS; } else if (prop.startsWith("macosx")) { currentOS = MACOSX; + } else if (prop.startsWith("freebsd")) { + currentOS = FREEBSD; + } else if (prop.startsWith("netbsd")) { + currentOS = NETBSD; + } else if (prop.startsWith("openbsd")) { + currentOS = OPENBSD; } else { throw new UnsatisfiedLinkError( "Unknown value for os.name: '" @@ -213,7 +230,7 @@ public static void loadLibrary(String name) { * NativeLibraries}. * * @param libraryName A library name as for {@link System#loadLibrary(String)}. - * @return Found path or {@code Optional.absent()} + * @return Found path or {@link Optional#empty()} */ @Deprecated // will become private public static Optional findPathForLibrary(String libraryName) {