1
0
mirror of https://github.com/git/git.git synced 2024-09-29 05:01:36 +02:00
git/compat
René Scharfe b21b9f1de3 add memmem()
memmem() is a nice GNU extension for searching a length limited string
in another one.

This compat version is based on the version found in glibc 2.2 (GPL 2);
I only removed the optimization of checking the first char by hand, and
generally tried to keep the code simple.  We can add it back if memcmp
shows up high in a profile, but for now I prefer to keep it (almost
trivially) simple.

Since I don't really know which platforms beside those with a glibc
have their own memmem(), I used a heuristic: if NO_STRCASESTR is set,
then NO_MEMMEM is set, too.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-06 22:46:00 -07:00
..
hstrerror.c Add a local implementation of hstrerror for the system which do not have it 2007-06-15 22:48:34 -07:00
inet_ntop.c compat/inet_ntop: do not use u_int 2006-12-20 13:45:55 -08:00
inet_pton.c Cleaned up git-daemon virtual hosting support. 2006-09-27 18:00:52 -07:00
memmem.c add memmem() 2007-09-06 22:46:00 -07:00
mmap.c War on whitespace 2007-06-07 00:04:01 -07:00
pread.c Replacing the system call pread() with lseek()/xread()/lseek() sequence. 2007-01-09 16:40:40 -08:00
setenv.c simplify inclusion of system header files. 2006-12-20 09:51:35 -08:00
strcasestr.c Clean up compatibility definitions. 2005-12-05 15:50:29 -08:00
strlcpy.c simplify inclusion of system header files. 2006-12-20 09:51:35 -08:00
strtoumax.c Add a compat/strtoumax.c for Solaris 8. 2007-02-19 18:20:30 -08:00
unsetenv.c simplify inclusion of system header files. 2006-12-20 09:51:35 -08:00