[Bug 89762] xf86-video-intel-2.99.917 should check for <alloca.h> being needed

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 25 07:09:12 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=89762

--- Comment #2 from Richard PALO <richard at netbsd.org> ---
!wow. thanks guys... 
just noticed the following as well here:
https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/Particular-Functions.html

— Macro: AC_FUNC_ALLOCA

    Check how to get alloca. Tries to get a builtin version by checking for
alloca.h or the predefined C preprocessor macros __GNUC__ and _AIX. If this
macro finds alloca.h, it defines HAVE_ALLOCA_H.

    If those attempts fail, it looks for the function in the standard C
library. If any of those methods succeed, it defines HAVE_ALLOCA. Otherwise, it
sets the output variable ALLOCA to ‘${LIBOBJDIR}alloca.o’ and defines C_ALLOCA
(so programs can periodically call ‘alloca (0)’ to garbage collect). This
variable is separate from LIBOBJS so multiple programs can share the value of
ALLOCA without needing to create an actual library, in case only some of them
use the code in LIBOBJS. The ‘${LIBOBJDIR}’ prefix serves the same purpose as
in LIBOBJS (see AC_LIBOBJ vs LIBOBJS).

    This macro does not try to get alloca from the System V R3 libPW or the
System V R4 libucb because those libraries contain some incompatible functions
that cause trouble. Some versions do not even contain alloca or contain a buggy
version. If you still want to use their alloca, use ar to extract alloca.o from
them instead of compiling alloca.c.

    Source files that use alloca should start with a piece of code like the
following, to declare it properly.

              #if HAVE_ALLOCA_H
              # include <alloca.h>
              #elif defined __GNUC__
              # define alloca __builtin_alloca
              #elif defined _AIX
              # define alloca __alloca
              #elif defined _MSC_VER
              # include <malloc.h>
              # define alloca _alloca
              #else
              # include <stddef.h>
              # ifdef  __cplusplus
              extern "C"
              # endif
              void *alloca (size_t);
              #endif

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20150325/181e64f4/attachment.html>


More information about the intel-gfx-bugs mailing list