Re: [PATCH 1/3] configure.ac: check tv_nsec field in struct stat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 21, 2014 at 3:20 PM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> On Sun, Dec 21, 2014 at 1:53 PM, Reuben Hawkins <reubenhwk@xxxxxxxxx> wrote:
>> +AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
>> +[HAVE_ST_MTIM=Yes],
>> +[HAVE_ST_MTIM=No],
>
> In Autoconf, it's customary to use lowercase values (such as "yes"
> rather than "Yes") for these temporary variables. A "no" value is
> usually represented by an empty assignment (HAVE_ST_MTIM=). However,
> AC_CHECK_MEMBER() assigns the test result automatically to a shell
> variable (in this case, named
> ac_cv_member_struct_stat_st_mtim_tv_nsec), so there is no need to
> invent your own (HAVE_ST_MTIM).
>
> So, you can reduce this to:
>
>    AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec])
>
> and later check the value with
>
>     test x$ac_cv_member_struct_stat_st_mtim_tv_nsec = yes

Apple auto-correction strikes again: s/yes/xyes/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]