Hoi !

I try to use some mathematical function inside a rt-thread. At the begining
this didn't seemed to be a problem. I linked the libm.a (part of glibc)
statically to my rt-module and everything was fine. The functions used until
this point had been the sine and the cosine functions.

The problemarised the moment i used asin the first time. Somehow the
designers of glibc have decided that some of the functions should make use
of the classical standard error output via fputs and stderr. These symbols
are (naturally) not available in rt-context. At the moment I just have
defined myself a workaround of the form:

int fputs(void) {
        return 1;
}

int stderr;

which so far satisfies the linker, and works as far as i can see. But i
don't think this is clean. Has anybody a better solution ?

blue skies
        Jan
-- 
-- Jan Christian Albiez --    
-- FZI -- Haid-und-Neu-Str. 10-14 -- 76131 Karlsruhe -- +49 721 9654 206 --
-- segmentation violation in module reality.o ...
                            ... please shutdown your universe and reboot --

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to