Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [PATCH] ap_strchr* apr_strstr* ap_rind ap_ind ap_str_lower

From: Greg Stein <gstein(at)lyra.org>
Date: Wed May 30 2001 - 03:09:54 EDT

On Tue, May 29, 2001 at 09:19:25PM -0700, Ian Holsman wrote:
>
> This patch moves the following functions to apr_strings

These should just be deleted. They're quite bogus :-)

There are three uses of ap_ind and one use of ap_rind. Not worth futzing with those things.

>...

> --- include/httpd.h 2001/05/22 01:31:02 1.151
> +++ include/httpd.h 2001/05/30 04:00:48
>...
> +/* the following are for compatibility.
> + * These will be removed once changes are commited in APR, and
> + * all affected modules are determined
> + * TODO: REMOVE BY 2001-06-15
> + */
> +
> +#define ap_str_tolower(x) apr_str_tolower(x)
> +#define ap_ind(x,y) apr_ind(x,y)
> +#define ap_rind(x,y) apr_rind(x,y)
> +#define ap_strchr(s, c) strchr(s, c)
> +#define ap_strchr_c(s, c) strchr(s, c)
> +#define ap_strrchr(s, c) strrchr(s, c)
> +#define ap_strrchr_c(s, c) strrchr(s, c)
> +#define ap_strstr(s, c) strstr(s, c)
> +#define ap_strstr_c(s, c) strstr(s, c)
The strchr, strrchr, and strstr items should be mapped to the apr_ varieties. Otherwise, the unconverted macros lose all benefit of the const stuff. >...
> --- srclib/apr/include/apr_strings.h 2001/05/23 14:15:39 1.17
> +++ srclib/apr/include/apr_strings.h 2001/05/30 04:02:20
>...

> +#ifdef APR_DEBUG

This value needs to be set in apr/configure.in. Take a look at httpd's setting of AP_DEBUG and look at the debug stuff in apr's configure.in. Setting APR_DEBUG needs to happen, or (again) we lose the benefit of these macros.

Basically: we shouldn't apply the patch at this point because it will simply disable the type safety checks that the apr_strchr stuff is giving us.

Cheers,
-g

-- 
Greg Stein, 
http://www.lyra.org/
Received on Wed May 30 07:04:42 2001

This archive was generated by hypermail 2.1.8 : Thu Aug 24 2006 - 14:53:17 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library