summaryrefslogtreecommitdiff
path: root/libguile/filesys.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-08-10 14:08:02 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-08-10 14:08:02 +0000
commit7f9994d90437cfdaf6d733b9c3b050d66326f3bb (patch)
tree8f3e66daaf6b5651e0ebf9988b2083de548308cc /libguile/filesys.c
parent02573e4c7a10dee980618c93f4902887b225433c (diff)
downloadguile-7f9994d90437cfdaf6d733b9c3b050d66326f3bb.tar.gz
* stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c: Replaced uses of SCM_STRING_CHARS with proper uses of scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string. Replaced scm_mem2string with scm_from_locale_string. * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c): Removed, replaced all uses with scm_i_allocate_string_pointers.
Diffstat (limited to 'libguile/filesys.c')
-rw-r--r--libguile/filesys.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 29c86883e..459f5530c 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -610,18 +610,17 @@ SCM_DEFINE (scm_stat, "stat", 1, 0, 0,
SCM_SYSCALL (rv = fstat (scm_to_int (object), &stat_temp));
#endif
}
- else if (SCM_STRINGP (object))
+ else if (scm_is_string (object))
{
+ char *file = scm_to_locale_string (object);
#ifdef __MINGW32__
- char *p, *file = strdup (SCM_STRING_CHARS (object));
+ char *p;
p = file + strlen (file) - 1;
while (p > file && (*p == '/' || *p == '\\'))
*p-- = '\0';
+#endif
SCM_SYSCALL (rv = stat (file, &stat_temp));
free (file);
-#else
- SCM_SYSCALL (rv = stat (SCM_STRING_CHARS (object), &stat_temp));
-#endif
}
else
{