From: Lawrence Mitchell <wence@gmx.li>
To: bug-gnu-emacs@gnu.org
Subject: bug#6170: 24.0.50; Compiling on solaris2.10 with gcc doesn't define alloca
Date: Mon, 31 May 2010 17:42:34 +0100 [thread overview]
Message-ID: <pvhpk4qkc9ad.fsf@gmx.li> (raw)
In-Reply-To: <pvhpbpcmk8oi.fsf@ed.ac.uk>
Dan Nicolaescu wrote:
> Lawrence Mitchell <wence@gmx.li> writes:
>> On this system, <stdlib.h> is provided by Sun and therefore
>> doesn't define alloca, unlike on a typical GNU/linux system where
>> <stdlib.h> contains the following:
>> | #if defined __USE_GNU || defined __USE_BSD || defined __USE_MISC
>> | # include <alloca.h>
>> | #endif /* Use GNU, BSD, or misc. */
>> When compiling emacs with gcc, alloca is therefore undefined.
>> The culprit is this snippet in configure.in:
>> | #ifndef __GNUC__
>> | # ifdef HAVE_ALLOCA_H
>> | # include <alloca.h>
>> | # else /* AIX files deal with #pragma. */
>> | # ifndef alloca /* predefined by HP cc +Olibcalls */
>> | char *alloca ();
>> | # endif
>> | # endif /* HAVE_ALLOCA_H */
>> | #endif /* __GNUC__ */
> "info autoconf" says that this is the proper way to do it:
> #ifdef 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
> Not sure we need the last #else part, or the _MSC_VER part...
Is there any movement on getting this fix, or something like it,
installed? It doesn't seem like a controversial change.
Cheers,
Lawrence
--
Lawrence Mitchell <wence@gmx.li>
next prev parent reply other threads:[~2010-05-31 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-11 10:57 bug#6170: 24.0.50; Compiling on solaris2.10 with gcc doesn't define alloca Lawrence Mitchell
2010-05-12 18:29 ` Dan Nicolaescu
2010-05-31 16:42 ` Lawrence Mitchell [this message]
2010-06-02 9:24 ` Dan Nicolaescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pvhpk4qkc9ad.fsf@gmx.li \
--to=wence@gmx.li \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.