On Sunday 13 August 2006 17:41, James McMechan wrote:
> >From: Blaisorblade <[EMAIL PROTECTED]>
> >To: [email protected]
> >CC: "James McMechan" <[EMAIL PROTECTED]>,
> >[email protected]
> >Subject: Re: [uml-devel] [ link to patch] resurrecting the uml-hcd
> >Date: Sun, 13 Aug 2006 13:24:28 +0200

> No problem, I don't like it either, if the registration functions
> still worked I would have kept using the old ones and defered the
> platform update.

Don't worry, that's clear.

> this is the result of mad typeing to get the silly thing 
> working under 2.6.17
>
> it is not too hard to just delete the !PLATFORM sections but I will
> be needing them in 2.6.12 later so I had left them in
> the struct redefs and function arg changes don't seem to fit well
> into a header abstraction unless you want #RETURNVALUE1
> #ARGLIST1 and simliar oddness.
See the irqreturn_t definition - they suggest similar things indeed for 2.4 
compatibility (they suggest "add 
#if 2.4
#define irqreturn_t void
#define IRQ_HANDLED /**/
#endif
).

> If I understood you correctly my problem would be
> in .h
> #ifdef KERN2_6_17
> #define func old_func
> #else
> #define func new_func
> #endif
> and in .c
> #ifdef PLATFORM
> new_return new_func(new_arg)
> {}
> #else
> old_return old_func(old_arg)
> {}
> #endif
> since the new and old version won't compile due to
> renaming arguments and return values that don't exist
> in the other version I think I would just end up duplicating
> the code in a bigger ifdef.

I don't know the specific issue (i.e. how different are the two routines), my 
proposal was something like

#if LINUX_KERNEL_VERSION < ...
#define pci_init_driver pci_register_driver
#endif

or to have a micro-wrapper just for the changed thing. If the init is too 
different then ok - actually if you write with the #ifdef possibly when you 
merge you can remove it, and even if you keep it I don't think there will be 
too many objections.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to