On Wed, 18 Dec 2002, Dimitrie O. Paun wrote:
Folks,
This does not work (<= is include): winsock.h <= sys/types.h <= sys/select.h
BANG! FD_CLR gets defined before we have a chance to manipulate it.
Any ideas on how to fix this?
I assume this is for Winelib. Then here are your choices as I see them:
* if you want maximum compatibility, then use the msvcrt headers. Then you will not have that problem.
* if you want to use the regular Unix headers, then the price will be a tinybit of reordering of the #includes so that sys/types.h gets included after sys/types.h and that should work too.
Unfortunately I don't think there is any other solution.
Or did you really mean that winsock.h includes sys/types.h which then includes sys/select.h which defines FD_CLR? If that's the case then a bit of reordering of code in winsock.h should solve the problem.`