From: Russell King Date: Sat, 6 Jun 2009 21:47:11 +0000 (+0100) Subject: kbuild: fix headers_exports with boolean expression X-Git-Tag: v2.6.31-rc1~335^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eedc9d83eaab2d35fb9dd1ec25b765dec964e26c;p=pandora-kernel.git kbuild: fix headers_exports with boolean expression When we had code like this in a header unifdef failed to deduct that the expression was always false - and we had code exported that was not intended for userspace. #if defined(__KERNEL__) && !defined(__ASSEMBLY__) int a; #endif This commit implment support in unidef which allows it to work out if an #if expression always evaluates true or false for symbols which are being undefined/always defined. The patch is slightly more complicated than I'd hoped because unifdef needs to see lines fully evaluated - doing otherwise causes it to mark the line as "dirty" and copy it over no matter what. Signed-off-by: Russell King Signed-off-by: Sam Ravnborg --- Reading git-diff-tree failed