[quagga-dev 4376] Re: bgpd printf size_t warning
Andrew J. Schorr
aschorr at telemetry-investments.com
Wed Sep 20 16:03:31 BST 2006
On Wed, Sep 20, 2006 at 10:47:11AM -0400, Greg Troxel wrote:
> I just looked and we already claim to require C99.
> Is %z unsupported on any platform quagga currently works on?
Good point, %z is certainly in the C99 standard. In section
126.96.36.199 "The fprintf function", it says, in part:
z Specifies that a following d, i, o, u, x, or X conversion
specifier applies to a size_t or the corresponding signed integer
type argument; or that a following n conversion specifier applies
to a pointer to a signed integer type corresponding to size_t
So %zu should work on any C99 platform.
That being said, I do not see "z" in the printf man page on Solaris 9, which
we claim is a supported platform:
I guess I'm a bit uncertain about whether our C99 requirement really
means the whole C99 standard (including library functions), or perhaps
was more focused on compiler features...
More information about the Quagga-dev