Skip to content

Commit 8d0843a

Browse files
committed
Merge pull request #85 from NuxiNL/remove-extensions
Remove non-standard functions from OpenLibm
2 parents 388f0f1 + d64ea4e commit 8d0843a

24 files changed

Lines changed: 28 additions & 1466 deletions

i387/Make.files

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
$(CUR_SRCS) = e_exp.S e_fmod.S e_log.S e_log10.S \
22
e_remainder.S e_sqrt.S s_ceil.S s_copysign.S \
3-
s_finite.S s_floor.S s_llrint.S s_logb.S s_lrint.S \
4-
s_remquo.S s_rint.S s_significand.S s_tan.S \
5-
s_trunc.S
3+
s_floor.S s_llrint.S s_logb.S s_lrint.S \
4+
s_remquo.S s_rint.S s_tan.S s_trunc.S
65

76
ifneq ($(OS), WINNT)
87
$(CUR_SRCS) += s_scalbn.S s_scalbnf.S s_scalbnl.S
@@ -12,11 +11,11 @@ endif
1211
$(CUR_SRCS)+= e_log10f.S e_logf.S e_remainderf.S \
1312
e_sqrtf.S s_ceilf.S s_copysignf.S s_floorf.S \
1413
s_llrintf.S s_logbf.S s_lrintf.S \
15-
s_remquof.S s_rintf.S s_significandf.S s_truncf.S
14+
s_remquof.S s_rintf.S s_truncf.S
1615

1716
# long double counterparts
1817
$(CUR_SRCS)+= e_remainderl.S e_sqrtl.S s_ceill.S s_copysignl.S \
1918
s_floorl.S s_llrintl.S \
2019
s_logbl.S s_lrintl.S s_remquol.S s_rintl.S s_truncl.S
2120

22-
$(CUR_SRCS)+= fenv.c
21+
$(CUR_SRCS)+= fenv.c

i387/s_finite.S

Lines changed: 0 additions & 23 deletions
This file was deleted.

i387/s_significand.S

Lines changed: 0 additions & 21 deletions
This file was deleted.

i387/s_significandf.S

Lines changed: 0 additions & 22 deletions
This file was deleted.

include/openlibm_math.h

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ extern int signgam;
194194
#if defined(__cplusplus)
195195
extern "C" {
196196
#endif
197+
/* Symbol present when OpenLibm is used. */
198+
int isopenlibm(void);
199+
197200
/*
198201
* ANSI/POSIX
199202
*/
@@ -280,14 +283,6 @@ double jn(int, double);
280283
double y0(double);
281284
double y1(double);
282285
double yn(int, double);
283-
284-
#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
285-
double gamma(double);
286-
#endif
287-
288-
#if __XSI_VISIBLE <= 600 || __BSD_VISIBLE
289-
double scalb(double, double);
290-
#endif
291286
#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
292287

293288
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
@@ -307,26 +302,18 @@ double trunc(double);
307302
* BSD math library entry points
308303
*/
309304
#if __BSD_VISIBLE
310-
double drem(double, double);
311-
int finite(double) __pure2;
312305
int isnanf(float) __pure2;
313306

314307
/*
315-
* Reentrant version of gamma & lgamma; passes signgam back by reference
316-
* as the second argument; user must allocate space for signgam.
308+
* Reentrant version of lgamma; passes signgam back by reference as the
309+
* second argument; user must allocate space for signgam.
317310
*/
318-
double gamma_r(double, int *);
319311
double lgamma_r(double, int *);
320312

321313
/*
322314
* Single sine/cosine function.
323315
*/
324316
void sincos(double, double *, double *);
325-
326-
/*
327-
* IEEE Test Vector
328-
*/
329-
double significand(double);
330317
#endif /* __BSD_VISIBLE */
331318

332319
/* float versions of ANSI/POSIX functions */
@@ -400,34 +387,16 @@ float fminf(float, float) __pure2;
400387
* float versions of BSD math library entry points
401388
*/
402389
#if __BSD_VISIBLE
403-
float dremf(float, float);
404-
int finitef(float) __pure2;
405-
float gammaf(float);
406-
float j0f(float);
407-
float j1f(float);
408-
float jnf(int, float);
409-
float scalbf(float, float);
410-
float y0f(float);
411-
float y1f(float);
412-
float ynf(int, float);
413-
414390
/*
415-
* Float versions of reentrant version of gamma & lgamma; passes
416-
* signgam back by reference as the second argument; user must
417-
* allocate space for signgam.
391+
* Float versions of reentrant version of lgamma; passes signgam back by
392+
* reference as the second argument; user must allocate space for signgam.
418393
*/
419-
float gammaf_r(float, int *);
420394
float lgammaf_r(float, int *);
421395

422396
/*
423397
* Single sine/cosine function.
424398
*/
425399
void sincosf(float, float *, float *);
426-
427-
/*
428-
* float version of IEEE Test Vector
429-
*/
430-
float significandf(float);
431400
#endif /* __BSD_VISIBLE */
432401

433402
/*

src/Make.files

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
$(CUR_SRCS) = common.c \
22
e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \
33
e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_cosh.c e_coshf.c e_exp.c \
4-
e_expf.c e_fmod.c e_fmodf.c e_gamma.c e_gamma_r.c e_gammaf.c \
5-
e_gammaf_r.c e_hypot.c e_hypotf.c e_j0.c e_j0f.c e_j1.c e_j1f.c \
6-
e_jn.c e_jnf.c e_lgamma.c e_lgamma_r.c e_lgammaf.c e_lgammaf_r.c \
4+
e_expf.c e_fmod.c e_fmodf.c e_hypot.c e_hypotf.c e_j0.c e_j1.c \
5+
e_jn.c e_lgamma.c e_lgamma_r.c e_lgammaf.c e_lgammaf_r.c \
76
e_lgammal.c e_log.c e_log10.c e_log10f.c e_log2.c e_log2f.c e_logf.c \
8-
e_pow.c e_powf.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \
7+
e_pow.c e_powf.c e_remainder.c e_remainderf.c \
98
e_rem_pio2.c e_rem_pio2f.c \
109
e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c \
1110
k_cos.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_tan.c \
@@ -15,7 +14,6 @@ $(CUR_SRCS) = common.c \
1514
s_copysign.c s_copysignf.c s_cos.c s_cosf.c \
1615
s_csqrt.c s_csqrtf.c s_erf.c s_erff.c \
1716
s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c s_fabs.c s_fabsf.c s_fdim.c \
18-
s_finite.c s_finitef.c \
1917
s_floor.c s_floorf.c s_fma.c s_fmaf.c \
2018
s_fmax.c s_fmaxf.c s_fmin.c \
2119
s_fminf.c s_fpclassify.c \
@@ -28,10 +26,10 @@ $(CUR_SRCS) = common.c \
2826
s_nexttowardf.c s_remquo.c s_remquof.c \
2927
s_rint.c s_rintf.c s_round.c s_roundf.c s_roundl.c \
3028
s_scalbln.c s_scalbn.c s_scalbnf.c s_signbit.c \
31-
s_signgam.c s_significand.c s_significandf.c s_sin.c s_sincos.c \
29+
s_signgam.c s_sin.c s_sincos.c \
3230
s_sinf.c s_sincosf.c s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c \
3331
s_trunc.c s_truncf.c s_cpow.c s_cpowf.c \
34-
w_cabs.c w_cabsf.c w_drem.c w_dremf.c
32+
w_cabs.c w_cabsf.c
3533

3634
ifneq ($(OS), WINNT)
3735
$(CUR_SRCS) += s_nan.c
@@ -54,8 +52,7 @@ $(CUR_SRCS) += e_acosl.c e_asinl.c e_atan2l.c e_fmodl.c \
5452
s_casinl.c s_ctanl.c \
5553
s_cimagl.c s_conjl.c s_creall.c s_cacoshl.c s_catanhl.c s_casinhl.c \
5654
s_catanl.c s_csinl.c s_cacosl.c s_cexpl.c s_csinhl.c s_ccoshl.c \
57-
s_clogl.c s_ctanhl.c s_ccosl.c
58-
# s_cbrtl.c
55+
s_clogl.c s_ctanhl.c s_ccosl.c s_cbrtl.c
5956
endif
6057

6158
# C99 complex functions

src/common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <openlibm_math.h>
2+
13
#include "math_private.h"
24

35
DLLEXPORT int isopenlibm(void) {

src/e_gamma.c

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/e_gamma_r.c

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/e_gammaf.c

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)