gnu89_inline=yes, gnu89_inline=no)
AC_MSG_RESULT($gnu89_inline)
CFLAGS="$_gcc_cflags_save"
+
+ # Optional Guile functions.
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GUILE_CFLAGS"
+ LIBS="$LIBS $GUILE_LDFLAGS"
+ AC_CHECK_FUNCS([scm_gc_malloc_pointerless])
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
else
AC_MSG_RESULT([no])
AC_MSG_WARN([A sufficiently recent GNU Guile not found. Guile bindings not built.])
static const char session_record_port_gc_hint[] =
"gnutls-session-record-port";
+
+#if SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8
+
/* Mark the session associated with PORT. */
static SCM
mark_session_record_port (SCM port)
return 0;
}
-
#undef FUNC_NAME
+#endif /* SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8 */
+
+
/* Data passed to `do_fill_port ()'. */
typedef struct
{
c_port_buf =
(unsigned char *)
- scm_gc_malloc (SCM_GNUTLS_SESSION_RECORD_PORT_BUFFER_SIZE,
+#ifdef HAVE_SCM_GC_MALLOC_POINTERLESS
+ scm_gc_malloc_pointerless
+#else
+ scm_gc_malloc
+#endif
+ (SCM_GNUTLS_SESSION_RECORD_PORT_BUFFER_SIZE,
session_record_port_gc_hint);
/* Create a new port. */
scm_make_port_type ("gnutls-session-port",
fill_session_record_port_input,
write_to_session_record_port);
+
+ /* Guile >= 1.9.3 doesn't need a custom mark procedure, and doesn't need a
+ finalizer (since memory associated with the port is automatically
+ reclaimed.) */
+#if SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8
scm_set_port_mark (session_record_port_type, mark_session_record_port);
scm_set_port_free (session_record_port_type, free_session_record_port);
+#endif
}
\f