mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-11 22:24:42 +00:00
guile: Allow compilation with Guile <= 2.0.5.
gdb/ 2014-06-01 Ludovic Courtès <ludo@gnu.org> * configure.ac: When Guile is available, check for the availability of 'scm_new_smob'. * configure, config.h.in: Regenerate. * guile/guile-internal.h (scm_new_smob) [!HAVE_SCM_NEW_SMOB]: New function.
This commit is contained in:
parent
f69123aac5
commit
16954d5d9d
@ -1,3 +1,11 @@
|
||||
2014-06-01 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
* configure.ac: When Guile is available, check for the
|
||||
availability of 'scm_new_smob'.
|
||||
* configure, config.h.in: Regenerate.
|
||||
* guile/guile-internal.h (scm_new_smob) [!HAVE_SCM_NEW_SMOB]: New
|
||||
function.
|
||||
|
||||
2014-05-30 Andrew Burgess <aburgess@broadcom.com>
|
||||
|
||||
* frame.c (struct frame_info): Add stop_string field.
|
||||
|
@ -342,6 +342,9 @@
|
||||
/* Define to 1 if you have the `sbrk' function. */
|
||||
#undef HAVE_SBRK
|
||||
|
||||
/* Define to 1 if you have the `scm_new_smob' function. */
|
||||
#undef HAVE_SCM_NEW_SMOB
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
|
18
gdb/configure
vendored
18
gdb/configure
vendored
@ -9076,6 +9076,24 @@ $as_echo "#define HAVE_GUILE 1" >>confdefs.h
|
||||
CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
|
||||
CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
|
||||
ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
|
||||
|
||||
save_LIBS="$LIBS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
LIBS="$GUILE_LIBS"
|
||||
CPPFLAGS="$GUILE_CPPFLAGS"
|
||||
for ac_func in scm_new_smob
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
|
||||
if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_SCM_NEW_SMOB 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
else
|
||||
# Even if Guile support is not compiled in, we need to have these files
|
||||
# included.
|
||||
|
@ -1200,6 +1200,15 @@ if test "${have_libguile}" != no; then
|
||||
CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
|
||||
CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
|
||||
ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
|
||||
|
||||
dnl The 'scm_new_smob' function appeared in Guile 2.0.6.
|
||||
save_LIBS="$LIBS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
LIBS="$GUILE_LIBS"
|
||||
CPPFLAGS="$GUILE_CPPFLAGS"
|
||||
AC_CHECK_FUNCS([scm_new_smob])
|
||||
LIBS="$save_LIBS"
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
else
|
||||
# Even if Guile support is not compiled in, we need to have these files
|
||||
# included.
|
||||
|
@ -97,6 +97,18 @@ typedef struct
|
||||
#define gdbscm_is_false(scm) scm_is_eq ((scm), SCM_BOOL_F)
|
||||
#define gdbscm_is_true(scm) (!gdbscm_is_false (scm))
|
||||
|
||||
#ifndef HAVE_SCM_NEW_SMOB
|
||||
|
||||
/* Guile <= 2.0.5 did not provide this function, so provide it here. */
|
||||
|
||||
static inline SCM
|
||||
scm_new_smob (scm_t_bits tc, scm_t_bits data)
|
||||
{
|
||||
SCM_RETURN_NEWSMOB (tc, data);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Function name that is passed around in case an error needs to be reported.
|
||||
__func is in C99, but we provide a wrapper "just in case",
|
||||
and because FUNC_NAME is the canonical value used in guile sources.
|
||||
|
Loading…
Reference in New Issue
Block a user