Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d709b1

Browse files
committed
Get rid of AMOEBA deps; add declaration of fmod() if __STDC__ is not defined.
1 parent 4c260ff commit 2d709b1

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Modules/mathmodule.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ extern int errno;
3535

3636
#include <math.h>
3737

38+
#ifndef __STDC__
39+
extern double fmod();
40+
#endif
41+
3842
#ifdef HUGE_VAL
3943
#define CHECK(x) if (errno != 0) ; \
4044
else if (-HUGE_VAL <= (x) && (x) <= HUGE_VAL) ; \
@@ -109,10 +113,7 @@ FUNC1(math_cosh, cosh)
109113
FUNC1(math_exp, exp)
110114
FUNC1(math_fabs, fabs)
111115
FUNC1(math_floor, floor)
112-
#ifndef AMOEBA
113-
/* XXX This one is not in the Amoeba library yet, so what the heck... */
114116
FUNC2(math_fmod, fmod)
115-
#endif
116117
FUNC1(math_log, log)
117118
FUNC1(math_log10, log10)
118119
#ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */
@@ -212,9 +213,7 @@ static struct methodlist math_methods[] = {
212213
{"exp", math_exp},
213214
{"fabs", math_fabs},
214215
{"floor", math_floor},
215-
#ifndef AMOEBA
216216
{"fmod", math_fmod},
217-
#endif
218217
{"frexp", math_frexp},
219218
{"ldexp", math_ldexp},
220219
{"log", math_log},

0 commit comments

Comments
 (0)