1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 13:30:26 +02:00

(scm_cuserid): Use a private result buffer, for thread safe.

This commit is contained in:
Kevin Ryde 2004-02-23 22:05:37 +00:00
parent 9de7b7abb4
commit 1b317eb196

View file

@ -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);