I see that fflush() does work as expected on Windows 7 and is it only me or this is the issue with other people as well.
I read that many things are not working on Win7 and one of them is even the MS VC 6 compiler and so there is no surprise that one of your function behaves randomly.
I even see an issue when I wanted to run my XAMPP on Windows 7 but the latest xampp worked fine on Windows 7. I never upgrade my XAMPP for quite sometime and so may that was the reason.