lock: fix Windows build

Change-Id: I1bf2552ca138e57217f81bf452ffdb8071596e99
This commit is contained in:
Brad Fitzpatrick 2013-08-28 12:22:01 -07:00
parent 6d761897db
commit 3c3009a270
3 changed files with 5 additions and 12 deletions

View File

@ -131,6 +131,11 @@ func (lc *lockCloser) close() {
}
}
var (
lockmu sync.Mutex
locked = map[string]bool{} // abs path -> true
)
// unlocker is used by the darwin and linux implementations with fcntl
// advisory locks.
type unlocker struct {

View File

@ -24,7 +24,6 @@ import (
"io"
"os"
"path/filepath"
"sync"
"syscall"
"unsafe"
)
@ -33,11 +32,6 @@ func init() {
lockFn = lockFcntl
}
var (
lockmu sync.Mutex
locked = map[string]bool{}
)
func lockFcntl(name string) (io.Closer, error) {
abs, err := filepath.Abs(name)
if err != nil {

View File

@ -24,7 +24,6 @@ import (
"io"
"os"
"path/filepath"
"sync"
"syscall"
"unsafe"
)
@ -33,11 +32,6 @@ func init() {
lockFn = lockFcntl
}
var (
lockmu sync.Mutex
locked = map[string]bool{}
)
func lockFcntl(name string) (io.Closer, error) {
abs, err := filepath.Abs(name)
if err != nil {