From hurd-bug Mon Jul 22 14:10:08 2013 From: Pino Toscano Date: Mon, 22 Jul 2013 14:10:08 +0000 To: hurd-bug Subject: Re: [PATCH 6/8] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS. Message-Id: <201307221610.12578.toscano.pino () tiscali ! it> X-MARC-Message: https://marc.info/?l=hurd-bug&m=137450457017066 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart5441008.mWYDcOTQyz" --nextPart5441008.mWYDcOTQyz Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Alle marted=EC 9 luglio 2013, Justus Winter ha scritto: > index 5937d98..02ac88f 100644 > --- a/src/killall5.c > +++ b/src/killall5.c > @@ -373,7 +373,7 @@ int check4nfs(const char * path, char * real) > { > char buf[PATH_MAX+1]; > const char *curr; > - int deep =3D MAXSYMLINKS; > + int deep =3D sysconf(_SC_SYMLOOP_MAX); While certainly better, I just verified that such sysconf returns -1 on=20 Linux and kFreeBSD; thus, maybe it would make more sense to move this=20 code in a small function, which would first use sysconf falling back (if=20 returning <=3D 0) to MAXSYMLINKS if defined. =2D-=20 Pino Toscano --nextPart5441008.mWYDcOTQyz Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iD8DBQBR7T1ETNH2piB/L3oRAj96AJ91GEhj3nych9eP8dh1zdqZEOYuHwCfbxwF OrlQ73QYD9tjy4/uBWdZqhE= =PjHW -----END PGP SIGNATURE----- --nextPart5441008.mWYDcOTQyz--