pgloader/src/getenv.lisp
Dimitri Fontaine 042045c0a6 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
2015-11-08 18:26:58 +01:00

19 lines
524 B
Common Lisp

;;;
;;; Export a getenv feature so that we can fetch http_proxy at build time.
;;;
;;; We can't rely on Quicklisp to have installed a modern ASDF with UIOP yet
;;; here: we need the feature to pass in the :proxy argument to
;;; quicklisp-quickstart:install.
;;;
(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 (sb-ext:posix-getenv name) default))