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 /src/lib9/frexp.c | |
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 'src/lib9/frexp.c')
-rw-r--r-- | src/lib9/frexp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib9/frexp.c b/src/lib9/frexp.c new file mode 100644 index 00000000..fe3e2f73 --- /dev/null +++ b/src/lib9/frexp.c @@ -0,0 +1,9 @@ +#include <u.h> +#define NOPLAN9DEFINES +#include <libc.h> + +double +p9frexp(double d, int *i) +{ + return frexp(d, i); +} |