summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-15 15:49:45 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-15 15:49:45 -0400
commitcdc0335d77e7b07349f43a63442cdad09bcc15f9 (patch)
tree55f8082dde942edf91cb8556d9ec585a21dbcff0 /src/math
parent1309dd2cc1d464ab24283119eda2aa487338b9be (diff)
define copysign() macro for C < 99
Diffstat (limited to 'src/math')
-rw-r--r--src/math/_tgmath.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/math/_tgmath.h b/src/math/_tgmath.h
index a84614a9..8cd7871b 100644
--- a/src/math/_tgmath.h
+++ b/src/math/_tgmath.h
@@ -64,4 +64,8 @@
#include "signbit.c"
#endif
+#ifndef copysign
+#define copysign(_x, _y) (_x < 0 ? -_y : _y)
+#endif
+
#endif