ports/net/dictd/files/patch-break-utf8
Dima Dorfman b02b794e5e Upgrade to 1.9.14
Submitted by:	Andy Miller <andy@trit.org>
2004-09-03 11:01:18 +00:00

33 lines
773 B
Text

--- index.c.orig Mon Jan 26 02:52:14 2004
+++ index.c Mon Jan 26 03:02:18 2004
@@ -144,9 +144,12 @@
p[i] = &s[2 * i];
}
/* Sort those strings in the locale */
+#include <osreldate.h>
+#if __FreeBSD_version > 499999
if (utf8_mode)
qsort(p, UCHAR_MAX + 1, sizeof(p[0]), dict_table_init_compare_utf8);
else
+#endif
qsort(p, UCHAR_MAX + 1, sizeof(p[0]), dict_table_init_compare_strcoll);
/* Extract our unordered arrays */
@@ -1245,6 +1248,9 @@
*/
static int stranagram_utf8 (char *str)
{
+#if __FreeBSD_version < 500000
+ abort();
+#else
size_t len;
char *p;
@@ -1267,6 +1273,7 @@
stranagram_8bit (str, -1);
return 1;
+#endif
}
#endif