Bug 44287

Summary: Fix build of mail/xmail
Product: Ports & Packages Reporter: Steven G. Kargl <kargl>
Component: Individual Port(s)Assignee: Edwin Groothuis <edwin>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Steven G. Kargl 2002-10-19 23:40:01 UTC
Building mail/xmail on -current fails due to "exterm int sys_nerr".

Fix: Replace files/patch-ab with the following patch (watch whitespace).
How-To-Repeat: 
cd mail/xmail ; make
Comment 1 Kris Kennaway 2002-10-20 00:24:46 UTC
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
Comment 2 Steven G. Kargl 2002-10-20 00:30:31 UTC
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/
Comment 3 Kris Kennaway 2002-10-20 01:43:08 UTC
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
Comment 4 Steven G. Kargl 2002-10-20 02:28:59 UTC
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/
Comment 5 Edwin Groothuis freebsd_committer freebsd_triage 2002-10-25 15:11:29 UTC
Responsible Changed
From-To: freebsd-ports->edwin

I'll take care of this one.
Comment 6 Edwin Groothuis freebsd_committer freebsd_triage 2002-10-25 23:29:59 UTC
State Changed
From-To: open->closed

Commited, thanks!