From MAILER-DAEMON Thu Feb 02 18:39:16 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cZQyB-00045l-W4
	for mharc-gpsd-dev@gnu.org; Thu, 02 Feb 2017 18:39:16 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47660)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cZQy7-00045e-Ka
	for gpsd-dev@nongnu.org; Thu, 02 Feb 2017 18:39:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cZQy3-0003lB-Kv
	for gpsd-dev@nongnu.org; Thu, 02 Feb 2017 18:39:10 -0500
Received: from col004-omc1s19.hotmail.com ([65.55.34.29]:61550)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cZQy3-0003ku-4M
	for gpsd-dev@nongnu.org; Thu, 02 Feb 2017 18:39:07 -0500
Received: from EUR02-AM5-obe.outbound.protection.outlook.com ([65.55.34.8]) by
	COL004-OMC1S19.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Thu, 2 Feb 2017 15:39:05 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=9kSjzd4zwMSjw2ahsx80ClLKuedYBhyxqR9P4Lv5jPI=;
	b=du18wFolaUcg81cD/sYTx8aUCY3O6oe0WF/6SB+SrEXRefwUSKrB1+QyEcKn5/iIZNK+3VyUMyjIeNlpcosd6MIket5zRQKw+bpK2B4UMxEM2jAmmvwbhCwls9GrawFQfwnhGe4s8xw/qNeL2w+l5AQPheHaR/CzNnlWokesyKDtMn2U48au0O3pFArYLPJMu0soXWKWNdGEvpLk+roBdeKsW4haf3VwSG1djnSCQHDYOnAKZO1WSWo5ocugyoSaq8xKWoXOSk6huTwJPCyn49M7xIbJgI2wSnc8IqsuRyWQvgfkSAxCUdtcjeL8FVG7/xtah6MxJix1Di6be1+dQw==
Received: from AM5EUR02FT003.eop-EUR02.prod.protection.outlook.com
	(10.152.8.52) by AM5EUR02HT206.eop-EUR02.prod.protection.outlook.com
	(10.152.9.193) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2;
	Thu, 2 Feb 2017 23:39:03 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.8.52) by
	AM5EUR02FT003.mail.protection.outlook.com (10.152.8.137) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Thu, 2 Feb 2017 23:39:03 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Thu, 2 Feb 2017 23:39:03 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH] Fix memory leak in Qt build.
Thread-Index: AQHSfa2JnlP2JxUeoUmlIu59f8gLZw==
Date: Thu, 2 Feb 2017 23:39:03 +0000
Message-ID: <AM4PR08MB0865B89680AA3FC05A6C64FD8E4C0@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:2B0665A314C5A77BA92D0B06176047230F1E7CBD0E69F3148D9E5623C7E080D3;
	UpperCasedChecksum:9A8E95001F4B7668005B76AA85C2229048FB5F2D014742190B192C7F5F9290A6;
	SizeAsReceived:7423; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; AM5EUR02HT206;
	5:4giBdvkPJpBoD03shp/7ta1o94lpHwJ+y9KNmVbsfeDshqVF54t4d671UolbPVrQ+Eor9gSf8Y5Ycd5gRQz+FIP/kabpIGRXBf2C8B4ZvP88vNrVl5jne/4seLWh523IDR1BYuR9uDj/tQndlCYRqA==;
	24:E4bQo1qGkWhbrUnLei0RgYq56cOzBhuh3GxOS9FGwDPlZZ9HmKZAHnvXq7Fa3jEf9plnZNF0LWPgJ/5jcC//tbfAzcXtMJDneFWWeqBtuU0=;
	7:iiGUznNoMwyDQFEFl7GmArHLbKmAdFUE/oXmXx0mcg1BMwYXCr0vgCCwmh6wKI6rNrgk+oNujs9IGKn5XMY0gQPi/ScbJIL0YY0dni8qciD0Je3f53UiZYbobRWH6ZPiCIiUSsiz0D3eNBMtQ/McR72NRznGXxY9YeagMEFtniI4MAUU5fTRd9TpNrIHm6yWP6l/U8WoiBP/IhjJjq+8CI9HGX54i+wD+Dguw3Xl+3BDWL6EldykDwXW7tUWi34nUbYqfqQoHlQKcrPab9u5fKfiou6d7jqtNqfVlX0dPTpMC2V528BLpyTcME2WjSysMptcWvAndoMVob1I9Pd6fIbYvzJZdUYLLJef1JXhMnO/vQ3jAgYGo2CQz0BV0ByrI+yFVZfzPS1QsBR3+eZL3RxDfIQCDF941HxEooaJBU5oHkVmETvNWDqNrf69xmY93kl4HZeWMTSP8ZKYxFH1jrEoPybUNKtbmBbnasktGubFI/BVGC4bkFzykOK+wDHsGHDfsU0ZtFZvR5fO6i+JsA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900005);
	DIR:OUT; SFP:1102; SCL:1; SRVR:AM5EUR02HT206;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 6f2594ad-dec6-42a9-a5b4-08d44bc4aa99
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(1601124038)(5061506426)(5061507331)(1603103135)(1601125106)(1701031045);
	SRVR:AM5EUR02HT206; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(444111334)(432015062)(82015046); SRVR:AM5EUR02HT206;
	BCL:0; PCL:0; RULEID:; SRVR:AM5EUR02HT206; 
x-forefront-prvs: 02065A9E77
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2017 23:39:03.1139 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT206
X-OriginalArrivalTime: 02 Feb 2017 23:39:05.0206 (UTC)
	FILETIME=[8A682160:01D27DAD]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.34.29
Subject: [gpsd-dev] [PATCH] Fix memory leak in Qt build.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Feb 2017 23:39:14 -0000

Since privdata is always allocated in gps_sock_open(),
it always needs to be free'd in gps_sock_close().
---
 libgps_sock.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libgps_sock.c b/libgps_sock.c
index 57da2f30..ea04b8cd 100644
--- a/libgps_sock.c
+++ b/libgps_sock.c
@@ -115,11 +115,10 @@ bool gps_sock_waiting(const struct gps_data_t *gpsdat=
a, int timeout)
 int gps_sock_close(struct gps_data_t *gpsdata)
 /* close a gpsd connection */
 {
-#ifndef USE_QT
-    int status;
-
     free(PRIVATE(gpsdata));
     gpsdata->privdata =3D NULL;
+#ifndef USE_QT
+    int status;
     status =3D close(gpsdata->gps_fd);
     gpsdata->gps_fd =3D -1;
     return status;
--=20
2.11.0



From MAILER-DAEMON Thu Feb 02 22:30:59 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cZUaR-0004Vb-0S
	for mharc-gpsd-dev@gnu.org; Thu, 02 Feb 2017 22:30:59 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48453)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cZUaO-0004VR-NS
	for gpsd-dev@nongnu.org; Thu, 02 Feb 2017 22:30:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cZUaL-0003Cl-Jm
	for gpsd-dev@nongnu.org; Thu, 02 Feb 2017 22:30:56 -0500
Received: from d.mail.sonic.net ([64.142.111.50]:36900)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cZUaL-0003Aa-9I
	for gpsd-dev@nongnu.org; Thu, 02 Feb 2017 22:30:53 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v133UlLL007277
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Thu, 2 Feb 2017 19:30:48 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v133Ulm3002938
	for <gpsd-dev@nongnu.org>; Thu, 2 Feb 2017 19:30:47 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v133Ul4Z002935
	for <gpsd-dev@nongnu.org>; Thu, 2 Feb 2017 19:30:47 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Thu, 2 Feb 2017 19:30:47 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB0865B89680AA3FC05A6C64FD8E4C0@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702021928330.1535@bolt.sonic.net>
References: <AM4PR08MB0865B89680AA3FC05A6C64FD8E4C0@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVbGoWGRg8LIWRQP7p3QOG9fHC3UPQNnxGlDs5RD8y5J0fVAb24CKG0Vr5UiK+/RxxbICVE+lzuGTwsJtQZDcjKi
X-Sonic-ID: C;XM5WJ8Hp5hGWhos6xpAcWQ== M;iEWGJ8Hp5hGWhos6xpAcWQ==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.50
Subject: Re: [gpsd-dev] [PATCH] Fix memory leak in Qt build.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 03 Feb 2017 03:30:57 -0000


On Thu, 2 Feb 2017, Robert Norris wrote:

> Since privdata is always allocated in gps_sock_open(),
> it always needs to be free'd in gps_sock_close().
[...]

Merged.

I only tested that it builds, since I don't have a way to test *running*
Qt, but the change looked straightforward enough.

Fred Wright


From MAILER-DAEMON Fri Feb 03 14:50:09 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cZjs1-0008B8-6x
	for mharc-gpsd-dev@gnu.org; Fri, 03 Feb 2017 14:50:09 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41554)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cZjrz-0008A2-08
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 14:50:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cZjrv-00049H-08
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 14:50:07 -0500
Received: from blu004-omc2s18.hotmail.com ([65.55.111.93]:54871)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cZjru-00049C-Op
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 14:50:02 -0500
Received: from EUR02-HE1-obe.outbound.protection.outlook.com ([65.55.111.73])
	by BLU004-OMC2S18.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 3 Feb 2017 11:50:01 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=BzHZyLBqQETHzecOumyJ7NXwpS5zrnHMybKAtJFIOa8=;
	b=ikSwvuhxomksY24Sjp8QgYBkA81VKuVqMqW7tQ1PpxJm4JnsleRzuFD8HyHPOjVxsIJHztfQQdOIuLzEw2PndKozKlgPGyBgYNz9XqmEKDiPdK+u8dkDSbKi8tX6UnO7juXLEE8/sDA204n6R0knVzUGTUYrlwTZmzJWF/Z7AxM8/6q63h/TTwzVOfYCJNbQpa4kU80EMDZYDZu7qACLIWE0vcRVoajAuZYMWHTg7JAaSkXyWp2i3mH2DVLNwh4HawoMFHT+ny2KecjZmlG8gloKD5Gy2uJ9qwFTi336YXA24HOsgPh6CaIczuuG3Xt3XU5qP6M6WijRhn38DiE4+A==
Received: from HE1EUR02FT053.eop-EUR02.prod.protection.outlook.com
	(10.152.10.58) by HE1EUR02HT010.eop-EUR02.prod.protection.outlook.com
	(10.152.10.106) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Fri, 3 Feb 2017 19:50:00 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.10.56) by
	HE1EUR02FT053.mail.protection.outlook.com (10.152.11.109) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Fri, 3 Feb 2017 19:50:00 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Fri, 3 Feb 2017 19:50:00 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [gpsd-dev] [PATCH] Fix memory leak in Qt build.
Thread-Index: AQHSfa2JnlP2JxUeoUmlIu59f8gLZ6FWoHWAgAERY9Y=
Date: Fri, 3 Feb 2017 19:50:00 +0000
Message-ID: <AM4PR08MB086586DB2591D133A28B48C98E4F0@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <AM4PR08MB0865B89680AA3FC05A6C64FD8E4C0@AM4PR08MB0865.eurprd08.prod.outlook.com>,
	<Pine.LNX.4.58L1X.1702021928330.1535@bolt.sonic.net>
In-Reply-To: <Pine.LNX.4.58L1X.1702021928330.1535@bolt.sonic.net>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:73ACD18610397B3C2320AB9E493364B727295D653C96BB6105EE06850FD3B30A;
	UpperCasedChecksum:CD8FE479B3104E18AD7C22C808B79E29F0459704393879792B7071A1FAC39A2C;
	SizeAsReceived:7830; Count:39
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [iHaJpjH1MO2fikWaolvb2+18250fczlD]
x-incomingheadercount: 39
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; HE1EUR02HT010;
	5:ff/OY2e+Pcgx7LqwBK/5oeU5FS2wy9RJuqFZqFfkUUM3D5ynDP62WilKLQtgZwPVfgJ8FBObD2iJj+dYCnI5oy6knREdXP0v68eoVExBF5bZtR7+VlkklBJdJdqe9upZidiKvW81PcQ9lUS9AXrGo/eOw752hUHQXoPCsMiFsew=;
	24:/JN8ncsw3w3Px70tXNBj2l8kIbzgRMVW7esELsbKf4tZ7nP2/L4Vy2VZsOKsLXelTCp54lIbztYvKr9Oa0uhI3vxGYnloukffegVbP3JO+s=;
	7:h78n8v8VV33gwiskiVBa+8/lZUEwuEoz6XbdkAc2c+KI24RwXqjQOvAsuYtTqEQWHxWdIHkiDBjNjmcV5UFl55ixYoInzesJT26QBd5QQJPY/12oAM1asI0TVmNf5gGP7i9zbAnBPxltB05QcuQ2/3vRHjEsfIzjhcKshdJP2ZRPIQMz4XMFhgAfM5aPtL1TkJ7tRYui9IqbNCxbHZVWSRYt6xNf3XiuVPAkQ2qLC9hngxqnw/gzye6kvrznA9R6K08xTKRm97D9KIDc7qm6lRJLaYUcax1f+JYSlP6FiJPSzAqCxEAak+vurlOAJ0yYzxa5UyQjkBb0cuooI+lph4Gc6yKiNOtoocADnQsGiKMnhUDkpj+TJYFQ35Xf4AKFh9ojRq3euHBEshIbItDL4uefbFp5CSk/pW4439gSIyWQsAr32WbYnXwWXaUpnheGJQqsbdb96fmZCnHtzXaXkdusbJPN7znxfNHWZNahFpA9vDFE8D9+mvsPDR5V9hDy8z+10AWdEnW4v7Pm4VVQnA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900005);
	DIR:OUT; SFP:1102; SCL:1; SRVR:HE1EUR02HT010;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: d6081f64-493a-4f82-115c-08d44c6dd6d2
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(1601124038)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:HE1EUR02HT010; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(444111334)(432015086)(82015046); SRVR:HE1EUR02HT010;
	BCL:0; PCL:0; RULEID:; SRVR:HE1EUR02HT010; 
x-forefront-prvs: 02070414A1
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2017 19:50:00.4382 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT010
X-OriginalArrivalTime: 03 Feb 2017 19:50:01.0906 (UTC)
	FILETIME=[B52CB920:01D27E56]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.111.93
Subject: Re: [gpsd-dev] [PATCH] Fix memory leak in Qt build.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 03 Feb 2017 19:50:08 -0000

Thanks for applying the patch.

I have tested it :) and I can also provide patches to:

1. Restore building the test_qgpsmm program (as per a previous email about =
Qt stuff)
2. Modification to test_gpsmm.c to accept input options and provide a way t=
o make it end cleanly - thus enabling to trace memory leaks.
(rather than always entering a forever loop).
    ATM my patch uses getopts() which whilst not being especially C++esque,=
 it's simpler than requiring boost::program_options (when Boost otherwise n=
ot needed) or some other C++ way of dealing with command line.

Interestingly using Qt4 by default showed some Qt internal issues - whether=
 they were really real or not I don't know.
But forcing using Qt5 no issues were found.

I notice there is a 'valgrind-audit' for gpsd but that appears tailored for=
 the daemon.
Using python gpsfake appears to directly handle the client side interface, =
bypassing the libgps C/C++ code.

So I'm thinking to extend gpsfake to have options/capability to spawn the t=
est libgps/lib(Q)gpsmm and thus automatically check memory allocation.


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

________________________________________
From: gpsd-dev <gpsd-dev-bounces+rw_norris=3Dhotmail.com@nongnu.org> on beh=
alf of Fred Wright <fw@fwright.net>
Sent: 03 February 2017 03:30:47
To: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [PATCH] Fix memory leak in Qt build.

On Thu, 2 Feb 2017, Robert Norris wrote:

> Since privdata is always allocated in gps_sock_open(),
> it always needs to be free'd in gps_sock_close().
[...]

Merged.

I only tested that it builds, since I don't have a way to test *running*
Qt, but the change looked straightforward enough.

Fred Wright



From MAILER-DAEMON Fri Feb 03 19:49:44 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cZoXw-0007Rn-Ax
	for mharc-gpsd-dev@gnu.org; Fri, 03 Feb 2017 19:49:44 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:32981)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cZoXu-0007Rc-5f
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 19:49:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cZoXr-0006a3-3S
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 19:49:42 -0500
Received: from bay004-omc1s26.hotmail.com ([65.54.190.37]:59478)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cZoXq-0006Yy-Kv
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 19:49:39 -0500
Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.54.190.59])
	by BAY004-OMC1S26.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 3 Feb 2017 16:49:36 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=TD+l6CZX1DNuye+p6kbT4mTBhRBps0hsLsOzR+nA7Bs=;
	b=XV4/bb1Dpi/7uZ9N0cL18ZlTYdR6bwarE3hV0PTVz0xu56l8NKPN62DqEcEv+1axWXtmhoNYkZNmSWfc9Gdg1zIWgVba8XlkrpBoF3r7Iwi6BoT9302W66fDDqZQHKrGrh/TbZKOEPUMfNxjXiIm2f5jxQKVy5edmSoiQgaW25RVPsvB776fS9NTYncFkLIVwLUC8DOyfLkSRSsY14oeS6TCdtgO78eGHdy08cN1qrkWUhzdkSgr0+4X5Pc1uEjvd+kBgH626MHdDIob20qGTsREzHrXW2CwGynCrsyi7zyGPueuKS7SNjXpKIaQ69IzrLMGsvMcYDbfWD5MGoZC6Q==
Received: from DB5EUR01FT051.eop-EUR01.prod.protection.outlook.com
	(10.152.4.59) by DB5EUR01HT033.eop-EUR01.prod.protection.outlook.com
	(10.152.5.155) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2;
	Sat, 4 Feb 2017 00:49:34 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.4.51) by
	DB5EUR01FT051.mail.protection.outlook.com (10.152.5.6) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Sat, 4 Feb 2017 00:49:34 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Sat, 4 Feb 2017 00:49:34 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 1/2] libgps was renamed to test_libgps some time ago.
Thread-Index: AQHSfoCN4Erds6q0XEOUPO2UGn+KBg==
Date: Sat, 4 Feb 2017 00:49:34 +0000
Message-ID: <AM4PR08MB0865B3B7659DAAD297F50C028E4E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:70B0865E03A05453216604C27DFAAAE95298B932B359B4F383ABA9DBAE5B3EB3;
	UpperCasedChecksum:BA3E924C01355EC77B8937BF8CC724F32F06AF7AFD1B9BD11F60D69F7C71EBF6;
	SizeAsReceived:7470; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; DB5EUR01HT033;
	5:fV3JTaokzQC0drKrlv0CxNCMyW2JtwoEOZOOq8wv9yXFMXBYtm8B4OOLk7r0wOM9h4mmykGj7PfXygNbZtmtvUiv809pF4UYfmG38O37+R3xv5RdrHdS8BC9N5X+Y9mREt3m4iTX0ysGYXmzCe65Jw==;
	24:lqq9749JLXCw3JDAuGMnj2qtEMbDgJugPFfciHgLDyVTsAPaHvkLhafVjPbCljjvq+gJORhFJhSiWadDSYuwLGjvl6xFTzU3KjX5qL0Rais=;
	7:Ps36bsVYx4CbUBxKAP5S8etGodhwZcrIMk8o7eK6g+6vdYTUBdURzddeex1NoGkaoTFSsd1udShG2dWMCRDWWZpxoO+UAA3rDrEYfAtdbA2tA0dTPPERFqUYDTHuBpu4eiyDMfu91t/wm/WS0w2RHQlh4FS2i5lvL3+D5q4HZMTSGcBwVHeZ4J2iamrfeXZ7KO/Vl/j52fQNu4mRZT9j92XoQ45Ky0uIOlperp0CNNZit6yg/xVJkgMMsTMjm2iomwyonKch4DTKOlQynbSd09v+eLxeyVI2SkqF/+CizX28w98TOjlpmnrwgURvYFtdY5hh6LFWugRx8bxH22PJtKHlFvYtR4ZhlWJDZanUO4nQBvgFpxE27gS2m6OnTDZSmyEKqGP9EX76+YgviVybef71rsaMwgYUCJiOvZcgwJiHTWcwMa3+KLPaNimBNsGpHkmj9TCPzTY8qbaL1VCQx/CzMGJK/anEz5jkJ2TdASuvwnIpR6cIGyq4+Crh/L584ob0j4h2AVcrizwA3hOUDg==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900005);
	DIR:OUT; SFP:1102; SCL:1; SRVR:DB5EUR01HT033;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: aeaa3887-6be8-424b-059f-08d44c97af67
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:DB5EUR01HT033; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(444111334)(432015086)(82015046); SRVR:DB5EUR01HT033;
	BCL:0; PCL:0; RULEID:; SRVR:DB5EUR01HT033; 
x-forefront-prvs: 020877E0CB
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2017 00:49:34.4338 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR01HT033
X-OriginalArrivalTime: 04 Feb 2017 00:49:36.0892 (UTC)
	FILETIME=[8F19EBC0:01D27E80]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.37
Subject: [gpsd-dev] [PATCH 1/2] libgps was renamed to test_libgps some time
 ago.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 04 Feb 2017 00:49:43 -0000

TESTED:
Commands like these now work:
./regress-driver -v -c test/daemon/garmin-10x.log.chk
---
 regress-driver | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/regress-driver b/regress-driver
index 0ca349bc..bc33e7b8 100755
--- a/regress-driver
+++ b/regress-driver
@@ -196,7 +196,7 @@ case $mode in
         for f in $*; do
 	    case $testing in
             daemon) ${PYTHON} ${PYTHON_COVERAGE} ${GPSD_HOME}/gpsfake -s 3=
8400 -1 -p $opts ${f} | ${GPSFILTER} ;;
-            clientlib) ${GPSD_HOME}/libgps -b <${f} ;;
+            clientlib) ${GPSD_HOME}/test_libgps -b <${f} ;;
             esac
         done
         status=3D0
--=20
2.11.0



From MAILER-DAEMON Fri Feb 03 19:49:48 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cZoY0-0007U7-7p
	for mharc-gpsd-dev@gnu.org; Fri, 03 Feb 2017 19:49:48 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:32994)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cZoXy-0007Su-2K
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 19:49:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cZoXu-0006cq-Vj
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 19:49:46 -0500
Received: from bay004-omc3s14.hotmail.com ([65.54.190.152]:52614)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cZoXu-0006bx-Lr
	for gpsd-dev@nongnu.org; Fri, 03 Feb 2017 19:49:42 -0500
Received: from EUR01-DB5-obe.outbound.protection.outlook.com ([65.54.190.188])
	by BAY004-OMC3S14.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 3 Feb 2017 16:49:41 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=FgQb7QdB87IHxlCW5YIx24F3JlOToYC+QInoaeO+PlA=;
	b=mD/KU89kGLXXlUKt6PtJDFitf+OHN4MtZ/FLhRC5hGLDQX8Us6uZhw0iMVVTlodTv6K/FL99xlXE3xnjDyNfifRJ4zAxxjicbQTXG+lPgKxOGw9Hp7MXM59DRsm8qOEBLuL5XDlOCwpPCjeQ27409Z9xPrZGxUZ4uqn5cmp8CJHeBv54vpNh1Fdj0V0D9xYTv39Z7vXRuJREG0rCz3pXEWHLRl5gE8cOtIiknOxkqbWabRE7jS0Uyk68lourrXtf29jVtqkjDsEAkK6P4/Q9AMeYlXw1Na0zdMEDv1o5eFOWBSK4XD+7v9Ufn3RezFDCRqkA0w1H9Knf+7Uwl498KQ==
Received: from DB5EUR01FT051.eop-EUR01.prod.protection.outlook.com
	(10.152.4.56) by DB5EUR01HT190.eop-EUR01.prod.protection.outlook.com
	(10.152.5.251) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2;
	Sat, 4 Feb 2017 00:49:39 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.4.51) by
	DB5EUR01FT051.mail.protection.outlook.com (10.152.5.6) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Sat, 4 Feb 2017 00:49:38 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Sat, 4 Feb 2017 00:49:39 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 2/2] Fix typo
Thread-Index: AQHSfoCQZBN6MaKfjkyqV9ilzHCRyQ==
Date: Sat, 4 Feb 2017 00:49:38 +0000
Message-ID: <AM4PR08MB086552036646D0CA7D1D19498E4E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170204004902.6321-1-rw_norris@hotmail.com>
In-Reply-To: <20170204004902.6321-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:617F4DF17D03D99D8A9ED539B8F8BE34AE655980140018E1069465D6EAF16D7D;
	UpperCasedChecksum:1974D060F91456E54FF7E0EDA72CCCA750B0A044FBC5E622EAF4AED6E2F495BB;
	SizeAsReceived:7442; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; DB5EUR01HT190;
	5:j5OzKulqjw9/SAU5zYX15sokxiVz6oggXjMO53CMkYgLbWCPba9+PiGP9u48OwKps2qAsrZdUgHGDBsqEWThBfKa3P5XkHDMnvMH8UWuJBmEgm1oPSTlZ220xDB1ICH4YD1fMdLtN6zmC/16jgAn7g==;
	24:y9/6bySVBX82rPxv7UmJGT0Csk4Aif7btw9+mnltJhxOeYy6kHLrg9bUmrSbZjkqo9GSkXVL4m7bRhJ4gV8xLQEceAmK/BnaxQLT3l7Lu3M=;
	7:D2GH15S5AaS6oe4eEHtq981Q8/mI3mQNgcQSGENtSY5y5lNK+x46ZBQp/RhNQZa6PZt0/5FVvDFt0NxNiPWpQyPGCU4DmQAhGDgoD+5ngeu+tAQGh/D0dfiX2HJsOA5wQV2CtQo/kaQchj7P2fx7Cd71n8tRaPUgvxHeSfjArbwikSB5XYRIxqSyO1oamrHM9KPO1G3vEFolYKy5gcU002cDV+p2gxDrG2WtTDRJ3ij6mnOQKecQ4TG4YMZh/x8XrGV+LvcsXA/avIBjkm2lkF5SjDlioEsYR5L/IJLPrUKpH+zG7LN+2kADssbBUqsSO5c1ffUhWZDf1gkYDcQLqv6xlQ0So07SyTIyfEQvXIj51aEMjNJnn76/5GurngmzlYdKqB7KV+1yF8z6R9XtLDFgVjj8qnTcc1JmwG1blYMcuNnoYfAvtgiQPBbiwaOiVEFWU/DD77BvDeeLzFnbpO4HuJ0cKpf4iPCwAt5NCYZrOupQpCvfoEyFQIYewnZov8Hucx5SiKalffYJK//oHg==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900005);
	DIR:OUT; SFP:1102; SCL:1; SRVR:DB5EUR01HT190;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 4f92e227-da6b-4bc3-d693-08d44c97b23b
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:DB5EUR01HT190; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(444111334)(432015086)(82015046); SRVR:DB5EUR01HT190;
	BCL:0; PCL:0; RULEID:; SRVR:DB5EUR01HT190; 
x-forefront-prvs: 020877E0CB
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2017 00:49:38.9809 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR01HT190
X-OriginalArrivalTime: 04 Feb 2017 00:49:41.0227 (UTC)
	FILETIME=[91AF63B0:01D27E80]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.152
Subject: [gpsd-dev] [PATCH 2/2] Fix typo
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 04 Feb 2017 00:49:46 -0000

---
 regress-driver | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/regress-driver b/regress-driver
index bc33e7b8..928543fd 100755
--- a/regress-driver
+++ b/regress-driver
@@ -99,7 +99,7 @@ GPSFILTER=3D"sed -e /^gpsd:/d -e /^gpsfake/d -e /GPS-DATA=
/d -e /WATCH/d -e /DEVICE
=20
 # Use ALTFILTER to set up custom filtering when a regression test fails
 # This example filters out altitude and some fields computed by gpsd's err=
or
-# modeling - these are fragile in the prsence of changes to the fix-buffer=
ing
+# modeling - these are fragile in the presence of changes to the fix-buffe=
ring
 # logic. Note that as the last attribute mode needs to be handled differen=
tly.
 #ALTFILTER=3D"-e s/\"alt\":[^,]*,// -e s/\"ep[vhs]\":[-+0-9.]*// -e s/,\"m=
ode\":[^}]*//"
=20
--=20
2.11.0



From MAILER-DAEMON Sun Feb 05 06:44:45 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1caLFM-0002lW-T0
	for mharc-gpsd-dev@gnu.org; Sun, 05 Feb 2017 06:44:44 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48849)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1caLFK-0002lI-8w
	for gpsd-dev@nongnu.org; Sun, 05 Feb 2017 06:44:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1caLFH-000574-8h
	for gpsd-dev@nongnu.org; Sun, 05 Feb 2017 06:44:42 -0500
Received: from snt004-omc2s34.hotmail.com ([65.55.90.109]:62579)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1caLFG-00055w-SL
	for gpsd-dev@nongnu.org; Sun, 05 Feb 2017 06:44:39 -0500
Received: from EUR02-AM5-obe.outbound.protection.outlook.com ([65.55.90.73])
	by SNT004-OMC2S34.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Sun, 5 Feb 2017 03:44:37 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=EerBusMm5rli/lvaus+dLYjgjH8zJ5gw5NctFF3skVg=;
	b=SZNM+J+0WsvI694CQ1IwMOMZ4+z60+LvrH2Sv5rON5qYZdmdvJjWc6eGhDXoLbFnG+lsRPoUHCng5Pz6//LVD5qJgRAl+Wwgt0FobW4CAeJtuplfHezTpkUfu7Wu98aUg3qikKQq+G9jjZpqsRV+w+VEpew62bk6cosb8IOY9gaPhPZplH8V3Cr72YfR+6BdGE3btLY3ad6upFLtHF95j6tkF2EYacEkewUlWSC9VJ4LMI53H6fo1lYEtJQ+4l7Z3wKGuQIDG2mCOGwEJUSeQckO8rCP8Mwcy+gITKP5QBzn04hHtZunr1/CqO4Ut6oZ9VHYSm9tWbxUXvCaLEul6A==
Received: from VE1EUR02FT022.eop-EUR02.prod.protection.outlook.com
	(10.152.12.59) by VE1EUR02HT035.eop-EUR02.prod.protection.outlook.com
	(10.152.13.92) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Sun, 5 Feb 2017 11:44:32 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.12.57) by
	VE1EUR02FT022.mail.protection.outlook.com (10.152.12.79) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Sun, 5 Feb 2017 11:44:32 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Sun, 5 Feb 2017 11:44:32 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH] Add documentation for -T option in gpsfake.
Thread-Index: AQHSf6U39a6Xo5Ee202B0UJz2yLs/Q==
Date: Sun, 5 Feb 2017 11:44:32 +0000
Message-ID: <AM4PR08MB08650F283E4A7AD4AA8396DF8E410@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:DF124EE4C89A770EB59F24C8D1577BED0258F67339D0CDBF7100295F05A4ABA3;
	UpperCasedChecksum:6B17A23798AA07BEB1FB6516A6FC884535BB74740755D917F549FA4D1C5C0089;
	SizeAsReceived:7452; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR02HT035;
	5:GhmBLix1vn8ScLrSNmlP5cgg2Q6WnyUcV5TajE6gynd5E8Vf8cxiWZo2hX0USPkmpvC22fbnZ98dWI2If7A5kx6865Tn0vzvRI9lEFFbMvB/dokaE5QCEg0IGO93pYRiZM6v7YXUDgSc7tMkTdc9vk1nR18fdmIepGgUdToAMY0=;
	24:/kRMuX29eYxfLStlu/GsdLhUtUA2oDIksXG6SQ//X8pCrIGi39t/t7erEfac1Nw8DcSVOTnRaKwboUEOwZwQwj+8tD0uUqyaFLff7aELNH0=;
	7:+LGdDOAwrqii6uOefHI5SWmd2rWmh1a2W0UgBKs7Ic6X4ILPW6xbs0vasgTRISFAU9BJPLIwTUYR3PgsfUXcFXtfvVCVQ30ZKwj5GjQbiazH0PynuhcKiXB2GZLqZC/RbrcWyLM/XVXPLBU12CwUoVRdzVZURDG9F04KGPiR/qZDITu9lZEnvogKGMiaVMIHn7WY+VYJkS99awaD+v6tLVTqJ4CZ2P/Bayss0UkklUVhtL1Z4Pexi1sUrWleBQ3E1E2T2vD+PgQXSwstdlNsglGmI2AQPFWxdHyUa/g7IovJQtg7gF9AY0xrCCpqwE7JovNON4KZobOPILvpWvHdALVfVXPRxhHrmnG6lNsi9g5CQEbhpQMqLtMXcipkXHcHrLlfptlQzL659Gu6KvsWGZYg3Hv1pQUITo5403N8CPSYCnFcxDMsOB5FG+xF78Zy0f5OZadbSV4LVnOBWeFjL04ewnF//Q94jPym7Hpdr6s8pSsSImZfpn+4w8VK8cGwnny1HKOBjO/ERjwqEeD/iA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900005);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR02HT035;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: a7af2847-dc6a-4416-33c1-08d44dbc592f
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:VE1EUR02HT035; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(444111334)(432015086)(82015046); SRVR:VE1EUR02HT035;
	BCL:0; PCL:0; RULEID:; SRVR:VE1EUR02HT035; 
x-forefront-prvs: 0209425D0A
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2017 11:44:32.4664 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT035
X-OriginalArrivalTime: 05 Feb 2017 11:44:37.0207 (UTC)
	FILETIME=[3A53D670:01D27FA5]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.90.109
Subject: [gpsd-dev] [PATCH] Add documentation for -T option in gpsfake.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Feb 2017 11:44:43 -0000

---
 gpsfake.xml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gpsfake.xml b/gpsfake.xml
index 7b4af7f3..b0cf2f17 100644
--- a/gpsfake.xml
+++ b/gpsfake.xml
@@ -40,6 +40,7 @@ BSD terms apply: see the file COPYING in the distribution=
 root for details.
       <arg choice=3D'opt'>-S</arg>
       <arg choice=3D'opt'>-u</arg>
       <arg choice=3D'opt'>-t</arg>
+      <arg choice=3D'opt'>-T</arg>
       <arg choice=3D'opt'>-v</arg>
       <arg rep=3D'repeat'>
             <arg choice=3D'plain'><replaceable>logfile</replaceable></arg>
@@ -151,6 +152,9 @@ rather than pty devices. Besides being a test of TCP so=
urce handling,
 this may be useful for testing from within chroot jails where access
 to pty devices is locked out.</para>
=20
+<para>The <option>-T</option> makes <application>gpsfake</application> pri=
nt
+some system information and then exits.</para>
+
 <para>The <option>-u</option> forces the test framework to use UDP
 rather than pty devices. Besides being a test of UDP source handling,
 this may be useful for testing from within chroot jails where access
--=20
2.11.0



From MAILER-DAEMON Mon Feb 06 15:55:55 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1caqKJ-0001V8-1P
	for mharc-gpsd-dev@gnu.org; Mon, 06 Feb 2017 15:55:55 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37269)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1caqKF-0001V2-Rh
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 15:55:53 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1caqKB-0005hM-Vs
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 15:55:51 -0500
Received: from col004-omc2s10.hotmail.com ([65.55.34.84]:59487)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1caqKB-0005h8-9A
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 15:55:47 -0500
Received: from EUR02-AM5-obe.outbound.protection.outlook.com ([65.55.34.71])
	by COL004-OMC2S10.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Mon, 6 Feb 2017 12:55:45 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=ik9Zz3VjjBYmogeYRO/KtPvzFPO8nzrKGbJnyQzGlCw=;
	b=XQAGpSQ/6ZO730eRApX21oWHAe5KKAM7cercatDX6ArIQzTprHFfZFNfweLR5WjWIXhocDhM9Gy0ZWYH6UMZLvBIRNbK3W09Fe2CC4QXbrIuKiFHGJbXLa7IIUfY8gPPBNnujdSb+/OYtHHVWmzjR4ZB20TeJjb+c1ha76m/i5qIeSCfhQ8l/r/2wHnIbLn/gtYrNppOLFRze48jKLKR5GtP34LKeunwW3VZ1VfAkkI2DLg49VD2IdZhzeVDnAUltWOJsk9QdfpXT/iwX5F/2pIhaH5ECMZlqXCqpe8+u21KZgWvY1pgN6Pz6Oo+DgUsXmpDMa+Nj1B0Y/zrt5fqjQ==
Received: from AM5EUR02FT054.eop-EUR02.prod.protection.outlook.com
	(10.152.8.56) by AM5EUR02HT045.eop-EUR02.prod.protection.outlook.com
	(10.152.9.32) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Mon, 6 Feb 2017 20:55:43 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.8.51) by
	AM5EUR02FT054.mail.protection.outlook.com (10.152.8.200) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Mon, 6 Feb 2017 20:55:43 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Mon, 6 Feb 2017 20:55:43 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 1/2] Man page for libgpsd no longer exists. Replace with
	libgpsmm which does.
Thread-Index: AQHSgLthxKs9Bn2wx02uxPPfEQ2jkA==
Date: Mon, 6 Feb 2017 20:55:43 +0000
Message-ID: <AM4PR08MB086532875B0B78AD9D2BB54C8E400@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:5EC831EB7980D81430CFE34A790F8B76F20403A02F8CC16D84B58D46C03B87CC;
	UpperCasedChecksum:0E19603DF7C11F13A7697949E21958D81553AD998FAADA9E0650B1B3A5F3207A;
	SizeAsReceived:7524; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; AM5EUR02HT045;
	5:ic64QwZO9+i2CDQSFyTn3Nw+d24G+CXReSyC4n/blZ1i+PRugTP8uONk0zyxOzXaEbLKDAirsUKM3WpNWCNn4xaqRjdCDC+U+328Fbl773Zz48vjhFXj0m7o9/dJfjYjONBpiIy8KA0tizcqdcBXyw==;
	24:C6Ph9Z5aS9i45KCAB7207R10OgNXFpmw4Qq4duRELOFXJTvW2WRs33sJns73klb3suqX/VvfEuyRml2VBETDqY1BqrKxQNq/8SusOAtgFYA=;
	7:qh9k/y7I/njqi9OwUJDnYIQsNWuJbIa0ZWqbQn/sVQEkA1RCAAaAjxJW5bmwJgd3tM3n6NJC4oRi+M0qBZ+R8wtGmozXn/Il+nkVXNzdaGeXaVreMmr00bAYfiKEnPtvrtUI/0JdK8bhEyFY/uOBByUyA4TAodwnmsP5fWIeQ6l1PLTub+oflHZBBqUZSebCwEGGKTOe8RYhPKovx+36I7aRyUlfhZ2O45tKTA0H6v59/y+5FURDablmfb+7y+aunJRf7LCnR2Fzf1P2P0KtQsduX6GIXqoedv5svn2civc+GoLH2KTDiDC4jAwnkh4tvUThaSKVFZbwSnw35UzuMv2v3mq4JzBcwVqHe0HJayzSh3/lmVQYvXlngKccgcLSBziqbZZ5yp/g8df6NomWN6WGDbWIDK2fTW8KgwS0DgJSopBMTB4pBQyay0FBtPnL0LoRUmhQ/DUShzd/hdc12yeDr/F20EJ6vMt5177EErixFDWPvCHBTXpG/+zxLfq941m/gGNiDX38efYPgWUA3Q==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900005);
	DIR:OUT; SFP:1102; SCL:1; SRVR:AM5EUR02HT045;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: bb094fe0-8fd7-4496-15f4-08d44ed282cc
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:AM5EUR02HT045; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(444111334)(432015086)(82015046); SRVR:AM5EUR02HT045;
	BCL:0; PCL:0; RULEID:; SRVR:AM5EUR02HT045; 
x-forefront-prvs: 0210479ED8
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Feb 2017 20:55:43.0907 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT045
X-OriginalArrivalTime: 06 Feb 2017 20:55:45.0299 (UTC)
	FILETIME=[62DBFE30:01D280BB]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.34.84
Subject: [gpsd-dev] [PATCH 1/2] Man page for libgpsd no longer exists.
 Replace with libgpsmm which does.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Feb 2017 20:55:53 -0000

---
 gps.xml       | 2 +-
 gps2udp.xml   | 2 +-
 gpscat.xml    | 2 +-
 gpsctl.xml    | 2 +-
 gpsd.xml      | 2 +-
 gpsdctl.xml   | 2 +-
 gpsdecode.xml | 2 +-
 gpsfake.xml   | 2 +-
 gpsinit.xml   | 2 +-
 gpsmon.xml    | 2 +-
 gpspipe.xml   | 2 +-
 gpsprof.xml   | 2 +-
 libgps.xml    | 2 --
 ntpshmmon.xml | 2 +-
 srec.xml      | 2 +-
 15 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/gps.xml b/gps.xml
index cff51c2c..f7747a02 100644
--- a/gps.xml
+++ b/gps.xml
@@ -343,7 +343,7 @@ after that.</para>
 <para>
 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum><=
/citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
 <citerefentry><refentrytitle>gpscat</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
diff --git a/gps2udp.xml b/gps2udp.xml
index 8f0f5883..4df652e9 100644
--- a/gps2udp.xml
+++ b/gps2udp.xml
@@ -110,7 +110,7 @@ mode</para>
 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum><=
/citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
diff --git a/gpscat.xml b/gpscat.xml
index 877c05f5..70e0850d 100644
--- a/gpscat.xml
+++ b/gpscat.xml
@@ -118,7 +118,7 @@ devices.</para>
 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum><=
/citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>.
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
diff --git a/gpsctl.xml b/gpsctl.xml
index 5dfa8c05..4c3c4d33 100644
--- a/gpsctl.xml
+++ b/gpsctl.xml
@@ -271,7 +271,7 @@ reliable in client mode.  This will be fixed in a futur=
e release.</para>
 <citerefentry><refentrytitle>gpsdctl</refentrytitle><manvolnum>8</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>.
 </para>
diff --git a/gpsd.xml b/gpsd.xml
index ef8e9087..2d5fd490 100644
--- a/gpsd.xml
+++ b/gpsd.xml
@@ -877,7 +877,7 @@ Version 1.0</citetitle></para>
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
 <citerefentry><refentrytitle>gpsd_json</refentrytitle><manvolnum>5</manvol=
num></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
diff --git a/gpsdctl.xml b/gpsdctl.xml
index 97719a32..36209afe 100644
--- a/gpsdctl.xml
+++ b/gpsdctl.xml
@@ -68,7 +68,7 @@ failed, 0 otherwise</para>
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>.
 </para>
diff --git a/gpsdecode.xml b/gpsdecode.xml
index 079c88b6..cfcc38eb 100644
--- a/gpsdecode.xml
+++ b/gpsdecode.xml
@@ -134,7 +134,7 @@ dump.</para>
 <citerefentry><refentrytitle>gpsdctl</refentrytitle><manvolnum>8</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 </para>
diff --git a/gpsfake.xml b/gpsfake.xml
index b0cf2f17..f13efd66 100644
--- a/gpsfake.xml
+++ b/gpsfake.xml
@@ -242,7 +242,7 @@ to the PATH environment variable</para>
 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum><=
/citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
 <citerefentry><refentrytitle>gpspipe</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>
diff --git a/gpsinit.xml b/gpsinit.xml
index b95e43d4..427a82b5 100644
--- a/gpsinit.xml
+++ b/gpsinit.xml
@@ -160,7 +160,7 @@ connection to a NMEA2000 network. It will set the baudr=
ate to
 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum><=
/citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>.
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>.
 </para>
 </refsect1>
=20
diff --git a/gpsmon.xml b/gpsmon.xml
index 5dcb75f8..c367331b 100644
--- a/gpsmon.xml
+++ b/gpsmon.xml
@@ -410,7 +410,7 @@ mode.
 <citerefentry><refentrytitle>gpsdctl</refentrytitle><manvolnum>8</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
diff --git a/gpspipe.xml b/gpspipe.xml
index 1796f81f..8021591d 100644
--- a/gpspipe.xml
+++ b/gpspipe.xml
@@ -146,7 +146,7 @@ standard output, then exit.</para>
 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum><=
/citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
diff --git a/gpsprof.xml b/gpsprof.xml
index 83d5997d..78ecd2e3 100644
--- a/gpsprof.xml
+++ b/gpsprof.xml
@@ -196,7 +196,7 @@ first number in the startup message is the process ID t=
o signal.</para>
 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum><=
/citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
 <citerefentry><refentrytitle>gpscat</refentrytitle><manvolnum>1</manvolnum=
></citerefentry>,
diff --git a/libgps.xml b/libgps.xml
index 0d18ece8..b96b7932 100644
--- a/libgps.xml
+++ b/libgps.xml
@@ -367,8 +367,6 @@ in <filename>gps.h</filename> for recent changes.</para=
>
 </citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum>
 </citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m>
-</citerefentry>.
 <citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um>
 </citerefentry>.
 </para>
diff --git a/ntpshmmon.xml b/ntpshmmon.xml
index 396f1ab6..343b3f18 100644
--- a/ntpshmmon.xml
+++ b/ntpshmmon.xml
@@ -153,7 +153,7 @@ option will normally only be of interest to GPSD develo=
pers.</para>
 <citerefentry><refentrytitle>gpsdctl</refentrytitle><manvolnum>8</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>.
 </para>
diff --git a/srec.xml b/srec.xml
index 381dcb67..0e4e5be8 100644
--- a/srec.xml
+++ b/srec.xml
@@ -292,7 +292,7 @@ indicating the starting execution address.  </para></li=
stitem>
 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum><=
/citerefentry>,
 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></=
citerefentry>,
 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum=
></citerefentry>,
-<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnu=
m></citerefentry>,
+<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvoln=
um></citerefentry>,
 <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>.
 <citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnu=
m></citerefentry>.
 </para>
--=20
2.11.0



From MAILER-DAEMON Mon Feb 06 15:55:59 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1caqKN-0001XP-6l
	for mharc-gpsd-dev@gnu.org; Mon, 06 Feb 2017 15:55:59 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37301)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1caqKK-0001Vk-Du
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 15:55:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1caqKG-0005ij-Jd
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 15:55:56 -0500
Received: from snt004-omc2s19.hotmail.com ([65.55.90.94]:52229)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1caqKG-0005i9-CJ
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 15:55:52 -0500
Received: from EUR02-HE1-obe.outbound.protection.outlook.com ([65.55.90.73])
	by SNT004-OMC2S19.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Mon, 6 Feb 2017 12:55:51 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=EduJF8pwk0JyMNQIigDn2aJasWZTJeHo3UrbqeFwdpM=;
	b=Np4HaLBKZlQYBIiUVVCnwFiXBUQSx949fHlXWuO6T1Eb7fjFRjszwPSpMNpl+pFQXp2Lzj2UKOt/f24nBbPrSL2mLJFBUtEL6R748VbSnjYY3PcezouGLMXPagdPpwGXzmUuxtYX7XjiM4SHYSO5DrrDw7aFCngGEjJyqCZUY4DNLMcvBgqVoqfS39OrLGSw9LI6Ov3i22bfQq5pGm+RLwkNlm9o9fXQuG9GdfccOYGJ+jCezrT5jcti321oXVAxkNFEogY1kUi70PSFBoY7ydlRpmXpGuCp5xT3/I0L61rMtYcAfaqcq7tuMErZW9OGoDpjuRcXKIwjSJ71kotr4A==
Received: from AM5EUR02FT054.eop-EUR02.prod.protection.outlook.com
	(10.152.8.53) by AM5EUR02HT249.eop-EUR02.prod.protection.outlook.com
	(10.152.9.214) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Mon, 6 Feb 2017 20:55:49 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.8.51) by
	AM5EUR02FT054.mail.protection.outlook.com (10.152.8.200) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Mon, 6 Feb 2017 20:55:49 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Mon, 6 Feb 2017 20:55:49 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 2/2] Ensure gpsd test programs are also built as part of
	Travis CI.
Thread-Index: AQHSgLtl0xErn7fDX0GpQlbUYb0/uA==
Date: Mon, 6 Feb 2017 20:55:49 +0000
Message-ID: <AM4PR08MB0865841A9C21B3BE332823998E400@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170206205522.10170-1-rw_norris@hotmail.com>
In-Reply-To: <20170206205522.10170-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:DC4733FC8EC63805DB4FDC55DB620F771708C20BA4585906985BAF8A49734842;
	UpperCasedChecksum:A2167DEF65BA321E1F247136A28CE83422D7677E9B064D19691E34F7E2610C4C;
	SizeAsReceived:7623; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; AM5EUR02HT249;
	5:z+7s2BYt2M3TYTe82XW6/+kINe9nzsmCHq8R/KLhW7rwdY4/spFVrSajpsqF5n7PQq/slz/0gHwe9/Xv+5fWkyHXmMrhSXV7ilkgT0vjRYvcJjaVEvWK51h41xrRLQFIsojI/6XNcLmbQFHqBr0PPg==;
	24:ObCCLNPjDVYFxjHSQkABJ2MM1RyRW2JYfQuiKcIuQkYFCxipxYcCcAxc4l0Nf90SaNCbPyJV36bNx17LRGrsf6EkqjKGB1a4JkScEE5ZaGk=;
	7:62fHndBgcxGHkg4KYPO5imIvraqeY9szSQ8tbqsdadodC1GeGQauW7BCSTBCAik8xV5FxDKAjOZHQJofx9J2X8uTsq0uEK3HfXjNLV6PvEZrd2rjXekQlcEe8g0ThPhlI7egAx50Ep9Y+sJt6UBwv2s1yLSDHWMX2rA1z2Cwcgb5uTehn8SzuQzMLcexm8zwGuPaE7gOoV90BMhdDwnXLTTR2vVNPyilu991kZcS+ynJ0NTRPfEGW+P0uQdkTvbiFH3P6Q68M3PDEqlBAIFnINevMf/gZIhScGay0fp41KOv/t48wXwBuY2Y1dOUd67xbrgO5tWhjEf2e81b9Qo55bdzpz1X6T1S1yGJQJHgsyuYnmLvOb6AHcU+tJU4UXoOcj1XDXBxrntkks+DDbxZkxnad3wamuzFzA/8Tcl2njmTigsr4jbkwL05gP8Ksa+4urnDLELC27uTNYo50G2KLG+OSm3l3JgCm584DP4fJELRJX118YJPTQo+9c0UrNw9G+pU4H0pxdp7RfeHw6q5jA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900005);
	DIR:OUT; SFP:1102; SCL:1; SRVR:AM5EUR02HT249;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 7232cb4f-5159-42d2-897b-08d44ed28725
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:AM5EUR02HT249; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(444111334)(432015086)(82015046); SRVR:AM5EUR02HT249;
	BCL:0; PCL:0; RULEID:; SRVR:AM5EUR02HT249; 
x-forefront-prvs: 0210479ED8
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Feb 2017 20:55:49.5128 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT249
X-OriginalArrivalTime: 06 Feb 2017 20:55:51.0287 (UTC)
	FILETIME=[666DB070:01D280BB]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.90.94
Subject: [gpsd-dev] [PATCH 2/2] Ensure gpsd test programs are also built as
 part of Travis CI.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Feb 2017 20:55:57 -0000

---
 .travis.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.build b/.travis.build
index cf2fe1a4..1282b628 100644
--- a/.travis.build
+++ b/.travis.build
@@ -31,5 +31,5 @@ for py in $PYTHONS; do
     python${py}-dbg /usr/bin/scons ${SCONSOPTS}
 done
=20
-/usr/bin/scons check
+/usr/bin/scons build-all check
=20
--=20
2.11.0



From MAILER-DAEMON Mon Feb 06 16:59:31 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1carJr-00078q-4V
	for mharc-gpsd-dev@gnu.org; Mon, 06 Feb 2017 16:59:31 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51314)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd@bzed.de>) id 1carJp-00077r-RE
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 16:59:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd@bzed.de>) id 1carJm-0005bX-Ml
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 16:59:29 -0500
Received: from relay02-mailcontrol.conova.com ([217.196.144.162]:58086)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <bernd@bzed.de>) id 1carJm-0005YY-By
	for gpsd-dev@nongnu.org; Mon, 06 Feb 2017 16:59:26 -0500
Received: from mail.recluse.de ([217.196.148.212]) by
	relay02-mailcontrol.conova.com; Mon, 06 Feb 2017 22:59:21 +0100
Received: from [10.125.0.1] (83-215-148-230.hage.dyn.salzburg-online.at
	[83.215.148.230])
	by mail.recluse.de (Postfix) with ESMTPSA id 1C6BD79;
	Mon,  6 Feb 2017 22:58:24 +0100 (CET)
To: Fred Wright <fw@fwright.net>, gpsd-dev list <gpsd-dev@nongnu.org>
References: <Pine.LNX.4.58L1X.1612191519040.12925@bolt.sonic.net>
	<Pine.LNX.4.58L1X.1701031749290.16526@bolt.sonic.net>
	<8c1c3f73-96b0-0d6e-28d6-f58dd9e4e45b@bzed.de>
	<Pine.LNX.4.58L1X.1701061559430.27069@bolt.sonic.net>
	<CAOSy7+9=7VFVq_DmgNqUYt1F7FFy397Da7UP1U_EpCWDi1JagA@mail.gmail.com>
	<Pine.LNX.4.58L1X.1701071821510.14427@bolt.sonic.net>
	<CAOSy7+_1Y0nyvFJMJ7Ny3nSfSrzeEH0-BpF9RnuKfreFmp4_gg@mail.gmail.com>
	<Pine.LNX.4.58L1X.1701080021190.31387@bolt.sonic.net>
	<Pine.LNX.4.58L1X.1701080052500.22691@bolt.sonic.net>
	<CAOSy7+_BWAC3Df9PQrYhYFR7Thnc0H_ELwDsvdZXOR0wbQk9ZQ@mail.gmail.com>
	<07376948-429a-324a-4b1c-8e0558869b40@bzed.de>
	<eaa76fbd-5f77-3908-7676-ed6988ddaa37@bzed.de>
	<Pine.LNX.4.58L1X.1701221344100.29928@bolt.sonic.net>
	<745961d64d3c715f670ea75875af1f2e@mail.recluse.de>
	<Pine.LNX.4.58L1X.1701241355180.950@bolt.sonic.net>
	<Pine.LNX.4.58L1X.1701242245370.30816@bolt.sonic.net>
	<d2d4d511-569f-df16-a591-2105a1674952@bzed.de>
	<Pine.LNX.4.58L1X.1701291749340.18666@bolt.sonic.net>
From: Bernd Zeimetz <bernd@bzed.de>
Message-ID: <0fbd6ce5-04f1-6d20-bd19-ecba51f357fd@bzed.de>
Date: Mon, 6 Feb 2017 22:59:19 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Icedove/45.6.0
MIME-Version: 1.0
In-Reply-To: <Pine.LNX.4.58L1X.1701291749340.18666@bolt.sonic.net>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-cloud-security-sender: bernd@bzed.de
X-cloud-security-recipient: gpsd-dev@nongnu.org
X-cloud-security-Virusscan: CLEAN
X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on
	relay02-mailcontrol.conova.com with 3CD6CB0000D
X-cloud-security-connect: mail.recluse.de[217.196.148.212], TLS=1,
	IP=217.196.148.212
X-cloud-security: scantime:.4661
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 217.196.144.162
Subject: Re: [gpsd-dev] Bernd's CheckFunc Fix
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Feb 2017 21:59:30 -0000



On 01/30/2017 02:54 AM, Fred Wright wrote:
> I might look into that at some point.  A more generally useful setup would
> be to have a testing branch in the main repo.  That would provide a place
> to push questionable changes, without screwing up master.  It might also
> be declared fair game for force pushing.

The travis on my mirror should be configured to build all branches with
a .travis.yml file - so if you create a branch, it should be built.


>> I've removed the C++98 stuff from .travis.build, if you check travivis
>> in a few minutes, you'll see the result.
> 
> Yeah, that worked.  I considered trying that myself, but wanted to wait
> for your comment.
> 
> Getting back to the original subject of this thread, I rereverted the
> CheckFunc patch, and Travis is still happy.

I'd still like to know what fixed the issue - but I'm not motivated to
setup a system with a Debian testing state from a year ago... - at least
it builds fine in unstable again.


-- 
 Bernd Zeimetz                            Debian GNU/Linux Developer
 http://bzed.de                                http://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F


From MAILER-DAEMON Wed Feb 08 21:44:20 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cbeia-0006Lo-RY
	for mharc-gpsd-dev@gnu.org; Wed, 08 Feb 2017 21:44:20 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45514)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cbeiY-0006LN-86
	for gpsd-dev@nongnu.org; Wed, 08 Feb 2017 21:44:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cbeiV-0005Ax-5M
	for gpsd-dev@nongnu.org; Wed, 08 Feb 2017 21:44:18 -0500
Received: from d.mail.sonic.net ([64.142.111.50]:36188)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cbeiU-0005A2-SW
	for gpsd-dev@nongnu.org; Wed, 08 Feb 2017 21:44:15 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v192i807016903
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Wed, 8 Feb 2017 18:44:08 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v192i7Zg019637
	for <gpsd-dev@nongnu.org>; Wed, 8 Feb 2017 18:44:08 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v192i6nw019628
	for <gpsd-dev@nongnu.org>; Wed, 8 Feb 2017 18:44:07 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Wed, 8 Feb 2017 18:44:06 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB086532875B0B78AD9D2BB54C8E400@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702081843010.15563@bolt.sonic.net>
References: <AM4PR08MB086532875B0B78AD9D2BB54C8E400@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVbTOm9jheditKC1JQ7CmxQ9YHQiOAUGTG0OdzUXy3+xi9BdMSQSX/8tnJuDLZN3bcCl2GqMuWcmTY19nmWFkqp5
X-Sonic-ID: C;Gsz4oHHu5hGtOos6xpAcWQ== M;HLQxoXHu5hGtOos6xpAcWQ==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.50
Subject: Re: [gpsd-dev] [PATCH 1/2] Man page for libgpsd no longer exists.
 Replace with libgpsmm which does.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2017 02:44:19 -0000


Merged, with the addition of a more concise summary line to the commit
description.

Fred Wright


From MAILER-DAEMON Wed Feb 08 21:46:05 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cbekH-0006dO-7H
	for mharc-gpsd-dev@gnu.org; Wed, 08 Feb 2017 21:46:05 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45805)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cbekF-0006dH-Dd
	for gpsd-dev@nongnu.org; Wed, 08 Feb 2017 21:46:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cbekC-0005Wf-AD
	for gpsd-dev@nongnu.org; Wed, 08 Feb 2017 21:46:03 -0500
Received: from c.mail.sonic.net ([64.142.111.80]:40766)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cbekC-0005WW-02
	for gpsd-dev@nongnu.org; Wed, 08 Feb 2017 21:46:00 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v192juFO008672
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Wed, 8 Feb 2017 18:45:56 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v192jurn021760
	for <gpsd-dev@nongnu.org>; Wed, 8 Feb 2017 18:45:56 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v192juQP021757
	for <gpsd-dev@nongnu.org>; Wed, 8 Feb 2017 18:45:56 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Wed, 8 Feb 2017 18:45:56 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB0865841A9C21B3BE332823998E400@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702081844240.15563@bolt.sonic.net>
References: <20170206205522.10170-1-rw_norris@hotmail.com>
	<AM4PR08MB0865841A9C21B3BE332823998E400@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVZuY0IGoGh+cHir0KYNscQtzjHgxEpP/Mp+GjckA7CthK/KEP3sfEa5tdvGs30ueum1D95rUy5geNQwVNOe1WKM
X-Sonic-ID: C;7Ntn4XHu5hGTWZXQQiug7g== M;YGKV4XHu5hGTWZXQQiug7g==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.80
Subject: Re: [gpsd-dev] [PATCH 2/2] Ensure gpsd test programs are also built
 as part of Travis CI.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2017 02:46:04 -0000


Merged, with a corrected (and shortened) commit description.  Test
programs are already built by the "check" target; it's *non-test* programs
that aren't.

Fred Wright


From MAILER-DAEMON Thu Feb 09 18:17:10 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cbxxe-0003dB-Nw
	for mharc-gpsd-dev@gnu.org; Thu, 09 Feb 2017 18:17:10 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59339)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cbxxc-0003bo-Ta
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:17:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cbxxZ-0004eY-Q0
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:17:08 -0500
Received: from snt004-omc2s28.hotmail.com ([65.55.90.103]:51507)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cbxxZ-0004eR-94
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:17:05 -0500
Received: from EUR01-HE1-obe.outbound.protection.outlook.com ([65.55.90.72])
	by SNT004-OMC2S28.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Thu, 9 Feb 2017 15:17:03 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=cLytFVxeyoHSo40SbApEtaM010BwkM1FWLEF0pawckg=;
	b=lEZhjA+HafQ2d36a+hdHqn7T8Ift59LyIR7Q/SlJ3smm00UUjIXZQ+CeCGQpqnZSQ2UnY25m0G93JCJMU1KgsgLCSvAIVWwX+T19Bhgl0o59i5o2tz2tORcEVygqOY5VnBGVFfTR1hek2nvK4xp1WGmWHg+KvYD2i0bV/SxCcQkA5md8eTcxaK9E22dz19AIIZ1qeTAsizYidyqF5OlhUfYtV6N/NKi44vMX856dpFl1RnlnQ64l5Ei8eMIgQWZcyCUtBxEmQMQ9Kxxt4MIPgtGdQ/KSefQjidpvU8V++l2B3BqLNUK872jvO0dLmgGAWTuOqPg5zap0DkEvuCJW5g==
Received: from VE1EUR01FT019.eop-EUR01.prod.protection.outlook.com
	(10.152.2.52) by VE1EUR01HT146.eop-EUR01.prod.protection.outlook.com
	(10.152.3.208) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Thu, 9 Feb 2017 23:17:01 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.2.52) by
	VE1EUR01FT019.mail.protection.outlook.com (10.152.2.231) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Thu, 9 Feb 2017 23:17:00 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Thu, 9 Feb 2017 23:17:01 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 2/4] Improve regress-driver help
Thread-Index: AQHSgyqdDsQLcJoB6EamhQvXIFGrDw==
Date: Thu, 9 Feb 2017 23:17:00 +0000
Message-ID: <AM4PR08MB0865E50995B63ED83B1D6D638E450@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170209231642.22502-1-rw_norris@hotmail.com>
In-Reply-To: <20170209231642.22502-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:DCEB2454AD655F9F3FACE951D761812440F3190EBFFAC77398A0217AD78527B9;
	UpperCasedChecksum:B8CC8A8AD20F2AD9DDE199FC75EC31CF6D54CBEAEFF1463B36E5B4C8578C9EE6;
	SizeAsReceived:7481; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR01HT146;
	5:jYsX5toAMaKIA1TpvQa7ABMjaH8+9L852xsN2C46hlGvbJZD0VnC+r+qvENti77xYPpnktzTFtiei2En9tTed6m8Wd9NqatFMnP0oSpiYkZEwYJzZ42LSDFMpkjU9DnCSIjxeea8UeKiMv84AUWJsw==;
	24:pf/gZpU8OA4g9IMi/I6XkIV+qdLgsVVnGQ9WPGKIl107eJfij/zhQoC2S09NtUTXcvKKP5hnrAWk8tT3iHUt6PEDie1XJ2DN/f8/5KVWNC8=;
	7:MdygL3xaz5Kx8U3/G973T+hs1fpChus0m6mzeeQVUQbKvbjzmkaoXAmRoRXV63aBhFqvdVU2QeLR6Pptn9kKDmbFj10IcRjkgwufJGU77n8WyyCKFpffrF74ENqx7f8g5q5dKcF1LBaJwan7qJu0sM1jxzOXNUUCMvSwwgnoj5Sv4ByqVV6aFocBFE8DqqyzVGwHBHQSqbImkRDu1BAiQvsciA2wFLe7VfwPikE9IVYJgRohjkt3cR2iw3NJjBLrdbCZJWLgxZ0YvbIDv39ZUYkYp7Em9qIbiQ2TyNBGFQaDihJVrayxWxM18wYRU9ZslPwB0T2avS9wndmAvWJgIs0MI5VB1SwQI8bhnyC1f35EPFfkuvMwIRT3ck8C3QjtxrS8jqIS4tIE59iClX3PWemclQMOm3LYvWAgZCoA1PPKeZP06J5mi4nW2UJnQj64uTgrKy7cfhxr3ZROzcqyjkuFkGAVn23UL65watldIDixBlxb4ZrJNfAI6vSmkYiBEQ9/pj4TDff5w2ZCr9MqcQ==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR01HT146;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: f34b9c7c-f38b-48be-c2d1-08d45141bfc8
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:VE1EUR01HT146; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:VE1EUR01HT146; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR01HT146; 
x-forefront-prvs: 02135EB356
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2017 23:17:00.8881 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT146
X-OriginalArrivalTime: 09 Feb 2017 23:17:03.0799 (UTC)
	FILETIME=[9FADAC70:01D2832A]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.90.103
Subject: [gpsd-dev] [PATCH 2/4] Improve regress-driver help
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2017 23:17:09 -0000

Wording for option -c seems misleading as this makes regress-driver perform
client tests.
---
 regress-driver | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/regress-driver b/regress-driver
index 928543fd..8092d84a 100755
--- a/regress-driver
+++ b/regress-driver
@@ -52,7 +52,7 @@ quiet=3Dfalse
 while getopts cl:sStbuvo:qh opt
 do
     case $opt in
-	c) testing=3Dclientlib ;;	# Can be 'daemon'
+	c) testing=3Dclientlib ;;	# 'client' rather than the daemon
 	l) logfile=3D$OPTARG ;;	# Logfile to save diffs to
 	s) mode=3Dregress ;;	# Run regression tests
 	S) mode=3Dslowregress ;;	# Run regression tests with big delays
@@ -73,7 +73,7 @@ then
 	echo
 	echo "Regression test driver script"
 	echo "-h  - this help"
-	echo "-c  - can be 'daemon'"
+	echo "-c  - test with 'client' rather than the daemon"
 	echo "-l <filename>  - where to log diffs to"
 	echo "-s  - run regression tests"
 	echo "-S  - run regression tests with realistic timing delays"
--=20
2.11.0



From MAILER-DAEMON Thu Feb 09 18:17:14 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cbxxh-0003fc-T9
	for mharc-gpsd-dev@gnu.org; Thu, 09 Feb 2017 18:17:13 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59363)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cbxxg-0003eP-BN
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:17:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cbxxd-0004es-7e
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:17:12 -0500
Received: from blu004-omc4s14.hotmail.com ([65.55.111.153]:53104)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cbxxd-0004ej-2h
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:17:09 -0500
Received: from EUR01-DB5-obe.outbound.protection.outlook.com ([65.55.111.137])
	by BLU004-OMC4S14.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Thu, 9 Feb 2017 15:17:08 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=UO3EoALDMwLJoucM/96ZaVWoL8c2G9oXhlTXo0WeV80=;
	b=NazL41+S8jJ6LtXk5yyr96YRbDIiTiYxu5hK4Rzw+J+dgH4p7+Gg4kIk844WpbqC5sG6Hx0kgPyEeCPjz7Criz71212gmHPNAH08cSWf/zNsuM0PKBXGy0NFCoiQbFZymwVayRZXuf2PTaTMmSCpWTXg40X6o5fzle8+MAW47t8GhzOVM9VoLl7/BQVfjE0hz5LXPWpyFsbk3yYKuah2V5SH/TSNBlQrxSagltpOdnqrJyEJvFkLW/Q4ata9JBTHSJLXI9qGYZxGPzkLHXVAv/RE8jRhBnLRy/+8LHm7W2+py6vDmXeE9e1NlPB1J/j8BQhVhNxD7ID4Y0m9ArmEzQ==
Received: from VE1EUR01FT019.eop-EUR01.prod.protection.outlook.com
	(10.152.2.60) by VE1EUR01HT131.eop-EUR01.prod.protection.outlook.com
	(10.152.3.113) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Thu, 9 Feb 2017 23:17:06 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.2.52) by
	VE1EUR01FT019.mail.protection.outlook.com (10.152.2.231) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Thu, 9 Feb 2017 23:17:06 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Thu, 9 Feb 2017 23:17:06 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 3/4] cppcheck: style - remove unused variable.
Thread-Index: AQHSgyqht1+xxcmbEU+jv6z1cvlKlA==
Date: Thu, 9 Feb 2017 23:17:06 +0000
Message-ID: <AM4PR08MB086585A2DF4BCC25653B8F4A8E450@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170209231642.22502-1-rw_norris@hotmail.com>
In-Reply-To: <20170209231642.22502-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:030EBF2B7448CA12E54C314A808577EA8052A700F1AB8EBCBFBC67C7F001B164;
	UpperCasedChecksum:A96A36B6F470B27BBFD3D01E6E735B37A5106E4589228E01C269975B22B6F6D6;
	SizeAsReceived:7511; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR01HT131;
	5:ZniPwoYQLCUu8LWhIZbuTWGU3LIisfnzhcSWi1GljSWc67xDDVLL6b0qJhQzmBGEexJ3CqsYVhsxh2s/W6jJsPBzgtLEEhC7t6G6iXhM0kjSO4zoGSB7//l6IUFkROYLj7LF7iOXqK+tKpgg136L+Q==;
	24:TeJvWYV7c/Bikol9xLY5/7YW8xRWsfjAqtpjGz0xdx7oTMAzn7BgREURAdGQCUbSLcFxR3KvMiiP2hD8TYRbml4c8WDwO7jCAKlLYXG9tnY=;
	7:FCsFrymtC6y9zQjeRqmB8Mmi2tx0q0gLpwcJJllVDykdmEdi41hoDNfZVIz8G1wUHr7zJUOQY2bw9dAILAsHBdSf3ZFCuciKgWveI5KSweQhhVS2Ajvi0TAVtoL2eKiEzcTShuBHZS/HeBULLSkc2ePsQ9Rsn+FWbMzXLiVgG9GIxU9E6lUcZ3ycF7sVLSGI8gL0aAIXdb7nMkOZnFOakXeDWKB6XLgLjYez+YZ8rMmU7b73+iwUTFmVafxJvpr1GDNrfJr95qwgZOt8Hx+ZpF4qVe8uK0GHNQ0RX4hzv6LsJBxi10h2hQY4C7PtDXjg7VvKlm9G3OYuFJ2/pebc9F5MicGiXVIrbAItNiipT6QXYyOhsaztcYbIciHx869nLc4EgLONsFEiH3uvwgouILVhus83m53PzQjk8/f00uOSriK9RR/3I3LvBKg5P/J0icrodPwXeNdNamm7GIEQ8EwYfcPm0hoVh233r1rfCan3Ycr+2Q3jStzrPePtzXQdUNJl1SXgAuFvX4HwCY17KQ==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR01HT131;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 78112a96-581a-40ca-c802-08d45141c352
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:VE1EUR01HT131; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:VE1EUR01HT131; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR01HT131; 
x-forefront-prvs: 02135EB356
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2017 23:17:06.8258 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT131
X-OriginalArrivalTime: 09 Feb 2017 23:17:08.0479 (UTC)
	FILETIME=[A277C8F0:01D2832A]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.111.153
Subject: [gpsd-dev] [PATCH 3/4] cppcheck: style - remove unused variable.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2017 23:17:13 -0000

TESTED:
'scons build-all check' passes.
---
 libgps_json.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgps_json.c b/libgps_json.c
index a806c4c4..6a711855 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -149,7 +149,7 @@ static int json_sky_read(const char *buf, struct gps_da=
ta_t *gpsdata,
 	{NULL},
 	/* *INDENT-ON* */
     };
-    int status, i, j;
+    int status, i;
=20
     for (i =3D 0; i < MAXCHANNELS; i++) {
 	gpsdata->skyview[i].PRN =3D 0;
@@ -162,7 +162,7 @@ static int json_sky_read(const char *buf, struct gps_da=
ta_t *gpsdata,
=20
     gpsdata->satellites_used =3D 0;
     gpsdata->satellites_visible =3D 0;
-    for (i =3D j =3D 0; i < MAXCHANNELS; i++) {
+    for (i =3D 0; i < MAXCHANNELS; i++) {
 	if(gpsdata->skyview[i].PRN > 0)
 	    gpsdata->satellites_visible++;
 	if (gpsdata->skyview[i].used) {
--=20
2.11.0



From MAILER-DAEMON Thu Feb 09 18:37:15 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cbyH5-0002GI-SW
	for mharc-gpsd-dev@gnu.org; Thu, 09 Feb 2017 18:37:15 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34978)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cbyH3-0002F6-6Z
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:37:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cbyGy-0002RH-BS
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:37:13 -0500
Received: from bay004-omc4s7.hotmail.com ([65.54.190.209]:57627)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cbyGx-0002R9-P7
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:37:08 -0500
Received: from EUR01-DB5-obe.outbound.protection.outlook.com ([65.54.190.200])
	by BAY004-OMC4S7.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Thu, 9 Feb 2017 15:16:58 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=F8rudSOGr6yfAi21lanLcgJRPyOJgj2pcBdxtEu5sJE=;
	b=nSdvio05a944htQnANYbVC1KTfxTq+hl35VEDMc1Oaeuz+oJ7tWUrYxTZHi8i1aw+0OoYV5WweF4dvYiJM5EfDPJlphJQGQTPIMUpajjUXhpR3hMhfNX67oO4oAfCXRpz3LS9P/vr8z7+BtlQlQKZtzYVQJ9nHTW+CAoQr6U1Wfs+wez5xCAHpy5b617o0HFoNMdm9n07Mz3Xz6iLWPCFI9cmqwVcl3HxgO86f8Aa+f1lbYoxt/555Q+9qnir9oKE4m6DqoD0QWKPM03ZbuKx4sxy+aqJY9kRt8do5ZucvmADFaybGjRXWRa8fSHlibRr3E9GxXIxF3hBsMsJftqqQ==
Received: from VE1EUR01FT019.eop-EUR01.prod.protection.outlook.com
	(10.152.2.56) by VE1EUR01HT008.eop-EUR01.prod.protection.outlook.com
	(10.152.2.81) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Thu, 9 Feb 2017 23:16:56 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.2.52) by
	VE1EUR01FT019.mail.protection.outlook.com (10.152.2.231) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Thu, 9 Feb 2017 23:16:55 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Thu, 9 Feb 2017 23:16:56 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 1/4] Fix comment to correct the name of the file
Thread-Index: AQHSgyqa7QkfvEkRD02+srL4YHm/aA==
Date: Thu, 9 Feb 2017 23:16:55 +0000
Message-ID: <AM4PR08MB0865746571A6C7650BB3CB4E8E450@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:0676F9F755AE0BDF9AE14D8718FFBE21083C3675EE6FBC83E1D0F026FC4094CB;
	UpperCasedChecksum:CBE6CF1BF6C87B4DED0FF87D75203929128A83A2CD9E8213F4EBABD1E40F95B5;
	SizeAsReceived:7460; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR01HT008;
	5:EdHNX26lQ0Oif84zIyb9wy7hf+bHCH2NHRLCOG7V8OA+Dbp2q6+C9nJPfgeZgx1dCnU+BBIAClsnXrmxuLWp3KOjxDm4tU6EuDlbFZS6inh1PvZsLGjT37U0YRciTD2RwUCWVL7Tgg8MDFj8YjhbMQ==;
	24:PmWpE2C+pbgeVVJcQk6ig95P785Mh8ON9i6fZiPFGPnnG52H/DTwUS2DPG0ZLQ9lRHMPFBOQhu61dtIkZSG6vBMC4t48/AZqQ9jM+M5eWJw=;
	7:kJUh3JkVc+6+isSr6e+7Pndn1mhqxyh/DDkfEBa/VSdRp7PeWEjltKcxrXEvpWSlLKU2o8jj7rEg3nrlLmwo4XNlp3SP0wspQnSo7ZjYSNXgbPgieF6F2d2PLZ3lRtOtFUQoRfBq+jMJshcuVCZDoxw9VjhQBnEaaIuPlHrcw4bmjGyELceAOjT21KPQTcVac4ELbMv7Pr0IlP0EFdXKMyBCotH4RQohABINHhuouJTRMgl02NDuLk1g/2AdkRDlRrBOuBUhMhGyFXNCDlJdIDRyTcN3ao22/dgiTUr4n9SrUa/GpTfl17PuRm3/NjilpLi98BDMDV4hap3PFRAvozeHYRqWdzNxNoJKsz07bZYjhUMngLP8msOxhTuJqAv8dah1mRF97EpU91N0KvuJLSgVEikwfAN21VJ43iRe2E9CZSgX/R+6fZ2Z9IYGnzei5IZuuSneg8e4RX8JN0BLYNlikvE0YHZN21duvCRfVZIzfQclcSwV7Gs/L5DFiOu0JU7Be2hmfue7vdMeSQQB+Q==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR01HT008;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 0ed75d8f-0232-4d44-6e43-08d45141bc4f
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:VE1EUR01HT008; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:VE1EUR01HT008; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR01HT008; 
x-forefront-prvs: 02135EB356
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2017 23:16:55.9035 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT008
X-OriginalArrivalTime: 09 Feb 2017 23:16:58.0439 (UTC)
	FILETIME=[9C7BCD70:01D2832A]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.209
Subject: [gpsd-dev] [PATCH 1/4] Fix comment to correct the name of the file
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2017 23:37:14 -0000

---
 gpsdclient.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gpsdclient.c b/gpsdclient.c
index b1b679be..6d06b2d1 100644
--- a/gpsdclient.c
+++ b/gpsdclient.c
@@ -327,4 +327,4 @@ float true2magnetic(double lat, double lon, double head=
ing)
     return (heading);
 }
=20
-/* gpsclient.c ends here */
+/* gpsdclient.c ends here */
--=20
2.11.0



From MAILER-DAEMON Thu Feb 09 18:37:31 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cbyHL-0002qY-1W
	for mharc-gpsd-dev@gnu.org; Thu, 09 Feb 2017 18:37:31 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35015)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cbyHI-0002fg-Ns
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:37:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cbyHD-0002S9-QN
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:37:28 -0500
Received: from bay004-omc4s15.hotmail.com ([65.54.190.217]:63544)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cbyHD-0002S3-Gk
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 18:37:23 -0500
Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.54.190.200])
	by BAY004-OMC4S15.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Thu, 9 Feb 2017 15:17:14 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=l3msaI13DjVfgNtfdQWW0wPUKdfR+Vq7ge3UimbbIB4=;
	b=Rry+DI6itE1ov6AkxzJ6CSPHQJp3MRnPz5T/4s3K59afGa7nxYmo/M57IkIpVz6tiGPa+nTjwihR4AZrGIhTkvlpMU0RKA/kJCRlgHr0xXIVYmEelsQrqyemkJ69wyYuH9blXDUk+HkXeK2SUhSkTWPZkSscOZhbyyaGh0xrCFpCkxSH8OYsjzl5K6wbUY5RbjgM5KDvVGlKWImXk0C1Qg/Z5C0zR27EHPhc1tcTZgldknBTwFy/7ypTWyA3MZV/rl+tHHtgjZWwEkSFhAlodn1G5cE324D2D/T9ZeB2ejXmTC3Kcjy9f+ugwpZRWLFzIM09lxWYM/pbSOiklSvcHw==
Received: from VE1EUR01FT019.eop-EUR01.prod.protection.outlook.com
	(10.152.2.52) by VE1EUR01HT155.eop-EUR01.prod.protection.outlook.com
	(10.152.3.168) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Thu, 9 Feb 2017 23:17:12 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.2.52) by
	VE1EUR01FT019.mail.protection.outlook.com (10.152.2.231) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Thu, 9 Feb 2017 23:17:12 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Thu, 9 Feb 2017 23:17:12 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 4/4] cppcheck: error - use of uninitialized variable
Thread-Index: AQHSgyqktWLBPi7NDkWjCQtwJ+SWUA==
Date: Thu, 9 Feb 2017 23:17:12 +0000
Message-ID: <AM4PR08MB0865D4A721A413C9221ADF0F8E450@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170209231642.22502-1-rw_norris@hotmail.com>
In-Reply-To: <20170209231642.22502-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:17C61D29B230EFD2813509FE96514133C4B3EE32A3A2C8EA588366380B3DB38F;
	UpperCasedChecksum:1F9BE40BFBA1A36DF5235640168414ABD1065BFF5800F6DE6E60DECC0335B3C2;
	SizeAsReceived:7524; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR01HT155;
	5:2XwobYqL/zP0vopWPENvJV0/5AOEO+mApvG/EoyIv6WjQLtIuY++gojvhV+N84uVnNYHmK7ZxGKPhQ7YK1JWADw311h1mk6h4PKMoXyyM8hAZ7/EfOdCV8lI/IeBbQw6VsmtHt5jEFUKJg3U1ZRjlw==;
	24:grad09E4Wp2YtZAt/BnFGiy6cki0ai3EYqL1P2r7uot9ebNaPH7wjV2W89lLDzyGCP8QsuCfwUPavu5uNB01itYbYaBy08EoOZwzIsJ3y7s=;
	7:Ay1R0EXhwLy2MKHjd6eBtLJ9pbI9uzqx0zrFrEAgdSFbOjKE2vmx3a5W8WHVKmLD14UCHqZWaOrX9OE90ya6YO8kiI42vVm2t4ue8iXib4C2Q7kXvq2oIEPqTtFnHT42ceBE7Yb5cMWbaaV8qqRJU7ZlFwgogr8+AJGmwiXkmnvXndtWSJs6v4VHXCs5jCbfxT7ZUn/94SiECCMEkLndtzSmiEVXERRnhLlvAy56Yhy7QrPtP5SU8BX96ZgfIu9obbtuC66jqPx/nETMsZ/oM6tyCdrIG+KD2CSFkCArVOTdr2cDKKRVo3e7DrgfdxI2IkYSIe/lzKFD+c9vPE0dJzvkuSAgdTmkuHAb/T07ZhMz14JPZQXZ5nzmSqTNjEwxtTl1uhianS3JtNV4kOXGBN61oQ3IRirrncy0/U5Pb8usuhs81G4q+fpddd3pp4gy2sLj6vWShw2SinKrd5Cmv55g6xxD/0whxHxDeVIqvrSUJNDErw7lECiCDIN1A4N8EoK0H8nCxE6JAEutQF6J7Q==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR01HT155;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: c93e0d24-5fed-4a03-a870-08d45141c697
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:VE1EUR01HT155; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:VE1EUR01HT155; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR01HT155; 
x-forefront-prvs: 02135EB356
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2017 23:17:12.2322 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT155
X-OriginalArrivalTime: 09 Feb 2017 23:17:14.0740 (UTC)
	FILETIME=[A6332340:01D2832A]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.217
Subject: [gpsd-dev] [PATCH 4/4] cppcheck: error - use of uninitialized
 variable
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2017 23:37:29 -0000

Ensure mask is fully set.

TESTED:
'scons build-all check' still passes
---
 driver_nmea0183.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index 64b9de7c..58a61156 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -1632,7 +1632,7 @@ static gps_mask_t processPSTI(int count, char *field[=
],
     gps_mask_t mask;
=20
     /* set something, so it won't look like an unknown sentence */
-    mask |=3D ONLINE_SET;
+    mask =3D ONLINE_SET;
=20
     if ( 0 !=3D strncmp(session->subtype, "Skytraq", 7) ) {
 	/* this is skytraq, but marked yet, so probe for Skytraq */
@@ -1704,7 +1704,7 @@ static gps_mask_t processSTI(int count, char *field[]=
,
     gps_mask_t mask;
=20
     /* set something, so it won't look like an unknown sentence */
-    mask |=3D ONLINE_SET;
+    mask =3D ONLINE_SET;
=20
     if ( 0 !=3D strncmp(session->subtype, "Skytraq", 7) ) {
 	/* this is skytraq, but marked yet, so probe for Skytraq */
--=20
2.11.0



From MAILER-DAEMON Thu Feb 09 20:30:45 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cc02v-0001gy-9b
	for mharc-gpsd-dev@gnu.org; Thu, 09 Feb 2017 20:30:45 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57521)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cc02t-0001gj-15
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 20:30:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cc02o-00088N-VJ
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 20:30:42 -0500
Received: from c.mail.sonic.net ([64.142.111.80]:39340)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cc02o-00088B-IB
	for gpsd-dev@nongnu.org; Thu, 09 Feb 2017 20:30:38 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1A1UYW2011400
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Thu, 9 Feb 2017 17:30:34 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1A1UXO3025163
	for <gpsd-dev@nongnu.org>; Thu, 9 Feb 2017 17:30:34 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1A1UXEi025159
	for <gpsd-dev@nongnu.org>; Thu, 9 Feb 2017 17:30:33 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Thu, 9 Feb 2017 17:30:33 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB0865D4A721A413C9221ADF0F8E450@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702091729260.23959@bolt.sonic.net>
References: <20170209231642.22502-1-rw_norris@hotmail.com>
	<AM4PR08MB0865D4A721A413C9221ADF0F8E450@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVZdtpA5+egNKvvJHvTjNtD2hXiBiRRuHoQ4hdPCFn1A1DmPgl186fioLeytlZVt9D7AEq1KFI5kRksmkk0RMTWL
X-Sonic-ID: C;rNJnhDDv5hG485XQQiug7g== M;vMaLhDDv5hG485XQQiug7g==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.80
Subject: Re: [gpsd-dev] [PATCH 4/4] cppcheck: error - use of uninitialized
 variable
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2017 01:30:44 -0000


Patchset merged (but forgot to add SOB lines).

Fred Wright


From MAILER-DAEMON Fri Feb 10 17:53:40 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ccK4S-0008Iy-PA
	for mharc-gpsd-dev@gnu.org; Fri, 10 Feb 2017 17:53:40 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58989)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1ccK4Q-0008He-9f
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1ccK4L-0002aG-Eh
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:38 -0500
Received: from bay004-omc3s9.hotmail.com ([65.54.190.147]:50396)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1ccK4L-0002Zc-03
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:33 -0500
Received: from EUR01-DB5-obe.outbound.protection.outlook.com ([65.54.190.188])
	by BAY004-OMC3S9.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 10 Feb 2017 14:53:31 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=JdA8rEO22kZWvZVwbfMZumXDOefzRo3Y25lcYbPbiZ8=;
	b=AlAeciL4I/xm0870lZbIf64lpLFfwdG1WO2qF+F5QqMEiE+eSeQyA7xirBrdTM1tgLtMUJoR8FPtGG+1lL8pvWIv8zIUH7h2DKgefhKiYQvlKUxtFUPb8E7iATqq0ocgzlcDGLPr8flBswFwiT8tyXoAwe643vCx8m+Wr9o5Ly6coyusKkP8WGA86koFfu0tlZl0sxN+Xk9RjR5uR13jS1mDoGusnto2zzl4DOmh0eOr9x1gf+4TIO4Y6VRitk6otU6LKjk9kMHLjis3Xn9/0o9I7m+dBKsPolQ5jz+gpRSTAJNHmM4b81UYEwx6AHj37L4+z8yznMmdMAQPs/ZCgw==
Received: from HE1EUR01FT039.eop-EUR01.prod.protection.outlook.com
	(10.152.0.59) by HE1EUR01HT199.eop-EUR01.prod.protection.outlook.com
	(10.152.1.185) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Fri, 10 Feb 2017 22:53:29 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.0.56) by
	HE1EUR01FT039.mail.protection.outlook.com (10.152.0.222) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Fri, 10 Feb 2017 22:53:29 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Fri, 10 Feb 2017 22:53:29 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 1/4] Build Qt test program
Thread-Index: AQHSg/B+kEz3S+CwtEWS/0LlmjGulg==
Date: Fri, 10 Feb 2017 22:53:29 +0000
Message-ID: <AM4PR08MB08651D854ECF76EC8B32320D8E440@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:755E5AE720F6E298BF132F7901AED219C23BBC47DFB44DAD59B93DAFB090D665;
	UpperCasedChecksum:ED9D5FE591CE12E4D4BA8D22788CDF8E5577DF83FA2B6636E304CF1C6FC336B3;
	SizeAsReceived:7416; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; HE1EUR01HT199;
	5:VX2Ydqu/v+arlNY44cvCVbj3H+9KNDM4uDpzgUGoBy0A7xLS2wKn3JD3tZS7mpK/rPPZJS9OAFdkujHqgCIW67JUbil7ZssIweG0bPWTOBUaERJz5HxoVsnE8cg62ZSLVVfgm5hDXYamh9y7rYLkdQ==;
	24:Trn8yeLRoWzlW8bnyYm1C0tBCvRCbb/u6JJPHDohx6awgomOCvryBNjwVqB/Vt87O1/tHnA1WfU6oi+My9jFYEwTyasp6Mr9Lb2QQC6FiwI=;
	7:q11+wlUEPcrDT+kAbFWKhFVR4h3BeoVgNYeC/xNCDe8wGY9q20hc419JAD8ziwRiKUB4uHYNZ3spiCMMZn9T/qBDPKa8VYkxo85px4rggitdRB7XmDi+Mbt2FywurdGuuvDD+OjYDaSX/1RflQ0r2U2RskTvUXeJlcqOKAOG24NnAJxu8w1+/dhA8MocpspN7hxzZtNHV2s6igNVdeqLmUrsCZg8f55qNI5/ZNAMQRPhnUB0eFAaG/YHu9e7QPAugOLFqzfuDO3W58yxGnXGcWH+GSkbSwNSw++I3KE1Ty2CTcufdejHDS0oI93nUSJgho6GdOB9JCu0aC4lNRlfZEOLqjpOdSruaysjiWaDhnGhu6u2Z17TOUBORgqljdHcDM9i+Fj9Oqn5t/Vh9CJINNhaNZ2dgmI+y4MXBodsfnLl98/ONaIY0zcZx4y6hF8k9eBNGSgE10peP4eIhK7flU8Bw8HILQtvTBm0Ceum/C/pKmbSKEQZoFJAj6x5xXMlVTIK2+8PHq1AdBQKokbarg==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:HE1EUR01HT199;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 6f379749-c9a2-4db7-63b6-08d452079fcc
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:HE1EUR01HT199; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:HE1EUR01HT199; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR01HT199; 
x-forefront-prvs: 0214EB3F68
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2017 22:53:29.2648 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT199
X-OriginalArrivalTime: 10 Feb 2017 22:53:31.0630 (UTC)
	FILETIME=[805F88E0:01D283F0]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.147
Subject: [gpsd-dev] [PATCH 1/4] Build Qt test program
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2017 22:53:39 -0000

---
 SConstruct | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/SConstruct b/SConstruct
index 609f403d..bc7ba644 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1527,8 +1527,13 @@ build =3D env.Alias('build',
                    "libgps.pc", "gpsd.rules"])
=20
 if qt_env:
-    build_qt =3D qt_env.Alias('build', [compiled_qgpsmmlib])
+    test_qgpsmm =3D env.Program('test_qgpsmm', ['test_gpsmm.cpp'],
+                              LIBPATH=3D['.'],
+                              OBJPREFIX=3D'qt-',
+                              LIBS=3D['Qgpsmm'])
+    build_qt =3D qt_env.Alias('build', [compiled_qgpsmmlib,test_qgpsmm])
     qt_env.Default(*build_qt)
+    testprogs.append(test_qgpsmm)
=20
 if env['python']:
     build_python =3D python_env.Alias('build', python_targets)
--=20
2.11.0



From MAILER-DAEMON Fri Feb 10 17:53:47 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ccK4Z-0008Nn-84
	for mharc-gpsd-dev@gnu.org; Fri, 10 Feb 2017 17:53:47 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59038)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1ccK4W-0008Lp-Ma
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1ccK4R-0002dS-Q6
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:44 -0500
Received: from bay004-omc3s27.hotmail.com ([65.54.190.165]:57554)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1ccK4R-0002cm-GF
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:39 -0500
Received: from EUR01-DB5-obe.outbound.protection.outlook.com ([65.54.190.187])
	by BAY004-OMC3S27.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 10 Feb 2017 14:53:37 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=OjEJMUDxqDcnTsIdPitt/rHmZXxROCDHmcFfSo6LqQ0=;
	b=QnYYZExrJJ7D7bwvtzTSzaDNzoF1AtOp5fk6uTsR1tSIDLK7lUgZpQYjay3E2k+4apU/dugVmcTpKedIKngZP3wAuilGVLX0EjiXD+kfog54jBXmnngOkJSuk+y+fD8MOyMgSPIk8PcNizfeaITLkiDvrzO8ivYIV3Ho6MVFeIYAcQYtAu/jcFv7+Ek2tzzfjSN18LOsUVHTdFMHoEFkkH6wsGUlD4G58Pe3h+kL7FAKvydVweb1yNY5Mo0J2Gk/XjNg9nN/loKISJp0V83W7Fc6mbrUePP/XTrlYvxukqfHjF1APXFz4BK6kwlGaVZNd7j0hANK8DgkAzLX/EQsig==
Received: from HE1EUR01FT039.eop-EUR01.prod.protection.outlook.com
	(10.152.0.57) by HE1EUR01HT157.eop-EUR01.prod.protection.outlook.com
	(10.152.1.175) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Fri, 10 Feb 2017 22:53:35 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.0.56) by
	HE1EUR01FT039.mail.protection.outlook.com (10.152.0.222) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Fri, 10 Feb 2017 22:53:35 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Fri, 10 Feb 2017 22:53:35 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 2/4] Enable options into test_gpsmm program
Thread-Index: AQHSg/CCVcWT/fslp069YoI9QQPhTg==
Date: Fri, 10 Feb 2017 22:53:35 +0000
Message-ID: <AM4PR08MB086536D8738F12D26242AFB88E440@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170210225252.3078-1-rw_norris@hotmail.com>
In-Reply-To: <20170210225252.3078-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:1CFBA811B73A63A5A7CC5D7CFCC03BAD8275F7B84067B2183EB2CDE7A8ABCCAE;
	UpperCasedChecksum:1E3516301DF020D40936A4DB197C974FE0746B59BC10C33128274A16C534250C;
	SizeAsReceived:7506; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; HE1EUR01HT157;
	5:65+7piP28kR5HvCJzbVXnASsebbVerE6RRJ0u85CGVVSUVvavE2qjhtojGI/nrtUhn4UjHTIfyUx884qismveBbtvzXGeOb/sNRQciCNU827HykW/3URS6ShpzzBytfqyvxlqh0lDKuCAX58wBpNOQ==;
	24:31fxGxp1ILfZ/vdy1pHHL2z1DzJ/hFSxkn8qgSq0H82+eMZ93kQvTZoRjMhvq/fy0Lda1vCYjdD8mg0rhtYYyzmEserlSR368PFiF6IqIEc=;
	7:HimwZnMw349NST4p7HVaOWCHS+tufXgOO9YiqfTlDNteblcOoY02dP49JRVhKR+ReqG1TrYNqdywOkdyDoshTfL/KUfanVabMWPgbLwSw+Q/S89cvmHdueBk+TBJwy4Lq9+ttc73/lOC/C3xTuI9gvlXAgxqOJStqFMsJPWfw5VbWyJlZzO9SXEz7VlAPOKP7mCui1SaqQjwlEe5ItQuBqoV7Y3fLqOt6JzmPTBEbbTESyfK0umcWkfvGH5W26F/zRnSfsQgiR9s5D9j1zQqt613ipIhOhWgaif+7sd1roKpY/a7ZzJ0XTN8CJDVWhv/B8nLAtWyRB8Xx9UzbZsJkD5jFzzecGVCI8aI/2F54hcXouYw2rPNGH2MOW1alAmGGPx2BluJppTCWG6HOiWDSvV+BYWECYesvoRdpOK5OVTYU9lKIw10SB+FgtgAtZH6PtylYbUEW+5vC3GandA6FC3eZWEGDbXj9mWWysFkKcsxULjmd8pH9xBSuh1xM42gMn11yHXm+EWUIRXGluTrzw==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:HE1EUR01HT157;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: d73d1377-434d-4b68-20c2-08d45207a4b0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:HE1EUR01HT157; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:HE1EUR01HT157; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR01HT157; 
x-forefront-prvs: 0214EB3F68
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2017 22:53:35.7650 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT157
X-OriginalArrivalTime: 10 Feb 2017 22:53:38.0103 (UTC)
	FILETIME=[843B3C70:01D283F0]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.165
Subject: [gpsd-dev] [PATCH 2/4] Enable options into test_gpsmm program
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2017 22:53:46 -0000

First enabled option give the number of times the program
 iterates around the main loop.
Mainly this allows the test program to finish cleanly.
---
 test_gpsmm.cpp | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/test_gpsmm.cpp b/test_gpsmm.cpp
index c32f8fca..dab1bfc2 100644
--- a/test_gpsmm.cpp
+++ b/test_gpsmm.cpp
@@ -9,6 +9,8 @@
 /* This simple program shows the basic functionality of the C++ wrapper cl=
ass */
 #include <iostream>
=20
+#include <getopt.h>
+
 #include "libgpsmm.h"
=20
 using namespace std;
@@ -102,8 +104,29 @@ static void libgps_dump_state(struct gps_data_t *colle=
ct)
 }
=20
=20
-int main(void)
+int main(int argc, char *argv[])
 {
+    uint looper =3D 0;
+
+    // A typical C++ program may look to use a more native option parsing =
method
+    //  such as boost::program_options
+    // But for this test program we don't want extra dependencies
+    // Hence use C style getopt for (build) simplicity
+    int option;
+    while ((option =3D getopt(argc, argv, "l:h?")) !=3D -1) {
+        switch (option) {
+        case 'l':
+            looper =3D atoi(optarg);
+            break;
+        case '?':
+        case 'h':
+        default:
+            cout << "usage: " << argv[0] << " [-l n]\n";
+            exit(EXIT_FAILURE);
+            break;
+        }
+    }
+
     gpsmm gps_rec("localhost", DEFAULT_GPSD_PORT);
=20
     if (gps_rec.stream(WATCH_ENABLE|WATCH_JSON) =3D=3D NULL) {
@@ -111,7 +134,11 @@ int main(void)
         return 1;
     }
=20
-    for (;;) {
+    // Loop for the specified number of times
+    // If not specified then by default it loops until ll simply goes out =
of bounds
+    // So with the 5 second wait & a 4 byte uint - this equates to ~680 ye=
ars
+    //  - long enough for a test program :)
+    for (uint ll =3D 0; ll < looper ; ll++) {
 	struct gps_data_t* newdata;
=20
 	if (!gps_rec.waiting(5000000))
--=20
2.11.0



From MAILER-DAEMON Fri Feb 10 17:53:51 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ccK4d-0008Qw-De
	for mharc-gpsd-dev@gnu.org; Fri, 10 Feb 2017 17:53:51 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59074)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1ccK4b-0008Pi-Pz
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1ccK4W-0002fj-U3
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:49 -0500
Received: from bay004-omc2s24.hotmail.com ([65.54.190.99]:54718)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1ccK4W-0002ew-Kv
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:44 -0500
Received: from EUR01-HE1-obe.outbound.protection.outlook.com ([65.54.190.124])
	by BAY004-OMC2S24.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 10 Feb 2017 14:53:42 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=NNaJWIXEg0kmOsCWUBxwWHsp3CnTq0rEHs4FLbPBJ1E=;
	b=pvwvqG+Ef3xKTwPt4blVFeVz6BmGtHKHwApbJjq4UxNObIu08VIBxSHdC5lC2mYp3c76cX7ud8H3i8LZlxMQYWMbXG4g0OIxYayq89wIlIczMWld30NuOwqrFX4Cm0uNv4LyhhmAh0aKt4N/VVoKtoUqNPuXHIBPGDyHV+WFOAJF3FOatz8OdpanwmLi9lByaXcfbvl1zIDRbznUIgi8uscvUjuynX+f6cQBRvnFHoX17YSAWGQZOhEOjMa/AMDvqc/KjglEI+l/2MwaOIn3l6BWKLP/twJsbX5TtpGAkcdhp6Zbt9in3s4shuYhOx2GyAI9M92NpRGvXurCVMzJkQ==
Received: from HE1EUR01FT039.eop-EUR01.prod.protection.outlook.com
	(10.152.0.56) by HE1EUR01HT232.eop-EUR01.prod.protection.outlook.com
	(10.152.0.100) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Fri, 10 Feb 2017 22:53:40 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.0.56) by
	HE1EUR01FT039.mail.protection.outlook.com (10.152.0.222) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Fri, 10 Feb 2017 22:53:40 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Fri, 10 Feb 2017 22:53:40 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 3/4] Allow test_gpsmm program to connect to gpsd on a
	specified server and port
Thread-Index: AQHSg/CFsI+1PieY90O2Tbciustzqw==
Date: Fri, 10 Feb 2017 22:53:40 +0000
Message-ID: <AM4PR08MB0865B4E790CF4D7D937B51518E440@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170210225252.3078-1-rw_norris@hotmail.com>
In-Reply-To: <20170210225252.3078-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:F8F26CD60E1D1AEA3FEBEE3B93CADC9A48A1D9D50556AE06E51FCF5BC7FD73A6;
	UpperCasedChecksum:1E65EEB21118573C4AE1F740D2824DF147FA63DC44FFDD5D3D2B6CB459FF369C;
	SizeAsReceived:7645; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; HE1EUR01HT232;
	5:3lFdlCeVlTlQdEiyrMEOSzYmwi+vY5JKva6zMUSxpLkxQc88PLPlGdbkJ/mihcpqOZSIGD/KxNOozLIBAJgnrloBj01fGkMoSKTbin+EquBlVqhPaQS8lTBbO8Bn9yry37s4E5HuLfRAbS1+bJmdgg==;
	24:2capLeO5sd/wOs6i6IgalNWSJdl4wg9gtV/Fo2W4DTjHECsG/IZTk/+JEIvViNLZlI/+AiUHlNQSy7r3YqRfCIl4cTEiqyWbF41+2in9KsI=;
	7:T+eiQ/QhUAk6++vJ6QScctXK5YAEjVjDcwC6EumPzEzS2Kdz1bBpldN+iXDOuWd7udYaF7+cJ7UY6SiBunN3sIk73HJmprKlfLtuVbO/Hjl2mtizP2zORZX9x245KMforP+XZf4oRjg8h+szl56Ud4RoUNT3Gputh08jUnZLxjFMuBcsQwBlsZRh/N71Fzj/7az7mUafEgCyCEM9nXij7gM1v32nTPPn3mMdlIIiLkKdkWaMVkWU5YLY31PsXBrVjIfacmLfe8FnowaA4m7DMu/zHa/hKFbvqJtOEMdiaCvZ8j5kJ2JyIhgEer34FARXl4oJKKm5nwIip9qgdd7qb6tZvp5S4PbNGVl0vrahH3PPkxz1n2AxMDt7ERDRdS2yXImeIL4hHYGumUvk8iQWXg76OdPpi3kHusf+5sXZ9WNrBmTL7YhhyzkGaX8Hx3WGuI8DUfkCvoEiyGE23F6KeIuSfcdTz6fIqNl1IoVIQHM818Ku8S/3Iur3NKrmymutUjG6d4GxN+hXIq342eyXeQ==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:HE1EUR01HT232;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 7951fc18-582a-4957-7b3b-08d45207a78e
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:HE1EUR01HT232; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:HE1EUR01HT232; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR01HT232; 
x-forefront-prvs: 0214EB3F68
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2017 22:53:40.7651 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT232
X-OriginalArrivalTime: 10 Feb 2017 22:53:43.0123 (UTC)
	FILETIME=[87393A30:01D283F0]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.99
Subject: [gpsd-dev] [PATCH 3/4] Allow test_gpsmm program to connect to gpsd
 on a specified server and port
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2017 22:53:50 -0000

Reuse gpsd_source_spec() to process command line arguments.

TESTED.
Successfully connected with gpsd that's listening on a specified port.
---
 test_gpsmm.cpp | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/test_gpsmm.cpp b/test_gpsmm.cpp
index dab1bfc2..d9668f5b 100644
--- a/test_gpsmm.cpp
+++ b/test_gpsmm.cpp
@@ -12,7 +12,12 @@
 #include <getopt.h>
=20
 #include "libgpsmm.h"
-
+#include "gpsdclient.c"
+/*     YES   --->  ^^^^
+ Using .c rather than the .h to embed gpsd_source_spec() source here
+  so that it is compiled in C++ rather than C of the gps library
+ (otherwise fails to link as the signatures are unavailable/different)
+*/
 using namespace std;
=20
 /*
@@ -127,7 +132,15 @@ int main(int argc, char *argv[])
         }
     }
=20
-    gpsmm gps_rec("localhost", DEFAULT_GPSD_PORT);
+    struct fixsource_t source;
+    /* Grok the server, port, and device. */
+    if (optind < argc) {
+	gpsd_source_spec(argv[optind], &source);
+    } else
+	gpsd_source_spec(NULL, &source);
+
+    //gpsmm gps_rec("localhost", DEFAULT_GPSD_PORT);
+    gpsmm gps_rec(source.server, source.port);
=20
     if (gps_rec.stream(WATCH_ENABLE|WATCH_JSON) =3D=3D NULL) {
         cerr << "No GPSD running.\n";
--=20
2.11.0



From MAILER-DAEMON Fri Feb 10 17:54:00 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ccK4l-00005a-Up
	for mharc-gpsd-dev@gnu.org; Fri, 10 Feb 2017 17:54:00 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59100)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1ccK4j-0008VT-FU
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1ccK4e-0002jJ-JU
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:57 -0500
Received: from blu004-omc4s4.hotmail.com ([65.55.111.143]:57398)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1ccK4e-0002j1-DJ
	for gpsd-dev@nongnu.org; Fri, 10 Feb 2017 17:53:52 -0500
Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.55.111.137])
	by BLU004-OMC4S4.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 10 Feb 2017 14:53:52 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=b0vxbSytULIIpG9hFjKYdyWMlZBvzbrJjTWINnCQMCM=;
	b=g/W2mDe+sqvAa9EL4F/svW59ZdTk6H/vQ5C8U/PaEuyUw+8DqIKxJYKxKaSuprUJGQdSuGnOxFtF4/+d3XS6vMG2HNrjTQFBSZ5C/xMG8NZHvqRfkYzODDo9BOpGwdVBBPl+CEqdh5edQv4WzVgN6HUhj6NO+Wg49yX52Y+vEBQ1h1e5tvVpGHferIj8CXmterJBQSr1YlZJp3dWPoRNDnQPa3BLN4P9kyrY3YfR69qTBJpsn/SPkoOjHASzRXvvXf/naKJzSmsMFGgccWM4yYzarvK3/KG8hjl1Z5sr1JFNvLw4PgzP+WkpmKXGSH87Lt6Ybs9o9zA/ezCVARfcbQ==
Received: from HE1EUR01FT039.eop-EUR01.prod.protection.outlook.com
	(10.152.0.51) by HE1EUR01HT253.eop-EUR01.prod.protection.outlook.com
	(10.152.1.158) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7;
	Fri, 10 Feb 2017 22:53:48 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.0.56) by
	HE1EUR01FT039.mail.protection.outlook.com (10.152.0.222) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.888.7 via Frontend Transport; Fri, 10 Feb 2017 22:53:48 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.015; Fri, 10 Feb 2017 22:53:48 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 4/4] Add Valgrind tests for gps library interface
	variants.
Thread-Index: AQHSg/CKQmRCf5RxbEGJosuoPIioFA==
Date: Fri, 10 Feb 2017 22:53:48 +0000
Message-ID: <AM4PR08MB0865E287D2E8AFAE07AAD9428E440@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170210225252.3078-1-rw_norris@hotmail.com>
In-Reply-To: <20170210225252.3078-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:17FC6FBF2BA957FC54C1C1B5E24195060F2A8891AA956E74721098FBCFFECF3B;
	UpperCasedChecksum:B7DAE79B19D8A508B456523C3C462578925310DBF11EB6A9AD08101C77C2BFB2;
	SizeAsReceived:7538; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; HE1EUR01HT253;
	5:qm7gQ1gPmwRbUbV0jQFf5rGLRHEWKXloqNkv9uzD+yXiMsCFypxAFJCFa1Ui5XuwPPPWb37rECXIREQ+VnNXixsw6H4KDnazLwSrFeStFWNL5q6vUWisQDly+Bq01x21jwoxUAnuJ0E5rP1BzXW7uA==;
	24:7Klf+3cTYlTcplzTVFH5GvRyZQ4z6PjJca2Vnl/x1TuD4+l9f3X+eTt7dJOG/bUDS2JFz5EydxiVoO/HYlhoE/frzwnU+Iem/oljS2HloIc=;
	7:cCSm7yXK6b3c28Twm9i5i9tKBdqqP5u+nqh9OuhvX4jwi7AxNIZEijZ7E/DHaUOxorb5QqKaToRMNyGp4/T+FtoLur1ONedeZNDSANQs2S6LpxNoMnMcu/Yc6H1oT4KcwDSP0C/lTeoCb/6bXl1pWGcUtgF8AQaLMNkzZ9ARGh38UULlYN0/WObAuCfRpP2ZVex3tcq+V2zCKOhJAbyEPOc5gWZicy62vEZdYweFTGlCntoaIMpqJecfY/QMvNkuI06mkLrzuWRnjDIRoRxblWJuJPXzdz0pvh0BiBzehMVZIwOoVqCkgstoCjK+n4eN9syQONogOakfAByl4thY7Zbc2xA7pcHhCQO7rIzoTMcf0JPz7g7bXPsm6d+x/TU7yzA6bNL7liBmhiUXpZdKO3Ns1EBsxSlmLZWmeN83bZVIx3dj2ywwgnKa7+j034IItW/0jBwZcVOq37HA2r1bG7H8kUkJerS8bZ34I6/iJeCJMLL3XjHMVmPtZgoQcySkxZzAzCzkexO20++fxZ1mZg==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:HE1EUR01HT253;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 30d9b2d3-de39-4f14-6090-08d45207ac5a
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:HE1EUR01HT253; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:HE1EUR01HT253; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR01HT253; 
x-forefront-prvs: 0214EB3F68
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2017 22:53:48.4841 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT253
X-OriginalArrivalTime: 10 Feb 2017 22:53:52.0134 (UTC)
	FILETIME=[8C983260:01D283F0]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.111.143
Subject: [gpsd-dev] [PATCH 4/4] Add Valgrind tests for gps library interface
 variants.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2017 22:53:59 -0000

Tests normal gps_open(), gps_read(), gps_close() cycle via test programs.
.test_libgps --> direct C calls
.test_gpsmm  --> the C++ interface
.test_qgpsmm --> the C++ interface on Qt build.

Extends gps/fake.py to allow invoking of the specified client to connect
against an instance of gpsd.

Note some internal issues are flagged by Valgrind on Qt build with Qt4.
Thus these are ignored by specific suppression statements.
Further note that the Qt5 build seems fine.

TESTED.
'scons valgrind-audit' passes with no errors.
'scons valgrind-audit' correctly fails if the previous Qt build memory leak
 is reintroduced.
---
 SConstruct                |  4 ++--
 gps/fake.py               | 40 ++++++++++++++++++++++++++++++++++++++++
 valgrind-audit.py         | 24 ++++++++++++++++++++++++
 valgrind-suppressions-lib | 14 ++++++++++++++
 4 files changed, 80 insertions(+), 2 deletions(-)
 create mode 100644 valgrind-suppressions-lib

diff --git a/SConstruct b/SConstruct
index bc7ba644..5d273b14 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1913,9 +1913,9 @@ method_regress =3D Utility('packet-regress', [test_pa=
cket], [
     '$SRCDIR/test_packet -c >/dev/null',
     ])
=20
-# Run a valgrind audit on the daemon  - not in normal tests
+# Run a valgrind audit on the daemon & client libraries - not in normal te=
sts
 valgrind_audit =3D Utility('valgrind-audit',
-    ['$SRCDIR/valgrind-audit.py', python_built_extensions, gpsd],
+    ['$SRCDIR/valgrind-audit.py', python_built_extensions, gpsd, test_libg=
ps, test_gpsmm, test_qgpsmm],
     '$PYTHON $SRCDIR/valgrind-audit.py'
     )
=20
diff --git a/gps/fake.py b/gps/fake.py
index 5ab636a6..60e2dbf6 100644
--- a/gps/fake.py
+++ b/gps/fake.py
@@ -554,6 +554,42 @@ class DaemonInstance(object):
             self.pid =3D None
=20
=20
+class LibError(BaseException):
+    def __init__(self, msg):
+        super(LibError, self).__init__()
+        self.msg =3D msg
+
+
+class LibInstance(object):
+    "Control a test program instance."
+    def __init__(self):
+        pass
+
+    def spawn(self, port, test_program=3D"", options=3D"", background=3DFa=
lse, prefix=3D""):
+        "Spawn a test lib instance."
+        self.spawncmd =3D None
+
+        # Only look for test program in GPSD_HOME env variable
+        # i.e. don't try any system paths
+        if os.environ.get('GPSD_HOME'):
+            for path in os.environ['GPSD_HOME'].split(':'):
+                _spawncmd =3D "%s/%s" % (path, test_program)
+                if os.path.isfile(_spawncmd) and os.access(_spawncmd, os.X=
_OK):
+                    self.spawncmd =3D _spawncmd
+                    break
+
+        if not self.spawncmd:
+            raise LibError("Cannot execute %s" % self.spawncmd)
+        self.spawncmd +=3D " %s localhost:%s" % (options, port)
+        if prefix:
+            self.spawncmd =3D prefix + " " + self.spawncmd.strip()
+        if background:
+            self.spawncmd +=3D " &"
+        status =3D os.system(self.spawncmd)
+        if os.WIFSIGNALED(status) or os.WEXITSTATUS(status):
+            raise LibError("exited with status %d" % status)
+
+
 class TestSessionError(BaseException):
     def __init__(self, msg):
         super(TestSessionError, self).__init__()
@@ -574,6 +610,7 @@ class TestSession(object):
         self.tcp =3D tcp
         self.slow =3D slow
         self.daemon =3D DaemonInstance()
+        self.library =3D LibInstance()
         self.fakegpslist =3D {}
         self.client_id =3D 0
         self.readers =3D 0
@@ -596,6 +633,9 @@ class TestSession(object):
         self.daemon.spawn(background=3DTrue, prefix=3Dself.prefix, port=3D=
self.port, options=3Dself.options)
         self.daemon.wait_pid()
=20
+    def run_client_program(self, test_program, prefix, options):
+        self.library.spawn(test_program=3Dtest_program, prefix=3Dprefix, o=
ptions=3Doptions, port=3Dself.port)
+
     def set_predicate(self, pred):
         "Set a default go predicate for the session."
         self.default_predicate =3D pred
diff --git a/valgrind-audit.py b/valgrind-audit.py
index c674ef7f..cb703833 100755
--- a/valgrind-audit.py
+++ b/valgrind-audit.py
@@ -99,6 +99,30 @@ try:
 finally:
     test.cleanup()
=20
+num =3D 5
+testClient =3D gps.fake.TestSession(options=3D"-D %d" % debuglevel)
+testClient.progress =3D sys.stderr.write
+memcheck =3D "valgrind  --tool=3Dmemcheck --leak-check=3Dfull --error-exit=
code=3D42 --suppressions=3Dvalgrind-suppressions-lib"
+try:
+    print("\n*** Test #%d: Client library open / close." % num)
+    testClient.spawn()
+    testClient.wait(1)
+    testClient.run_client_program(test_program=3D"test_libgps", prefix=3Dm=
emcheck, options=3D"-f \'?WATCH=3D{\"enable\":true,\"json\":true}\'")
+    print("*** Test #%d complete.\n" % num)
+    testClient.wait(1)
+    num=3Dnum+1
+    print("\n*** Test #%d: Client library open / close." % num)
+    testClient.run_client_program(test_program=3D"test_gpsmm", prefix=3Dme=
mcheck, options=3D"-l 2")
+    print("*** Test #%d complete.\n" % num)
+    testClient.wait(1)
+    num=3Dnum+1
+    print("\n*** Test #%d: Client library open / close." % num)
+    testClient.run_client_program(test_program=3D"test_qgpsmm", prefix=3D"=
export LD_LIBRARY_PATH=3D.; " + memcheck, options=3D"-l 2")
+    print("*** Test #%d complete.\n" % num)
+finally:
+    testClient.cleanup()
+exit
+
 # The following sets edit modes for GNU EMACS
 # Local Variables:
 # mode:python
diff --git a/valgrind-suppressions-lib b/valgrind-suppressions-lib
new file mode 100644
index 00000000..49cfac4b
--- /dev/null
+++ b/valgrind-suppressions-lib
@@ -0,0 +1,14 @@
+# Suppress known library errors reported by valgrind.
+#
+# Qt4 dodgy functions:
+# QLibrary::setFileName
+# QLibrary::setFileNameVersion
+# NB seems OK under Qt5
+#
+{
+   suppressQt
+   Memcheck:Leak
+   match-leak-kinds: definite
+   ...
+   fun:*setFileName*
+}
--=20
2.11.0



From MAILER-DAEMON Sun Feb 12 18:38:08 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cd3ia-0007Fp-AQ
	for mharc-gpsd-dev@gnu.org; Sun, 12 Feb 2017 18:38:08 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41383)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cd3iX-0007Fh-Sr
	for gpsd-dev@nongnu.org; Sun, 12 Feb 2017 18:38:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cd3iU-00004v-Oo
	for gpsd-dev@nongnu.org; Sun, 12 Feb 2017 18:38:05 -0500
Received: from d.mail.sonic.net ([64.142.111.50]:40744)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cd3iU-0008Vs-ES
	for gpsd-dev@nongnu.org; Sun, 12 Feb 2017 18:38:02 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1CNbvRD010174
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Sun, 12 Feb 2017 15:37:57 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1CNbv5k024795
	for <gpsd-dev@nongnu.org>; Sun, 12 Feb 2017 15:37:57 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1CNbus4024791
	for <gpsd-dev@nongnu.org>; Sun, 12 Feb 2017 15:37:57 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Sun, 12 Feb 2017 15:37:56 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB0865E287D2E8AFAE07AAD9428E440@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702121528300.19081@bolt.sonic.net>
References: <20170210225252.3078-1-rw_norris@hotmail.com>
	<AM4PR08MB0865E287D2E8AFAE07AAD9428E440@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVYfaDE5qF857fAWOxdltxfDQZrxXGXAr8YiLyldKRKeCPhpY7dTBby0V3xeP1W9M3bhFNHUBJTofkNZ9NWy1o5b
X-Sonic-ID: C;uEBKSHzx5hGojIs6xpAcWQ== M;uNlvSHzx5hGojIs6xpAcWQ==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.50
Subject: Re: [gpsd-dev] [PATCH 4/4] Add Valgrind tests for gps library
 interface variants.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 12 Feb 2017 23:38:07 -0000


I merged the first 3 patches in this set, but not this one, which has
multiple problems:

On Fri, 10 Feb 2017, Robert Norris wrote:
[...]
>  valgrind_audit = Utility('valgrind-audit',
> -    ['$SRCDIR/valgrind-audit.py', python_built_extensions, gpsd],
> +    ['$SRCDIR/valgrind-audit.py', python_built_extensions, gpsd, test_libgps, test_gpsmm, test_qgpsmm],
>      '$PYTHON $SRCDIR/valgrind-audit.py'
>      )

This fails with libgpsmm=no and/or qt=no.  It needs to be careful not to
add things that are disabled.

[...]
> +    def spawn(self, port, test_program="", options="", background=False, prefix=""):
[...]
> +        if not self.spawncmd:
> +            raise LibError("Cannot execute %s" % self.spawncmd)

If this ever hits, it will bomb attempting to substitute None for the %s.
It's actually pretty meaningless to include something known to be empty,
so it would make more sense to report test_program, along with a fallback
just in case it's unspecified.  e.g.:

	raise LibError("Cannot execute %s" % (test_program or "(null)"))

[...]
> +# QLibrary::setFileName
> +# QLibrary::setFileNameVersion
[...]

Should "QLibrary" be "QtLibrary"?

Fred Wright


From MAILER-DAEMON Mon Feb 13 13:59:37 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cdLqb-0001eC-GV
	for mharc-gpsd-dev@gnu.org; Mon, 13 Feb 2017 13:59:37 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56510)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdLqX-0001bI-V8
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 13:59:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdLqU-00076B-Nt
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 13:59:34 -0500
Received: from col004-omc4s1.hotmail.com ([65.55.34.203]:51740)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cdLqU-00075j-1D
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 13:59:30 -0500
Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.55.34.200])
	by COL004-OMC4S1.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Mon, 13 Feb 2017 10:59:27 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=Rjvyb+EebDm0Q6jmABkDA0YWx5jiuKGan0NBzwhoNPo=;
	b=XVXDw+rmYci6vo3Bax49eOQNrat5iIP8m+7VK3PFpv6xHtqgUkJEO0RpfmCPsW21cSdAK6YPC4lPtV49nOPxXQ5OGA+Bg0BqAe3NKqUfPFooxPi0GcnciWOJ42EQks3mlrpc7+R/eITU+XwDKgQnmmEJdn0POqNe7YooKNqnIzn5vu0+EZaELPYEsSxEXUdB4bQ7KzxY/Kn2cgDsRm8O59jCY4B9tENRfETSNkXBmO/x08Zmrq3f+7F26tpuSphgtLBpnkIlUibCHhv1HvQwn6vnv6+DOz2g5fhnpJ4Xyza4vyM0w8LqjuwZknSePehryQ8+/LpWL2dgCZdsVeel1w==
Received: from HE1EUR01FT055.eop-EUR01.prod.protection.outlook.com
	(10.152.0.54) by HE1EUR01HT070.eop-EUR01.prod.protection.outlook.com
	(10.152.1.35) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Mon, 13 Feb 2017 18:59:15 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.0.55) by
	HE1EUR01FT055.mail.protection.outlook.com (10.152.1.28) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.904.16 via Frontend Transport; Mon, 13 Feb 2017 18:59:15 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.027; Mon, 13 Feb 2017 18:59:15 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [gpsd-dev] [PATCH 4/4] Add Valgrind tests for gps library
	interface variants.
Thread-Index: AQHSg/CKQmRCf5RxbEGJosuoPIioFKFmCjEAgAFA8/8=
Date: Mon, 13 Feb 2017 18:59:14 +0000
Message-ID: <AM4PR08MB086580EB13BEAB0BBE999ECF8E590@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170210225252.3078-1-rw_norris@hotmail.com>
	<AM4PR08MB0865E287D2E8AFAE07AAD9428E440@AM4PR08MB0865.eurprd08.prod.outlook.com>,
	<Pine.LNX.4.58L1X.1702121528300.19081@bolt.sonic.net>
In-Reply-To: <Pine.LNX.4.58L1X.1702121528300.19081@bolt.sonic.net>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:0DA4FD6D549356F94A328E9287C64CB0F48955BB64B55B387604A6B6CB8FB36D;
	UpperCasedChecksum:508E155BFD3626C63E6AFCF8C59367772E4B7E6327803EE8550DB7B2F1DC4B71;
	SizeAsReceived:7958; Count:39
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [v5ve+FGzkMseRqZeDfzis72qZ1ZBKeSz]
x-incomingheadercount: 39
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; HE1EUR01HT070;
	5:H58XEHMS6QxltbyqtBNbEAZSe6jgK7dlaoAN9q70fy0/hdM0a7KSw5ySEgH+KTlNL5JJH++FU7XEtDF1qwhIEh/ybyY8uBrJWBVZn+5tK5pqYEigNx7AflBVNkZKX29WVIiXLC7bL01lggysnGUC3w==;
	24:ANTlMYMUf8SAx/dFhU+kJfYCNwqAvojiuR7HxTK1VFoj6k4fGPsTCAj9ug4+z7dAJ8O1X57dTOumq7GwtrMM8vkJ68F8XzASohnUz1sXL1s=;
	7:c3ZJHANHoTMj4wnbIyvCKb/buKIWXtcJ+B0KSNt06Ie509HODX7zu+gghnTugjJ417SnagOqI3y5HcBxeTU+ftE5I6RVEk/brbQgUUEUQJgwxPZMSKgQ+Kn4hr/sW49gzHudJmDh4wZXvTGeRnXZ1GIhTJJF28l8w8VbDMdvO+wFbAEnW+Ff0rJRzV4/lg7XYnuLlwibDA4vfKJORmzZCimJ3Hc92oHmXu0SCabhrxGPbeVZQmIXfwGNfoiPtgHIxE+zoP3McZBey9Dv780D9pPOWiffCKX9zEtszx64WMTw3p5vwTUyYp2YKqhyjWzrrzoHTtuf71gVuiDk8mCYLmgBKaxZVH8d5+tQLmZF/304JiXxhHosWLRpeb3JGH528MWteibRFCLRh+EUksmvh+F8ysSQTYgdzwjyy860N46Mp1w/k4Bp7+odhbW9K8gs8u5Uc4U0beOXKyUnwdUTvZwXbxavJFHtKv2TJF5UWEd8GboV+9HIUx4x1TRfhZ3/BXwZUDSsexuRdPsmieOIGA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:HE1EUR01HT070;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 52e505d6-4d84-4c90-fb8d-08d4544267ac
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:HE1EUR01HT070; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:HE1EUR01HT070; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR01HT070; 
x-forefront-prvs: 02176E2458
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2017 18:59:14.8953 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT070
X-OriginalArrivalTime: 13 Feb 2017 18:59:27.0155 (UTC)
	FILETIME=[4C73F830:01D2862B]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.34.203
Subject: Re: [gpsd-dev] [PATCH 4/4] Add Valgrind tests for gps library
 interface variants.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Feb 2017 18:59:36 -0000

Thanks for reviewing this patch.

I was less confident about it - just getting something to mostly work.

Since it doesn't get run automatically I didn't test with various scons con=
fig options such as qt=3Dno, etc...

Yeh that LibError bit is indeed quite wrong!

Finally it is indeed QLibrary (not QtLibrary) - see for example: http://doc=
.qt.io/qt-4.8/qlibrary.html

I'll come up with an improved version.

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

________________________________________
From: gpsd-dev <gpsd-dev-bounces+rw_norris=3Dhotmail.com@nongnu.org> on beh=
alf of Fred Wright <fw@fwright.net>
Sent: 12 February 2017 23:37:56
To: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [PATCH 4/4] Add Valgrind tests for gps library inte=
rface variants.

I merged the first 3 patches in this set, but not this one, which has
multiple problems:

On Fri, 10 Feb 2017, Robert Norris wrote:
[...]
>  valgrind_audit =3D Utility('valgrind-audit',
> -    ['$SRCDIR/valgrind-audit.py', python_built_extensions, gpsd],
> +    ['$SRCDIR/valgrind-audit.py', python_built_extensions, gpsd, test_li=
bgps, test_gpsmm, test_qgpsmm],
>      '$PYTHON $SRCDIR/valgrind-audit.py'
>      )

This fails with libgpsmm=3Dno and/or qt=3Dno.  It needs to be careful not t=
o
add things that are disabled.

[...]
> +    def spawn(self, port, test_program=3D"", options=3D"", background=3D=
False, prefix=3D""):
[...]
> +        if not self.spawncmd:
> +            raise LibError("Cannot execute %s" % self.spawncmd)

If this ever hits, it will bomb attempting to substitute None for the %s.
It's actually pretty meaningless to include something known to be empty,
so it would make more sense to report test_program, along with a fallback
just in case it's unspecified.  e.g.:

        raise LibError("Cannot execute %s" % (test_program or "(null)"))

[...]
> +# QLibrary::setFileName
> +# QLibrary::setFileNameVersion
[...]

Should "QLibrary" be "QtLibrary"?

Fred Wright



From MAILER-DAEMON Mon Feb 13 16:57:36 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cdOcq-0000Gp-Pn
	for mharc-gpsd-dev@gnu.org; Mon, 13 Feb 2017 16:57:36 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52889)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cdOco-0000FZ-FO
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 16:57:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cdOcl-0002sc-5r
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 16:57:34 -0500
Received: from d.mail.sonic.net ([64.142.111.50]:33376)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cdOck-0002rf-Rk
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 16:57:31 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1DLvR0J030904
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Mon, 13 Feb 2017 13:57:28 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1DLvR97008696
	for <gpsd-dev@nongnu.org>; Mon, 13 Feb 2017 13:57:27 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1DLvRa3008693
	for <gpsd-dev@nongnu.org>; Mon, 13 Feb 2017 13:57:27 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Mon, 13 Feb 2017 13:57:27 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB086580EB13BEAB0BBE999ECF8E590@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702131348410.3647@bolt.sonic.net>
References: <20170210225252.3078-1-rw_norris@hotmail.com>
	<AM4PR08MB0865E287D2E8AFAE07AAD9428E440@AM4PR08MB0865.eurprd08.prod.outlook.com>,
	<Pine.LNX.4.58L1X.1702121528300.19081@bolt.sonic.net>
	<AM4PR08MB086580EB13BEAB0BBE999ECF8E590@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVb8rXFI1NH/Hz4vtkiggI0zjire2JSNK0DlRrbkSSMvOj9lxW5jRbbhMiekw8qV5eSkyqxmSzwQ3bDFP2kN2WaB
X-Sonic-ID: C;MHT+aDfy5hGOs4s6xpAcWQ== M;ajIaaTfy5hGOs4s6xpAcWQ==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.50
Subject: Re: [gpsd-dev] [PATCH 4/4] Add Valgrind tests for gps library
 interface variants.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Feb 2017 21:57:35 -0000


On Mon, 13 Feb 2017, Robert Norris wrote:

> Since it doesn't get run automatically I didn't test with various scons config options such as qt=no, etc...

Sure, but one doesn't want valgrind-audit to be broken.  In particular,
installing Qt shouldn't be a prerequisite for running it.

Without digging into it, I suspect that adding test_libgps unconditionally
is OK, but the other two need to be conditionsl.

Meanwhile, I need to figure out why valgrind-audit is completely broken
(for running, not building) on OSX, apparently at least as far back as
release-3.16.  I could swear I ran it at some point; maybe something in
the OS changed.

> I'll come up with an improved version.

OK.  Also consider writing more concise commit summaries.  Those are
sometimes displayed in the same line as other information, and line wrap
is annoying.  The official guideline is 50 characters, which is sometimes
too constraining, but it's something to shoot for.  If the concise summary
isn't an adequately complete description (as is usually the case), then
one can add as many additional paragraphs as necessary to properly explain
it.

Fred Wright


From MAILER-DAEMON Mon Feb 13 18:52:35 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cdQQ7-0000mP-74
	for mharc-gpsd-dev@gnu.org; Mon, 13 Feb 2017 18:52:35 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56004)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdQQ3-0000mB-DB
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 18:52:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdQPy-0006vR-IP
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 18:52:31 -0500
Received: from snt004-omc1s49.hotmail.com ([65.54.61.86]:54333)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cdQPy-0006v4-5E
	for gpsd-dev@nongnu.org; Mon, 13 Feb 2017 18:52:26 -0500
Received: from EUR02-VE1-obe.outbound.protection.outlook.com ([65.55.90.8]) by
	SNT004-OMC1S49.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Mon, 13 Feb 2017 15:32:20 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=IDCUVV7PaOhyig/jXlTialw9c+BEXX26oo/Erc31PjE=;
	b=uh5Tib/Pd7F4BQUoX+6M+92AUtot8vr9moDoZt7AgAD2HjWebihCGRv39RgdMw7lzRSnVvfC562ne9s1ZekFZu2YFlgEaVBczVkOZgiXi+TgLltGrNMzHGUrqTqHnqdaVCmLMQ9KMdsoRe7AgRBkufcAFXCZ/MocJw6Umfrrfbv16za1gBOeG/Vxdj4oOE5u2WnHKnHKuhHaOush5eEhQNspJGcZH+woDaxY6xSA03tW1NGg1SBKXjdEB1LoB8aLGDGw63TFYodajdP1PlFj1S9AzmGqYozMpLH0SSiXHW/nMgrJYKm1BDpnMeCbU0uicZ34LeLlWhwRHp6XhrVtaw==
Received: from VE1EUR02FT050.eop-EUR02.prod.protection.outlook.com
	(10.152.12.55) by VE1EUR02HT088.eop-EUR02.prod.protection.outlook.com
	(10.152.13.224) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Mon, 13 Feb 2017 23:32:18 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.12.55) by
	VE1EUR02FT050.mail.protection.outlook.com (10.152.13.198) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.904.16 via Frontend Transport; Mon, 13 Feb 2017 23:32:18 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.027; Mon, 13 Feb 2017 23:32:18 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH] Add Valgrind tests for gps library interfaces.
Thread-Index: AQHShlFq081RLQIzgEOZRv3z2Cj4ZQ==
Date: Mon, 13 Feb 2017 23:32:18 +0000
Message-ID: <AM4PR08MB086506316E141D4BAE3C5E2A8E590@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:31667E09534A3EE9305F2CC42EBA9B61F8C55365E8F7AB6B95913A53798B1079;
	UpperCasedChecksum:858556A7247C64EA859F07D7558A67FD5DB0BD38343CBC18E9A6D9A111599DB7;
	SizeAsReceived:7462; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR02HT088;
	5:SRYJTk+UQebXkc8doYDIEhiqEiEcNxhueEF167ltN95cbUCqke/G+Hb3PJkiC5rDYHVmR0TN0FOnisrVnKOXrs/wAXFWcIWtuPhMe4psV4VkpfLInwL0tApfmBEISXipjOnN8AJ32sGka+hzerypnw==;
	24:axxs4J0eVAa2SaDwkad9OWhbyZFiUC2sAKUSKZoosNgLapRLc+3eKCclneS+AePszCEX+beSQUDFoxRVxNgw+Ch2EBLxbLhd2MtBzSguOSA=;
	7:rTlY6hyaXpQjhLgOK3zDGdYvOGxZ93y0NHIVcimqvgLgwezq/vLzwa4wexFmx4qZ+I3si2luxBnE0Ygc0eW79To+KN9sSq2sLW1xfXiicdohbv7Pv7H0Wf2lLma+FdCIz8V9orF9MqxKrdYTNNQuBPbgjqYRrzX4TmbyllwraPB/dZzidRtWDqteGq/aY1naiGBrLXE46VE4oWivUcBsuB0xX9gniP9Y/5lQlqKZVMjwPWCqq3afisA6BNF29P1E7Dimton3O/zvGvnq2H9zItYckCgqNrA1OuT6t0O9UXgmvAc0KjDHRKFu0i760H7z8IzFdYKpfIPfMmfVwwSoIsyy3gYAUJsvIn2rxFLtZ2YMpKsixetBCPbspOPAZnqdyO7nHSDLIS3uGR3/jfneaGvBlMbXlfzv2rVsKDNNjutsH6cyxOQTZWYdKgrCJBfJOCobOcZD4jSjoJXUTXE/H4agFq/xIKyxfnjx+4xiyu9CID1T2EPZwfLpP1XgXqQ2WcB6Vpijz6lsltFff7Td+Q==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900007);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR02HT088;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: e3e7f590-db64-4c54-eed2-08d454688c58
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506495)(5061507331)(1603103135)(1601125176)(1701031045);
	SRVR:VE1EUR02HT088; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:VE1EUR02HT088; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR02HT088; 
x-forefront-prvs: 02176E2458
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2017 23:32:18.4990 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT088
X-OriginalArrivalTime: 13 Feb 2017 23:32:20.0582 (UTC)
	FILETIME=[6BC6A860:01D28651]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.61.86
Subject: [gpsd-dev] [PATCH] Add Valgrind tests for gps library interfaces.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Feb 2017 23:52:33 -0000

Tests normal gps_open(), gps_read(), gps_close() cycle via test programs.
.test_libgps --> direct C calls
.test_gpsmm  --> the C++ interface
.test_qgpsmm --> the C++ interface on Qt build.

Extends gps/fake.py to allow invoking of the specified client to connect
against an instance of gpsd.

Note some internal issues are flagged by Valgrind on Qt build with Qt4.
Thus these are ignored by specific suppression statements.
Further note that the Qt5 build seems fine.

TESTED.
'scons valgrind-audit' passes with no errors.
'scons valgrind-audit' correctly fails if the previous Qt build memory leak
 is reintroduced.
---
 SConstruct                |  9 +++++++--
 gps/fake.py               | 42 ++++++++++++++++++++++++++++++++++++++++++
 valgrind-audit.py         | 24 ++++++++++++++++++++++++
 valgrind-suppressions-lib | 14 ++++++++++++++
 4 files changed, 87 insertions(+), 2 deletions(-)
 create mode 100644 valgrind-suppressions-lib

diff --git a/SConstruct b/SConstruct
index bc7ba644..1c1adf7b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1913,9 +1913,14 @@ method_regress =3D Utility('packet-regress', [test_p=
acket], [
     '$SRCDIR/test_packet -c >/dev/null',
     ])
=20
-# Run a valgrind audit on the daemon  - not in normal tests
+# Run a valgrind audit on the daemon & client libraries - not in normal te=
sts
+audit_progs =3D [ python_built_extensions, gpsd, test_libgps ]
+if env['libgpsmm']:
+    audit_progs +=3D test_gpsmm
+if qt_env:
+    audit_progs +=3D test_qgpsmm
 valgrind_audit =3D Utility('valgrind-audit',
-    ['$SRCDIR/valgrind-audit.py', python_built_extensions, gpsd],
+    ['$SRCDIR/valgrind-audit.py', audit_progs],
     '$PYTHON $SRCDIR/valgrind-audit.py'
     )
=20
diff --git a/gps/fake.py b/gps/fake.py
index 5ab636a6..361b1a6b 100644
--- a/gps/fake.py
+++ b/gps/fake.py
@@ -554,6 +554,44 @@ class DaemonInstance(object):
             self.pid =3D None
=20
=20
+class LibError(BaseException):
+    def __init__(self, msg):
+        super(LibError, self).__init__()
+        self.msg =3D msg
+
+    def __str__(self):
+        return repr(self.msg)
+
+class LibInstance(object):
+    "Control a test program instance."
+    def __init__(self):
+        pass
+
+    def spawn(self, port, test_program=3D"", options=3D"", background=3DFa=
lse, prefix=3D""):
+        "Spawn a test lib instance."
+        self.spawncmd =3D None
+
+        # Only look for test program in GPSD_HOME env variable
+        # i.e. don't try any system paths
+        if os.environ.get('GPSD_HOME'):
+            for path in os.environ['GPSD_HOME'].split(':'):
+                _spawncmd =3D "%s/%s" % (path, test_program)
+                if os.path.isfile(_spawncmd) and os.access(_spawncmd, os.X=
_OK):
+                    self.spawncmd =3D _spawncmd
+                    break
+
+        if not self.spawncmd:
+            raise LibError("Cannot execute %s" % (test_program or "(null)"=
))
+        self.spawncmd +=3D " %s localhost:%s" % (options, port)
+        if prefix:
+            self.spawncmd =3D prefix + " " + self.spawncmd.strip()
+        if background:
+            self.spawncmd +=3D " &"
+        status =3D os.system(self.spawncmd)
+        if os.WIFSIGNALED(status) or os.WEXITSTATUS(status):
+            raise LibError("exited with status %d" % status)
+
+
 class TestSessionError(BaseException):
     def __init__(self, msg):
         super(TestSessionError, self).__init__()
@@ -574,6 +612,7 @@ class TestSession(object):
         self.tcp =3D tcp
         self.slow =3D slow
         self.daemon =3D DaemonInstance()
+        self.library =3D LibInstance()
         self.fakegpslist =3D {}
         self.client_id =3D 0
         self.readers =3D 0
@@ -596,6 +635,9 @@ class TestSession(object):
         self.daemon.spawn(background=3DTrue, prefix=3Dself.prefix, port=3D=
self.port, options=3Dself.options)
         self.daemon.wait_pid()
=20
+    def run_client_program(self, test_program, prefix, options):
+        self.library.spawn(test_program=3Dtest_program, prefix=3Dprefix, o=
ptions=3Doptions, port=3Dself.port)
+
     def set_predicate(self, pred):
         "Set a default go predicate for the session."
         self.default_predicate =3D pred
diff --git a/valgrind-audit.py b/valgrind-audit.py
index c674ef7f..df36b739 100755
--- a/valgrind-audit.py
+++ b/valgrind-audit.py
@@ -99,6 +99,30 @@ try:
 finally:
     test.cleanup()
=20
+num =3D 5
+testClient =3D gps.fake.TestSession(options=3D"-D %d" % debuglevel)
+testClient.progress =3D sys.stderr.write
+memcheck =3D "valgrind --tool=3Dmemcheck --leak-check=3Dfull --error-exitc=
ode=3D42 --suppressions=3Dvalgrind-suppressions-lib"
+try:
+    print("\n*** Test #%d: Client library open / close." % num)
+    testClient.spawn()
+    testClient.wait(1)
+    testClient.run_client_program(test_program=3D"test_libgps", prefix=3Dm=
emcheck, options=3D"-f \'?WATCH=3D{\"enable\":true,\"json\":true}\'")
+    print("*** Test #%d complete.\n" % num)
+    testClient.wait(1)
+    num=3Dnum+1
+    print("\n*** Test #%d: Client library open / close." % num)
+    testClient.run_client_program(test_program=3D"test_gpsmm", prefix=3Dme=
mcheck, options=3D"-l 2")
+    print("*** Test #%d complete.\n" % num)
+    testClient.wait(1)
+    num=3Dnum+1
+    print("\n*** Test #%d: Client library open / close." % num)
+    testClient.run_client_program(test_program=3D"test_qgpsmm", prefix=3D"=
export LD_LIBRARY_PATH=3D.; " + memcheck, options=3D"-l 2")
+    print("*** Test #%d complete.\n" % num)
+finally:
+    testClient.cleanup()
+exit
+
 # The following sets edit modes for GNU EMACS
 # Local Variables:
 # mode:python
diff --git a/valgrind-suppressions-lib b/valgrind-suppressions-lib
new file mode 100644
index 00000000..49cfac4b
--- /dev/null
+++ b/valgrind-suppressions-lib
@@ -0,0 +1,14 @@
+# Suppress known library errors reported by valgrind.
+#
+# Qt4 dodgy functions:
+# QLibrary::setFileName
+# QLibrary::setFileNameVersion
+# NB seems OK under Qt5
+#
+{
+   suppressQt
+   Memcheck:Leak
+   match-leak-kinds: definite
+   ...
+   fun:*setFileName*
+}
--=20
2.11.0



From MAILER-DAEMON Tue Feb 14 16:30:35 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cdkgF-0007Vd-Kl
	for mharc-gpsd-dev@gnu.org; Tue, 14 Feb 2017 16:30:35 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48002)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdkgB-0007SE-LZ
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:30:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdkg8-0000dF-6q
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:30:31 -0500
Received: from blu004-omc4s32.hotmail.com ([65.55.111.171]:50275)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cdkg7-0000cj-Pu
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:30:28 -0500
Received: from EUR03-AM5-obe.outbound.protection.outlook.com ([65.55.111.137])
	by BLU004-OMC4S32.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Tue, 14 Feb 2017 13:30:26 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=VzffE+rhWOim5WqsUR0b9dUUA/gK5O87Chob8Lk0Cog=;
	b=tNRzvY1NR5E4j5vF22mRqE2lSr9DpPuA3+Us/jWe3llBlH/aQVMvaqv6BBgIGZxQsgyWbk+iFnlwm4Gh90qvSn3RkICVMIc/rUevsVkYbDuq11SJCI8ou8YHqR3RJE0BC34IM55xuyI15SYQJxxLIzR8kM1pTDiiX1N2sgprgi5iJdxK/UYGU+eywDOUKFI9rZLbJFxvY2MdSXxxrOcJWc7WfzO2sDL7Dj3tUzjmJnKOSsANw7KBupk7KUNl6zvopEUSsCxW9HYfSir+sACLWWdiBpjsRNMMEBATwY6gvfLyOc6tWa7VOoYbcMQkHwN1Y+XMI0H3Agcl+NVVsBpmBQ==
Received: from VE1EUR03FT046.eop-EUR03.prod.protection.outlook.com
	(10.152.18.54) by VE1EUR03HT216.eop-EUR03.prod.protection.outlook.com
	(10.152.18.198) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Tue, 14 Feb 2017 21:30:25 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.18.55) by
	VE1EUR03FT046.mail.protection.outlook.com (10.152.19.226) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.904.16 via Frontend Transport; Tue, 14 Feb 2017 21:30:24 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.027; Tue, 14 Feb 2017 21:30:25 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 2/2] Windows libgps support
Thread-Index: AQHShwmNwIUtbxZyokeILP97ILvQqA==
Date: Tue, 14 Feb 2017 21:30:25 +0000
Message-ID: <AM4PR08MB0865B3756D795EFC30F300FE8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170214212947.8639-1-rw_norris@hotmail.com>
In-Reply-To: <20170214212947.8639-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:0491D63F406759331F52F0354E7DBAFF4DA94C0C6D26D2179F7FB12EF8A2C4AE;
	UpperCasedChecksum:A6CABE48E781283D456AC90FA204A7E0636064553023276EA753EDCE42C2948E;
	SizeAsReceived:7474; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR03HT216;
	5:2ETUGwTTtAyR6rJHKLY3lqNU6ePuTazqs8DkHorWFsmLOAZhbFzVqgdFzvCkAKvHF1bnLS/MtKuYAS1mt+FV4pMPSQHuboukyfP7B+FRERJdyWGkUNW/bkcZeE5IAYYwIdW7XGRFii4riD6CSN3QfzFfNy8agBNw5dQOWv9QGU8=;
	24:1nfucHFEJP0Q0jqZUCBDt3NWX6RMZk3RVKpPjNMQrjJjq9IBhktjLGPcdDRSCfP2g3TMxqgMfatS1W/sGDwLH2vhjOU9Rhv/URlw9JQYB30=;
	7:+MWhUrBxvdmPc8r2HiG44kM5ORw7mdlgarnkRBGSM+Fx95itnkREeI4eTZQdDMIjPgWFF57EyZdnQKHGBS5gmP826zxN1Yb+6wophefnnqZvjhpImMmt1wHY4uf69C2/i35kvQMG2wTvBJTqDwe52seExCsOivDosP3N11R8Mi9VeOxSDrSdpv6x10EQfYnlk8PFDnx42YJWj2M92TWFV0o8VJHfOgv2I9RzaGfFMQHOzsL2WXBz/Nb5T6xZekXagOG3EGZ7AwHGJUikO4KJR4eT7xIEqzlQ8tfFeOBCcgI5HMLdVeSU/LscRxL7Q+iFXDtE6oqpB5RvIkhSpxUhnsRu0z48ndERXFE37Eo/ymkojJ4BBcnGHMIi1iQpu6fMnqDZ4I7FCvC9pfPgvpz/j7/BeNuTgPq/+7+xfLoSxSI0zbODzCyDvdlFipw4SR+tmiRm6RUltxy7JKzX+rvzb0AgoZVtymHav7W/EXw62FGR/ZAj/+KSgF2YA4f5npIg0YW9f2YOOknC1OJE1hvyUw==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900009);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR03HT216;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 0a1ca730-1c8b-4269-0b9d-08d45520af76
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506511)(5061507331)(1603103135)(1601125192)(1701031045);
	SRVR:VE1EUR03HT216; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:VE1EUR03HT216; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR03HT216; 
x-forefront-prvs: 0218A015FA
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2017 21:30:25.0271 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT216
X-OriginalArrivalTime: 14 Feb 2017 21:30:26.0817 (UTC)
	FILETIME=[8ED86F10:01D28709]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.111.171
Subject: [gpsd-dev] [PATCH 2/2] Windows libgps support
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Feb 2017 21:30:33 -0000

Add Windows versions for network functions and disable unused features.

Add detection of various headers and functions that aren't available in
Windows. Note that netlib_localsocket() has no functional implementation
on Windows, but it isn't to be used on that platform and it's not part of
libgps anyway.

Using send() rather than write() seems to work on Windows.

For Windows need to ensure networking is initialised on opening of sockets
(and then correspondingly shutdown upon closing).

Note that within gpsd.h the termios structures and serial related functions
are removed from the Windows build. These are only accessed in serial.c by
gpsd, so since the Windows build is only generating libgps there is
currently no need to modify serial.c.

And for os_compat.h, daemon() is simply disabled under Windows as it's not
used within libgps.

TESTED:
Confirmed compiles under a cross compiler.
Manual build and run of test_libgps on Windows which successfully connects
to a host running GPSD
Manual build DLL version and link with a Windows version of a program
(Viking) that then successfully connects and monitors positions from GPSD

Otherwise no effect on current supported systems.
'scons build-all check' - passes.
---
 SConstruct    |  8 +++++++-
 gpsd.h        | 13 ++++++++++++-
 libgps_sock.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++=
++--
 netlib.c      | 40 +++++++++++++++++++++++++++++++++-----
 os_compat.c   |  5 +++--
 test_libgps.c |  3 ++-
 6 files changed, 119 insertions(+), 12 deletions(-)

diff --git a/SConstruct b/SConstruct
index 1de0fa75..c780bcbb 100644
--- a/SConstruct
+++ b/SConstruct
@@ -750,9 +750,15 @@ else:
             announce("You do not have the endian.h header file. RTCM V2 su=
pport disabled.")
             env["rtcm104v2"] =3D False
=20
+    for hdr in ("sys/un", "sys/socket", "sys/select", "netdb", "netinet/in=
", "netinet/ip", "arpa/inet", "termios", "winsock2"):
+        if config.CheckHeader(hdr + ".h"):
+            confdefs.append("#define HAVE_%s_H 1\n" % hdr.replace("/","_")=
.upper())
+        else:
+            confdefs.append("/* #undef HAVE_%s_H */\n" % hdr.replace("/","=
_").upper())
+
     # check function after libraries, because some function require librar=
ies
     # for example clock_gettime() require librt on Linux glibc < 2.17
-    for f in ("daemon", "strlcpy", "strlcat", "clock_gettime", "strptime",=
 "gmtime_r" ):
+    for f in ("daemon", "strlcpy", "strlcat", "clock_gettime", "strptime",=
 "gmtime_r", "inet_ntop", "fcntl"):
         if config.CheckFunc(f):
             confdefs.append("#define HAVE_%s 1\n" % f.upper())
         else:
diff --git a/gpsd.h b/gpsd.h
index b3dc3c97..50aa759a 100644
--- a/gpsd.h
+++ b/gpsd.h
@@ -17,11 +17,16 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
+#include "gpsd_config.h"
+#ifdef HAVE_TERMIOS_H
 #include <termios.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h> /* for fd_set */
+#endif
 #include <time.h>    /* for time_t */
=20
 #include "gps.h"
-#include "gpsd_config.h"
 #include "os_compat.h"
=20
 /*
@@ -361,11 +366,13 @@ struct gps_type_t {
     void (*init_query)(struct gps_device_t *session);
     void (*event_hook)(struct gps_device_t *session, event_t event);
 #ifdef RECONFIGURE_ENABLE
+#ifdef HAVE_TERMIOS_H
     bool (*speed_switcher)(struct gps_device_t *session,
 				     speed_t speed, char parity, int stopbits);
     void (*mode_switcher)(struct gps_device_t *session, int mode);
     bool (*rate_switcher)(struct gps_device_t *session, double rate);
     double min_cycle;
+#endif /* HAVE_TERMIOS_H */
 #endif /* RECONFIGURE_ENABLE */
 #ifdef CONTROLSEND_ENABLE
     ssize_t (*control_send)(struct gps_device_t *session, char *buf, size_=
t buflen);
@@ -472,7 +479,9 @@ struct gps_device_t {
     sourcetype_t sourcetype;
     servicetype_t servicetype;
     int mode;
+#ifdef HAVE_TERMIOS_H
     struct termios ttyset, ttyset_old;
+#endif
 #ifndef FIXED_PORT_SPEED
     unsigned int baudindex;
 #endif /* FIXED_PORT_SPEED */
@@ -822,9 +831,11 @@ extern ssize_t gpsd_serial_write(struct gps_device_t *=
,
 				 const char *, const size_t);
 extern bool gpsd_next_hunt_setting(struct gps_device_t *);
 extern int gpsd_switch_driver(struct gps_device_t *, char *);
+#ifdef HAVE_TERMIOS_H
 extern void gpsd_set_speed(struct gps_device_t *, speed_t, char, unsigned =
int);
 extern speed_t gpsd_get_speed(const struct gps_device_t *);
 extern speed_t gpsd_get_speed_old(const struct gps_device_t *);
+#endif /* HAVE_TERMIOS_H */
 extern int gpsd_get_stopbits(const struct gps_device_t *);
 extern char gpsd_get_parity(const struct gps_device_t *);
 extern void gpsd_assert_sync(struct gps_device_t *);
diff --git a/libgps_sock.c b/libgps_sock.c
index ea04b8cd..31f73f5c 100644
--- a/libgps_sock.c
+++ b/libgps_sock.c
@@ -16,11 +16,19 @@
 #include <sys/time.h>	 /* expected to have a select(2) prototype a la SuS =
*/
 #include <sys/types.h>
 #include <sys/stat.h>
+#include "gpsd_config.h"
+#ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#endif /* HAVE_SYS_SELECT_H */
 #include <unistd.h>
=20
 #ifndef USE_QT
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif /* HAVE_WINSOCK2_H */
 #else
 #include <QTcpSocket>
 #endif /* USE_QT */
@@ -43,6 +51,33 @@ struct privdata_t
 #endif /* LIBGPS_DEBUG */
 };
=20
+#ifdef HAVE_WINSOCK2_H
+static bool need_init =3D TRUE;
+static bool need_finish =3D TRUE;
+
+static bool windows_init(void)
+/* Ensure socket networking is initialized for Windows. */
+{
+    WSADATA wsadata;
+    /* request access to Windows Sockets API version 2.2 */
+    int res =3D WSAStartup(MAKEWORD(2, 2), &wsadata);
+    if (res !=3D 0) {
+      libgps_debug_trace((DEBUG_CALLS, "WSAStartup returns error %d\n", re=
s));
+    }
+    return (res =3D=3D 0);
+}
+
+static bool windows_finish(void)
+/* Shutdown Windows Sockets. */
+{
+  int res =3D WSACleanup();
+  if (res !=3D 0) {
+    libgps_debug_trace((DEBUG_CALLS, "WSACleanup returns error %d\n", res)=
);
+  }
+  return (res =3D=3D 0);
+}
+#endif /* HAVE_WINSOCK2_H */
+
 int gps_sock_open(const char *host, const char *port,
 		  struct gps_data_t *gpsdata)
 {
@@ -54,6 +89,11 @@ int gps_sock_open(const char *host, const char *port,
     libgps_debug_trace((DEBUG_CALLS, "gps_sock_open(%s, %s)\n", host, port=
));
=20
 #ifndef USE_QT
+#ifdef HAVE_WINSOCK2_H
+	if (need_init) {
+	  need_init !=3D windows_init();
+	}
+#endif
 	if ((gpsdata->gps_fd =3D
 	    netlib_connectsock(AF_UNSPEC, host, port, "tcp")) < 0) {
 	    errno =3D gpsdata->gps_fd;
@@ -62,7 +102,7 @@ int gps_sock_open(const char *host, const char *port,
         }
 	else
 	    libgps_debug_trace((DEBUG_CALLS, "netlib_connectsock() returns socket=
 on fd %d\n", gpsdata->gps_fd));
-#else
+#else /* HAVE_WINSOCK2_H */
 	QTcpSocket *sock =3D new QTcpSocket();
 	gpsdata->gps_fd =3D sock;
 	sock->connectToHost(host, QString(port).toInt());
@@ -119,7 +159,14 @@ int gps_sock_close(struct gps_data_t *gpsdata)
     gpsdata->privdata =3D NULL;
 #ifndef USE_QT
     int status;
+#ifdef HAVE_WINSOCK2_H
+    status =3D closesocket(gpsdata->gps_fd);
+    if (need_finish) {
+      need_finish !=3D windows_finish();
+    }
+#else
     status =3D close(gpsdata->gps_fd);
+#endif /* HAVE_WINSOCK2_H */
     gpsdata->gps_fd =3D -1;
     return status;
 #else
@@ -160,7 +207,9 @@ int gps_sock_read(struct gps_data_t *gpsdata)
 						     sizeof(PRIVATE(gpsdata)->buffer) -
 						     PRIVATE(gpsdata)->waiting);
 #endif
-
+#ifdef HAVE_WINSOCK2_H
+	int wserr =3D WSAGetLastError();
+#endif /* HAVE_WINSOCK2_H */
 	/* if we just received data from the socket, it's in the buffer */
 	if (status > -1)
 	    PRIVATE(gpsdata)->waiting +=3D status;
@@ -175,9 +224,14 @@ int gps_sock_read(struct gps_data_t *gpsdata)
 		return -1;
 #ifndef USE_QT
 	    /* count transient errors as success, we'll retry later */
+#ifdef HAVE_WINSOCK2_H
+	    else if (wserr =3D=3D WSAEINTR || wserr =3D=3D WSAEWOULDBLOCK)
+		return 0;
+#else
 	    else if (errno =3D=3D EINTR || errno =3D=3D EAGAIN
 		     || errno =3D=3D EWOULDBLOCK)
 		return 0;
+#endif /* HAVE_WINSOCK2_H */
 #endif
 	    /* hard error return of -1, pass it along */
 	    else
@@ -245,7 +299,11 @@ int gps_sock_send(struct gps_data_t *gpsdata, const ch=
ar *buf)
 /* send a command to the gpsd instance */
 {
 #ifndef USE_QT
+#ifdef HAVE_WINSOCK2_H
+    if (send(gpsdata->gps_fd, buf, strlen(buf), 0) =3D=3D (ssize_t) strlen=
(buf))
+#else
     if (write(gpsdata->gps_fd, buf, strlen(buf)) =3D=3D (ssize_t) strlen(b=
uf))
+#endif /* HAVE_WINSOCK2_H */
 	return 0;
     else
 	return -1;
diff --git a/netlib.c b/netlib.c
index c8969382..2939454d 100644
--- a/netlib.c
+++ b/netlib.c
@@ -3,21 +3,38 @@
  * BSD terms apply: see the file COPYING in the distribution root for deta=
ils.
  */
=20
+#include "gpsd_config.h"
 #include <string.h>
 #include <fcntl.h>
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif /* HAVE_NETDB_H */
 #ifndef AF_UNSPEC
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif /* HAVE_SYS_SOCKET_H */
 #endif /* AF_UNSPEC */
+#ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
+#endif /* HAVE_SYS_UN_H */
 #ifndef INADDR_ANY
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
 #endif /* INADDR_ANY */
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>     /* for htons() and friends */
+#endif /* HAVE_ARPA_INET_H */
 #include <unistd.h>
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/ip.h>
+#endif /* HAVE_NETINET_IN_H */
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
=20
 #include "gpsd.h"
 #include "sockaddr.h"
@@ -97,7 +114,11 @@ socket_t netlib_connectsock(int af, const char *host, c=
onst char *service,
 	}
=20
 	if (!BAD_SOCKET(s)) {
-	    (void)close(s);
+#ifdef HAVE_WINSOCK2_H
+	  (void)closesocket(s);
+#else
+	  (void)close(s);
+#endif
 	}
     }
     freeaddrinfo(result);
@@ -126,8 +147,12 @@ socket_t netlib_connectsock(int af, const char *host, =
const char *service,
 #endif
=20
     /* set socket to noblocking */
+#ifdef HAVE_FCNTL
     (void)fcntl(s, F_SETFL, fcntl(s, F_GETFL) | O_NONBLOCK);
-
+#elif defined(HAVE_WINSOCK2_H)
+    u_long one1 =3D 1;
+    (void)ioctlsocket(s, FIONBIO, &one1);
+#endif
     return s;
 }
=20
@@ -155,6 +180,7 @@ const char *netlib_errstr(const int err)
 socket_t netlib_localsocket(const char *sockfile, int socktype)
 /* acquire a connection to an existing Unix-domain socket */
 {
+#ifdef HAVE_SYS_UN_H
     int sock;
=20
     if ((sock =3D socket(AF_UNIX, socktype, 0)) < 0) {
@@ -175,16 +201,19 @@ socket_t netlib_localsocket(const char *sockfile, int=
 socktype)
=20
 	return sock;
     }
+#else
+    return -1;
+#endif /* HAVE_SYS_UN_H */
 }
=20
 char *netlib_sock2ip(socket_t fd)
 /* retrieve the IP address corresponding to a socket */
 {
+    static char ip[INET6_ADDRSTRLEN];
+    int r =3D 1;
+#ifdef HAVE_INET_NTOP
     sockaddr_t fsin;
     socklen_t alen =3D (socklen_t) sizeof(fsin);
-    static char ip[INET6_ADDRSTRLEN];
-    int r;
-
     r =3D getpeername(fd, &(fsin.sa), &alen);
     if (r =3D=3D 0) {
 	switch (fsin.sa.sa_family) {
@@ -203,6 +232,7 @@ char *netlib_sock2ip(socket_t fd)
 	    return ip;
 	}
     }
+#endif /* HAVE_INET_NTOP */
     if (r !=3D 0) {
 	(void)strlcpy(ip, "<unknown>", sizeof(ip));
     }
diff --git a/os_compat.c b/os_compat.c
index b110f4ba..dafbb7a4 100644
--- a/os_compat.c
+++ b/os_compat.c
@@ -45,7 +45,8 @@ int clock_gettime(clockid_t clk_id, struct timespec *ts)
 /* End of clock_gettime section */
=20
 #ifndef HAVE_DAEMON
-
+#ifndef HAVE_WINSOCK2_H
+/* No daemon() provided for Windows as not currently needed */
 /* Simulate Linux/BSD daemon() on platforms that don't have it */
=20
 #include <stdlib.h>
@@ -90,7 +91,7 @@ int os_daemon(int nochdir, int noclose)
     /* coverity[leaked_handle] Intentional handle duplication */
     return 0;
 }
-
+#endif /* HAVE_WINSOCK2_H */
 #else /* HAVE_DAEMON */
=20
 #ifdef __linux__
diff --git a/test_libgps.c b/test_libgps.c
index 91dd65b3..933beba0 100644
--- a/test_libgps.c
+++ b/test_libgps.c
@@ -43,7 +43,9 @@ int main(int argc, char *argv[])
 #endif
=20
     (void)signal(SIGSEGV, onsig);
+#ifdef SIGBUS
     (void)signal(SIGBUS, onsig);
+#endif
=20
     while ((option =3D getopt(argc, argv, "bf:hsD:?")) !=3D -1) {
 	switch (option) {
@@ -144,7 +146,6 @@ int main(int argc, char *argv[])
 	}
 	(void)gps_close(&collect);
     }
-
     return 0;
 }
=20
--=20
2.11.0



From MAILER-DAEMON Tue Feb 14 16:50:31 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cdkzU-0006Vt-73
	for mharc-gpsd-dev@gnu.org; Tue, 14 Feb 2017 16:50:28 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52874)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdkzR-0006UU-V5
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:50:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdkzM-0000Z9-VP
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:50:26 -0500
Received: from blu004-omc3s13.hotmail.com ([65.55.116.88]:54474)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cdkzM-0000Yt-M8
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:50:20 -0500
Received: from EUR03-VE1-obe.outbound.protection.outlook.com ([65.55.116.72])
	by BLU004-OMC3S13.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Tue, 14 Feb 2017 13:30:20 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=7YW1OzejyZ313zGknCs7SAfB4FiICpsE9EiwLWjbXZ4=;
	b=eOdY1jbX7QaD26QVXxzAMd8TlI1TwZesCcmUkmBHnwbx+hE5Loo0XXjyoiadwdOAnORRli02PWpSxd8vjYXtRuUqeYzuA8f7p5BxdDR9tGOwoVGZPghdWdSc1r20/x0Tzy6Il6BlhRvgqwP/+vs2o4KJ8mEUic3N7GAsx0pAn979fz729Rg/WP1xXE8TsXjsR9QTEl9AWO3wkG7+ou64Y+HE9Uj21FF3FvjdbEmutxhwe/AHe3EobBr50BiQactIJFO08LmoG8DvZJbKYJKW5skTTgmVYty4TtMmWS28Xpu+YjlrKBeIx0PsKbBtWjDd4h7Z9HrPNxZLJipUFH4bAA==
Received: from VE1EUR03FT046.eop-EUR03.prod.protection.outlook.com
	(10.152.18.59) by VE1EUR03HT028.eop-EUR03.prod.protection.outlook.com
	(10.152.19.221) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Tue, 14 Feb 2017 21:30:17 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.18.55) by
	VE1EUR03FT046.mail.protection.outlook.com (10.152.19.226) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.904.16 via Frontend Transport; Tue, 14 Feb 2017 21:30:17 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.027; Tue, 14 Feb 2017 21:30:17 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 1/2] ntpshmread.c is not used by libgps
Thread-Index: AQHShwmJquQhPXu0lEKIkxvCqmmqcQ==
Date: Tue, 14 Feb 2017 21:30:17 +0000
Message-ID: <AM4PR08MB08652E2816EDAC29AD1361B38E580@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:61740961B9B2A519D000EDF74C06FF742C70801408580D74D5321482AB0049F4;
	UpperCasedChecksum:5AAF171BD2BA71636A1F975C24ADB589ACA6CE3F6CDB1E93542D92F95C5891EA;
	SizeAsReceived:7441; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR03HT028;
	5:pMfZOJKtGrKNX8G2jv857PRy3fBIuPejoUwmVfm24g3F5xeH6LAGGcgXYifSsxPK8oUL8T3j/g4qEwpkzUCSfsDeEXsNgCfImA16KwpAr/iBHSCC40EpULP3oUkgT6qy6qQlIzq5rP9UxFQDcZw+8A2ao6HHxZsPmgXcyTh3f5Q=;
	24:DRowrRyw40GYUV3ZYuK05RU5z50FFz1HFdkFIItDcZtCkGGo7Si7Wxi9anGGRTkK+o3KeSdbJ014wbObdRe0WiHFVMGOJNK5lHilG18iepI=;
	7:SdF8cEco6wB2/jKeY279i/XF/PbmqLi15M+As9JrBZhxsBOeI5kTLJOyOOZCV2tzGNjpW9dQiP3GdgXUZc1YDn2V8q+hmcES9beXYKjqkoezxd5ozfPltHgO5LR8vHNlT1S4wGjgsC6+uhHXvq+JUZdUOXS1d3Y7w9N7ExLd660Ar43c/9kzUshwx1bzP4ys+XUWAKOWcxPJ2pL1ernfeN0hIu3OiPt5m6Hrv9v7hR6WlszlsqwJ+4Hj1w6zD/dNioLpD+i8W5Fm2bCzkVBBi5BVo/gwUPU55k8Y8FAiRZaeAi+pJ5ibTRVpnipR/J0DNNLnexHmhcgcd75HtP0TKoUbD4gHM+WvoC5XNPglFtgTTjXMqpYxxv3gn+LT2Ka3+TS5FwGWNtar5SdOGLoz9pgzqdtsDS293BKkF4ChRtL0AeS6Ufbgj5vX617OD17aunxbnFsRlw/SJCpvcji13RUZM5ZK7NmeMHKzoG9dgjB/bbk/cMmy3qYfOhklMuz2+d+mUGj4R9OsqIPlnxhLhA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900009);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR03HT028;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 49d014ad-c727-4e1b-9782-08d45520ab1c
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:VE1EUR03HT028; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:VE1EUR03HT028; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR03HT028; 
x-forefront-prvs: 0218A015FA
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2017 21:30:17.6675 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT028
X-OriginalArrivalTime: 14 Feb 2017 21:30:20.0151 (UTC)
	FILETIME=[8ADF4870:01D28709]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.116.88
Subject: [gpsd-dev] [PATCH 1/2] ntpshmread.c is not used by libgps
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Feb 2017 21:50:27 -0000

This is to make Windows build of libgps easier as Windows doesn't support
sys/ipc.h and sys/shm.h.

Shift to be included in libgpsd instead.
Thus ntpshmmon now requires the libgpsd.

TESTED:
'scons build-all check' passes
---
 SConstruct | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SConstruct b/SConstruct
index bc7ba644..1de0fa75 100644
--- a/SConstruct
+++ b/SConstruct
@@ -986,7 +986,6 @@ libgps_sources =3D [
     "libgps_shm.c",
     "libgps_sock.c",
     "netlib.c",
-    "ntpshmread.c",
     "os_compat.c",
     "rtcm2_json.c",
     "rtcm3_json.c",
@@ -1007,6 +1006,7 @@ libgpsd_sources =3D [
     "net_dgpsip.c",
     "net_gnss_dispatch.c",
     "net_ntrip.c",
+    "ntpshmread.c",
     "ntpshmwrite.c",
     "ppsthread.c",
     "packet.c",
@@ -1161,7 +1161,7 @@ cgps =3D env.Program('cgps', ['cgps.c'],
                    LIBS=3D['gps_static'],
                    parse_flags=3Dgpsflags + ncurseslibs)
 ntpshmmon =3D env.Program('ntpshmmon', ['ntpshmmon.c'],
-                        LIBS=3D['gps_static'],
+                        LIBS=3D['gpsd', 'gps_static'],
                         parse_flags=3Dgpsflags)
 ppscheck =3D env.Program('ppscheck', ['ppscheck.c'],
                         parse_flags=3Dgpsflags)
--=20
2.11.0



From MAILER-DAEMON Tue Feb 14 16:59:43 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cdl8N-00013q-7q
	for mharc-gpsd-dev@gnu.org; Tue, 14 Feb 2017 16:59:39 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54630)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdl8K-00013b-Fc
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:59:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cdl8G-0005FD-Gd
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:59:36 -0500
Received: from col004-omc4s14.hotmail.com ([65.55.34.216]:59528)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cdl8G-0005Dw-3z
	for gpsd-dev@nongnu.org; Tue, 14 Feb 2017 16:59:32 -0500
Received: from EUR02-HE1-obe.outbound.protection.outlook.com ([65.55.34.201])
	by COL004-OMC4S14.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Tue, 14 Feb 2017 13:59:30 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=7rmS4dtQYWI1xfE41RqoW4jcTirfw3FncpLLuas/tFg=;
	b=CNtmvHhSShodpZa1BqXg4ejluoPFwikqqvw9/L8HMCFuBeQZSY+/M1Wdi6KiJlBFR7RsrqqBKsurURgpT38HIQuJnr4ZmNvFD/wjtgHACxeBq1t8w3452PsvygwcHMSSX+2PSLiyGRJIvtaAp6q/9U6NAm0ckoIErGb2X3XU0x/kI7AS3XVc0o62RXKycwc1Xvp/fhGYyfv86M7IqEtc0TY94rlE/aecIgUzOufailC3QlWBE1UXWGZlTfpBlwNzvA+8QTUbuqIMiBCIiupJZb/EBIt+9Lk0R0m5bbcOToGlaZQTmKu/7CgrtaTN88IkKtZlrLKjHeS7GFLQyMBQmQ==
Received: from HE1EUR02FT014.eop-EUR02.prod.protection.outlook.com
	(10.152.10.59) by HE1EUR02HT033.eop-EUR02.prod.protection.outlook.com
	(10.152.11.70) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Tue, 14 Feb 2017 21:59:27 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.10.55) by
	HE1EUR02FT014.mail.protection.outlook.com (10.152.10.118) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.904.16 via Frontend Transport; Tue, 14 Feb 2017 21:59:27 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0874.027; Tue, 14 Feb 2017 21:59:27 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: Windows version of libgps
Thread-Index: AQHShwp7e+0s1WxnIkyZOkOw6lbYqA==
Date: Tue, 14 Feb 2017 21:59:27 +0000
Message-ID: <AM4PR08MB0865B4ABDEF1FB7B2EB7044B8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:59D1397B941725D4539D79057660D33838D0BB0065502DBBB8304B89BFD26A32;
	UpperCasedChecksum:2F795FA438363B87B83ED88E9D96F923C0F80B4E092CFCF1D66A6DBB2C10622E;
	SizeAsReceived:7569; Count:37
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [BcPTKKkdkQhL6OsGGkf8oLnWPgaFygiu]
x-incomingheadercount: 37
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; HE1EUR02HT033;
	5:+VhQfd2Zb1niZuL6lFQJrWAnVjWLQuFktgD1+u8+fRikyohwqNd+0jTfsVv/BzZFixHV7BGxnUW1BR0AJrb096R3TGx3SlQ+l1AYZgnZ/YugdhYmnHIv91om7dWTehzRMbw9j4ut+kD15RiUn+GLOg==;
	24:aSCUExAZ6syjJqJY/g0BtyJwsPzvOiLCOiA0DRb8oiErlYUjYrKFt6i3pxFjV0GblccCah0jAi29xt/r2UMaYIp3tox9MrJVdvrOfH9HVOk=;
	7:4MgdOEKV4uh9vc1ikP2IemzYk80u/6va+mbzg7SKXZJoobaJcLl++SFS6jxUA1KzeEf1kg3yF+m22moTtGl2PDuWsFC5qyX/iAMZjZgl7xbEd12DheYfHMsQjWfz0+FjJjVFzGBkZlS9lfNDg5f2DctID3pXLnq1ExcyzD2kc6F3WDe8Mt2/MiosYJEthF2Ou5W82jnUYDVrqU1CdviMrE078qjbk8cecrSNpGcRBMAW4rdS3NeoU22xGm8265h1KiphryYTli0Ap01nY85XFvbBVKwI9SbQk869DbmhO3O6BYsfhBYrRp4vNM6zozYPm856uJUvtxWdg60qg7ddBdT3WiJwyk1nPqhYFfNk+QXz0Xbq9k0bZ+0ucA9Elgq0Qvbeu9miVRmN2+QC+QDAFgBo19mAUCqURH+6giZ3mSwbnD5lYTItXM80SUKF5FK+F2phefEFPaK/t59fW7oWws1w9XMlnaPPrJQgr8MXKaL983mReyuZkb6nTTxFXuL+K3E5aOL3CgMqS73Z4cRzXA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900009);
	DIR:OUT; SFP:1102; SCL:1; SRVR:HE1EUR02HT033;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: b4a3b442-2d56-424d-b76f-08d45524becd
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(5061506511)(5061507331)(1603103135)(1601125192)(1701031045);
	SRVR:HE1EUR02HT033; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015086)(82015046);
	SRVR:HE1EUR02HT033; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR02HT033; 
x-forefront-prvs: 0218A015FA
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2017 21:59:27.3637 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT033
X-OriginalArrivalTime: 14 Feb 2017 21:59:30.0186 (UTC)
	FILETIME=[9DF96EA0:01D2870D]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.34.216
Subject: [gpsd-dev] Windows version of libgps
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Feb 2017 21:59:38 -0000

Regarding the patch(es) to enable a Windows version of libgps,

My method for building this is on openSUSE Tumbleweed Virtual Machines (32 =
+ 64 bit versions).

The way I've managed to do this is with extra commits at:

https://github.com/rnorris/gpsd/commits/WindowsDLL

All the system dependencies is then described by the mingw32-libgps.spec (a=
nd mingw64-libgps.spec) files.
Which are available in openSUSE Build Service repositories.

Sadly some hacks in the SConstruct file seem to be required to force cross =
compiling in scons.
I have not been successful any other way.

Testing then can run under Wine.
Separately I also have access to some Windows VMs and real Windows machines=
 for further testing.

Possibly the example mingw.spec files are useful to include into GPSD repos=
itory,
however the real building of the DLL is more for reference purposes rather =
than including in the master.

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


From MAILER-DAEMON Fri Feb 17 21:30:04 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ceumi-0007Rl-Co
	for mharc-gpsd-dev@gnu.org; Fri, 17 Feb 2017 21:30:04 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44421)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1ceumg-0007Rd-9u
	for gpsd-dev@nongnu.org; Fri, 17 Feb 2017 21:30:03 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1ceumd-0006nv-5x
	for gpsd-dev@nongnu.org; Fri, 17 Feb 2017 21:30:02 -0500
Received: from d.mail.sonic.net ([64.142.111.50]:52202)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1ceumc-0006nP-Rk
	for gpsd-dev@nongnu.org; Fri, 17 Feb 2017 21:29:59 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1I2Tr9L001097
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Fri, 17 Feb 2017 18:29:54 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1I2Trgu018590
	for <gpsd-dev@nongnu.org>; Fri, 17 Feb 2017 18:29:53 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1I2Tr57018587
	for <gpsd-dev@nongnu.org>; Fri, 17 Feb 2017 18:29:53 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Fri, 17 Feb 2017 18:29:53 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB0865B4ABDEF1FB7B2EB7044B8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702171819220.12253@bolt.sonic.net>
References: <AM4PR08MB0865B4ABDEF1FB7B2EB7044B8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVaIs6ip267uH0bmv2CWQ62mjSSP6dQIRTXw1O3rfn/VuKl3Q7Pfvgk41sZvevl/WnCJb0M1HWmG7HZy/kXfIlOm
X-Sonic-ID: C;SLuEIYL15hGAvYs6xpAcWQ== M;wlOpIYL15hGAvYs6xpAcWQ==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.50
Subject: Re: [gpsd-dev] Windows version of libgps
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 18 Feb 2017 02:30:03 -0000


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


From MAILER-DAEMON Fri Feb 17 21:37:13 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ceutd-0000hs-N7
	for mharc-gpsd-dev@gnu.org; Fri, 17 Feb 2017 21:37:13 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45344)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1ceutb-0000f6-Jw
	for gpsd-dev@nongnu.org; Fri, 17 Feb 2017 21:37:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1ceutY-0001iR-GX
	for gpsd-dev@nongnu.org; Fri, 17 Feb 2017 21:37:11 -0500
Received: from c.mail.sonic.net ([64.142.111.80]:39460)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1ceutY-0001hh-6q
	for gpsd-dev@nongnu.org; Fri, 17 Feb 2017 21:37:08 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1I2b2u8001997
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Fri, 17 Feb 2017 18:37:04 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1I2b2dm022707
	for <gpsd-dev@nongnu.org>; Fri, 17 Feb 2017 18:37:02 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1I2b2mT022702
	for <gpsd-dev@nongnu.org>; Fri, 17 Feb 2017 18:37:02 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Fri, 17 Feb 2017 18:37:02 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB086506316E141D4BAE3C5E2A8E590@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702171830180.12253@bolt.sonic.net>
References: <AM4PR08MB086506316E141D4BAE3C5E2A8E590@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVYqxt8rN6a4SaZARDyXg9fmiekbtYXqbiPigWGjYONMVOVqfFm4idmSGTmPta4V6BEFThbqNzxf4uBrd6T39djw
X-Sonic-ID: C;FB5LIYP15hG4jZXQQiug7g== M;NljuIYP15hG4jZXQQiug7g==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.80
Subject: Re: [gpsd-dev] [PATCH] Add Valgrind tests for gps library
 interfaces.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 18 Feb 2017 02:37:12 -0000


This still doesn't work with libgpsmm=no and/or qt=no, since the updated
valgrind-audit.py unconditionally includes those tests.  It's not that
hard to test those cases. :-)

Some rework of DaemonInstance might be appropriate to reduce the code
duplication in LibInstance, though the spawn() method could use some
rework, anyway.  The current approach of using shell backgrounding with
os.system() is pretty ugly.

Fred Wright


From MAILER-DAEMON Sun Feb 19 07:12:05 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cfQLV-0003Rz-6C
	for mharc-gpsd-dev@gnu.org; Sun, 19 Feb 2017 07:12:05 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49080)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfQLT-0003NI-2R
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 07:12:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfQLP-0007t4-MU
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 07:12:02 -0500
Received: from snt004-omc1s31.hotmail.com ([65.55.90.42]:61037)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cfQLP-0007sO-Cr
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 07:11:59 -0500
Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.55.90.9]) by
	SNT004-OMC1S31.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Sun, 19 Feb 2017 04:11:57 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=WvmqRCwkmNDLMfh/p5qPAW7/ydbuFCV2SADwWWIjTpU=;
	b=byg+/mENUzNXReencF/V8HibGYEYHXckbf6tlCOglC1o5uWBW2EaIQOMN0CZe41yDO9RUrijs7jdHm2TpKTEu5ugv4aIxfeMT6EgWZhAAOkBxplZ1cSNg+v0j0dRTYztpxddDKD12aAP7iryzC0X0uLJ5V6Ke1VbQfFKE3X5dctmy7fer51Yvt8YyehiC9vQdOb8+nzdw07T4bYmZmgixTR95gRdGPIAB9Vq8gKona2O3N7HruJxAm5PPfbPbeQqoCT5AgeTgMuK3KAs32NShZjW7c+s71gnKsoUP0w7m8NXF8hzjtZlrFBfN80hobjZWtAySy2/AezfbHv2tlLQ6Q==
Received: from HE1EUR01FT005.eop-EUR01.prod.protection.outlook.com
	(10.152.0.56) by HE1EUR01HT013.eop-EUR01.prod.protection.outlook.com
	(10.152.1.183) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Sun, 19 Feb 2017 12:11:55 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.0.57) by
	HE1EUR01FT005.mail.protection.outlook.com (10.152.1.229) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.919.10 via Frontend Transport; Sun, 19 Feb 2017 12:11:55 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0919.015; Sun, 19 Feb 2017 12:11:55 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [gpsd-dev] Windows version of libgps
Thread-Index: AQHShwp7e+0s1WxnIkyZOkOw6lbYqKFuD7CAgAIzM60=
Date: Sun, 19 Feb 2017 12:11:55 +0000
Message-ID: <AM4PR08MB0865237E6080B45370BAA5888E5F0@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <AM4PR08MB0865B4ABDEF1FB7B2EB7044B8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>,
	<Pine.LNX.4.58L1X.1702171819220.12253@bolt.sonic.net>
In-Reply-To: <Pine.LNX.4.58L1X.1702171819220.12253@bolt.sonic.net>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:8B28E7241E10BB597561DBB5610B77FBF5AE82200D6CCEC7494E88F451E0BEE9;
	UpperCasedChecksum:866B6834DC9F7DC0DD5C1883E5A4D73C5CB029E867E6828D888CB0354FA6E93D;
	SizeAsReceived:7824; Count:39
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [H1f/tN9Cc2DF8kBNFagjKreq0W/0Fmnu]
x-incomingheadercount: 39
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; HE1EUR01HT013;
	5:/hahMAyU85iITRvxEE7+Yc4Z2RttYKUBCpbUtK26T/HWZjhbV9b3wozvvt6QbUKN3lAxhq782dw+1fOyALOWkhZS4qurmeWNFWqU+I8YKsHSJ4AQsMXrhksqVS7rntDIVh4FrFyaROjoJBSLMJ6rNw==;
	24:EbZq7uqUWAc7sy+FJMmcqfd7fOz8K+VTtCWgDLCWNFWJ96fOgqdHWp+GG0BZQFA1mAN+5ZstHFPBBl2fC/yiNMJPjOM7HsXwdb18mG48VAs=;
	7:6iqcvJ0qZvSzQ9vM14psH8NQoFXG1SfJuEzmDHDK1c1jK4+pzhFBJlK4eVKBy2fYRozvq1T73M1C3QFfZbYwTMGhRiLW65LSWMFjS4jJLInwqZTRw2gOWSCD1ecFrVeN3FCAyweqtlSw9lNQuHdWNoxSfpMdXg4ykE5DsZ2fTJvpIVyx8YAtfT/9omGmlA9q2KWIeKmaJisDg4hiF4jD1F2WFLBjRnUDwi5t6apK6uO5hQLCwB4nhHbsF/7qm06cBQHT88wO6/PmBG9JHztvVNsjlqA20U3C9J+DwocyKsdUad0LU6J0j1Hkozh88yYU
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900012);
	DIR:OUT; SFP:1102; SCL:1; SRVR:HE1EUR01HT013;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 550429bc-5144-435e-f709-08d458c07ee0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(201702061074)(5061506556)(5061507331)(1603103135)(1603101403)(1601125237)(1701031045);
	SRVR:HE1EUR01HT013; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(432015087)(444000031); SRVR:HE1EUR01HT013; BCL:0; PCL:0;
	RULEID:; SRVR:HE1EUR01HT013; 
x-forefront-prvs: 02234DBFF6
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2017 12:11:55.0649 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT013
X-OriginalArrivalTime: 19 Feb 2017 12:11:57.0810 (UTC)
	FILETIME=[5DFC7D20:01D28AA9]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.90.42
Subject: Re: [gpsd-dev] Windows version of libgps
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Feb 2017 12:12:04 -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 gpxlogge=
r.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 (alth=
ough 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 <gpsd-dev-bounces+rw_norris=3Dhotmail.com@nongnu.org> on beh=
alf of Fred Wright <fw@fwright.net>
Sent: 18 February 2017 02:29:53
To: gpsd-dev@nongnu.org
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 cros=
s compiling in scons.

As things presently stand, cross-OS cross-building doesn't work for
multiple reasons.

Fred Wright



From MAILER-DAEMON Sun Feb 19 16:10:09 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cfYkD-0005hL-Mg
	for mharc-gpsd-dev@gnu.org; Sun, 19 Feb 2017 16:10:09 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40824)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cfYkB-0005fa-5w
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 16:10:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cfYk5-0001d2-DL
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 16:10:07 -0500
Received: from c.mail.sonic.net ([64.142.111.80]:42374)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cfYk5-0001az-2r
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 16:10:01 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1JL9su3013211
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 13:09:54 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1JL9sJm013057
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 13:09:54 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1JL9rNQ013053
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 13:09:54 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Sun, 19 Feb 2017 13:09:53 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB0865237E6080B45370BAA5888E5F0@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702191257190.13980@bolt.sonic.net>
References: <AM4PR08MB0865B4ABDEF1FB7B2EB7044B8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>,
	<Pine.LNX.4.58L1X.1702171819220.12253@bolt.sonic.net>
	<AM4PR08MB0865237E6080B45370BAA5888E5F0@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVaMvvaTbq8YWHCHjCuKQbwqoGc+ooHesdpbFkE67Y4Wf56OVBTTB95wY0na+k7JMenIaKv7W12br5ypeTRo6SeE
X-Sonic-ID: C;3KZwwuf25hG1I5XQQiug7g== M;pgipwuf25hG1I5XQQiug7g==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.80
Subject: Re: [gpsd-dev] Windows version of libgps
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Feb 2017 21:10:08 -0000


On Sun, 19 Feb 2017, Robert Norris wrote:

> 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.

Ah OK.  I did Google unistd.h on Windows before doing this, but I don't
know anything about MingW.

> Thus it would be better if the os_daemon() versions are decided by a
> #ifdef HAVE_FORK instead.

OK.  I'll come up with an updated version.

> 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()).

Sounds like syslog() would be another good candidate for os_compat.  The
idea is to minimize the need for OS-related conditionals splattered
through the code.

> I've yet to test it running but should be a useful utility on Windows
> (although of course it will lack a daemonize option).

Yeah.  In fact, the usefulness of daemonization in utility programs is
what complicates fixing the daemon() deprecation warning in OSX.  The
reason for the warning is that "real daemons" (such as gpsd itself) are
not supposed to use old-school daemonization on OSX, but instead are
expected to be run as children of launchd.  If that were the only use,
then simply not having daemon() at all on OSX would be fine.  But it's
still useful to have the old-school approach for daemonizable utilities.

Fred Wright


From MAILER-DAEMON Sun Feb 19 19:21:04 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cfbiy-0002u3-Cd
	for mharc-gpsd-dev@gnu.org; Sun, 19 Feb 2017 19:21:04 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40930)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cfbiv-0002tJ-Du
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 19:21:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cfbiq-0005S5-HI
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 19:21:01 -0500
Received: from c.mail.sonic.net ([64.142.111.80]:55552)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cfbiq-0005RJ-78
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 19:20:56 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1K0KqTk019535
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 16:20:52 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1K0KqNO002604
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 16:20:52 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1K0KqRw002599
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 16:20:52 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Sun, 19 Feb 2017 16:20:52 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <Pine.LNX.4.58L1X.1702191257190.13980@bolt.sonic.net>
Message-ID: <Pine.LNX.4.58L1X.1702191617240.346@bolt.sonic.net>
References: <AM4PR08MB0865B4ABDEF1FB7B2EB7044B8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>,
	<Pine.LNX.4.58L1X.1702171819220.12253@bolt.sonic.net>
	<AM4PR08MB0865237E6080B45370BAA5888E5F0@AM4PR08MB0865.eurprd08.prod.outlook.com>
	<Pine.LNX.4.58L1X.1702191257190.13980@bolt.sonic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVZlKzA0F1qKx+2fwWX18jmI4xlrVDpPNswvc4zjBB23tSS+vJh8CDhrGBBHrWItm3OnjUlmGdyFJCXjjM6SBtmd
X-Sonic-ID: C;lvFIcAL35hG2/pXQQiug7g== M;YmFscAL35hG2/pXQQiug7g==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.80
Subject: Re: [gpsd-dev] Windows version of libgps
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2017 00:21:02 -0000


On Sun, 19 Feb 2017, Fred Wright wrote:
> On Sun, 19 Feb 2017, Robert Norris wrote:
>
> > Thus it would be better if the os_daemon() versions are decided by a
> > #ifdef HAVE_FORK instead.
>
> OK.  I'll come up with an updated version.

I did this, and pushed it to my GitHub (force-pushed over the old commit).

Fred Wright


From MAILER-DAEMON Sun Feb 19 20:44:54 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cfd25-0003wP-Sd
	for mharc-gpsd-dev@gnu.org; Sun, 19 Feb 2017 20:44:53 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51254)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfd22-0003vs-Fi
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:44:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfd1z-0002uc-Ap
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:44:50 -0500
Received: from blu004-omc2s16.hotmail.com ([65.55.111.91]:55707)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cfd1y-0002uA-W6
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:44:47 -0500
Received: from EUR02-AM5-obe.outbound.protection.outlook.com ([65.55.111.71])
	by BLU004-OMC2S16.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Sun, 19 Feb 2017 17:44:46 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=ABrS4EJL5H6pT41drLeLGPuXVUjbcBCblOXFmLHxQs4=;
	b=kU9DVdfAdw2rnWUq5s7ZEk2KG92SmS/ZQmuKHgIda5r/vycCSN0aiHZVVq2EqF2CCY71KKYsnmSN1Ao2no0FT/g/fkw50Sr3ndfyopOhZd057dw9S9kOjNjg2uNOkLK4q0du7ni6UJshVT9L22vNVQdxUUlXtoOcmBqIED3snQC/Tjm5cfz1DfVkEGkyOfpaQ/d/psE7oI+yi+Zx7p8e55gH2EJoKHxrC/vUDX++XEfgPiuVELzHtrtZehpaPsd1zAhgNT04shGetPSM8U7Cg/5QnlWwzqDW42tWlqusC6riB1iRB0OMxMVhXOMWjBbmVdP8PGjZM9FBXx/jkPcBog==
Received: from AM5EUR02FT014.eop-EUR02.prod.protection.outlook.com
	(10.152.8.59) by AM5EUR02HT155.eop-EUR02.prod.protection.outlook.com
	(10.152.9.71) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Mon, 20 Feb 2017 01:44:44 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.8.55) by
	AM5EUR02FT014.mail.protection.outlook.com (10.152.8.175) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.919.10 via Frontend Transport; Mon, 20 Feb 2017 01:44:44 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0919.015; Mon, 20 Feb 2017 01:44:44 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 1/3] Explicit marking of ignoring fprintf() result
Thread-Index: AQHSixrpFL5UURX7jkqUeKv4RSU/qg==
Date: Mon, 20 Feb 2017 01:44:44 +0000
Message-ID: <AM4PR08MB0865E88D04345F65C598002F8E5E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:162C5FF27391C8C9B097F8668F6C1F27FA63BE7937843E7D24E89BB3FCA58D11;
	UpperCasedChecksum:FAFB3B78EE9B0CFD663B9BE6C5C11BC910638D69B072821E4F121C457399668E;
	SizeAsReceived:7467; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; AM5EUR02HT155;
	7:0hLRwHb93fhkHlbEW/fGULPoYFaMxG4IhHvYn4MLXuAtB7z6Egb5drvf2ysccXo8d6oS2uVw+S7cQLV4bPgiQ1TWXH1BgsXMH73neGg+N6wIoe0mjqlQHkgcaSDytqaSMw/iginHdpslJRVwFB2fnAK+q5KhLS5Os3jqKZUPPYRVQn6QkucqckE0JZER9lYIquUTO5lUwtGUOBR6SaSAncV9MoF06bwG/Rd5S581cMN1gtyw6uYUM2sOjwO+l9A6Srr3332IZGyANjX3c2QG3fq9LaZPbe5vlJvFRqyY9/6RzibfyTKaqGjvLAW8Am8USfkkqZLqJnldjfYlQhMlGw==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900012);
	DIR:OUT; SFP:1102; SCL:1; SRVR:AM5EUR02HT155;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: ce6ae929-4454-41af-b563-08d459320abf
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(201702061074)(5061506556)(5061507331)(1603103135)(1601125237)(1701031045);
	SRVR:AM5EUR02HT155; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(432015087)(444000031); SRVR:AM5EUR02HT155; BCL:0; PCL:0;
	RULEID:; SRVR:AM5EUR02HT155; 
x-forefront-prvs: 02243C58C6
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2017 01:44:44.6399 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT155
X-OriginalArrivalTime: 20 Feb 2017 01:44:46.0350 (UTC)
	FILETIME=[EA4D22E0:01D28B1A]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.111.91
Subject: [gpsd-dev] [PATCH 1/3] Explicit marking of ignoring fprintf() result
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2017 01:44:52 -0000

Ensure consistent marking of '(void)' for most normal usage of fprintf()

TESTED:
'scons build-all check' passes
---
 cgps.c            |  2 +-
 driver_nmea2000.c | 14 +++++++-------
 gps2udp.c         | 10 +++++-----
 gpsctl.c          |  2 +-
 gpspipe.c         | 14 +++++++-------
 gpxlogger.c       | 14 +++++++-------
 lcdgps.c          |  2 +-
 libgps_core.c     |  2 +-
 ntpshmmon.c       | 14 +++++++-------
 ppscheck.c        |  6 +++---
 test_geoid.c      | 10 +++++-----
 11 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/cgps.c b/cgps.c
index 56f90736..db67a487 100644
--- a/cgps.c
+++ b/cgps.c
@@ -809,7 +809,7 @@ int main(int argc, char *argv[])
 	    wait_clicks =3D 0;
 	    errno =3D 0;
 	    if (gps_read(&gpsdata) =3D=3D -1) {
-		fprintf(stderr, "cgps: socket error 4\n");
+		(void)fprintf(stderr, "cgps: socket error 4\n");
 		die(errno =3D=3D 0 ? GPS_GONE : GPS_ERROR);
 	    } else {
 		/* Here's where updates go now that things are established. */
diff --git a/driver_nmea2000.c b/driver_nmea2000.c
index 47b051b2..ee85ce17 100644
--- a/driver_nmea2000.c
+++ b/driver_nmea2000.c
@@ -1370,18 +1370,18 @@ static void find_pgn(struct can_frame *frame, struc=
t gps_device_t *session)
 	    struct timespec  msgTime;
=20
 	    clock_gettime(CLOCK_REALTIME, &msgTime);
-	    fprintf(logFile,
-		    "(%010d.%06d) can0 %08x#",
-		    (unsigned int)msgTime.tv_sec,
-		    (unsigned int)msgTime.tv_nsec/1000,
-		    frame->can_id & 0x1ffffff);
+	    (void)fprintf(logFile,
+	                  "(%010d.%06d) can0 %08x#",
+	                  (unsigned int)msgTime.tv_sec,
+	                  (unsigned int)msgTime.tv_nsec/1000,
+	                  frame->can_id & 0x1ffffff);
 	    if ((frame->can_dlc & 0x0f) > 0) {
 		int l1;
 	        for(l1=3D0;l1<(frame->can_dlc & 0x0f);l1++) {
-		    fprintf(logFile, "%02x", frame->data[l1]);
+		    (void)fprintf(logFile, "%02x", frame->data[l1]);
 		}
 	    }
-	    fprintf(logFile, "\n");
+	    (void)fprintf(logFile, "\n");
 	}
 #endif /* of if LOG_FILE */
 	session->driver.nmea2000.can_msgcnt +=3D 1;
diff --git a/gps2udp.c b/gps2udp.c
index c02d8929..eb01eb90 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -89,7 +89,7 @@ static int send_udp (char *nmeastring, size_t ind)
 	/* compute message size and add 0x0a 0x0d */
 	for (ind=3D0; nmeastring [ind] !=3D '\0'; ind ++) {
 	    if (ind >=3D sizeof(message) - 3) {
-		fprintf(stderr, "gps2udp: too big [%s] \n", nmeastring);
+		(void)fprintf(stderr, "gps2udp: too big [%s] \n", nmeastring);
 		return -1;
 	    }
 	    message[ind] =3D nmeastring[ind];
@@ -157,14 +157,14 @@ static int open_udp(char **hostport)
=20
        sock[channel]=3D socket(AF_INET, SOCK_DGRAM, 0);
        if (sock[channel] < 0) {
-	   fprintf(stderr, "gps2udp: error creating UDP socket\n");
+	   (void)fprintf(stderr, "gps2udp: error creating UDP socket\n");
 	   return (-1);
        }
=20
        remote[channel].sin_family =3D (sa_family_t)AF_INET;
        hp =3D gethostbyname(hostname);
        if (hp=3D=3DNULL) {
-	   fprintf(stderr, "gps2udp: syntax is [-u hostname:port] [%s] is not a v=
alid hostname\n",hostname);
+	   (void)fprintf(stderr, "gps2udp: syntax is [-u hostname:port] [%s] is n=
ot a valid hostname\n",hostname);
 	   return (-1);
        }
=20
@@ -476,7 +476,7 @@ int main(int argc, char **argv)
 		    (void)fprintf(stdout," MMSI=3D%9u", mmsi);
=20
 		}
-		fprintf(stdout,"\n");
+		(void)fprintf(stdout,"\n");
 	    }
=20
 	    // send to all UDP destinations
@@ -496,7 +496,7 @@ int main(int argc, char **argv)
     } // end for (;;)
=20
     // This is an infinite loop, should never be here
-    fprintf (stderr, "gpsd2udp ERROR abnormal exit\n");
+    (void)fprintf (stderr, "gpsd2udp ERROR abnormal exit\n");
     exit (-1);
 }
=20
diff --git a/gpsctl.c b/gpsctl.c
index d0b75401..69d5e932 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -328,7 +328,7 @@ int main(int argc, char **argv)
 	    exit(EXIT_SUCCESS);
 	case 'h':
 	default:
-	    fprintf(stderr, USAGE);
+	    (void)fprintf(stderr, USAGE);
 	    break;
 	}
     }
diff --git a/gpspipe.c b/gpspipe.c
index 680f0625..4a74b0a9 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -70,13 +70,13 @@ static void open_serial(char *device)
      * tty.
      */
     if ((fd_out =3D open(device, O_RDWR | O_NOCTTY)) =3D=3D -1) {
-	fprintf(stderr, "gpspipe: error opening serial port\n");
+	(void)fprintf(stderr, "gpspipe: error opening serial port\n");
 	exit(EXIT_FAILURE);
     }
=20
     /* Save current serial port settings for later */
     if (tcgetattr(fd_out, &oldtio) !=3D 0) {
-	fprintf(stderr, "gpspipe: error reading serial port settings\n");
+	(void)fprintf(stderr, "gpspipe: error reading serial port settings\n");
 	exit(EXIT_FAILURE);
     }
=20
@@ -362,17 +362,17 @@ int main(int argc, char **argv)
 		    }
 		}
 		if (fputc(c, fp) =3D=3D EOF) {
-		    fprintf(stderr, "gpspipe: write error, %s(%d)\n",
-			    strerror(errno), errno);
+		    (void)fprintf(stderr, "gpspipe: write error, %s(%d)\n",
+		                  strerror(errno), errno);
 		    exit(EXIT_FAILURE);
 		}
=20
 		if (c =3D=3D '\n') {
 		    if (serialport !=3D NULL) {
 			if (write(fd_out, serbuf, (size_t) j) =3D=3D -1) {
-			    fprintf(stderr,
-				    "gpspipe: serial port write error, %s(%d)\n",
-				    strerror(errno), errno);
+			    (void)fprintf(stderr,
+			                  "gpspipe: serial port write error, %s(%d)\n",
+			                  strerror(errno), errno);
 			    exit(EXIT_FAILURE);
 			}
 			j =3D 0;
diff --git a/gpxlogger.c b/gpxlogger.c
index 0448554a..e8e37169 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -185,11 +185,11 @@ static void quit_handler(int signum)
=20
 static void usage(void)
 {
-    fprintf(stderr,
-	    "Usage: %s [-V] [-h] [-d] [-i timeout] [-f filename] [-m minmove]\n"
-	    "\t[-r] [-e exportmethod] [server[:port:[device]]]\n\n"
-	    "defaults to '%s -i 5 -e %s localhost:2947'\n",
-	    progname, progname, export_default()->name);
+    (void)fprintf(stderr,
+                  "Usage: %s [-V] [-h] [-d] [-i timeout] [-f filename] [-m=
 minmove]\n"
+                  "\t[-r] [-e exportmethod] [server[:port:[device]]]\n\n"
+                  "defaults to '%s -i 5 -e %s localhost:2947'\n",
+                  progname, progname, export_default()->name);
     exit(EXIT_FAILURE);
 }
=20
@@ -271,8 +271,8 @@ int main(int argc, char **argv)
 	    if (timeout < 1)
 		timeout =3D 1;
 	    if (timeout >=3D 3600)
-		fprintf(stderr,
-			"WARNING: track timeout is an hour or more!\n");
+		(void)fprintf(stderr,
+		              "WARNING: track timeout is an hour or more!\n");
 	    break;
 	case 'l':
 	    export_list(stderr);
diff --git a/lcdgps.c b/lcdgps.c
index eb95f498..26ff8c90 100644
--- a/lcdgps.c
+++ b/lcdgps.c
@@ -405,7 +405,7 @@ int main(int argc, char *argv[])
=20
     for (;;) { /* heart of the client */
 	if (!gps_waiting(&gpsdata, 50000000)) {
-	    fprintf( stderr, "lcdgps: error while waiting\n");
+	    (void)fprintf( stderr, "lcdgps: error while waiting\n");
 	    exit(EXIT_FAILURE);
 	} else {
 	    (void)gps_read(&gpsdata);
diff --git a/libgps_core.c b/libgps_core.c
index 644b96d4..54eb8c78 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -102,7 +102,7 @@ int gps_open(const char *host,
 #endif /* SOCKET_EXPORT_ENABLE */
=20
 #ifndef USES_HOST
-    fprintf(stderr, "No methods available for connnecting to %s!\n", host)=
;
+    (void)fprintf(stderr, "No methods available for connnecting to %s!\n",=
 host);
 #endif /* USES_HOST */
 #undef USES_HOST
=20
diff --git a/ntpshmmon.c b/ntpshmmon.c
index f8768a35..04cd8c6e 100644
--- a/ntpshmmon.c
+++ b/ntpshmmon.c
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
 			  argv[0], VERSION, REVISION);
 	    exit(EXIT_SUCCESS);
 	case 'h':
-	    fprintf(stderr,
+	  (void)fprintf(stderr,
                 "usage: ntpshmmon [-s] [-n max] [-t timeout] [-v] [-h] [-V=
]\n"
                 "  -h           print this help\n"
                 "  -n nsamples  exit after nsamples\n"
@@ -77,7 +77,7 @@ int main(int argc, char **argv)
     for (i =3D 0; i < NTPSEGMENTS; i++) {
 	segments[i] =3D shm_get(i, false, true);
 	if (verbose && segments[i] !=3D NULL)
-	    fprintf(stderr, "unit %d opened\n", i);
+	  (void)fprintf(stderr, "unit %d opened\n", i);
     }
=20
     if (killall) {
@@ -108,7 +108,7 @@ int main(int argc, char **argv)
 	    long long diff;  /* 32 bit long is too short for a timespec */
 	    enum segstat_t status =3D ntp_read(segments[i], &shm_stat, false);
 	    if (verbose)
-		fprintf(stderr, "unit %d status %d\n", i, status);
+		(void)fprintf(stderr, "unit %d status %d\n", i, status);
 	    switch(status) {
 	    case OK:
 		/* ntpd can slew the clock at 120% real time
@@ -144,15 +144,15 @@ int main(int argc, char **argv)
 		/* do nothing, data not ready, wait another cycle */
 		break;
 	    case BAD_MODE:
-		fprintf(stderr, "ntpshmmon: unknown mode %d on segment %s\n",
-			shm_stat.status, ntp_name(i));
+		(void)fprintf(stderr, "ntpshmmon: unknown mode %d on segment %s\n",
+		              shm_stat.status, ntp_name(i));
 		break;
 	    case CLASH:
 		/* do nothing, data is corrupt, wait another cycle */
 		break;
 	    default:
-		fprintf(stderr, "ntpshmmon: unknown status %d on segment %s\n",
-			status, ntp_name(i));
+		(void)fprintf(stderr, "ntpshmmon: unknown status %d on segment %s\n",
+		              status, ntp_name(i));
 		break;
 	    }
 	}
diff --git a/ppscheck.c b/ppscheck.c
index 21ccac08..1a6a9acc 100644
--- a/ppscheck.c
+++ b/ppscheck.c
@@ -64,9 +64,9 @@ static const struct assoc hlines[] =3D {
=20
 static void usage(void)
 {
-	fprintf(stderr, "usage: ppscheck [-h] [ -V] <device>\n");
-	fprintf(stderr, "                 -h   print usage\n");
-	fprintf(stderr, "                 -V   print cwVersion\n");
+	(void)fprintf(stderr, "usage: ppscheck [-h] [ -V] <device>\n");
+	(void)fprintf(stderr, "                 -h   print usage\n");
+	(void)fprintf(stderr, "                 -V   print cwVersion\n");
 	exit(1);
 }
=20
diff --git a/test_geoid.c b/test_geoid.c
index 8f0480af..eeed567d 100644
--- a/test_geoid.c
+++ b/test_geoid.c
@@ -15,7 +15,7 @@ int main(int argc, char **argv)
     double lat, lon;
=20
     if (argc !=3D 3) {
-	fprintf(stderr, "Usage: %s lat lon\n", argv[0]);
+	(void)fprintf(stderr, "Usage: %s lat lon\n", argv[0]);
 	return 1;
     }
=20
@@ -23,17 +23,17 @@ int main(int argc, char **argv)
     lon =3D atof(argv[2]);
=20
     if (lon > 180.0 || lat < -180.0) {
-	fprintf(stderr, " -180 <=3D lon=3D%s(%.f) <=3D 180 ?\n", argv[2], lon);
+	(void)fprintf(stderr, " -180 <=3D lon=3D%s(%.f) <=3D 180 ?\n", argv[2], l=
on);
 	return 1;
     }
=20
     if (lat > 90.0 || lat < -90.0) {
-	fprintf(stderr, " -90 <=3D lat=3D%s(%.f) <=3D 90 ?\n", argv[1], lat);
+	(void)fprintf(stderr, " -90 <=3D lat=3D%s(%.f) <=3D 90 ?\n", argv[1], lat=
);
 	return 1;
     }
=20
-    printf(" lat=3D %f lon=3D %f geoid correction=3D %f\n",
-	   lat, lon, wgs84_separation(lat, lon));
+    (void)printf(" lat=3D %f lon=3D %f geoid correction=3D %f\n",
+                 lat, lon, wgs84_separation(lat, lon));
=20
     return 0;
 }
--=20
2.11.0



From MAILER-DAEMON Sun Feb 19 20:44:59 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cfd2B-0003zR-1O
	for mharc-gpsd-dev@gnu.org; Sun, 19 Feb 2017 20:44:59 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51267)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfd28-0003xs-Fe
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:44:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfd25-0002ww-DA
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:44:56 -0500
Received: from snt004-omc2s21.hotmail.com ([65.55.90.96]:57575)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cfd25-0002wm-56
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:44:53 -0500
Received: from EUR02-AM5-obe.outbound.protection.outlook.com ([65.55.90.72])
	by SNT004-OMC2S21.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Sun, 19 Feb 2017 17:44:52 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=0PsxKAjQcu7OTJPlB4u1lJ7CGxmfV2vplfQRuDC/rRk=;
	b=rAmU7AiVsGqK5sqgPWPO3S/jZEoIMOhbpLgZ9lf5hKhFm3e+PPnYRHtzEEoKE5EwKrWXqeZ4EkL0TgssCaHQiIMV5cJ8sWcsXt5ADbgzpnbbdta0OCzLh3qqEKMkXteDVh8w+g/via9khJPd8pWM8+q0tGLnFda7BNweHoLyq+dSjvWSUt9LD8b2nuLsduXDSTqMUkGOu4lLcXIbrlEEgw5pvBZrxr87VI4QcBgFRtRr58m733sRCx2x02gRRPv7hS4uZg1rHGKTjltsA9HaqW1vcsh/QBacYCFSwfJ3EirlVGXJi0sPZYB2ChZLXUarJ8WlNZcko4HQ6ns3ZY6ZCQ==
Received: from AM5EUR02FT014.eop-EUR02.prod.protection.outlook.com
	(10.152.8.55) by AM5EUR02HT218.eop-EUR02.prod.protection.outlook.com
	(10.152.9.156) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Mon, 20 Feb 2017 01:44:50 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.8.55) by
	AM5EUR02FT014.mail.protection.outlook.com (10.152.8.175) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.919.10 via Frontend Transport; Mon, 20 Feb 2017 01:44:50 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0919.015; Mon, 20 Feb 2017 01:44:50 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 2/3] Ensure gpxlogger doesn't crash on bad filename
Thread-Index: AQHSixrsqK0DynylC029ovdHuHDkqA==
Date: Mon, 20 Feb 2017 01:44:50 +0000
Message-ID: <AM4PR08MB086505D58CD82913BE6D115C8E5E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170220014426.9714-1-rw_norris@hotmail.com>
In-Reply-To: <20170220014426.9714-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:F2EB78AC52103A7E26D3FDF4364374109DFF180250AF44765C3B3789663A4C95;
	UpperCasedChecksum:5B3D51CB8FF6CDB17DBF9E311A345ED2B27A5AB93CCD2B07179421933D8A4999;
	SizeAsReceived:7520; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; AM5EUR02HT218;
	7:efu9Y0ja87ApYGH8M5S4dxpgzBMWm2dhlYJM+cKpwG3PuTnHIO06HN/K71YmtwN+GX5FzZSQmpIGTdeFaRrHusP/eRwjXkylbT6vdE/0Qtl03TGqc9vlm5sV+DTaXWRBRI5aD7uHsp2NViaPNI0e8tez9sdQ+damEu8WxOo+nvSY5c2ZLEFccqEtMHli10fW5w8U18U29vm1ato6W9vWuVRP0KdcYkGutHgrgxcTe+jxWXPiH+i5P/6p+rNbq9uYNuvyScs3jhiuea8HHUzyX3h/INRrQVUFt6yVKnxk8/6idMleAfEXYiw46pci4tmkSprEfP67bQJN1WlPVs+QpA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900012);
	DIR:OUT; SFP:1102; SCL:1; SRVR:AM5EUR02HT218;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: b8e5ff87-6b15-41c2-0409-08d459320e83
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(201702061074)(5061506556)(5061507331)(1603103135)(1601125237)(1701031045);
	SRVR:AM5EUR02HT218; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(432015087)(444000031); SRVR:AM5EUR02HT218; BCL:0; PCL:0;
	RULEID:; SRVR:AM5EUR02HT218; 
x-forefront-prvs: 02243C58C6
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2017 01:44:50.3165 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT218
X-OriginalArrivalTime: 20 Feb 2017 01:44:52.0243 (UTC)
	FILETIME=[EDD05630:01D28B1A]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.90.96
Subject: [gpsd-dev] [PATCH 2/3] Ensure gpxlogger doesn't crash on bad
 filename
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2017 01:44:57 -0000

Need to ensure logfile is reset to 'stdout' when the specified output file
is not available (e.g. no permission to write it) otherwise it is continued
to be used when it is NULL and bad things happen.

TESTED:
Running as a normal user it doesn't crash with a bad filename:
./gpxlogger -f /root/CannotWriteHere.gpx
---
 gpxlogger.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gpxlogger.c b/gpxlogger.c
index e8e37169..57e8f05c 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -258,10 +258,12 @@ int main(int argc, char **argv)
                 }
                 fname[s] =3D '\0';;
                 logfile =3D fopen(fname, "w");
-                if (logfile =3D=3D NULL)
+                if (logfile =3D=3D NULL) {
 		    syslog(LOG_ERR,
 			   "Failed to open %s: %s, logging to stdout.",
 			   fname, strerror(errno));
+		    logfile =3D stdout;
+		}
 	    bailout:
                 free(fname);
                 break;
--=20
2.11.0



From MAILER-DAEMON Sun Feb 19 20:45:07 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cfd2J-000454-7K
	for mharc-gpsd-dev@gnu.org; Sun, 19 Feb 2017 20:45:07 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51283)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfd2H-00044G-Sh
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:45:06 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfd2E-0002zY-QD
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:45:05 -0500
Received: from col004-omc1s10.hotmail.com ([65.55.34.20]:61069)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cfd2E-0002yz-GU
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:45:02 -0500
Received: from EUR02-HE1-obe.outbound.protection.outlook.com ([65.55.34.8]) by
	COL004-OMC1S10.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Sun, 19 Feb 2017 17:45:01 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=86bzD74ELck/b0J98avYUWevb38R+FiirkzH7JiJMMc=;
	b=D1FaoCnYUzRPKjOe9pMyay9z89ZLDnaqAX2OGyh5Ogn0GGlgriMgnZ4d3APoebCudsOChqMCGNzDOscaZLLETWrSCYsv9HpuMnOrihQ19D9yqWhXe9hGyjiX3wuBq8OOeauJQIWN+V+AI7NpsdGN3i/cDzCOqzVfUe/hcIs+piNJcpjK0E1O7NgfI9vMnxnFoNrPWD3CU6eeuhxw1eWMYHB/LjVDl9+Py5sjOoXdF/3h3BXwvUPKhLHYIcNIEk8yBXB9bjiQ65sY31inxz4Fc6Kay2QSIoNYpMjmQfzgHNipWlj0EPqQZZwFk2guKEkN7+BaWvTWglST8erC+r0Usg==
Received: from AM5EUR02FT014.eop-EUR02.prod.protection.outlook.com
	(10.152.8.57) by AM5EUR02HT197.eop-EUR02.prod.protection.outlook.com
	(10.152.9.74) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Mon, 20 Feb 2017 01:44:57 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.8.55) by
	AM5EUR02FT014.mail.protection.outlook.com (10.152.8.175) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.919.10 via Frontend Transport; Mon, 20 Feb 2017 01:44:57 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0919.015; Mon, 20 Feb 2017 01:44:57 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 3/3] Add missing options in gpxlogger usage
Thread-Index: AQHSixrwd+/I633f7kKoqApMwyI1FA==
Date: Mon, 20 Feb 2017 01:44:57 +0000
Message-ID: <AM4PR08MB08658EF3760651CCFF8EE5C28E5E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170220014426.9714-1-rw_norris@hotmail.com>
In-Reply-To: <20170220014426.9714-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:D1BA530B099E9EEF40D93E824EA6B5655C25AA9AE65926956F1E530B007C5B27;
	UpperCasedChecksum:04F3731A2BC6A774261D00956782EF61F4E57FA1AFF0FF1377D23F5E175317BF;
	SizeAsReceived:7505; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; AM5EUR02HT197;
	7:0aZ32dcpayXrm5roMqSiK/URyuMj7rA/GXnN+SeCzi3nUU2Xdjii0r3avAqa9JPR4e+gmiPm8C06sPe+pZPf1ZQ8ANbrPAAJpJSTgTBK1ep0q9x2uPyft6x/JzR0YetNzlVSERl6rFQCIJ3V6uYvCg8Wd9gLDxDYDPSKFSfWGQMVFaTiU0U06gUIsNJ61cjDo8w+fDqJR3LHY55oWIZLMUpKePHfCadsOEiB8pvOMXKWo1KTDvzihvEvvfn6RdRdXSgQ8vgvtQdv5o93Igp+0syjXtBdbEej2YW5LJ2IFfIKA1iVeCIqEB52WUocx5q8iBQa22YtGJONEVatuykjOA==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900012);
	DIR:OUT; SFP:1102; SCL:1; SRVR:AM5EUR02HT197;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 2c9e1a76-c216-4082-de16-08d4593212e0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(201702061074)(5061506426)(5061507331)(1603103135)(1601125107)(1701031045);
	SRVR:AM5EUR02HT197; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(432015087)(444000031); SRVR:AM5EUR02HT197; BCL:0; PCL:0;
	RULEID:; SRVR:AM5EUR02HT197; 
x-forefront-prvs: 02243C58C6
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2017 01:44:57.6254 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT197
X-OriginalArrivalTime: 20 Feb 2017 01:45:01.0017 (UTC)
	FILETIME=[F30B2490:01D28B1A]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.34.20
Subject: [gpsd-dev] [PATCH 3/3] Add missing options in gpxlogger usage
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2017 01:45:06 -0000

Options '-l' and '-D' now mentioned.
---
 gpxlogger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gpxlogger.c b/gpxlogger.c
index 57e8f05c..62eb3ffb 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -186,7 +186,7 @@ static void quit_handler(int signum)
 static void usage(void)
 {
     (void)fprintf(stderr,
-                  "Usage: %s [-V] [-h] [-d] [-i timeout] [-f filename] [-m=
 minmove]\n"
+                  "Usage: %s [-V] [-h] [-l] [-d] [D debuglevel] [-i timeou=
t] [-f filename] [-m minmove]\n"
                   "\t[-r] [-e exportmethod] [server[:port:[device]]]\n\n"
                   "defaults to '%s -i 5 -e %s localhost:2947'\n",
                   progname, progname, export_default()->name);
--=20
2.11.0



From MAILER-DAEMON Sun Feb 19 20:49:39 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cfd6h-0004hs-99
	for mharc-gpsd-dev@gnu.org; Sun, 19 Feb 2017 20:49:39 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51892)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfd6f-0004hg-3I
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:49:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1cfd6c-0004gy-1g
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:49:37 -0500
Received: from blu004-omc3s36.hotmail.com ([65.55.116.111]:58097)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1cfd6b-0004gk-SM
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 20:49:33 -0500
Received: from EUR02-HE1-obe.outbound.protection.outlook.com ([65.55.116.72])
	by BLU004-OMC3S36.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Sun, 19 Feb 2017 17:49:33 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=zdP4Erwsws58K5fU3q+dJGSm80b8yOWPDKrjV/8c32w=;
	b=NPIcbjFNJut9PX5/ciR7De/Uaf6EU2xBHiKaUJqnQ2U0mI5PSS9NhWLdrVN8CXAaYARGN4d9yUMq9boaZMFRtFz49xR7wQTUzH1PBUmx7Ejj4vLs4uyE9iZ4fPwHNS9obr4ikvEcu9sKlwGbhh0ELFMN2B7Tn2VO1tmQJ1w+XSgXbzyY77g5ofQlZP6RCszwxT3gLLwlrQJinjBWAdA7mWUzFdaucrxKJoiIr982Ua3y+bPif2BEM/oZIDSpIp8o7lNK3OzJVVGs4jdnb7LL7h55MZypfOfrHsC8pW4eR6fUU13ewl+IGENiMqb88WkJcfV6x8nsflAQrGZsOGfR8g==
Received: from AM5EUR02FT014.eop-EUR02.prod.protection.outlook.com
	(10.152.8.54) by AM5EUR02HT079.eop-EUR02.prod.protection.outlook.com
	(10.152.8.151) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16;
	Mon, 20 Feb 2017 01:49:31 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.8.55) by
	AM5EUR02FT014.mail.protection.outlook.com (10.152.8.175) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.919.10 via Frontend Transport; Mon, 20 Feb 2017 01:49:31 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0919.015; Mon, 20 Feb 2017 01:49:31 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [gpsd-dev] Windows version of libgps
Thread-Index: AQHShwp7e+0s1WxnIkyZOkOw6lbYqKFuD7CAgAIzM62AAJgPgIAANVwAgAAXl0k=
Date: Mon, 20 Feb 2017 01:49:31 +0000
Message-ID: <AM4PR08MB0865A15FBFDFB88EB75CDC328E5E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <AM4PR08MB0865B4ABDEF1FB7B2EB7044B8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>,
	<Pine.LNX.4.58L1X.1702171819220.12253@bolt.sonic.net>
	<AM4PR08MB0865237E6080B45370BAA5888E5F0@AM4PR08MB0865.eurprd08.prod.outlook.com>
	<Pine.LNX.4.58L1X.1702191257190.13980@bolt.sonic.net>,
	<Pine.LNX.4.58L1X.1702191617240.346@bolt.sonic.net>
In-Reply-To: <Pine.LNX.4.58L1X.1702191617240.346@bolt.sonic.net>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:4AB184722780499612F3A391571540716415F196C598AAD9139DCDFFFB9F26D6;
	UpperCasedChecksum:DF7F571EE65435CEE3BDB7CFD6293E212E65682DDB280F9F91D2E488DCA74017;
	SizeAsReceived:8034; Count:39
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [KVfypm/iQIW57ONcwXrS1I14nliy/joS]
x-incomingheadercount: 39
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; AM5EUR02HT079;
	7:IALjfvTysR4nOE6iYN1fM/LTBM4YXGHZYPPeb3ea8CUFs7FPWxtex5a+D11j4wbPnrHfr4obj0bK5zNB4cmXXdd/cynFDB2pd0e1LM7tnJYkwVC2RicalrNX3vamd5a7Imdh0huPSFjbaVkB71eXZfi6WZKL0WFpUEkeT8q4buo5udyTfLtiYag7t0gb3qw3OB1jvsE1l5wxKeZxeIUhKWFtI3VnbT/OCZK5mbRKz7NSJ0C8/GYkplcBIulBvPsqEEi0X+hht9bHRHLWWbuMjJRjz5Crkzea3rvG3Q0w/j3d6Cjrj12G/N2Tz1PwrE+cEJhwgNAzo1QNnWIVihBBKQ==
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900012);
	DIR:OUT; SFP:1102; SCL:1; SRVR:AM5EUR02HT079;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 28431931-45b6-46b0-6fa9-08d45932b699
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(201702061074)(5061506556)(5061507331)(1603103135)(1601125237)(1701031045);
	SRVR:AM5EUR02HT079; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(432015087)(444000031); SRVR:AM5EUR02HT079; BCL:0; PCL:0;
	RULEID:; SRVR:AM5EUR02HT079; 
x-forefront-prvs: 02243C58C6
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2017 01:49:31.1677 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT079
X-OriginalArrivalTime: 20 Feb 2017 01:49:33.0339 (UTC)
	FILETIME=[955C2EB0:01D28B1B]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.55.116.111
Subject: Re: [gpsd-dev] Windows version of libgps
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2017 01:49:38 -0000

The update works for me.

I've added a syslog() fallback into os_compat.c so changes to other program=
s are minimal.
Patches to follow shortly.

Now had time to run gpxlogger on Windows and seems to work OK.

So while playing with gpxlogger, I found a few issues - hence the first set=
 of patches.

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

________________________________________
From: gpsd-dev <gpsd-dev-bounces+rw_norris=3Dhotmail.com@nongnu.org> on beh=
alf of Fred Wright <fw@fwright.net>
Sent: 20 February 2017 00:20:52
To: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Windows version of libgps

On Sun, 19 Feb 2017, Fred Wright wrote:
> On Sun, 19 Feb 2017, Robert Norris wrote:
>
> > Thus it would be better if the os_daemon() versions are decided by a
> > #ifdef HAVE_FORK instead.
>
> OK.  I'll come up with an updated version.

I did this, and pushed it to my GitHub (force-pushed over the old commit).

Fred Wright



From MAILER-DAEMON Sun Feb 19 22:03:58 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cfeGc-0006B5-MU
	for mharc-gpsd-dev@gnu.org; Sun, 19 Feb 2017 22:03:58 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59372)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cfeGa-0006Ay-Ev
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 22:03:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cfeGX-0005zu-BD
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 22:03:56 -0500
Received: from d.mail.sonic.net ([64.142.111.50]:54218)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cfeGX-0005z1-1D
	for gpsd-dev@nongnu.org; Sun, 19 Feb 2017 22:03:53 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1K33lTv014898
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 19:03:47 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1K33l5u031982
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 19:03:47 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1K33l6q031978
	for <gpsd-dev@nongnu.org>; Sun, 19 Feb 2017 19:03:47 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Sun, 19 Feb 2017 19:03:47 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB0865A15FBFDFB88EB75CDC328E5E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702191846280.22761@bolt.sonic.net>
References: <AM4PR08MB0865B4ABDEF1FB7B2EB7044B8E580@AM4PR08MB0865.eurprd08.prod.outlook.com>,
	<Pine.LNX.4.58L1X.1702171819220.12253@bolt.sonic.net>
	<AM4PR08MB0865237E6080B45370BAA5888E5F0@AM4PR08MB0865.eurprd08.prod.outlook.com>
	<Pine.LNX.4.58L1X.1702191257190.13980@bolt.sonic.net>,
	<Pine.LNX.4.58L1X.1702191617240.346@bolt.sonic.net>
	<AM4PR08MB0865A15FBFDFB88EB75CDC328E5E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVb11yXrO2UHMBMhJPer4IDwryJw4Np9vNaJjW3lOX9GSwX/VBMdceNmH63mdMaOY7B+dc5v6jFrELqCL/HTWAyt
X-Sonic-ID: C;qMmjMhn35hG4KIs6xpAcWQ== M;1nfHMhn35hG4KIs6xpAcWQ==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.50
Subject: Re: [gpsd-dev] Windows version of libgps
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2017 03:03:57 -0000


On Mon, 20 Feb 2017, Robert Norris wrote:

> The update works for me.

OK, I pushed it to master.  I noticed in the process that I'd forgotten to
rebase it with some other recent changes, but they were in unrelated
areas.

> I've added a syslog() fallback into os_compat.c so changes to other programs are minimal.
> Patches to follow shortly.

OK.

> Now had time to run gpxlogger on Windows and seems to work OK.
>
> So while playing with gpxlogger, I found a few issues - hence the first set of patches.

OK.  I probably won't have time to look at those in detail tonight.  My
personal style preference is to put a space after the "(void)", but I
haven't looked at what normal GPSD style does.

BTW, I did the rework of DaemonInstance that I mentioned, so LibInstance
(or perhaps LibraryInstance) should now be a simple subclass of
SubprogramInstance, only overriding spawn().  Though I forgot to check
whether the generic spawn() is fully adequate.  But valgrind-audit.py will
need some work to make the added stuff appropriately optional.

Valgrind itself seems to be problematic, and only fully usable on Linux.

Fred Wright


From MAILER-DAEMON Tue Feb 21 03:52:13 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cg6BB-0004Sr-GE
	for mharc-gpsd-dev@gnu.org; Tue, 21 Feb 2017 03:52:13 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51363)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cg6B9-0004SU-2n
	for gpsd-dev@nongnu.org; Tue, 21 Feb 2017 03:52:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1cg6B6-0001HD-0O
	for gpsd-dev@nongnu.org; Tue, 21 Feb 2017 03:52:11 -0500
Received: from d.mail.sonic.net ([64.142.111.50]:56568)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1cg6B5-0001G6-MS
	for gpsd-dev@nongnu.org; Tue, 21 Feb 2017 03:52:07 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id v1L8q2aW024066
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <gpsd-dev@nongnu.org>; Tue, 21 Feb 2017 00:52:02 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id v1L8q2Do024649
	for <gpsd-dev@nongnu.org>; Tue, 21 Feb 2017 00:52:02 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id v1L8q1aY024639
	for <gpsd-dev@nongnu.org>; Tue, 21 Feb 2017 00:52:02 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Tue, 21 Feb 2017 00:52:01 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <AM4PR08MB08658EF3760651CCFF8EE5C28E5E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
Message-ID: <Pine.LNX.4.58L1X.1702210050500.22220@bolt.sonic.net>
References: <20170220014426.9714-1-rw_norris@hotmail.com>
	<AM4PR08MB08658EF3760651CCFF8EE5C28E5E0@AM4PR08MB0865.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVbpWsYmOzvqCWlehNOxjT4u/e/tun6o9qDjQMDEKw9lox28w19Kt99ZWGoNsUKDdbCLmMuopUxGOt8cQoNRcyFn
X-Sonic-ID: C;klJ0AxP45hGAVos6xpAcWQ== M;8mKaAxP45hGAVos6xpAcWQ==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.50
Subject: Re: [gpsd-dev] [PATCH 3/3] Add missing options in gpxlogger usage
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2017 08:52:11 -0000


On Mon, 20 Feb 2017, Robert Norris wrote:

> Options '-l' and '-D' now mentioned.

Merged all three patches, plus a couple of followup cleanups, all
whitespace except for adding the missing "-" in "-D".

Fred Wright


From MAILER-DAEMON Fri Feb 24 17:55:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1chOlp-0003m5-Ou
	for mharc-gpsd-dev@gnu.org; Fri, 24 Feb 2017 17:55:25 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52690)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1chOlo-0003ly-DJ
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1chOlk-0003xq-Go
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:24 -0500
Received: from bay004-omc1s23.hotmail.com ([65.54.190.34]:58685)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1chOlk-0003wu-7j
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:20 -0500
Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.54.190.60])
	by BAY004-OMC1S23.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 24 Feb 2017 14:55:18 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=53xEh9xwmCnTpAua34PNwRjHjl4DRcvLniLZzeF+RTM=;
	b=k9yT8aD3N+KxAs09WG288UONUfT2FopclmaZUnSMiTD0CdrYn3HqTmHUv0dnCEoenK06T8S+/uIL9UDtsur3hCCX0RrW/RgBurzZ0P6S3lrLzSQW8QEl9vPJ2V/BvPHofWSjKcCY94mjiZbC98ZKV17Y3qLzMh740Jkv8KeSTfACK5KEyUsVfZBKPuLLEsmgrFnEBpj8sPzle2vO/gkibhiiXgoHIhDpH595ElJfGeLdZU4XbTjQLXNsTDBG+OLnp3RMN8/k8AYlGXlTwkra6Jo4Ysu/BzHe08sBXmKiD5JfkMl64U426yN+OrDTYs2I+tBJNt3IC3Fy0inP5/G7ZA==
Received: from VE1EUR01FT055.eop-EUR01.prod.protection.outlook.com
	(10.152.2.56) by VE1EUR01HT245.eop-EUR01.prod.protection.outlook.com
	(10.152.2.185) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.10;
	Fri, 24 Feb 2017 22:55:16 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.2.56) by
	VE1EUR01FT055.mail.protection.outlook.com (10.152.3.104) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.919.10 via Frontend Transport; Fri, 24 Feb 2017 22:55:15 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0919.018; Fri, 24 Feb 2017 22:55:16 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 2/3] Enable Windows version of gpxlogger
Thread-Index: AQHSjvEQcP7dFFipukiy+XaepLKl2w==
Date: Fri, 24 Feb 2017 22:55:15 +0000
Message-ID: <AM4PR08MB0865EA212F3705C0F7B151278E520@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170224225453.3052-1-rw_norris@hotmail.com>
In-Reply-To: <20170224225453.3052-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:F354629608C91FDBAAAE1729CBC0F72A18BAA66FCE4ECCDC932405E6430B6F92;
	UpperCasedChecksum:1726D8A7144A346B1D80223F391BCCE3C153EEEC1B5DAD96CC1054B61EAED2B9;
	SizeAsReceived:7497; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR01HT245;
	5:X3q2+/qWA+HS9N7h1cgtC4Uy4D03fH2vOjCDz1iIu6bc64wmJ+DvvW7t5dTF52Xv0gyvpNaQEBTVTxLOAPhruNgSzBQfrSFAuqqD2tYcgFZYW7DLwjrFCAnI5MiTuW5rO9AmwMR5jPkIUu+geviLAw==;
	24:e/FbzS8JqszjDJWzY7roIIiS7CDqfZ8to6M0lIjsQOUoEARM+chfw1DSZRAEvjiQajiALfvki9hFXaWvsflYMhK3XNOC331kpwQ58d+IvmM=;
	7:PQD6e7LmyohbsHPbK9QczVnJmAlJnfCxUEBGHoAfmC3kYzytl/hMBlXSQRfD1KmMtoyUOtvYcC8+okaZHYnRDTkGylDAPjYT/ALr/20eXVksOH+AEbpE1z70bWw/bpxWLC3DnHjH3O2eMLTZr/DmMEnh3du3ubTpO83Z6fVOjHQuftsty2CrcZbxunN56t403khMoK0f0t4GeGRuG1BrHYVtXBo31HhJMivjtL1xARVTPp79RtKwDgWQX931meFIWV7PyqTBj235ndA+2dD17O14X/pYQOXLX4YsKliJx2t7aVynjF4JKY98gr5ysfn3
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900012);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR01HT245;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: ad95868b-1995-449d-d64e-08d45d083220
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(1603101418)(1601125254)(1701031045);
	SRVR:VE1EUR01HT245; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(432015087)(444000031); SRVR:VE1EUR01HT245; BCL:0; PCL:0;
	RULEID:; SRVR:VE1EUR01HT245; 
x-forefront-prvs: 0228DDDDD7
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Feb 2017 22:55:15.9536 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT245
X-OriginalArrivalTime: 24 Feb 2017 22:55:18.0654 (UTC)
	FILETIME=[11F299E0:01D28EF1]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.34
Subject: [gpsd-dev] [PATCH 2/3] Enable Windows version of gpxlogger
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Feb 2017 22:55:25 -0000

Disable daemonize option which is not available on Windows.

Add check for signal compatibility as SIGQUIT may not be available.

TESTED:
Confirmed gpxlogger for Windows builds under a cross compiler.
Runs on a Windows system, connects to an instance of gpsd and produces a
 GPX file from the gpsd output.
gpxlogger still builds, runs on Linux including the daemon option
---
 gpxlogger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gpxlogger.c b/gpxlogger.c
index e34c2132..5c8b4a83 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -186,7 +186,10 @@ static void quit_handler(int signum)
 static void usage(void)
 {
     (void)fprintf(stderr,
-                  "Usage: %s [-V] [-h] [-l] [-d] [-D debuglevel]"
+                  "Usage: %s [-V] [-h] [-l] [-D debuglevel]"
+#ifdef HAVE_FORK
+                  " [-d]"
+#endif /* HAVE_FORK */
                   " [-i timeout] [-f filename] [-m minmove]\n"
                   "\t[-r] [-e exportmethod] [server[:port:[device]]]\n\n"
                   "defaults to '%s -i 5 -e %s localhost:2947'\n",
@@ -214,10 +217,12 @@ int main(int argc, char **argv)
     logfile =3D stdout;
     while ((ch =3D getopt(argc, argv, "dD:e:f:hi:lm:rV")) !=3D -1) {
 	switch (ch) {
+#ifdef HAVE_FORK
 	case 'd':
 	    openlog(basename(progname), LOG_PID | LOG_PERROR, LOG_DAEMON);
 	    daemonize =3D true;
 	    break;
+#endif /* HAVE_FORK */
 #ifdef CLIENTDEBUG_ENABLE
 	case 'D':
 	    debug =3D atoi(optarg);
@@ -317,7 +322,9 @@ int main(int argc, char **argv)
=20
     /* catch all interesting signals */
     (void)signal(SIGTERM, quit_handler);
+#ifdef SIGQUIT
     (void)signal(SIGQUIT, quit_handler);
+#endif
     (void)signal(SIGINT, quit_handler);
=20
     /* might be time to daemonize */
--=20
2.11.0



From MAILER-DAEMON Fri Feb 24 17:55:27 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1chOlq-0003mX-SS
	for mharc-gpsd-dev@gnu.org; Fri, 24 Feb 2017 17:55:26 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52689)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1chOlo-0003lx-Cf
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1chOlk-0003xh-E1
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:24 -0500
Received: from bay004-omc2s25.hotmail.com ([65.54.190.100]:56122)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1chOlj-0003vY-TC
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:20 -0500
Received: from EUR01-HE1-obe.outbound.protection.outlook.com ([65.54.190.124])
	by BAY004-OMC2S25.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 24 Feb 2017 14:55:13 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=FKK7SXsZG1kJuWwxKxWoxGF8f9je+1eqXxIBb8XIvNE=;
	b=c/bYrCTkOJ+Nut1s/vWT+TV0mnzyDUOAbJUbljLnUkhlhMxp3UONq+uyDw7uQI/8WIg2aWsMtB0T7buEDVvV1JC+9iHxLalgG/1MLzfPle4wDp3A9SRKsbl45yhpG4XwIJWKUd4t+lX7511Tg0r2tz2o5oz1gfwzPMOGTebhGYP1jnlmei9S1TybPr/OQgdVe3Yq1gAvLyqRVGwuK+WGIndirhErSBoBqBiNs66j9jpNDwOwkXjpAHbIcqYJx2MwsXZcP7F2X5DPs7/MxDaNls56O7Ybp7Lsoy0l5CykFRPdT0kdWfZkf15YzI1lEJu72sA9KsREhESPWvTA3e3iRg==
Received: from VE1EUR01FT055.eop-EUR01.prod.protection.outlook.com
	(10.152.2.57) by VE1EUR01HT133.eop-EUR01.prod.protection.outlook.com
	(10.152.3.161) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.10;
	Fri, 24 Feb 2017 22:55:11 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.2.56) by
	VE1EUR01FT055.mail.protection.outlook.com (10.152.3.104) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.919.10 via Frontend Transport; Fri, 24 Feb 2017 22:55:11 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0919.018; Fri, 24 Feb 2017 22:55:11 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 1/3] OS syslog compatibility fallback.
Thread-Index: AQHSjvENHcqvWQ7WRUu83/AogbLUMA==
Date: Fri, 24 Feb 2017 22:55:11 +0000
Message-ID: <AM4PR08MB086565F622C80FC5D41572468E520@AM4PR08MB0865.eurprd08.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:31B0AE95C98239F0D7E902CF91E552B0E3D8592FA92793A402047F55D51A06F0;
	UpperCasedChecksum:5662BAF1CA4E73836931D58ECF7AB82DA60A3B1A24DA3A07F9E16483FA6552BB;
	SizeAsReceived:7443; Count:34
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 34
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR01HT133;
	5:nctA3WVF0FPnMsy0CGGdOheUMjTFU7PycU8xYPWfiN4HfhbvsHG3ERCgd4sc3ETRkUv+mVa2w5vNPJU+olz5xa5QfVpKCaCS0QNyw492GGJvcEZMQ38DmTl6wK6M7hRqUXtGaob9dDQ1jE6VB055+w==;
	24:IaeIbACiNNL0evb8k3DeijoC3trmsjtV5IiF1D6zcCoqKOBnCNQ3+Qtv9wIV5OjOwcHQ6QmoHKOOK//ZbCur3njVRWU0IYAsOgynnr4/yMs=;
	7:gS3uq0fagTsxecfWPyUV98KHNRvrGvCzo0LgrJTN/2E/+H20P/mvYpVD87K0B3zSMJh2oOEHrw+yVjIcAiAWXuAfucpITqEs+FY8tESNy3JNTff++0YItInRqj4293g7cpx40vyGr7niwBUj/80xDSkd2EEPfSxJMulflK4PVkK1DRGDdlNZyPZ6clrKXm4xkETakoHnxsmjYSc5N/WYkgXrE8neIJPlvHrZm4G6Jtp1iVjHKv++EWrmB0/8L8HUskwT/nO3xTBO8H+u4q4DpBKZkKRPvsVZyQYnih+wisxMPyxO03tjLJkf/coNnTbv
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900012);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR01HT133;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: 6d2e382f-adb3-48d5-24da-08d45d082f18
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(1601125254)(1701031045);
	SRVR:VE1EUR01HT133; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(432015087)(444000031); SRVR:VE1EUR01HT133; BCL:0; PCL:0;
	RULEID:; SRVR:VE1EUR01HT133; 
x-forefront-prvs: 0228DDDDD7
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Feb 2017 22:55:11.1717 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT133
X-OriginalArrivalTime: 24 Feb 2017 22:55:14.0115 (UTC)
	FILETIME=[0F3E0130:01D28EF1]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.100
Subject: [gpsd-dev] [PATCH 1/3] OS syslog compatibility fallback.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Feb 2017 22:55:26 -0000

Mainly for Windows systems which doesn't have syslog().

Implement simple fallback to print to stderr,
 rather than a more complicated use of Windows Event Log.

Also basic fallbacks for openlog() and closelog() which
 don't really do anything.

Wrap all includes of syslog.h with a checking #ifdef
This shouldn't effect current systems as it should exist

TESTED:
Functions build on Windows cross build
'scons build-all check' passes on Linux
---
 SConstruct     |  2 +-
 gpsd.c         |  4 ++++
 gpsdctl.c      |  3 +++
 gpxlogger.c    |  5 ++++-
 libgps_dbus.c  |  2 ++
 libgpsd_core.c |  3 +++
 os_compat.c    | 30 ++++++++++++++++++++++++++++++
 os_compat.h    | 44 ++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 91 insertions(+), 2 deletions(-)

diff --git a/SConstruct b/SConstruct
index f3416ba7..c5eb13eb 100644
--- a/SConstruct
+++ b/SConstruct
@@ -750,7 +750,7 @@ else:
             announce("You do not have the endian.h header file. RTCM V2 su=
pport disabled.")
             env["rtcm104v2"] =3D False
=20
-    for hdr in ("sys/un", "sys/socket", "sys/select", "netdb", "netinet/in=
", "netinet/ip", "arpa/inet", "termios", "winsock2"):
+    for hdr in ("sys/un", "sys/socket", "sys/select", "netdb", "netinet/in=
", "netinet/ip", "arpa/inet", "syslog", "termios", "winsock2"):
         if config.CheckHeader(hdr + ".h"):
             confdefs.append("#define HAVE_%s_H 1\n" % hdr.replace("/","_")=
.upper())
         else:
diff --git a/gpsd.c b/gpsd.c
index c14e09a5..1d267989 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -20,6 +20,8 @@
 /* strlcpy() needs _DARWIN_C_SOURCE */
 #define _DARWIN_C_SOURCE
=20
+#include "os_compat.h"
+
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/time.h>		/* for select() */
@@ -34,7 +36,9 @@
 #include <setjmp.h>
 #include <assert.h>
 #include <math.h>
+#ifdef HAVE_SYSLOG_H
 #include <syslog.h>
+#endif
 #include <errno.h>
 #include <signal.h>
 #include <ctype.h>
diff --git a/gpsdctl.c b/gpsdctl.c
index cd794184..06e7cdb6 100644
--- a/gpsdctl.c
+++ b/gpsdctl.c
@@ -4,11 +4,14 @@
  * BSD terms apply: see the file COPYING in the distribution root for deta=
ils.
  *
  */
+#include "os_compat.h"
 #include <string.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#ifdef HAVE_SYSLOG_H
 #include <syslog.h>
+#endif
 #include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/gpxlogger.c b/gpxlogger.c
index 5cd2734e..e34c2132 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -3,11 +3,15 @@
  * BSD terms apply: see the file COPYING in the distribution root for deta=
ils.
  */
=20
+#include "gpsd_config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
 #include <string.h>
+#ifdef HAVE_SYSLOG_H
 #include <syslog.h>
+#endif
 #include <math.h>
 #include <time.h>
 #include <errno.h>
@@ -17,7 +21,6 @@
 #include <unistd.h>
=20
 #include "gps.h"
-#include "gpsd_config.h"
 #include "gpsdclient.h"
 #include "revision.h"
 #include "os_compat.h"
diff --git a/libgps_dbus.c b/libgps_dbus.c
index 29cd0dd0..53d35a44 100644
--- a/libgps_dbus.c
+++ b/libgps_dbus.c
@@ -14,7 +14,9 @@
 #include "libgps.h"
=20
 #if defined(DBUS_EXPORT_ENABLE)
+#ifdef HAVE_SYSLOG_H
 #include <syslog.h>
+#endif
=20
 struct privdata_t
 {
diff --git a/libgpsd_core.c b/libgpsd_core.c
index ddb22a6d..78e493db 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <stdlib.h>
=20
+#include "os_compat.h"
 #include <stdbool.h>
 #include <libgen.h>
 #include <math.h>
@@ -32,7 +33,9 @@
 #include <stdarg.h>
 #include <fcntl.h>
 #include <ctype.h>
+#ifdef HAVE_SYSLOG_H
 #include <syslog.h>
+#endif
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/select.h>
diff --git a/os_compat.c b/os_compat.c
index 790aaf94..1617b544 100644
--- a/os_compat.c
+++ b/os_compat.c
@@ -130,6 +130,36 @@ int os_daemon(int nochdir, int noclose)
=20
 /* Provide BSD strlcat()/strlcpy() on platforms that don't have it */
=20
+#ifndef HAVE_SYSLOG_H
+#include "compiler.h"
+#include <stdarg.h>
+#include <stdio.h>
+/*
+ * Minimal syslog() fallback to print to stderr
+ *
+ */
+PRINTF_FUNC(2, 3) void syslog(int priority UNUSED, const char *format, ...=
)
+{
+  /* ATM ignore priority (i.e. don't even both prepending to output) */
+  char buf[BUFSIZ];
+  va_list ap;
+  va_start(ap, format);
+  /* Always append a new line to the message */
+  (void)vsnprintf(buf, sizeof(buf) - 2, format, ap);
+  (void)fprintf(stderr, "%s\n", buf);
+  va_end(ap);
+}
+
+void openlog (const char *__ident UNUSED, int __option UNUSED, int __facil=
ity UNUSED)
+{
+  (void)fprintf(stderr, "Warning openlog() not available\n");
+}
+
+void closelog (void)
+{
+}
+#endif /* !HAVE_SYSLOG_H */
+
 /*
  * These versions use memcpy and strlen() because they are often
  * heavily optimized down to assembler level. Thus, likely to be
diff --git a/os_compat.h b/os_compat.h
index 93ea8b06..18ce4985 100644
--- a/os_compat.h
+++ b/os_compat.h
@@ -57,6 +57,50 @@ int clock_gettime(clockid_t, struct timespec *);
=20
 int os_daemon(int nochdir, int noclose);
=20
+
+#ifndef HAVE_SYSLOG_H
+/*
+ * Substitutes for syslog functions
+ *
+ */
+/* Copy of syslog.h defines when otherwise not available */
+/* priorities (these are ordered) */
+#define	LOG_EMERG	0	/* system is unusable */
+#define	LOG_ALERT	1	/* action must be taken immediately */
+#define	LOG_CRIT	2	/* critical conditions */
+#define	LOG_ERR		3	/* error conditions */
+#define	LOG_WARNING	4	/* warning conditions */
+#define	LOG_NOTICE	5	/* normal but significant condition */
+#define	LOG_INFO	6	/* informational */
+#define	LOG_DEBUG	7	/* debug-level messages */
+/* Option flags for openlog */
+#define	LOG_PID		0x01	/* log the pid with each message */
+#define	LOG_CONS	0x02	/* log on the console if errors in sending */
+#define	LOG_ODELAY	0x04	/* delay open until first syslog() (default) */
+#define	LOG_NDELAY	0x08	/* don't delay open */
+#define	LOG_NOWAIT	0x10	/* don't wait for console forks: DEPRECATED */
+#define	LOG_PERROR	0x20	/* log to stderr as well */
+/* facility codes */
+#define	LOG_KERN	(0<<3)	/* kernel messages */
+#define	LOG_USER	(1<<3)	/* random user-level messages */
+#define	LOG_MAIL	(2<<3)	/* mail system */
+#define	LOG_DAEMON	(3<<3)	/* system daemons */
+#define	LOG_AUTH	(4<<3)	/* security/authorization messages */
+#define	LOG_SYSLOG	(5<<3)	/* messages generated internally by syslogd */
+#define	LOG_LPR		(6<<3)	/* line printer subsystem */
+#define	LOG_NEWS	(7<<3)	/* network news subsystem */
+#define	LOG_UUCP	(8<<3)	/* UUCP subsystem */
+#define	LOG_CRON	(9<<3)	/* clock daemon */
+#define	LOG_AUTHPRIV	(10<<3)	/* security/authorization messages (private) =
*/
+#define	LOG_FTP		(11<<3)	/* ftp daemon */
+
+void syslog(int priority, const char *format, ...);
+void openlog(const char *__ident, int __option, int __facility);
+void closelog(void);
+
+#endif /* HAVE_SYSLOG_H */
+
+
 /* Provide BSD strlcat()/strlcpy() on platforms that don't have it */
=20
 #ifndef HAVE_STRLCAT
--=20
2.11.0



From MAILER-DAEMON Fri Feb 24 17:55:42 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1chOm6-0003uv-2h
	for mharc-gpsd-dev@gnu.org; Fri, 24 Feb 2017 17:55:42 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52815)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1chOm3-0003uB-Iy
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1chOlz-00043U-NK
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:39 -0500
Received: from bay004-omc3s22.hotmail.com ([65.54.190.160]:50610)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1chOlz-000431-DE
	for gpsd-dev@nongnu.org; Fri, 24 Feb 2017 17:55:35 -0500
Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.54.190.188])
	by BAY004-OMC3S22.hotmail.com over TLS secured channel with
	Microsoft SMTPSVC(7.5.7601.23008); Fri, 24 Feb 2017 14:55:34 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=oFFHbVMs8JtiAnGyceymhfUqKoWJSw0tuR+Ci8/FjqM=;
	b=Q/W/AXcyqcIIj0exZ4DvBdu0aL9IwEaZBN1bUBoDBEBYtZY3bC900QuhjGGkQ9jAvwt+Sv/RkPTQYRHag6XuuYgswFEEa61mGWdSl/JSpVr9NO8QMJfEP96+IrGtDn9IXYpEUeJvcoFWmd1Fn2zBEJqiGEWTDeqOP+3Nq9Er69LvovBbpGOcYPUEjqutXHJ7zAmA2mIkge4YtZmQpW8MNiQB3hsUhs+FMfKwb06eLpE+AWdrEGF7zXgbHjwguy091X33s9nNrq+oXhaGTE3oz2o0hoDrcAU6IN362q2h4Pq1pU6QR3jFbb0lSX7TQjvFALQy3IMYevPGH4176x8nbg==
Received: from VE1EUR01FT055.eop-EUR01.prod.protection.outlook.com
	(10.152.2.52) by VE1EUR01HT156.eop-EUR01.prod.protection.outlook.com
	(10.152.3.179) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.10;
	Fri, 24 Feb 2017 22:55:22 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com (10.152.2.56) by
	VE1EUR01FT055.mail.protection.outlook.com (10.152.3.104) with Microsoft
	SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
	15.1.919.10 via Frontend Transport; Fri, 24 Feb 2017 22:55:21 +0000
Received: from AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) by
	AM4PR08MB0865.eurprd08.prod.outlook.com ([10.164.83.23]) with mapi id
	15.01.0919.018; Fri, 24 Feb 2017 22:55:22 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH 3/3] Enable Windows version of gpspipe
Thread-Index: AQHSjvETtJ9F2yBjzkWqIdEyLzYjuQ==
Date: Fri, 24 Feb 2017 22:55:22 +0000
Message-ID: <AM4PR08MB0865A9D8385CF2BF337017E38E520@AM4PR08MB0865.eurprd08.prod.outlook.com>
References: <20170224225453.3052-1-rw_norris@hotmail.com>
In-Reply-To: <20170224225453.3052-1-rw_norris@hotmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: nongnu.org; dkim=none (message not signed)
	header.d=none; nongnu.org;
	dmarc=none action=none header.from=hotmail.com; 
x-incomingtopheadermarker: OriginalChecksum:2E91CEB2B68102613BA3A62DA7BB894D2D10F8D2D04579E3256A7FAB02182FFF;
	UpperCasedChecksum:457B5B26C189FACDCBA7FC879108623F78654074C4A3437BD2A4DC6DDB67F93C;
	SizeAsReceived:7496; Count:36
x-ms-exchange-messagesentrepresentingtype: 1
x-incomingheadercount: 36
x-eopattributedmessage: 0
x-microsoft-exchange-diagnostics: 1; VE1EUR01HT156;
	5:ffKbTDq8AlCWx0Yt9jUiGv2t17mcmuVXi79I7rafR6LzUfYvGSwAsL7iOTBhXxDgMtTJmvmUGR3Cp0bPzrnjJ+OBok0RzH5sN1Wq5WYITk+VwP4AzwSZMWvZ1yVCPKJRlMWBbtHtaJY/rKlf/cieOw==;
	24:w2NqJ2so/+ktHM9i6t7roAVse6wWar4gX+Dq5y2sOcAwTXhA48ELegKn5ocHKUm2MlB8ZEhFgZoK+Ep+G+mGnc6ZqKcjMxjheYZlwe3rUNQ=;
	7:BXFtIO+huTBDIDSO0eZzYnSTmj6YF/QtyrXcw7oDoVu5JSinTs/umh0XqBtL/pbn5VUDsJ/N4Brqh816Ej01z3kcIbNWvZXL6r46cTCGlWCJhWv9ezCHR/e3A63x8CyfODhOXi9BLdHHF+0uI8atU69Of6l6kGXoAM2X3EYbpkmqdjkrmysXcWv81C/kJT9UyVNRYW2sNWT1xN5Wnd/Nn/viaf+zaYK3AOBim6hEO0YDYW03XAimUDA4WmPK730hR/x04pAMo15oqkfMK1q3az7kLx3fp/FWQWdTNfTSFqrRUVG5R3ingcHuncirzcbW
x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900012);
	DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR01HT156;
	H:AM4PR08MB0865.eurprd08.prod.outlook.com; FPR:; SPF:None;
	LANG:en; 
x-ms-office365-filtering-correlation-id: d36e2448-992c-4c7a-0413-08d45d0835cc
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(1601125254)(1701031045);
	SRVR:VE1EUR01HT156; 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(432015087)(444000031); SRVR:VE1EUR01HT156; BCL:0; PCL:0;
	RULEID:; SRVR:VE1EUR01HT156; 
x-forefront-prvs: 0228DDDDD7
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Feb 2017 22:55:22.0695 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT156
X-OriginalArrivalTime: 24 Feb 2017 22:55:34.0063 (UTC)
	FILETIME=[1B21D3F0:01D28EF1]
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 65.54.190.160
Subject: [gpsd-dev] [PATCH 3/3] Enable Windows version of gpspipe
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Feb 2017 22:55:41 -0000

Use recv() rather than read() for Windows compatibility.

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

TESTED:
Built gpspipe for Windows under cross compiler.
Run gpspipe on a Windows system and successfully connects to an instance of
 gpsd and dumps NMEA output to the terminal or a specified output file.
Still builds and runs on a Linux system including the daemon option.
---
 gpspipe.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gpspipe.c b/gpspipe.c
index bd72f153..7650b7ac 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -37,11 +37,21 @@
 #include <string.h>
 #include <strings.h>
 #include <fcntl.h>
+#ifdef HAVE_TERMIOS_H
 #include <termios.h>
+#endif /* HAVE_TERMIOS_H */
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef HAVE_SELECT_H
 #include <sys/select.h>
+#endif /* HAVE_SELECT_H */
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif /* HAVE_WINSOCK2_H */
 #include <unistd.h>
=20
 #include "gpsd.h"
@@ -65,6 +75,7 @@ static int debug;
 static void open_serial(char *device)
 /* open the serial port and set it up */
 {
+#ifdef HAVE_TERMIOS_H
     /*
      * Open modem device for reading and writing and not as controlling
      * tty.
@@ -94,13 +105,16 @@ static void open_serial(char *device)
 	(void)fprintf(stderr, "gpspipe: error configuring serial port\n");
 	exit(EXIT_FAILURE);
     }
+#endif /* HAVE_TERMIOS_H */
 }
=20
 static void usage(void)
 {
     (void)fprintf(stderr,
 		  "Usage: gpspipe [OPTIONS] [server[:port[:device]]]\n\n"
+#ifdef HAVE_FORK
 		  "-d Run as a daemon.\n"
+#endif /* HAVE_FORK */
 		  "-o [file] Write output to file.\n"
 		  "-h Show this help.\n"
 		  "-r Dump raw NMEA.\n"
@@ -112,7 +126,9 @@ static void usage(void)
 		  "-t Time stamp the data.\n"
 		  "-T [format] set the timestamp format (strftime(3)-like; implies '-t')=
\n"
 		  "-u usec time stamp, implies -t. Use -uu to output sec.usec\n"
+#ifdef HAVE_TERMIOS_H
 		  "-s [serial dev] emulate a 4800bps NMEA GPS on serial port (use with '=
-r').\n"
+#endif
 		  "-n [count] exit after count packets.\n"
 		  "-v Print a little spinner.\n"
 		  "-p Include profiling info in the JSON.\n"
@@ -171,9 +187,11 @@ int main(int argc, char **argv)
 	    flags |=3D WATCH_RAW;
 	    binary =3D true;
 	    break;
+#ifdef HAVE_FORK
 	case 'd':
 	    daemonize =3D true;
 	    break;
+#endif
 	case 'l':
 	    sleepy =3D true;
 	    break;
@@ -208,9 +226,11 @@ int main(int argc, char **argv)
 	    (void)fprintf(stderr, "%s: %s (revision %s)\n",
 			  argv[0], VERSION, REVISION);
 	    exit(EXIT_SUCCESS);
+#ifdef HAVE_TERMIOS_H
 	case 's':
 	    serialport =3D optarg;
 	    break;
+#endif
 	case 'o':
 	    outfile =3D optarg;
 	    break;
@@ -319,7 +339,7 @@ int main(int argc, char **argv)
=20
 	/* reading directly from the socket avoids decode overhead */
 	errno =3D 0;
-	r =3D (int)read(gpsdata.gps_fd, buf, sizeof(buf));
+	r =3D (int)recv(gpsdata.gps_fd, buf, sizeof(buf), 0);
 	if (r > 0) {
 	    int i =3D 0;
 	    int j =3D 0;
--=20
2.11.0



