Repository navigation
Expand file tree
/
Copy patherrors.wave
More file actions
52 lines (50 loc) · 1.59 KB
/
Copy patherrors.wave
File metadata and controls
52 lines (50 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// This file is part of the Wave language project.
// Copyright (c) 2024-2026 Wave Foundation and contributors
// SPDX-License-Identifier: Apache-2.0
// Error values used by retryable descriptor I/O and sleep operations.
// WASI retains its own errno namespace. Windows providers normalize to errno.
#[target(os="linux")]
pub const SYS_ERR_INTR: i64 = -4;
#[target(os="linux")]
pub const SYS_ERR_INVAL: i64 = -22;
#[target(os="linux")]
pub const SYS_ERR_OVERFLOW: i64 = -75;
#[target(os="macos")]
pub const SYS_ERR_INTR: i64 = -4;
#[target(os="macos")]
pub const SYS_ERR_INVAL: i64 = -22;
#[target(os="macos")]
pub const SYS_ERR_OVERFLOW: i64 = -84;
#[target(os="windows")]
pub const SYS_ERR_INTR: i64 = -4;
#[target(os="windows")]
pub const SYS_ERR_INVAL: i64 = -22;
#[target(os="windows")]
pub const SYS_ERR_OVERFLOW: i64 = -75;
#[target(os="freebsd")]
pub const SYS_ERR_INTR: i64 = -4;
#[target(os="freebsd")]
pub const SYS_ERR_INVAL: i64 = -22;
#[target(os="freebsd")]
pub const SYS_ERR_OVERFLOW: i64 = -84;
#[target(os="unknown")]
pub const SYS_ERR_INTR: i64 = -4;
#[target(os="unknown")]
pub const SYS_ERR_INVAL: i64 = -22;
#[target(os="unknown")]
pub const SYS_ERR_OVERFLOW: i64 = -75;
#[target(os="none")]
pub const SYS_ERR_INTR: i64 = -4;
#[target(os="none")]
pub const SYS_ERR_INVAL: i64 = -22;
#[target(os="none")]
pub const SYS_ERR_OVERFLOW: i64 = -75;
#[target(os="wasi")]
pub const SYS_ERR_INTR: i64 = -27;
#[target(os="wasi")]
pub const SYS_ERR_INVAL: i64 = -28;
#[target(os="wasi")]
pub const SYS_ERR_OVERFLOW: i64 = -61;
pub fun sys_is_interrupted(result: i64) -> bool {
return result == SYS_ERR_INTR;
}