   import Glibc
 #elseif os(Windows)
   import MSVCRT
+
+  let S_IRUSR: Int32 = ucrt._S_IREAD
+  let S_IWUSR: Int32 = 0
+  let S_IXUSR: Int32 = 0
+
+  let S_IRGRP: Int32 = 0o0040
+  let S_IROTH: Int32 = 0o0004
 #else
 #error("Unsupported platform")
 #endif


print("created mode *\(statbuf1.st_mode)* *\(statbuf2.st_mode)*")

assert(statbuf1.st_mode == S_IFREG | S_IRUSR | S_IWUSR | S_IXUSR)
assert(statbuf1.st_mode == statbuf2.st_mode)


}

// CHECK-NOT: error
// CHECK: created mode *{{33216|33060}}* *{{33216|33060}}*
let tempFile = 
  open(tempPath, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IXUSR)
if tempFile == -1 {
