[lttng-dev] [barectf] Building /w. Microsoft Visual Studio

Philippe Proulx eeppeliteloop at gmail.com
Thu Nov 10 18:25:47 UTC 2016


On Thu, Nov 10, 2016 at 12:17 PM, Jean-Francois MONESTIER
<jean-francois.monestier at st.com> wrote:
> Hello Tracers !
>
> I'm currently having hard times, trying to build a barectf-generated CTF
> writer with Microsoft Visual Studio 2008.
>
> Problem resides in the .._bitfield.h file, macro
> .._bt_bitfield_write_le( .. ) as __type__( .. ) is a gcc extension :
>
>   warning C4013: '__typeof__' undefined; assuming extern returning int
>

That's actually listed in the limitations of barectf (README file):

    The current generated C code is not strictly C99 compliant:
    statement expressions and the typeof keyword GCC extensions are used
    in the generated bitfield macros. The generated C code is known to
    be compiled with no warnings using both GCC and Clang.

> Are there any M$ compatible bitfield macros/functions around here ? Or
> am I on the way to port these myself ?
>
> For what I've seen, I'm only writing 8/16/32/64b data into my stream, so
> that the macros should rewrite in a much more simpler way.

Those macros expand to pretty much what you would expect when compiler
optimizations are enabled.

Can you try this branch?

    pip3 install
git+https://github.com/efficios/barectf@remove-gnu-dep --upgrade
--force-reinstall

I removed the dependency on __typeof__() and statement expressions,
which are GNU extensions, however I know that MSVC does not support C99,
so there might be other C99 stuff left in there.

Phil

>
> I'm currently using barectf v2.1.3
>
>
> Any help appreciated,
> Thanks in advance
> --
> Jean-Francois Monestier
> 041-6766
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


More information about the lttng-dev mailing list