[prev in list] [next in list] [prev in thread] [next in thread] 

List:       autoconf
Subject:    obsolete AC_FUNC_ALLOCA docs?
From:       "Steven G. Johnson" <stevenj () ab-initio ! mit ! edu>
Date:       2003-03-28 8:22:46
Message-ID: Pine.LNX.4.21.0303280315250.5568-100000 () ab-initio ! mit ! edu
[Download RAW message or body]

The autoconf documentation for AC_FUNC_ALLOCA seems to be out of sync with
the source code.  I assume this is a bug?

The manual says that you should include the following in your code:

#ifndef __GNUC__
# if HAVE_ALLOCA_H
#  include <alloca.h>
# else
#  ifdef _AIX
 #pragma alloca
#  else
#   ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#   endif
#  endif
# endif
#endif

Whereas the AC_FUNC_ALLOCA macro actually uses the following, which
is clearly more general:

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif


If this is indeed the bug it seems to be, of course, the documentation
patch is trivial.  There should probably also be a comment in the source
code reminding people to update the manual if they change the source.

Cordially,
Steven G. Johnson

PS. What happened to the bug-autoconf list?  It isn't mentioned on the web
page any more.





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic