Commit 54d501b3 authored by Erick Gallesio's avatar Erick Gallesio

Fix for Solaris (not unsetenv in Solaris)

parent 1e151db8
......@@ -2,7 +2,7 @@ dnl configure.in for STklos
dnl
dnl Author: Erick Gallesio [eg@unice.fr]
dnl Creation date: 28-Dec-1999 21:19 (eg)
dnl Last file update: 28-Jun-2007 18:37 (eg)
dnl Last file update: 5-Jul-2007 10:42 (eg)
AC_INIT(src/stklos.c)
......@@ -422,6 +422,7 @@ eval `CC=$CC /bin/sh ./utils/shlib-options`
case $OS in
SUNOS)
CFLAGS="$CFLAGS -DSOLARIS";
LIBS="$LIBS -lsocket -lrt -lnsl -lpthread" ;;
UNKNOWN)
echo ""
......
......@@ -16,7 +16,7 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 29-Mar-1994 10:57
* Last file update: 22-Jun-2007 14:13 (eg)
* Last file update: 4-Jul-2007 11:07 (eg)
*/
#include <unistd.h>
......@@ -1053,17 +1053,22 @@ DEFINE_PRIMITIVE("setenv!", setenv, subr2, (SCM var, SCM value))
}
/*
<doc EXT unsetenv!
* (setenv! var)
* (unsetenv! var)
*
* Unsets the environment variable |var|. |Var| must be a strings.
* Unsets the environment variable |var|. |Var| must be a string.
* The result of |unsetenv!| is ,(emph "void").
doc>
*/
DEFINE_PRIMITIVE("unsetenv!", unsetenv, subr1, (SCM var))
{
#ifndef SOLARIS
if (!STRINGP(var)) error_bad_string(var);
unsetenv(STRING_CHARS(var));
return STk_void;
return STk_void;
#else
/* not exactly the same since getenv will not return #f after that */
return STk_setenv(var, STk_Cstring2string(""));
#endif
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment