[PATCH v2 01/13] configurator: Replace unlink with remove

Kevin Locke <[email protected]> Thu, 22 Sep 2016 21:33:04 -0600
Newsgroups org.ozlabs.lists.ccan
Message-ID <162623821ba082524e6b43a0e9b90ff881b26bd6.1474600863.git.kevin@kevinlocke.name>
Although Windows provides unlink, using it adds complication due to the
lack of unistd.h which must be included to define the function on POSIX
systems.  Instead, use remove, which C89 requires to be in stdio.h.

Signed-off-by: Kevin Locke <[email protected]>
Reviewed-by: David Gibson <[email protected]>
---
 tools/configurator/configurator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c
index 67dadc6..e322c76 100644
--- a/tools/configurator/configurator.c
+++ b/tools/configurator/configurator.c
@@ -639,8 +639,8 @@ int main(int argc, const char *argv[])
 		run_test(cmd, &tests[i]);
 	free(cmd);
 
-	unlink(OUTPUT_FILE);
-	unlink(INPUT_FILE);
+	remove(OUTPUT_FILE);
+	remove(INPUT_FILE);
 
 	printf("/* Generated by CCAN configurator */\n"
 	       "#ifndef CCAN_CONFIG_H\n"
-- 
2.9.3

_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan