summaryrefslogtreecommitdiff
path: root/libguile/error.c
diff options
context:
space:
mode:
authorGary Houston <ghouston@arglist.com>1997-08-23 18:49:35 +0000
committerGary Houston <ghouston@arglist.com>1997-08-23 18:49:35 +0000
commitefb997f535d76323a83c1645fbb594dabf969fb3 (patch)
treed9ac22c9ce7a659a5460f747e974b8af5f49db66 /libguile/error.c
parent1782cc374cdd173341a61571ce926c42a1257f39 (diff)
downloadguile-efb997f535d76323a83c1645fbb594dabf969fb3.tar.gz
* errno.h: prototype for scm_strerror.
* error.c (scm_strerror): new procedure.
Diffstat (limited to 'libguile/error.c')
-rw-r--r--libguile/error.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libguile/error.c b/libguile/error.c
index 1b2699de4..0fd8d39a3 100644
--- a/libguile/error.c
+++ b/libguile/error.c
@@ -116,6 +116,14 @@ scm_error_scm (key, subr, message, args, rest)
/* not reached. */
}
+SCM_PROC (s_strerror, "strerror", 1, 0, 0, scm_strerror);
+SCM
+scm_strerror (SCM err)
+{
+ SCM_ASSERT (SCM_INUMP (err), err, SCM_ARG1, s_strerror);
+ return scm_makfrom0str (strerror (SCM_INUM (err)));
+}
+
SCM_SYMBOL (scm_system_error_key, "system-error");
void
scm_syserror (subr)