apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: why apr_size_t?
Date Fri, 12 Jul 2002 15:12:56 GMT
On Thu, 11 Jul 2002, Roy T. Fielding wrote:

> As near as I can tell from looking at the code and cvs logs, the only
> reason we have apr_size_t and apr_ssize_t is because win32 wants to
> define apr_ssize_t.  Is that because win32 doesn't have ssize_t?
> Is there a reason why we don't simply define ssize_t on that platform?

We've run into problems before doing things like this, well I suppose more
with functions than with typenames.  But in general, if we're going to
export something, IMO it must always be apr_ namespaced.

For example, there was a case recently where if strchr() or something was
missing, we would just define it.  But that would break binary
compatibility with later patchlevels of the same OS that suddenly *did*
define it, as we'd get duplicate definitions.

Obviously the binary-compatibility argument doesn't hold for typenames,
but I still think it wise to have everything consistently namespaced.  It
makes it easier for the programmer too -- if you're using APR, then all
your types start with "apr_".  It would be annoying to have to remember
"oh, APR gives me this one, but there's no apr_ on it.  APR gives me this
other one but there *is* an apr_ on that."


View raw message