Re: [PATCH] git-compat-util.h: Fix build without threads

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

 



On 11/29/22 10:30, Bagas Sanjaya wrote:
> On 11/26/22 06:47, Ævar Arnfjörð Bjarmason wrote:
>> Per f43cce23add (git-compat-util: add fallbacks for unlocked stdio,
>> 2015-04-16) wouldn't it make more sense to do something like:
>>
>> #ifdef NO_FLOCKFILE
>> #undef _POSIX_THREAD_SAFE_FUNCTIONS
>> #endif
>>
>> Or the other way around here? I.e. have _POSIX_THREAD_SAFE_FUNCTIONS
>> define/undefine NO_FLOCKFILE?
> 
> From the commit you mentioned, I think that above is OK. However,
> because I'm no C expert, I'm unsure whether I should go with #undef
> suggestion alone or #undef following by no-op declaration below #endif.
> 
> Thanks.
> 

Also, I think NO_FLOCKFILE is rather misnomer: it is the knob
when there is no _POSIX_THREAD_SAFE_FUNCTION, so the knob name should
have been "NO_POSIX_THREAD_SAFE_FUNCTION" instead.

-- 
An old man doll... just what I always wanted! - Clara




[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]

  Powered by Linux