Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [licensing] |
| 2 | |
| 3 | # Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which |
| 4 | # doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have |
| 5 | # mempcpy, we'll just use that instead. |
| 6 | # Patch source: OpenEmbedded |
| 7 | |
| 8 | Index: grep-2.5.1/intl/localealias.c |
| 9 | =================================================================== |
| 10 | --- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100 |
| 11 | +++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000 |
| 12 | @@ -65,7 +65,7 @@ |
| 13 | # define strcasecmp __strcasecmp |
| 14 | |
| 15 | # ifndef mempcpy |
| 16 | -# define mempcpy __mempcpy |
| 17 | +# error "mempcpy not detected" |
| 18 | # endif |
| 19 | # define HAVE_MEMPCPY 1 |
| 20 | # define HAVE___FSETLOCKING 1 |
| 21 | Index: grep-2.5.1/lib/getopt.c |
| 22 | =================================================================== |
| 23 | --- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100 |
| 24 | +++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000 |
| 25 | @@ -326,7 +326,7 @@ |
| 26 | nonoption_flags_len = nonoption_flags_max_len = 0; |
| 27 | else |
| 28 | { |
| 29 | - memset (__mempcpy (new_str, __getopt_nonoption_flags, |
| 30 | + memset (mempcpy (new_str, __getopt_nonoption_flags, |
| 31 | nonoption_flags_max_len), |
| 32 | '\0', top + 1 - nonoption_flags_max_len); |
| 33 | nonoption_flags_max_len = top + 1; |
| 34 | @@ -437,7 +437,7 @@ |
| 35 | if (__getopt_nonoption_flags == NULL) |
| 36 | nonoption_flags_max_len = -1; |
| 37 | else |
| 38 | - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), |
| 39 | + memset (mempcpy (__getopt_nonoption_flags, orig_str, len), |
| 40 | '\0', nonoption_flags_max_len - len); |
| 41 | } |
| 42 | } |
| 43 | Index: grep-2.5.1/lib/regex.c |
| 44 | =================================================================== |
| 45 | --- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000 |
| 46 | +++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000 |
| 47 | @@ -7842,7 +7842,7 @@ |
| 48 | if (msg_size > errbuf_size) |
| 49 | { |
| 50 | #if defined HAVE_MEMPCPY || defined _LIBC |
| 51 | - *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; |
| 52 | + *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; |
| 53 | #else |
| 54 | memcpy (errbuf, msg, errbuf_size - 1); |
| 55 | errbuf[errbuf_size - 1] = 0; |