[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] [PATCH 5/8] NITEMS definition cleanup.
From: |
Robert Norris |
Subject: |
Re: [gpsd-dev] [PATCH 5/8] NITEMS definition cleanup. |
Date: |
Wed, 20 Apr 2016 01:25:05 +0100 |
> Date: Tue, 19 Apr 2016 13:49:07 -0700
> From: address@hidden
> To: address@hidden
> CC: address@hidden
> Subject: Re: [gpsd-dev] [PATCH 5/8] NITEMS definition cleanup.
>
> Yo Rob!
>
> On Tue, 19 Apr 2016 21:01:42 +0100
> Rob Norris <address@hidden> wrote:
>
>> +#ifndef NITEMS
>> +#define NITEMS(x) ((int) (sizeof(x) / sizeof(x[0]) +
>> COMPILE_CHECK_IS_ARRAY(x))) +#endif
>> +
>
> Who would define NITEMS if not gpsd?
>
In moving to a more rigorous split between libgpsd and libgps, there currently
exists NITEMS definitions in both sections - so it gpsd itself defining more
than once.
Here instead of creating a single definition, I moved one to be visible
somewhere to provide for the libgps side.
However libgps.h gets used with libgpsd so one would get compiler redefinition
warnings.
Perhaps creating a single version (e.g. in the new gpsd_definitons.h file or
similar) would be better.
Rob.