1157 |
"The return value is unspecified.") |
"The return value is unspecified.") |
1158 |
#define FUNC_NAME s_scm_putenv |
#define FUNC_NAME s_scm_putenv |
1159 |
{ |
{ |
1160 |
int rv, e; |
int rv; |
1161 |
char *ptr; |
char *ptr; |
1162 |
|
|
1163 |
SCM_VALIDATE_STRING (1, str); |
SCM_VALIDATE_STRING (1, str); |
1172 |
#else |
#else |
1173 |
/* On e.g. Win32 hosts putenv() called with 'name=' removes the |
/* On e.g. Win32 hosts putenv() called with 'name=' removes the |
1174 |
environment variable 'name'. */ |
environment variable 'name'. */ |
1175 |
|
int e; |
1176 |
ptr = scm_malloc (SCM_STRING_LENGTH (str) + 2); |
ptr = scm_malloc (SCM_STRING_LENGTH (str) + 2); |
1177 |
strncpy (ptr, SCM_STRING_CHARS (str), SCM_STRING_LENGTH (str)); |
strncpy (ptr, SCM_STRING_CHARS (str), SCM_STRING_LENGTH (str)); |
1178 |
ptr[SCM_STRING_LENGTH (str)] = '='; |
ptr[SCM_STRING_LENGTH (str)] = '='; |