acid on freebsd

This commit is contained in:
rsc 2004-04-20 05:51:36 +00:00
parent ebd395452e
commit 6c8856475f
2 changed files with 3 additions and 2 deletions

View file

@ -175,7 +175,7 @@ linkdebug()
defn defn
dynamicmap() dynamicmap()
{ {
if systype == "linux" then { if systype == "linux" || systype == "freebsd" then {
local r, m, n; local r, m, n;
r = linkdebug(); r = linkdebug();
@ -185,7 +185,7 @@ dynamicmap()
n = 0; n = 0;
while m != 0 && n < 100 do { while m != 0 && n < 100 do {
complex Linkmap m; complex Linkmap m;
if m.name && *(m.name\b) then if m.name && *(m.name\b) && access(*(m.name\s)) then
textfile({*(m.name\s), m.addr\X}); textfile({*(m.name\s), m.addr\X});
m = m.next; m = m.next;
n = n+1; n = n+1;

View file

@ -633,6 +633,7 @@ doaccess(Node *r, Node *args)
r->op = OCONST; r->op = OCONST;
r->type = TINT; r->type = TINT;
r->store.fmt = 'D';
r->store.u.ival = 0; r->store.u.ival = 0;
if(access(res.store.u.string->string, 4) == 0) if(access(res.store.u.string->string, 4) == 0)
r->store.u.ival = 1; r->store.u.ival = 1;