[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA-dev: [PCB] feautre request: -rdynamic



On Sat, 30 Sep 2006, DJ Delorie wrote:

>
>> Thank you very much :)
>
>Now I'm working on auto-loading HIDs.  What do you use for a startup
>function to register your hids?

I hook fopen() from a loader lib injected using LD_PRELOAD. Originally I
hooked strrchr(), but it turned out that some systems have strrchr() as
macros.

If you plan to add native support in PCB so one doesn't need to use such
hacks, I think the simplest way would be to acquire the HID names from a
file and/or command line arguments and just load them using dlopen() and
call an init function. The init function then can call back
hid_register_hid() and co.




_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev