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: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Mon, 12 Feb 2001 21:39:23 +0000 (WET)

Just a few comments on this new patch:

fileno() isn't an ANSI C function.  That piece of code will be used at
least in BeOS (and probably classic Mac too)  i doubt those use the UNIX
file API.

Using my_nonblock() on something other than a socket isn't advised on
non-UNIX systems at least.  If we ever get to include AmigaOS code in this
for e.g. i doubt ioctlsocket() works on files (even if AmigaOS has a UNIX
like file API which i doubt).

If you have Winsock it's "guaranteed" you have recv(), sendto(), etc so i
dunno if these fit the traditional autoconf style.  From what i see
MingW32 users don't seem to like/use autoconf too much because of this.

They usually just check in configure if you pass it some win32 option and
then use a define like Andreas did.  I'm not certain if the HAVE_WINSOCK_H
stuff i added was such a good idea in retrospect.

=== a little bit of history

recv(), send() are standard BSD 4.4 socket API calls.  Winsock uses those 
and select(), etc.  IIRC Freeciv uses the BSD 4.3 socket API which uses the
file API read() & write() calls for sockets too.  Solaris copied this so
it kind of became the "standard" socket API on UNIX System V based
systems.  Many systems today include BSD 4.4 support too.  Linux at least.
And of course *BSD does too.

The BSD socket API has widespread so much it's a de facto standard right
now.  Even Apple was forced to add it to MacOS X.  Of course every OS has
it's own peculiar quirks if they're not UNIX based.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa




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