[LLVMdev] patches and problem...

Chris Lattner sabre at nondot.org
Tue Sep 28 07:57:10 PDT 2004


On Tue, 28 Sep 2004, Paolo Invernizzi wrote:

> The next major problem is that VC has only
>
> int rand(void)
> void srand( int seed )
>
> So I donno how to compile the
> ExecutionEngine/Interpreter/ExternalFunctions.cpp that refers to the
> drand48 srand48 lrand48 etc series...
> For now I hacked them, like
>
> double drand48(void) { return (float) rand() / (float) RAND_MAX

For these, just ifdef them out.  If the platform doesn't support drand48,
there is no reason for the interpreter to do so either...

-Chris

-- 
http://llvm.org/
http://nondot.org/sabre/




More information about the llvm-dev mailing list