SDL_Gfx , compliling VC6

I am compiling SDL_Gfx on VC6.
I had a linker error of lrint

SDL_gfxPrimitives.obj : error LNK2001: unresolved external
symbol _lrint

I searched google for a while. I didnt really understand many of
the stuff. it looks like lrint is in standard C99, but not with
VC6. So after some search I added these lines to

SDL_gfxPrimitives.h

__inline int lrint (double flt)
{
int i;
_asm {
fld flt
fistp i
};
return i;
}

Now, debug version compiles and links. But release version
throws internal complier error.

D:\SDL\SDL_gfx-2.0.16\SDL_Gfx\SDL_gfxPrimitives.c(3014) : fatal
error C1001: INTERNAL COMPILER ERROR
(compiler file ‘E:\8966\vc98\p2\src\P2\main.c’, line 494)

Again after some search, when I turn off optimization for the
library, it works.

Is there any work around, without turning off optimization?

Thanks,
Tony____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.