Dustin J. Mitchell --> amanda-users (2008-06-27 13:56:06 -0400):
> On Thu, Jun 26, 2008 at 11:34 AM, Jukka Salmi <[EMAIL PROTECTED]> wrote:
> > This is on NetBSD/i386 where at least fcntl, flock and lockf are
> > available; config.log reveals that the record locking function tests
> > failed because HAVE_ALLOCA_H was defined but there's no alloca.h on
> > my system.
> 
> We had a bit of this sort of trouble in 2.5.2, and the code has been
> re-worked in 2.6.0.  I imagine that some rather rough edits to the
> source  (removing #include <alloca.h> from amanda.h) will fix the
> problem.

I'm not familiar with the autotools and with m4, but AFAICT the source
of this problem is in config/gnulib/alloca.m4. The resulting `configure'
script unconditionally defines HAVE_ALLOCA_H which is obviously wrong.
Removing that part (see attached patch) fixes the problem for me:

[...]
checking for working alloca.h... no
checking for alloca... yes
[...]
checking whether posix fcntl locking works... yes
[...]

This code seems to be in 2.6 as well.


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
--- config/gnulib/alloca.m4.orig        2007-05-04 13:39:05.000000000 +0200
+++ config/gnulib/alloca.m4     2008-06-28 19:00:37.000000000 +0200
@@ -39,10 +39,6 @@ AC_DEFUN([gl_FUNC_ALLOCA],
     ALLOCA_H=alloca.h
   fi
   AC_SUBST([ALLOCA_H])
-
-  AC_DEFINE(HAVE_ALLOCA_H, 1,
-    [Define HAVE_ALLOCA_H for backward compatibility with older code
-     that includes <alloca.h> only if HAVE_ALLOCA_H is defined.])
 ])
 
 # Prerequisites of lib/alloca.c.
--- configure.orig      2007-06-07 01:22:45.000000000 +0200
+++ configure   2008-06-28 19:02:47.000000000 +0200
@@ -8174,9 +8174,6 @@ _ACEOF
 
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
 
 
 

Reply via email to