Skip to content

Commit d82c592

Browse files
committed
add windows stub
Signed-off-by: leongross <[email protected]>
1 parent 1880d23 commit d82c592

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/os/file_windows.go

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ func Pipe() (r *File, w *File, err error) {
5959
return
6060
}
6161

62+
func (f *unixFileHandle) Truncate(size int64) error {
63+
return ErrNotImplemented
64+
}
65+
6266
func tempDir() string {
6367
n := uint32(syscall.MAX_PATH)
6468
for {
@@ -106,6 +110,10 @@ func (f unixFileHandle) Sync() error {
106110
return ErrNotImplemented
107111
}
108112

113+
func (f *File) Truncate(size int64) error {
114+
return ErrNotImplemented
115+
}
116+
109117
// isWindowsNulName reports whether name is os.DevNull ('NUL') on Windows.
110118
// True is returned if name is 'NUL' whatever the case.
111119
func isWindowsNulName(name string) bool {

src/syscall/syscall_libc.go

-3
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,3 @@ func libc_unlink(pathname *byte) int32
410410
//
411411
//export truncate
412412
func libc_truncate(path *byte, length int64) int32
413-
414-
//go:extern environ
415-
var libc_environ *unsafe.Pointer

0 commit comments

Comments
 (0)