Re: [evolution-patches] Re: [Evolution-hackers] Fix forbuilderrorin e-utils



On Tue, 2005-05-03 at 16:18 +0530, Not Zed wrote:
> On Mon, 2005-05-02 at 11:15 +0100, Philip Van Hoof wrote:  
> > On Mon, 2005-05-02 at 14:56 +0530, Not Zed wrote:
> > 
> > > Hmm, why does this not  build?
> > 
> > > It is like that very speficially so that all of the profiling code can
> > > be completely removed from the compilation, rather than just calling a
> > > dummy function.
> > > 
> > > Any fix should maintain this behaviour, so this one isn't suitable.
> > 
> > As a gcc 4.0 user the line in the c-file is giving me a syntax error. In
> > the c-file it isn't showing an incorrect syntax whatsoever. 
> Any chance of dumping the whole error here?

It's not a GCC 4.x specific error. The problem is that the header is
just wrong. If you are compiling without ENABLE_PROFILE defined, then
the method becomes a macro in the header, rather than a symbol. However,
the method in the C file still exists, though it is a no-op.

> > Wouldn't it then be better to wrap the entire function in the #ifdef-
> > #endif clause and wrap the line where the function is called with it
> > too?
> > 
> > In which case the function isn't compiled if profiling isn't enabled. As
> > will the calls to that function also not be compiled.
> This isn't acceptable.  We plan to put in potentially hundreds of
> these calls, and wrapping every one in a #ifdef#endif is just not
> going to cut it!

Right. Philip's patch removed the whole bit of the #ifdef section in
the header, which also removes the prototype. We need to keep the
prototype, but dump the macro, otherwise we will be changing ABI
depending on compile-time options. I've already committed a fix for this
to CVS, as it was preventing me from building Evolution. The prototype
is still there, but the macro is gone. There's not reason to define a
macro instead, really, unless there is some performance reason that I
don't know about. If there is, feel free to re-introduce the macro, and
move the #ifdef/#endif section in the actual code, to include the entire
method, and not just the calls inside of it.

-- dobey


_______________________________________________
evolution-hackers maillist  -  evolution-hackers lists ximian com
http://lists.ximian.com/mailman/listinfo/evolution-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]