mirror of
https://git.freebsd.org/ports.git
synced 2025-06-19 19:50:31 -04:00
20 lines
770 B
C
20 lines
770 B
C
--- utils.h.orig 2018-09-19 23:05:31 UTC
|
|
+++ utils.h
|
|
@@ -121,7 +121,7 @@ int clock_gettime(int type, struct timespec *tv);
|
|
* This returns a constant expression while determining if an argument is
|
|
* a constant expression, most importantly without evaluating the argument.
|
|
*/
|
|
-#define __is_constant(x) \
|
|
+#define __is_it_constant(x) \
|
|
(sizeof(int) == sizeof(*(1 ? ((void*)((long)(x) * 0l)) : (int*)1)))
|
|
|
|
#define __eval_once(func, x) \
|
|
@@ -136,7 +136,7 @@ int clock_gettime(int type, struct timespec *tv);
|
|
#define __eval_safe(func, x) __eval_once(func, x)
|
|
#else
|
|
#define __eval_safe(func, x) \
|
|
- __builtin_choose_expr(__is_constant(x), \
|
|
+ __builtin_choose_expr(__is_it_constant(x), \
|
|
func(x), __eval_once(func, x))
|
|
#endif
|
|
|