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: Fred Wright
Subject: Re: [gpsd-dev] [PATCH 3/3] Enable Windows version of gpspipe
Date: Sat, 4 Mar 2017 15:22:41 -0800 (PST)

On Fri, 24 Feb 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.

The select-related stuff has issues here:

1) It's testing the nonexistent HAVE_SELECT_H instead of
HAVE_SYS_SELECT_H, so it's not including select.h on *any* platform.

2) It doesn't have an alternative for select.h in the Windows case, but is
still using select().

I believe the reason neither of these is causing trouble is due to an
indirect include via some other header, but that's fragile.

> Disable options not available on Windows (serial port, daemonize).

Again, at least until there's conditional manpage content, it's probably
better to include the non-working options, as long as the code builds and
fails correctly.

BTW, if daemonization support *were* conditional, it would be better to
define a flag for that specific purpose in os_compat.h, rather than
exposing the relationship between daemonization and fork().

Fred Wright



reply via email to

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