libxf86config no longer usable

Ruediger Oertel ro at suse.de
Tue Apr 6 10:08:57 PDT 2010


On Tuesday 06 April 2010 18:52:16 Dan Nicholson wrote:
> On Tue, Apr 6, 2010 at 8:41 AM, Ruediger Oertel <ro at suse.de> wrote:
> > On Tuesday 06 April 2010 16:25:53 Dan Nicholson wrote:
> >> On Tue, Apr 6, 2010 at 6:45 AM, Dan Nicholson <dbn.lists at gmail.com> wrote:
> >> > On Mon, Apr 5, 2010 at 4:36 PM, Ruediger Oertel <ro at suse.de> wrote:
> >> >> Hi,
> >> >>
> >> >> commit e1165632bdfbd720889ed1adf5f7ab338032c0ee
> >> >> has added a call to xf86CheckBoolOption to Layout.c but this function (obviously)
> >> >> does not end up in libxf86config since it's not in .../parser but in .../common/xf86Option.c
> >> >>
> >> >> so linking against libxf86config (if installed as possible via configure --enable-install-libxf86config)
> >> >> will end up with: undefined symbol: xf86CheckBoolOption
> >> >>
> >> >> I just can't come up with a clean idea how to solve this ...
> >> >
> >> > I think the "cleanest" way would be to move a lot of xf86Option.c
> >> > under parser/. It's really about parsing Options anyway, and half the
> >> > implementations just wrap code from parser/Flags.c. So, moving
> >> > xf86Opt.h and xf86Option.c under parser/ would seem to be the easiest.
> >> >
> >> > Another alternative is to move the action of automatically adding the
> >> > InputDevices under the ServerLayout to xf86Config.c like the video
> >> > config. It's a little cleaner to put it together immediately during
> >> > the parsing, but you could assemble it later.
> >>
> >> Another option is just to do a local hack in parser/Layout.c to
> >> emulate xf86CheckBoolOption. Many of the necessary components are
> >> already under parser/.
> >
> > could it be as simple as this ?
> >
> > --- hw/xfree86/parser/Layout.c
> > +++ hw/xfree86/parser/Layout.c
> > @@ -449,7 +449,10 @@
> >     /* add all AutoServerLayout devices to the server layout */
> >     while (input)
> >     {
> > -       if (xf86CheckBoolOption(input->inp_option_lst, "AutoServerLayout", FALSE))
> > +       Bool asl_value = FALSE;
> > +       char *s = xf86findOptionValue(input->inp_option_lst ,"AutoServerLayout");
> > +       Bool asl_found = xf86getBoolValue(&asl_value, s);
> > +       if (asl_found == TRUE && asl_value == TRUE)
> >        {
> >            XF86ConfInputrefPtr iref = layout->lay_input_lst;
> 
> Yeah, that looks right. A comment explaining why CheckBoolOption is
> not being used would be nice. Long term, it might be better to move
> xf86Option.c under parser anyway since there's really no reason to
> keep that API out of the parser. I had to refactor xf86getBoolValue
> into parser/ when creating InputClass for this same reason and I can
> see the situation coming up again.

well, I already found the next one: using xstrtokenize which comes from $topdir/os ...
I'll come back when I have a complete list.


-- 
with kind regards (mit freundlichem Grinsen),
   Ruediger Oertel (ro at novell.com,ro at suse.de,bugfinder at t-online.de)
----------------------------------------------------------------------
Linux Fatou 2.6.33-6-desktop #1 SMP PREEMPT 2010-02-25 20:06:12 +0100 x86_64
Key fingerprint = 17DC 6553 86A7 384B 53C5  CA5C 3CE4 F2E7 23F2 B417
SUSE LINUX Products GmbH,  GF: Markus Rex,   HRB 16746 (AG Nürnberg)


More information about the xorg-devel mailing list