* error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
authorKevin Ryde <user42@zip.com.au>
Sat, 31 Jul 2004 01:13:29 +0000 (01:13 +0000)
committerKevin Ryde <user42@zip.com.au>
Sat, 31 Jul 2004 01:13:29 +0000 (01:13 +0000)
it's not thread safe.
(scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
advantage of this.
* fports.c (scm_open_file): Use scm_strerror likewise.
* filesys.c (scm_stat, scm_lstat): Ditto.

libguile/filesys.c

index 79cfa01..e27bdca 100644 (file)
@@ -640,7 +640,7 @@ SCM_DEFINE (scm_stat, "stat", 1, 0, 0,
       int en = errno;
 
       SCM_SYSERROR_MSG ("~A: ~S",
-                       scm_list_2 (scm_makfrom0str (strerror (errno)),
+                       scm_list_2 (scm_strerror (scm_from_int (en)),
                                    object),
                        en);
     }
@@ -1393,7 +1393,7 @@ SCM_DEFINE (scm_lstat, "lstat", 1, 0, 0,
       int en = errno;
 
       SCM_SYSERROR_MSG ("~A: ~S",
-                       scm_list_2 (scm_makfrom0str (strerror (errno)), str),
+                       scm_list_2 (scm_strerror (scm_from_int (en)), str),
                        en);
     }
   return scm_stat2scm(&stat_temp);