From jeremyp@gsmx07.alcatel.com.au Wed Mar 24 21:02:39 1999
Return-Path: <jeremyp@gsmx07.alcatel.com.au>
Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10])
	by hub.freebsd.org (Postfix) with ESMTP id AD90815099
	for <FreeBSD-gnats-submit@FreeBSD.ORG>; Wed, 24 Mar 1999 21:02:35 -0800 (PST)
	(envelope-from jeremyp@gsmx07.alcatel.com.au)
Received: by border.alcanet.com.au id <40402>; Thu, 25 Mar 1999 14:49:14 +1000
Message-Id: <99Mar25.144914est.40402@border.alcanet.com.au>
Date: Thu, 25 Mar 1999 15:02:05 +1000
From: Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
Reply-To: peter.jeremy@alcatel.com.au
To: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: ELF emacs 19.34 hangs under X windows
X-Send-Pr-Version: 3.2

>Number:         10783
>Category:       ports
>Synopsis:       ELF emacs 19.34 hangs under X windows
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 24 21:10:00 PST 1999
>Closed-Date:    Fri Apr 9 17:15:03 PDT 1999
>Last-Modified:  Fri Apr  9 17:16:09 PDT 1999
>Originator:     Peter Jeremy
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Alcatel Australia Limited
>Environment:

	-current from about two weeks ago, the latest emacs 19.34b
	and XFree86 ports.  (The emacs port includes the patch
	mentioned in ports/10782).

>Description:

	When an ELF emacs is started as an X11 client, emacs opens a
	window and then nothing happens.  ktrace and and xscope show
	emacs is continuously sending GetInputFocus commands to the
	X-server.

	The immediate cause is emacs looping in x_make_frame_visible().
	It is apparently waiting for an input event indicating that
	the window has been mapped.  It expects to get informed of
	this when a signal (presumably SIGIO) invokes XTread_socket().
	The only problem is that I can't find anything to enable SIGIO
	and sigaction(2) is never called.

	This problem does not occur with a 2.x aout emacs running with
	2.x X11 libraries.  (Although I don't have an aout debugger to
	follow the control flow).

>How-To-Repeat:

	cd /usr/ports/editors/emacs
	make
	make install
	DISPLAY=:0 emacs

>Fix:
	

>Release-Note:
>Audit-Trail:

From: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc: DDeatherage@bridge.com, asami@FreeBSD.ORG, joelh@gnu.org,
	ports@FreeBSD.ORG, sprice@hiwaay.net
Subject: Re: ports/10783: ELF emacs 19.34 hangs under X windows
Date: Sat, 10 Apr 1999 07:20:23 +1000

 [Changing the subject line to suit gnats]
 
 "Deatherage, David" <DDeatherage@bridge.com> wrote:
 > I've found where this problem is coming from.  It's in
 > emacs20.3/src/s/freebsd.h.  It sets a macro called BSD_SYSTEM based upon the
 > version number contained in __FreeBSD__, checking for 1, 2 and 3.  Of
 > course, -current uses 4.  I have found that you can check for __FreeBSD__ >=
 > 3, and it will work, but this feels a bit like a hack.  I've never updated a
 > port, so I can either get some instruction from someone to put in a patch,
 > or let someone else do it.
 
 Thanks David.  It's the same problem in the editors/emacs port.  I
 should have thought of something like this when I first saw the
 problem :-(.  The equality tests on __FreeBSD__ are used to define a
 macro `BSD'.  At least in 19.34, the value of this macro is never
 checked, just its definition, so David's change is adequate.
 
 Joel Ray Holveck <joelh@gnu.org> 
 >I'll make the patch if a committer can get it in.
 Going thru the proper FreeBSD channels...  (Joel might like to see if he
 can get it integrated into emacs).
 
 The fix for 19.34 is a patch file:
 
 diff -bur work.old/emacs-19.34/src/s/freebsd.h work/emacs-19.34/src/s/freebsd.h
 --- work.old/emacs-19.34/src/s/freebsd.h        Fri Mar 12 12:18:16 1999
 +++ work/emacs-19.34/src/s/freebsd.h    Sat Apr 10 06:32:00 1999
 @@ -112,7 +112,7 @@
  #define BSD 199103
  #elif __FreeBSD__ == 2
  #define BSD 199306
 -#elif __FreeBSD__ == 3
 +#elif __FreeBSD__ >= 3
  #define BSD 199506
  #endif
  
 Satoshi (or someone else with the complete ports tree):  How about doing
 a quick search for any other equality checks against __FreeBSD__ or
 __FreeBSD_version that are biting us.  (And maybe keeping the list
 around so we don't go thru the same thing next year when we move to
 FreeBSD-5.x)
 
 Peter
 
 

From: Steve Price <sprice@hiwaay.net>
To: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, DDeatherage@bridge.com,
	asami@FreeBSD.ORG, joelh@gnu.org, ports@FreeBSD.ORG
Subject: Re: ports/10783: ELF emacs 19.34 hangs under X windows
Date: Fri, 9 Apr 1999 18:09:14 -0500 (CDT)

 On Sat, 10 Apr 1999, Peter Jeremy wrote:
 
 # Going thru the proper FreeBSD channels...  (Joel might like to see if he
 # can get it integrated into emacs).
 # 
 # The fix for 19.34 is a patch file:
 # 
 # diff -bur work.old/emacs-19.34/src/s/freebsd.h work/emacs-19.34/src/s/freebsd.h
 # --- work.old/emacs-19.34/src/s/freebsd.h        Fri Mar 12 12:18:16 1999
 # +++ work/emacs-19.34/src/s/freebsd.h    Sat Apr 10 06:32:00 1999
 # @@ -112,7 +112,7 @@
 #  #define BSD 199103
 #  #elif __FreeBSD__ == 2
 #  #define BSD 199306
 # -#elif __FreeBSD__ == 3
 # +#elif __FreeBSD__ >= 3
 #  #define BSD 199506
 #  #endif
 
 Got it.  Let me build both versions of emacs, do a couple of
 quick tests, and I'll commit these changes.
 
 # Satoshi (or someone else with the complete ports tree):  How about doing
 # a quick search for any other equality checks against __FreeBSD__ or
 # __FreeBSD_version that are biting us.  (And maybe keeping the list
 # around so we don't go thru the same thing next year when we move to
 # FreeBSD-5.x)
 
 The biggest part of the list is pretty easy - anything that uses
 libtool. :)  I'm pretty sure that most (all?) of the existing ports
 that use libtool have been fixed.  Jeremy Lea has some patches
 floating around that should take care of remaining broken ones and
 all newcomer ports that use libtool.
 
 -steve
 
 
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Fri Apr 9 17:15:03 PDT 1999 
State-Changed-Why:  
Patch committed to both emacs ports.  Thanks! 
>Unformatted:
