aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-05 15:31:09 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-02-05 18:10:26 -0500
commite1f4f44dff238918d0e4f1fa35d56de50d1c22bb (patch)
tree6f02fdc83862416f8224ec6599cfc74d88654b5f /lib/std/os.zig
parent80ae434b6686f44c98baa7c404131aefd136b977 (diff)
downloadzig-e1f4f44dff238918d0e4f1fa35d56de50d1c22bb.tar.gz
zig-e1f4f44dff238918d0e4f1fa35d56de50d1c22bb.zip
std: improve non-libc dynamic library loading
this is a cherry-pick of 5076f2d4f6918946616504d22907c9f80601caf8 from the llvm10 branch
Diffstat (limited to 'lib/std/os.zig')
-rw-r--r--lib/std/os.zig9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig
index 302d8bfce5..ffbf92572c 100644
--- a/lib/std/os.zig
+++ b/lib/std/os.zig
@@ -2237,6 +2237,7 @@ pub const MMapError = error{
} || UnexpectedError;
/// Map files or devices into memory.
+/// `length` does not need to be aligned.
/// Use of a mapped region can result in these signals:
/// * SIGSEGV - Attempted write into a region mapped as read-only.
/// * SIGBUS - Attempted access to a portion of the buffer that does not correspond to the file
@@ -3328,9 +3329,7 @@ pub fn getrusage(who: i32) rusage {
}
}
-pub const TermiosGetError = error{
- NotATerminal,
-} || UnexpectedError;
+pub const TermiosGetError = error{NotATerminal} || UnexpectedError;
pub fn tcgetattr(handle: fd_t) TermiosGetError!termios {
var term: termios = undefined;
@@ -3342,9 +3341,7 @@ pub fn tcgetattr(handle: fd_t) TermiosGetError!termios {
}
}
-pub const TermiosSetError = TermiosGetError || error{
- ProcessOrphaned,
-};
+pub const TermiosSetError = TermiosGetError || error{ProcessOrphaned};
pub fn tcsetattr(handle: fd_t, optional_action: TCSA, termios_p: termios) TermiosSetError!void {
while (true) {