Pipes cannot use SOCK_DGRAM. Back to SOCK_STREAM.
Add debugging to fdwait.
Rewrite getcallerpc on PowerMac to be correct.
diff --git a/src/lib9/getcallerpc-PowerMacintosh.c b/src/lib9/getcallerpc-PowerMacintosh.c
new file mode 100644
index 0000000..679a72c
--- /dev/null
+++ b/src/lib9/getcallerpc-PowerMacintosh.c
@@ -0,0 +1,7 @@
+#include <lib9.h>
+
+ulong
+getcallerpc(void *x)
+{
+ return (((ulong*)(x))[-4]);
+}
diff --git a/src/lib9/getcallerpc-PowerMacintosh.s b/src/lib9/getcallerpc-PowerMacintosh.s
deleted file mode 100644
index 3571b74..0000000
--- a/src/lib9/getcallerpc-PowerMacintosh.s
+++ /dev/null
@@ -1,5 +0,0 @@
-.text
-.globl _getcallerpc
-_getcallerpc:
- mflr r3
- blr
diff --git a/src/lib9/pipe.c b/src/lib9/pipe.c
index 5d0e47c..f9fe242 100644
--- a/src/lib9/pipe.c
+++ b/src/lib9/pipe.c
@@ -6,5 +6,5 @@
int
p9pipe(int fd[2])
{
- return socketpair(AF_UNIX, SOCK_DGRAM, 0, fd);
+ return socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
}