Lgamma_r requires _REENTRANT on Solaris

e$B1sF#$H?=$7$^$9!#e(B

Solaris e$B$Ge(B lgamma_r e$B$r;H$&$?$a$K$Oe(B _REENTRANT
e$B%^%/%[email protected]@$9$ke(B
e$BI,MW$,$"$k$h$&$G$9!#8=>u$G$O0EL[[email protected]@$K$h$C$FJV$jCM$,e(B int
e$B$Ke(B
e$B$J$C$F$$$k$h$&$G!"7k2LE*$K4V0c$C$?Ez$($,JV$5$l$F$$$^$9!#e(B

$ ./ruby -ve ‘p Math.gamma(-1.5)’
ruby 1.9.0 (2008-03-16 revision 15786) [sparc-solaris2.9]
1.0

$ ./configure CFLAGS="-D_REENTRANT" …
$ make
$ ./ruby -ve ‘p Math.gamma(-1.5)’
ruby 1.9.0 (2008-03-16 revision 15786) [sparc-solaris2.9]
2.36327180120735

$ gcc -Wall -g -O2 -I.ext/include/sparc-solaris2.9 -I./include
-DRUBY_EXPORT -o tgamma.o -c ./missing/tgamma.c
./missing/tgamma.c: In function tgamma': ./missing/tgamma.c:27: warning: unused variablesign’
./missing/tgamma.c:36: warning: implicit declaration of function
`lgamma_r’

$ gcc -Wall -g -O2 -I.ext/include/sparc-solaris2.9 -I./include
-DRUBY_EXPORT -D_REENTRANT -o tgamma.o -c ./missing/tgamma.c
./missing/tgamma.c: In function tgamma': ./missing/tgamma.c:27: warning: unused variablesign’

e$B%Q%C%1!<%8%s%[email protected]$1!#e(B

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

At Mon, 17 Mar 2008 01:59:25 +0900,
Yusuke ENDOH wrote in [ruby-dev:34068]:

Solaris e$B$Ge(B lgamma_r e$B$r;H$&$?$a$K$Oe(B _REENTRANT e$B%^%/%[email protected]@$9$ke(B
e$BI,MW$,$"$k$h$&$G$9!#8=>u$G$O0EL[[email protected]@$K$h$C$FJV$jCM$,e(B int e$B$Ke(B
e$B$J$C$F$$$k$h$&$G!"7k2LE*$K4V0c$C$?Ez$($,JV$5$l$F$$$^$9!#e(B

pthreade$B$,8+IU$+$l$P!“e(B_THREAD_SAFEe$B$J$I$H$H$b$KDj5A$5$l$k$O$:$J$se(B
e$B$G$9$,!”$5$l$F$^$;$s$+!#e(B

e$B1sF#$G$9!#e(B

08/03/17 e$B$Ke(B Nobuyoshi N.[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

At Mon, 17 Mar 2008 01:59:25 +0900,
Yusuke ENDOH wrote in [ruby-dev:34068]:

Solaris e$B$Ge(B lgamma_r e$B$r;H$&$?$a$K$Oe(B _REENTRANT e$B%^%/%[email protected]@$9$ke(B
e$BI,MW$,$"$k$h$&$G$9!#8=>u$G$O0EL[[email protected]@$K$h$C$FJV$jCM$,e(B int e$B$Ke(B
e$B$J$C$F$$$k$h$&$G!"7k2LE*$K4V0c$C$?Ez$($,JV$5$l$F$$$^$9!#e(B

pthreade$B$,8+IU$+$l$P!“e(B_THREAD_SAFEe$B$J$I$H$H$b$KDj5A$5$l$k$O$:$J$se(B
e$B$G$9$,!”$5$l$F$^$;$s$+!#e(B

e$B$5$l$F$^$7$?!#e(B
#include e$B$N=gHV$rJQ$($?$i$A$c$s$HF0$/$h$&$K$J$j$^$7$?!#e(B

Index: missing/tgamma.c

— missing/tgamma.c (revision 15790)
+++ missing/tgamma.c (working copy)
@@ -9,9 +9,9 @@
/***********************************************************
gamma.c – Gamma function
***********************************************************/
+#include “ruby/config.h”
#include <math.h>
#include <errno.h>
-#include “ruby/config.h”

#ifdef HAVE_LGAMMA_R

In article
removed_em[email protected],
“Yusuke ENDOH” [email protected] writes:

pthreade$B$,8+IU$+$l$P!“e(B_THREAD_SAFEe$B$J$I$H$H$b$KDj5A$5$l$k$O$:$J$se(B
e$B$G$9$,!”$5$l$F$^$;$s$+!#e(B

e$B$5$l$F$^$7$?!#e(B
#include e$B$N=gHV$rJQ$($?$i$A$c$s$HF0$/$h$&$K$J$j$^$7$?!#e(B

e$B$&$%$`!#%3%_%C%H$7$F$/[email protected]$5$$!#e(B

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