Skip to content

Commit 6f16e41

Browse files
committed
Revendor golang.org/x/sys
Revendor "golang.org/x/sys" to pick up "golang.org/x/sys/unix", which we now use instead of syscall. Handle Linux and BSD using different names for the mtime part of a Stat_t. Add "darwin/amd64" to the list of OS/arch combinations that we preserve dependencies for when we're stripping out unused things in hack/vendor.sh. Signed-off-by: Nalin Dahyabhai <[email protected]>
1 parent f8371fb commit 6f16e41

File tree

173 files changed

+96701
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+96701
-2
lines changed

hack/.vendor-helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ clean() {
5858
local packages=(
5959
"${PROJECT}/cmd/oci-storage"
6060
)
61-
local storagePlatforms=( ${STORAGE_OSARCH:="linux/amd64 linux/i386 linux/arm freebsd/amd64 freebsd/386 freebsd/arm windows/amd64"} )
61+
local storagePlatforms=( ${STORAGE_OSARCH:="linux/amd64 linux/i386 linux/arm freebsd/amd64 freebsd/386 freebsd/arm windows/amd64 darwin/amd64"} )
6262

6363
local buildTagCombos=(
6464
''

storage/lockfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,6 @@ func (l *lockfile) TouchedSince(when time.Time) bool {
134134
if err != nil {
135135
return true
136136
}
137-
touched := time.Unix(st.Mtimespec.Unix())
137+
touched := time.Unix(statTMtimeUnix(st))
138138
return when.Before(touched)
139139
}

storage/stat_mtim.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// +build linux solaris
2+
3+
package storage
4+
5+
import (
6+
"golang.org/x/sys/unix"
7+
)
8+
9+
func statTMtimeUnix(st unix.Stat_t) (int64, int64) {
10+
return st.Mtim.Unix()
11+
}

storage/stat_mtimespec.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// +build !linux,!solaris
2+
3+
package storage
4+
5+
import (
6+
"golang.org/x/sys/unix"
7+
)
8+
9+
func statTMtimeUnix(st unix.Stat_t) (int64, int64) {
10+
return st.Mtimespec.Unix()
11+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_obj/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2014 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
TEXT ·use(SB),NOSPLIT,$0
10+
RET
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System call support for 386, Darwin
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-28
17+
JMP syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-40
20+
JMP syscall·Syscall6(SB)
21+
22+
TEXT ·Syscall9(SB),NOSPLIT,$0-52
23+
JMP syscall·Syscall9(SB)
24+
25+
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26+
JMP syscall·RawSyscall(SB)
27+
28+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29+
JMP syscall·RawSyscall6(SB)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System call support for AMD64, Darwin
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-56
17+
JMP syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-80
20+
JMP syscall·Syscall6(SB)
21+
22+
TEXT ·Syscall9(SB),NOSPLIT,$0-104
23+
JMP syscall·Syscall9(SB)
24+
25+
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26+
JMP syscall·RawSyscall(SB)
27+
28+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29+
JMP syscall·RawSyscall6(SB)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright 2015 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
// +build arm,darwin
7+
8+
#include "textflag.h"
9+
10+
//
11+
// System call support for ARM, Darwin
12+
//
13+
14+
// Just jump to package syscall's implementation for all these functions.
15+
// The runtime may know about them.
16+
17+
TEXT ·Syscall(SB),NOSPLIT,$0-28
18+
B syscall·Syscall(SB)
19+
20+
TEXT ·Syscall6(SB),NOSPLIT,$0-40
21+
B syscall·Syscall6(SB)
22+
23+
TEXT ·Syscall9(SB),NOSPLIT,$0-52
24+
B syscall·Syscall9(SB)
25+
26+
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
27+
B syscall·RawSyscall(SB)
28+
29+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
30+
B syscall·RawSyscall6(SB)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright 2015 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
// +build arm64,darwin
7+
8+
#include "textflag.h"
9+
10+
//
11+
// System call support for AMD64, Darwin
12+
//
13+
14+
// Just jump to package syscall's implementation for all these functions.
15+
// The runtime may know about them.
16+
17+
TEXT ·Syscall(SB),NOSPLIT,$0-56
18+
B syscall·Syscall(SB)
19+
20+
TEXT ·Syscall6(SB),NOSPLIT,$0-80
21+
B syscall·Syscall6(SB)
22+
23+
TEXT ·Syscall9(SB),NOSPLIT,$0-104
24+
B syscall·Syscall9(SB)
25+
26+
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27+
B syscall·RawSyscall(SB)
28+
29+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30+
B syscall·RawSyscall6(SB)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System call support for 386, FreeBSD
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-32
17+
JMP syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-44
20+
JMP syscall·Syscall6(SB)
21+
22+
TEXT ·Syscall9(SB),NOSPLIT,$0-56
23+
JMP syscall·Syscall9(SB)
24+
25+
TEXT ·RawSyscall(SB),NOSPLIT,$0-32
26+
JMP syscall·RawSyscall(SB)
27+
28+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
29+
JMP syscall·RawSyscall6(SB)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System call support for AMD64, DragonFly
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-64
17+
JMP syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-88
20+
JMP syscall·Syscall6(SB)
21+
22+
TEXT ·Syscall9(SB),NOSPLIT,$0-112
23+
JMP syscall·Syscall9(SB)
24+
25+
TEXT ·RawSyscall(SB),NOSPLIT,$0-64
26+
JMP syscall·RawSyscall(SB)
27+
28+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
29+
JMP syscall·RawSyscall6(SB)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System call support for 386, FreeBSD
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-28
17+
JMP syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-40
20+
JMP syscall·Syscall6(SB)
21+
22+
TEXT ·Syscall9(SB),NOSPLIT,$0-52
23+
JMP syscall·Syscall9(SB)
24+
25+
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26+
JMP syscall·RawSyscall(SB)
27+
28+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29+
JMP syscall·RawSyscall6(SB)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System call support for AMD64, FreeBSD
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-56
17+
JMP syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-80
20+
JMP syscall·Syscall6(SB)
21+
22+
TEXT ·Syscall9(SB),NOSPLIT,$0-104
23+
JMP syscall·Syscall9(SB)
24+
25+
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26+
JMP syscall·RawSyscall(SB)
27+
28+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29+
JMP syscall·RawSyscall6(SB)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2012 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System call support for ARM, FreeBSD
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-28
17+
B syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-40
20+
B syscall·Syscall6(SB)
21+
22+
TEXT ·Syscall9(SB),NOSPLIT,$0-52
23+
B syscall·Syscall9(SB)
24+
25+
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26+
B syscall·RawSyscall(SB)
27+
28+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29+
B syscall·RawSyscall6(SB)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System calls for 386, Linux
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-28
17+
JMP syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-40
20+
JMP syscall·Syscall6(SB)
21+
22+
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
23+
JMP syscall·RawSyscall(SB)
24+
25+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
26+
JMP syscall·RawSyscall6(SB)
27+
28+
TEXT ·socketcall(SB),NOSPLIT,$0-36
29+
JMP syscall·socketcall(SB)
30+
31+
TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
32+
JMP syscall·rawsocketcall(SB)
33+
34+
TEXT ·seek(SB),NOSPLIT,$0-28
35+
JMP syscall·seek(SB)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build !gccgo
6+
7+
#include "textflag.h"
8+
9+
//
10+
// System calls for AMD64, Linux
11+
//
12+
13+
// Just jump to package syscall's implementation for all these functions.
14+
// The runtime may know about them.
15+
16+
TEXT ·Syscall(SB),NOSPLIT,$0-56
17+
JMP syscall·Syscall(SB)
18+
19+
TEXT ·Syscall6(SB),NOSPLIT,$0-80
20+
JMP syscall·Syscall6(SB)
21+
22+
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
23+
JMP syscall·RawSyscall(SB)
24+
25+
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
26+
JMP syscall·RawSyscall6(SB)
27+
28+
TEXT ·gettimeofday(SB),NOSPLIT,$0-16
29+
JMP syscall·gettimeofday(SB)

0 commit comments

Comments
 (0)