[PATCH] Add simplistic reimplementation of strcasestr to compat library

2010-04-13 Thread Anthony Towns
On Tue, Apr 13, 2010 at 14:10, Dirk Hohndel wrote: > +/* the semantic here actually puzzles me: > + ? how can haystack be const char * - yet the return value is char * > + ? after all, it points to a sub-string of haystack... */ Dunno if this is a question from the original source, but the

[PATCH] Add simplistic reimplementation of strcasestr to compat library

2010-04-13 Thread Tomas Carnecky
On 4/13/10 6:10 AM, Dirk Hohndel wrote: > > While all systems that I have access to support strcasestr, it is > in fact not part of POSIX. So here's a fallback reimplementation > based on POSIX functions. Your patch is missing the part where it adds -DHAVE_STRCASESTR=.. to CONFIGURE_C{XX,}FLAGS.

[PATCH] Add simplistic reimplementation of strcasestr to compat library

2010-04-13 Thread Dirk Hohndel
On Tue, 13 Apr 2010 15:59:24 +1000, Anthony Towns wrote: > On Tue, Apr 13, 2010 at 14:10, Dirk Hohndel wrote: > > +/* the semantic here actually puzzles me: > > + ? how can haystack be const char * - yet the return value is char * > > + ? after all, it points to a sub-string of haystack... */ >

Re: [PATCH] Add simplistic reimplementation of strcasestr to compat library

2010-04-13 Thread Dirk Hohndel
On Tue, 13 Apr 2010 15:59:24 +1000, Anthony Towns a...@erisian.com.au wrote: On Tue, Apr 13, 2010 at 14:10, Dirk Hohndel hohn...@infradead.org wrote: +/* the semantic here actually puzzles me: +   how can haystack be const char * - yet the return value is char * +   after all, it points to

[PATCH] Add simplistic reimplementation of strcasestr to compat library

2010-04-12 Thread Dirk Hohndel
While all systems that I have access to support strcasestr, it is in fact not part of POSIX. So here's a fallback reimplementation based on POSIX functions. Signed-off-by: Dirk Hohndel --- compat/Makefile.local|4 compat/have_strcasestr.c | 10 ++ compat/strcasestr.c

[PATCH] Add simplistic reimplementation of strcasestr to compat library

2010-04-12 Thread Dirk Hohndel
While all systems that I have access to support strcasestr, it is in fact not part of POSIX. So here's a fallback reimplementation based on POSIX functions. Signed-off-by: Dirk Hohndel hohn...@infradead.org --- compat/Makefile.local|4 compat/have_strcasestr.c | 10 ++

Re: [PATCH] Add simplistic reimplementation of strcasestr to compat library

2010-04-12 Thread Tomas Carnecky
On 4/13/10 6:10 AM, Dirk Hohndel wrote: While all systems that I have access to support strcasestr, it is in fact not part of POSIX. So here's a fallback reimplementation based on POSIX functions. Your patch is missing the part where it adds -DHAVE_STRCASESTR=.. to CONFIGURE_C{XX,}FLAGS.

Re: [PATCH] Add simplistic reimplementation of strcasestr to compat library

2010-04-12 Thread Anthony Towns
On Tue, Apr 13, 2010 at 14:10, Dirk Hohndel hohn...@infradead.org wrote: +/* the semantic here actually puzzles me: +   how can haystack be const char * - yet the return value is char * +   after all, it points to a sub-string of haystack... */ Dunno if this is a question from the original