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

David Gibson <[email protected]> Tue, 27 Sep 2016 14:50:03 +1000
Newsgroups org.ozlabs.lists.ccan
Message-ID <[email protected]>
On Thu, Sep 22, 2016 at 09:33:04PM -0600, Kevin Locke wrote:
> 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]>

This is sane enough on its own, so I'll apply it to master.

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

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJX6fp7AAoJEGw4ysog2bOS4iAP/3RGcN6fXS/xsbrKJgwa6Srz
OvRMrCaopgIu50IyJgkC9+OHCY9gnAvAuBgs7Mv2FZ3PUdCKN5hKc4S/9Vk0Kc+0
q+w4bhkUy2nuMIMgLgYQn8EwFlBpT99KOKWr756uJmdNC28jpuP4jqp6y/bnQhy4
+hi+BbprtkxhQFOktbk4O3Prpy5zxxobcDmk22f5Ayqwbiv0RoGLuB1vVWe4csCL
yHrJ16iPCWMBIsNtO0fNoQUYuhZsWd8EvrX9KCCHUjPgZU5oLXgyY1VIAeaLHICO
qZvlTGtnQ/ZnXYdMyHpqWFf/8+pBul62LtHpBl5vHqIKS0/rwsbd1cBD2fOs13aB
hz9vOxLBHSz5Ludng+kQIcXIQXuT4UUdrEiJS5vngqTCtLy4W1ZjoanaIY/QDFkD
S6OdmIsN9tKr5fElqFU/yRJrG55gjU+n6qF6oxesHfd84bA1SPR2x5tcqAz5ZJBS
cbKif8AmBV5/vCTM0ksUC37XIQvjeVPRkUrIytIt5ONiCqGzkBpa5uZLBp1d/HHn
Pg4Ntsrr4nt5xR7Ec083y7YO2G0zjn17HyyGBotG1f3VPEcUwuxwW6tRusg6p3Ij
nFdOmQFc4N8/wgORIBBp7C9DDJowoFPzBJCd4PTP18doNtYBnZNW+a6j/IwXqFSn
mdqgIaOq8cXfla2az3uF
=LH8q
-----END PGP SIGNATURE-----