Paolo Bonzini <[EMAIL PROTECTED]> 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