Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-23 Thread Stefan Sperling
On Sun, Dec 23, 2018 at 02:32:30PM +0100, Yann Ylavic wrote: > Thanks Stefan, I didn't notice before in your proposed patch, but it > looks like uint64_t casts should be apr_uint64_t too. > > Regards, > Yann. Right. I went ahead and fixed it in r1849630. Thanks, Stefan

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-23 Thread Yann Ylavic
On Sun, Dec 23, 2018 at 10:33 AM Stefan Sperling wrote: > > On Wed, Dec 19, 2018 at 07:03:39PM +0100, Stefan Sperling wrote: > > On Wed, Dec 19, 2018 at 02:58:28PM +0100, Yann Ylavic wrote: > > > On Wed, Dec 19, 2018 at 9:53 AM Stefan Sperling wrote: > > > > > > > > On Tue, Dec 18, 2018 at

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-23 Thread Stefan Sperling
On Wed, Dec 19, 2018 at 07:03:39PM +0100, Stefan Sperling wrote: > On Wed, Dec 19, 2018 at 02:58:28PM +0100, Yann Ylavic wrote: > > On Wed, Dec 19, 2018 at 9:53 AM Stefan Sperling wrote: > > > > > > On Tue, Dec 18, 2018 at 12:29:18AM +0100, Yann Ylavic wrote: > > > > But yes, upcast is better,

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-19 Thread Stefan Sperling
On Wed, Dec 19, 2018 at 02:58:28PM +0100, Yann Ylavic wrote: > On Wed, Dec 19, 2018 at 9:53 AM Stefan Sperling wrote: > > > > On Tue, Dec 18, 2018 at 12:29:18AM +0100, Yann Ylavic wrote: > > > But yes, upcast is better, while at it I'd go for uint64_t... > > > > Like this? > > I think

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-19 Thread Yann Ylavic
On Wed, Dec 19, 2018 at 9:53 AM Stefan Sperling wrote: > > On Tue, Dec 18, 2018 at 12:29:18AM +0100, Yann Ylavic wrote: > > But yes, upcast is better, while at it I'd go for uint64_t... > > Like this? I think APR_UINT64_T_FMT/apr_uint64_t would be more portable ;) Thanks for taking care of this

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-19 Thread Stefan Sperling
On Tue, Dec 18, 2018 at 12:29:18AM +0100, Yann Ylavic wrote: > But yes, upcast is better, while at it I'd go for uint64_t... Like this? I've noticed that the same problem seems to exist in some other modules. I'll send separate patches for those once this patch has settled. Index:

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-17 Thread Yann Ylavic
On Mon, Dec 17, 2018 at 5:40 PM William A Rowe Jr wrote: > > On Sun, Dec 16, 2018 at 7:27 AM Yann Ylavic wrote: >> >> >> Since it's logging only, it may be easier to cast to (long) each >> total_in/out though. > > Downcast? Why not upcast to apr_off_t and use the _FMT macro as first >

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-17 Thread William A Rowe Jr
On Sun, Dec 16, 2018 at 7:27 AM Yann Ylavic wrote: > > Since it's logging only, it may be easier to cast to (long) each > total_in/out though. > Downcast? Why not upcast to apr_off_t and use the _FMT macro as first suggested?

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-16 Thread Yann Ylavic
On Sun, Dec 16, 2018 at 2:21 PM Yann Ylavic wrote: > > On Sun, Dec 16, 2018 at 2:14 PM Stefan Sperling wrote: > > > > The file /usr/include/zlib.h I have on OpenBSD -current has this: > > > > typedef struct z_stream_s { > > [...] > > z_off_t total_in; /* total nb of input bytes read so

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-16 Thread Yann Ylavic
On Sun, Dec 16, 2018 at 2:14 PM Stefan Sperling wrote: > > The file /usr/include/zlib.h I have on OpenBSD -current has this: > > typedef struct z_stream_s { > [...] > z_off_t total_in; /* total nb of input bytes read so far */ > [...] > z_off_t total_out; /* total nb of bytes

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-16 Thread Stefan Sperling
On Sun, Dec 16, 2018 at 02:03:45PM +0100, Yann Ylavic wrote: > On Sun, Dec 16, 2018 at 1:28 PM Stefan Sperling wrote: > > > > mod_deflates hard-codes some off_t format directives to "%ld". > > It seems to me this code should use the macro provided by APR instead. > > > > Looking for another pair

Re: [PATCH] mod_deflate: hardcoded "%ld" -> APR_OFF_T_FMT

2018-12-16 Thread Yann Ylavic
On Sun, Dec 16, 2018 at 1:28 PM Stefan Sperling wrote: > > mod_deflates hard-codes some off_t format directives to "%ld". > It seems to me this code should use the macro provided by APR instead. > > Looking for another pair of eyes. Does this patch look good to commit? It seems that zlib defines