From 724d5ba148f168f0397a470e646390a696150b5e Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 28 Jun 1988 11:20:50 +0000 Subject: [PATCH] use system module for system calls --- util/LLgen/src/Makefile | 2 +- util/LLgen/src/machdep.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/util/LLgen/src/Makefile b/util/LLgen/src/Makefile index a5ceb9a9d..2e28db8d3 100644 --- a/util/LLgen/src/Makefile +++ b/util/LLgen/src/Makefile @@ -20,7 +20,7 @@ parser: $(GFILES) @touch parser LLgen: $(OBJECTS) - $(CC) $(PROF) $(LDFLAGS) $(OBJECTS) -o LLgen + $(CC) $(PROF) $(LDFLAGS) $(OBJECTS) $(EMHOME)/modules/lib/libsystem.a -o LLgen @size LLgen pr : diff --git a/util/LLgen/src/machdep.c b/util/LLgen/src/machdep.c index 6b118badc..73bbd24cd 100644 --- a/util/LLgen/src/machdep.c +++ b/util/LLgen/src/machdep.c @@ -33,15 +33,13 @@ extern string libpath(); UNLINK(x) string 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; { /* Must move the file "x" to the file "y" */ - unlink(y); - if(link(x,y)!=0)fatal(1,"Cannot link to %s",y); - unlink(x); + if(! sys_rename(x,y)) fatal(1,"Cannot rename to %s",y); } string -- 2.34.1