Francois Gouget fgouget at
Tue Nov 20 14:29:39 CST 2001

On Tue, 20 Nov 2001 lawson_whitney at wrote:
> >    You can also deal with unistd.h in your own application by doing:
> >
> > #define gethostname linux_gethostname
> > #include <unistd.h>
> > #undef gethostname
> >
> >     And making sure that unistd.h is included before winsock.h.
> >
> That looks simple enough.  I'll try that, I think.  Thanks!

   There is also another way, in case you don't use winsock in your
application: define WINE_NOWINSOCK and then 'windows.h' will not
#include 'winsock2.h'. This should also solve the name collision.

   There is even yet another way to handle this: define USE_WS_PREFIX
and then all name collisions will be avoided. This will even let you
use both the Unix and Windows sockets though using the winsock functions
will probably be a bit hard. And that's probably not really what you
want to do anyway.

Francois Gouget         fgouget at
                         "Utilisateur" (nom commun) :
        Mot utilisé par les informaticiens en lieu et place d'"idiot".

More information about the wine-devel mailing list