ldap/servers/slapd/utf8compare.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 1e00913312e165ead2f3a25b6d70f7839115007e
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Sun Mar 9 22:34:52 2014 -0700
Ticket #47734 - Change made in resolving ticket #346 fails on Debian SPARC64
Description: The following change is not generic beyond x86 and
x86_64 architecture. Putting the change into "#if (defined(CPU_x86)
|| defined(CPU_x86_64))".
commit c0151f78509c35250095da6e2785842337963008
Trac Ticket #346 - Slow ldapmodify operation time for large
quantities of multi-valued attribute values
3) In slapi_has8thBit, instead of checking the 8th bit one byte
by one byte, check 4 bytes at one time.
https://fedorahosted.org/389/ticket/47734
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!!)
diff --git a/ldap/servers/slapd/utf8compare.c b/ldap/servers/slapd/utf8compare.c
index e336ccb..d2dd83e 100644
--- a/ldap/servers/slapd/utf8compare.c
+++ b/ldap/servers/slapd/utf8compare.c
@@ -60,6 +60,7 @@ typedef struct sUpperLowerTbl {
int
slapi_has8thBit(unsigned char *s)
{
+#if (defined(CPU_x86) || defined(CPU_x86_64))
#define MY8THBITWIDTH 4 /* sizeof(PRUint32) */
#define MY8THBITFILTER 0x80808080
unsigned char *p, *stail, *ltail;
@@ -73,14 +74,20 @@ slapi_has8thBit(unsigned char *s)
return 1;
}
}
- for (; p < ltail; p++) {
+#undef MY8THBITWIDTH
+#undef MY8THBITFILTER
+ for (; p < ltail; p++)
+#else
+ unsigned char *p, *tail;
+ tail = s + strlen((char *)s);
+ for (p = s; p < tail; p++)
+#endif
+ {
if (0x80 & *p) {
return 1;
}
}
return 0;
-#undef MY8THBITWIDTH
-#undef MY8THBITFILTER
}
/*