Commit eb3f2083 authored by Lucio De Re's avatar Lucio De Re Committed by Russ Cox

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
parent 12995e2d
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment