apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apr/test test_apr.h testmd5.c testproc.c
Date Mon, 14 May 2001 01:48:22 GMT
"William A. Rowe, Jr." <lists@rowe-clan.net> writes:

> From: "Jeff Trawick" <trawickj@bellsouth.net>
> Sent: Sunday, May 13, 2001 7:15 PM
> 
> 
> > "William A. Rowe, Jr." <lists@rowe-clan.net> writes:
> > 
> > > > trawick     01/05/13 08:34:18
> > > > 
> > > >   Modified:    test     test_apr.h testmd5.c testproc.c
> > > >   Log:
> > > >   fix some bad parms to printf/fprintf
> > > >   
> > > >   -            printf("Error was %ld : %s\n", rv, strerror(rv)); \
> > > >   +            printf("Error was %d : %s\n", rv, strerror(rv)); \
> > > 
> > > Do I smell a need for an APR_STATUS_T_FMT ?  It doesn't seem we can assume
> > > this on 64 bit machines (?).
> > 
> > apr_status_t is always int so %d is always correct (though I suppose
> > the code in apr_errno.h could change).
> 
> No.  It's always a 32 bit int ... I want my fully 64 bit machine (none of this
> silly 32 bit numeric magic with 64 bit pointer cruft).  And at least BEOS won't
> accept %d for a 32bit int representation.

Please look at the declaration in apr_errno.h.  It is always int, and
%d is always correct for int.  It is not apr_int32_t or apr_uint32_t
or anything like that.  The right format string doesn't vary between
systems.

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...


Mime
View raw message