diff --git a/NEWS b/NEWS index c6e30762e..eef9ca2ac 100644 --- a/NEWS +++ b/NEWS @@ -20,7 +20,8 @@ would trigger an unbound variable error for `match:andmap'. ** Fixed build issues on NetBSD 1.6 ** Fixed build issue on Solaris 2.10 x86_64 ** Fixed build issue with DEC/Compaq/HP's compiler -** Fixed scm_from_complex_double build issue on FreeBSD +** Fixed `scm_from_complex_double' build issue on FreeBSD +** Fixed `alloca' build issue on FreeBSD 6 * Changes to the distribution diff --git a/libguile/ChangeLog b/libguile/ChangeLog index c85b5ca8e..c9bc110df 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,9 @@ +2008-03-10 Ludovic Courtès + + * eval.c, filesys.c: Enclose `alloca' blob in `#ifndef alloca', + as per Gnulib's `alloca'. This should fix compilation on + FreeBSD 6. + 2008-03-09 Neil Jerram * numbers.c: Only define scm_from_complex_double if it will diff --git a/libguile/eval.c b/libguile/eval.c index 4faf5bf90..be100acf4 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -37,22 +37,25 @@ #ifndef DEVAL -/* This blob per the Autoconf manual (under "Particular Functions"). */ -#if HAVE_ALLOCA_H -# include -#elif defined __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#elif defined _MSC_VER -# include -# define alloca _alloca -#else -# include -# ifdef __cplusplus +/* This blob per the Autoconf manual (under "Particular Functions"), updated + to match that of Gnulib. */ +#ifndef alloca +# if HAVE_ALLOCA_H +# include +# elif defined __GNUC__ +# define alloca __builtin_alloca +# elif defined _AIX +# define alloca __alloca +# elif defined _MSC_VER +# include +# define alloca _alloca +# else +# include +# ifdef __cplusplus extern "C" -# endif +# endif void *alloca (size_t); +# endif #endif #include diff --git a/libguile/filesys.c b/libguile/filesys.c index 1798bb698..c3cc70c97 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,22 +29,25 @@ # include #endif -/* This blob per the Autoconf manual (under "Particular Functions"). */ -#if HAVE_ALLOCA_H -# include -#elif defined __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#elif defined _MSC_VER -# include -# define alloca _alloca -#else -# include -# ifdef __cplusplus +/* This blob per the Autoconf manual (under "Particular Functions"), updated + to match that of Gnulib. */ +#ifndef alloca +# if HAVE_ALLOCA_H +# include +# elif defined __GNUC__ +# define alloca __builtin_alloca +# elif defined _AIX +# define alloca __alloca +# elif defined _MSC_VER +# include +# define alloca _alloca +# else +# include +# ifdef __cplusplus extern "C" -# endif +# endif void *alloca (size_t); +# endif #endif #include