mirror of
https://github.com/golang/go
synced 2024-11-24 07:10:18 -07:00
build: define getcallerpc in u.h (fix for Plan 9 build)
. By defining getcallerpc(x) as __builtin_return_address(0) here, it becomes possible to use the Plan 9 compatible form when compiling using GCC. The alternative is to add conditional compilation based on the compiler identity in "cmd/8g/gsubr.c" to distinguish between the two cases. R=golang-dev CC=golang-dev, rsc https://golang.org/cl/4800048
This commit is contained in:
parent
12995e2d35
commit
eb3f2083f9
@ -194,6 +194,8 @@ typedef u64int uint64;
|
||||
#undef _NEEDUINT
|
||||
#undef _NEEDULONG
|
||||
|
||||
#define getcallerpc(x) __builtin_return_address(0)
|
||||
|
||||
#ifndef SIGBUS
|
||||
#define SIGBUS SIGSEGV /* close enough */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user