[lkml]   [2001]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectcproto use in the kernel source tree?

I would like to automate generating the prototype list for smbfs. The list
in include/linux/smb_fs.h is probably mostly correct ... or not.

Does anyone use this type of tool anywhere else in the kernel sources?
Any input on how to set it up right is appreciated.

Here is what I have right now. arch/i386/math-emu/Makefile has this rule

cproto -e -DMAKING_PROTO *.c >fpu_proto.h

If I do that in the smbfs Makefile, and run it as:
$ make TOPDIR=`pwd` -C fs/smbfs proto

I get heaps of errors (some of which I also get for the math-emu rule and
fpu_proto.h is definitly hand edited, so I wonder if it is really used).

For one thing it goes digging in "/usr/include/asm/" which isn't exactly
what I want. I can improve it by changing the rule to:

cproto -e -I$(TOPDIR)/include -D__KERNEL__ -DMAKING_PROTO *.c > proto.h

And that seems to sort of work.

The only thing is that I get wierd errors on some gcc header:

"/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h", line 43: parse
error at token '__builtin_va_list'
Expected: auto char define-name double extern inline register static ...

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
$ rpm -qf `which gcc`
$ rpm -qf `which cproto`

I know it stops working (it misses some functions and complains more :)
after I apply some of my non-released patches. But that is probably
something I do wrong.

Is cproto even a good tool for doing this in the kernel tree?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.041 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site