diff options
author | Russ Cox <rsc@swtch.com> | 2009-07-14 22:55:52 -0700 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2009-07-14 22:55:52 -0700 |
commit | e6c837d612cc884aa4fe68335c121c3dadddeebc (patch) | |
tree | 31c741d29c74726558268d17d8df1c3a3848646b | |
parent | 76f90e51459082e3dd93f80e310635c6d37044e2 (diff) | |
parent | 76f90e51459082e3dd93f80e310635c6d37044e2 (diff) | |
download | plan9port-e6c837d612cc884aa4fe68335c121c3dadddeebc.tar.gz plan9port-e6c837d612cc884aa4fe68335c121c3dadddeebc.tar.bz2 plan9port-e6c837d612cc884aa4fe68335c121c3dadddeebc.zip |
merge
-rw-r--r-- | .hgignore | 1 | ||||
-rw-r--r-- | LICENSE | 6 | ||||
-rwxr-xr-x | bin/9c | 3 | ||||
-rwxr-xr-x | dist/buildmk | 4 | ||||
-rw-r--r-- | include/u.h | 3 | ||||
-rw-r--r-- | src/cmd/acme/rows.c | 3 | ||||
-rw-r--r-- | src/lib9/dirread.c | 6 | ||||
-rw-r--r-- | src/libdraw/drawclient.c | 8 | ||||
-rw-r--r-- | src/mkhdr | 2 |
9 files changed, 31 insertions, 5 deletions
@@ -17,3 +17,4 @@ y.tab.[ch]$ ^log/ ^dict/ ^postscript/font/ +\.orig$ @@ -1,3 +1,9 @@ +Copyright © 2000-2009 Lucent Technologies. All Rights Reserved. +Portions Copyright © 2001-2008 Russ Cox +Portions Copyright © 2008-2009 Google Inc. + +=================================================================== + The bulk of this software is derived from Plan 9 and is thus distributed under the Lucent Public License, Version 1.02, reproduced below. @@ -58,6 +58,9 @@ case "$tag" in cflags="$ngflags -g" cflags="$cflags -D__sun__ -D__${s}__" ;; +*AIX*) usegcc + cflags="$ngflags -g -D__AIX__" + ;; *) echo 9c does not know how to compile on "$tag" 1>&2 exit 1 diff --git a/dist/buildmk b/dist/buildmk index ce3047af..ae415762 100755 --- a/dist/buildmk +++ b/dist/buildmk @@ -2,13 +2,13 @@ # run this in the src directory SYSNAME=`uname` export SYSNAME -OBJTYPE=`uname -m | sed ' +OBJTYPE=`uname -p | sed ' s;i.86;386;; s;i86pc;386;; s;amd64;x86_64;; s;/.*;;; s; ;;g; s;armv4l;arm;g; - s;PowerMacintosh;power;g; + s;powerpc;power;g; s;macppc;power;g; s;ppc64;power;g; s;ppc;power;g; diff --git a/include/u.h b/include/u.h index e604d3af..3a25d01c 100644 --- a/include/u.h +++ b/include/u.h @@ -29,6 +29,9 @@ extern "C" { # undef __LONG_LONG_SUPPORTED # define __LONG_LONG_SUPPORTED #endif +#if defined(__AIX__) +# define _XOPEN_SOURCE 1 +#endif #define _LARGEFILE64_SOURCE 1 #define _FILE_OFFSET_BITS 64 diff --git a/src/cmd/acme/rows.c b/src/cmd/acme/rows.c index 51f3e1c5..31322f8a 100644 --- a/src/cmd/acme/rows.c +++ b/src/cmd/acme/rows.c @@ -269,6 +269,9 @@ rowtype(Row *row, Rune r, Point p) Window *w; Text *t; + if(r == 0) + r = Runeerror; + clearmouse(); qlock(&row->lk); if(bartflag) diff --git a/src/lib9/dirread.c b/src/lib9/dirread.c index 5485df0c..74dd1422 100644 --- a/src/lib9/dirread.c +++ b/src/lib9/dirread.c @@ -31,6 +31,12 @@ mygetdents(int fd, struct dirent *buf, int n) { return getdents(fd, (void*)buf, n); } +#elif defined(__AIX__) +static int +mygetdents(int fd, struct dirent *buf, int n) +{ + return getdirent(fd, (void*)buf, n); +} #endif static int diff --git a/src/libdraw/drawclient.c b/src/libdraw/drawclient.c index 361cb0ac..f6cc5861 100644 --- a/src/libdraw/drawclient.c +++ b/src/libdraw/drawclient.c @@ -34,6 +34,7 @@ _displayconnect(Display *d) return -1; } if(pid == 0){ + char *devdraw; close(p[0]); dup(p[1], 0); dup(p[1], 1); @@ -54,9 +55,12 @@ _displayconnect(Display *d) * instead. */ putenv("NOLIBTHREADDAEMONIZE", "1"); + devdraw = getenv("DEVDRAW"); + if(devdraw == nil) + devdraw = "devdraw"; if(argv0 == nil) - argv0 = "devdraw"; - execl("devdraw", argv0, argv0, "(devdraw)", nil); + argv0 = devdraw; + execl(devdraw, argv0, argv0, "(devdraw)", nil); sysfatal("exec devdraw: %r"); } close(p[1]); @@ -6,7 +6,7 @@ OBJTYPE=`uname -m | sed ' s;amd64;x86_64;; s;/.*;;; s; ;;g; - s;armv4l;arm;g; + s;armv.*;arm;g; s;PowerMacintosh;power;g; s;macppc;power;g; s;ppc64;power;g; |