[PATCH] Trivial patch fixing up a few errorcodes.c strings

2004-12-27 Thread Mihai Limbasan
Attached is a minor patch fixing some error strings in misc/unix/errorcodes.c (missing periods, inconsistent language usage). Patch is against the current HEAD (rev 123376) but it should apply cleanly to pretty much any revision. Oh, and thanks for a great library - and a happy new year to all of

[PATCH] Fix some VC++ 2003 level 3 warnings

2004-12-27 Thread Mihai Limbasan
Minor patch that fixes a few warnings coming up with the (APR default) warning level 3 when building on VC++ 2003, IA32. Patch is against the current HEAD (rev 123376). -- Mihai

apr_status_t testing against APR_SUCCESS usage question

2004-12-27 Thread Mihai Limbasan
From what I've gathered reviewing the APR code, the canonical way of testing apr_* return values is comparing against APR_SUCCESS. That happens to be #defined as zero. There are a lot of places around the APR codebase that do stuff like this: if (rv) return rv; i.e. taking advantage

[PATCH] Win32 oslevel fix and update

2004-12-27 Thread Mihai Limbasan
- Fixed a bug in misc/win32/misc.c that caused WinNT 3.x to always be detected as APR_WIN_UNSUP. - Updated misc/win32/misc.c and include/arch/win32/apr_arch_misc.h with the defines and detection code for Win2000 SP3 and SP4, and WinXP SP1 and SP2. Patch is against the current HEAD (rev 123376)

[PATCH] Fix assumptions about value of APR_SUCCESS being zero

2004-12-27 Thread Mihai Limbasan
In reply to my earlier question - went ahead and did it. What this patch does is fix all conditionals that depend implicitely on APR_SUCCESS being zero to perform an explicit test against its *macro definition* and not against the numeric literal or the C expression evaluation. No call or return

Re: apr_status_t testing against APR_SUCCESS usage question

2004-12-27 Thread Garrett Rooney
Mihai Limbasan wrote: From what I've gathered reviewing the APR code, the canonical way of testing apr_* return values is comparing against APR_SUCCESS. That happens to be #defined as zero. There are a lot of places around the APR codebase that do stuff like this: if (rv) return rv;

Re: apr_status_t testing against APR_SUCCESS usage question

2004-12-27 Thread Mihai Limbasan
I based my question on the fact that the majority of the cases seem to explicitely check against the macro. Oh well, should've waited before patching. It was a nice way of getting the overall feel of the library though - nice work! On Mon, 27 Dec 2004 09:44:06 -0500, Garrett Rooney [EMAIL

Re: apr_status_t testing against APR_SUCCESS usage question

2004-12-27 Thread Cliff Woolley
On Mon, 27 Dec 2004, Garrett Rooney wrote: This seems to defeat the point of having an APR_SUCCESS in the first place. It's also (at least in my eyes) slightly less intuitive than explicit testing. Part of the definition of apr_status_t is the fact that APR_SUCCESS is defined to be zero.

Re: apr_status_t testing against APR_SUCCESS usage question

2004-12-27 Thread Garrett Rooney
Cliff Woolley wrote: But because it is defined to be zero, if (rv != APR_SUCCESS) { return rv; } will be equivalent to and just as fast as if (!rv) { return rv; } on any remotely reasonable compiler. Ok, I think we may be talking about two different cases... There's

Re: apr_status_t testing against APR_SUCCESS usage question

2004-12-27 Thread Mihai Limbasan
Check, I hear you. I'll split it tomorrow then (tired right now and working while tired is a no-no) and resubmit the positive-success-report version. On Mon, 27 Dec 2004 12:35:06 -0500, Garrett Rooney [EMAIL PROTECTED] wrote: Ok, I think we may be talking about two different cases...

Re: apr_status_t testing against APR_SUCCESS usage question

2004-12-27 Thread Cliff Woolley
On Mon, 27 Dec 2004, Garrett Rooney wrote: Ok, I think we may be talking about two different cases... There's the check if a call returned an error, and if so return that to your caller case, which personally I think is easist to read as: if (rv) return rv; No, that's just me mixing up

Re: [PATCH] Fix assumptions about value of APR_SUCCESS being zero

2004-12-27 Thread Cliff Woolley
On Mon, 27 Dec 2004, Mihai Limbasan wrote: In reply to my earlier question - went ahead and did it. What this patch does is fix all conditionals that depend implicitely on APR_SUCCESS being zero to perform an explicit test against its *macro definition* and not against the numeric literal or

[PATCH] [REPOST] Fix some VC++ 2003 level 3 warnings

2004-12-27 Thread Mihai Limbasan
Forgot to attach the patch. Thanks, Garret :) Minor patch that fixes a few warnings coming up with the (APR default) warning level 3 when building on VC++ 2003, IA32. Patch is against the current HEAD (rev 123376). -- Mihai Limbasan vc-fix-warnlvl3.diff Description: Binary data

Re: [PATCH] [REPOST] Fix some VC++ 2003 level 3 warnings

2004-12-27 Thread William A. Rowe, Jr.
At 12:43 PM 12/27/2004, Mihai Limbasan wrote: Forgot to attach the patch. Thanks, Garret :) Minor patch that fixes a few warnings coming up with the (APR default) warning level 3 when building on VC++ 2003, IA32. Patch is against the current HEAD (rev 123376). The file_io/unix/fullrw.c is