From kargl@troutmask.apl.washington.edu  Sat Oct 19 15:32:26 2002
Return-Path: <kargl@troutmask.apl.washington.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9FA8737B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Oct 2002 15:32:26 -0700 (PDT)
Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4377543E4A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Oct 2002 15:32:26 -0700 (PDT)
	(envelope-from kargl@troutmask.apl.washington.edu)
Received: from troutmask.apl.washington.edu (localhost [127.0.0.1])
	by troutmask.apl.washington.edu (8.12.6/8.12.5) with ESMTP id g9JMWQ4G077559
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Oct 2002 15:32:26 -0700 (PDT)
	(envelope-from kargl@troutmask.apl.washington.edu)
Received: (from kargl@localhost)
	by troutmask.apl.washington.edu (8.12.6/8.12.6/Submit) id g9JMWP2u077558;
	Sat, 19 Oct 2002 15:32:25 -0700 (PDT)
Message-Id: <200210192232.g9JMWP2u077558@troutmask.apl.washington.edu>
Date: Sat, 19 Oct 2002 15:32:25 -0700 (PDT)
From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Reply-To: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Fix build of mail/xmail
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         44287
>Category:       ports
>Synopsis:       Fix build of mail/xmail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    edwin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 19 15:40:01 PDT 2002
>Closed-Date:    Fri Oct 25 15:30:14 PDT 2002
>Last-Modified:  Fri Oct 25 15:30:14 PDT 2002
>Originator:     Steven G. Kargl
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
apl/uw
>Environment:
System: FreeBSD troutmask.apl.washington.edu 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Sep 4 12:10:46 PDT 2002 kargl@troutmask.apl.washington.edu:/usr/obj/usr/src/sys/TROUTMASK i386


	
>Description:

Building mail/xmail on -current fails due to "exterm int sys_nerr".
	
>How-To-Repeat:

cd mail/xmail ; make

>Fix:

Replace files/patch-ab with the following patch (watch whitespace).

--- callbacks.c.orig	Sat Oct 19 15:22:13 2002
+++ callbacks.c	Sat Oct 19 15:23:52 2002
@@ -44,8 +44,6 @@
 extern char	noshare *sys_errlist[];
 #else
 extern int	errno;
-extern int	sys_nerr;
-extern char	*sys_errlist[];
 #endif
 
 extern	char	otherBuf[BUFSIZ];
@@ -608,7 +606,7 @@
           }
 
        if (! (m = GetMailEnv("sendmail")))
-            m = XtNewString("/usr/lib/sendmail");
+            m = XtNewString("/usr/sbin/sendmail");
 #ifdef X_FACE
        else {
           add_face = (strcmp(&m[strlen(m)-14], "faces.sendmail") != 0) ? 1 : 0;




>Release-Note:
>Audit-Trail:

From: Kris Kennaway <kris@obsecurity.org>
To: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/44287: Fix build of mail/xmail
Date: Sat, 19 Oct 2002 16:24:46 -0700

 On Sat, Oct 19, 2002 at 03:32:25PM -0700, Steven G. Kargl wrote:
 
 >  extern char	noshare *sys_errlist[];
 >  #else
 >  extern int	errno;
 > -extern int	sys_nerr;
 > -extern char	*sys_errlist[];
 >  #endif
 
 You should avoid defining errno as well - it doesn't currently cause
 an error, but it's wrong.
 
 Instead of patching these out, you should conditionally compile them
 in the !defined(__FreeBSD__) case.  This will make the patch more
 acceptable to be taken back by the upstream author.
 
 Kris

From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: Kris Kennaway <kris@obsecurity.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/44287: Fix build of mail/xmail
Date: Sat, 19 Oct 2002 16:30:31 -0700 (PDT)

 Kris Kennaway said:
 > On Sat, Oct 19, 2002 at 03:32:25PM -0700, Steven G. Kargl wrote:
 > 
 > >  extern char	noshare *sys_errlist[];
 > >  #else
 > >  extern int	errno;
 > > -extern int	sys_nerr;
 > > -extern char	*sys_errlist[];
 > >  #endif
 > 
 > You should avoid defining errno as well - it doesn't currently cause
 > an error, but it's wrong.
 > 
 > Instead of patching these out, you should conditionally compile them
 > in the !defined(__FreeBSD__) case.  This will make the patch more
 > acceptable to be taken back by the upstream author.
 > 
 
 Kris,
 
 Okay, I'll start removing "extern int errno" when I see it.
 As to the use of !defined(__FreeBSD__), I started with the
 current patch and simply fix it.  Should I discard old 
 patches in favor of !defined(__FreeBSD__)?
 
 -- 
 Steve
 http://troutmask.apl.washington.edu/~kargl/

From: Kris Kennaway <kris@obsecurity.org>
To: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Cc: Kris Kennaway <kris@obsecurity.org>,
	FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/44287: Fix build of mail/xmail
Date: Sat, 19 Oct 2002 17:43:08 -0700

 On Sat, Oct 19, 2002 at 04:30:31PM -0700, Steven G. Kargl wrote:
 > Kris Kennaway said:
 > > On Sat, Oct 19, 2002 at 03:32:25PM -0700, Steven G. Kargl wrote:
 > > 
 > > >  extern char	noshare *sys_errlist[];
 > > >  #else
 > > >  extern int	errno;
 > > > -extern int	sys_nerr;
 > > > -extern char	*sys_errlist[];
 > > >  #endif
 > > 
 > > You should avoid defining errno as well - it doesn't currently cause
 > > an error, but it's wrong.
 > > 
 > > Instead of patching these out, you should conditionally compile them
 > > in the !defined(__FreeBSD__) case.  This will make the patch more
 > > acceptable to be taken back by the upstream author.
 > > 
 > 
 > Kris,
 > 
 > Okay, I'll start removing "extern int errno" when I see it.
 > As to the use of !defined(__FreeBSD__), I started with the
 > current patch and simply fix it.  Should I discard old 
 > patches in favor of !defined(__FreeBSD__)?
 
 I think it can only help the chances of having them accepted back
 (assuming the upstream author still exists and someone submits the
 change).
 
 Thanks,
 
 Kris

From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: Kris Kennaway <kris@obsecurity.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/44287: Fix build of mail/xmail
Date: Sat, 19 Oct 2002 18:28:59 -0700 (PDT)

 Kris Kennaway said:
 > On Sat, Oct 19, 2002 at 03:32:25PM -0700, Steven G. Kargl wrote:
 > 
 > >  extern char	noshare *sys_errlist[];
 > >  #else
 > >  extern int	errno;
 > > -extern int	sys_nerr;
 > > -extern char	*sys_errlist[];
 > >  #endif
 > 
 > You should avoid defining errno as well - it doesn't currently cause
 > an error, but it's wrong.
 > 
 > Instead of patching these out, you should conditionally compile them
 > in the !defined(__FreeBSD__) case.  This will make the patch more
 > acceptable to be taken back by the upstream author.
 > 
 > Kris
 > 
 
 This replaces patch-ab
 
 --- callbacks.c.orig	Sat Oct 19 18:21:56 2002
 +++ callbacks.c	Sat Oct 19 18:23:31 2002
 @@ -43,10 +43,12 @@
  extern int	noshare sys_nerr;
  extern char	noshare *sys_errlist[];
  #else
 +#if !defined(__FreeBSD__)
  extern int	errno;
  extern int	sys_nerr;
  extern char	*sys_errlist[];
  #endif
 +#endif
  
  extern	char	otherBuf[BUFSIZ];
  
 @@ -608,7 +610,7 @@
            }
  
         if (! (m = GetMailEnv("sendmail")))
 -            m = XtNewString("/usr/lib/sendmail");
 +            m = XtNewString("/usr/sbin/sendmail");
  #ifdef X_FACE
         else {
            add_face = (strcmp(&m[strlen(m)-14], "faces.sendmail") != 0) ? 1 : 0;
 
 -- 
 Steve
 http://troutmask.apl.washington.edu/~kargl/
Responsible-Changed-From-To: freebsd-ports->edwin 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Oct 25 07:11:29 PDT 2002 
Responsible-Changed-Why:  
I'll take care of this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44287 
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Fri Oct 25 15:29:59 PDT 2002 
State-Changed-Why:  
Commited, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44287 
>Unformatted:
