mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 21:10:30 +00:00
Fix up ABI name for core:os and core:os/old
This commit is contained in:
@@ -258,7 +258,7 @@ parse_and_set_pointer_by_named_type :: proc(ptr: rawptr, str: string, data_type:
|
||||
// NOTE(Feoramund): os.Error is system-dependent, and there's
|
||||
// currently no good way to translate them all into strings.
|
||||
//
|
||||
// The upcoming `os2` package will hopefully solve this.
|
||||
// The upcoming `core:os` package will hopefully solve this.
|
||||
//
|
||||
// We can at least provide the number for now, so the user can look
|
||||
// it up.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:slice"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:intrinsics"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:sys/linux"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:sys/posix"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:sys/darwin"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:container/queue"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:slice"
|
||||
import "base:intrinsics"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:time"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package os provides a platform-independent interface to operating system functionality.
|
||||
// package os_old provides a platform-independent interface to operating system functionality.
|
||||
// The design is UNIX-like but with Odin-like error handling. Failing calls return values with a specific error type rather than error number.
|
||||
//
|
||||
// The package os interface is intended to be uniform across all operating systems.
|
||||
// The package os_old interface is intended to be uniform across all operating systems.
|
||||
// Features not generally available appear in the system-specific packages under core:sys/*.
|
||||
package os2
|
||||
package os
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:strings"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "base:intrinsics"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import win32 "core:sys/windows"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:io"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
_Platform_Error :: enum i32 {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:sys/linux"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:sys/posix"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:slice"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:io"
|
||||
import "core:time"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:io"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:intrinsics"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:strconv"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+feature global-context
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:mem"
|
||||
import win32 "core:sys/windows"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:intrinsics"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+build darwin, linux, netbsd, freebsd, openbsd, haiku
|
||||
package os
|
||||
package os_old_old
|
||||
|
||||
import "core:strings"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import win32 "core:sys/windows"
|
||||
import "core:strings"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import win32 "core:sys/windows"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import "base:intrinsics"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Cross-platform `OS` interactions like file `I/O`.
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import "base:intrinsics"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
foreign import dl "system:dl"
|
||||
foreign import libc "system:System"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import "core:sys/es"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
foreign import dl "system:dl"
|
||||
foreign import libc "system:c"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#+build freestanding
|
||||
package os
|
||||
package os_old
|
||||
|
||||
#panic("package os does not support a freestanding target")
|
||||
#panic("package os_old does not support a freestanding target")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
foreign import lib "system:c"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+build js
|
||||
package os
|
||||
package os_old
|
||||
|
||||
foreign import "odin_env"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
foreign import dl "system:dl"
|
||||
foreign import libc "system:c"
|
||||
@@ -7,19 +7,8 @@ import "base:runtime"
|
||||
import "core:strings"
|
||||
import "core:c"
|
||||
import "core:strconv"
|
||||
|
||||
// NOTE(flysand): For compatibility we'll make core:os package
|
||||
// depend on the old (scheduled for removal) linux package.
|
||||
// Seeing that there are plans for os2, I'm imagining that *that*
|
||||
// package should inherit the new sys functionality.
|
||||
// The reasons for these are as follows:
|
||||
// 1. It's very hard to update this package without breaking *a lot* of code.
|
||||
// 2. os2 is not stable anyways, so we can break compatibility all we want
|
||||
// It might be weird to bring up compatibility when Odin in it's nature isn't
|
||||
// all that about compatibility. But we don't want to push experimental changes
|
||||
// and have people's code break while it's still work in progress.
|
||||
import unix "core:sys/unix"
|
||||
import linux "core:sys/linux"
|
||||
import "core:sys/unix"
|
||||
import "core:sys/linux"
|
||||
|
||||
Handle :: distinct i32
|
||||
Pid :: distinct i32
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
foreign import dl "system:dl"
|
||||
foreign import libc "system:c"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
foreign import libc "system:c"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import "core:sys/wasm/wasi"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+build windows
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import win32 "core:sys/windows"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import "core:time"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+build linux, darwin, freebsd, openbsd, netbsd, haiku
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import "core:time"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import "core:time"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os
|
||||
package os_old
|
||||
|
||||
import "core:io"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:slice"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build linux, darwin, netbsd, freebsd, openbsd, wasi
|
||||
package os2
|
||||
package os
|
||||
|
||||
// This implementation is for all systems that have POSIX-compliant filesystem paths.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:strings"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
/*
|
||||
Create an anonymous pipe.
|
||||
@@ -15,7 +15,7 @@ process, that end of the pipe needs to be closed by the parent, before any data
|
||||
is attempted to be read.
|
||||
|
||||
Although pipes look like files and is compatible with most file APIs in package
|
||||
os2, the way it's meant to be read is different. Due to asynchronous nature of
|
||||
os, the way it's meant to be read is different. Due to asynchronous nature of
|
||||
the communication channel, the data may not be present at the time of a read
|
||||
request. The other scenario is when a pipe has no data because the other end
|
||||
of the pipe was closed by the child process.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
_pipe :: proc() -> (r, w: ^File, err: Error) {
|
||||
err = .Unsupported
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:sys/linux"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:sys/posix"
|
||||
import "core:strings"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
_pipe :: proc() -> (r, w: ^File, err: Error) {
|
||||
err = .Unsupported
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import win32 "core:sys/windows"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build freebsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:c"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:time"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build linux
|
||||
#+private file
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "base:intrinsics"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build netbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:c"
|
||||
foreign import libc "system:c"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:c"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "base:intrinsics"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build netbsd, openbsd, freebsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private file
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:intrinsics"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:strings"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "core:time"
|
||||
import "base:runtime"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
import "core:time"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+build js wasm32, js wasm64p32
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#+private
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#+private
|
||||
#+build darwin, netbsd, freebsd, openbsd
|
||||
package os2
|
||||
package os
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user