diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-01 16:37:28 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-01 16:37:28 +0300 |
commit | 42f9e9d0e3c73059048934e385074d78a023e6e4 (patch) | |
tree | 9f6342bac8b2339455f75194afb24134f495c707 /libmu_scm | |
parent | 43a43a758881ae1294b73696175bc066e9257aa2 (diff) | |
download | mailutils-42f9e9d0e3c73059048934e385074d78a023e6e4.tar.gz mailutils-42f9e9d0e3c73059048934e385074d78a023e6e4.tar.bz2 |
Fix the use of deprecated Guile interfaces in port code.
* am/guile.m4 (MU_CHECK_GUILE): Check for SCM_DEVAL_P et al.
* libmu_scm/mu_guile.c (mu_guile_init): Protect calls to
SCM_DEVAL_P &c. by #ifdef GUILE_DEBUG_MACROS
* libmu_scm/mu_port.c [!HAVE_SCM_T_OFF](scm_t_off): New typedef.
(mu_port_make_from_stream): Use scm_new_port_table_entry instead
of the deprecated scm_add_to_port_table
Diffstat (limited to 'libmu_scm')
-rw-r--r-- | libmu_scm/mu_guile.c | 2 | ||||
-rw-r--r-- | libmu_scm/mu_port.c | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/libmu_scm/mu_guile.c b/libmu_scm/mu_guile.c index b5cd26175..26dc2a7d4 100644 --- a/libmu_scm/mu_guile.c +++ b/libmu_scm/mu_guile.c @@ -109,10 +109,12 @@ mu_guile_init (int debug) if (debug) { +#ifdef GUILE_DEBUG_MACROS SCM_DEVAL_P = 1; SCM_BACKTRACE_P = 1; SCM_RECORD_POSITIONS_P = 1; SCM_RESET_DEBUG_MODE; +#endif } mu_scm_init (); } diff --git a/libmu_scm/mu_port.c b/libmu_scm/mu_port.c index 8b2906cf6..6f3e4528a 100644 --- a/libmu_scm/mu_port.c +++ b/libmu_scm/mu_port.c @@ -20,6 +20,10 @@ #include "mu_scm.h" #include <mailutils/io.h> +#ifndef HAVE_SCM_T_OFF +typedef off_t scm_t_off; +#endif + struct mu_port { mu_stream_t stream; /* Associated stream */ @@ -87,16 +91,13 @@ mu_port_make_from_stream (SCM msg, mu_stream_t stream, long mode) mp->stream = stream; mp->offset = 0; - port = scm_cell (scm_tc16_smuport | mode, 0); - - pt = scm_add_to_port_table (port); - SCM_SETPTAB_ENTRY (port, pt); + port = scm_new_port_table_entry (scm_tc16_smuport | mode); + pt = SCM_PTAB_ENTRY (port); pt->rw_random = mu_stream_is_seekable (stream); - SCM_SETSTREAM (port, mp); mu_port_alloc_buffer (port, 0, 0); - - /* SCM_PTAB_ENTRY (port)->file_name = "name";FIXME*/ + /* FIXME: + SCM_PTAB_ENTRY (port)->file_name = "name";*/ return port; } |