Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 296539 | Differences between
and this patch

Collapse All | Expand All

(-)include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit (-3 / +10 lines)
Lines 143-151 extern int _cond_resched(void); Link Here
143
143
144
#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
144
#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
145
145
146
#define abs(x) ({				\
146
#define abs(x) ({						\
147
		long __x = (x);			\
147
		long ret;					\
148
		(__x < 0) ? -__x : __x;		\
148
		if (sizeof(x) == sizeof(long)) {		\
149
			long __x = (x);				\
150
			ret = (__x < 0) ? -__x : __x;		\
151
		} else {					\
152
			int __x = (x);				\
153
			ret = (__x < 0) ? -__x : __x;		\
154
		}						\
155
		ret;						\
149
	})
156
	})
150
157
151
#define abs64(x) ({				\
158
#define abs64(x) ({				\

Return to bug 296539