Re: [PATCH 6/7] Check if strtoumax is a macro (eg HP-UX 11.11).

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

 



On Tue, 19 May 2020 at 03:17, Junio C Hamano <gitster@xxxxxxxxx> wrote:
[...]
> It is kind of surprising that we got away with GIT_CHECK_FUNC() that
> misses an implementation by macro without having problems with other
> symbols.

I suspect that in most cases you'll go to the fallback and be fine.
In this case, it falls back to strtoull which it doesn't have. (Adding
the strtoull test in patch 3/7 makes it fall back to strtoul which it
does have).

The other annoyance is that it produces a macro redefinition warning
on each file.  An alternative solution to that would be to undef
strtoumax in git-compat-util.h before redefining it.

> I don't mind taking this patch as-is, but it makes me wonder if we
> need to devise a more systematic approach to the issue than "oh, I
> found GIT_CHECK_FUNC() does not work for X on system Y, so let's add
> an AC_CHECK_DECL() for it, too" approach, which this patch is its
> first step.

The caveat with putting it in GIT_CHECK_FUNC() is that you'll need to
include the union of all of the header files that might have all of
the things you're looking for instead of the hopefully small set of
them that might have the one specific thing you're looking for.  I
suspect that would be more hassle than it's worth.

-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.



[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