From 772f4e6a1be0e3fbd8c4e9edacf1887269f598dc Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 22 Jun 2009 20:38:41 -0700 Subject: Add SSE4.2 support for strcmp and strncmp on x86-64. --- string/strncmp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'string') diff --git a/string/strncmp.c b/string/strncmp.c index 1adb2c0ebd..bb0cbfdf65 100644 --- a/string/strncmp.c +++ b/string/strncmp.c @@ -21,15 +21,16 @@ #undef strncmp +#ifndef STRNCMP +#define STRNCMP strncmp +#endif + /* Compare no more than N characters of S1 and S2, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ int -strncmp (s1, s2, n) - const char *s1; - const char *s2; - size_t n; +STRNCMP (const char *s1, const char *s2, size_t n) { unsigned reg_char c1 = '\0'; unsigned reg_char c2 = '\0'; @@ -70,4 +71,5 @@ strncmp (s1, s2, n) return c1 - c2; } -libc_hidden_builtin_def (strncmp) + +libc_hidden_builtin_def (STRNCMP) -- cgit v1.2.3