mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +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.")
|
"information cannot be obtained.")
|
||||||
#define FUNC_NAME s_scm_cuserid
|
#define FUNC_NAME s_scm_cuserid
|
||||||
{
|
{
|
||||||
|
char buf[L_cuserid];
|
||||||
char * p;
|
char * p;
|
||||||
|
|
||||||
p = cuserid (NULL);
|
p = cuserid (buf);
|
||||||
if (!p || !*p)
|
if (!p || !*p)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
return scm_makfrom0str (p);
|
return scm_makfrom0str (p);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue