]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "os: set TMPDIR on darwin/arm"
authorDavid Crawshaw <crawshaw@golang.org>
Sat, 28 Feb 2015 02:34:08 +0000 (02:34 +0000)
committerDavid Crawshaw <crawshaw@golang.org>
Sat, 28 Feb 2015 02:40:03 +0000 (02:40 +0000)
This reverts commit 87a0d395c3d454c6efa560c406b5b3d8ad71c8f6.

Looks like introducing file_darwin_arm.go is confusing something in the API checker (probably go/types) into ignoring file.go, so the O_SYNC symbol is being lost.

No actual bug in this CL AFAIK, but I'll fix the other bug later and then roll this forward.

Change-Id: Ic132fb101e4b5f2716f7a0d15872bf35bdf42139
Reviewed-on: https://go-review.googlesource.com/6331
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/os/file_darwin_arm.go [deleted file]

diff --git a/src/os/file_darwin_arm.go b/src/os/file_darwin_arm.go
deleted file mode 100644 (file)
index 6304c39..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015 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.
-
-package os
-
-/*
-#cgo CFLAGS: -x objective-c
-#cgo LDFLAGS: -framework CoreFoundation -framework Foundation
-
-#include <sys/param.h>
-#include <CoreFoundation/CFString.h>
-#include <Foundation/NSPathUtilities.h>
-
-char tmpdir[MAXPATHLEN];
-
-char* loadtmpdir() {
-       tmpdir[0] = 0;
-       CFStringRef path = (CFStringRef)NSTemporaryDirectory();
-       CFStringGetCString(path, tmpdir, sizeof(tmpdir), kCFStringEncodingUTF8);
-       return tmpdir;
-}
-*/
-import "C"
-
-func init() {
-       if Getenv("TEMPDIR") != "" {
-               return
-       }
-       dir := C.GoString(C.loadtmpdir())
-       if len(dir) == 0 {
-               return
-       }
-       if dir[len(dir)-1] == '/' {
-               dir = dir[:len(dir)-1]
-       }
-       Setenv("TMPDIR", dir)
-}