Iconv.list patch for NetBSD/Citrus

[email protected]@%$G$9!#e(B

NetBSD e$B$Ne(B Citrus iconv
e$B$GBP1~%(%s%3!<%G%#%s%0$N%j%9%[email protected]$k%Q%C%A$G$9!#e(B
e$B<BBN$He(B alias
e$B$,$4$C$A$c$K$J$C$F$$$^$9$,!"$=$l$G$b$=$l$J$j$N=u$1$K$O$J$ke(B
e$B$H;W$&$N$G$H$j$"$($:!#e(B

Index: ext/iconv/iconv.c

— ext/iconv/iconv.c (e$B%j%S%8%g%se(B 14101)
+++ ext/iconv/iconv.c (e$B:n6H%3%T!<e(B)
@@ -738,6 +738,24 @@
state = *(int *)args;
if (state) rb_jump_tag(state);
if (args[1]) return args[1];
+#elif defined(HAVE___ICONV_FREE_LIST)

  • char **list;
  • size_t sz, i;
  • VALUE ary;
  • if (__iconv_get_list(&list, &sz)) return Qnil;
  • ary = rb_ary_new2(sz);
  • for (i = 0; i < sz; i++) {
  •   rb_ary_push(ary, rb_str_new2(list[i]));
    
  • }
  • __iconv_free_list(list, sz);
  • if (!rb_block_given_p())
  •   return ary;
    
  • for (i = 0; i < RARRAY_LEN(ary); i++) {
  •   rb_yield(RARRAY_PTR(ary)[i]);
    
  • }
    #else
    rb_notimplement();
    #endif
    Index: ext/iconv/extconf.rb
    ===================================================================
    — ext/iconv/extconf.rb (e$B%j%S%8%g%se(B 14101)
    +++ ext/iconv/extconf.rb (e$B:n6H%3%T!<e(B)
    @@ -24,6 +24,7 @@
    $defs.push(’-DICONV_INPTR_CONST’)
    end
    have_func(“iconvlist”, “iconv.h”)
  • have_func("__iconv_free_list", “iconv.h”)
    if conf
    prefix = ‘$(srcdir)’
    prefix = $nmake ? “{#{prefix}}” : “#{prefix}/”

[email protected]$G$9!#e(B

At Wed, 5 Dec 2007 23:24:41 +0900,
NARUSE, Yui wrote in [ruby-dev:32468]:

NetBSD e$B$Ne(B Citrus iconv e$B$GBP1~%(%s%3!<%G%#%s%0$N%j%9%[email protected]$k%Q%C%A$G$9!#e(B
e$B<BBN$He(B alias e$B$,$4$C$A$c$K$J$C$F$$$^$9$,!"$=$l$G$b$=$l$J$j$N=u$1$K$O$J$ke(B
e$B$H;W$&$N$G$H$j$"$($:!#e(B

__e$B$G;O$^$C$F$$$k$"$?$j$,!">C$($?$j$7$J$$$+$A$g$C$HIT0B$J5$$b$7$^e(B
e$B$9$,!"F~$l$F$*$$$F$/[email protected]$5$$!#e(B

[email protected]@%$G$9!#e(B

Nobuyoshi N. wrote:

[email protected]$G$9!#e(B

At Wed, 5 Dec 2007 23:24:41 +0900,
NARUSE, Yui wrote in [ruby-dev:32468]:

NetBSD e$B$Ne(B Citrus iconv e$B$GBP1~%(%s%3!<%G%#%s%0$N%j%9%[email protected]$k%Q%C%A$G$9!#e(B
e$B<BBN$He(B alias e$B$,$4$C$A$c$K$J$C$F$$$^$9$,!"$=$l$G$b$=$l$J$j$N=u$1$K$O$J$ke(B
e$B$H;W$&$N$G$H$j$"$($:!#e(B

__e$B$G;O$^$C$F$$$k$"$?$j$,!">C$($?$j$7$J$$$+$A$g$C$HIT0B$J5$$b$7$^e(B
e$B$9$,!"F~$l$F$*$$$F$/[email protected]$5$$!#e(B

r14115 e$B$K$F%3%_%C%H$7$^$7$?!#e(B
e$B$J$e(B iconv.h
e$B$G$O0J2<$NDL$j$K$J$C$F$$$?$N$G!"<B83E
$H$$$&$h$j$O2DHB$8$ce(B
e$B$J$$$H$$$&0UL#$Ge(B__e$B;O$^$j$J$N$+$J$!$H;W$C$F$$$^$9!#e(B

/*

  • non-portable interfaces for iconv
    */
    int __iconv_get_list(char ***, size_t *);
    void __iconv_free_list(char **, size_t);
    size_t __iconv(iconv_t, const char **, size_t *, char **,
    size_t *, __uint32_t, size_t *);

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs