gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH 3/3] Enable Windows version of gpspipe


From: Robert Norris
Subject: Re: [gpsd-dev] [PATCH 3/3] Enable Windows version of gpspipe
Date: Sun, 5 Mar 2017 22:01:10 +0000

>> NB with the syslog compatibility patch (which I'll rework as requested)
>> - gpxlogger builds without further changes.

> Did you also try running it (to test my SIGQUIT fix)?

Yes I did.
However I don't know how to generate SIGQUIT events on Windows (it might not be 
even possible).

--
Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.

________________________________________
From: gpsd-dev <address@hidden> on behalf of Fred Wright <address@hidden>
Sent: 05 March 2017 21:33:52
To: address@hidden
Subject: Re: [gpsd-dev] [PATCH 3/3] Enable Windows version of gpspipe

On Sun, 5 Mar 2017, Robert Norris wrote:

> >> Use recv() rather than read() for Windows compatibility.
>
> > This seems like a good idea in general, though again it would be better to
> > confine the conditional include stuff to os_compat.h.
>
> This isn't a conditional. Using recv() with a 0 for the third parameter is 
> equivalent to using read().

Yes, I know.  I said "conditional include".  Maybe I should have said
"conditional #include". :-)

> However on Windows read() doesn't work with sockets, hence the need to use 
> recv() instead.

Indeed.  Using send()/recv() is perfectly reasonable in contexts known to
be sockets, while write()/read() are better for "genric stream I/O".

> select() on Windows is available via winsock2.h

OK, if that's the official place to get the definitions.  Windows wouldn't
be the only platform that kludged in BSD sockets as an afterthought and
implemented select() just for sockets, rather than for general file
descriptors.

> NB with the syslog compatibility patch (which I'll rework as requested)
> - gpxlogger builds without further changes.

Did you also try running it (to test my SIGQUIT fix)?

Fred Wright




reply via email to

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