1 Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
2 doesn't define __mempcpy only mempcpy. Since both uclibc and glibc have
3 mempcpy we'll just use that instead.
5 Index: grep-2.5.1/intl/localealias.c
6 ===================================================================
7 --- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100
8 +++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000
10 # define strcasecmp __strcasecmp
13 -# define mempcpy __mempcpy
14 +# error "mempcpy not detected"
16 # define HAVE_MEMPCPY 1
17 # define HAVE___FSETLOCKING 1
18 Index: grep-2.5.1/lib/getopt.c
19 ===================================================================
20 --- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100
21 +++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000
23 nonoption_flags_len = nonoption_flags_max_len = 0;
26 - memset (__mempcpy (new_str, __getopt_nonoption_flags,
27 + memset (mempcpy (new_str, __getopt_nonoption_flags,
28 nonoption_flags_max_len),
29 '\0', top + 1 - nonoption_flags_max_len);
30 nonoption_flags_max_len = top + 1;
32 if (__getopt_nonoption_flags == NULL)
33 nonoption_flags_max_len = -1;
35 - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
36 + memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
37 '\0', nonoption_flags_max_len - len);
40 Index: grep-2.5.1/lib/regex.c
41 ===================================================================
42 --- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000
43 +++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000
45 if (msg_size > errbuf_size)
47 #if defined HAVE_MEMPCPY || defined _LIBC
48 - *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
49 + *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
51 memcpy (errbuf, msg, errbuf_size - 1);
52 errbuf[errbuf_size - 1] = 0;