diff options
author | Russ Cox <rsc@swtch.com> | 2020-01-08 22:28:44 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-01-12 15:07:42 -0500 |
commit | e0c4896ed41faa71445d9e0b1751aba5157343c9 (patch) | |
tree | c2a15c8e62edadce763f6ac3fe6bf4e521edddb3 /include | |
parent | fafa622a5bdf71adfbb4334541c3b65f29c89ca9 (diff) | |
download | plan9port-e0c4896ed41faa71445d9e0b1751aba5157343c9.tar.gz plan9port-e0c4896ed41faa71445d9e0b1751aba5157343c9.tar.bz2 plan9port-e0c4896ed41faa71445d9e0b1751aba5157343c9.zip |
lib9: make a p9frexp function wrapping system frexp
Under certain conditions it looks like frexp gets #defined
to something else on macOS during system headers,
which then breaks the declaration in libc.h.
Diffstat (limited to 'include')
-rw-r--r-- | include/libc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/libc.h b/include/libc.h index 94d5b5ca..4fa86b22 100644 --- a/include/libc.h +++ b/include/libc.h @@ -383,7 +383,7 @@ extern int encodefmt(Fmt*); extern int dirmodefmt(Fmt*); extern int exitcode(char*); extern void exits(char*); -extern double frexp(double, int*); +extern double p9frexp(double, int*); extern ulong getcallerpc(void*); #if defined(__GNUC__) || defined(__clang__) #define getcallerpc(x) ((ulong)__builtin_return_address(0)) @@ -436,6 +436,8 @@ extern void (*_unpin)(void); #define atoll p9atoll #define encrypt p9encrypt #define decrypt p9decrypt +#undef frexp +#define frexp p9frexp #define getenv p9getenv #define getwd p9getwd #define longjmp p9longjmp |