[Libevent-users] test/*.c files use installed header files not the ones from the package

Nick Mathewson nickm at freehaven.net
Sat Nov 3 21:44:17 EDT 2007


On Sat, Nov 03, 2007 at 04:18:19PM -0700, Niels Provos wrote:
> Hi Marc,
> 
> I appreciate your insights, but your message has nothing to do with
> libevent.  The make files in libevent use the -I option to provide the
> path to the header files.

I just tried to test this out, as follows.  I built libevent, and then
added "#error Foo" to the top of the event.h header in the libevent
build directory.

I confirmed that there existed valid headers (without the #error
directive) in /usr/include and /usr/local/include.  Then, I entered
the "test" directory and typed "make clean; make"

The compiler gave me:
gcc -DHAVE_CONFIG_H -I. -I..   -I.. -I../compat  -g -O2 -Wall -c test-init.c
In file included from test-init.c:23:
../event.h:2:2: error: #error foo

The test/test-init.c file does indeed "#include <event.h>", but it
looks like thanks to the -I.. flag passed to gcc, it is finding the
copy of event.h in the parent directory.

This seems to confirm to me pretty well that, on my OS at least,
things work okay.

Marc, have you seen this problem you report in the wild?  If so, can
you give me some help reproducing it?  As far as I can tell, Niels is
right above.


yrs,
-- 
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20071103/4fee2618/attachment.bin


More information about the Libevent-users mailing list