anchor.diff:  (defconstant +default-mask+ (if (boundp '+default-mask+) +default-mask+ #o022))
   (defconstant +default-mode+ (if (boundp '+default-mode+) +default-mode+ #o600))
   
  -(defvar *wnohang* (or 
  -		   #+sbcl 1
  -		   #+allegro 1
  -		   #+ccl #.(read-from-string "#$WNOHANG")
  -		   #+ecl (ffi:c-inline () () :int "WNOHANG" :one-liner t)
  -		   ))
  -
  -(defvar *o-rdonly* (or 
  -		    #+sbcl sb-posix:o-rdonly
  -		    #+allegro excl::*o-rdonly*
  -		    #+ccl #.(read-from-string "#$O_RDONLY")
  -		    #+ecl (ffi:c-inline () () :int "O_RDONLY" :one-liner t)
  -		    ))
  +(defvar *wnohang* (or
  +                   #+sbcl 1
  +                   #+allegro 1
  +                   #+ccl #.(read-from-string "#$WNOHANG")
  +                   #+ecl (ffi:c-inline () () :int "WNOHANG" :one-liner t)
  +                   ))
  +
  +(defvar *o-rdonly* (or
  +                    #+sbcl sb-posix:o-rdonly
  +                    #+allegro excl::*o-rdonly*
  +                    #+ccl #.(read-from-string "#$O_RDONLY")
  +                    #+ecl (ffi:c-inline () () :int "O_RDONLY" :one-liner t)
  +                    ))
   
   (defvar *o-wronly* (or
  -		    #+sbcl sb-posix:o-wronly
  -		    #+allegro excl::*o-wronly*
  -		    #+ccl #.(read-from-string "#$O_WRONLY")
  -		    #+ecl (ffi:c-inline () () :int "O_WRONLY" :one-liner t)
  -		    ))
  -
  -(defvar *o-append* (or 
  -		    #+sbcl sb-posix:o-append
  -		    #+allegro excl::*o-append*
  -		    #+ccl #.(read-from-string "#$O_APPEND")
  -		    #+ecl (ffi:c-inline () () :int "O_APPEND" :one-liner t)
  -		    ))
  +                    #+sbcl sb-posix:o-wronly
  +                    #+allegro excl::*o-wronly*
  +                    #+ccl #.(read-from-string "#$O_WRONLY")
  +                    #+ecl (ffi:c-inline () () :int "O_WRONLY" :one-liner t)
  +                    ))
  +
  +(defvar *o-append* (or
  +                    #+sbcl sb-posix:o-append
  +                    #+allegro excl::*o-append*
  +                    #+ccl #.(read-from-string "#$O_APPEND")
  +                    #+ecl (ffi:c-inline () () :int "O_APPEND" :one-liner t)
  +                    ))
   
   (defun chdir (dir)
     #+sbcl (sb-posix:chdir dir)
     #+allegro (excl:chdir dir)
     #+ccl (ccl::%chdir dir)
     #+ecl (ffi:c-inline (dir) (:cstring) :int
  -			"chdir(#0)" :one-liner t))
  +                      "chdir(#0)" :one-liner t))
   
   (defun dup2  (old new)
     #+sbcl (sb-posix:dup2 old new)
     #+allegro (excl.osi::syscall-dup2 old new)
     #+ccl (#.(read-from-string "#_dup2") old new)
     #+ecl (ffi:c-inline (old new) (:int :int) :int
  -			"dup2(#0,#1)" :one-liner t))
  +                      "dup2(#0,#1)" :one-liner t))
   
   (defun fork ()
     (or
  
positive.code: (defpackage :daemon
    (:use :cl)
    (:export #:exit
  	   #:daemonize
  	   #:fork))
  
  (in-package :daemon)
  
  
negative.code:   #+sbcl (sb-posix:close fd)
    #+ccl (#.(read-from-string "#_close") fd)
    #+ecl (ffi:c-inline (fd) (:int) :int
                        "close(#0)" :one-liner t))
  
  #+allegro
  (ff:def-foreign-call (pclose "close") (d))
  
  (defun exit ()
    #+sbcl
    #.(if (and (find-package :sb-posix)
               (find-symbol (symbol-name :exit) :sb-posix))
          (read-from-string "(sb-posix:exit 0)")
          (read-from-string "(sb-unix:unix-exit)"))
    #+allegro (excl:exit 0 :quiet t)
    #+ccl (#.(read-from-string "#_exit") 0)
    #+ecl (ext:exit))
  