Richard Levitte - VMS Whacker wrote:
> 
> From: Ben Laurie <[EMAIL PROTECTED]>
> 
> ben> >   >> Like strstr()...
> ben> >
> ben> >   bl> Just because the C libraries are broken doesn't mean we should
> ben> >   bl> break ours. In Apache we fix these rather than live with them.
> ben> >
> ben> > How exactly do you fix them?
> ben>
> ben> By wrapping them with correctly declared functions.
> 
> So, either:
> 
>     const char *correct_strstr(const char *s1, const char *s2)
>     {
>         return strstr(s1, s2);
>     }
> 
> or:
> 
>     char *correct_strstr(char *s1, const char *s2)
>     {
>         return strstr(s1, s2);
>     }
> 
> Is that right?  Both of those have problems.  The first because you
> can't manipulate the result even if the strings you gave from the
> start are non-const, and the second because you can't give it a 'const
> char *' as first argument...

No, you have two, a const and a non-const version.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to