Use OS/FIND-PROGRAM to search path for sendmail.
authorChris Hanson <org/chris-hanson/cph>
Wed, 20 Dec 2006 07:24:47 +0000 (07:24 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 20 Dec 2006 07:24:47 +0000 (07:24 +0000)
v7/src/edwin/unix.scm

index 0911dffc63ae904aea26e2b633eef58cfd54cd1a..c8c8f364a31aa4d7ec8aa1e7691bc72f22f6baad 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: unix.scm,v 1.120 2006/05/15 02:43:54 cph Exp $
+$Id: unix.scm,v 1.121 2006/12/20 07:24:47 cph Exp $
 
 Copyright 1989,1991,1992,1993,1994,1995 Massachusetts Institute of Technology
 Copyright 1996,1997,1999,2000,2002,2003 Massachusetts Institute of Technology
@@ -666,8 +666,9 @@ option, instead taking -P <filename>."
   (cons "~/mbox" system-mailboxes))
 
 (define (os/sendmail-program)
-  (or (list-search-positive
-         '("/usr/lib/sendmail" "/usr/sbin/sendmail" "/usr/ucblib/sendmail")
+  (or (os/find-program "sendmail" #f (ref-variable exec-path) #f)
+      (find-matching-item
+         '("/usr/sbin/sendmail" "/usr/lib/sendmail" "/usr/ucblib/sendmail")
        file-executable?)
       "fakemail"))