summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/math')
-rw-r--r--src/math/_tgmath.h24
-rw-r--r--src/math/fpclassify.c6
-rw-r--r--src/math/isfinite.c2
-rw-r--r--src/math/isgreater.c3
-rw-r--r--src/math/isgreaterequal.c3
-rw-r--r--src/math/isinf.c2
-rw-r--r--src/math/isless.c3
-rw-r--r--src/math/islessequal.c3
-rw-r--r--src/math/islessgreater.c3
-rw-r--r--src/math/isnan.c3
-rw-r--r--src/math/isnormal.c2
-rw-r--r--src/math/isunordered.c3
-rw-r--r--src/math/signbit.c18
13 files changed, 42 insertions, 33 deletions
diff --git a/src/math/_tgmath.h b/src/math/_tgmath.h
index fa7ce4b4..950fbdee 100644
--- a/src/math/_tgmath.h
+++ b/src/math/_tgmath.h
@@ -5,20 +5,20 @@
#ifdef TGSOURCE
# if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
-# define TGCMPLX(x,y) CMPLXF(x,y)
-# define TGFN(x) x##f
-# define TYPE float
-# define TGHUGE HUGE_VALF
+# define TGCMPLX(__x, __y) CMPLXF(__x, __y)
+# define TGFN(__x) __x##f
+# define TYPE float
+# define TGHUGE HUGE_VALF
# include TGSOURCE
# undef TGCMPLX
# undef TGFN
# undef TYPE
# undef TGHUGE
-# define TGCMPLX(x,y) CMPLXL(x,y)
-# define TGFN(x) x##l
-# define TYPE long double
-# define TGHUGE HUGE_VALL
+# define TGCMPLX(__x, __y) CMPLXL(__x, __y)
+# define TGFN(__x) __x##l
+# define TYPE long double
+# define TGHUGE HUGE_VALL
# include TGSOURCE
# undef TGCMPLX
# undef TGFN
@@ -28,9 +28,9 @@
#endif
-#define TGCMPLX(x,y) CMPLX(x,y)
-#define TGFN(x) x
-#define TYPE double
-#define TGHUGE HUGE_VAL
+#define TGCMPLX(__x, __y) CMPLX(__x, __y)
+#define TGFN(__x) __x
+#define TYPE double
+#define TGHUGE HUGE_VAL
#endif
diff --git a/src/math/fpclassify.c b/src/math/fpclassify.c
index 2e040e41..131905af 100644
--- a/src/math/fpclassify.c
+++ b/src/math/fpclassify.c
@@ -1,7 +1,9 @@
#include <math.h>
-#define fpclassify(x) ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) : \
- (sizeof (x) == sizeof (double)) ? __fpclassify(x) : __fpclassifyl(x))
+#define fpclassify(__x) \
+ ((sizeof (__x) == sizeof (float)) ? __fpclassifyf(__x) : \
+ (sizeof (__x) == sizeof (double)) ? __fpclassify(__x) : \
+ __fpclassifyl(__x))
/*
STDC(199901)
diff --git a/src/math/isfinite.c b/src/math/isfinite.c
index 5eaf6b06..a37b5a2d 100644
--- a/src/math/isfinite.c
+++ b/src/math/isfinite.c
@@ -1,6 +1,6 @@
#include <math.h>
-#define isfinite(x) (fpclassify(x) != FP_INFINITE)
+#define isfinite(__x) (fpclassify(__x) != FP_INFINITE)
/*
STDC(199901)
diff --git a/src/math/isgreater.c b/src/math/isgreater.c
index 672dbe6a..80344c03 100644
--- a/src/math/isgreater.c
+++ b/src/math/isgreater.c
@@ -1,5 +1,6 @@
#include <math.h>
-#define isgreater(x,y) ((x) > (y))
+
+#define isgreater(__x, __y) ((__x) > (__y))
/*
STDC(199901)
diff --git a/src/math/isgreaterequal.c b/src/math/isgreaterequal.c
index de0eaaf2..acc5d937 100644
--- a/src/math/isgreaterequal.c
+++ b/src/math/isgreaterequal.c
@@ -1,5 +1,6 @@
#include <math.h>
-#define isgreaterequal(x,y) ((x) >= (y))
+
+#define isgreaterequal(__x, __y) ((__x) >= (__y))
/*
STDC(199901)
diff --git a/src/math/isinf.c b/src/math/isinf.c
index 1a6b00ff..be76ecfb 100644
--- a/src/math/isinf.c
+++ b/src/math/isinf.c
@@ -1,6 +1,6 @@
#include <math.h>
-#define isinf(x) (fpclassify(x) == FP_INFINITE)
+#define isinf(__x) (fpclassify(__x) == FP_INFINITE)
/*
STDC(199901)
diff --git a/src/math/isless.c b/src/math/isless.c
index 9685e84a..66f7d939 100644
--- a/src/math/isless.c
+++ b/src/math/isless.c
@@ -1,5 +1,6 @@
#include <math.h>
-#define isless(x,y) ((x) < (y))
+
+#define isless(__x, __y) ((__x) < (__y))
/*
STDC(199901)
diff --git a/src/math/islessequal.c b/src/math/islessequal.c
index 97ded436..34a1c138 100644
--- a/src/math/islessequal.c
+++ b/src/math/islessequal.c
@@ -1,5 +1,6 @@
#include <math.h>
-#define islessequal(x,y) ((x) <= (y))
+
+#define islessequal(__x, __y) ((__x) <= (__y))
/*
STDC(199901)
diff --git a/src/math/islessgreater.c b/src/math/islessgreater.c
index a2566474..b17fb161 100644
--- a/src/math/islessgreater.c
+++ b/src/math/islessgreater.c
@@ -1,5 +1,6 @@
#include <math.h>
-#define islessgreater(x,y) ((x) < (y) || (x) > (y))
+
+#define islessgreater(__x, __y) ((__x) < (__y) || (__x) > (__y))
/*
STDC(199901)
diff --git a/src/math/isnan.c b/src/math/isnan.c
index e3e0160a..80bbb741 100644
--- a/src/math/isnan.c
+++ b/src/math/isnan.c
@@ -1,5 +1,6 @@
#include <math.h>
-#define isnan(x) (fpclassify(x) == FP_NAN)
+
+#define isnan(__x) (fpclassify(__x) == FP_NAN)
/*
STDC(199901)
diff --git a/src/math/isnormal.c b/src/math/isnormal.c
index 868c7ea2..95e82b1b 100644
--- a/src/math/isnormal.c
+++ b/src/math/isnormal.c
@@ -1,6 +1,6 @@
#include <math.h>
-#define isnormal(x) (fpclassify(x) == FP_NORMAL)
+#define isnormal(__x) (fpclassify(__x) == FP_NORMAL)
/*
STDC(199901)
diff --git a/src/math/isunordered.c b/src/math/isunordered.c
index ac8cbfff..dab6fe64 100644
--- a/src/math/isunordered.c
+++ b/src/math/isunordered.c
@@ -1,5 +1,6 @@
#include <math.h>
-#define isunordered(x,y) /* TODO */
+
+#define isunordered(__x, __y) /* TODO */
/*
STDC(199901)
diff --git a/src/math/signbit.c b/src/math/signbit.c
index a5278e77..77cc3977 100644
--- a/src/math/signbit.c
+++ b/src/math/signbit.c
@@ -1,20 +1,20 @@
#include <math.h>
-#define signbit(x) \
- (sizeof(x) == sizeof(long double) ? \
+#define signbit(__x) \
+ (sizeof(__x) == sizeof(long double) ? \
((((union { \
long double __f; \
- char __c[sizeof(x)]; \
- }){.__f = (x)}).__c[sizeof(x)-1] & 0x80) == 0x80 ? 1 : 0) : \
- sizeof(x) == sizeof(double) ? \
+ char __c[sizeof(__x)]; \
+ }){.__f = (__x)}).__c[sizeof(__x)-1] & 0x80) == 0x80 ? 1 : 0) : \
+ sizeof(__x) == sizeof(double) ? \
((((union { \
double __f; \
- char __c[sizeof(x)]; \
- }){.__f = (x)}).__c[sizeof(x)-1] & 0x80) == 0x80 ? 1 : 0) : \
+ char __c[sizeof(__x)]; \
+ }){.__f = (__x)}).__c[sizeof(__x)-1] & 0x80) == 0x80 ? 1 : 0) : \
(((union { \
float __f; \
- char __c[sizeof(x)]; \
- }){.__f = (x)}).__c[sizeof(x)-1] & 0x80) == 0x80 ? 1 : 0)
+ char __c[sizeof(__x)]; \
+ }){.__f = (__x)}).__c[sizeof(__x)-1] & 0x80) == 0x80 ? 1 : 0)
/*