GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Implement native sys.getwindowsversion · oracle/graalpython@558531e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • graalpython
    • com.oracle.graal.python.test/src/tests
      • test_sys.py
    • com.oracle.graal.python/src/com/oracle/graal/python
      • PythonLanguage.java
      • builtins/modules
        • SysModuleBuiltins.java
      • runtime
        • EmulatedPosixSupport.java
        • LoggingPosixSupport.java
        • NativePosixSupport.java
        • PosixSupportLibrary.java
        • PreInitPosixSupport.java
    • python-libposix/src
      • posix.c
  • mx.graalpython
    • suite.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎graalpython/com.oracle.graal.python.test/src/tests/test_sys.py‎

Copy file name to clipboard
+135Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3+
#
4+
# The Universal Permissive License (UPL), Version 1.0
5+
#
6+
# Subject to the condition set forth below, permission is hereby granted to any
7+
# person obtaining a copy of this software, associated documentation and/or
8+
# data (collectively the "Software"), free of charge and under any and all
9+
# copyright rights in the Software, and any and all patent rights owned or
10+
# freely licensable by each licensor hereunder covering either (i) the
11+
# unmodified Software as contributed to or provided by such licensor, or (ii)
12+
# the Larger Works (as defined below), to deal in both
13+
#
14+
# (a) the Software, and
15+
#
16+
# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
17+
# one is included with the Software each a "Larger Work" to which the Software
18+
# is contributed by such licensors),
19+
#
20+
# without restriction, including without limitation the rights to copy, create
21+
# derivative works of, display, perform, and distribute the Software and make,
22+
# use, sell, offer for sale, import, export, have made, and have sold the
23+
# Software and the Larger Work(s), and to sublicense the foregoing rights on
24+
# either these or other terms.
25+
#
26+
# This license is subject to the following condition:
27+
#
28+
# The above copyright notice and either this complete permission notice or at a
29+
# minimum a reference to the UPL must be included in all copies or substantial
30+
# portions of the Software.
31+
#
32+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38+
# SOFTWARE.
39+
40+
import subprocess
41+
import sys
42+
import unittest
43+
44+
45+
@unittest.skipUnless(sys.platform == "win32", "Windows only")
46+
class WindowsVersionTests(unittest.TestCase):
47+
def test_getwindowsversion_matches_os(self):
48+
if sys.implementation.name == "graalpy" and __graalpython__.posix_module_backend() == "java":
49+
self.skipTest("The Java backend uses the Java OS version property")
50+
import ctypes
51+
from ctypes import wintypes
52+
53+
class VersionInfo(ctypes.Structure):
54+
_fields_ = [
55+
("size", wintypes.DWORD),
56+
("major", wintypes.DWORD),
57+
("minor", wintypes.DWORD),
58+
("build", wintypes.DWORD),
59+
("platform", wintypes.DWORD),
60+
("service_pack", wintypes.WCHAR * 128),
61+
("service_pack_major", wintypes.WORD),
62+
("service_pack_minor", wintypes.WORD),
63+
("suite_mask", wintypes.WORD),
64+
("product_type", wintypes.BYTE),
65+
("reserved", wintypes.BYTE),
66+
]
67+
68+
kernel32 = ctypes.WinDLL("kernel32", use_last_error=True)
69+
get_version = kernel32.GetVersionExW
70+
get_version.argtypes = [ctypes.POINTER(VersionInfo)]
71+
get_version.restype = wintypes.BOOL
72+
native_version = VersionInfo()
73+
native_version.size = ctypes.sizeof(native_version)
74+
self.assertTrue(get_version(ctypes.byref(native_version)))
75+
76+
version = sys.getwindowsversion()
77+
expected = (native_version.major, native_version.minor, native_version.build)
78+
self.assertEqual(version[:3], expected)
79+
self.assertEqual(version.platform, native_version.platform)
80+
self.assertEqual(version.service_pack, native_version.service_pack)
81+
self.assertEqual(version.service_pack_major, native_version.service_pack_major)
82+
self.assertEqual(version.service_pack_minor, native_version.service_pack_minor)
83+
self.assertEqual(version.suite_mask, native_version.suite_mask)
84+
self.assertEqual(version.product_type, native_version.product_type)
85+
self.assertGreater(version.build, 0)
86+
87+
class FixedFileInfo(ctypes.Structure):
88+
_fields_ = [(name, wintypes.DWORD) for name in (
89+
"signature", "struc_version", "file_version_ms", "file_version_ls",
90+
"product_version_ms", "product_version_ls", "file_flags_mask", "file_flags",
91+
"file_os", "file_type", "file_subtype", "file_date_ms", "file_date_ls",
92+
)]
93+
94+
get_module_handle = kernel32.GetModuleHandleW
95+
get_module_handle.argtypes = [wintypes.LPCWSTR]
96+
get_module_handle.restype = wintypes.HMODULE
97+
get_module_filename = kernel32.GetModuleFileNameW
98+
get_module_filename.argtypes = [wintypes.HMODULE, wintypes.LPWSTR, wintypes.DWORD]
99+
get_module_filename.restype = wintypes.DWORD
100+
path = ctypes.create_unicode_buffer(260)
101+
self.assertTrue(get_module_filename(get_module_handle("kernel32.dll"), path, len(path)))
102+
version_dll = ctypes.WinDLL("version", use_last_error=True)
103+
get_size = version_dll.GetFileVersionInfoSizeW
104+
get_size.argtypes = [wintypes.LPCWSTR, ctypes.POINTER(wintypes.DWORD)]
105+
get_size.restype = wintypes.DWORD
106+
size = get_size(path.value, None)
107+
self.assertGreater(size, 0)
108+
block = ctypes.create_string_buffer(size)
109+
get_info = version_dll.GetFileVersionInfoW
110+
get_info.argtypes = [wintypes.LPCWSTR, wintypes.DWORD, wintypes.DWORD, wintypes.LPVOID]
111+
get_info.restype = wintypes.BOOL
112+
self.assertTrue(get_info(path.value, 0, size, block))
113+
query_value = version_dll.VerQueryValueW
114+
query_value.argtypes = [wintypes.LPCVOID, wintypes.LPCWSTR, ctypes.POINTER(ctypes.c_void_p),
115+
ctypes.POINTER(wintypes.UINT)]
116+
query_value.restype = wintypes.BOOL
117+
value = ctypes.c_void_p()
118+
length = wintypes.UINT()
119+
self.assertTrue(query_value(block, "", ctypes.byref(value), ctypes.byref(length)))
120+
info = ctypes.cast(value, ctypes.POINTER(FixedFileInfo)).contents
121+
self.assertEqual(version.platform_version, (
122+
info.product_version_ms >> 16, info.product_version_ms & 0xffff, info.product_version_ls >> 16,
123+
))
124+
125+
@unittest.skipUnless(sys.implementation.name == "graalpy", "GraalPy backend selection")
126+
def test_getwindowsversion_java_backend(self):
127+
for java_version, expected in [("10.0", (10, 0, 0)), ("10.0.12345", (10, 0, 12345))]:
128+
with self.subTest(java_version=java_version):
129+
result = subprocess.run(
130+
[sys.executable, "--experimental-options", "--python.PosixModuleBackend=java",
131+
"--vm.Dos.version=" + java_version, "-c",
132+
"import sys; print(sys.getwindowsversion()[:3]); print(sys.getwindowsversion().platform_version)"],
133+
capture_output=True, text=True, check=True,
134+
)
135+
self.assertEqual(result.stdout.splitlines(), [str(expected), str(expected)])
Collapse file

‎graalpython/com.oracle.graal.python/src/com/oracle/graal/python/PythonLanguage.java‎

Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python/src/com/oracle/graal/python/PythonLanguage.java
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
import com.oracle.graal.python.compiler.ParserCallbacksImpl;
8383
import com.oracle.graal.python.compiler.bytecode_dsl.BytecodeDSLCompiler;
8484
import com.oracle.graal.python.compiler.bytecode_dsl.BytecodeDSLCompiler.BytecodeDSLCompilerResult;
85+
import com.oracle.graal.python.nodes.PConstructAndRaiseNode;
8586
import com.oracle.graal.python.nodes.bytecode_dsl.BytecodeDSLCodeUnit;
8687
import com.oracle.graal.python.nodes.bytecode_dsl.PBytecodeDSLRootNode;
8788
import com.oracle.graal.python.nodes.call.CallDispatchers;
@@ -102,6 +103,9 @@
102103
import com.oracle.graal.python.runtime.GilNode;
103104
import com.oracle.graal.python.runtime.IndirectCallData.BoundaryCallData;
104105
import com.oracle.graal.python.runtime.IndirectCallData.InteropCallData;
106+
import com.oracle.graal.python.runtime.PosixSupportLibrary;
107+
import com.oracle.graal.python.runtime.PosixSupportLibrary.PosixException;
108+
import com.oracle.graal.python.runtime.PosixSupportLibrary.WindowsVersion;
105109
import com.oracle.graal.python.runtime.PythonContext;
106110
import com.oracle.graal.python.runtime.PythonContext.PythonThreadState;
107111
import com.oracle.graal.python.runtime.PythonImageBuildOptions;
@@ -140,6 +144,7 @@
140144
import com.oracle.truffle.api.library.ExportLibrary;
141145
import com.oracle.truffle.api.library.ExportMessage;
142146
import com.oracle.truffle.api.nodes.DirectCallNode;
147+
import com.oracle.truffle.api.nodes.EncapsulatingNodeReference;
143148
import com.oracle.truffle.api.nodes.ExecutableNode;
144149
import com.oracle.truffle.api.nodes.Node;
145150
import com.oracle.truffle.api.nodes.RootNode;
@@ -1063,6 +1068,27 @@ public CaseMap.Title getCachedICUTitleCaser() {
10631068
return cachedICUTitleCaser;
10641069
}
10651070

1071+
@CompilationFinal private WindowsVersion windowsVersion;
1072+
1073+
public WindowsVersion getWindowsVersion(Node node) {
1074+
if (windowsVersion == null) {
1075+
CompilerDirectives.transferToInterpreterAndInvalidate();
1076+
assert !ImageInfo.inImageBuildtimeCode();
1077+
try {
1078+
windowsVersion = PosixSupportLibrary.getUncached().getWindowsVersion(PythonContext.get(node).getPosixSupport());
1079+
} catch (PosixException e) {
1080+
EncapsulatingNodeReference encapsulating = EncapsulatingNodeReference.getCurrent();
1081+
Node previousNode = encapsulating.set(node);
1082+
try {
1083+
throw PConstructAndRaiseNode.getUncached().raiseOSErrorFromPosixException(null, e);
1084+
} finally {
1085+
encapsulating.set(previousNode);
1086+
}
1087+
}
1088+
}
1089+
return windowsVersion;
1090+
}
1091+
10661092
@Override
10671093
protected boolean isThreadAccessAllowed(Thread thread, boolean singleThreaded) {
10681094
if (singleThreaded) {
Collapse file

‎graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/SysModuleBuiltins.java‎

Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/SysModuleBuiltins.java
+15-41Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@
255255
import com.oracle.graal.python.runtime.GilNode;
256256
import com.oracle.graal.python.runtime.IndirectCallData.BoundaryCallData;
257257
import com.oracle.graal.python.runtime.PosixSupportLibrary;
258+
import com.oracle.graal.python.runtime.PosixSupportLibrary.WindowsVersion;
258259
import com.oracle.graal.python.runtime.PythonContext;
259260
import com.oracle.graal.python.runtime.PythonContext.CApiState;
260261
import com.oracle.graal.python.runtime.PythonOptions;
@@ -2432,50 +2433,23 @@ protected ArgumentClinicProvider getArgumentClinic() {
24322433

24332434
@Builtin(name = "getwindowsversion", minNumOfPositionalArgs = 0, os = PLATFORM_WIN32)
24342435
@GenerateNodeFactory
2435-
abstract static class Getwindowsversion extends PythonBuiltinNode {
2436-
static int[] CACHED_VERSION_INFO = null;
2437-
static int PLATFORM = 2;
2436+
abstract static class GetWindowsVersion extends PythonBuiltinNode {
2437+
@Specialization(guards = "isSingleContext()")
2438+
static PTuple getVersionCached(
2439+
@Bind PythonLanguage language,
2440+
@Cached(value = "getVersion($node, language)", neverDefault = true) PTuple version) {
2441+
return version;
2442+
}
24382443

2439-
@Specialization
2440-
PTuple getVersion(
2444+
@Specialization(replaces = "getVersionCached")
2445+
static PTuple getVersion(
2446+
@Bind Node inliningTarget,
24412447
@Bind PythonLanguage language) {
2442-
if (CACHED_VERSION_INFO == null) {
2443-
cacheVersion();
2444-
}
2448+
WindowsVersion versionInfo = language.getWindowsVersion(inliningTarget);
24452449
return PFactory.createStructSeq(language, WINDOWS_VER_DESC,
2446-
CACHED_VERSION_INFO[0], CACHED_VERSION_INFO[1], CACHED_VERSION_INFO[2],
2447-
PLATFORM, T_EMPTY_STRING, 0, 0, 0, 1,
2448-
PFactory.createTuple(language, CACHED_VERSION_INFO));
2449-
}
2450-
2451-
@TruffleBoundary
2452-
static void cacheVersion() {
2453-
String[] winvers = System.getProperty("os.version", "10.0.20000").split("\\.");
2454-
int major = 0;
2455-
int minor = 0;
2456-
int build = 0;
2457-
if (winvers.length > 0) {
2458-
try {
2459-
major = Integer.parseInt(winvers[0]);
2460-
} catch (NumberFormatException e) {
2461-
// use default
2462-
}
2463-
}
2464-
if (winvers.length > 1) {
2465-
try {
2466-
minor = Integer.parseInt(winvers[1]);
2467-
} catch (NumberFormatException e) {
2468-
// use default
2469-
}
2470-
}
2471-
if (winvers.length > 2) {
2472-
try {
2473-
build = Integer.parseInt(winvers[2]);
2474-
} catch (NumberFormatException e) {
2475-
// use default
2476-
}
2477-
}
2478-
CACHED_VERSION_INFO = new int[]{major, minor, build};
2450+
versionInfo.major(), versionInfo.minor(), versionInfo.build(),
2451+
versionInfo.platform(), versionInfo.servicePack(), versionInfo.servicePackMajor(), versionInfo.servicePackMinor(), versionInfo.suiteMask(), versionInfo.productType(),
2452+
PFactory.createTuple(language, new int[]{versionInfo.platformMajor(), versionInfo.platformMinor(), versionInfo.platformBuild()}));
24792453
}
24802454
}
24812455
}
Collapse file

‎graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/EmulatedPosixSupport.java‎

Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/EmulatedPosixSupport.java
+33Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
import com.oracle.graal.python.runtime.PosixSupportLibrary.UniversalSockAddrLibrary;
251251
import com.oracle.graal.python.runtime.PosixSupportLibrary.UnixSockAddr;
252252
import com.oracle.graal.python.runtime.PosixSupportLibrary.UnsupportedPosixFeatureException;
253+
import com.oracle.graal.python.runtime.PosixSupportLibrary.WindowsVersion;
253254
import com.oracle.graal.python.runtime.exception.PythonExitException;
254255
import com.oracle.graal.python.util.FileDeleteShutdownHook;
255256
import com.oracle.graal.python.util.IPAddressUtil;
@@ -1515,6 +1516,38 @@ public Object[] uname(
15151516
};
15161517
}
15171518

1519+
@ExportMessage
1520+
@TruffleBoundary
1521+
@SuppressWarnings("static-method")
1522+
public WindowsVersion getWindowsVersion() {
1523+
String[] winvers = System.getProperty("os.version", "10.0.20000").split("\\.");
1524+
int major = 0;
1525+
int minor = 0;
1526+
int build = 0;
1527+
if (winvers.length > 0) {
1528+
try {
1529+
major = Integer.parseInt(winvers[0]);
1530+
} catch (NumberFormatException e) {
1531+
// use default
1532+
}
1533+
}
1534+
if (winvers.length > 1) {
1535+
try {
1536+
minor = Integer.parseInt(winvers[1]);
1537+
} catch (NumberFormatException e) {
1538+
// use default
1539+
}
1540+
}
1541+
if (winvers.length > 2) {
1542+
try {
1543+
build = Integer.parseInt(winvers[2]);
1544+
} catch (NumberFormatException e) {
1545+
// use default
1546+
}
1547+
}
1548+
return new WindowsVersion(major, minor, build, 2, T_EMPTY_STRING, 0, 0, 0, 1, major, minor, build);
1549+
}
1550+
15181551
@TruffleBoundary
15191552
private static String getOsVersion() {
15201553
return System.getProperty("os.version", "");
Collapse file

‎graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/LoggingPosixSupport.java‎

Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/LoggingPosixSupport.java
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
import com.oracle.graal.python.runtime.PosixSupportLibrary.UniversalSockAddr;
6666
import com.oracle.graal.python.runtime.PosixSupportLibrary.UnixSockAddr;
6767
import com.oracle.graal.python.runtime.PosixSupportLibrary.UnsupportedPosixFeatureException;
68+
import com.oracle.graal.python.runtime.PosixSupportLibrary.WindowsVersion;
6869
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
6970
import com.oracle.truffle.api.RootCallTarget;
7071
import com.oracle.truffle.api.Truffle;
@@ -485,6 +486,17 @@ final Object[] uname(
485486
}
486487
}
487488

489+
@ExportMessage
490+
final WindowsVersion getWindowsVersion(
491+
@CachedLibrary("this.delegate") PosixSupportLibrary lib) throws PosixException {
492+
logEnter("getWindowsVersion", "");
493+
try {
494+
return logExit("getWindowsVersion", "%s", lib.getWindowsVersion(delegate));
495+
} catch (PosixException e) {
496+
throw logException("getWindowsVersion", e);
497+
}
498+
}
499+
488500
@ExportMessage
489501
final void unlinkat(int dirFd, Object pathname, boolean rmdir,
490502
@CachedLibrary("this.delegate") PosixSupportLibrary lib) throws PosixException {
Collapse file

‎graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/NativePosixSupport.java‎

Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/NativePosixSupport.java
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
import com.oracle.graal.python.runtime.PosixSupportLibrary.UniversalSockAddr;
124124
import com.oracle.graal.python.runtime.PosixSupportLibrary.UniversalSockAddrLibrary;
125125
import com.oracle.graal.python.runtime.PosixSupportLibrary.UnixSockAddr;
126+
import com.oracle.graal.python.runtime.PosixSupportLibrary.WindowsVersion;
126127
import com.oracle.graal.python.runtime.exception.PException;
127128
import com.oracle.graal.python.runtime.nativeaccess.NativeLibrary;
128129
import com.oracle.graal.python.runtime.nativeaccess.NativeLibraryLoadException;
@@ -290,6 +291,9 @@ abstract static class PosixNativeFunctionInvoker {
290291
@DowncallSignature(returnType = SINT32, argumentTypes = {POINTER, POINTER, POINTER, POINTER, POINTER, SINT32})
291292
abstract int call_uname(long sysname, long nodename, long release, long version, long machine, int size);
292293

294+
@DowncallSignature(returnType = SINT32, argumentTypes = {POINTER, POINTER})
295+
abstract int call_get_windows_version(long out, long servicePack);
296+
293297
@DowncallSignature(returnType = SINT32, argumentTypes = {SINT32, POINTER, SINT32})
294298
abstract int call_unlinkat(int dirFd, long pathname, int rmdir);
295299

@@ -1176,6 +1180,27 @@ public Object[] uname(
11761180
}
11771181
}
11781182

1183+
@ExportMessage
1184+
@TruffleBoundary
1185+
public WindowsVersion getWindowsVersion() throws PosixException {
1186+
long out = NativeMemory.mallocIntArray(11);
1187+
// OSVERSIONINFOEXW.szCSDVersion contains 128 UTF-16 code units.
1188+
long servicePack = NativeMemory.mallocByteArray(256);
1189+
try {
1190+
if (posixNativeFunctionInvoker.call_get_windows_version(out, servicePack) != 0) {
1191+
throw getErrnoAndThrowPosixException();
1192+
}
1193+
int[] info = NativeMemory.readIntArrayElements(out, 0, 11);
1194+
byte[] buffer = new byte[256];
1195+
NativeMemory.readByteArrayElements(servicePack, 0, buffer, 0, buffer.length);
1196+
TruffleString servicePackString = TruffleString.fromByteArrayUncached(buffer, 0, findWideZero(buffer), UTF_16LE, false).switchEncodingUncached(TS_ENCODING);
1197+
return new WindowsVersion(info[0], info[1], info[2], info[3], servicePackString, info[4], info[5], info[6], info[7], info[8], info[9], info[10]);
1198+
} finally {
1199+
NativeMemory.free(servicePack);
1200+
NativeMemory.free(out);
1201+
}
1202+
}
1203+
11791204
@ExportMessage
11801205
public void unlinkat(int dirFd, Object pathname, boolean rmdir) throws PosixException {
11811206
long pathnamePtr = pathToNativeCString(pathname);
Collapse file

‎graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PosixSupportLibrary.java‎

Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PosixSupportLibrary.java
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ public abstract class PosixSupportLibrary extends Library {
158158

159159
public abstract Object[] uname(Object receiver) throws PosixException;
160160

161+
public record WindowsVersion(int major, int minor, int build, int platform, TruffleString servicePack,
162+
int servicePackMajor, int servicePackMinor, int suiteMask, int productType,
163+
int platformMajor, int platformMinor, int platformBuild) {
164+
}
165+
166+
/** Returns the Windows version and product information. */
167+
public abstract WindowsVersion getWindowsVersion(Object receiver) throws PosixException;
168+
161169
public abstract void unlinkat(Object receiver, int dirFd, Object pathname, boolean rmdir) throws PosixException;
162170

163171
public abstract void linkat(Object receiver, int oldFdDir, Object oldPath, int newFdDir, Object newPath, int flags) throws PosixException;

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.