strcasestr improvement proposal

Olivier Langlois olivier.langlois@streamtheworld.com
Thu Jun 7 18:23:00 GMT 2007


Hi,

I have removed the ANSI C standard violation where a pointer was decremented
in front of an array. As a bonus, it might have removed few pointer
operations per call depending of the input. I did these changes on top of
Jose Da Silva modifs that for some reasons have never been added to glibc.
(I have reviewed his changes and this is effectively an optimization). I
have not recompiled glibc but I have tested the changes outside the lib
successfully.

Greetings,
Olivier Langlois
http://www.streamtheworld.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: strcasestr_glibc_patch
Type: application/octet-stream
Size: 4175 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070607/42983aad/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst-strcasestr.c
Type: application/octet-stream
Size: 5471 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070607/42983aad/attachment-0001.obj>


More information about the Libc-alpha mailing list