[Freeciv-Dev] Re: Winsock patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Vasco Alexandre Da Silva Costa writes:
> 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).
>
amiga/config.h seems not to define SOCKET_ZERO_ISNT_STDIN.
It seems like the Amiga socket api (which belongs not to AmigaOS) has
read() and write() functions which can deal with sockets and files (at
least stdin).
I think we should use the old SOCKET_ZERO_ISNT_STDIN code and move it
to support.c instead of using that fileno() stuff because this code
should work because it is in CVS. (Don't change a running system)
> 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.
>
Configure should work without options. I normally do (in linux!):
export CC=i386-mingw32-gcc
export AR=i386-mingw32-ar
export RANLIB=i386-mingw32-ranlib
./configure
make
On windows the things are easier:
export CC="gcc -mno-cygwin" (This switches cygwin compilers to
create "native" windows programs
without cygwin.dll)
./configure
make
If gcc is not configured to create cygwin executables, you can omit
the first line. The patch I send also requires to add --disable-client
and --disable-nls.
> === 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.
>
What about using recv and send by default?
Greetings
Andreas Kemnade
- [Freeciv-Dev] Winsock patch, Vasco Alexandre Da Silva Costa, 2001/02/10
- [Freeciv-Dev] Re: Winsock patch, Sebastian Bauer, 2001/02/13
- [Freeciv-Dev] Re: Winsock patch, Dirk Stoecker, 2001/02/14
- [Freeciv-Dev] Re: Winsock patch, Andreas Kemnade, 2001/02/14
- [Freeciv-Dev] Re: Winsock patch, Vasco Alexandre Da Silva Costa, 2001/02/14
|
|