From cdc0335d77e7b07349f43a63442cdad09bcc15f9 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 15 Aug 2020 15:49:45 -0400 Subject: define copysign() macro for C < 99 --- src/math/_tgmath.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 -- cgit v1.2.1