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:
parent
9de7b7abb4
commit
1b317eb196
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue