aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-05 17:04:40 -0500
committerGitHub <noreply@github.com>2020-02-05 17:04:40 -0500
commit80ae434b6686f44c98baa7c404131aefd136b977 (patch)
treeba89f99ec9f9d82da0216ee756ba8316a90aeda7 /lib
parent378d733439a574cc7b961f1d6a09167479225da8 (diff)
parent8c55c4550a7f79d732f0d2ffbf0455b058ab5aad (diff)
downloadzig-80ae434b6686f44c98baa7c404131aefd136b977.tar.gz
zig-80ae434b6686f44c98baa7c404131aefd136b977.zip
Merge pull request #4397 from LemonBoy/fixes
Fixes
Diffstat (limited to 'lib')
-rw-r--r--lib/std/fs.zig10
-rw-r--r--lib/std/fs/path.zig2
-rw-r--r--lib/std/os/bits/linux.zig2
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/std/fs.zig b/lib/std/fs.zig
index fe59b6ee2e..ec351ff6e2 100644
--- a/lib/std/fs.zig
+++ b/lib/std/fs.zig
@@ -810,7 +810,7 @@ pub const Dir = struct {
};
var attr = w.OBJECT_ATTRIBUTES{
.Length = @sizeOf(w.OBJECT_ATTRIBUTES),
- .RootDirectory = if (path.isAbsoluteW(sub_path_w)) null else self.fd,
+ .RootDirectory = if (path.isAbsoluteWindowsW(sub_path_w)) null else self.fd,
.Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here.
.ObjectName = &nt_name,
.SecurityDescriptor = null,
@@ -960,7 +960,7 @@ pub const Dir = struct {
};
var attr = w.OBJECT_ATTRIBUTES{
.Length = @sizeOf(w.OBJECT_ATTRIBUTES),
- .RootDirectory = if (path.isAbsoluteW(sub_path_w)) null else self.fd,
+ .RootDirectory = if (path.isAbsoluteWindowsW(sub_path_w)) null else self.fd,
.Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here.
.ObjectName = &nt_name,
.SecurityDescriptor = null,
@@ -1327,7 +1327,7 @@ pub fn openFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.OpenFlags)
/// Same as `openFileAbsolute` but the path parameter is WTF-16 encoded.
pub fn openFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.OpenFlags) File.OpenError!File {
- assert(path.isAbsoluteW(absolute_path_w));
+ assert(path.isAbsoluteWindowsW(absolute_path_w));
return cwd().openFileW(absolute_path_w, flags);
}
@@ -1350,7 +1350,7 @@ pub fn createFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.CreateFla
/// Same as `createFileAbsolute` but the path parameter is WTF-16 encoded.
pub fn createFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.CreateFlags) File.OpenError!File {
- assert(path.isAbsoluteW(absolute_path_w));
+ assert(path.isAbsoluteWindowsW(absolute_path_w));
return cwd().createFileW(absolute_path_w, flags);
}
@@ -1371,7 +1371,7 @@ pub fn deleteFileAbsoluteC(absolute_path_c: [*:0]const u8) DeleteFileError!void
/// Same as `deleteFileAbsolute` except the parameter is WTF-16 encoded.
pub fn deleteFileAbsoluteW(absolute_path_w: [*:0]const u16) DeleteFileError!void {
- assert(path.isAbsoluteW(absolute_path_w));
+ assert(path.isAbsoluteWindowsW(absolute_path_w));
return cwd().deleteFileW(absolute_path_w);
}
diff --git a/lib/std/fs/path.zig b/lib/std/fs/path.zig
index 2286df0470..f6f34585be 100644
--- a/lib/std/fs/path.zig
+++ b/lib/std/fs/path.zig
@@ -173,7 +173,7 @@ pub fn isAbsoluteWindows(path: []const u8) bool {
return isAbsoluteWindowsImpl(u8, path);
}
-pub fn isAbsoluteW(path_w: [*:0]const u16) bool {
+pub fn isAbsoluteWindowsW(path_w: [*:0]const u16) bool {
return isAbsoluteWindowsImpl(u16, mem.toSliceConst(u16, path_w));
}
diff --git a/lib/std/os/bits/linux.zig b/lib/std/os/bits/linux.zig
index e0fc5561f2..8077d4b16a 100644
--- a/lib/std/os/bits/linux.zig
+++ b/lib/std/os/bits/linux.zig
@@ -1572,7 +1572,7 @@ pub const NOFLSH = 128;
pub const TOSTOP = 256;
pub const IEXTEN = 32768;
-pub const TCSA = extern enum(usize) {
+pub const TCSA = extern enum(c_uint) {
NOW,
DRAIN,
FLUSH,