Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Feb 2003 16:16:42 +0800 (CST)
From:      Kuang-che Wu <kcwu@kcwu.dyndns.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/48586: [PATCH] net/dictd UTF8 support broken
Message-ID:  <200302230816.h1N8Gg9f080236@kcwu.dyndns.org>

next in thread | raw e-mail | index | archive | help

>Number:         48586
>Category:       ports
>Synopsis:       [PATCH] net/dictd UTF8 support broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 23 00:20:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Kuang-che Wu
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD m722 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Fri Jan 24 17:19:52 CST 2003 root@m722:/usr/obj/usr/src/sys/M722 i386


	
>Description:
	Previous patch (files/patch-break-utf8) forget to include <osreldate.h>
	for macro __FreeBSD_version

	
>How-To-Repeat:
	
>Fix:
diff -ur dictd.old/files/patch-break-utf8 dictd/files/patch-break-utf8
--- dictd.old/files/patch-break-utf8	Sun Feb 23 15:56:21 2003
+++ dictd/files/patch-break-utf8	Sun Feb 23 15:53:29 2003
@@ -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/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 @@
  }
  
  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 @@
  	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/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.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_
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302230816.h1N8Gg9f080236>