aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/frexp.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-01-08 22:28:44 -0500
committerRuss Cox <rsc@swtch.com>2020-01-12 15:07:42 -0500
commite0c4896ed41faa71445d9e0b1751aba5157343c9 (patch)
treec2a15c8e62edadce763f6ac3fe6bf4e521edddb3 /src/lib9/frexp.c
parentfafa622a5bdf71adfbb4334541c3b65f29c89ca9 (diff)
downloadplan9port-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.c9
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);
+}