This commit is contained in:
Russ Cox 2009-07-14 22:55:52 -07:00
commit e6c837d612
9 changed files with 31 additions and 5 deletions

View file

@ -17,3 +17,4 @@ y.tab.[ch]$
^log/
^dict/
^postscript/font/
\.orig$

View file

@ -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.

3
bin/9c
View file

@ -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

4
dist/buildmk vendored
View file

@ -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;

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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]);

View file

@ -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;