Created attachment 2436 [details] gtk2-Adjust-debug_printf-to-invoke-debug_print_real-only-.patch There is no need to call debug_print_real twice. The fmt string can be concatenated by the preprocessor, and further optional arguments referenced via __VA_ARGS__. This bug depends on changes provided in bug#4751,bug#4752 and bug#4753.
Created attachment 2437 [details] master-Adjust-debug_printf-to-invoke-debug_print_real-only-.patch
(In reply to olaf from comment #0) > This bug depends on changes provided in bug#4751,bug#4752 and bug#4753. Please provide just one patch for master, all of the above and this one in just one. Thanks. Also, if the changes can just be git cherry-picked into the gtk2 branch, then there is no need for 2 patches. Patches for the gtk2 branch are only needed if cherry-picking is not possible.
How broadly have you tested this patch set? The details escape me, but I remember adding the HAVE_VA_OPT check for compatibility with a supported platform. Something lacked support for the ', ## __VA_ARGS__' gcc extension. It was probably an old CentOS/gcc, but maybe a different OS with clang.
Is there actually a list of supported platforms? The new glib 2.50 requirement certainly raised the bar. glib uses 'asm', which means one needs a compiler which understands at least '-std=gnu90'. Newer glib versions require a C99 capable compiler. I have not checked which version made this mandatory. Likely 2.52, there are comments in commits around 1f33b36cd14b4993dc06d8c0726a3dcf55fd140a. "Recent" libetpan versions (1.1+) use the 'inline' keyword, which is a C99 feature AFAIK. Maybe '-std=gnu90' includes support for that already. I expected a -std= knob in the openSUSE 12.2 libetpan 1.1 and/or Claws Mail 3.8.1 package, but for some reason both compiled fine without it at that time. In other words: a C99 capable compiler will likely understand __VA_ARGS_.