gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH 5/8] NITEMS definition cleanup.


From: Eric S. Raymond
Subject: Re: [gpsd-dev] [PATCH 5/8] NITEMS definition cleanup.
Date: Wed, 20 Apr 2016 16:31:41 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Gary E. Miller <address@hidden>:
> > However libgps.h gets used with libgpsd so one would get compiler
> > redefinition warnings.
> 
> How about solving it the right way?  A single header file in common
> with both sides, things things ony get defined once.
> 
> > Perhaps creating a single version (e.g. in the new gpsd_definitons.h
> > file or similar) would be better.
> 
> Yup.
> 
> As a rule, when you define something twice, they will eventually get out
> of sync.

I have a concern about this.  It's OK to make new heders in the distribution;
it's not OK for gps.h to have to include anything else, it complicates life
for C client implementors too much.

If you need shated definitionms, put them in gps.h.  gpsd.h includes it,
which is OK.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

Attachment: signature.asc
Description: Digital signature


reply via email to

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