mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-14 06:28:17 +03:00
tilegx: fix strstr to build and link better
The two_way_short_needle() routine included from str-two-way.h is not used, so mark it so to avoid compiler warnings. Calling strnlen() breaks linknamespace tests, so change it to __strnlen().
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2014-12-19 Chris Metcalf <cmetcalf@ezchip.com>
|
||||||
|
|
||||||
|
* sysdeps/tile/tilegx/strstr.c (STRSTR): Call __strnlen, not
|
||||||
|
strnlen.
|
||||||
|
|
||||||
2014-12-19 Ondřej Bílka <neleai@seznam.cz>
|
2014-12-19 Ondřej Bílka <neleai@seznam.cz>
|
||||||
|
|
||||||
* string/strncat.c (STRNCAT): Simplify implementation.
|
* string/strncat.c (STRNCAT): Simplify implementation.
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
(!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
|
(!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
|
||||||
&& ((h_l) = (j) + (n_l)))
|
&& ((h_l) = (j) + (n_l)))
|
||||||
#include "str-two-way.h"
|
#include "str-two-way.h"
|
||||||
|
typeof(two_way_short_needle) two_way_short_needle __attribute__((unused));
|
||||||
|
|
||||||
#undef strstr
|
#undef strstr
|
||||||
|
|
||||||
@@ -238,7 +239,7 @@ STRSTR (const char *haystack_start, const char *needle_start)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fail if NEEDLE is longer than HAYSTACK. */
|
/* Fail if NEEDLE is longer than HAYSTACK. */
|
||||||
if (strnlen (haystack, needle_len) < needle_len)
|
if (__strnlen (haystack, needle_len) < needle_len)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Perform the search. Abstract memory is considered to be an array
|
/* Perform the search. Abstract memory is considered to be an array
|
||||||
|
Reference in New Issue
Block a user