LWN.net Logo

X11 and CC?

X11 and CC?

Posted Sep 23, 2008 6:14 UTC (Tue) by eru (subscriber, #2753)
Parent article: LPC: Booting Linux in five seconds

The X Window System runs the C preprocessor and compiler on startup, in order to build its keyboard mappings.

Sounds very strange. Frankly I did not know it does this. Mapping keyboard presses to X's internal codes isn't exactly time-critical, so why doesn't it simply use a mapping table (or some kind of bytecode if a simple table is not powerful enough) loaded from a binary file? Using CC for this sounds like something done just for the hack value...


(Log in to post comments)

X11 and CC?

Posted Sep 23, 2008 7:34 UTC (Tue) by nix (subscriber, #2304) [Link]

It's not compiling anything: it's passing the keysym files through the C
preprocessor before xkbcomping them. Everyone hates this (it's imake only
not quite as ugly). I'm not sure if the rip-out-xkbcomp-at-every-X-start
job is done yet, but it's definitely on people's lists

X11 and CC?

Posted Sep 23, 2008 17:12 UTC (Tue) by s0f4r (guest, #52284) [Link]

there is a patch and it'll likely be in git soon, we sent it to Keith P. :)

X11 and CC?

Posted Sep 23, 2008 20:10 UTC (Tue) by nix (subscriber, #2304) [Link]

YAY! Another ugly crock bites the dust...

(of course we still need /lib/cpp for the occasional non-X program that
uses imake. Can't live without xpilot, now, can we. ;) )

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds