From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH v2 01/13] configurator: Replace unlink with remove Date: Tue, 27 Sep 2016 14:50:03 +1000 Message-ID: <20160927045003.GI30322@umbus.fritz.box> References: <162623821ba082524e6b43a0e9b90ff881b26bd6.1474600863.git.kevin@kevinlocke.name> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6809821377165575293==" 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 3sjq0v16zJzDrSv for ; Tue, 27 Sep 2016 15:20:31 +1000 (AEST) In-Reply-To: <162623821ba082524e6b43a0e9b90ff881b26bd6.1474600863.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 --===============6809821377165575293== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WHz+neNWvhIGAO8A" Content-Disposition: inline --WHz+neNWvhIGAO8A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Kevin Locke > Reviewed-by: David Gibson 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(-) >=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 --WHz+neNWvhIGAO8A Content-Type: application/pgp-signature; name="signature.asc" -----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----- --WHz+neNWvhIGAO8A-- --===============6809821377165575293== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KY2NhbiBtYWls aW5nIGxpc3QKY2NhbkBsaXN0cy5vemxhYnMub3JnCmh0dHBzOi8vbGlzdHMub3psYWJzLm9yZy9s aXN0aW5mby9jY2FuCg== --===============6809821377165575293==--