1
0
mirror of https://github.com/golang/go synced 2024-09-23 11:20:17 -06:00

misc/cgo: remove +build lines, add go:build where needed

Change-Id: Iae6ac32db5c2aacb323793a7e0dc34e09648d035
Reviewed-on: https://go-review.googlesource.com/c/go/+/482295
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Ian Lance Taylor 2023-04-04 14:20:26 -07:00 committed by Gopher Robot
parent 7b1e0bb79c
commit 369d7119de
70 changed files with 28 additions and 87 deletions

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
// Compute Fibonacci numbers with two goroutines
// that pass integers back and forth. No actual

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
package main

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gc
//go:build gc
#include "_cgo_export.h"
#include <stdint.h>

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gccgo
//go:build gccgo
#include "_cgo_export.h"
#include <stdint.h>

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && freebsd && openbsd
// +build linux,freebsd,openbsd
package cgotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
package cgotest

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
#include <pthread.h>
#include "_cgo_export.h"

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && cgo
// +build linux,cgo
package cgotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
// Issue 18146: pthread_create failure during syscall.Exec.

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin && cgo && !internal
// +build darwin,cgo,!internal
package cgotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin || !cgo || internal
// +build !darwin !cgo internal
package cgotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin
// +build darwin
package issue24161arg

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin
// +build darwin
package issue24161arg

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin
// +build darwin
package issue24161e0

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin
// +build darwin
package issue24161e1

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin
// +build darwin
package issue24161e2

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin
// +build darwin
package issue24161res

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
// Issue 29563: internal linker fails on duplicate weak symbols.
// No runtime test; just make sure it compiles.

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !windows,!static
// +build !darwin !internal_pie,!arm64
//go:build !windows && !static && (!darwin || (!internal_pie && !arm64))
#include <stdint.h>
#include <dlfcn.h>

View File

@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows && !static && (!darwin || (!internal_pie && !arm64))
// +build !windows
// +build !static
// +build !darwin !internal_pie,!arm64
// Excluded in darwin internal linking PIE mode, as dynamic export is not
// supported.

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows || static || (darwin && internal_pie) || (darwin && arm64)
// +build windows static darwin,internal_pie darwin,arm64
package cgotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
package cgotest

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !android
//go:build !android
#include <pthread.h>
#include <stdio.h>

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !android
// +build !android
// Test that pthread_cancel works as expected
// (NPTL uses SIGRTMIN to implement thread cancellation)

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
package cgotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !android
// +build !android
package cgotest

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gc
//go:build gc
#include "textflag.h"

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build amd64 amd64p32
// +build gc
//go:build (amd64 || amd64p32) && gc
#include "textflag.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gc
//go:build gc
#include "textflag.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gc
//go:build gc
#include "textflag.h"

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build mips64 mips64le
// +build gc
//go:build (mips64 || mips64le) && gc
#include "textflag.h"

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build mips mipsle
// +build gc
//go:build (mips || mipsle) && gc
#include "textflag.h"

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ppc64 ppc64le
// +build gc
//go:build (ppc64 || ppc64le) && gc
#include "textflag.h"

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build riscv64
// +build gc
//go:build riscv64 && gc
#include "textflag.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gc
//go:build gc
#include "textflag.h"

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gccgo
// +build gccgo
package issue9400

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
// +build gc
package issue9400

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows && !android
// +build !windows,!android
// Test that the Go runtime still works if C code changes the signal stack.

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !windows
//go:build !windows
#include <errno.h>
#include <signal.h>

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
package cgotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
package cgotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || (linux && !arm64 && !riscv64) || netbsd || openbsd
// +build darwin dragonfly freebsd linux,!arm64,!riscv64 netbsd openbsd
package main

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (linux && arm64) || (linux && riscv64)
// +build linux,arm64 linux,riscv64
package main

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package main

View File

@ -1,9 +1,8 @@
// Copyright 2014 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.
//
//go:build ignore
// +build ignore
package main

View File

@ -1,9 +1,8 @@
// Copyright 2020 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.
//
//go:build ignore
// +build ignore
package main

View File

@ -1,9 +1,8 @@
// Copyright 2018 The Go Authors. All rights reserve d.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
//go:build ignore
// +build ignore
package main

View File

@ -1,9 +1,8 @@
// Copyright 2020 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.
//
//go:build ignore
// +build ignore
package main

View File

@ -1,9 +1,8 @@
// Copyright 2020 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.
//
//go:build ignore
// +build ignore
package main

View File

@ -1,9 +1,8 @@
// Copyright 2020 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.
//
//go:build ignore
// +build ignore
package main

View File

@ -1,9 +1,8 @@
// Copyright 2020 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.
//
//go:build ignore
// +build ignore
package main

View File

@ -1,9 +1,8 @@
// Copyright 2021 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.
//
//go:build ignore
// +build ignore
package main

View File

@ -1,9 +1,8 @@
// Copyright 2014 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.
//
//go:build ignore
// +build ignore
package main

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
package main

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
package main

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
package main

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gc
//go:build gc
#include "textflag.h"

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gccgo
// +build gccgo
package depBase

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
// +build gc
package depBase

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !cgo
// +build !cgo
package so_test

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build cgo
// +build cgo
package so_test

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
//go:build ignore
#ifdef WIN32
// A Windows DLL is unable to call an arbitrary function in

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || dragonfly || freebsd || linux || netbsd || solaris
// +build aix dragonfly freebsd linux netbsd solaris
package cgosotest

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
package main

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !cgo
// +build !cgo
package so_test

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build cgo
// +build cgo
package so_test

View File

@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
//go:build ignore
const char *exported_var = "Hello world";

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
//go:build ignore
#ifdef WIN32
#if defined(EXPORT_DLL)

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
package main

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
package cgotlstest