Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/os/file_anyos.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ var (
Stderr = NewFile(uintptr(syscall.Stderr), "/dev/stderr")
)

const DevNull = "/dev/null"

// isOS indicates whether we're running on a real operating system with
// filesystem support.
const isOS = true
Expand Down
2 changes: 2 additions & 0 deletions src/os/file_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ var (
Stderr = NewFile(2, "/dev/stderr")
)

const DevNull = "/dev/null"

// isOS indicates whether we're running on a real operating system with
// filesystem support.
const isOS = false
Expand Down
5 changes: 5 additions & 0 deletions src/os/file_unix.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//go:build darwin || (linux && !baremetal)
// +build darwin linux,!baremetal

// target wasi sets GOOS=linux and thus the +linux build tag,
// even though it doesn't show up in "tinygo info target -wasi"

// Portions copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
Expand All @@ -12,6 +15,8 @@ import (
"syscall"
)

const DevNull = "/dev/null"

type syscallFd = int

// fixLongPath is a noop on non-Windows platforms.
Expand Down
2 changes: 2 additions & 0 deletions src/os/file_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
"unicode/utf16"
)

const DevNull = "NUL"

type syscallFd = syscall.Handle

// Symlink is a stub, it is not implemented.
Expand Down