]> git.ozlabs.org Git - ccan/commitdiff
configurator: Replace unlink with remove
authorKevin Locke <kevin@kevinlocke.name>
Fri, 23 Sep 2016 03:33:04 +0000 (21:33 -0600)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 27 Sep 2016 05:39:45 +0000 (15:39 +1000)
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>
tools/configurator/configurator.c

index 67dadc61eb8a550cea7c3a86f491458a64647e81..e322c76c72254f2f6089e0e5173978eaededd24d 100644 (file)
@@ -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"