[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH]: Re: strl{cat, cpy} prototypes in gps.h always activ
From: |
Matt |
Subject: |
[gpsd-dev] [PATCH]: Re: strl{cat, cpy} prototypes in gps.h always active |
Date: |
Thu, 25 Dec 2014 15:57:53 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The way I see it, it's an implementation detail that gpsd uses, and
optionally also supplies, these strl* functions. If as you say gps.h
is installed for public use, then I feel they shouldn't be prototyped
there; it's namespace pollution.
As it happens, all users of these functions already include
gpsd_config.h, and that file already contains declarations of these
strl* functions, and even better its versions are guarded by #ifndef
HAVE_xxx, so shouldn't cause problems on OSX.
So the attached patch simply deletes the unguarded declarations from
gps.h, with no effect on compilation.
On 24/12/14 04:20, Greg Troxel wrote:
>
> As to be expected, including gpsd_config.h in gps.h fixes the
> compile. No idea if this is the correct way to go about fixing
> this. Patch attached for your convenience anyway. :)
>
> I wonder if it should be that gps_client.c shoudl be including
> gpsd_config.h. I think gps.h is installed, which means it can't
> reference non-installed files. I think this issue is part of
> gpsd's implementation, not its external interface. I am curious how
> you see it, given my comment.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJUm5lRAAoJECH/phKUbjXC9/cH+wdk18DGU8p9CxSXjBep0rhA
6XmDBoC1Kp3imJyoL7qNzofRPEFWB+8P7INsQG+a+gKxnXYOHrlqhTa+H+JqvldM
E00Mflq8MQZCubv/H/4qlFs7KkSceL5hJLKJmkrQgwZHpG8NhN/7xoLt9G39zHSC
ptx/9VuGp/9Dxzn4M8ghLnBcVz2oixUcCQQQrTZgbQYTJwesNlbx+T7Jf4eOEywz
h0yoNr9ijtbN5fgqMF/ALw0oktuMiFdnFEALR+FUtob3eHgoTb0FtAnG6+sle4F9
2Rs7cAjwgNfVbE7UwHuAP8YQm81cRPf1PxoQMCQiIps08BnNtb4jZMNTHxRZ+5E=
=ROrK
-----END PGP SIGNATURE-----
remove-duplicate-strlcpy-strlcat-declarations.patch
Description: Text Data