git: 69b3aa35469a - stable/14 - msun: expose the C23 functions we already support in <math.h>

Robert Clausecker <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a68ce93.24899.1ba26bf0__19339.6400123433$1785253567$gmane$org@gitrepo.freebsd.org>
The branch stable/14 has been updated by fuz:

URL: https://cgit.FreeBSD.org/src/commit/?id=69b3aa35469a2df029a2faaa8c4022af72d8f418

commit 69b3aa35469a2df029a2faaa8c4022af72d8f418
Author:     Robert Clausecker <[email protected]>
AuthorDate: 2025-11-17 17:09:11 +0000
Commit:     Robert Clausecker <[email protected]>
CommitDate: 2026-07-28 15:44:57 +0000

    msun: expose the C23 functions we already support in <math.h>
    
    This is the *pi family of trigonometric functions. Quite a few C23
    functions are still missing.  These seem to be:
    acospi, acospif, acospil, asinpi, asinpif, asinpil, atan2pi, atan2pif,
    atan2pil, atanpi, atanpif, atanpil, canonicalize, canonicalizef,
    canonicalizel, compoundn, compoundnf, compoundnl, daddl, ddivl, dfmal,
    dmull, dsqrtl, dsubl, exp10, exp10f, exp10l, exp10m1, exp10m1f,
    exp10m1l, exp2m1, exp2m1f, exp2m1l, fadd, faddl, fdiv, fdivl, ffma,
    ffmal, fmaximum, fmaximum_mag, fmaximum_mag_num, fmaximum_mag_numf,
    fmaximum_mag_numl, fmaximum_magf, fmaximum_magl, fmaximum_num,
    fmaximum_numf, fmaximum_numl, fmaximumf, fmaximuml, fminimum,
    fminimum_mag, fminimum_mag_num, fminimum_mag_numf, fminimum_mag_numl,
    fminimum_magf, fminimum_magl, fminimum_num, fminimum_numf,
    fminimum_numl, fminimumf, fminimuml, fmul, fmull, fromfp, fromfpf,
    fromfpl, fromfpx, fromfpxf, fromfpxl, fsqrt, fsqrtl, fsub, fsubl,
    iscanonical, iseqsig, issignaling, issubnormal, iszero, nextdown,
    nextdownf, nextdownl, nextup, nextupf, nextupl, pown, pownf, pownl,
    powr, powrf, powrl, rootf, rootl, rootn, roundeven, roundevenf,
    roundevenl, rsqrt, rsqrtf, rsqrtl, ufromfp, ufromfpf, ufromfpl,
    ufromfpx, ufromfpxf, ufromfpxl.
    
    Reviewed by:    imp
    Approved by:    markj (mentor)
    MFC after:      1 month
    Relnotes:       yes
    Differential Revision:  https://reviews.freebsd.org/D53783
    
    (cherry picked from commit 37fa5b36abb15b322493aba20146709d48359507)
    (cherry picked from commit 104488641acaf2269d860d8abf142d80a340a5e8)
---
 lib/msun/src/math.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h
index 8e72beb757f8..cdf22851e7b5 100644
--- a/lib/msun/src/math.h
+++ b/lib/msun/src/math.h
@@ -498,6 +498,9 @@ long double	lgammal_r(long double, int *);
 void		sincos(double, double *, double *);
 void		sincosf(float, float *, float *);
 void		sincosl(long double, long double *, long double *);
+#endif /* __BSD_VISIBLE */
+
+#if __ISO_C_VISIBLE >= 2023
 double		cospi(double);
 float		cospif(float);
 long double 	cospil(long double);
@@ -507,7 +510,7 @@ long double 	sinpil(long double);
 double		tanpi(double);
 float		tanpif(float);
 long double	tanpil(long double);
-#endif
+#endif /* __ISO_C_VISIBLE >= 2023 */
 
 __END_DECLS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.