| tOS X PowerPC fixes (thanks Cameron Kaiser) - plan9port - [fork] Plan 9 from user space |
| git clone git://src.adamsgaard.dk/plan9port |
| Log |
| Files |
| Refs |
| README |
| LICENSE |
| --- |
| commit 813b3eea8b469a6d603f13a51a8afb8e3dae3a32 |
| parent a2deaac4b1066df5de4774737ddc9f4b6edbaef9 |
| Author: Russ Cox |
| Date: Sun, 23 Oct 2011 17:55:23 -0400
OS X PowerPC fixes (thanks Cameron Kaiser)
Diffstat:
M INSTALL | 4 ++++
M dist/buildmk | 1 +
M src/cmd/devdraw/osx-screen-carbon.m | 1 +
M src/libthread/sysofiles.sh | 2 +-
M src/libthread/threadimpl.h | 2 +-
M src/mkhdr | 1 +
6 files changed, 9 insertions(+), 2 deletions(-)
--- |
| diff --git a/INSTALL b/INSTALL |
| t@@ -76,6 +76,10 @@ if [ `uname` = Darwin ]; then
echo " i386 found."
echo "OBJTYPE=386" >>$PLAN9/config
;;
+ *ppc*)
+ echo " power found."
+ echo "OBJTYPE=power" >>$PLAN9/config
+ ;;
esac
rm -f ./a.out
fi |
| diff --git a/dist/buildmk b/dist/buildmk |
| t@@ -10,6 +10,7 @@ OBJTYPE=`(uname -m -p 2>/dev/null || uname -m) | sed '
s;.*armv.*;arm;g;
s;.*powerpc.*;power;g;
s;.*PowerMacintosh.*;power;g;
+ s;.*Power.Macintosh.*;power;g;
s;.*macppc.*;power;g;
s;.*ppc64.*;power;g;
s;.*ppc.*;power;g; |
| diff --git a/src/cmd/devdraw/osx-screen-carbon.m b/src/cmd/devdraw/osx-screen-carbon.m |
| t@@ -2,6 +2,7 @@
#define Rect OSXRect
#define Cursor OSXCursor
#include
+#import
#ifdef MULTITOUCH
#include
#include |
| diff --git a/src/libthread/sysofiles.sh b/src/libthread/sysofiles.sh |
| t@@ -14,7 +14,7 @@ case "$tag" in
*-NetBSD-*)
echo ${SYSNAME}-${OBJTYPE}-asm.o $SYSNAME.o
;;
-*-Darwin-10.[5-6].* | *-Darwin-9.*)
+*-Darwin-10.[5-6].* | *-Darwin-[89].*)
echo ${SYSNAME}-${OBJTYPE}-asm.o $SYSNAME-${OBJTYPE}.o pthread.o
;;
*-OpenBSD-*) |
| diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h |
| t@@ -42,7 +42,7 @@ extern void makecontext(ucontext_t*, void(*)(), int, ...);
# include "386-ucontext.h"
# elif defined(__x86_64__)
# include "x86_64-ucontext.h"
-# elif defined(__power__)
+# elif defined(__ppc__) || defined(__power__)
# include "power-ucontext.h"
# else
# error "unknown architecture" |
| diff --git a/src/mkhdr b/src/mkhdr |
| t@@ -8,6 +8,7 @@ OBJTYPE=`(uname -m -p 2>/dev/null || uname -m) | sed '
s;.*armv.*;arm;g;
s;.*powerpc.*;power;g;
s;.*PowerMacintosh.*;power;g;
+ s;.*Power.Macintosh.*;power;g;
s;.*macppc.*;power;g;
s;.*ppc64.*;power;g;
s;.*ppc.*;power;g; |