From 042045c0a64dbade955a6499c6708b7cd5806a40 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sun, 8 Nov 2015 18:26:58 +0100 Subject: [PATCH] Clozure already provides a getenv function. Trying to provide a new one fails with an error, that I missed because I must have forgotten to `make clean` when adding the previous #+ccl variant here... This alone doesn't allow to fix building for CCL but already improves the situation as reported at #303. Next failure is something I fail to understand tonight: Fatal SIMPLE-ERROR: Compilation failed: In MAKE-DOUBLE-FLOAT: Type declarations violated in (THE FIXNUM 4294967295) in /Users/dim/dev/pgloader/build/quicklisp/local-projects/qmynd/src/common/utilities.lisp --- src/getenv.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/getenv.lisp b/src/getenv.lisp index dcb7987..c5c29b4 100644 --- a/src/getenv.lisp +++ b/src/getenv.lisp @@ -8,9 +8,11 @@ (in-package :cl-user) +;; +;; ccl provides an implementation of getenv already. +;; +#+sbcl (defun getenv (name &optional default) "Return the current value for the environment variable NAME, or default when unset." - (or #+sbcl (sb-ext:posix-getenv name) - #+ccl (ccl:getenv name) - default)) + (or (sb-ext:posix-getenv name) default))