You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Paul Burba <pa...@softlanding.com> on 2006/02/21 17:14:21 UTC

[PATCH] Re: apr_strnatcasecmp vs. strcasecmp

Mark Phippard <ma...@softlanding.com> wrote on 02/21/2006 08:53:10 AM:

> Branko Čibej <br...@xbc.nu> wrote on 02/20/2006 02:26:27 PM:
> 
> > Mark Phippard wrote:
> > > Peter Samuelson <pe...@p12n.org> wrote on 02/17/2006 04:08:32 AM:
> > > 
> > > So our answer will be to in someway get strings.h included.
> > > 
> > #define APR_WANT_STRFUNC
> > #include <apr_want.h>
> > 
> > That should do it. It's APR's canonical way of including 
not-so-standard 
> 
> > headers.
 
> We were able to solve the problem by including strings.h in 
> svn_private_config.h.  Do you think there are other platforms that 
> Subversion supports that would have this problem?  If so, we could 
> probably put together a patch which uses your technique in the main 
code.
> 
> Thanks
> 
> Mark


Hi Brane,

Thanks for the info.  Mark and I talked about this offline and agree that 
your approach is probably the right way to go.  So here is a patch to all 
files that call strcasecmp() and/or strncasecmp() and don't already have 
#define APR_WANT_STRFUNC and #include <apr_want.h>.

You are contractually obligated to approve it now since it was your idea, 
right? ;-)

Thanks,

Paul B.

[[[
Support platforms with old BSD-style string.h and strings.h headers.

OS400 is the only platform this is currently known to affect.

* subversion/libsvn_ra/ra_loader.c
* subversion/libsvn_ra_serf/serf.c
* subversion/libsvn_ra_serf/update.c
* subversion/libsvn_ra_serf/util.c
* subversion/libsvn_subr/opt.c
* subversion/libsvn_subr/subst.c
   Define APR_WANT_STRFUNC and include apr_want.h.
]]]

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs. 
_____________________________________________________________________________

Re: [PATCH] Re: apr_strnatcasecmp vs. strcasecmp

Posted by Branko Čibej <br...@xbc.nu>.
Paul Burba wrote:
> Branko Čibej <br...@xbc.nu> wrote on 02/21/2006 01:17:19 PM:
>
>   
>> Paul Burba wrote:
>>     
>
>   
>>> You are contractually obligated to approve it now since it was your 
>>>       
> idea, 
>   
>>> right? ;-)
>>>       
>
>   
>> Only if you first fix the nits I found, right! :)
>> (And if it passes the tests, of course.)
>>     
>
>
> Brane,
>
> I appreciate the help and the review.
>
> Fixed the log message, removed any explicit includes of string.h, and 
> passes all tests.
>
> Shall I commit this?
>   
Looks good, +1

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Re: apr_strnatcasecmp vs. strcasecmp

Posted by Paul Burba <pa...@softlanding.com>.
Branko Čibej <br...@xbc.nu> wrote on 02/21/2006 01:17:19 PM:

> Paul Burba wrote:

> > You are contractually obligated to approve it now since it was your 
idea, 
> > right? ;-)

> Only if you first fix the nits I found, right! :)
> (And if it passes the tests, of course.)


Brane,

I appreciate the help and the review.

Fixed the log message, removed any explicit includes of string.h, and 
passes all tests.

Shall I commit this?

Paul B.

[[[
Support platforms with old BSD-style string.h and strings.h headers.

OS400 is the only platform currently known to be affected.

Approved by: Branko Čibej <br...@xbc.nu>

* subversion/libsvn_ra/ra_loader.c
* subversion/libsvn_ra_serf/serf.c
* subversion/libsvn_ra_serf/update.c
* subversion/libsvn_ra_serf/util.c
* subversion/libsvn_subr/opt.c
* subversion/libsvn_subr/subst.c
   Define APR_WANT_STRFUNC and include apr_want.h.  Remove
   #include <string.h> if present.
]]]

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs. 
_____________________________________________________________________________

Re: [PATCH] Re: apr_strnatcasecmp vs. strcasecmp

Posted by Branko Čibej <br...@xbc.nu>.
Paul Burba wrote:
> Hi Brane,
>
> Thanks for the info.  Mark and I talked about this offline and agree that 
> your approach is probably the right way to go.
Since APR is our portability layer, it certainly makes sense to use 
APR's portability mechanisms where available.
> So here is a patch to all 
> files that call strcasecmp() and/or strncasecmp() and don't already have 
> #define APR_WANT_STRFUNC and #include <apr_want.h>.
>
> You are contractually obligated to approve it now since it was your idea, 
> right? ;-)
>   
Only if you first fix the nits I found, right! :)
(And if it passes the tests, of course.)
> Thanks,
>
> Paul B.
>
> [[[
> Support platforms with old BSD-style string.h and strings.h headers.
>
> OS400 is the only platform this is currently known to affect.
>   
s/to affect/to be affected/

> * subversion/libsvn_ra/ra_loader.c
> * subversion/libsvn_ra_serf/serf.c
> * subversion/libsvn_ra_serf/update.c
> * subversion/libsvn_ra_serf/util.c
> * subversion/libsvn_subr/opt.c
> * subversion/libsvn_subr/subst.c
>    Define APR_WANT_STRFUNC and include apr_want.h.
>   
Yes, *and* remove explicit includes of string.h

> ]]]
>   
> Index: subversion/libsvn_ra/ra_loader.c
> ===================================================================
> --- subversion/libsvn_ra/ra_loader.c	(revision 18537)
> +++ subversion/libsvn_ra/ra_loader.c	(working copy)
> @@ -19,6 +19,8 @@
>  /* ==================================================================== */
>  
>  /*** Includes. ***/
> +#define APR_WANT_STRFUNC
> +#include <apr_want.h>
>  
>  #include <string.h>
>   
This last include should go. And any others you happened to have forgotten.

Otherwise, yes, this is what I had in mind.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org