[Top][All Lists]

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

Re: C99 strto* protos

From: Paul Eggert
Subject: Re: C99 strto* protos
Date: Mon, 10 Apr 2006 13:18:40 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

"Derek R. Price" <address@hidden> writes:

> GNULIB doesn't seem to be providing function prototypes for several
> strto* replacement functions.  Is this intentional?

Haven't got around to it, I think.

> Would a patch to provide a "strtoimax.h" and "strtoumax.h" with the
> strtoimax and strtoumax GNULIB modules be welcomed?

We do need a solution, but I've always been a bit put off by little
headers like that, since they pollute the source.

How about if gnulib creates an <inttypes.h> that has the declarations
that the standard requires?  The gnulib <inttypes.h> can look like this:

        #if HAVE_INTTYPES_H
        # if HAVE_INCLUDE_NEXT
        #  include_next <inttypes.h>
        # else
        #  include "/full/path/to/system/include/inttypes.h"
        # endif
        #if HAVE_STDINT_H
        # include <stdint.h>

        intmax_t strtoimax (char const *, char **, int);

I realize it's a bit of a pain to get the full path portably, but
surely it's not that hard: we can use the preprocessor and report the
first string that ends in "/inttypes.h".

reply via email to

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