r22731: - Fix bug #4594.
authorDerrell Lipman <derrell@samba.org>
Mon, 7 May 2007 03:02:24 +0000 (03:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:21:51 +0000 (12:21 -0500)
commit3a9a3ad8f9ead7ec963103f8ee0fe905f3982913
tree507297ba3aecd60d0700474e68a4d099e45d97e9
parent63456681daa853174c42eaaa5a8d330d27c18383
r22731: - Fix bug #4594.

  configure.in determines if -Werror-implicit-function-declaration is
  available, and if so it enables that flag if --enable-developer is
  specified.  Since the configure tests themselves did not use that flag, it
  was possible for a configure test to succeed, followed by a failed
  compilation due to a facility being available but not having a proper
  declaration in a header file.  (This bit me with readahead().)  This patch
  ensures that if implicit function declarations will kill the build, the
  feature being tested is deselected so the build will succeed.

  The autoconf manual suggests using return instead of exit in configure
  tests because the declaration for exit is often missing.  We require this
  now, since we error if prototypes are missing.  See section 5.5.1 of
  http://www.gnu.org/software/autoconf/manual/autoconf.html.  This patch makes
  these changes, because in fact, an external declaration for exit is missing
  here (and likely elsewhere).

  I've verified that the features selected (here) with the original
  configure.in and the new one are the same except for, in my case,
  readahead.  I've also confirmed that the generated Makefile is identical.

  These changes are not being applied to the 3.0.26 branch because it does not
  exhibit the initial problem this patch is supposed to solve since it doesn't
  attempt to use -Werror-implicit-function-declaration.
(This used to be commit 4d42720915b8f65842147171f689127e94d1b973)
source3/configure.in
source3/tests/crypttest.c
source3/tests/fcntl_lock.c
source3/tests/fcntl_lock64.c
source3/tests/ftruncate.c
source3/tests/getgroups.c
source3/tests/shared_mmap.c
source3/tests/summary.c
source3/tests/trivial.c
source3/tests/unixsock.c