avidyalalala / sunpinyin

Automatically exported from code.google.com/p/sunpinyin
0 stars 0 forks source link

对 FreeBSD 的支持 #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure CC=gcc44 CXX=g++44 --enable-xim --enable-ibus
--enable-static=no CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
2. gmake

What version of the product are you using? On what operating system?
sunpinyin 2.0.1
FreeBSD compaq.yuetime 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #3: Wed Jun  2
11:26:42 CDT 2010     root@compaq.yuetime:/usr/obj/usr/src/sys/HOUKAGO  amd64

目前已经能在 FreeBSD 
下成功编译,但改了很多东西。主要问题在:
1. configure 的时候无法匹配到 
FreeBSD,需要一个新的匹配项。我的做法是给
configure 的line5861
- *bsd|*linux*)      my_host_os=linux;;
+ *bsd*|*linux*)      my_host_os=linux;;
2. log2 函数不可用。这样:
--- linux.h.old 2010-06-03 15:01:38.302665453 -0500
+++ linux.h     2010-06-03 15:07:00.700383599 -0500
@@ -42,4 +42,10 @@

 typedef char* TIConvSrcPtr;

+#ifndef HAVE_LOG2
+    inline double log2(double v)    { return (log(v) / log(2)); }
+#else
+    extern "C" double log2(double);
+#endif /* !HAVE_LOG2 */
+
 #endif
3. 对于所有的 iconv() 调用,第二个参数不支持 char** -> const 
char** 的自动
convert;这可能是gcc4的限制。我对每个 iconv() 调用都做了cast: 
(const char**)

Original issue reported on code.google.com by solo.l...@gmail.com on 3 Jun 2010 at 8:12

GoogleCodeExporter commented 9 years ago
@solo.lich,我想可以加一个bsd.h在src/config目录下,让configure匹�
��到bsd时,去link bsd.h ...

Original comment by find...@gmail.com on 4 Jun 2010 at 3:59

GoogleCodeExporter commented 9 years ago
Issue 31 has been merged into this issue.

Original comment by tchai...@gmail.com on 6 Jun 2010 at 6:09

GoogleCodeExporter commented 9 years ago
should have been fixed by Mike :)

Original comment by find...@gmail.com on 2 Sep 2010 at 1:49