[PATCH resend] replace: Replace BSD strtoll by wrapping strtoll instead of strtoq

Stefan (metze) Metzmacher metze at samba.org
Mon Jun 22 00:30:25 MDT 2015

Am 22.06.2015 um 08:09 schrieb Volker Lendecke:
> 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?

Reviewed-by: me

Do we need the same for strtoull()?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150622/caef688d/attachment.pgp>

More information about the samba-technical mailing list