Re: [PATCH v2 08/11] cmake: added checks for struct stat and libiconv

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

 



On Wed, May 13, 2020 at 2:46 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> "Sibi Siddharthan via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>
> > From: Sibi Siddharthan <sibisiddharthan.github@xxxxxxxxx>
> > Subject: Re: [PATCH v2 08/11] cmake: added checks for struct stat and libiconv
>
> s/added/add/; give a command to the codebase to "be like so", or a
> command to whoever is typing changes to the editor to "make this
> happen".
>
> > The CMake script now checks whether st_blocks is a member of struct stat
> > and set the compile definition NO_ST_BLOCKS_IN_STRUCT_STAT accordingly.
>
>         Teach the CMake script to check ...
>
> > diff --git a/CMakeLists.txt b/CMakeLists.txt
> > index 4353080b708..975791c8b89 100644
> > --- a/CMakeLists.txt
> > +++ b/CMakeLists.txt
> > @@ -22,6 +22,7 @@ project(git
> >  include(CheckTypeSize)
> >  include(CheckCSourceRuns)
> >  include(CheckCSourceCompiles)
> > +include(CheckCSourceRuns)
> > ...
> > +#check for st_blocks in struct stat
> > +check_struct_has_member("struct stat" st_blocks "sys/stat.h" STRUCT_STAT_HAS_ST_BLOCKS)
> > +if(NOT STRUCT_STAT_HAS_ST_BLOCKS)
> > +     add_compile_definitions(NO_ST_BLOCKS_IN_STRUCT_STAT)
> > +endif()
>
> All of these compatibility stuff makes sense, but how do we decide
> where to draw the line between the checks we saw added in [01/11]
> and the checks added here?  It feels pretty arbitrary to me and if
> that is the case, perhaps we want to move all the "add checks" to a
> commit separate from [01/11] (whose primary purpose is to add the
> basic rules without these build tweaks in the file at the final
> place)?
>

The checks are added on a "demand" based the target platform.
In the future, if apple support is needed, we need to add ST_TIMESPEC checks.

Thank You,
Sibi Siddharthan



[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