mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-05 04:29:55 +08:00
439407aa2c
Only compile the __go_ptrace varargs shim on Linux to avoid compilation failures on some other platforms. The C ptrace function is not entirely portable (e.g., NetBSD has `int data` instead of `void* data`), and so far Linux is the only platform that needs the varargs shim. Additionally, make the types in the ptrace and raw_ptrace function declarations match. This makes it more clear that the only difference between the two is that calls via the former are allowed to block while calls via the latter are not. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263517
13 lines
476 B
Go
13 lines
476 B
Go
// Copyright 2011 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 syscall
|
|
|
|
// 32-bit Solaris 2/x86 needs to use _nuname internally, cf. <sys/utsname.h>.
|
|
//sysnb Uname(buf *Utsname) (err error)
|
|
//_nuname(buf *Utsname) _C_int
|
|
|
|
//sysnb raw_ptrace(request int, pid int, addr uintptr, data uintptr) (err Errno)
|
|
//ptrace(request _C_int, pid Pid_t, addr *byte, data *byte) _C_long
|