svn commit: samba r22731 - in branches/SAMBA_3_0/source: . tests

derrell at derrell at
Tue May 8 01:31:11 GMT 2007

Andrew Bartlett <abartlet at> writes:

> On Mon, 2007-05-07 at 13:37 -0400, derrell at wrote:
>> By
>> consistently testing for and using the warnings-are-errors flag, the problem
>> is eliminated.  During a developer build, readahead() is found to _not_ exist
>> so the compilation works fine.  During a production build, readahead() is
>> found to exist and the compilation works fine since it doesn't use the
>> warnings-are-errors flag.
> This sounds like a disaster!
> We shouldn't be gaining or loosing features just because we are in a
> developer build.  That way leads to madness, particularly if a user or
> developer encounters a problem, then rebuilds with --enable-developer to
> trace it down.

I'm open to suggestions.  Prior to this change, I couldn't do a developer
build.  Configure determined that readahead() was available, and the compile
failed because readahead() didn't have an external declaration.  Although the
problem occurred on my system in regards to readahead(), it is actually a
generic issue (it could be any function that is missing an external
declaration) and I fixed it in what should be a generic fashion.

Maybe the correct solution is to NOT use -Werror-implicit-function-declaration
for the compilation if --enable-developer is specified, but rather to have to
specifically request it, e.g. via something like
--enable-error-implicit-function-declaration.  That way, when one wants to
look for missing declarations, one can enable that feature.  When not, the
current problem goes away.

IMO, it's worthwhile for developer builds to error upon missing declaration so
I prefer the existing implementation which enables it for all developer
builds.  It should not, however, be enabled at the expense of not being able
to do a compile with a developer build.




More information about the samba-technical mailing list