Update the out-of-date GETENV code snippet
Brought to you by:
jthing
I realize that the CL Cookbook appears to be moribund, but just in case someone does care, the ostensibly portable GETENV implementation at http://cl-cookbook.sourceforge.net/os.html is rather out of date and is missing support for several major implementations.
Here's a replacement implementation that has been correctly conditionalized for and checked/tested with all current open-source Common Lisp implementations of note:
https://github.com/dryproject/snippets/blob/master/common-lisp/getenv.lisp
It's placed in the public domain, so feel free to copy and paste it verbatim.