diff --git a/NEWS b/NEWS index e1f993cb3..ae6c43b96 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,7 @@ would trigger an unbound variable error for `match:andmap'. ** Fixed build issue for GNU/Linux on IA64 ** 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 * Changes to the distribution diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 463bbae79..e43707a85 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,11 @@ +2008-03-02 Ludovic Courtès + + * pairs.h (scm_is_pair): Moved declaration to `inline.h'. + * inline.h: Make sure `extern' declarations are not produced + when `inline' is supported but GCC is not used. This + fixes "mixed linkage" errors with compilers such as + DEC/Compaq/HP CC. + 2008-02-27 Neil Jerram * _scm.h (errno): Remove declarations that have been there diff --git a/libguile/inline.h b/libguile/inline.h index 621b4fb36..a27024bea 100644 --- a/libguile/inline.h +++ b/libguile/inline.h @@ -3,7 +3,7 @@ #ifndef SCM_INLINE_H #define SCM_INLINE_H -/* Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2003, 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 @@ -38,6 +38,13 @@ #include "libguile/pairs.h" +#if ((!defined SCM_C_INLINE) && (!defined SCM_INLINE_C_INCLUDING_INLINE_H)) \ + || (defined __GNUC__) + +/* The `extern' declarations. They should only appear when used from + "inline.c", when `inline' is not supported at all or when GCC's "extern + inline" is used. */ + SCM_API SCM scm_cell (scm_t_bits car, scm_t_bits cdr); SCM_API SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr, scm_t_bits ccr, scm_t_bits cdr); @@ -45,6 +52,10 @@ SCM_API SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr, SCM_API SCM scm_array_handle_ref (scm_t_array_handle *h, ssize_t pos); SCM_API void scm_array_handle_set (scm_t_array_handle *h, ssize_t pos, SCM val); +SCM_API int scm_is_pair (SCM x); + +#endif + #if defined SCM_C_INLINE || defined SCM_INLINE_C_INCLUDING_INLINE_H /* either inlining, or being included from inline.c. We use (and diff --git a/libguile/pairs.h b/libguile/pairs.h index c30f4c564..dd22ff36e 100644 --- a/libguile/pairs.h +++ b/libguile/pairs.h @@ -3,7 +3,7 @@ #ifndef SCM_PAIRS_H #define SCM_PAIRS_H -/* Copyright (C) 1995,1996,2000,2001, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 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 @@ -78,8 +78,6 @@ SCM_API void scm_error_pair_access (SCM); #endif -SCM_API int scm_is_pair (SCM x); - SCM_API SCM scm_cons (SCM x, SCM y); SCM_API SCM scm_cons2 (SCM w, SCM x, SCM y); SCM_API SCM scm_pair_p (SCM x);