aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fs
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-10-12 17:57:35 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-10-12 17:57:35 -0700
commitc19dcafa17117475f8334d5186bd87fb56c9d315 (patch)
treef7af587f9a1355c5229699d78876f7d1a84942a4 /lib/std/fs
parentc0b2813e0468586faee5bf3ee7583afad53d771a (diff)
parent2ab0c7391a871a3063f825e08e02ea2a8e9269e9 (diff)
downloadzig-c19dcafa17117475f8334d5186bd87fb56c9d315.tar.gz
zig-c19dcafa17117475f8334d5186bd87fb56c9d315.zip
Merge remote-tracking branch 'origin/master' into llvm11
Diffstat (limited to 'lib/std/fs')
-rw-r--r--lib/std/fs/get_app_data_dir.zig2
-rw-r--r--lib/std/fs/test.zig2
-rw-r--r--lib/std/fs/watch.zig8
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/std/fs/get_app_data_dir.zig b/lib/std/fs/get_app_data_dir.zig
index 17d365f684..6f8dae07c5 100644
--- a/lib/std/fs/get_app_data_dir.zig
+++ b/lib/std/fs/get_app_data_dir.zig
@@ -42,7 +42,7 @@ pub fn getAppDataDir(allocator: *mem.Allocator, appname: []const u8) GetAppDataD
else => return error.AppDataDirUnavailable,
}
},
- .macosx => {
+ .macos => {
const home_dir = os.getenv("HOME") orelse {
// TODO look in /etc/passwd
return error.AppDataDirUnavailable;
diff --git a/lib/std/fs/test.zig b/lib/std/fs/test.zig
index 60cd380444..860da8ef16 100644
--- a/lib/std/fs/test.zig
+++ b/lib/std/fs/test.zig
@@ -143,7 +143,7 @@ fn contains(entries: *const std.ArrayList(Dir.Entry), el: Dir.Entry) bool {
test "Dir.realpath smoke test" {
switch (builtin.os.tag) {
- .linux, .windows, .macosx, .ios, .watchos, .tvos => {},
+ .linux, .windows, .macos, .ios, .watchos, .tvos => {},
else => return error.SkipZigTest,
}
diff --git a/lib/std/fs/watch.zig b/lib/std/fs/watch.zig
index 269cdec6d8..8b709c2d4b 100644
--- a/lib/std/fs/watch.zig
+++ b/lib/std/fs/watch.zig
@@ -49,7 +49,7 @@ pub fn Watch(comptime V: type) type {
const OsData = switch (builtin.os.tag) {
// TODO https://github.com/ziglang/zig/issues/3778
- .macosx, .freebsd, .netbsd, .dragonfly => KqOsData,
+ .macos, .freebsd, .netbsd, .dragonfly => KqOsData,
.linux => LinuxOsData,
.windows => WindowsOsData,
@@ -160,7 +160,7 @@ pub fn Watch(comptime V: type) type {
return self;
},
- .macosx, .freebsd, .netbsd, .dragonfly => {
+ .macos, .freebsd, .netbsd, .dragonfly => {
self.* = Self{
.allocator = allocator,
.channel = channel,
@@ -178,7 +178,7 @@ pub fn Watch(comptime V: type) type {
/// All addFile calls and removeFile calls must have completed.
pub fn deinit(self: *Self) void {
switch (builtin.os.tag) {
- .macosx, .freebsd, .netbsd, .dragonfly => {
+ .macos, .freebsd, .netbsd, .dragonfly => {
// TODO we need to cancel the frames before destroying the lock
self.os_data.table_lock.deinit();
var it = self.os_data.file_table.iterator();
@@ -229,7 +229,7 @@ pub fn Watch(comptime V: type) type {
pub fn addFile(self: *Self, file_path: []const u8, value: V) !?V {
switch (builtin.os.tag) {
- .macosx, .freebsd, .netbsd, .dragonfly => return addFileKEvent(self, file_path, value),
+ .macos, .freebsd, .netbsd, .dragonfly => return addFileKEvent(self, file_path, value),
.linux => return addFileLinux(self, file_path, value),
.windows => return addFileWindows(self, file_path, value),
else => @compileError("Unsupported OS"),