[Top][All Lists]
[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
- new module 'ioctl', Bruno Haible, 2008/10/09
- Re: new module 'ioctl', Paolo Bonzini, 2008/10/10
- test-poll vs ioctl, Simon Josefsson, 2008/10/20
- Re: test-poll vs ioctl, Paolo Bonzini, 2008/10/20
- Re: test-poll vs ioctl,
Simon Josefsson <=
- Re: test-poll vs ioctl, Bruno Haible, 2008/10/20
- Re: test-poll vs ioctl, Paolo Bonzini, 2008/10/20
- Re: test-poll vs ioctl, Simon Josefsson, 2008/10/21
- winsock.c split, Simon Josefsson, 2008/10/21
- Re: winsock.c split, Bruno Haible, 2008/10/21
- Re: winsock.c split, Simon Josefsson, 2008/10/21
- Re: winsock.c split, Simon Josefsson, 2008/10/21
- Re: winsock.c split, Bruno Haible, 2008/10/25
- Re: winsock.c split, Bruno Haible, 2008/10/25
- Re: test-poll vs ioctl, Bruno Haible, 2008/10/21