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

Andrew Bartlett abartlet at samba.org
Tue May 8 03:08:32 GMT 2007


On Mon, 2007-05-07 at 22:24 -0400, derrell at samba.org wrote:
> Andrew Bartlett <abartlet at samba.org> writes:
> 
> > On Mon, 2007-05-07 at 21:31 -0400, derrell at samba.org wrote:
> >> Andrew Bartlett <abartlet at samba.org> writes:
> >> 
> >> > On Mon, 2007-05-07 at 13:37 -0400, derrell at samba.org 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.
> >> 
> >
> >> 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.
> >
> > Are you saying that no header on your system declares readahead()?
> 
> Exactly.  

What type of system is this?

> > The whole point of the developer build is that issues like this are
> > found and fixed.
> 
> No.  The purpose of that feature (from my point of view -- I don't know who
> put it in or what their intention was) is to ensure that non-declared *SAMBA*
> functions are identified and declared, not to try to fix what may or may not
> be broken systems on which the development is being accomplished.

No, it is to avoid this issue with any function.  Any function used
without a prototype is a dangerous thing.

> On systems that provide declarations for all functions, my change will have no
> effect.  It has an effect only on systems where some system functions are
> missing declarations in system header files.  If you've succeeded in a
> developer build and compile immediately prior to this change, you will still
> succeed with no changes to what configure detects nor to your build.  Only
> those (few?) systems where some functions are missing declarations in system
> headers are affected, and this change allows them to compile in developer
> mode whereas immediately prior to this change, they could not compile.

On such systems, the missing prototypes (after extensive tests are made
for finding the correct prototype header) should be provided by
libreplace, as it already does for many standard functions (for which a
reliable prototype is often found in the POSIX standard).

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.                  http://redhat.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20070508/0fa8230b/attachment.bin


More information about the samba-technical mailing list