/* Cause xs_wire.h to give us xsd_errors[]. */
#define EINVAL EINVAL
-#define __STR(...) #__VA_ARGS__
-#define STR(...) __STR(__VA_ARGS__)
-
/* GDT selector values. */
#define SEL_CODE16 0x0008
#define SEL_DATA16 0x0010
(type *)((char *)mptr__ - offsetof(type, member)); \
})
+#define __STR(...) #__VA_ARGS__
+#define STR(...) __STR(__VA_ARGS__)
+
#define __AC(X, Y) (X ## Y)
#define _AC(X, Y) __AC(X, Y)
#if defined(__x86_64__)
#define _LO32 "k" /* force 32-bit operand */
#define _STK "%%rsp" /* stack pointer */
-#define _BYTES_PER_LONG "8"
#elif defined(__i386__)
#define _LO32 "" /* force 32-bit operand */
#define _STK "%%esp" /* stack pointer */
-#define _BYTES_PER_LONG "4"
#endif
/* Before executing instruction: restore necessary bits in EFLAGS. */
"pushf; " \
"notl %"_LO32 _tmp"; " \
"andl %"_LO32 _tmp",("_STK"); " \
-"andl %"_LO32 _tmp",2*"_BYTES_PER_LONG"("_STK"); " \
+"andl %"_LO32 _tmp", 2 * " STR(__SIZEOF_LONG__) "("_STK"); " \
"pop %"_tmp"; " \
"orl %"_LO32 _tmp",("_STK"); " \
"popf; " \