info-mtools
[Top][All Lists]
Advanced

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

[Info-mtools] GNU mtools 4.0.26 - strtoi signature clash


From: is
Subject: [Info-mtools] GNU mtools 4.0.26 - strtoi signature clash
Date: Sat, 30 Jan 2021 14:50:38 +0100

[I had wanted to check how to do it correctly myself and follow up much
earlier. Finding this in my draft mbox, I think I should at least 
communicate my findings.]

Hello,

still needed my workaround for 4.0.26 (renaming mtools' strtoi to
mtools_strtoi)  and integrated that in pkgsrc for the time being.

the configure script goes to a great length to avoid seeing the
strtoi() prototype, then defines its own (with empty argument list)
and checks that the test program (calling strtoi() with empty
argument list) compiles and links.  
Of course, this works, but fails to detect that the system libraries'
strtoi() has a different signature from the function mtools expects.

As far as I could tell, this is the method AC_CHECK_FUNCS uses. To
distinguish signatures, a more elaborate test program would beed
to be compiled. I had wanted to learn how to do it correctly, but
was distracted by life and work problems.

The background is, that strtoi isn't POSIXly or STDCly defined, afaict.
Mtools' strtoi() is a strtol() lookalike (three parameters); the
NetBSD's system libraries' one has six parameters (with strtol,
atoi and friends being wrappers).

Regards,
        -is



reply via email to

[Prev in Thread] Current Thread [Next in Thread]