Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Russell King eedc9d83ea 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 <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:57 +02:00
Justin P. Mattock d15bd1067b kbuild: fix C libary confusion in unifdef.c due to getline()
This fixes an error when compiling the kernel.

  CHK     include/linux/version.h
  HOSTCC  scripts/unifdef
scripts/unifdef.c:209: error: conflicting types for 'getline'
/usr/include/stdio.h:651: note: previous declaration of 'getline' was here
make[1]: *** [scripts/unifdef] Error 1
make: *** [__headers] Error 2

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc:  Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-03-07 13:31:29 +01:00
Sam Ravnborg 14a036d2dc kbuild: replace use of strlcpy with a dedicated implmentation in unifdef
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:00 +02:00
Sam Ravnborg 01f1c8799a kbuild: add unifdef
This patch contains a raw copy of unifdef.c
Next patch will modify it and add infrastructure to use it
Adding unifdef to the kernel is acked by the author.

The reason to add unifdef as part of the kernel source is that it is not
yet a common utility on most distributions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:00 +02:00