1
0
mirror of https://github.com/golang/go synced 2024-11-21 14:54:40 -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:
Lucio De Re 2011-07-25 13:45:44 -04:00 committed by Russ Cox
parent 12995e2d35
commit eb3f2083f9

View File

@ -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