22 Jan, 2011

1 commit

  • Fix a long-standing cpp compatibility bug. The -DFOO argument
    (without an explicit value) should define FOO to 1 not to the empty
    string.

    Add a -o option to support overwriting a file in place, and a -S
    option to list the nesting depth of symbols. Include line numbers
    in debugging output. Support CRLF newlines.

    Signed-off-by: Tony Finch
    Signed-off-by: Michal Marek

    Tony Finch
     

12 Dec, 2009

1 commit

  • Fix handling of input files (e.g. with no newline at EOF) that could
    make unifdef get into an unexpected state and call abort().

    The new -B option compresses blank lines around a deleted section
    so that blank lines around "paragraphs" of code don't get doubled.

    The evaluator can now handle macros with arguments, and unbracketed
    arguments to the "defined" operator.

    Add myself to MAINTAINERS for unifdef.

    Signed-off-by: Tony Finch
    Acked-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Tony Finch
     

10 Jun, 2009

1 commit

  • 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

    Russell King
     

07 Mar, 2009

1 commit

  • 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
    Cc: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Justin P. Mattock
     

25 Sep, 2006

2 commits