annotate m4/alloca.m4 @ 40229:6abc91ece034

alloca-opt: Fix conflict mingw's new <alloca.h> file. Reported by Eli Zaretskii <eliz@gnu.org>. * lib/alloca.in.h: On mingw systems that have <alloca.h>, include that. * m4/alloca.m4 (gl_FUNC_ALLOCA): Set HAVE_ALLOCA_H. * modules/alloca-opt (Makefile.am): Substitute HAVE_ALLOCA_H.
author Bruno Haible <bruno@clisp.org>
date Sun, 10 Mar 2019 20:39:34 +0100
parents b06060465f09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40229
6abc91ece034 alloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
1 # alloca.m4 serial 15
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19484
diff changeset
2 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2019 Free Software Foundation,
12559
c2cbabec01dd update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents: 11007
diff changeset
3 dnl Inc.
5611
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5063
diff changeset
4 dnl This file is free software; the Free Software Foundation
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5063
diff changeset
5 dnl gives unlimited permission to copy and/or distribute it,
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5063
diff changeset
6 dnl with or without modifications, as long as this notice is preserved.
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 AC_DEFUN([gl_FUNC_ALLOCA],
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 [
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 AC_REQUIRE([AC_FUNC_ALLOCA])
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 if test $ac_cv_func_alloca_works = no; then
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 gl_PREREQ_ALLOCA
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 fi
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
14
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
15 # Define an additional variable used in the Makefile substitution.
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
16 if test $ac_cv_working_alloca_h = yes; then
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
17 AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
18 AC_EGREP_CPP([Need own alloca], [
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
19 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
20 Need own alloca
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
21 #endif
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
22 ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
23 ])
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
24 if test $gl_cv_rpl_alloca = yes; then
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
25 dnl OK, alloca can be implemented through a compiler built-in.
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9592
diff changeset
26 AC_DEFINE([HAVE_ALLOCA], [1],
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
27 [Define to 1 if you have 'alloca' after including <alloca.h>,
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
28 a header that may be supplied by this distribution.])
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
29 ALLOCA_H=alloca.h
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
30 else
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
31 dnl alloca exists as a library function, i.e. it is slow and probably
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
32 dnl a memory leak. Don't define HAVE_ALLOCA in this case.
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
33 ALLOCA_H=
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
34 fi
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
35 else
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
36 ALLOCA_H=alloca.h
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
37 fi
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
38 AC_SUBST([ALLOCA_H])
14528
662ae53d8d37 Remove leftover generated .h files after config.status changed.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
39 AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
40229
6abc91ece034 alloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
40
6abc91ece034 alloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
41 if test $ac_cv_working_alloca_h = yes; then
6abc91ece034 alloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
42 HAVE_ALLOCA_H=1
6abc91ece034 alloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
43 else
6abc91ece034 alloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
44 HAVE_ALLOCA_H=0
6abc91ece034 alloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
45 fi
6abc91ece034 alloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
46 AC_SUBST([HAVE_ALLOCA_H])
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 ])
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 # Prerequisites of lib/alloca.c.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
4631
069117fb861f Remove K&R cruft.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4334
diff changeset
51 AC_DEFUN([gl_PREREQ_ALLOCA], [:])
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
52
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
53 # This works around a bug in autoconf <= 2.68.
19439
8bfc20b57265 maint: shorten https://lists.gnu.org/archive/html/... links
Jim Meyering <meyering@fb.com>
parents: 19192
diff changeset
54 # See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html>.
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
55
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
56 m4_version_prereq([2.69], [] ,[
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
57
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
58 # This is taken from the following Autoconf patch:
19192
d86e08b1f555 all: Replace many more http URLs by https URLs. Update stale URLs.
Bruno Haible <bruno@clisp.org>
parents: 18626
diff changeset
59 # https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
60
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
61 # _AC_LIBOBJ_ALLOCA
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
62 # -----------------
16235
18a38c9615f0 In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents: 16234
diff changeset
63 # Set up the LIBOBJ replacement of 'alloca'. Well, not exactly
18a38c9615f0 In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents: 16234
diff changeset
64 # AC_LIBOBJ since we actually set the output variable 'ALLOCA'.
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
65 # Nevertheless, for Automake, AC_LIBSOURCES it.
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
66 m4_define([_AC_LIBOBJ_ALLOCA],
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
67 [# The SVR3 libPW and SVR4 libucb both contain incompatible functions
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
68 # that cause trouble. Some versions do not even contain alloca or
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
69 # contain a buggy version. If you still want to use their alloca,
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
70 # use ar to extract alloca.o from them instead of compiling alloca.c.
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
71 AC_LIBSOURCES(alloca.c)
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
72 AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
16234
f9b906545e2f Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
73 AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
74
16234
f9b906545e2f Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
75 AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
76 [AC_EGREP_CPP(webecray,
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
77 [#if defined CRAY && ! defined CRAY2
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
78 webecray
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
79 #else
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
80 wenotbecray
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
81 #endif
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
82 ], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
83 if test $ac_cv_os_cray = yes; then
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
84 for ac_func in _getb67 GETB67 getb67; do
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
85 AC_CHECK_FUNC($ac_func,
15338
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
86 [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
16234
f9b906545e2f Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
87 [Define to one of '_getb67', 'GETB67',
f9b906545e2f Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
88 'getb67' for Cray-2 and Cray-YMP
15338
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
89 systems. This function is required for
16234
f9b906545e2f Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
90 'alloca.c' support on those systems.])
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
91 break])
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
92 done
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
93 fi
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
94
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
95 AC_CACHE_CHECK([stack direction for C alloca],
15338
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
96 [ac_cv_c_stack_direction],
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
97 [AC_RUN_IFELSE([AC_LANG_SOURCE(
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
98 [AC_INCLUDES_DEFAULT
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
99 int
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
100 find_stack_direction (int *addr, int depth)
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
101 {
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
102 int dir, dummy = 0;
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
103 if (! addr)
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
104 addr = &dummy;
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
105 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
106 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
107 return dir + dummy;
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
108 }
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
109
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
110 int
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
111 main (int argc, char **argv)
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
112 {
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
113 return find_stack_direction (0, argc + !argv + 20) < 0;
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
114 }])],
15338
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
115 [ac_cv_c_stack_direction=1],
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
116 [ac_cv_c_stack_direction=-1],
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
117 [ac_cv_c_stack_direction=0])])
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
118 AH_VERBATIM([STACK_DIRECTION],
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
119 [/* If using the C implementation of alloca, define if you know the
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
120 direction of stack growth for your system; otherwise it will be
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
121 automatically deduced at runtime.
15338
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
122 STACK_DIRECTION > 0 => grows toward higher addresses
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
123 STACK_DIRECTION < 0 => grows toward lower addresses
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15304
diff changeset
124 STACK_DIRECTION = 0 => direction of growth unknown */
15304
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
125 @%:@undef STACK_DIRECTION])dnl
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
126 AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
127 ])# _AC_LIBOBJ_ALLOCA
578f64214a48 alloca: port to compilers that can optimize like GCC 4.6.0
Paul Eggert <eggert@cs.ucla.edu>
parents: 14528
diff changeset
128 ])