diff options
author | Yen-Ming Lee <leeym@FreeBSD.org> | 2003-05-07 02:19:56 +0000 |
---|---|---|
committer | Yen-Ming Lee <leeym@FreeBSD.org> | 2003-05-07 02:19:56 +0000 |
commit | a35ed2c4c47545f8054b70f69526900657b6cb3b (patch) | |
tree | 3ae7d61cfdf7b5f5aac3e5803dc3a17b4ebf1a3f /net/dictd/files | |
parent | unbreak by upgrade to 0.33 (diff) |
1. include <osreldate.h> before use macro __FreeBSD_version
2. unbreak chinese/dictd which is the slave port of net/dictd
PR: 48586
Submitted by: Kuang-che Wu <kcwu@kcwu.dyndns.org>
Approved by: maintainer timeout
Notes
Notes:
svn path=/head/; revision=80320
Diffstat (limited to 'net/dictd/files')
-rw-r--r-- | net/dictd/files/patch-break-utf8 | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/net/dictd/files/patch-break-utf8 b/net/dictd/files/patch-break-utf8 index 84e6dfa96e6d..33bf83184831 100644 --- a/net/dictd/files/patch-break-utf8 +++ b/net/dictd/files/patch-break-utf8 @@ -1,15 +1,16 @@ diff -ru ../dictd-freebsd/dictd.c ./dictd.c --- ../dictd-freebsd/dictd.c Sun Nov 24 09:35:55 2002 +++ ./dictd.c Sun Dec 1 22:29:55 2002 -@@ -662,6 +662,7 @@ +@@ -662,6 +662,8 @@ static void set_utf8_mode (const char *locale) { ++#include <osreldate.h> +#if __FreeBSD_version > 499999 char *locale_copy; locale_copy = strdup (locale); strlwr_8bit (locale_copy); -@@ -671,6 +672,9 @@ +@@ -671,6 +673,9 @@ strstr (locale_copy, "utf8"); free (locale_copy); @@ -22,17 +23,18 @@ diff -ru ../dictd-freebsd/dictd.c ./dictd.c diff -ru ../dictd-freebsd/index.c ./index.c --- ../dictd-freebsd/index.c Sun Dec 1 22:12:49 2002 +++ ./index.c Sun Dec 1 22:25:06 2002 -@@ -111,6 +111,9 @@ +@@ -111,6 +111,10 @@ const char *src, char *dest, int allchars_mode) { ++#include <osreldate.h> +#if __FreeBSD_version < 500000 + abort(); +#else wint_t ucs4_char; while (src && src [0]){ -@@ -130,6 +133,7 @@ +@@ -130,6 +134,7 @@ *dest = 0; return (src != NULL); @@ -40,7 +42,7 @@ diff -ru ../dictd-freebsd/index.c ./index.c } static void dict_table_init(void) -@@ -166,9 +170,11 @@ +@@ -166,9 +171,11 @@ p[i] = &s[2 * i]; } /* Sort those strings in the locale */ @@ -52,7 +54,7 @@ diff -ru ../dictd-freebsd/index.c ./index.c qsort(p, UCHAR_MAX + 1, sizeof(p[0]), dict_table_init_compare_strcoll); /* Extract our unordered arrays */ -@@ -1126,6 +1132,9 @@ +@@ -1126,6 +1133,9 @@ */ static int stranagram_utf8 (char *str) { @@ -73,12 +75,13 @@ diff -ru ../dictd-freebsd/index.c ./index.c diff -ru ../dictd-freebsd/utf8_ucs4.c ./utf8_ucs4.c --- ../dictd-freebsd/utf8_ucs4.c Sun Nov 24 09:35:55 2002 +++ ./utf8_ucs4.c Sun Dec 1 22:44:40 2002 -@@ -1,3 +1,4 @@ +@@ -1,3 +1,5 @@ ++#include <osreldate.h> +#if __FreeBSD_version > 499999 #include <wctype.h> #include <stdlib.h> #include <ctype.h> -@@ -210,3 +211,4 @@ +@@ -210,3 +212,4 @@ else return (size_t) -1; } @@ -86,12 +89,13 @@ diff -ru ../dictd-freebsd/utf8_ucs4.c ./utf8_ucs4.c diff -ru ../dictd-freebsd/utf8_ucs4.h ./utf8_ucs4.h --- ../dictd-freebsd/utf8_ucs4.h Sun Nov 24 09:35:55 2002 +++ ./utf8_ucs4.h Sun Dec 1 22:26:15 2002 -@@ -1,3 +1,4 @@ +@@ -1,3 +1,5 @@ ++#include <osreldate.h> +#if __FreeBSD_version > 499999 #ifndef _UTF8_UCS4_H_ #define _UTF8_UCS4_H_ -@@ -73,3 +74,4 @@ +@@ -73,3 +75,4 @@ __END_DECLS #endif // _UTF8_UCS4_H_ |