Skip to content

Commit

Permalink
* missing/lgamma_r.c (lgamma_r): some compilers don't permit dividing
Browse files Browse the repository at this point in the history
	  by literal 0.0. use const variable instead.

	* {bcc32,win32,wince}/Makefile.sub (MISSING): add lgamma_r.obj and
	  tgamma.obj.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Feb 7, 2008
1 parent 58f7adb commit 4cd86db
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Thu Feb 7 11:11:02 2008 NAKAMURA Usaku <[email protected]>

* missing/lgamma_r.c (lgamma_r): some compilers don't permit dividing
by literal 0.0. use const variable instead.

* {bcc32,win32,wince}/Makefile.sub (MISSING): add lgamma_r.obj and
tgamma.obj.

Thu Feb 7 10:39:21 2008 Tanaka Akira <[email protected]>

* math.c (math_gamma): new method Math.gamma.
Expand Down
4 changes: 2 additions & 2 deletions bcc32/Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ EXTLIBS =
MEMLIB =
!endif
LIBS = $(MEMLIB) cw32i.lib import32.lib ws2_32.lib $(EXTLIBS)
MISSING = acosh.obj crypt.obj erf.obj strlcat.obj strlcpy.obj win32.obj
MISSING = acosh.obj crypt.obj erf.obj lgamma_r.obj strlcat.obj strlcpy.obj tgamma.obj win32.obj

!ifndef STACK
STACK = 0x2000000
Expand Down Expand Up @@ -393,7 +393,7 @@ s,@LN_S@,$(LN_S),;t t
s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t
s,@RM@,$$(top_srcdir:/=\)\win32\rm.bat,;t t
s,@CP@,copy > nul,;t t
s,@LIBOBJS@, acosh.obj crypt.obj erf.obj strlcat.obj strlcpy.obj win32.obj,;t t
s,@LIBOBJS@, $(MISSING),;t t
s,@ALLOCA@,$(ALLOCA),;t t
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
s,@EXEEXT@,.exe,;t t
Expand Down
3 changes: 2 additions & 1 deletion missing/lgamma_r.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ lgamma_r(double x, int *signp)
double i, f, s;
f = modf(-x, &i);
if (f == 0.0) {
static const double zero = 0.0;
*signp = 1;
return 1.0/0.0;
return 1.0/zero;
}
*signp = (fmod(i, 2.0) != 0.0) ? 1 : -1;
s = sin(PI * x);
Expand Down
4 changes: 2 additions & 2 deletions win32/Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ EXTLIBS =
LIBS = oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib $(EXTLIBS)
!endif
!if !defined(MISSING)
MISSING = acosh.obj crypt.obj erf.obj strlcpy.obj strlcat.obj win32.obj
MISSING = acosh.obj crypt.obj erf.obj lgamma_r.obj strlcpy.obj strlcat.obj tgamma.obj win32.obj
!endif

ARFLAGS = -machine:$(MACHINE) -out:
Expand Down Expand Up @@ -251,7 +251,7 @@ INSTALLED_LIST= .installed.list
WINMAINOBJ = winmain.$(OBJEXT)
!endif
MINIOBJS = dmydln.$(OBJEXT) dmyencoding.$(OBJEXT) dmytranscode.$(OBJEXT) miniprelude.$(OBJEXT)
LIBOBJS = acosh.obj crypt.obj erf.obj strlcpy.obj strlcat.obj win32.obj $(LIBOBJS)
LIBOBJS = $(MISSING) $(LIBOBJS)

!ifndef COMMON_LIBS
COMMON_LIBS = m
Expand Down
3 changes: 2 additions & 1 deletion wince/Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ XLDFLAGS = -stack:$(STACK) -subsystem:$(SUBSYSTEM)
!endif
LIBS = coredll.lib ceshell.lib winsock.lib $(EXTLIBS)
MISSING = acosh.obj crypt.obj dup2.obj erf.obj hypot.obj \
isinf.obj isnan.obj strftime.obj strlcat.obj strlcpy.obj win32.obj \
isinf.obj isnan.obj lgamma.obj strftime.obj strlcat.obj strlcpy.obj
tgamma.obj win32.obj \
assert.obj direct.obj errno.obj io_wce.obj process_wce.obj \
signal_wce.obj stdio.obj stdlib.obj string_wce.obj \
time_wce.obj wince.obj winsock2.obj \
Expand Down

0 comments on commit 4cd86db

Please sign in to comment.