use system module for system calls
This commit is contained in:
parent
c03e25dc0d
commit
724d5ba148
|
@ -20,7 +20,7 @@ parser: $(GFILES)
|
||||||
@touch parser
|
@touch parser
|
||||||
|
|
||||||
LLgen: $(OBJECTS)
|
LLgen: $(OBJECTS)
|
||||||
$(CC) $(PROF) $(LDFLAGS) $(OBJECTS) -o LLgen
|
$(CC) $(PROF) $(LDFLAGS) $(OBJECTS) $(EMHOME)/modules/lib/libsystem.a -o LLgen
|
||||||
@size LLgen
|
@size LLgen
|
||||||
|
|
||||||
pr :
|
pr :
|
||||||
|
|
|
@ -33,15 +33,13 @@ extern string libpath();
|
||||||
UNLINK(x) string x; {
|
UNLINK(x) string x; {
|
||||||
/* Must remove the file "x" */
|
/* Must remove the file "x" */
|
||||||
|
|
||||||
unlink(x); /* systemcall to remove file */
|
sys_remove(x); /* systemcall to remove file */
|
||||||
}
|
}
|
||||||
|
|
||||||
RENAME(x,y) string x,y; {
|
RENAME(x,y) string x,y; {
|
||||||
/* Must move the file "x" to the file "y" */
|
/* Must move the file "x" to the file "y" */
|
||||||
|
|
||||||
unlink(y);
|
if(! sys_rename(x,y)) fatal(1,"Cannot rename to %s",y);
|
||||||
if(link(x,y)!=0)fatal(1,"Cannot link to %s",y);
|
|
||||||
unlink(x);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
|
|
Loading…
Reference in a new issue