We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf1830d commit 697c564Copy full SHA for 697c564
1 file changed
include/internal/macro.h
@@ -3,6 +3,11 @@
3
#ifndef INTERNAL_MACRO_H
4
#define INTERNAL_MACRO_H
5
6
+#include <stdint.h>
7
+#ifndef INTPTR_MAX /* m68k-elf-gcc (atari-st) does not define the optional intptr_t and friends */
8
+# define intptr_t long
9
+#endif
10
+
11
/* Macro definitions from the Linux kernel. */
12
13
#define __ALIGN__MASK(x, mask) (((x) + (mask)) & ~(mask))
@@ -40,7 +45,8 @@
40
45
* Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de>
41
46
*/
42
47
#define __is_constexpr(x) \
43
- (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
48
+ (sizeof(int) == sizeof(*(8 ? ((void *)((intptr_t)(x) * 0)) : (int *)8)))
49
44
50
51
#define __no_side_effects(x, y) \
52
(__is_constexpr(x) && __is_constexpr(y))
0 commit comments