--- /dev/null
+package org.simantics.nativemem.internal;\r
+\r
+public enum OS {\r
+ APPLE, LINUX, SUN, WINDOWS, UNKNOWN;\r
+\r
+ public static OS calculate() {\r
+ String osName = System.getProperty("os.name");\r
+ assert osName != null;\r
+ osName = osName.toLowerCase();\r
+ if (osName.startsWith("mac os x"))\r
+ return APPLE;\r
+ if (osName.startsWith("windows"))\r
+ return WINDOWS;\r
+ if (osName.startsWith("linux"))\r
+ return LINUX;\r
+ if (osName.startsWith("sun"))\r
+ return SUN;\r
+ return UNKNOWN;\r
+ }\r
+}\r