Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2000:
[Freeciv-Dev] Re: Problems when compiling packets.c without HAVE_FCNTL_H
Home

[Freeciv-Dev] Re: Problems when compiling packets.c without HAVE_FCNTL_H

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Problems when compiling packets.c without HAVE_FCNTL_H
From: sebauer@xxxxxxxxxxx (Sebastian Bauer)
Date: Sat, 18 Mar 2000 13:42:48 +0100

Hello Vasco

On 18-Mär-00, Vasco Alexandre Da Silva Costa wrote:
> Thanks for the bug report, i didn't notice that compilation would fail on
> machines without fcntl().  It should be fixed now.  Please report if it
> isn't.

Yes, it works.

> On the Amiga there should be a function to put sockets in non-blocking
> mode:

> IoctlSocket(sockfd, FIONBIO, &value)
> If i'm not mistaken.

Yes! Great thanks :-))

But I don't think that the check only for fcntl.h in configure
is enough. Actually I have this include file but it doesn't
provide the fcntl() function (ok, I don't run configure anywhy
but it's a little bit irritating).

I've written a patch which will change the configure script so
it checks additional for the fcntl() function and ioctl().
If fcntl() is not avaiable ioctl() is used if available to
switch to the non-blocking mode. If one of both is available
NONBLOCKING_SOCKETS is defined in config.h. This is used then in
server/sernet.c and common/packets.c. Is this Ok?
(also included the changes needed for the amiga version)

bye,
Sebastian Bauer

Attachment: packets.diff.gz
Description: Binary data


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