mirror of https://github.com/poanetwork/quorum.git
Revert "Fix vendor package error in Mojave"
This reverts commit e679587e1f
.
This commit is contained in:
parent
e679587e1f
commit
70c78cc304
|
@ -6,7 +6,6 @@ package notify
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -71,7 +70,11 @@ Traverse:
|
||||||
case errSkip:
|
case errSkip:
|
||||||
continue Traverse
|
continue Traverse
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("error while traversing %q: %v", nd.Name, err)
|
return &os.PathError{
|
||||||
|
Op: "error while traversing",
|
||||||
|
Path: nd.Name,
|
||||||
|
Err: err,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// TODO(rjeczalik): tolerate open failures - add failed names to
|
// TODO(rjeczalik): tolerate open failures - add failed names to
|
||||||
// AddDirError and notify users which names are not added to the tree.
|
// AddDirError and notify users which names are not added to the tree.
|
||||||
|
|
|
@ -26,9 +26,9 @@ import "C"
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ var wg sync.WaitGroup // used to wait until the runloop starts
|
||||||
// started and is ready via the wg. It also serves purpose of a dummy source,
|
// started and is ready via the wg. It also serves purpose of a dummy source,
|
||||||
// thanks to it the runloop does not return as it also has at least one source
|
// thanks to it the runloop does not return as it also has at least one source
|
||||||
// registered.
|
// registered.
|
||||||
var source = C.CFRunLoopSourceCreate(refZero, 0, &C.CFRunLoopSourceContext{
|
var source = C.CFRunLoopSourceCreate(nil, 0, &C.CFRunLoopSourceContext{
|
||||||
perform: (C.CFRunLoopPerformCallBack)(C.gosource),
|
perform: (C.CFRunLoopPerformCallBack)(C.gosource),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -63,6 +63,10 @@ var (
|
||||||
func init() {
|
func init() {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
|
// There is exactly one run loop per thread. Lock this goroutine to its
|
||||||
|
// thread to ensure that it's not rescheduled on a different thread while
|
||||||
|
// setting up the run loop.
|
||||||
|
runtime.LockOSThread()
|
||||||
runloop = C.CFRunLoopGetCurrent()
|
runloop = C.CFRunLoopGetCurrent()
|
||||||
C.CFRunLoopAddSource(runloop, source, C.kCFRunLoopDefaultMode)
|
C.CFRunLoopAddSource(runloop, source, C.kCFRunLoopDefaultMode)
|
||||||
C.CFRunLoopRun()
|
C.CFRunLoopRun()
|
||||||
|
@ -73,7 +77,6 @@ func init() {
|
||||||
|
|
||||||
//export gosource
|
//export gosource
|
||||||
func gosource(unsafe.Pointer) {
|
func gosource(unsafe.Pointer) {
|
||||||
time.Sleep(time.Second)
|
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,8 +162,8 @@ func (s *stream) Start() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
p := C.CFStringCreateWithCStringNoCopy(refZero, C.CString(s.path), C.kCFStringEncodingUTF8, refZero)
|
p := C.CFStringCreateWithCStringNoCopy(nil, C.CString(s.path), C.kCFStringEncodingUTF8, nil)
|
||||||
path := C.CFArrayCreate(refZero, (*unsafe.Pointer)(unsafe.Pointer(&p)), 1, nil)
|
path := C.CFArrayCreate(nil, (*unsafe.Pointer)(unsafe.Pointer(&p)), 1, nil)
|
||||||
ctx := C.FSEventStreamContext{}
|
ctx := C.FSEventStreamContext{}
|
||||||
ref := C.EventStreamCreate(&ctx, C.uintptr_t(s.info), path, C.FSEventStreamEventId(atomic.LoadUint64(&since)), latency, flags)
|
ref := C.EventStreamCreate(&ctx, C.uintptr_t(s.info), path, C.FSEventStreamEventId(atomic.LoadUint64(&since)), latency, flags)
|
||||||
if ref == nilstream {
|
if ref == nilstream {
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
// Copyright (c) 2017 The Notify Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by the MIT license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
// +build darwin,!kqueue,go1.10
|
|
||||||
|
|
||||||
package notify
|
|
||||||
|
|
||||||
const refZero = 0
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright (c) 2017 The Notify Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by the MIT license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
// +build darwin,!kqueue,cgo,!go1.10
|
|
||||||
|
|
||||||
package notify
|
|
||||||
|
|
||||||
/*
|
|
||||||
#include <CoreServices/CoreServices.h>
|
|
||||||
*/
|
|
||||||
import "C"
|
|
||||||
|
|
||||||
var refZero = (*C.struct___CFAllocator)(nil)
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"comment": "",
|
|
||||||
"ignore": "test",
|
|
||||||
"package": [],
|
|
||||||
"rootPath": "github.com/ethereum/go-ethereum/vendor/github.com"
|
|
||||||
}
|
|
|
@ -346,10 +346,10 @@
|
||||||
"revisionTime": "2017-08-14T17:01:13Z"
|
"revisionTime": "2017-08-14T17:01:13Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "d2rQHpL6cSf3NQiWJCVoEiJhsOI=",
|
"checksumSHA1": "28UVHMmHx0iqO0XiJsjx+fwILyI=",
|
||||||
"path": "github.com/rjeczalik/notify",
|
"path": "github.com/rjeczalik/notify",
|
||||||
"revision": "ff2d4d2cedc09db23cc46d3eeb8b402bca6d819d",
|
"revision": "c31e5f2cb22b3e4ef3f882f413847669bf2652b9",
|
||||||
"revisionTime": "2017-12-09T07:29:52Z"
|
"revisionTime": "2018-02-03T14:01:15Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "5uqO4ITTDMklKi3uNaE/D9LQ5nM=",
|
"checksumSHA1": "5uqO4ITTDMklKi3uNaE/D9LQ5nM=",
|
||||||
|
|
Loading…
Reference in New Issue