From 1b317eb1967beeb1f305485c091d8088b8fd346b Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Mon, 23 Feb 2004 22:05:37 +0000 Subject: [PATCH] (scm_cuserid): Use a private result buffer, for thread safe. --- libguile/posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libguile/posix.c b/libguile/posix.c index 14c80f3eb..bed16a057 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1498,9 +1498,10 @@ SCM_DEFINE (scm_cuserid, "cuserid", 0, 0, 0, "information cannot be obtained.") #define FUNC_NAME s_scm_cuserid { + char buf[L_cuserid]; char * p; - p = cuserid (NULL); + p = cuserid (buf); if (!p || !*p) return SCM_BOOL_F; return scm_makfrom0str (p);