Browse Source

configurator: Replace unlink with remove

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 <kevin@kevinlocke.name>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Kevin Locke 9 years ago
parent
commit
891b43ea4b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tools/configurator/configurator.c

+ 2 - 2
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"