Darwin build fails on xconsole.c

Torrey Lyons torrey at mrcla.com
Thu Jul 14 17:58:09 PDT 2005


At 1:28 PM +0200 7/14/05, Matthieu Herrb wrote:
>Keith Packard wrote:
>>On Wed, 2005-07-13 at 09:14 -0700, Torrey Lyons wrote:
>>
>>>Since the patch of July 7 by sandmann xconsole.c fails to build on 
>>>Darwin with the error:
>>>
>>>xconsole.c: In function 'get_pty':
>>>xconsole.c:863: error: 'PTYCHAR1' undeclared (first use in this function)
>>>xconsole.c:863: error: (Each undeclared identifier is reported only once
>>>xconsole.c:863: error: for each function it appears in.)
>>>xconsole.c:867: error: 'PTYCHAR2' undeclared (first use in this function)
>>>
>>>These are defined in "../xterm/ptyx.h", which was dropped as an 
>>>include in the recent patch. I suppose this might have been done 
>>>for the modularization work. How should we fix this? Copying the 
>>>definitions for PTYCHAR1 and PTYCHAR2 from ptyx.h will work, but 
>>>this may not be the best solution.
>>
>>
>>They should either be copied or stuck in one of the header files that
>>(currently) end up in the modular directory proto/X11. That's where all
>>of the OS abstractions currently live, although it would be nice to get
>>them into a dumping ground of their own rather than clutter a putatively
>>OS independent directory.
>>
>OpenBSD gets hit by this too.
>A better fix is to use openpty instead of this 20 years old code to 
>open the pseudo-tty. See attached patch. (Not yet tested on Mac OS 
>X/Darwin though, but according to its man pages it should work).

Your patch builds successfully on Darwin, at least on Tiger. I'll try 
it on earlier versions, but this looks like the way to go.

--Torrey



More information about the xorg mailing list