Alexandre Julliard a écrit :
Module: wine Branch: master Commit: 51dfd9adb11885daec878737f18f89fb05c1516c URL: http://source.winehq.org/git/wine.git/?a=commit;h=51dfd9adb11885daec878737f1...
Author: Francois Gouget fgouget@free.fr Date: Sat Mar 27 16:55:27 2010 +0100
winedbg: Fix compilation with gcc 2.95 and non-GNU compilers.
François, what was the exact issue here ? I guess that the ; at the end of the attribute definition for GNUCC compiler was missing for the non gnu C compilers ? your fix is wrong as dbg_printf doesn't take a va_list as argument (you'd want dbg_vprintf which doesn't exist) does the attached patch work in your configuration ?
A+
On Sat, 17 Apr 2010, Eric Pouech wrote: [...]
winedbg: Fix compilation with gcc 2.95 and non-GNU compilers.
François, what was the exact issue here ? I guess that the ; at the end of the attribute definition for GNUCC compiler was missing for the non gnu C compilers ?
There were two problems: * the semi-colon was missing for non-GNUC compilers as you mentioned * gcc 2.95 does not support __attribute__() on function pointers
Unfortunately your patch does not fix the second issue. A solution that would not require dbg_vprintf() would be to check the gcc version before trying to use __attribute__().
Francois Gouget a écrit :
There were two problems:
- the semi-colon was missing for non-GNUC compilers as you mentioned
- gcc 2.95 does not support __attribute__() on function pointers
Unfortunately your patch does not fix the second issue. A solution that would not require dbg_vprintf() would be to check the gcc version before trying to use __attribute__().
does the attached patch works better ? (I tried your suggestion starting at gcc 3.0) A+
On Wed, 21 Apr 2010, Eric Pouech wrote:
Francois Gouget a écrit :
There were two problems:
- the semi-colon was missing for non-GNUC compilers as you mentioned
- gcc 2.95 does not support __attribute__() on function pointers
Unfortunately your patch does not fix the second issue. A solution that would not require dbg_vprintf() would be to check the gcc version before trying to use __attribute__().
[...]
does the attached patch works better ? (I tried your suggestion starting at gcc 3.0)
Yes, that works. It means that we won't get the benefit of printf format checking on gcc 2.95 but that does not matter since pretty much everyone will do these checks already. And your patch is simpler than mine (and more importantly works).