summaryrefslogtreecommitdiffstats
path: root/newlib/libc/reent/signgam.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/reent/signgam.c')
-rw-r--r--newlib/libc/reent/signgam.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/newlib/libc/reent/signgam.c b/newlib/libc/reent/signgam.c
new file mode 100644
index 000000000..905386686
--- /dev/null
+++ b/newlib/libc/reent/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 ()
+{
+ return &_REENT->_new._reent._gamma_signgam;
+}
+
+#endif