[haiku-commits] Re: haiku: hrev47755 - headers/os/support

  • From: Paweł Dziepak <pdziepak@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 28 Aug 2014 18:21:03 +0200

2014-08-28 18:01 GMT+02:00 pulkomandy <pulkomandy@xxxxxxxxxxxxx>:

> On Thu, Aug 28, 2014 at 05:51:05PM +0200, Paweł Dziepak wrote:
> > 2014-08-28 17:44 GMT+02:00 <pulkomandy@xxxxxxxxxxxxx>:
> >
> > > hrev47755 adds 1 changeset to branch 'master'
> > > old head: fbe9d6de535dd675291b58292910cc905ee676c3
> > > new head: 34dbbb65fdfa4a70cd2c472731bb71b16385e29f
> > > overview:
> > > http://cgit.haiku-os.org/haiku/log/?qt=range&q=34dbbb6+%5Efbe9d6d
> > >
> > >
> > >
> ----------------------------------------------------------------------------
> > >
> > > 34dbbb6: Make atomics extern "C" again.
> > >
> > >   Pawel changed the implementation but I see no reason to make those
> > > available only from C++, so it must be an oversight.
> > >
> >
> > These functions are static inline, what's the point of making them extern
> > "C" as well?
> >
> >
> > >   Fixes building Haiku on Haiku which otherwise hits a mismatch in
> build
> > > compatibility headers.
> > >
> >
> > I don't think that this mismatch should be fixed by adding more junk to
> > SupportDefs.h, we already have enough ifdefs in there.
>
> The HaikuBuildCompatibility.h header defines them as extern "C", and
> is confused if SupportDefs.h doesn't match. Maybe we can fix this the
> other way around and adjust HaikuBuildCompatibility then.
>
> But as it seems we still define them as extern "C" in some other cases,
> this would create trouble as we switch between the different setups.
> Isn't it better to keep the API identical no matter which implementation
> is used?


HaikuBuildCompatibility.h includes SupportDefs.h so there is no need to
define these functions again in the former. That's actually the real
problem here, it isn't about extern "C" but about the fact that these
functions are defined in more than one header.

Paweł

Other related posts: