bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-poll vs ioctl


From: Simon Josefsson
Subject: Re: test-poll vs ioctl
Date: Mon, 20 Oct 2008 18:35:09 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

>> There is no -I for the $gltests/ directory in $gl/, so this fails.
>> 
>> I think the ioctl replacement function should be moved out from
>> winsock.c to a new ioctl.c.
>> 
>> What do you think of the patch below?
>
> Before applying something like this, it would make sense to understand
> if the root problem could happen in other cases.

Sure.  The problem is caused by:

1) One gnulib module (e.g., shutdown) pulls in one file (winsock.c) in
   the gl/ directory

2) A test module (e.g., poll-tests) depends on a module (e.g., ioctl)
   that change how winsock.c behaves (i.e., causes it to #include
   additional headers such as sys/ioctl.h)

I guess this happens whenever you re-use the same *.c file for more than
one module, and the replacement functions differ slightly in what header
files they need.  This is one reason there are so many *.c files even
for small functions in gnulib.

The current situation breaks simple test-cases like this:

rm -rf m;gnulib-tool --create-testdir --with-tests --dir m poll; cd m; 
./configure --host=i586-mingw32msvc --build=i686-pc-linux-gnu; make check; cd ..

Regardless of the solution, I think the above command should work.

Can you think of any other solution than the one I proposed?

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]