Re: [systemd-devel] [PATCH] include: fix problem with __LINE__ macro expansion
On Thu, 21.11.13 17:26, Lukasz Skalski (l.skal...@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. Thank you, Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] include: fix problem with __LINE__ macro expansion
Hi On Fri, Nov 22, 2013 at 2:09 PM, Lennart Poettering lenn...@poettering.net wrote: On Thu, 21.11.13 17:26, Lukasz Skalski (l.skal...@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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] include: fix problem with __LINE__ macro expansion
On 11/22/2013 02:46 PM, David Herrmann wrote: Hi Hi, On Fri, Nov 22, 2013 at 2:09 PM, Lennart Poettering lenn...@poettering.net wrote: On Thu, 21.11.13 17:26, Lukasz Skalski (l.skal...@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 Thanks. Solution with XCONCATENATE seems to be more generic than assert___cc(expr,line) macro and can be re-used. BR, -- Lukasz Skalski Samsung RD Institute Poland Samsung Electronics l.skal...@partner.samsung.com ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel