[Mesa-dev] [PATCH] include: Add helper header to help trap includes inside extern C.

kallisti5 kallisti5 at unixzen.com
Wed May 13 10:48:01 PDT 2015

On 2015-05-13 10:42, Jason Ekstrand wrote:
> On May 13, 2015 8:01 AM, "kallisti5" <kallisti5 at unixzen.com> wrote:
> src/mesa/drivers/haiku/swrast/SoftwareRast.cpp:28:
>  > include/no_extern_c.h:47:1: error: template with C linkage
>  >
>  >  template<class T> class _IncludeInsideExternCNotPortable;
>  >
>  > Any alternative fix ideas besides me adding a if
> !defined(__HAIKU__) to include/no_extern_c.h?
> Please do not do that!  The whole point of this patch is to catch
> places where headers are included inside an extern "C" block.  This
> patch makes them a compile error instead of being silently wrong.
> The correct solution is to fix the haiku platform integration so it
> doesn't do this.
> --Jason

Yeah, I had a chat in IRC and determined that I need to add extern "C"
a few places within Mesa instead of doing a bulk extern "C" to the
mesa C headers.

One example is glapi_priv lacks any extern "C" (ifdef C++ wrapped)

I'll begin submitting patches to the ML over the next few days.


  -- Alex

More information about the mesa-dev mailing list