From: Jan Nieuwenhuizen Date: Sun, 30 Apr 2000 13:18:32 +0000 (+0200) Subject: patch::: 1.3.31: Re: Problems with LilyPond X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b5194a24d2f93819cec310193d5b404e674a66ae;p=lilypond.git patch::: 1.3.31: Re: Problems with LilyPond --- diff --git a/flower/include/libc-extension.hh b/flower/include/libc-extension.hh index 76a6d7fc47..06485629e7 100644 --- a/flower/include/libc-extension.hh +++ b/flower/include/libc-extension.hh @@ -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. diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index 7fa57c2ff5..a06704b182 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -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 *