[sheepdog] [PATCH 1/3] util: built-in two std headers
Liu Yuan
namei.unix at gmail.com
Mon Jul 9 03:27:38 CEST 2012
On 07/09/2012 01:29 AM, Christoph Hellwig wrote:
> I don't really think it's a big benefit, but I'm not going to complain
> about it either. If you do it I think you should include sdtbool.h
> as well.
The main reason is to make util.h self-containing, without, we'll see
following compile error:
In file included from ../include/sheepdog_proto.h:16,
from sheep_priv.h:18,
from peer.c:12:
../include/util.h: In function ‘zalloc’:
../include/util.h:62: warning: implicit declaration of function ‘calloc’
../include/util.h:62: warning: incompatible implicit declaration of
built-in function ‘calloc’
In file included from sheep_priv.h:23,
from peer.c:12:
../include/sheep.h: In function ‘get_nth_node’:
../include/sheep.h:75: warning: implicit declaration of function ‘abort’
../include/sheep.h:75: warning: incompatible implicit declaration of
built-in function ‘abort’
../include/sheep.h: In function ‘nodes_to_vnodes’:
../include/sheep.h:249: warning: implicit declaration of function ‘qsort’
In file included from cluster.h:15,
from sheep_priv.h:24,
from peer.c:12:
/usr/include/stdio.h: At top level:
/usr/include/stdio.h:374: error: expected identifier or ‘(’ before ‘do’
/usr/include/stdio.h:374: error: expected identifier or ‘(’ before ‘while’
/usr/include/stdio.h:417: error: expected identifier or ‘(’ before ‘do’
/usr/include/stdio.h:417: error: expected identifier or ‘(’ before ‘while’
why should include stdtool.h? The util.h itself doesn't need it.
Thanks,
Yuan
More information about the sheepdog
mailing list