Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2023-05-05 21:17:41 +0300
committerJeff Johnston <jjohnstn@redhat.com>2023-05-05 21:49:48 +0300
commit742b8db95d93e4edba52bbf84afe64c9324ce89b (patch)
treef1ae0be3f0beec26a5afbeebab692900a1db0820 /newlib/libm
parent3bee68248fc8e164a8bb6bba3f105b10fdec8a71 (diff)
Move signgm.c from libc/reent to libm/math
Diffstat (limited to 'newlib/libm')
-rw-r--r--newlib/libm/math/Makefile.inc1
-rw-r--r--newlib/libm/math/signgam.c16
2 files changed, 17 insertions, 0 deletions
diff --git a/newlib/libm/math/Makefile.inc b/newlib/libm/math/Makefile.inc
index 1b61d6dd3..d2a45bf13 100644
--- a/newlib/libm/math/Makefile.inc
+++ b/newlib/libm/math/Makefile.inc
@@ -15,6 +15,7 @@
%D%/w_scalb.c %D%/w_sinh.c %D%/w_sqrt.c \
%D%/w_sincos.c \
%D%/w_drem.c \
+ %D%/signgam.c \
%D%/s_asinh.c %D%/s_atan.c %D%/s_ceil.c \
%D%/s_cos.c %D%/s_erf.c %D%/s_fabs.c %D%/s_floor.c \
%D%/s_frexp.c %D%/s_ldexp.c \
diff --git a/newlib/libm/math/signgam.c b/newlib/libm/math/signgam.c
new file mode 100644
index 000000000..b1017d861
--- /dev/null
+++ b/newlib/libm/math/signgam.c
@@ -0,0 +1,16 @@
+/* The signgam variable is stored in the reentrancy structure. This
+ function returns its address for use by the macro signgam defined in
+ math.h. */
+
+#include <math.h>
+#include <reent.h>
+
+#ifndef _REENT_ONLY
+
+int *
+__signgam (void)
+{
+ return &_REENT_SIGNGAM(_REENT);
+}
+
+#endif