Subject: Re: pkg/20978: mail/deliver is not compatible with recent NetBSD libc
To: None <gnats-bugs@gnats.netbsd.org>
From: Jim Bernard <jbernard@mines.edu>
List: tech-pkg
Date: 05/27/2004 15:28:27
On Tue, Apr 01, 2003 at 09:48:10PM -0700, jbernard@Mines.EDU wrote:
> 
> >Number:         20978
> >Category:       pkg
> >Synopsis:       mail/deliver is not compatible with recent NetBSD libc
> >State:          open
> >Class:          sw-bug
> >Arrival-Date:   Tue Apr 01 20:49:00 PST 2003

  Here's an updated version of patch-af.  The only change since the original
PR is the incorporation of the removal of the hardcoded path to /usr/pkg that
was made in revision 1.2 of patch-af.

  Please note: this package has now been broken since Oct. 17, 2002.  It
would be _really_ nice to get this fix committed.  Thanks!

  (NB: the package doesn't build at the moment on -current.  I'll submit
a new PR with a fix for that soon.)


$NetBSD$

--- /dev/null	2003-03-15 16:33:11.000000000 -0700
+++ conf/os-netbsd.h
@@ -0,0 +1,33 @@
+/*
+ * Deliver configuration for NetBSD.
+ *
+ */
+
+/* Mostly it's POSIX. */
+
+#include <base-posix.h>
+
+/* Then again... */
+
+#undef  SAFEPATH
+#define SAFEPATH    "/bin:/usr/bin:@PREFIX@/bin"  /* Safe dirs for PATH	*/
+
+#undef  SYSV_USRMAIL		/* Mailboxes in /usr/mail, as per SysV	*/
+#define MBX_DIR     "/var/mail"
+
+#undef  HAS_TIMEZONE		/* Has global variable timezone (SVID)	*/
+#define HAS_MKTIME		/* Has mktime()           		*/
+
+/* We avoid defining HAS_BASENAME because NetBSD's basename(3), as of
+ * revision 1.5 of basename.c (October 17, 2002), returns a pointer to
+ * a copy of the base name in static storage, and uses of basename in
+ * the code are incompatible with that behavior.  So we rely instead on
+ * the basename replacement included here.
+ */
+#undef  HAS_BASENAME		/* Has basename()			*/
+#define HAS_LONGNAMES		/* Long filenames (>14) supported	*/
+
+/* Note that we don't define HAS_USLEEP, since deliver wants to use it
+ * for sleeping for more than one second, but the implementation limits
+ * the sleep time to strictly less than one second.
+ */