Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2001:
[Freeciv-Dev] Re: Winsock patch
Home

[Freeciv-Dev] Re: Winsock patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Winsock patch
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Mon, 12 Feb 2001 01:16:04 -0500

At 2001/02/10 13:35 , Vasco Alexandre Da Silva Costa wrote:
>Here is yet another slightly changed version of Andreas's patch.
>
>After it's tested if it works in Windows (could you please do it Andreas?) 
>If there's nothing wrong with it and noone objects it will be commited.

A few problems with the patch:

- It moves some includes from .c file to .h files *that don't use them*.
Because of some conflicts I have encountered with trying to compile these
includes on some versions, I prefer them to remain where they were.

- The coding style doesn't match Freeciv's standard.  Worse, the patch
RE-formats some things from conformant to non-conformant (e.g., netintf.h).

- The config stuff for fdopen() doesn't work.

- The config stuff is platform-oriented (e.g. WIN32_NATIVE (also, it uses
HAVE_WINSOCK_H to condition code, not just includes), instead of
function-oriented (e.g., HAVE_RECV).  I realize this is a difficult issue,
and it may be as close as it can get, but to me it appears to need a second
look.

Attached is an updated patch which fixes some bugs and addresses the first
three above problems.

It now seems to work on Linux.  It needs to be tested on Windows (and BeOS).

At 2001/02/11 07:36 , Andreas Kemnade wrote:
>Some modifications are needed:
>It is safer to use _beginthreadex instead of CreateThread because some
>C-Lib data structs are initialized then but it has a strange prototype,
>so some casts are necessary. I have looked into my win32 book for this.

I didn't include Andreas' patch, though it should be before being
committed.  (If whoever tests this on Windows would combine the patches,
that would be greatly appreciated.)

>BTW: Is the other SOCKET_ZERO_ISNT_STDIN stuff only used on BeOS?

I believe so.  Though, with this patch, if you fake it (by editing the
config.h file after ./configure) everything works (albeit slowly).

Attachment: win32-7.diff.gz
Description: Binary data

jjm

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