aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libc.h4
-rw-r--r--src/lib9/frexp.c9
-rw-r--r--src/lib9/mkfile1
3 files changed, 13 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
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);
+}
diff --git a/src/lib9/mkfile b/src/lib9/mkfile
index 943b597b..7c37de42 100644
--- a/src/lib9/mkfile
+++ b/src/lib9/mkfile
@@ -22,6 +22,7 @@ FMTOFILES=\
fmtstr.$O\
fmtvprint.$O\
fprint.$O\
+ frexp.$O\
nan64.$O\
print.$O\
runefmtstr.$O\