Project

General

Profile

Bug #7307 ยป alloca.diff

knu (Akinori MUSHA), 11/08/2012 03:14 PM

View differences:

ChangeLog (working copy)
Thu Nov 8 14:50:03 2012 Akinori MUSHA <knu@iDaemons.org>
* include/ruby/ruby.h (alloca), eval_intern.h, gc.c: Make alloca
universally work by placing the ultimate ifdef's in ruby/ruby.h.
Gcc hides its builtin alloca() when -ansi is given, and build
thus fails on platforms that lack their own alloca()
implementation in libc, such as OpenBSD and some ports of
NetBSD.
* addr2line.c (alloca): Place the ultimate ifdef's for alloca.
Thu Nov 8 11:32:11 2012 Akinori MUSHA <knu@iDaemons.org>
* configure.in (--with-opt-dir): Avoid nesting of double quotes
addr2line.c (working copy)
#include <sys/stat.h>
#include <unistd.h>
#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
#endif
/* Make alloca work the best possible way. */
#ifdef __GNUC__
# ifndef atarist
# ifndef alloca
# define alloca __builtin_alloca
# endif
# endif /* atarist */
#else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
void *alloca();
# endif
# endif /* AIX */
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */
#ifdef HAVE_DL_ITERATE_PHDR
# ifndef _GNU_SOURCE
eval_intern.h (working copy)
#include <crt_externs.h>
#endif
/* Make alloca work the best possible way. */
#ifdef __GNUC__
# ifndef atarist
# ifndef alloca
# define alloca __builtin_alloca
# endif
# endif /* atarist */
#else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
void *alloca();
# endif
# endif /* AIX */
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */
#ifndef HAVE_STRING_H
char *strrchr(const char *, const char);
#endif
gc.c (working copy)
#define rb_setjmp(env) RUBY_SETJMP(env)
#define rb_jmp_buf rb_jmpbuf_t
/* Make alloca work the best possible way. */
#ifdef __GNUC__
# ifndef atarist
# ifndef alloca
# define alloca __builtin_alloca
# endif
# endif /* atarist */
#else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
void *alloca ();
# endif
# endif /* AIX */
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */
#ifndef GC_MALLOC_LIMIT
#define GC_MALLOC_LIMIT 8000000
#endif
include/ruby/ruby.h (working copy)
#pragma GCC visibility push(default)
#endif
#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
/* Make alloca work the best possible way. */
#ifdef __GNUC__
# ifndef atarist
# ifndef alloca
# define alloca __builtin_alloca
# endif
# endif /* atarist */
#else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# endif
#endif
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
void *alloca();
# endif
# endif /* AIX */
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */
#if defined HAVE_UINTPTR_T && 0
typedef uintptr_t VALUE;
    (1-1/1)