From 026a471d51dfb7d79d142f5dd4fcdc9240795a41 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 21 Aug 2011 08:55:58 +0000 Subject: [PATCH] use unlink() instead of remove() --- ChangeLog | 7 +++++++ src/frontend/runcoms.c | 2 +- src/frontend/runcoms2.c | 2 +- src/main.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 832b2d402..1e702768e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-08-21 Robert Larice + * src/main.c , + * src/frontend/runcoms.c , + * src/frontend/runcoms2.c : + use unlink() instead of remove() + thanks to Marcel Hendrix + 2011-08-20 Robert Larice * src/spicelib/devices/adms/admst/ngspice.xml : #7/7 use a subdirectory "ngspice" for includes to create a uniq namespace diff --git a/src/frontend/runcoms.c b/src/frontend/runcoms.c index 97f0ccead..f3afb1a62 100644 --- a/src/frontend/runcoms.c +++ b/src/frontend/runcoms.c @@ -343,7 +343,7 @@ dosim( if (rawfileFp){ if (ftell(rawfileFp)==0) { (void) fclose(rawfileFp); - (void) remove(wl->wl_word); + (void) unlink(wl->wl_word); } else { (void) fclose(rawfileFp); } diff --git a/src/frontend/runcoms2.c b/src/frontend/runcoms2.c index 275693c50..238f8794c 100644 --- a/src/frontend/runcoms2.c +++ b/src/frontend/runcoms2.c @@ -145,7 +145,7 @@ com_resume(wordlist *wl) if (rawfileFp){ if (ftell(rawfileFp)==0) { (void) fclose(rawfileFp); - (void) remove(last_used_rawfile); + (void) unlink(last_used_rawfile); } else { (void) fclose(rawfileFp); } diff --git a/src/main.c b/src/main.c index 2e9e873b6..41d46376b 100644 --- a/src/main.c +++ b/src/main.c @@ -1235,7 +1235,7 @@ main(int argc, char **argv) } #if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__) - if (tempfile && tpf && remove(tpf)) + if (tempfile && tpf && unlink(tpf)) perror("Could not delete temp file"); #endif