Albert Chin <[EMAIL PROTECTED]> writes:

> On Thu, Aug 11, 2005 at 11:17:25PM +0200, Hrvoje Niksic wrote:
>> OK, in presence of LFS, Wget will use either strtoll, strtoimax, or
>> its own strtoll implementation if none are available.
>
> I looked at your configure.in change and it won't work. strtoimax is a
> macro on HP-UX.

It will work, but suboptimally -- it will use a homegrown strtoll
implementation when it could be using libc's strtoimax.  Maybe this is
acceptable on systems that defy standards by defining a standard
function only as a macro[1].

But this is not hard to fix -- we could add something like:

#ifdef strtoimax
# define HAVE_STRTOIMAX
#endif

or we could turn #elif defined HAVE_STRTOIMAX into #elif defined
HAVE_STRTOIMAX || defined strtoimax.


[1]
Both C and POSIX require standard functions to also be defined as
functions, even if those that are normally invoked as macros of the
same name.  The 2004 edition of POSIX explicitly speaks of strtoimax
and friends as "functions".  See http://tinyurl.com/8atx3 and point #2
of http://tinyurl.com/c4ndu/.

Reply via email to