[PATCH input-keyboard 02/13] Missing #ifdef for PCCONS

Gaetan Nadon memsize at videotron.ca
Fri May 14 10:35:10 PDT 2010


On Fri, 2010-05-14 at 06:35 -0700, Dan Nicholson wrote:

> On Wed, May 12, 2010 at 10:11 AM, Gaetan Nadon <memsize at videotron.ca> wrote:
> > Compiling this BSD file under Linux finds errors in conditional code.
> > PCCONS is undefined and should be protected with PCCONS_SUPPORT
> 
> Why would the bsd sources get compiled on linux?
> 

To simulate a bsd system that does not have PCCONS support.

In xserver config at line 426,


          *openbsd*)
        	AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
        	AC_DEFINE(PCVT_SUPPORT, 1, [System has PC console])
        	AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console])
        	;;

there is no PCCONS_SUPPORT. I don't have a running openbsd system, I can
only guess what the situation can be at the moment:

1- If openbsd does in fact not support PCCONS, the code fails to compile
2- If openbsd does in fact support PCCONS and xserver fails to set
PCCONS_SUPPORT, a new fix is required.

Any insight into this is welcome. I'll update the commit msg.


> >
> > Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> > ---
> >  src/bsd_kbd.c |    7 +++++++
> >  1 files changed, 7 insertions(+), 0 deletions(-)
> >
> > diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
> > index bc80692..8575ab2 100644
> > --- a/src/bsd_kbd.c
> > +++ b/src/bsd_kbd.c
> > @@ -88,8 +88,10 @@ SetKbdLeds(InputInfoPtr pInfo, int leds)
> >
> >     switch (pKbd->consType) {
> >
> > +#if defined (PCCONS_SUPPORT)
> 
> This and the others can use the simpler "#ifdef PCCONS_SUPPORT" like
> later in SoundBell.
> 

Yes they can.

> --
> Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100514/731b0d3a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100514/731b0d3a/attachment.pgp>


More information about the xorg-devel mailing list