[systemd-devel] [PATCH] include: fix problem with __LINE__ macro expansion

David Herrmann dh.herrmann at gmail.com
Fri Nov 22 05:46:39 PST 2013


Hi

On Fri, Nov 22, 2013 at 2:09 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Thu, 21.11.13 17:26, Lukasz Skalski (l.skalski at partner.samsung.com) wrote:
>
>> Hi all,
>>
>> Macro __LINE__ in #define assert_cc() (src/shared/macro.h) is not
>> properly expanded.
>>
>> Please find patch in attachment for review.
>
> Thanks! Seems David Herrmann has now fixed this thing slightly
> differently.

I just noticed the compile-failure and fixed it up myself. But this
patch definitely looks nicer. I now changed the helper-name to
XCONCATENATE similar to XSTRINGIFY and added a UNIQUE macro to
generate a unique name. Might be useful in other macros, too.

Thanks
David


More information about the systemd-devel mailing list