From asami@vader.cs.berkeley.edu  Thu Apr  3 04:09:52 1997
Received: from silvia.HIP.Berkeley.EDU (ala-ca8-59.ix.netcom.com [207.93.141.187])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA18125;
          Thu, 3 Apr 1997 04:09:50 -0800 (PST)
Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.8.5/8.6.9) id EAA18485; Thu, 3 Apr 1997 04:09:48 -0800 (PST)
Message-Id: <199704031209.EAA18485@silvia.HIP.Berkeley.EDU>
Date: Thu, 3 Apr 1997 04:09:48 -0800 (PST)
From: asami@vader.cs.berkeley.edu (Satoshi Asami)
To: freebsd-gnats-submit@freebsd.org
Cc: current@freebsd.org
Subject: PR ports/3175

>Number:         3182
>Category:       junk
>Synopsis:       PR ports/3175
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr  3 04:10:01 PST 1997
>Closed-Date:    Thu Apr 3 04:18:01 PST 1997
>Last-Modified:  Tue Nov 27 19:23:50 PST 2001
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: asami 
State-Changed-When: Thu Apr 3 04:18:01 PST 1997 
State-Changed-Why:  
Was intended to be a followup to ports/3175.  It seems like I can't 
omit the "Re:" in the subject. 

From: Mike Pritchard <mpp>
To: bug-followup
Cc:  Subject: Re: junk/3182
Date: Sun, 6 Apr 1997 11:30:38 -0700 (PDT)

 test1

From: Mike Pritchard <mpp>
To: bug-followup
Cc:  Subject: Re: Re: junk/3182
Date: Sun, 6 Apr 1997 11:30:56 -0700 (PDT)

 test2

From: Mike Pritchard <mpp>
To: bug-followup
Cc:  Subject: Re:   junk/3182
Date: Sun, 6 Apr 1997 11:31:09 -0700 (PDT)

 test3
>Unformatted:
It's not only emacs, it's all the ports that hail from the emacs
family.  A typical failure looks like this:

===
cc -Demacs -DHAVE_CONFIG_H    -I. -I../src -I/ccd/ports/japanese/mule-canna/work/mule-2.3/lib-src -I/ccd/ports/japanese/mule-canna/work/mule-2.3/lib-src/../src   -O /ccd/ports/japanese/mule-canna/work/mule-2.3/lib-src/fakemail.c -lutil    -o fakemail
/ccd/ports/japanese/mule-canna/work/mule-2.3/lib-src/fakemail.c: In function `make_file_preface':
/ccd/ports/japanese/mule-canna/work/mule-2.3/lib-src/fakemail.c:308: warning: assignment makes pointer from integer without a cast
/usr/tmp/cc0038671.o: Undefined symbol `_cuserid' referenced from text segment
gmake[1]: *** [fakemail] Error 1
gmake[1]: Leaving directory `/ccd/ports/japanese/mule-canna/work/mule-2.3/lib-src'
gmake: *** [lib-src] Error 2
===

After digging around the sources a bit, I came up with the following
patch to src/s/freebsd.h (this is for mule-canna/patches/patch-ac, the
same patch applies to editors/emacs):

===
Index: patches/patch-ac
===================================================================
RCS file: /usr/cvs/ports/japanese/mule-canna/patches/patch-ac,v
retrieving revision 1.3
diff -u -r1.3 patch-ac
--- patch-ac	1996/11/30 10:01:20	1.3
+++ patch-ac	1997/04/03 11:59:34
@@ -13,3 +13,12 @@
  
  /* Reread the time zone on startup. */
  #define LOCALTIME_CACHE
+@@ -81,6 +81,8 @@
+ #define BSD 199103
+ #elif __FreeBSD__ == 2
+ #define BSD 199306
++#elif __FreeBSD__ == 3
++#define BSD 199506
+ #endif
+ 
+ #define WAITTYPE int
===

I personally think this piece of code is one of the worst hacks I've
seen (and obviously a ticking time-bomb, as we just experienced).  If
this is ok, I'll commit the patch to all emacs/mule ports and submit
it back to FSF (although I prefer this fixed in some better way...hmm,
Bruce? :).

Satoshi
