Bruno Haible wrote: > Paolo Bonzini wrote: >>> Here is a proposal that should acknowledge both of your arguments: >>> Provide separate modules 'select' separate from 'sys_select', like we do >>> in the rest of gnulib, but if 'sys_select' is used without 'select', then >>> #define select select_used_without_requesting_gnulib_module_select >>> so that the developer gets an explicit error message, rather than falling >>> into a pitfall. >> A mandatory link warning (i.e. always enabled, not just with posixcheck) >> would also work for me. > > The link warnings work only on ELF platforms that use GNU ld (see > build-aux/link-warning.h). That's not the case with mingw: the binary file > format is COFF, not ELF. So the link error is the only way to avoid the > pitfall for the developer.
Yes, I know that. What I meant was, having a link warning like for other gnulib modules would be good *even when you are not under mingw* (i.e. even where select works). If select is detached from sys_select, and similarly for sys_socket functions (*), I don't care much about what happens when the package is compiled under mingw; pretty much nothing would work, prompting the developer to find the gnulib module offering a solution. (*) in this case, BTW, I think using module indicators would be better than splitting winsock.c in a zillion files. Paolo