Re: [PATCH 1/3] configure.ac: check tv_nsec field in struct stat
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jan 7, 2015, 21:57 UTC
- Message-ID
- <CAPig+cRLMZMoW7Oe8ViB=3R9iSxp88haR7CZ1SHaW0sCnhJ=0Q@mail.gmail.com>
- In-Reply-To
- <CAD_8n+RBJHDjFCEY8GmbsqyyyxPEo71Lg03M7y9dMcu74y6m-w@mail.gmail.com>
On Wed, Jan 7, 2015 at 4:33 PM, Reuben Hawkins <reubenhwk@gmail.com> wrote:
Show 8 quoted lines
> On Wed, Jan 7, 2015 at 1:19 PM, Eric Sunshine <sunshine@sunshineco.com> wrote: >> On Wed, Jan 7, 2015 at 3:23 PM, Reuben Hawkins <reubenhwk@gmail.com> wrote: >>> +# Define USE_ST_TIMESPEC=YesPlease when stat.st_mtimespec.tv_nsec exist >> >> It would be slightly more accurate to drop the ".tv_nsec" bit from this comment. > > The AC_CHECK_MEMBER is checking for st_mtimespec.tv_nsec. If I drop > tv_nsec from the comment should I also drop it in the check?
No. My observation was just about the comment.
> I thought it was better to be very explicit because the code using the > check is using that .tv_nsec field...I figured the check may as well > do exactly what the code is doing...
Indeed, the check and code should agree. However, from the perspective of the person reading comment, the ".tv_nsec" is just an implementation detail of the check itself. The final outcome (the setting of USE_ST_TIMESPEC) is independent of how that check was made: it matters only that 'stat.st_mtimespec' was detected _somehow_.
Anyhow, it's just a minor observation, hence my qualification of it as "_slightly_ more accurate". If you feel strongly that it should remain as is, then that's fine.