[Gauche-devel-jp] IPv6サポートへ向けて

Back to archive index

Kimura Fuyuki fuyuk****@hadal*****
2003年 5月 5日 (月) 09:01:43 JST


忘れ物さらに発見。

ai_protocol に必要な定数が出ていませんでした。こんな感じでお願いします。
(sockopt の定数も export しておいたほうがいいと思います)

Index: ext/net/net.scm
===================================================================
RCS file: /cvsroot/gauche/Gauche/ext/net/net.scm,v
retrieving revision 1.17
diff -u -r1.17 net.scm
--- ext/net/net.scm	4 May 2003 10:05:49 -0000	1.17
+++ ext/net/net.scm	4 May 2003 23:58:04 -0000
@@ -37,6 +37,9 @@
 
 (dynamic-load "libnet" :export-symbols #t)
 
+(export-if-defined
+ |IPPROTO_IP| |IPPROTO_ICMP| |IPPROTO_TCP| |IPPROTO_UDP| |IPPROTO_IPV6|)
+
 (define ipv6-capable (symbol-bound? 'sys-getaddrinfo))
 
 (if ipv6-capable
Index: ext/net/netlib.stub
===================================================================
RCS file: /cvsroot/gauche/Gauche/ext/net/netlib.stub,v
retrieving revision 1.21
diff -u -r1.21 netlib.stub
--- ext/net/netlib.stub	4 May 2003 10:05:49 -0000	1.21
+++ ext/net/netlib.stub	5 May 2003 00:00:42 -0000
@@ -99,6 +99,11 @@
 (define-enum SOCK_DGRAM)
 (define-enum SOCK_RAW)
 
+(if "defined IPPROTO_IP" (define-enum IPPROTO_IP))
+(if "defined IPPROTO_ICMP" (define-enum IPPROTO_ICMP))
+(if "defined IPPROTO_TCP" (define-enum IPPROTO_TCP))
+(if "defined IPPROTO_UDP" (define-enum IPPROTO_UDP))
+
 (define-cproc socket-address (sock::<socket>)
   "  if (sock->address) { SCM_RETURN(SCM_OBJ(sock->address)); }
   else { SCM_RETURN(SCM_FALSE); }")

-- 
木村 冬樹



Gauche-devel-jp メーリングリストの案内
Back to archive index