Add (untested, so sue me) getenv and putenv to sb-posix
9) proper alien definitions of structures [ possibly an sb-grovel
problem, but the way we define calls exposes the problem -- see
-readdir() ]
+readdir() ] [ isn't this done? ]
+
+10) some functions (e.g. fdatasync, putenv) have a return value which
+is purely an error indicator. Currently we're returning the 0 on
+success, but maybe it would make more sense for them to return
+(values).
(syscall-error))
(setf termios (alien-to-termios a-termios termios))))
termios)
+
+;;; environment
+
+(export 'sb-posix::getenv :sb-posix)
+(defun sb-posix::getenv (name)
+ (let ((r (alien-funcall
+ (extern-alien "getenv" (function (* char) c-string))
+ name)))
+ (declare (type (alien (* char)) r))
+ (unless (null-alien r)
+ (cast r c-string))))
+(define-call "putenv" int minusp (string c-string))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.19.28"
+"0.8.19.29"