]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.31: Re: Problems with LilyPond
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 30 Apr 2000 13:18:32 +0000 (15:18 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 30 Apr 2000 13:18:32 +0000 (15:18 +0200)
flower/include/libc-extension.hh
flower/libc-extension.cc

index 76a6d7fc47cd161538af4eb7716d8d359b85a4f1..06485629e78fd8c1408526a5c7e990fa4702d962 100644 (file)
@@ -19,8 +19,8 @@ char* strnlwr (char* start_l ,int n);
 char* strnupr (char* start_l, int n);
 
 #if !HAVE_MEMMEM               // GNU extension.
-Byte *memmem (Byte const * haystack, int haystack_len,
-            Byte const *needle, int needle_len);
+void *memmem (void const * haystack, int haystack_len,
+            void const *needle, int needle_len);
 #endif HAVE_MEMMEM
 
 #if !HAVE_SNPRINTF             // GNU extension.
index 7fa57c2ff5a36e3402ad31c0c80b1e32955982f7..a06704b1823d9c7f5dfb3dfc523f747e93b20955 100644 (file)
@@ -48,7 +48,7 @@ strnupr (char* start_l, int n)
   Manual v1.15, but it is with /usr/include/string.h   */
 
 Byte *
-memmem (Byte const *haystack, int haystack_len,
+_memmem (Byte const *haystack, int haystack_len,
        Byte const *needle,int needle_len)
 {
   Byte const * end_haystack = haystack + haystack_len - needle_len + 1;
@@ -72,6 +72,15 @@ memmem (Byte const *haystack, int haystack_len,
   return 0;
 }
 
+void *
+memmem (void const *haystack, int haystack_len,
+       void const *needle,int needle_len)
+{
+  Byte const* haystack_byte_c_l = (Byte const*)haystack;
+  Byte const* needle_byte_c_l = (Byte const*)needle;
+  return _memmem (haystack_byte_c_l, haystack_len, needle_byte_c_l, needle_len);
+}
+
 #endif
 
 Byte *