Skip to contentSkip to conversation

unifdef problem (xen)

DISCUSSION Randy Dunlap 3 participants 3 messages Oct 22, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

Hi,

I'm using xen.git
<git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git>.

When I build allmodconfig on x86_64 (with O=xx64), I see this warning:

unifdef: /xen/xx64/usr/include/xen/privcmd.h.tmp: 79: Premature EOF (#if line 33 depth 1)
unifdef: output may be truncated

The original file contains:
#ifndef __user
#define __user
#endif

and the generated/unifdef output file contains:
#ifndef #define #endif

all on one line.

Is this expected/normal? Is this a problem with unifdef or with something in xen.git?

thanks,
---
~Randy

#1 lore raw
Quoted 17 lines · Randy Dunlap

Hi,

I'm using xen.git
<git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git>.

When I build allmodconfig on x86_64 (with O=xx64), I see this warning:

unifdef: /xen/xx64/usr/include/xen/privcmd.h.tmp: 79: Premature EOF (#if line 33 depth 1)
unifdef: output may be truncated

The original file contains:
#ifndef __user
#define __user
#endif

Quoted 8 lines

and the generated/unifdef output file contains:
#ifndef #define #endif

all on one line.

Is this expected/normal? Is this a problem with unifdef or with something in xen.git?

I'd say its a bug in unifdef, but I'm not precisely sure what its trying to do.

That said, there's no reason for those lines to be in privcmd.h, I think.

J

#2 lore raw
In reply to Randy Dunlap
Quoted 8 lines · Randy Dunlap

Hi,

I'm using xen.git
<git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git>.

When I build allmodconfig on x86_64 (with O=xx64), I see this warning:

Quoted 8 lines

unifdef: /xen/xx64/usr/include/xen/privcmd.h.tmp: 79: Premature EOF (#if line 33 depth 1)
unifdef: output may be truncated

The original file contains:
#ifndef __user
#define __user
#endif

The problem is scripts/headers_install.pl
Here we do:

    $line =~ s/([\s(])__user\s/$1/g;

And this zaps the newline when we see __user.

It is not obvious why this zaps the newline - must be some perl foo I have forgotten.

I checked this by removing the unlink in said perl script and looking at the .tmp file.

Sam