Code

Give proper prototype to gitstrcasestr.
authorJunio C Hamano <junkio@cox.net>
Sat, 8 Oct 2005 21:54:41 +0000 (14:54 -0700)
committerJunio C Hamano <junkio@cox.net>
Sat, 8 Oct 2005 21:54:41 +0000 (14:54 -0700)
Borrow from NO_MMAP patch by Johannes, squelch compiler warnings by
declaring gitstrcasestr() when we use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile
mailinfo.c

index 92f0bda5e785aaff667c82c6a07776197bd24e4e..b8ca504f095a68ef929af92127b1197c53120a6b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -246,7 +246,7 @@ ifdef NEEDS_NSL
        SIMPLE_LIB += -lnsl
 endif
 ifdef NO_STRCASESTR
-       DEFINES += -Dstrcasestr=gitstrcasestr
+       DEFINES += -Dstrcasestr=gitstrcasestr -DNO_STRCASESTR=1
        LIB_OBJS += compat/strcasestr.o
 endif
 
index df470bb9c2296d32e3b1d2b7489c712b01c3b0ed..cb853df993f37d74576e308008379d709361a447 100644 (file)
@@ -9,6 +9,10 @@
 #include <ctype.h>
 #include <iconv.h>
 
+#ifdef NO_STRCASESTR
+extern char *gitstrcasestr(const char *haystack, const char *needle);
+#endif
+
 static FILE *cmitmsg, *patchfile;
 
 static int keep_subject = 0;