From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH 1/9] configurator: Replace unlink with remove Date: Tue, 20 Sep 2016 14:50:33 +1000 Message-ID: <20160920045033.GK20488@umbus> References: <6a7d5f373bf9451cbc1b8866047453d9fc78b165.1474239353.git.kevin@kevinlocke.name> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7009656482724109237==" Return-path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sdWjl4v6ZzDsfg for ; Tue, 20 Sep 2016 15:37:31 +1000 (AEST) In-Reply-To: <6a7d5f373bf9451cbc1b8866047453d9fc78b165.1474239353.git.kevin@kevinlocke.name> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ccan-bounces+gclcc-ccan=m.gmane.org@lists.ozlabs.org Sender: "ccan" To: Kevin Locke Cc: ccan@lists.ozlabs.org List-Id: ccan@lists.ozlabs.org --===============7009656482724109237== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="73fGQZLCrFzENemP" Content-Disposition: inline --73fGQZLCrFzENemP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 18, 2016 at 06:51:58PM -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. >=20 > Signed-off-by: Kevin Locke Reviewed-by: David Gibson > --- > tools/configurator/configurator.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/tools/configurator/configurator.c b/tools/configurator/confi= gurator.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); > =20 > - unlink(OUTPUT_FILE); > - unlink(INPUT_FILE); > + remove(OUTPUT_FILE); > + remove(INPUT_FILE); > =20 > printf("/* Generated by CCAN configurator */\n" > "#ifndef CCAN_CONFIG_H\n" --=20 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 --73fGQZLCrFzENemP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4MAZAAoJEGw4ysog2bOSE7wQAOFTfTfdzNdsQa5fz0ZjYr06 LGnw9v0gF1Yx/DW0k2d89R5fZ/MD+rtuPeCSbP+W3odBmezJfpGc53jaGHS6TJMj HVXWoKYWuL0VlbZgiiwqr6FER0gS3uo1WQLyV/cp51oaS8kBG3nHiTS9heJdJqbT ZosygP1ebWxwo5Okd8DokPpCrwxShFuKo+5vhf7VkTgxQhVe3Cu5FY3E3QiOsj5A h6uZ+DuX7OpAKU0yIBnsYu97SxQzIeDuKUD3vKrPWT2JgPW63PMcQrfE41H+9OmU zDHaq8YpKOpA7bpTWCe5JdkQ68wQFRC2c3MHGc3dbDh8g4Y+q8PJxNAUh30QCSAD OdpOGEGwpt1JifxGI1givYSpYJNSEVTkmGGL7pHXmwLGZh/c7WZTkHdUzdYuv92O hAXygT5obPqFLPtlXg0DLWIlyqmuwDCDkOXvgrkovVrJGDag4Cw55RpW6YJEXZDu WctTWieYtlBV3QK5REyf7k+BH15b6E7TSz8c+heVD5NPGGEwISDqT4tVIX2cGx8F 9FZxr7MsQldhXvLVXNT6AqNfScE1ca7G673Gd2eyIZNKJCuxwKocwlg5EA7RcPoW sP0jUAUryCDuAeerth2sGzNR3vBSRafLqSOgNEr/dD/q13020n/NhS/51gWXX44L riDdxHxmXEy4I1rTUAvf =fYqU -----END PGP SIGNATURE----- --73fGQZLCrFzENemP-- --===============7009656482724109237== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KY2NhbiBtYWls aW5nIGxpc3QKY2NhbkBsaXN0cy5vemxhYnMub3JnCmh0dHBzOi8vbGlzdHMub3psYWJzLm9yZy9s aXN0aW5mby9jY2FuCg== --===============7009656482724109237==--