Sun Nov 18 09:07:38, Michael Natterer: > On Sun, 2007-11-18 at 13:29 +0100, Hans Breuer wrote: > > The recently added GIMP_LOG macro does not compile on win32/msvc6. > > [...] > > It would be nice if the GIMP_LOG facility could be modified to follow the > pattern given by GDK_NOTE [2] to not exclude all pre-C99 compilers. > Nope, GDK_NOTE() is ugly ;) I changed it to how g_message() and > friends do it. Can you check if this compiles fine now? Thanks for the fast answer and sorry for me being slow. Apparently I was bounced away from gimp-developer list. With the current approach I'm getting : cl -G5 -Zi -MD -W3 -nologo -Zi -FImsvc_recommended_pragmas.h -I..\.. -I..\../app -I ..\..\..\glib -I ..\..\..\glib\glib -I ..\..\..\glib\gmodule -I d:\devel\my-gtk\other\intl-tml -I ..\..\../atk -I..\..\../gtk+\gdk -I..\..\../gtk+\gdk -I..\..\../gtk+ -I..\..\../pango -I..\..\../atk -I d:\devel\my-gtk\cairo\cairo-1.4.8\src -I d:\devel\my-gtk\cairo\cairo-1.4.8 -DG_LOG_DOMAIN=\"Gimp-Dialog\" -GD -c file-save-dialog.c file-save-dialog.c file-save-dialog.c(222) : error C2065: 'SAVE_DIALOG' : undeclared identifier file-save-dialog.c(222) : error C4047: 'function' : 'const char *' differs in levels of indirection from 'int ' file-save-dialog.c(222) : warning C4024: 'GIMP_LOG' : different types for formal and actual parameter 1 file-save-dialog.c(222) : error C4047: 'function' : 'int ' differs in levels of indirection from 'char [32]' file-save-dialog.c(222) : warning C4024: 'GIMP_LOG' : different types for formal and actual parameter 2 file-save-dialog.c(222) : error C2198: 'GIMP_LOG' : too few actual parameters The expansion of GIMP_LOG (SAVE_DIALOG, ...) still depends on the preprocessor so just making GIMP_LOG a function does not work. The ugly (but working;)) thing with something like GDK_NOTE (DRAW, g_print (" +%d+%d..+%d+%d", x1, y1, x2, y2)); is the fixed number of parameters combined with the macro expansion of the key. Currently I can't think of a solution giving both at the same time without variadic macros or at least grouping the parameters from 2 to n within their own braces. But maybe there is another way? Thanks, Hans -------- Hans "at" Breuer "dot" Org ----------- Tell me what you need, and I'll tell you how to get along without it. -- Dilbert _______________________________________________ Gimp-developer mailing list Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer