I believe you can override the function by using preprocessors.
  If u want to override fun(),
   you just #define fun fun_local
   .Then try to call fun from your local function ..It  invoke 
fun_local and ultimately library function got overriden.
Expecting feed back........

Thanks
Manoj
   
  
--- In [email protected], "Thomas Voth" <[EMAIL PROTECTED]> wrote:
>
> Has anyone been able to override a C library function?  The code 
I'm working
> with is based in C and needs to compile with both the default 
Visual Studio
> Compiler and GCC so I don't believe LD_PRELOAD will work in this 
case (which
> is what I turn up when searching Google).
> 
> 
> 
> The goal behind this question is to build a shared library of 
common code
> for our BREW (Qualcomm's Binary Runtime Environment for Wireless)
> applications.  I'm trying to override library functions is because 
the BREW
> implementations on different handsets to be "touchy" and each 
handset has
> its own set of issues that can prevent code (that works on all the 
other
> handsets) from running.  This isn't a big deal with porting to 5 
or 6
> handsets, but when we port to all handsets (usually 40 to 50 
handsets)
> accounting for all of these issues makes the code exceptionally 
messy.
> 
> 
> 
> Thank you,
> 
> Tom
> 
> 
> P.S.  The BREW architect at my company did suggest writing a 
custom vtable
> to help redirect functions from the standard set when needed and I 
might be
> able to sell for latter applications, but the current stance on 
this is that
> it would require too much rewriting of the current code.
>










To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/c-prog/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to