diff options
author | Lucio De Re <lucio.dere@gmail.com> | 2011-07-25 13:45:44 -0400 |
---|---|---|
committer | Lucio De Re <lucio.dere@gmail.com> | 2011-07-25 13:45:44 -0400 |
commit | 50f06c6ff618119d93f5cb33c4d23175a40fbc39 (patch) | |
tree | 81967ece7cd3c23ecf2c9b1a4b68c6fc9947abdd /include | |
parent | 3a50950584a4931a18f9e68f02377f41312d3d05 (diff) | |
download | go-50f06c6ff618119d93f5cb33c4d23175a40fbc39.tar.gz |
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
http://codereview.appspot.com/4800048
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/u.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/u.h b/include/u.h index 9ee7493b4..44bfcd63b 100644 --- a/include/u.h +++ b/include/u.h @@ -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 |