Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2011-03-08 Thread Jim Jagielski
On Mar 8, 2011, at 9:49 AM, Hyrum K. Wright wrote: On Fri, Dec 17, 2010 at 10:23 AM, Jim Jagielski j...@jagunet.com wrote: On Dec 17, 2010, at 11:13 AM, William A. Rowe Jr. wrote: On 12/17/2010 7:32 AM, Graham Leggett wrote: While amending the apr.h file after the fact is obviously not

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2011-03-08 Thread Jeff Trawick
On Tue, Mar 8, 2011 at 1:42 PM, Jim Jagielski j...@jagunet.com wrote: On Mar 8, 2011, at 9:49 AM, Hyrum K. Wright wrote: On Fri, Dec 17, 2010 at 10:23 AM, Jim Jagielski j...@jagunet.com wrote: On Dec 17, 2010, at 11:13 AM, William A. Rowe Jr. wrote: On 12/17/2010 7:32 AM, Graham Leggett

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Dan Poirier
On Thu. 2010-12-16 at 03:35 PM EST, Jim Jagielski j...@jagunet.com wrote: On Dec 16, 2010, at 3:23 PM, Jim Jagielski wrote: Here is my idea... currently, when looking for sizes and formats for off_t, we do from smallest to largest (int - long - long long). We also do the same when

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Dan Poirier
On Thu. 2010-12-16 at 03:44 PM EST, William A. Rowe Jr. wr...@rowe-clan.net wrote: On 12/16/2010 2:35 PM, Jim Jagielski wrote: On Dec 16, 2010, at 3:23 PM, Jim Jagielski wrote: Here is my idea... currently, when looking for sizes and formats for off_t, we do from smallest to largest

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Jim Jagielski
On Dec 17, 2010, at 6:58 AM, Dan Poirier wrote: On Thu. 2010-12-16 at 03:35 PM EST, Jim Jagielski j...@jagunet.com wrote: On Dec 16, 2010, at 3:23 PM, Jim Jagielski wrote: Here is my idea... currently, when looking for sizes and formats for off_t, we do from smallest to largest (int -

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Jim Jagielski
On Dec 16, 2010, at 4:38 PM, William A. Rowe Jr. wrote: On 12/16/2010 3:36 PM, Jim Jagielski wrote: +# where int and long are the same size. Use the longest +# type that fits +if test $ac_cv_sizeof_off_t = $ac_cv_sizeof_long_long; then +off_t_fmt='#define APR_OFF_T_FMT

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Jim Jagielski
On Dec 17, 2010, at 7:29 AM, Jim Jagielski wrote: Example: if I build universal (CFLAGS='-arch i386 -arch x86_64'), the compile fails in strings/apr_snprintf.c: Hmmm I cannot recreate that (at least on the 1.4.x branch). What happens if you just blank out CFLAGS? The default is

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Graham Leggett
On 17 Dec 2010, at 2:33 PM, Jim Jagielski wrote: Hold on, yeah, it does seem to still not like universal. But at least this is better than it was... A while back I asked Apple directly what their solution was, and they said they amend the apr.h after the fact using this:

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Jim Jagielski
On Dec 17, 2010, at 8:32 AM, Graham Leggett wrote: On 17 Dec 2010, at 2:33 PM, Jim Jagielski wrote: Hold on, yeah, it does seem to still not like universal. But at least this is better than it was... A while back I asked Apple directly what their solution was, and they said they

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Graham Leggett
On 17 Dec 2010, at 3:53 PM, Jim Jagielski wrote: iirc, the concept of using __LP64__ was nixed (iirc, about a year ago I had a large patch set which used that). r824818 and r824762 Not sure if that veto is still valid or not. As I recall, the veto attempted to veto the concept of an Apple

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread Jim Jagielski
On Dec 17, 2010, at 9:12 AM, Graham Leggett wrote: On 17 Dec 2010, at 3:53 PM, Jim Jagielski wrote: iirc, the concept of using __LP64__ was nixed (iirc, about a year ago I had a large patch set which used that). r824818 and r824762 Not sure if that veto is still valid or not. As I

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread William A. Rowe Jr.
On 12/17/2010 6:31 AM, Jim Jagielski wrote: Oh, yeah. Well, it's not only the format but everything as well... After all, if long long is 128bits, you don't want to use apr_strtoi64 either. Exactly I would suggest that we tackle that issue separately? Sure, of course. Show me broken

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-17 Thread William A. Rowe Jr.
On 12/17/2010 7:32 AM, Graham Leggett wrote: While amending the apr.h file after the fact is obviously not the solution, picking apart what they've done and building it into the apr.h.in should work. Right, Fred had submitted this to the list. Joe had vetoed. /me Grabs for the popcorn :)

Re: [PATCH] %lld support in apr_snprintf()

2010-12-16 Thread Jim Jagielski
On Dec 15, 2010, at 5:11 PM, Dan Poirier wrote: On Mon. 2010-11-08 at 10:27 AM EST, Jim Jagielski j...@jagunet.com wrote: On Nov 7, 2010, at 7:42 PM, Jeff Trawick wrote: On Sun, Nov 7, 2010 at 6:51 PM, Chris Knight christopher.d.kni...@nasa.gov wrote: Exactly, the problem only appears

Re: [PATCH] %lld support in apr_snprintf()

2010-12-16 Thread Jim Jagielski
Here is my idea... currently, when looking for sizes and formats for off_t, we do from smallest to largest (int - long - long long). We also do the same when checking apr_int64_t as well... What if we do the reverse? What if instead of finding the smallest that is the right size, we find the

[PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-16 Thread Jim Jagielski
On Dec 16, 2010, at 3:23 PM, Jim Jagielski wrote: Here is my idea... currently, when looking for sizes and formats for off_t, we do from smallest to largest (int - long - long long). We also do the same when checking apr_int64_t as well... What if we do the reverse? What if instead of

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-16 Thread William A. Rowe Jr.
On 12/16/2010 2:35 PM, Jim Jagielski wrote: On Dec 16, 2010, at 3:23 PM, Jim Jagielski wrote: Here is my idea... currently, when looking for sizes and formats for off_t, we do from smallest to largest (int - long - long long). We also do the same when checking apr_int64_t as well... +

Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()

2010-12-16 Thread Jim Jagielski
On Dec 16, 2010, at 3:44 PM, William A. Rowe Jr. wrote: On 12/16/2010 2:35 PM, Jim Jagielski wrote: On Dec 16, 2010, at 3:23 PM, Jim Jagielski wrote: Here is my idea... currently, when looking for sizes and formats for off_t, we do from smallest to largest (int - long - long long). We

Re: [PATCH] %lld support in apr_snprintf()

2010-12-15 Thread Dan Poirier
On Mon. 2010-11-08 at 10:27 AM EST, Jim Jagielski j...@jagunet.com wrote: On Nov 7, 2010, at 7:42 PM, Jeff Trawick wrote: On Sun, Nov 7, 2010 at 6:51 PM, Chris Knight christopher.d.kni...@nasa.gov wrote: Exactly, the problem only appears on 64-bit Snow Leopard. See my patch in Bugzilla,

Re: [PATCH] %lld support in apr_snprintf()

2010-11-08 Thread Jim Jagielski
On Nov 7, 2010, at 7:42 PM, Jeff Trawick wrote: On Sun, Nov 7, 2010 at 6:51 PM, Chris Knight christopher.d.kni...@nasa.gov wrote: Exactly, the problem only appears on 64-bit Snow Leopard. See my patch in Bugzilla, which I've verified. (Unsure if the below would also work, been a long time

Re: [PATCH] %lld support in apr_snprintf()

2010-11-08 Thread Graham Leggett
On 08 Nov 2010, at 5:27 PM, Jim Jagielski wrote: If one forces *just* 64bit, then, afaict, the patch is not needed. It's only if one builds APR with both i386 and x86_64 that things break... Building with both is default behaviour, and has been default behaviour since universal binaries

Re: [PATCH] %lld support in apr_snprintf()

2010-11-07 Thread Sander Temme
On Nov 4, 2010, at 12:15 PM, William A. Rowe Jr. wrote: Looks good here. If folks find this unproblematic, can someone please commit it? I don't have karma here. Thanks, S. -- san...@temme.net http://www.temme.net/sander/ PGP FP: FC5A 6FC6 2E25 2DFD 8007 EE23 9BB8 63B0

Re: [PATCH] %lld support in apr_snprintf()

2010-11-07 Thread Jeff Trawick
On Sun, Nov 7, 2010 at 5:07 PM, Sander Temme san...@temme.net wrote: On Nov 4, 2010, at 12:15 PM, William A. Rowe Jr. wrote: Looks good here. If folks find this unproblematic, can someone please commit it?  I don't have karma here. Thanks, looks fine to me; starting to try it out now

Re: [PATCH] %lld support in apr_snprintf()

2010-11-07 Thread Jeff Trawick
On Sun, Nov 7, 2010 at 5:18 PM, Jeff Trawick traw...@gmail.com wrote: On Sun, Nov 7, 2010 at 5:07 PM, Sander Temme san...@temme.net wrote: On Nov 4, 2010, at 12:15 PM, William A. Rowe Jr. wrote: Looks good here. If folks find this unproblematic, can someone please commit it?  I don't have

Re: [PATCH] %lld support in apr_snprintf()

2010-11-07 Thread Chris Knight
Exactly, the problem only appears on 64-bit Snow Leopard. See my patch in Bugzilla, which I've verified. (Unsure if the below would also work, been a long time since I diagnosed.) On Nov 7, 2010, at 3:36 PM, Jeff Trawick wrote: On Sun, Nov 7, 2010 at 5:18 PM, Jeff Trawick traw...@gmail.com

Re: [PATCH] %lld support in apr_snprintf()

2010-11-07 Thread Jeff Trawick
On Sun, Nov 7, 2010 at 6:51 PM, Chris Knight christopher.d.kni...@nasa.gov wrote: Exactly, the problem only appears on 64-bit Snow Leopard. See my patch in Bugzilla, which I've verified. (Unsure if the below would also work, been a long time since I diagnosed.) What I understood was that

[PATCH] %lld support in apr_snprintf()

2010-11-04 Thread Sander Temme
Folks, I was seeing test failures on Darwin in both the APR testsuite and httpd perl-framework. The %lld sprintf format character was incorrectly parsed, and %ld written instead of the substituted value. This small patch against APR trunk fixes that: Index: strings/apr_snprintf.c

Re: [PATCH] %lld support in apr_snprintf()

2010-11-04 Thread Chris Knight
Reported many times (by me and others) and many patches suggested. But apparently no progress on addressing this issue. :^( https://issues.apache.org/bugzilla/show_bug.cgi?id=48476 On Nov 4, 2010, at 11:46 AM, Sander Temme wrote: Folks, I was seeing test failures on Darwin in both the APR

Re: [PATCH] %lld support in apr_snprintf()

2010-11-04 Thread William A. Rowe Jr.
On 11/4/2010 2:46 PM, Sander Temme wrote: Folks, I was seeing test failures on Darwin in both the APR testsuite and httpd perl-framework. The %lld sprintf format character was incorrectly parsed, and %ld written instead of the substituted value. This small patch against APR trunk