Respect HAVE_ALLOCA_H
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2013-11-13 Anthony Green <green@moxielogic.com>
|
||||||
|
|
||||||
|
* include/ffi_common.h: Respect HAVE_ALLOCA_H for GNU compiler
|
||||||
|
based build. (Thanks to tmr111116 on github)
|
||||||
|
|
||||||
2013-11-09 Anthony Green <green@moxielogic.com>
|
2013-11-09 Anthony Green <green@moxielogic.com>
|
||||||
|
|
||||||
* m4/libtool.m4: Refresh.
|
* m4/libtool.m4: Refresh.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -----------------------------------------------------------------------
|
/* -----------------------------------------------------------------------
|
||||||
ffi_common.h - Copyright (C) 2011, 2012 Anthony Green
|
ffi_common.h - Copyright (C) 2011, 2012, 2013 Anthony Green
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc
|
Copyright (C) 2007 Free Software Foundation, Inc
|
||||||
Copyright (c) 1996 Red Hat, Inc.
|
Copyright (c) 1996 Red Hat, Inc.
|
||||||
|
|
||||||
@@ -19,10 +19,14 @@ extern "C" {
|
|||||||
/* Do not move this. Some versions of AIX are very picky about where
|
/* Do not move this. Some versions of AIX are very picky about where
|
||||||
this is positioned. */
|
this is positioned. */
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
/* mingw64 defines this already in malloc.h. */
|
# if HAVE_ALLOCA_H
|
||||||
#ifndef alloca
|
# include <alloca.h>
|
||||||
# define alloca __builtin_alloca
|
# else
|
||||||
#endif
|
/* mingw64 defines this already in malloc.h. */
|
||||||
|
# ifndef alloca
|
||||||
|
# define alloca __builtin_alloca
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
# define MAYBE_UNUSED __attribute__((__unused__))
|
# define MAYBE_UNUSED __attribute__((__unused__))
|
||||||
#else
|
#else
|
||||||
# define MAYBE_UNUSED
|
# define MAYBE_UNUSED
|
||||||
@@ -30,17 +34,17 @@ extern "C" {
|
|||||||
# include <alloca.h>
|
# include <alloca.h>
|
||||||
# else
|
# else
|
||||||
# ifdef _AIX
|
# ifdef _AIX
|
||||||
#pragma alloca
|
# pragma alloca
|
||||||
# else
|
# else
|
||||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
# define alloca _alloca
|
# define alloca _alloca
|
||||||
# else
|
# else
|
||||||
char *alloca ();
|
char *alloca ();
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check for the existence of memcpy. */
|
/* Check for the existence of memcpy. */
|
||||||
|
|||||||
Reference in New Issue
Block a user