bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] winsocket - threads Win32 builds


From: Holger
Subject: Re: [Bug-gnubg] winsocket - threads Win32 builds
Date: Fri, 18 Jul 2003 20:44:38 +0200

At 20:00 18.07.2003 +0200, Nardy Pillards wrote:
From: "Holger" <address@hidden>
Sent: Friday, July 18, 2003 2:38 PM
Subject: Re: [Bug-gnubg] winsocket - threads Win32 builds
> >
> >However: compiling without HAVE_SOCKETS 1 generates link errors from
> >gnubg.c.
>
> You need -lwsock32 in Makefile.

No, I don't need -lwsock32 when I have #undef HAVE_SOCKETS in configure.h

Well, if you look at it from this side then you don't. ;)

> >Line 3784 (WSACleanup) and line 7127 (WSAStartup) are socket related.
> >Add #if HAVE_SOCKETS ??
>
> I'm not really fond of HAVE_SOCKETS for use on Windows since Winsock is
> after all no full BSD socket replacement. I'd rather introduce a new define
> USE_WINSOCK. 'USE' because every 32bit Windows comes with at least version
> 1 of Winsock, thus _has_ it anyway. And because of this imho it's not
> necessary to compile without sockets support. One could remove the
> HAVE_SOCKETS checks for Windows, though.

Just adding #if HAVE_SOCKETS in gnubg.c (as is done in the other sources)
leaves the option open to use or not use winsock at this time.
There is no option now.
I have no problem going for the 'no option'. It's not a big deal, but it is
not a big deal adding twice #if HAVE_SOCKETS either, is it??

The act of adding those lines is no big thing at all. It's just that it's not the right (tm) way and might eventually cause problems if a future portion of code that uses BSD sockets checks for HAVE_SOCKETS but not for Windows. This, however, is neither such a big thing. So - added. :)

Actually, I kind of wanted opinions whether it's useful to have the option to compile without sockets on Windows. It'd be just not using something that's there anyway.

Regards,

Holger




reply via email to

[Prev in Thread] Current Thread [Next in Thread]