[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Windows version of libgps
From: |
Robert Norris |
Subject: |
Re: [gpsd-dev] Windows version of libgps |
Date: |
Sun, 19 Feb 2017 12:11:55 +0000 |
Although Windows doesn't have unistd.h, the MingW system provides a minimal
version but lacks a fork() function - so it doesn't build for me.
Thus it would be better if the os_daemon() versions are decided by a #ifdef
HAVE_FORK instead.
This then builds on my set up and I've made a couple of changes to gpxlogger.c
to enable this to build on Windows (mostly disabling calls to syslog()).
I've yet to test it running but should be a useful utility on Windows (although
of course it will lack a daemonize option).
--
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: 18 February 2017 02:29:53
To: address@hidden
Subject: Re: [gpsd-dev] Windows version of libgps
On Tue, 14 Feb 2017, Robert Norris wrote:
> Regarding the patch(es) to enable a Windows version of libgps,
I merged those two patches, though I have a followup patch related to
os_daemon(), which does two things:
1) It provides a dummy always-failing version, rather than simply omitting
the function, in order to maintain API consistency.
2) It bases it on "not Unix" (specifically, the absence of unistd.h)
rather than the presence of Winsock.
I don't have a way to test this on Windows, so I haven't pushed it to
master yet, but it's available on my GitHub windows-fixes branch:
https://github.com/fhgwright/gpsd/tree/windows-fixes
Could you (Robert) test this on Windows?
> Sadly some hacks in the SConstruct file seem to be required to force cross
> compiling in scons.
As things presently stand, cross-OS cross-building doesn't work for
multiple reasons.
Fred Wright