aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/fmt/fmtstr.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-26 21:50:14 +0000
committerrsc <devnull@localhost>2004-12-26 21:50:14 +0000
commite5aa96acbf9107cd78f2536364c36f9a15751313 (patch)
tree9c198bb62564c433c28d2de81a5fb6b782f39903 /src/lib9/fmt/fmtstr.c
parent5c8a0421712a471a00dbf78f7ea054b366ba471b (diff)
downloadplan9port-e5aa96acbf9107cd78f2536364c36f9a15751313.tar.gz
plan9port-e5aa96acbf9107cd78f2536364c36f9a15751313.tar.bz2
plan9port-e5aa96acbf9107cd78f2536364c36f9a15751313.zip
clean up for unix port
Diffstat (limited to 'src/lib9/fmt/fmtstr.c')
-rw-r--r--src/lib9/fmt/fmtstr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib9/fmt/fmtstr.c b/src/lib9/fmt/fmtstr.c
index 0b227166..b4b68185 100644
--- a/src/lib9/fmt/fmtstr.c
+++ b/src/lib9/fmt/fmtstr.c
@@ -11,9 +11,20 @@
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
+/*
+ * Plan 9 port version must include libc.h in order to
+ * get Plan 9 debugging malloc, which sometimes returns
+ * different pointers than the standard malloc.
+ */
+#ifdef PLAN9PORT
#include <u.h>
#include <libc.h>
+#else
+#include <stdlib.h>
+#include "plan9.h"
+#include "fmt.h"
#include "fmtdef.h"
+#endif
static int
fmtStrFlush(Fmt *f)