Michael Buesch wrote: >Hi, > >Is there a chance of porting this trivial fix >http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/limit2.comp.diff?r1=1.5;r2=1.6 >to v2_2_branch? > >I'm currently running 2.2-branch-cvs on a 2.6.26.8 kernel and it's >a little bit inconvenient to keep this tiny compiletime fix around >in the local checkout. > > Heh - it's the little things that get you :)
Is there any good reason to make this a function rather than a macro like the kernel? I'm thinking of something like the kernel macro: ((v)<(sub)?(sub):((v)>(sup)?(sup):(v))) That has the advantage and possible disadvantage of not specifying a type. You could theoretically compare an into int to float limits or the like. (the disadvantage being that you may not get a compile time error if you try calling the function with the wrong types) - Steve ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers