[Anthy-dev 212] Re: uim 0.0.3 released

Zurück zum Archiv-Index

KIHARA Hideto deton****@m1*****
2003年 9月 5日 (金) 22:47:39 JST


> *libuim
>  - gcc 2.95でのコンパイルエラーを修正

コンパイルが通ることを確認しました。修正ありがとうございます。
ただ、uim/uim-helper-server.cで出るようになりました。
パッチを末尾につけます。

> *xim server
>  - NetBSD(gcc 2.95?)でのコンパイルエラーを修正

これはまだ出ました。
少し調べたところ、Xutil.hでXlib.hを#includeするようになったのは、
XFree86 4.1.0以降のようです。
http://cvsweb.xfree86.org/cvsweb/xc/lib/X11/Xutil.h.diff?r1=3.2&r2=3.3
で、NetBSD 1.6.1のXはi386プラットフォームは4.2.0ですが、
それ以外は3.3.6ベースのようなので、
Xlib.hを#includeする前にXutil.hを#includeするとエラーが出るようです。

>  ただ、変数の宣言に関してはC99がでてもう数年経ちますし、大体の環境で
> C99に対応しているなら、自由な位置で宣言したいと思っています。
>  私はBSD方面についてはよく知らないのですが、BSD方面ではまだC99に対応し
> ていないコンパイラの方が標準的なのでしょうか?もしそうなのであれば、まだ

*BSDとLinuxのいくつかの環境で採用されている
gccのバージョンをWebで少し調べてみました。
個人的にはまだ少し時期尚早かな、という印象を受けました。
# もちろん、ほとんどの環境で後からgcc3を入れるのは可能だと思いますが。
gcc 2.95で-std=c9xを指定したりしてみましたが状況は変わらないようです。

* 凡例
<gccのバージョン> <環境>
<参考URL>

* C99未対応
2.95.4 FreeBSD/i386 4.7-RELEASE
http://www.freebsd.org/releases/4.7R/relnotes-i386.html#AEN165

2.95.3 NetBSD 1.6
http://www.netbsd.org/Releases/formal-1.6/NetBSD-1.6.html

2.95.3 OpenBSD 3.3
http://www.openbsd.org/33.html#new

2.95.4 Debian GNU/Linux (安定版) 3.0
http://packages.debian.org/stable/devel/gcc.html

2.95.3 Vine Linux 2.6
http://www.t.ring.gr.jp/pub/linux/Vine/Vine-2.6/i386/Vine/RPMS/

2.95 Plamo 3.2
http://itpro.nikkeibp.co.jp/linux/backnum/200308/plamo.shtml

2.95.3 MIRACLE LINUX Standard Edition V2.1
http://www.miraclelinux.com/products/product_info/se21/releasenote/index.htm

* C99対応(gcc 2.96(?)以降)
3.2.2 FreeBSD/i386 5.1-RELEASE
http://www.freebsd.org/releases/5.1R/relnotes-i386.html#CONTRIB

3.2.1 Red Hat Linux 9
http://www.jp.redhat.com/products/Community/RHL9/

3.3 Debian GNU/Linux (テスト版)
http://packages.debian.org/testing/devel/gcc.html

2.96 Turbolinux 8 workstation
http://www.turbolinux.co.jp/products/workstation/tl8w/

3.2.2 Gentoo Linux 1.4
http://www.gentoo.org/main/en/about.xml

3.2.2 Slackware Linux 9.0
http://www.slackware.org/announce/9.0.php

3.3 SuSE Linux 8.2
http://www.suse.com/us/private/products/suse_linux/i386/new_features.html

3.2.2 Mandrake Linux 9.1
http://www.linux-mandrake.com/en/features.php3

3.2.2 Linux MLD 7
http://www.mlb.co.jp/linux/mld7.html#pakage


* FreeBSD/i386 4.6.2-RELEASEとNetBSD/hpcarm 1.6Uで
コンパイルを通すために変更した点。
以下の変更点以外に、xim/MakefileのCPPFLAGSに-I/usr/X11R6/includeを追加。

## <sys/socket.h>で使っているu_charの定義が<sys/types.h>にあるので、
## <sys/types.h>を先に#include。(FreeBSD 4.6.2)
diff -ur uim-0.0.3.orig/uim/uim-helper-client.c uim-0.0.3/uim/uim-helper-client.c
--- uim-0.0.3.orig/uim/uim-helper-client.c	Mon Sep  1 16:33:43 2003
+++ uim-0.0.3/uim/uim-helper-client.c	Fri Sep  5 22:21:21 2003
@@ -1,5 +1,5 @@
-#include <sys/socket.h>
 #include <sys/types.h>
+#include <sys/socket.h>
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <netdb.h>
diff -ur uim-0.0.3.orig/uim/uim-helper-server.c uim-0.0.3/uim/uim-helper-server.c
--- uim-0.0.3.orig/uim/uim-helper-server.c	Wed Sep  3 02:50:29 2003
+++ uim-0.0.3/uim/uim-helper-server.c	Fri Sep  5 22:23:40 2003
@@ -1,5 +1,5 @@
-#include <sys/socket.h>
 #include <sys/types.h>
+#include <sys/socket.h>
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <netdb.h>
@@ -210,8 +210,9 @@
 main(int argc, char **argv)
 {
   char *path = uim_helper_get_pathname();
+  int serv_fd;
   unlink(path);
-  int serv_fd = init_serv_fd(path);
+  serv_fd = init_serv_fd(path);
 
   if (serv_fd < 0) {
     //    printf("Failed to init unix domain socket\n");

## timevalが未定義でエラーになるので、<sys/time.h>を#include
diff -ur uim-0.0.3.orig/uim/uim-helper.c uim-0.0.3/uim/uim-helper.c
--- uim-0.0.3.orig/uim/uim-helper.c	Tue Sep  2 01:04:16 2003
+++ uim-0.0.3/uim/uim-helper.c	Fri Sep  5 22:17:59 2003
@@ -1,6 +1,7 @@
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <netdb.h>

## Xutil.hの前にXlib.hが#includeされるように。
diff -ur uim-0.0.3.orig/xim/ximserver.cpp uim-0.0.3/xim/ximserver.cpp
--- uim-0.0.3.orig/xim/ximserver.cpp	2003-09-05 03:13:16.000000000 +0900
+++ uim-0.0.3/xim/ximserver.cpp	2003-09-05 21:23:28.000000000 +0900
@@ -1,9 +1,9 @@
 #include <ctype.h>
 #include <X11/Xatom.h>
-#include <X11/Xutil.h>
 #include "xim.h"
 #include "convdisp.h"
 #include "ximserver.h"
+#include <X11/Xutil.h>
 
 #ifndef __GNUC__
 # ifdef HAVE_ALLOCA_H



Anthy-dev メーリングリストの案内
Zurück zum Archiv-Index