httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject APR types and printf formats?
Date Sun, 24 Oct 1999 19:18:41 GMT
How do we deal with those, then? For example, ap_send_size takes a
size_t (shortly to be corrected to an ap_ssize_t) and uses printf to
print it. It uses "%d" but probably should use "%ld". Except where it
shouldn't. Suggestions?

One obvious thing to do is:

#define APR_SSIZE_T_FMT	"ld"

and then do (for example):

    else if (size < 1048576) {
	ap_rprintf(r, "%4" APR_SSIZE_T_FMT "k", (size + 512) / 1024);

but this requires rather more knowledge about sizes that APR currently
has. No bad thing, probably.




"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

View raw message