commit 5d1d68e202770f3a59cef999bc11d534a2364d5f Author: Karl Williamson <public@khwilliamson.com> Date: Mon Dec 24 08:56:22 2012 -0700 Perl_instr() implement with libc equivalent. C89 libc contains the strstr() function that does the same thing as instr(). Convert to use it under the assumption that it is faster than our code, and is less for us to maintain. Because early versions of Lunix libc had a bug when the 'little' argument was NULL (fixed in late 1994), check for that explicitly. If we were willing to ignore issues with such old libc versions, or if we had a Configure probe that tested for the bug, we could replace the macro instr() completely with a call to strstr(). The memmem() GNU extension does the same thing as Perl_ninstr(). It however has bugs in much later libc versions. A Configure probe could be written to see if it is usable.