Report Invalid_Whence on some os platforms
- Move `Seek`-related checks into OS-specific files for granularity. Platforms: - Darwin - FreeBSD - Haiku - Linux - NetBSD - OpenBSD
This commit is contained in:
1 parent
0243647e15
commit
6aedb2695a
7 files changed
+73
-14
No files matched your search
@@ -47,14 +47,6 @@ _file_stream_proc :: proc(stream_data: rawptr, mode: io.Stream_Mode, p: []byte,
|
||||
}
|
||||
case .Seek:
|
||||
n, os_err = seek(fd, offset, int(whence))
|
||||
if os_err != nil {
|
||||
switch whence {
|
||||
case .Start, .Current, .End:
|
||||
return 0, .Invalid_Offset
|
||||
case:
|
||||
return 0, .Invalid_Whence
|
||||
}
|
||||
}
|
||||
case .Size:
|
||||
n, os_err = file_size(fd)
|
||||
case .Destroy:
|
||||
|
||||
Reference in new issue
Block a user