[PATCH resend] replace: Replace BSD strtoll by wrapping strtoll instead of strtoq
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon Jun 22 00:09:44 MDT 2015
On Sun, Jun 21, 2015 at 12:03:56PM +0200, Felix Janda wrote:
> When it is detected that strtoll returns EINVAL not only in the case
> that the base is not supported, HAVE_BSD_STRTOLL is declared and
> strtoll is replaced. The current replacement code wraps strtoq in
> order to replace strtoll and errors out when strtoq is missing.
>
> In order to remove this possible error path, we can use strtoll instead
> of strtoq since the code is only used when it is known that strtoll exists.
>
> The fixes a compilation problem on linux systems using musl libc, which
> has a BSD-like strtoll but no strtoq.
Ok. I'm not 100% sure about whether the replacement function is
right. We might have to test for ((nb==0)&&(errno==EINVAL)) instead
of just errno==EINVAL, but as this is a change on top of yours, it's
probably okay.
Reviewed-by: Volker Lendecke <vl at samba.org>
Someone else?
Thanks,
Volker
More information about the samba-technical
mailing list